summaryrefslogtreecommitdiff
path: root/node_modules/svgo
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2026-05-18 23:10:59 +0800
committerlittleblack111 <littleblack11111@gmail.com>2026-05-18 23:41:44 +0800
commitfc87c009806dcc98867f6b58efe29b042aa01dee (patch)
tree8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/svgo
parent3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff)
node: updatemain
Diffstat (limited to 'node_modules/svgo')
-rw-r--r--node_modules/svgo/LICENSE21
-rw-r--r--node_modules/svgo/README.md199
-rwxr-xr-xnode_modules/svgo/bin/svgo10
-rw-r--r--node_modules/svgo/dist/svgo-node.cjs2058
-rw-r--r--node_modules/svgo/dist/svgo.browser.js1
-rw-r--r--node_modules/svgo/lib/builtin.js57
-rw-r--r--node_modules/svgo/lib/parser.js262
-rw-r--r--node_modules/svgo/lib/path.js380
-rw-r--r--node_modules/svgo/lib/stringifier.js295
-rw-r--r--node_modules/svgo/lib/style.js336
-rw-r--r--node_modules/svgo/lib/svgo-node.js85
-rw-r--r--node_modules/svgo/lib/svgo.d.ts69
-rw-r--r--node_modules/svgo/lib/svgo.js102
-rw-r--r--node_modules/svgo/lib/svgo/coa.js528
-rw-r--r--node_modules/svgo/lib/svgo/css-select-adapter.d.ts2
-rw-r--r--node_modules/svgo/lib/svgo/css-select-adapter.js120
-rw-r--r--node_modules/svgo/lib/svgo/plugins.js61
-rw-r--r--node_modules/svgo/lib/svgo/tools.js245
-rw-r--r--node_modules/svgo/lib/types.d.ts174
-rw-r--r--node_modules/svgo/lib/xast.js87
-rw-r--r--node_modules/svgo/node_modules/commander/CHANGELOG.md440
-rw-r--r--node_modules/svgo/node_modules/commander/LICENSE22
-rw-r--r--node_modules/svgo/node_modules/commander/Readme.md917
-rw-r--r--node_modules/svgo/node_modules/commander/esm.mjs4
-rw-r--r--node_modules/svgo/node_modules/commander/index.js2217
-rw-r--r--node_modules/svgo/node_modules/commander/package-support.json16
-rw-r--r--node_modules/svgo/node_modules/commander/package.json68
-rw-r--r--node_modules/svgo/node_modules/commander/typings/index.d.ts627
-rw-r--r--node_modules/svgo/package.json108
-rw-r--r--node_modules/svgo/plugins/_collections.js2339
-rw-r--r--node_modules/svgo/plugins/_path.js815
-rw-r--r--node_modules/svgo/plugins/_transforms.js410
-rw-r--r--node_modules/svgo/plugins/addAttributesToSVGElement.js82
-rw-r--r--node_modules/svgo/plugins/addClassesToSVGElement.js82
-rw-r--r--node_modules/svgo/plugins/applyTransforms.js388
-rw-r--r--node_modules/svgo/plugins/cleanupAttrs.js49
-rw-r--r--node_modules/svgo/plugins/cleanupEnableBackground.js165
-rw-r--r--node_modules/svgo/plugins/cleanupIds.js265
-rw-r--r--node_modules/svgo/plugins/cleanupListOfValues.js147
-rw-r--r--node_modules/svgo/plugins/cleanupNumericValues.js106
-rw-r--r--node_modules/svgo/plugins/collapseGroups.js134
-rw-r--r--node_modules/svgo/plugins/convertColors.js144
-rw-r--r--node_modules/svgo/plugins/convertEllipseToCircle.js37
-rw-r--r--node_modules/svgo/plugins/convertOneStopGradients.js168
-rw-r--r--node_modules/svgo/plugins/convertPathData.js1284
-rw-r--r--node_modules/svgo/plugins/convertShapeToPath.js170
-rw-r--r--node_modules/svgo/plugins/convertStyleToAttrs.js136
-rw-r--r--node_modules/svgo/plugins/convertTransform.js418
-rw-r--r--node_modules/svgo/plugins/inlineStyles.js390
-rw-r--r--node_modules/svgo/plugins/mergePaths.js148
-rw-r--r--node_modules/svgo/plugins/mergeStyles.js98
-rw-r--r--node_modules/svgo/plugins/minifyStyles.js141
-rw-r--r--node_modules/svgo/plugins/moveElemsAttrsToGroup.js128
-rw-r--r--node_modules/svgo/plugins/moveGroupAttrsToElems.js65
-rw-r--r--node_modules/svgo/plugins/plugins-types.d.ts291
-rw-r--r--node_modules/svgo/plugins/prefixIds.js268
-rw-r--r--node_modules/svgo/plugins/preset-default.js82
-rw-r--r--node_modules/svgo/plugins/removeAttributesBySelector.js97
-rw-r--r--node_modules/svgo/plugins/removeAttrs.js151
-rw-r--r--node_modules/svgo/plugins/removeComments.js51
-rw-r--r--node_modules/svgo/plugins/removeDesc.js39
-rw-r--r--node_modules/svgo/plugins/removeDimensions.js43
-rw-r--r--node_modules/svgo/plugins/removeDoctype.js40
-rw-r--r--node_modules/svgo/plugins/removeEditorsNSData.js64
-rw-r--r--node_modules/svgo/plugins/removeElementsByAttr.js73
-rw-r--r--node_modules/svgo/plugins/removeEmptyAttrs.js31
-rw-r--r--node_modules/svgo/plugins/removeEmptyContainers.js59
-rw-r--r--node_modules/svgo/plugins/removeEmptyText.js51
-rw-r--r--node_modules/svgo/plugins/removeHiddenElems.js440
-rw-r--r--node_modules/svgo/plugins/removeMetadata.js27
-rw-r--r--node_modules/svgo/plugins/removeNonInheritableGroupAttrs.js38
-rw-r--r--node_modules/svgo/plugins/removeOffCanvasPaths.js136
-rw-r--r--node_modules/svgo/plugins/removeRasterImages.js31
-rw-r--r--node_modules/svgo/plugins/removeScriptElement.js70
-rw-r--r--node_modules/svgo/plugins/removeStyleElement.js27
-rw-r--r--node_modules/svgo/plugins/removeTitle.js27
-rw-r--r--node_modules/svgo/plugins/removeUnknownsAndDefaults.js212
-rw-r--r--node_modules/svgo/plugins/removeUnusedNS.js59
-rw-r--r--node_modules/svgo/plugins/removeUselessDefs.js65
-rw-r--r--node_modules/svgo/plugins/removeUselessStrokeAndFill.js139
-rw-r--r--node_modules/svgo/plugins/removeViewBox.js49
-rw-r--r--node_modules/svgo/plugins/removeXMLNS.js29
-rw-r--r--node_modules/svgo/plugins/removeXMLProcInst.js28
-rw-r--r--node_modules/svgo/plugins/removeXlink.js226
-rw-r--r--node_modules/svgo/plugins/reusePaths.js195
-rw-r--r--node_modules/svgo/plugins/sortAttrs.js108
-rw-r--r--node_modules/svgo/plugins/sortDefsChildren.js58
87 files changed, 0 insertions, 21124 deletions
diff --git a/node_modules/svgo/LICENSE b/node_modules/svgo/LICENSE
deleted file mode 100644
index 38a47dac..00000000
--- a/node_modules/svgo/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) Kir Belevich
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/node_modules/svgo/README.md b/node_modules/svgo/README.md
deleted file mode 100644
index 080a93c6..00000000
--- a/node_modules/svgo/README.md
+++ /dev/null
@@ -1,199 +0,0 @@
-<div align="center">
- <img src="./logo/logo-web.svg" width="348.61" height="100" alt=""/>
-</div>
-
-# SVGO [![npm](https://img.shields.io/npm/v/svgo)](https://npmjs.org/package/svgo) [![chat](https://img.shields.io/discord/815166721315831868)](https://discord.gg/z8jX8NYxrE) [![docs](https://img.shields.io/badge/docs-svgo.dev-blue)](https://svgo.dev/)
-
-SVGO, short for **SVG O**ptimizer, is a Node.js library and command-line application for optimizing SVG files.
-
-## Why?
-
-SVG files, especially those exported from vector editors, usually contain a lot of redundant information. This includes editor metadata, comments, hidden elements, default or suboptimal values, and other stuff that can be safely removed or converted without impacting rendering.
-
-## Installation
-
-You can install SVGO globally through npm, yarn, or pnpm. Alternatively, drop the global flag (`global`/`-g`) to use it in your Node.js project.
-
-```sh
-# npm
-npm install -g svgo
-
-# yarn
-yarn global add svgo
-
-# pnpm
-pnpm add -g svgo
-```
-
-## Command-line usage
-
-Process single files:
-
-```sh
-svgo one.svg two.svg -o one.min.svg two.min.svg
-```
-
-Process a directory of files recursively with `-f`/`--folder`:
-
-```sh
-svgo -f path/to/directory_with_svgs -o path/to/output_directory
-```
-
-Help for advanced usage:
-
-```sh
-svgo --help
-```
-
-## Configuration
-
-SVGO has a plugin architecture. You can read more about all plugins in [Plugins | SVGO Documentation](https://svgo.dev/docs/plugins/), and the default plugins in [Preset Default | SVGO Documentation](https://svgo.dev/docs/preset-default/).
-
-SVGO reads the configuration from `svgo.config.js` or the `--config path/to/config.js` command-line option. Some other parameters can be configured though command-line options too.
-
-**`svgo.config.js`**
-
-```js
-module.exports = {
- multipass: false, // boolean
- datauri: 'base64', // 'base64'|'enc'|'unenc'
- js2svg: {
- indent: 4, // number
- pretty: false, // boolean
- },
- plugins: [
- 'preset-default', // built-in plugins enabled by default
- 'prefixIds', // enable built-in plugins by name
-
- // enable built-in plugins with an object to configure plugins
- {
- name: 'prefixIds',
- params: {
- prefix: 'uwu',
- },
- },
- ],
-};
-```
-
-### Default preset
-
-Instead of configuring SVGO from scratch, you can tweak the default preset to suit your needs by configuring or disabling the respective plugin.
-
-**`svgo.config.js`**
-
-```js
-module.exports = {
- plugins: [
- {
- name: 'preset-default',
- params: {
- overrides: {
- // disable a default plugin
- removeViewBox: false,
-
- // customize the params of a default plugin
- inlineStyles: {
- onlyMatchedOnce: false,
- },
- },
- },
- },
- ],
-};
-```
-
-You can find a list of the default plugins in the order they run in [Preset Default | SVGO Documentation](https://svgo.dev/docs/preset-default/#plugins-list).
-
-### Custom plugins
-
-You can also specify custom plugins:
-
-**`svgo.config.js`**
-
-```js
-const importedPlugin = require('./imported-plugin');
-
-module.exports = {
- plugins: [
- // plugin imported from another JavaScript file
- importedPlugin,
-
- // plugin defined inline
- {
- name: 'customPlugin',
- params: {
- paramName: 'paramValue',
- },
- fn: (ast, params, info) => {},
- },
- ],
-};
-```
-
-## API usage
-
-SVGO provides a few low level utilities.
-
-### optimize
-
-The core of SVGO is `optimize` function.
-
-```js
-const { optimize } = require('svgo');
-
-const result = optimize(svgString, {
- path: 'path-to.svg', // recommended
- multipass: true, // all other config fields are available here
-});
-
-const optimizedSvgString = result.data;
-```
-
-### loadConfig
-
-If you write a tool on top of SVGO you may want to resolve the `svgo.config.js` file.
-
-```js
-const { loadConfig } = require('svgo');
-
-const config = await loadConfig();
-```
-
-You can also specify a path and customize the current working directory.
-
-```js
-const config = await loadConfig(configFile, cwd);
-```
-
-## Other ways to use SVGO
-
-| Method | Reference |
-| ------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
-| Web app | [SVGOMG](https://jakearchibald.github.io/svgomg/) |
-| Grunt task | [grunt-svgmin](https://github.com/sindresorhus/grunt-svgmin) |
-| Gulp task | [gulp-svgmin](https://github.com/ben-eb/gulp-svgmin) |
-| Webpack loader | [image-minimizer-webpack-plugin](https://github.com/webpack-contrib/image-minimizer-webpack-plugin/#optimize-with-svgo) |
-| PostCSS plugin | [postcss-svgo](https://github.com/cssnano/cssnano/tree/master/packages/postcss-svgo) |
-| Inkscape plugin | [inkscape-svgo](https://github.com/konsumer/inkscape-svgo) |
-| Sketch plugin | [svgo-compressor](https://github.com/BohemianCoding/svgo-compressor) |
-| Rollup plugin | [rollup-plugin-svgo](https://github.com/porsager/rollup-plugin-svgo) |
-| Visual Studio Code plugin | [vscode-svgo](https://github.com/1000ch/vscode-svgo) |
-| Atom plugin | [atom-svgo](https://github.com/1000ch/atom-svgo) |
-| Sublime plugin | [Sublime-svgo](https://github.com/1000ch/Sublime-svgo) |
-| Figma plugin | [Advanced SVG Export](https://www.figma.com/c/plugin/782713260363070260/Advanced-SVG-Export) |
-| Linux app | [Oh My SVG](https://github.com/sonnyp/OhMySVG) |
-| Browser extension | [SVG Gobbler](https://github.com/rossmoody/svg-gobbler) |
-| API | [Vector Express](https://github.com/smidyo/vectorexpress-api#convertor-svgo) |
-
-## Donors
-
-| [<img src="https://sheetjs.com/sketch128.png" width="80">](https://sheetjs.com/) | [<img src="https://raw.githubusercontent.com/fontello/fontello/8.0.0/fontello-image.svg" width="80">](https://fontello.com/) |
-| :------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------: |
-| [SheetJS LLC](https://sheetjs.com/) | [Fontello](https://fontello.com/) |
-
-## License and Copyright
-
-This software is released under the terms of the [MIT license](https://github.com/svg/svgo/blob/main/LICENSE).
-
-Logo by [André Castillo](https://github.com/DerianAndre).
diff --git a/node_modules/svgo/bin/svgo b/node_modules/svgo/bin/svgo
deleted file mode 100755
index cbca2b04..00000000
--- a/node_modules/svgo/bin/svgo
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env node
-
-const colors = require('picocolors');
-const { program } = require('commander');
-const makeProgram = require('../lib/svgo/coa');
-makeProgram(program);
-program.parseAsync(process.argv).catch((error) => {
- console.error(colors.red(error.stack));
- process.exit(1);
-});
diff --git a/node_modules/svgo/dist/svgo-node.cjs b/node_modules/svgo/dist/svgo-node.cjs
deleted file mode 100644
index 7f1edc4b..00000000
--- a/node_modules/svgo/dist/svgo-node.cjs
+++ /dev/null
@@ -1,2058 +0,0 @@
-"use strict"
-var os=require("os")
-var fs=require("fs")
-var url=require("url")
-var path=require("path")
-var SAX=require("@trysound/sax")
-var cssSelect=require("css-select")
-var csswhat=require("css-what")
-var csstree=require("css-tree")
-var csso=require("csso")
-function _interopNamespaceDefault(e){var n=Object.create(null)
-e&&Object.keys(e).forEach((function(k){if(k!=="default"){var d=Object.getOwnPropertyDescriptor(e,k)
-Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}})}}))
-n.default=e
-return Object.freeze(n)}var csswhat__namespace=_interopNamespaceDefault(csswhat)
-var csstree__namespace=_interopNamespaceDefault(csstree)
-var csso__namespace=_interopNamespaceDefault(csso)
-const elemsGroups={animation:new Set(["animate","animateColor","animateMotion","animateTransform","set"]),descriptive:new Set(["desc","metadata","title"]),shape:new Set(["circle","ellipse","line","path","polygon","polyline","rect"]),structural:new Set(["defs","g","svg","symbol","use"]),paintServer:new Set(["hatch","linearGradient","meshGradient","pattern","radialGradient","solidColor"]),nonRendering:new Set(["clipPath","filter","linearGradient","marker","mask","pattern","radialGradient","solidColor","symbol"]),container:new Set(["a","defs","foreignObject","g","marker","mask","missing-glyph","pattern","svg","switch","symbol"]),textContent:new Set(["a","altGlyph","altGlyphDef","altGlyphItem","glyph","glyphRef","text","textPath","tref","tspan"]),textContentChild:new Set(["altGlyph","textPath","tref","tspan"]),lightSource:new Set(["feDiffuseLighting","feDistantLight","fePointLight","feSpecularLighting","feSpotLight"]),filterPrimitive:new Set(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence"])}
-const textElems=new Set([...elemsGroups.textContent,"pre","title"])
-const pathElems=new Set(["glyph","missing-glyph","path"])
-const attrsGroups={animationAddition:new Set(["additive","accumulate"]),animationAttributeTarget:new Set(["attributeType","attributeName"]),animationEvent:new Set(["onbegin","onend","onrepeat","onload"]),animationTiming:new Set(["begin","dur","end","fill","max","min","repeatCount","repeatDur","restart"]),animationValue:new Set(["by","calcMode","from","keySplines","keyTimes","to","values"]),conditionalProcessing:new Set(["requiredExtensions","requiredFeatures","systemLanguage"]),core:new Set(["id","tabindex","xml:base","xml:lang","xml:space"]),graphicalEvent:new Set(["onactivate","onclick","onfocusin","onfocusout","onload","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup"]),presentation:new Set(["alignment-baseline","baseline-shift","clip-path","clip-rule","clip","color-interpolation-filters","color-interpolation","color-profile","color-rendering","color","cursor","direction","display","dominant-baseline","enable-background","fill-opacity","fill-rule","fill","filter","flood-color","flood-opacity","font-family","font-size-adjust","font-size","font-stretch","font-style","font-variant","font-weight","glyph-orientation-horizontal","glyph-orientation-vertical","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","mask","opacity","overflow","paint-order","pointer-events","shape-rendering","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","stroke","text-anchor","text-decoration","text-overflow","text-rendering","transform-origin","transform","unicode-bidi","vector-effect","visibility","word-spacing","writing-mode"]),xlink:new Set(["xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type"]),documentEvent:new Set(["onabort","onerror","onresize","onscroll","onunload","onzoom"]),documentElementEvent:new Set(["oncopy","oncut","onpaste"]),globalEvent:new Set(["oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onresize","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","onvolumechange","onwaiting"]),filterPrimitive:new Set(["x","y","width","height","result"]),transferFunction:new Set(["amplitude","exponent","intercept","offset","slope","tableValues","type"])}
-const attrsGroupsDefaults={core:{"xml:space":"default"},presentation:{clip:"auto","clip-path":"none","clip-rule":"nonzero",mask:"none",opacity:"1","stop-color":"#000","stop-opacity":"1","fill-opacity":"1","fill-rule":"nonzero",fill:"#000",stroke:"none","stroke-width":"1","stroke-linecap":"butt","stroke-linejoin":"miter","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-dashoffset":"0","stroke-opacity":"1","paint-order":"normal","vector-effect":"none",display:"inline",visibility:"visible","marker-start":"none","marker-mid":"none","marker-end":"none","color-interpolation":"sRGB","color-interpolation-filters":"linearRGB","color-rendering":"auto","shape-rendering":"auto","text-rendering":"auto","image-rendering":"auto","font-style":"normal","font-variant":"normal","font-weight":"normal","font-stretch":"normal","font-size":"medium","font-size-adjust":"none",kerning:"auto","letter-spacing":"normal","word-spacing":"normal","text-decoration":"none","text-anchor":"start","text-overflow":"clip","writing-mode":"lr-tb","glyph-orientation-vertical":"auto","glyph-orientation-horizontal":"0deg",direction:"ltr","unicode-bidi":"normal","dominant-baseline":"auto","alignment-baseline":"baseline","baseline-shift":"baseline"},transferFunction:{slope:"1",intercept:"0",amplitude:"1",exponent:"1",offset:"0"}}
-const attrsGroupsDeprecated={animationAttributeTarget:{unsafe:new Set(["attributeType"])},conditionalProcessing:{unsafe:new Set(["requiredFeatures"])},core:{unsafe:new Set(["xml:base","xml:lang","xml:space"])},presentation:{unsafe:new Set(["clip","color-profile","enable-background","glyph-orientation-horizontal","glyph-orientation-vertical","kerning"])}}
-const elems={a:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation","xlink"]),attrs:new Set(["class","externalResourcesRequired","style","target","transform"]),defaults:{target:"_self"},contentGroups:new Set(["animation","descriptive","paintServer","shape","structural"]),content:new Set(["a","altGlyphDef","clipPath","color-profile","cursor","filter","font-face","font","foreignObject","image","marker","mask","pattern","script","style","switch","text","view","tspan"])},altGlyph:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation","xlink"]),attrs:new Set(["class","dx","dy","externalResourcesRequired","format","glyphRef","rotate","style","x","y"])},altGlyphDef:{attrsGroups:new Set(["core"]),content:new Set(["glyphRef"])},altGlyphItem:{attrsGroups:new Set(["core"]),content:new Set(["glyphRef","altGlyphItem"])},animate:{attrsGroups:new Set(["animationAddition","animationAttributeTarget","animationEvent","animationTiming","animationValue","conditionalProcessing","core","presentation","xlink"]),attrs:new Set(["externalResourcesRequired"]),contentGroups:new Set(["descriptive"])},animateColor:{attrsGroups:new Set(["animationAddition","animationAttributeTarget","animationEvent","animationTiming","animationValue","conditionalProcessing","core","presentation","xlink"]),attrs:new Set(["externalResourcesRequired"]),contentGroups:new Set(["descriptive"])},animateMotion:{attrsGroups:new Set(["animationAddition","animationEvent","animationTiming","animationValue","conditionalProcessing","core","xlink"]),attrs:new Set(["externalResourcesRequired","keyPoints","origin","path","rotate"]),defaults:{rotate:"0"},contentGroups:new Set(["descriptive"]),content:new Set(["mpath"])},animateTransform:{attrsGroups:new Set(["animationAddition","animationAttributeTarget","animationEvent","animationTiming","animationValue","conditionalProcessing","core","xlink"]),attrs:new Set(["externalResourcesRequired","type"]),contentGroups:new Set(["descriptive"])},circle:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","cx","cy","externalResourcesRequired","r","style","transform"]),defaults:{cx:"0",cy:"0"},contentGroups:new Set(["animation","descriptive"])},clipPath:{attrsGroups:new Set(["conditionalProcessing","core","presentation"]),attrs:new Set(["class","clipPathUnits","externalResourcesRequired","style","transform"]),defaults:{clipPathUnits:"userSpaceOnUse"},contentGroups:new Set(["animation","descriptive","shape"]),content:new Set(["text","use"])},"color-profile":{attrsGroups:new Set(["core","xlink"]),attrs:new Set(["local","name","rendering-intent"]),defaults:{name:"sRGB","rendering-intent":"auto"},deprecated:{unsafe:new Set(["name"])},contentGroups:new Set(["descriptive"])},cursor:{attrsGroups:new Set(["core","conditionalProcessing","xlink"]),attrs:new Set(["externalResourcesRequired","x","y"]),defaults:{x:"0",y:"0"},contentGroups:new Set(["descriptive"])},defs:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","externalResourcesRequired","style","transform"]),contentGroups:new Set(["animation","descriptive","paintServer","shape","structural"]),content:new Set(["a","altGlyphDef","clipPath","color-profile","cursor","filter","font-face","font","foreignObject","image","marker","mask","pattern","script","style","switch","text","view"])},desc:{attrsGroups:new Set(["core"]),attrs:new Set(["class","style"])},ellipse:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","cx","cy","externalResourcesRequired","rx","ry","style","transform"]),defaults:{cx:"0",cy:"0"},contentGroups:new Set(["animation","descriptive"])},feBlend:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","style","in","in2","mode"]),defaults:{mode:"normal"},content:new Set(["animate","set"])},feColorMatrix:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","style","in","type","values"]),defaults:{type:"matrix"},content:new Set(["animate","set"])},feComponentTransfer:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","style","in"]),content:new Set(["feFuncA","feFuncB","feFuncG","feFuncR"])},feComposite:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","in","in2","k1","k2","k3","k4","operator","style"]),defaults:{operator:"over",k1:"0",k2:"0",k3:"0",k4:"0"},content:new Set(["animate","set"])},feConvolveMatrix:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","in","kernelMatrix","order","style","bias","divisor","edgeMode","targetX","targetY","kernelUnitLength","preserveAlpha"]),defaults:{order:"3",bias:"0",edgeMode:"duplicate",preserveAlpha:"false"},content:new Set(["animate","set"])},feDiffuseLighting:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","diffuseConstant","in","kernelUnitLength","style","surfaceScale"]),defaults:{surfaceScale:"1",diffuseConstant:"1"},contentGroups:new Set(["descriptive"]),content:new Set(["feDistantLight","fePointLight","feSpotLight"])},feDisplacementMap:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","in","in2","scale","style","xChannelSelector","yChannelSelector"]),defaults:{scale:"0",xChannelSelector:"A",yChannelSelector:"A"},content:new Set(["animate","set"])},feDistantLight:{attrsGroups:new Set(["core"]),attrs:new Set(["azimuth","elevation"]),defaults:{azimuth:"0",elevation:"0"},content:new Set(["animate","set"])},feFlood:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","style"]),content:new Set(["animate","animateColor","set"])},feFuncA:{attrsGroups:new Set(["core","transferFunction"]),content:new Set(["set","animate"])},feFuncB:{attrsGroups:new Set(["core","transferFunction"]),content:new Set(["set","animate"])},feFuncG:{attrsGroups:new Set(["core","transferFunction"]),content:new Set(["set","animate"])},feFuncR:{attrsGroups:new Set(["core","transferFunction"]),content:new Set(["set","animate"])},feGaussianBlur:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","style","in","stdDeviation"]),defaults:{stdDeviation:"0"},content:new Set(["set","animate"])},feImage:{attrsGroups:new Set(["core","presentation","filterPrimitive","xlink"]),attrs:new Set(["class","externalResourcesRequired","href","preserveAspectRatio","style","xlink:href"]),defaults:{preserveAspectRatio:"xMidYMid meet"},content:new Set(["animate","animateTransform","set"])},feMerge:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","style"]),content:new Set(["feMergeNode"])},feMergeNode:{attrsGroups:new Set(["core"]),attrs:new Set(["in"]),content:new Set(["animate","set"])},feMorphology:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","style","in","operator","radius"]),defaults:{operator:"erode",radius:"0"},content:new Set(["animate","set"])},feOffset:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","style","in","dx","dy"]),defaults:{dx:"0",dy:"0"},content:new Set(["animate","set"])},fePointLight:{attrsGroups:new Set(["core"]),attrs:new Set(["x","y","z"]),defaults:{x:"0",y:"0",z:"0"},content:new Set(["animate","set"])},feSpecularLighting:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","in","kernelUnitLength","specularConstant","specularExponent","style","surfaceScale"]),defaults:{surfaceScale:"1",specularConstant:"1",specularExponent:"1"},contentGroups:new Set(["descriptive","lightSource"])},feSpotLight:{attrsGroups:new Set(["core"]),attrs:new Set(["limitingConeAngle","pointsAtX","pointsAtY","pointsAtZ","specularExponent","x","y","z"]),defaults:{x:"0",y:"0",z:"0",pointsAtX:"0",pointsAtY:"0",pointsAtZ:"0",specularExponent:"1"},content:new Set(["animate","set"])},feTile:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","style","in"]),content:new Set(["animate","set"])},feTurbulence:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["baseFrequency","class","numOctaves","seed","stitchTiles","style","type"]),defaults:{baseFrequency:"0",numOctaves:"1",seed:"0",stitchTiles:"noStitch",type:"turbulence"},content:new Set(["animate","set"])},filter:{attrsGroups:new Set(["core","presentation","xlink"]),attrs:new Set(["class","externalResourcesRequired","filterRes","filterUnits","height","href","primitiveUnits","style","width","x","xlink:href","y"]),defaults:{primitiveUnits:"userSpaceOnUse",x:"-10%",y:"-10%",width:"120%",height:"120%"},deprecated:{unsafe:new Set(["filterRes"])},contentGroups:new Set(["descriptive","filterPrimitive"]),content:new Set(["animate","set"])},font:{attrsGroups:new Set(["core","presentation"]),attrs:new Set(["class","externalResourcesRequired","horiz-adv-x","horiz-origin-x","horiz-origin-y","style","vert-adv-y","vert-origin-x","vert-origin-y"]),defaults:{"horiz-origin-x":"0","horiz-origin-y":"0"},deprecated:{unsafe:new Set(["horiz-origin-x","horiz-origin-y","vert-adv-y","vert-origin-x","vert-origin-y"])},contentGroups:new Set(["descriptive"]),content:new Set(["font-face","glyph","hkern","missing-glyph","vkern"])},"font-face":{attrsGroups:new Set(["core"]),attrs:new Set(["font-family","font-style","font-variant","font-weight","font-stretch","font-size","unicode-range","units-per-em","panose-1","stemv","stemh","slope","cap-height","x-height","accent-height","ascent","descent","widths","bbox","ideographic","alphabetic","mathematical","hanging","v-ideographic","v-alphabetic","v-mathematical","v-hanging","underline-position","underline-thickness","strikethrough-position","strikethrough-thickness","overline-position","overline-thickness"]),defaults:{"font-style":"all","font-variant":"normal","font-weight":"all","font-stretch":"normal","unicode-range":"U+0-10FFFF","units-per-em":"1000","panose-1":"0 0 0 0 0 0 0 0 0 0",slope:"0"},deprecated:{unsafe:new Set(["accent-height","alphabetic","ascent","bbox","cap-height","descent","hanging","ideographic","mathematical","panose-1","slope","stemh","stemv","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","widths","x-height"])},contentGroups:new Set(["descriptive"]),content:new Set(["font-face-src"])},"font-face-format":{attrsGroups:new Set(["core"]),attrs:new Set(["string"]),deprecated:{unsafe:new Set(["string"])}},"font-face-name":{attrsGroups:new Set(["core"]),attrs:new Set(["name"]),deprecated:{unsafe:new Set(["name"])}},"font-face-src":{attrsGroups:new Set(["core"]),content:new Set(["font-face-name","font-face-uri"])},"font-face-uri":{attrsGroups:new Set(["core","xlink"]),attrs:new Set(["href","xlink:href"]),content:new Set(["font-face-format"])},foreignObject:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","externalResourcesRequired","height","style","transform","width","x","y"]),defaults:{x:"0",y:"0"}},g:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","externalResourcesRequired","style","transform"]),contentGroups:new Set(["animation","descriptive","paintServer","shape","structural"]),content:new Set(["a","altGlyphDef","clipPath","color-profile","cursor","filter","font-face","font","foreignObject","image","marker","mask","pattern","script","style","switch","text","view"])},glyph:{attrsGroups:new Set(["core","presentation"]),attrs:new Set(["arabic-form","class","d","glyph-name","horiz-adv-x","lang","orientation","style","unicode","vert-adv-y","vert-origin-x","vert-origin-y"]),defaults:{"arabic-form":"initial"},deprecated:{unsafe:new Set(["arabic-form","glyph-name","horiz-adv-x","orientation","unicode","vert-adv-y","vert-origin-x","vert-origin-y"])},contentGroups:new Set(["animation","descriptive","paintServer","shape","structural"]),content:new Set(["a","altGlyphDef","clipPath","color-profile","cursor","filter","font-face","font","foreignObject","image","marker","mask","pattern","script","style","switch","text","view"])},glyphRef:{attrsGroups:new Set(["core","presentation"]),attrs:new Set(["class","d","horiz-adv-x","style","vert-adv-y","vert-origin-x","vert-origin-y"]),deprecated:{unsafe:new Set(["horiz-adv-x","vert-adv-y","vert-origin-x","vert-origin-y"])},contentGroups:new Set(["animation","descriptive","paintServer","shape","structural"]),content:new Set(["a","altGlyphDef","clipPath","color-profile","cursor","filter","font-face","font","foreignObject","image","marker","mask","pattern","script","style","switch","text","view"])},hatch:{attrsGroups:new Set(["core","presentation","xlink"]),attrs:new Set(["class","hatchContentUnits","hatchUnits","pitch","rotate","style","transform","x","y"]),defaults:{hatchUnits:"objectBoundingBox",hatchContentUnits:"userSpaceOnUse",x:"0",y:"0",pitch:"0",rotate:"0"},contentGroups:new Set(["animation","descriptive"]),content:new Set(["hatchPath"])},hatchPath:{attrsGroups:new Set(["core","presentation","xlink"]),attrs:new Set(["class","style","d","offset"]),defaults:{offset:"0"},contentGroups:new Set(["animation","descriptive"])},hkern:{attrsGroups:new Set(["core"]),attrs:new Set(["u1","g1","u2","g2","k"]),deprecated:{unsafe:new Set(["g1","g2","k","u1","u2"])}},image:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation","xlink"]),attrs:new Set(["class","externalResourcesRequired","height","href","preserveAspectRatio","style","transform","width","x","xlink:href","y"]),defaults:{x:"0",y:"0",preserveAspectRatio:"xMidYMid meet"},contentGroups:new Set(["animation","descriptive"])},line:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","externalResourcesRequired","style","transform","x1","x2","y1","y2"]),defaults:{x1:"0",y1:"0",x2:"0",y2:"0"},contentGroups:new Set(["animation","descriptive"])},linearGradient:{attrsGroups:new Set(["core","presentation","xlink"]),attrs:new Set(["class","externalResourcesRequired","gradientTransform","gradientUnits","href","spreadMethod","style","x1","x2","xlink:href","y1","y2"]),defaults:{x1:"0",y1:"0",x2:"100%",y2:"0",spreadMethod:"pad"},contentGroups:new Set(["descriptive"]),content:new Set(["animate","animateTransform","set","stop"])},marker:{attrsGroups:new Set(["core","presentation"]),attrs:new Set(["class","externalResourcesRequired","markerHeight","markerUnits","markerWidth","orient","preserveAspectRatio","refX","refY","style","viewBox"]),defaults:{markerUnits:"strokeWidth",refX:"0",refY:"0",markerWidth:"3",markerHeight:"3"},contentGroups:new Set(["animation","descriptive","paintServer","shape","structural"]),content:new Set(["a","altGlyphDef","clipPath","color-profile","cursor","filter","font-face","font","foreignObject","image","marker","mask","pattern","script","style","switch","text","view"])},mask:{attrsGroups:new Set(["conditionalProcessing","core","presentation"]),attrs:new Set(["class","externalResourcesRequired","height","mask-type","maskContentUnits","maskUnits","style","width","x","y"]),defaults:{maskUnits:"objectBoundingBox",maskContentUnits:"userSpaceOnUse",x:"-10%",y:"-10%",width:"120%",height:"120%"},contentGroups:new Set(["animation","descriptive","paintServer","shape","structural"]),content:new Set(["a","altGlyphDef","clipPath","color-profile","cursor","filter","font-face","font","foreignObject","image","marker","mask","pattern","script","style","switch","text","view"])},metadata:{attrsGroups:new Set(["core"])},"missing-glyph":{attrsGroups:new Set(["core","presentation"]),attrs:new Set(["class","d","horiz-adv-x","style","vert-adv-y","vert-origin-x","vert-origin-y"]),deprecated:{unsafe:new Set(["horiz-adv-x","vert-adv-y","vert-origin-x","vert-origin-y"])},contentGroups:new Set(["animation","descriptive","paintServer","shape","structural"]),content:new Set(["a","altGlyphDef","clipPath","color-profile","cursor","filter","font-face","font","foreignObject","image","marker","mask","pattern","script","style","switch","text","view"])},mpath:{attrsGroups:new Set(["core","xlink"]),attrs:new Set(["externalResourcesRequired","href","xlink:href"]),contentGroups:new Set(["descriptive"])},path:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","d","externalResourcesRequired","pathLength","style","transform"]),contentGroups:new Set(["animation","descriptive"])},pattern:{attrsGroups:new Set(["conditionalProcessing","core","presentation","xlink"]),attrs:new Set(["class","externalResourcesRequired","height","href","patternContentUnits","patternTransform","patternUnits","preserveAspectRatio","style","viewBox","width","x","xlink:href","y"]),defaults:{patternUnits:"objectBoundingBox",patternContentUnits:"userSpaceOnUse",x:"0",y:"0",width:"0",height:"0",preserveAspectRatio:"xMidYMid meet"},contentGroups:new Set(["animation","descriptive","paintServer","shape","structural"]),content:new Set(["a","altGlyphDef","clipPath","color-profile","cursor","filter","font-face","font","foreignObject","image","marker","mask","pattern","script","style","switch","text","view"])},polygon:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","externalResourcesRequired","points","style","transform"]),contentGroups:new Set(["animation","descriptive"])},polyline:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","externalResourcesRequired","points","style","transform"]),contentGroups:new Set(["animation","descriptive"])},radialGradient:{attrsGroups:new Set(["core","presentation","xlink"]),attrs:new Set(["class","cx","cy","externalResourcesRequired","fr","fx","fy","gradientTransform","gradientUnits","href","r","spreadMethod","style","xlink:href"]),defaults:{gradientUnits:"objectBoundingBox",cx:"50%",cy:"50%",r:"50%"},contentGroups:new Set(["descriptive"]),content:new Set(["animate","animateTransform","set","stop"])},meshGradient:{attrsGroups:new Set(["core","presentation","xlink"]),attrs:new Set(["class","style","x","y","gradientUnits","transform"]),contentGroups:new Set(["descriptive","paintServer","animation"]),content:new Set(["meshRow"])},meshRow:{attrsGroups:new Set(["core","presentation"]),attrs:new Set(["class","style"]),contentGroups:new Set(["descriptive"]),content:new Set(["meshPatch"])},meshPatch:{attrsGroups:new Set(["core","presentation"]),attrs:new Set(["class","style"]),contentGroups:new Set(["descriptive"]),content:new Set(["stop"])},rect:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","externalResourcesRequired","height","rx","ry","style","transform","width","x","y"]),defaults:{x:"0",y:"0"},contentGroups:new Set(["animation","descriptive"])},script:{attrsGroups:new Set(["core","xlink"]),attrs:new Set(["externalResourcesRequired","type","href","xlink:href"])},set:{attrsGroups:new Set(["animation","animationAttributeTarget","animationTiming","conditionalProcessing","core","xlink"]),attrs:new Set(["externalResourcesRequired","to"]),contentGroups:new Set(["descriptive"])},solidColor:{attrsGroups:new Set(["core","presentation"]),attrs:new Set(["class","style"]),contentGroups:new Set(["paintServer"])},stop:{attrsGroups:new Set(["core","presentation"]),attrs:new Set(["class","style","offset","path"]),content:new Set(["animate","animateColor","set"])},style:{attrsGroups:new Set(["core"]),attrs:new Set(["type","media","title"]),defaults:{type:"text/css"}},svg:{attrsGroups:new Set(["conditionalProcessing","core","documentEvent","graphicalEvent","presentation"]),attrs:new Set(["baseProfile","class","contentScriptType","contentStyleType","height","preserveAspectRatio","style","version","viewBox","width","x","y","zoomAndPan"]),defaults:{x:"0",y:"0",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid meet",zoomAndPan:"magnify",version:"1.1",baseProfile:"none",contentScriptType:"application/ecmascript",contentStyleType:"text/css"},deprecated:{safe:new Set(["version"]),unsafe:new Set(["baseProfile","contentScriptType","contentStyleType","zoomAndPan"])},contentGroups:new Set(["animation","descriptive","paintServer","shape","structural"]),content:new Set(["a","altGlyphDef","clipPath","color-profile","cursor","filter","font-face","font","foreignObject","image","marker","mask","pattern","script","style","switch","text","view"])},switch:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","externalResourcesRequired","style","transform"]),contentGroups:new Set(["animation","descriptive","shape"]),content:new Set(["a","foreignObject","g","image","svg","switch","text","use"])},symbol:{attrsGroups:new Set(["core","graphicalEvent","presentation"]),attrs:new Set(["class","externalResourcesRequired","preserveAspectRatio","refX","refY","style","viewBox"]),defaults:{refX:"0",refY:"0"},contentGroups:new Set(["animation","descriptive","paintServer","shape","structural"]),content:new Set(["a","altGlyphDef","clipPath","color-profile","cursor","filter","font-face","font","foreignObject","image","marker","mask","pattern","script","style","switch","text","view"])},text:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","dx","dy","externalResourcesRequired","lengthAdjust","rotate","style","textLength","transform","x","y"]),defaults:{x:"0",y:"0",lengthAdjust:"spacing"},contentGroups:new Set(["animation","descriptive","textContentChild"]),content:new Set(["a"])},textPath:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation","xlink"]),attrs:new Set(["class","d","externalResourcesRequired","href","method","spacing","startOffset","style","xlink:href"]),defaults:{startOffset:"0",method:"align",spacing:"exact"},contentGroups:new Set(["descriptive"]),content:new Set(["a","altGlyph","animate","animateColor","set","tref","tspan"])},title:{attrsGroups:new Set(["core"]),attrs:new Set(["class","style"])},tref:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation","xlink"]),attrs:new Set(["class","externalResourcesRequired","href","style","xlink:href"]),contentGroups:new Set(["descriptive"]),content:new Set(["animate","animateColor","set"])},tspan:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","dx","dy","externalResourcesRequired","lengthAdjust","rotate","style","textLength","x","y"]),contentGroups:new Set(["descriptive"]),content:new Set(["a","altGlyph","animate","animateColor","set","tref","tspan"])},use:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation","xlink"]),attrs:new Set(["class","externalResourcesRequired","height","href","style","transform","width","x","xlink:href","y"]),defaults:{x:"0",y:"0"},contentGroups:new Set(["animation","descriptive"])},view:{attrsGroups:new Set(["core"]),attrs:new Set(["externalResourcesRequired","preserveAspectRatio","viewBox","viewTarget","zoomAndPan"]),deprecated:{unsafe:new Set(["viewTarget","zoomAndPan"])},contentGroups:new Set(["descriptive"])},vkern:{attrsGroups:new Set(["core"]),attrs:new Set(["u1","g1","u2","g2","k"]),deprecated:{unsafe:new Set(["g1","g2","k","u1","u2"])}}}
-const editorNamespaces=new Set(["http://creativecommons.org/ns#","http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd","http://ns.adobe.com/AdobeIllustrator/10.0/","http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/","http://ns.adobe.com/Extensibility/1.0/","http://ns.adobe.com/Flows/1.0/","http://ns.adobe.com/GenericCustomNamespace/1.0/","http://ns.adobe.com/Graphs/1.0/","http://ns.adobe.com/ImageReplacement/1.0/","http://ns.adobe.com/SaveForWeb/1.0/","http://ns.adobe.com/Variables/1.0/","http://ns.adobe.com/XPath/1.0/","http://purl.org/dc/elements/1.1/","http://schemas.microsoft.com/visio/2003/SVGExtensions/","http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd","http://taptrix.com/vectorillustrator/svg_extensions","http://www.bohemiancoding.com/sketch/ns","http://www.figma.com/figma/ns","http://www.inkscape.org/namespaces/inkscape","http://www.serif.com/","http://www.vector.evaxdesign.sk","http://www.w3.org/1999/02/22-rdf-syntax-ns#"])
-const referencesProps=new Set(["clip-path","color-profile","fill","filter","marker-end","marker-mid","marker-start","mask","stroke","style"])
-const inheritableAttrs=new Set(["clip-rule","color-interpolation-filters","color-interpolation","color-profile","color-rendering","color","cursor","direction","dominant-baseline","fill-opacity","fill-rule","fill","font-family","font-size-adjust","font-size","font-stretch","font-style","font-variant","font-weight","font","glyph-orientation-horizontal","glyph-orientation-vertical","image-rendering","letter-spacing","marker-end","marker-mid","marker-start","marker","paint-order","pointer-events","shape-rendering","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","stroke","text-anchor","text-rendering","transform","visibility","word-spacing","writing-mode"])
-const presentationNonInheritableGroupAttrs=new Set(["clip-path","display","filter","mask","opacity","text-decoration","transform","unicode-bidi"])
-const colorsNames={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#0ff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000",blanchedalmond:"#ffebcd",blue:"#00f",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#f0f",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#789",lightslategrey:"#789",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#0f0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#f0f",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#639",red:"#f00",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#fff",whitesmoke:"#f5f5f5",yellow:"#ff0",yellowgreen:"#9acd32"}
-const colorsShortNames={"#f0ffff":"azure","#f5f5dc":"beige","#ffe4c4":"bisque","#a52a2a":"brown","#ff7f50":"coral","#ffd700":"gold","#808080":"gray","#008000":"green","#4b0082":"indigo","#fffff0":"ivory","#f0e68c":"khaki","#faf0e6":"linen","#800000":"maroon","#000080":"navy","#808000":"olive","#ffa500":"orange","#da70d6":"orchid","#cd853f":"peru","#ffc0cb":"pink","#dda0dd":"plum","#800080":"purple","#f00":"red","#ff0000":"red","#fa8072":"salmon","#a0522d":"sienna","#c0c0c0":"silver","#fffafa":"snow","#d2b48c":"tan","#008080":"teal","#ff6347":"tomato","#ee82ee":"violet","#f5deb3":"wheat"}
-const colorsProps=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"])
-const pseudoClasses={displayState:new Set(["fullscreen","modal","picture-in-picture"]),input:new Set(["autofill","blank","checked","default","disabled","enabled","in-range","indetermined","invalid","optional","out-of-range","placeholder-shown","read-only","read-write","required","user-invalid","valid"]),linguistic:new Set(["dir","lang"]),location:new Set(["any-link","link","local-link","scope","target-within","target","visited"]),resourceState:new Set(["playing","paused"]),timeDimensional:new Set(["current","past","future"]),treeStructural:new Set(["empty","first-child","first-of-type","last-child","last-of-type","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","root"]),userAction:new Set(["active","focus-visible","focus-within","focus","hover"]),functional:new Set(["is","not","where","has"])}
-class SvgoParserError extends Error{constructor(message,line,column,source,file){super(message)
-this.name="SvgoParserError"
-this.message=`${file||"<input>"}:${line}:${column}: ${message}`
-this.reason=message
-this.line=line
-this.column=column
-this.source=source
-Error.captureStackTrace&&Error.captureStackTrace(this,SvgoParserError)}toString(){const lines=this.source.split(/\r?\n/)
-const startLine=Math.max(this.line-3,0)
-const endLine=Math.min(this.line+2,lines.length)
-const lineNumberWidth=String(endLine).length
-const startColumn=Math.max(this.column-54,0)
-const endColumn=Math.max(this.column+20,80)
-const code=lines.slice(startLine,endLine).map(((line,index)=>{const lineSlice=line.slice(startColumn,endColumn)
-let ellipsisPrefix=""
-let ellipsisSuffix=""
-startColumn!==0&&(ellipsisPrefix=startColumn>line.length-1?" ":"…")
-endColumn<line.length-1&&(ellipsisSuffix="…")
-const number=startLine+1+index
-const gutter=` ${number.toString().padStart(lineNumberWidth)} | `
-if(number===this.line){const gutterSpacing=gutter.replace(/[^|]/g," ")
-const lineSpacing=(ellipsisPrefix+line.slice(startColumn,this.column-1)).replace(/[^\t]/g," ")
-const spacing=gutterSpacing+lineSpacing
-return`>${gutter}${ellipsisPrefix}${lineSlice}${ellipsisSuffix}\n ${spacing}^`}return` ${gutter}${ellipsisPrefix}${lineSlice}${ellipsisSuffix}`})).join("\n")
-return`${this.name}: ${this.message}\n\n${code}\n`}}const entityDeclaration=/<!ENTITY\s+(\S+)\s+(?:'([^']+)'|"([^"]+)")\s*>/g
-const config={strict:true,trim:false,normalize:false,lowercase:true,xmlns:true,position:true}
-const parseSvg=(data,from)=>{const sax=SAX.parser(config.strict,config)
-const root={type:"root",children:[]}
-let current=root
-const stack=[root]
-const pushToContent=node=>{Object.defineProperty(node,"parentNode",{writable:true,value:current})
-current.children.push(node)}
-sax.ondoctype=doctype=>{const node={type:"doctype",name:"svg",data:{doctype:doctype}}
-pushToContent(node)
-const subsetStart=doctype.indexOf("[")
-if(subsetStart>=0){entityDeclaration.lastIndex=subsetStart
-let entityMatch=entityDeclaration.exec(data)
-while(entityMatch!=null){sax.ENTITIES[entityMatch[1]]=entityMatch[2]||entityMatch[3]
-entityMatch=entityDeclaration.exec(data)}}}
-sax.onprocessinginstruction=data=>{const node={type:"instruction",name:data.name,value:data.body}
-pushToContent(node)}
-sax.oncomment=comment=>{const node={type:"comment",value:comment.trim()}
-pushToContent(node)}
-sax.oncdata=cdata=>{const node={type:"cdata",value:cdata}
-pushToContent(node)}
-sax.onopentag=data=>{let element={type:"element",name:data.name,attributes:{},children:[]}
-for(const[name,attr]of Object.entries(data.attributes))element.attributes[name]=attr.value
-pushToContent(element)
-current=element
-stack.push(element)}
-sax.ontext=text=>{if(current.type==="element")if(textElems.has(current.name)){const node={type:"text",value:text}
-pushToContent(node)}else if(/\S/.test(text)){const node={type:"text",value:text.trim()}
-pushToContent(node)}}
-sax.onclosetag=()=>{stack.pop()
-current=stack[stack.length-1]}
-sax.onerror=e=>{const error=new SvgoParserError(e.reason,e.line+1,e.column,data,from)
-if(e.message.indexOf("Unexpected end")===-1)throw error}
-sax.write(data).close()
-return root}
-const encodeEntity=char=>entities[char]
-const defaults={doctypeStart:"<!DOCTYPE",doctypeEnd:">",procInstStart:"<?",procInstEnd:"?>",tagOpenStart:"<",tagOpenEnd:">",tagCloseStart:"</",tagCloseEnd:">",tagShortStart:"<",tagShortEnd:"/>",attrStart:'="',attrEnd:'"',commentStart:"\x3c!--",commentEnd:"--\x3e",cdataStart:"<![CDATA[",cdataEnd:"]]>",textStart:"",textEnd:"",indent:4,regEntities:/[&'"<>]/g,regValEntities:/[&"<>]/g,encodeEntity:encodeEntity,pretty:false,useShortTags:true,eol:"lf",finalNewline:false}
-const entities={"&":"&amp;","'":"&apos;",'"':"&quot;",">":"&gt;","<":"&lt;"}
-const stringifySvg=(data,userOptions={})=>{const config={...defaults,...userOptions}
-const indent=config.indent
-let newIndent=" "
-typeof indent==="number"&&Number.isNaN(indent)===false?newIndent=indent<0?"\t":" ".repeat(indent):typeof indent==="string"&&(newIndent=indent)
-const state={indent:newIndent,textContext:null,indentLevel:0}
-const eol=config.eol==="crlf"?"\r\n":"\n"
-if(config.pretty){config.doctypeEnd+=eol
-config.procInstEnd+=eol
-config.commentEnd+=eol
-config.cdataEnd+=eol
-config.tagShortEnd+=eol
-config.tagOpenEnd+=eol
-config.tagCloseEnd+=eol
-config.textEnd+=eol}let svg=stringifyNode(data,config,state)
-config.finalNewline&&svg.length>0&&!svg.endsWith("\n")&&(svg+=eol)
-return svg}
-const stringifyNode=(data,config,state)=>{let svg=""
-state.indentLevel+=1
-for(const item of data.children){item.type==="element"&&(svg+=stringifyElement(item,config,state))
-item.type==="text"&&(svg+=stringifyText(item,config,state))
-item.type==="doctype"&&(svg+=stringifyDoctype(item,config))
-item.type==="instruction"&&(svg+=stringifyInstruction(item,config))
-item.type==="comment"&&(svg+=stringifyComment(item,config))
-item.type==="cdata"&&(svg+=stringifyCdata(item,config,state))}state.indentLevel-=1
-return svg}
-const createIndent=(config,state)=>{let indent=""
-config.pretty&&state.textContext==null&&(indent=state.indent.repeat(state.indentLevel-1))
-return indent}
-const stringifyDoctype=(node,config)=>config.doctypeStart+node.data.doctype+config.doctypeEnd
-const stringifyInstruction=(node,config)=>config.procInstStart+node.name+" "+node.value+config.procInstEnd
-const stringifyComment=(node,config)=>config.commentStart+node.value+config.commentEnd
-const stringifyCdata=(node,config,state)=>createIndent(config,state)+config.cdataStart+node.value+config.cdataEnd
-const stringifyElement=(node,config,state)=>{if(node.children.length===0)return config.useShortTags?createIndent(config,state)+config.tagShortStart+node.name+stringifyAttributes(node,config)+config.tagShortEnd:createIndent(config,state)+config.tagShortStart+node.name+stringifyAttributes(node,config)+config.tagOpenEnd+config.tagCloseStart+node.name+config.tagCloseEnd
-{let tagOpenStart=config.tagOpenStart
-let tagOpenEnd=config.tagOpenEnd
-let tagCloseStart=config.tagCloseStart
-let tagCloseEnd=config.tagCloseEnd
-let openIndent=createIndent(config,state)
-let closeIndent=createIndent(config,state)
-if(state.textContext){tagOpenStart=defaults.tagOpenStart
-tagOpenEnd=defaults.tagOpenEnd
-tagCloseStart=defaults.tagCloseStart
-tagCloseEnd=defaults.tagCloseEnd
-openIndent=""}else if(textElems.has(node.name)){tagOpenEnd=defaults.tagOpenEnd
-tagCloseStart=defaults.tagCloseStart
-closeIndent=""
-state.textContext=node}const children=stringifyNode(node,config,state)
-state.textContext===node&&(state.textContext=null)
-return openIndent+tagOpenStart+node.name+stringifyAttributes(node,config)+tagOpenEnd+children+closeIndent+tagCloseStart+node.name+tagCloseEnd}}
-const stringifyAttributes=(node,config)=>{let attrs=""
-for(const[name,value]of Object.entries(node.attributes))if(value!==void 0){const encodedValue=value.toString().replace(config.regValEntities,config.encodeEntity)
-attrs+=" "+name+config.attrStart+encodedValue+config.attrEnd}else attrs+=" "+name
-return attrs}
-const stringifyText=(node,config,state)=>createIndent(config,state)+config.textStart+node.value.replace(config.regEntities,config.encodeEntity)+(state.textContext?"":config.textEnd)
-const isTag=node=>node.type==="element"
-const existsOne=(test,elems)=>elems.some((elem=>!!isTag(elem)&&(test(elem)||existsOne(test,getChildren(elem)))))
-const getAttributeValue=(elem,name)=>elem.attributes[name]
-const getChildren=node=>node.children||[]
-const getName=elemAst=>elemAst.name
-const getParent=node=>node.parentNode||null
-const getSiblings=elem=>{var parent=getParent(elem)
-return parent?getChildren(parent):[]}
-const getText=node=>{if(node.children[0].type==="text"&&node.children[0].type==="cdata")return node.children[0].value
-return""}
-const hasAttrib=(elem,name)=>elem.attributes[name]!==void 0
-const removeSubsets=nodes=>{let idx=nodes.length
-let node
-let ancestor
-let replace
-while(--idx>-1){node=ancestor=nodes[idx]
-nodes[idx]=null
-replace=true
-while(ancestor){if(nodes.includes(ancestor)){replace=false
-nodes.splice(idx,1)
-break}ancestor=getParent(ancestor)}replace&&(nodes[idx]=node)}return nodes}
-const findAll=(test,elems)=>{const result=[]
-for(const elem of elems)if(isTag(elem)){test(elem)&&result.push(elem)
-result.push(...findAll(test,getChildren(elem)))}return result}
-const findOne=(test,elems)=>{for(const elem of elems)if(isTag(elem)){if(test(elem))return elem
-const result=findOne(test,getChildren(elem))
-if(result)return result}return null}
-const svgoCssSelectAdapter={isTag:isTag,existsOne:existsOne,getAttributeValue:getAttributeValue,getChildren:getChildren,getName:getName,getParent:getParent,getSiblings:getSiblings,getText:getText,hasAttrib:hasAttrib,removeSubsets:removeSubsets,findAll:findAll,findOne:findOne}
-const cssSelectOptions={xmlMode:true,adapter:svgoCssSelectAdapter}
-const querySelectorAll=(node,selector)=>cssSelect.selectAll(selector,node,cssSelectOptions)
-const querySelector=(node,selector)=>cssSelect.selectOne(selector,node,cssSelectOptions)
-const matches=(node,selector)=>cssSelect.is(node,selector,cssSelectOptions)
-const visitSkip=Symbol()
-const visit=(node,visitor,parentNode)=>{const callbacks=visitor[node.type]
-if(callbacks&&callbacks.enter){const symbol=callbacks.enter(node,parentNode)
-if(symbol===visitSkip)return}if(node.type==="root")for(const child of node.children)visit(child,visitor,node)
-if(node.type==="element"&&parentNode.children.includes(node))for(const child of node.children)visit(child,visitor,node)
-callbacks&&callbacks.exit&&callbacks.exit(node,parentNode)}
-const detachNodeFromParent=(node,parentNode)=>{parentNode.children=parentNode.children.filter((child=>child!==node))}
-const invokePlugins=(ast,info,plugins,overrides,globalOverrides)=>{for(const plugin of plugins){const override=overrides?.[plugin.name]
-if(override===false)continue
-const params={...plugin.params,...globalOverrides,...override}
-const visitor=plugin.fn(ast,params,info)
-visitor!=null&&visit(ast,visitor)}}
-const createPreset=({name:name,plugins:plugins})=>({name:name,fn:(ast,params,info)=>{const{floatPrecision:floatPrecision,overrides:overrides}=params
-const globalOverrides={}
-floatPrecision!=null&&(globalOverrides.floatPrecision=floatPrecision)
-if(overrides){const pluginNames=plugins.map((({name:name})=>name))
-for(const pluginName of Object.keys(overrides))pluginNames.includes(pluginName)||console.warn(`You are trying to configure ${pluginName} which is not part of ${name}.\nTry to put it before or after, for example\n\nplugins: [\n {\n name: '${name}',\n },\n '${pluginName}'\n]\n`)}invokePlugins(ast,info,plugins,overrides,globalOverrides)}})
-const name$Q="removeDoctype"
-const description$Q="removes doctype declaration"
-const fn$Q=()=>({doctype:{enter:(node,parentNode)=>{detachNodeFromParent(node,parentNode)}}})
-var removeDoctype=Object.freeze({__proto__:null,description:description$Q,fn:fn$Q,name:name$Q})
-const name$P="removeXMLProcInst"
-const description$P="removes XML processing instructions"
-const fn$P=()=>({instruction:{enter:(node,parentNode)=>{node.name==="xml"&&detachNodeFromParent(node,parentNode)}}})
-var removeXMLProcInst=Object.freeze({__proto__:null,description:description$P,fn:fn$P,name:name$P})
-const name$O="removeComments"
-const description$O="removes comments"
-const DEFAULT_PRESERVE_PATTERNS=[/^!/]
-const fn$O=(_root,params)=>{const{preservePatterns:preservePatterns=DEFAULT_PRESERVE_PATTERNS}=params
-return{comment:{enter:(node,parentNode)=>{if(preservePatterns){if(!Array.isArray(preservePatterns))throw Error(`Expected array in removeComments preservePatterns parameter but received ${preservePatterns}`)
-const matches=preservePatterns.some((pattern=>new RegExp(pattern).test(node.value)))
-if(matches)return}detachNodeFromParent(node,parentNode)}}}}
-var removeComments=Object.freeze({__proto__:null,description:description$O,fn:fn$O,name:name$O})
-const csstreeWalkSkip=csstree__namespace.walk.skip
-const parseRule=(ruleNode,dynamic)=>{const declarations=[]
-ruleNode.block.children.forEach((cssNode=>{cssNode.type==="Declaration"&&declarations.push({name:cssNode.property,value:csstree__namespace.generate(cssNode.value),important:cssNode.important===true})}))
-const rules=[]
-csstree__namespace.walk(ruleNode.prelude,(node=>{if(node.type==="Selector"){const newNode=csstree__namespace.clone(node)
-let hasPseudoClasses=false
-csstree__namespace.walk(newNode,((pseudoClassNode,item,list)=>{if(pseudoClassNode.type==="PseudoClassSelector"){hasPseudoClasses=true
-list.remove(item)}}))
-rules.push({specificity:csso.syntax.specificity(node),dynamic:hasPseudoClasses||dynamic,selector:csstree__namespace.generate(newNode),declarations:declarations})}}))
-return rules}
-const parseStylesheet=(css,dynamic)=>{const rules=[]
-const ast=csstree__namespace.parse(css,{parseValue:false,parseAtrulePrelude:false})
-csstree__namespace.walk(ast,(cssNode=>{if(cssNode.type==="Rule"){rules.push(...parseRule(cssNode,dynamic||false))
-return csstreeWalkSkip}if(cssNode.type==="Atrule"){if(cssNode.name==="keyframes"||cssNode.name==="-webkit-keyframes")return csstreeWalkSkip
-csstree__namespace.walk(cssNode,(ruleNode=>{if(ruleNode.type==="Rule"){rules.push(...parseRule(ruleNode,dynamic||true))
-return csstreeWalkSkip}}))
-return csstreeWalkSkip}}))
-return rules}
-const parseStyleDeclarations=css=>{const declarations=[]
-const ast=csstree__namespace.parse(css,{context:"declarationList",parseValue:false})
-csstree__namespace.walk(ast,(cssNode=>{cssNode.type==="Declaration"&&declarations.push({name:cssNode.property,value:csstree__namespace.generate(cssNode.value),important:cssNode.important===true})}))
-return declarations}
-const computeOwnStyle=(stylesheet,node)=>{const computedStyle={}
-const importantStyles=new Map
-for(const[name,value]of Object.entries(node.attributes))if(attrsGroups.presentation.has(name)){computedStyle[name]={type:"static",inherited:false,value:value}
-importantStyles.set(name,false)}for(const{selector:selector,declarations:declarations,dynamic:dynamic}of stylesheet.rules)if(matches(node,selector))for(const{name:name,value:value,important:important}of declarations){const computed=computedStyle[name]
-if(computed&&computed.type==="dynamic")continue
-if(dynamic){computedStyle[name]={type:"dynamic",inherited:false}
-continue}if(computed==null||important===true||importantStyles.get(name)===false){computedStyle[name]={type:"static",inherited:false,value:value}
-importantStyles.set(name,important)}}const styleDeclarations=node.attributes.style==null?[]:parseStyleDeclarations(node.attributes.style)
-for(const{name:name,value:value,important:important}of styleDeclarations){const computed=computedStyle[name]
-if(computed&&computed.type==="dynamic")continue
-if(computed==null||important===true||importantStyles.get(name)===false){computedStyle[name]={type:"static",inherited:false,value:value}
-importantStyles.set(name,important)}}return computedStyle}
-const compareSpecificity=(a,b)=>{for(let i=0;i<4;i+=1){if(a[i]<b[i])return-1
-if(a[i]>b[i])return 1}return 0}
-const collectStylesheet=root=>{const rules=[]
-const parents=new Map
-visit(root,{element:{enter:(node,parentNode)=>{parents.set(node,parentNode)
-if(node.name!=="style")return
-if(node.attributes.type==null||node.attributes.type===""||node.attributes.type==="text/css"){const dynamic=node.attributes.media!=null&&node.attributes.media!=="all"
-for(const child of node.children)child.type!=="text"&&child.type!=="cdata"||rules.push(...parseStylesheet(child.value,dynamic))}}}})
-rules.sort(((a,b)=>compareSpecificity(a.specificity,b.specificity)))
-return{rules:rules,parents:parents}}
-const computeStyle=(stylesheet,node)=>{const{parents:parents}=stylesheet
-const computedStyles=computeOwnStyle(stylesheet,node)
-let parent=parents.get(node)
-while(parent!=null&&parent.type!=="root"){const inheritedStyles=computeOwnStyle(stylesheet,parent)
-for(const[name,computed]of Object.entries(inheritedStyles))computedStyles[name]==null&&inheritableAttrs.has(name)&&!presentationNonInheritableGroupAttrs.has(name)&&(computedStyles[name]={...computed,inherited:true})
-parent=parents.get(parent)}return computedStyles}
-const includesAttrSelector=(selector,name,value=null,traversed=false)=>{const selectors=typeof selector==="string"?csswhat__namespace.parse(selector):csswhat__namespace.parse(csstree__namespace.generate(selector.data))
-for(const subselector of selectors){const hasAttrSelector=subselector.some(((segment,index)=>{if(traversed){if(index===subselector.length-1)return false
-const isNextTraversal=csswhat__namespace.isTraversal(subselector[index+1])
-if(!isNextTraversal)return false}if(segment.type!=="attribute"||segment.name!==name)return false
-return value==null||segment.value===value}))
-if(hasAttrSelector)return true}return false}
-const name$N="removeDeprecatedAttrs"
-const description$N="removes deprecated attributes"
-function extractAttributesInStylesheet(stylesheet){const attributesInStylesheet=new Set
-stylesheet.rules.forEach((rule=>{const selectors=csswhat__namespace.parse(rule.selector)
-selectors.forEach((subselector=>{subselector.forEach((segment=>{if(segment.type!=="attribute")return
-attributesInStylesheet.add(segment.name)}))}))}))
-return attributesInStylesheet}function processAttributes(node,deprecatedAttrs,params,attributesInStylesheet){if(!deprecatedAttrs)return
-deprecatedAttrs.safe&&deprecatedAttrs.safe.forEach((name=>{if(attributesInStylesheet.has(name))return
-delete node.attributes[name]}))
-params.removeUnsafe&&deprecatedAttrs.unsafe&&deprecatedAttrs.unsafe.forEach((name=>{if(attributesInStylesheet.has(name))return
-delete node.attributes[name]}))}function fn$N(root,params){const stylesheet=collectStylesheet(root)
-const attributesInStylesheet=extractAttributesInStylesheet(stylesheet)
-return{element:{enter:node=>{const elemConfig=elems[node.name]
-if(!elemConfig)return
-elemConfig.attrsGroups.has("core")&&node.attributes["xml:lang"]&&!attributesInStylesheet.has("xml:lang")&&node.attributes["lang"]&&delete node.attributes["xml:lang"]
-elemConfig.attrsGroups.forEach((attrsGroup=>{processAttributes(node,attrsGroupsDeprecated[attrsGroup],params,attributesInStylesheet)}))
-processAttributes(node,elemConfig.deprecated,params,attributesInStylesheet)}}}}var removeDeprecatedAttrs=Object.freeze({__proto__:null,description:description$N,fn:fn$N,name:name$N})
-const name$M="removeMetadata"
-const description$M="removes <metadata>"
-const fn$M=()=>({element:{enter:(node,parentNode)=>{node.name==="metadata"&&detachNodeFromParent(node,parentNode)}}})
-var removeMetadata=Object.freeze({__proto__:null,description:description$M,fn:fn$M,name:name$M})
-const name$L="removeEditorsNSData"
-const description$L="removes editors namespaces, elements and attributes"
-const fn$L=(_root,params)=>{let namespaces=[...editorNamespaces]
-Array.isArray(params.additionalNamespaces)&&(namespaces=[...editorNamespaces,...params.additionalNamespaces])
-const prefixes=[]
-return{element:{enter:(node,parentNode)=>{if(node.name==="svg")for(const[name,value]of Object.entries(node.attributes))if(name.startsWith("xmlns:")&&namespaces.includes(value)){prefixes.push(name.slice(6))
-delete node.attributes[name]}for(const name of Object.keys(node.attributes))if(name.includes(":")){const[prefix]=name.split(":")
-prefixes.includes(prefix)&&delete node.attributes[name]}if(node.name.includes(":")){const[prefix]=node.name.split(":")
-prefixes.includes(prefix)&&detachNodeFromParent(node,parentNode)}}}}}
-var removeEditorsNSData=Object.freeze({__proto__:null,description:description$L,fn:fn$L,name:name$L})
-const name$K="cleanupAttrs"
-const description$K="cleanups attributes from newlines, trailing and repeating spaces"
-const regNewlinesNeedSpace=/(\S)\r?\n(\S)/g
-const regNewlines=/\r?\n/g
-const regSpaces=/\s{2,}/g
-const fn$K=(root,params)=>{const{newlines:newlines=true,trim:trim=true,spaces:spaces=true}=params
-return{element:{enter:node=>{for(const name of Object.keys(node.attributes)){if(newlines){node.attributes[name]=node.attributes[name].replace(regNewlinesNeedSpace,((match,p1,p2)=>p1+" "+p2))
-node.attributes[name]=node.attributes[name].replace(regNewlines,"")}trim&&(node.attributes[name]=node.attributes[name].trim())
-spaces&&(node.attributes[name]=node.attributes[name].replace(regSpaces," "))}}}}}
-var cleanupAttrs=Object.freeze({__proto__:null,description:description$K,fn:fn$K,name:name$K})
-const name$J="mergeStyles"
-const description$J="merge multiple style elements into one"
-const fn$J=()=>{let firstStyleElement=null
-let collectedStyles=""
-let styleContentType="text"
-return{element:{enter:(node,parentNode)=>{if(node.name==="foreignObject")return visitSkip
-if(node.name!=="style")return
-if(node.attributes.type!=null&&node.attributes.type!==""&&node.attributes.type!=="text/css")return
-let css=""
-for(const child of node.children){child.type==="text"&&(css+=child.value)
-if(child.type==="cdata"){styleContentType="cdata"
-css+=child.value}}if(css.trim().length===0){detachNodeFromParent(node,parentNode)
-return}if(node.attributes.media==null)collectedStyles+=css
-else{collectedStyles+=`@media ${node.attributes.media}{${css}}`
-delete node.attributes.media}if(firstStyleElement==null)firstStyleElement=node
-else{detachNodeFromParent(node,parentNode)
-const child={type:styleContentType,value:collectedStyles}
-Object.defineProperty(child,"parentNode",{writable:true,value:firstStyleElement})
-firstStyleElement.children=[child]}}}}}
-var mergeStyles=Object.freeze({__proto__:null,description:description$J,fn:fn$J,name:name$J})
-const name$I="inlineStyles"
-const description$I="inline styles (additional options)"
-const preservedPseudos=[...pseudoClasses.functional,...pseudoClasses.treeStructural]
-const fn$I=(root,params)=>{const{onlyMatchedOnce:onlyMatchedOnce=true,removeMatchedSelectors:removeMatchedSelectors=true,useMqs:useMqs=["","screen"],usePseudos:usePseudos=[""]}=params
-const styles=[]
-let selectors=[]
-return{element:{enter:(node,parentNode)=>{if(node.name==="foreignObject")return visitSkip
-if(node.name!=="style"||node.children.length===0)return
-if(node.attributes.type!=null&&node.attributes.type!==""&&node.attributes.type!=="text/css")return
-const cssText=node.children.filter((child=>child.type==="text"||child.type==="cdata")).map((child=>child.value)).join("")
-let cssAst=null
-try{cssAst=csstree__namespace.parse(cssText,{parseValue:false,parseCustomProperty:false})}catch{return}cssAst.type==="StyleSheet"&&styles.push({node:node,parentNode:parentNode,cssAst:cssAst})
-csstree__namespace.walk(cssAst,{visit:"Rule",enter(node){const atrule=this.atrule
-let mediaQuery=""
-if(atrule!=null){mediaQuery=atrule.name
-atrule.prelude!=null&&(mediaQuery+=` ${csstree__namespace.generate(atrule.prelude)}`)}if(!useMqs.includes(mediaQuery))return
-node.prelude.type==="SelectorList"&&node.prelude.children.forEach(((childNode,item)=>{if(childNode.type==="Selector"){const pseudos=[]
-childNode.children.forEach(((grandchildNode,grandchildItem,grandchildList)=>{const isPseudo=grandchildNode.type==="PseudoClassSelector"||grandchildNode.type==="PseudoElementSelector"
-isPseudo&&!preservedPseudos.includes(grandchildNode.name)&&pseudos.push({item:grandchildItem,list:grandchildList})}))
-const pseudoSelectors=csstree__namespace.generate({type:"Selector",children:(new csstree__namespace.List).fromArray(pseudos.map((pseudo=>pseudo.item.data)))})
-if(usePseudos.includes(pseudoSelectors))for(const pseudo of pseudos)pseudo.list.remove(pseudo.item)
-selectors.push({node:childNode,rule:node,item:item})}}))}})}},root:{exit:()=>{if(styles.length===0)return
-const sortedSelectors=selectors.slice().sort(((a,b)=>{const aSpecificity=csso.syntax.specificity(a.item.data)
-const bSpecificity=csso.syntax.specificity(b.item.data)
-return compareSpecificity(aSpecificity,bSpecificity)})).reverse()
-for(const selector of sortedSelectors){const selectorText=csstree__namespace.generate(selector.item.data)
-const matchedElements=[]
-try{for(const node of querySelectorAll(root,selectorText))node.type==="element"&&matchedElements.push(node)}catch(selectError){continue}if(matchedElements.length===0)continue
-if(onlyMatchedOnce&&matchedElements.length>1)continue
-for(const selectedEl of matchedElements){const styleDeclarationList=csstree__namespace.parse(selectedEl.attributes.style??"",{context:"declarationList",parseValue:false})
-if(styleDeclarationList.type!=="DeclarationList")continue
-const styleDeclarationItems=new Map
-let firstListItem
-csstree__namespace.walk(styleDeclarationList,{visit:"Declaration",enter(node,item){firstListItem==null&&(firstListItem=item)
-styleDeclarationItems.set(node.property.toLowerCase(),item)}})
-csstree__namespace.walk(selector.rule,{visit:"Declaration",enter(ruleDeclaration){const property=ruleDeclaration.property
-attrsGroups.presentation.has(property)&&!selectors.some((selector=>includesAttrSelector(selector.item,property)))&&delete selectedEl.attributes[property]
-const matchedItem=styleDeclarationItems.get(property)
-const ruleDeclarationItem=styleDeclarationList.children.createItem(ruleDeclaration)
-if(matchedItem==null)styleDeclarationList.children.insert(ruleDeclarationItem,firstListItem)
-else if(matchedItem.data.important!==true&&ruleDeclaration.important===true){styleDeclarationList.children.replace(matchedItem,ruleDeclarationItem)
-styleDeclarationItems.set(property,ruleDeclarationItem)}}})
-const newStyles=csstree__namespace.generate(styleDeclarationList)
-newStyles.length!==0&&(selectedEl.attributes.style=newStyles)}removeMatchedSelectors&&matchedElements.length!==0&&selector.rule.prelude.type==="SelectorList"&&selector.rule.prelude.children.remove(selector.item)
-selector.matchedElements=matchedElements}if(!removeMatchedSelectors)return
-for(const selector of sortedSelectors){if(selector.matchedElements==null)continue
-if(onlyMatchedOnce&&selector.matchedElements.length>1)continue
-for(const selectedEl of selector.matchedElements){const classList=new Set(selectedEl.attributes.class==null?null:selectedEl.attributes.class.split(" "))
-for(const child of selector.node.children)child.type!=="ClassSelector"||selectors.some((selector=>includesAttrSelector(selector.item,"class",child.name,true)))||classList.delete(child.name)
-classList.size===0?delete selectedEl.attributes.class:selectedEl.attributes.class=Array.from(classList).join(" ")
-const firstSubSelector=selector.node.children.first
-firstSubSelector?.type!=="IdSelector"||selectedEl.attributes.id!==firstSubSelector.name||selectors.some((selector=>includesAttrSelector(selector.item,"id",firstSubSelector.name,true)))||delete selectedEl.attributes.id}}for(const style of styles){csstree__namespace.walk(style.cssAst,{visit:"Rule",enter:function(node,item,list){node.type==="Rule"&&node.prelude.type==="SelectorList"&&node.prelude.children.isEmpty&&list.remove(item)}})
-if(style.cssAst.children.isEmpty)detachNodeFromParent(style.node,style.parentNode)
-else{const firstChild=style.node.children[0]
-firstChild.type!=="text"&&firstChild.type!=="cdata"||(firstChild.value=csstree__namespace.generate(style.cssAst))}}}}}}
-var inlineStyles=Object.freeze({__proto__:null,description:description$I,fn:fn$I,name:name$I})
-const regReferencesUrl=/\burl\((["'])?#(.+?)\1\)/g
-const regReferencesHref=/^#(.+?)$/
-const regReferencesBegin=/(\w+)\.[a-zA-Z]/
-const encodeSVGDatauri=(str,type)=>{var prefix="data:image/svg+xml"
-if(type&&type!=="base64")type==="enc"?str=prefix+","+encodeURIComponent(str):type==="unenc"&&(str=prefix+","+str)
-else{prefix+=";base64,"
-str=prefix+Buffer.from(str).toString("base64")}return str}
-const cleanupOutData=(data,params,command)=>{let str=""
-let delimiter
-let prev
-data.forEach(((item,i)=>{delimiter=" "
-i==0&&(delimiter="")
-if(params.noSpaceAfterFlags&&(command=="A"||command=="a")){var pos=i%7
-pos!=4&&pos!=5||(delimiter="")}const itemStr=params.leadingZero?removeLeadingZero(item):item.toString()
-params.negativeExtraSpace&&delimiter!=""&&(item<0||itemStr.charAt(0)==="."&&prev%1!==0)&&(delimiter="")
-prev=item
-str+=delimiter+itemStr}))
-return str}
-const removeLeadingZero=value=>{const strValue=value.toString()
-if(0<value&&value<1&&strValue.startsWith("0"))return strValue.slice(1)
-if(-1<value&&value<0&&strValue[1]==="0")return strValue[0]+strValue.slice(2)
-return strValue}
-const hasScripts=node=>{if(node.name==="script"&&node.children.length!==0)return true
-if(node.name==="a"){const hasJsLinks=Object.entries(node.attributes).some((([attrKey,attrValue])=>(attrKey==="href"||attrKey.endsWith(":href"))&&attrValue!=null&&attrValue.trimStart().startsWith("javascript:")))
-if(hasJsLinks)return true}const eventAttrs=[...attrsGroups.animationEvent,...attrsGroups.documentEvent,...attrsGroups.documentElementEvent,...attrsGroups.globalEvent,...attrsGroups.graphicalEvent]
-return eventAttrs.some((attr=>node.attributes[attr]!=null))}
-const includesUrlReference=body=>new RegExp(regReferencesUrl).test(body)
-const findReferences=(attribute,value)=>{const results=[]
-if(referencesProps.has(attribute)){const matches=value.matchAll(regReferencesUrl)
-for(const match of matches)results.push(match[2])}if(attribute==="href"||attribute.endsWith(":href")){const match=regReferencesHref.exec(value)
-match!=null&&results.push(match[1])}if(attribute==="begin"){const match=regReferencesBegin.exec(value)
-match!=null&&results.push(match[1])}return results.map((body=>decodeURI(body)))}
-const toFixed=(num,precision)=>{const pow=10**precision
-return Math.round(num*pow)/pow}
-const name$H="minifyStyles"
-const description$H="minifies styles and removes unused styles"
-const fn$H=(_root,{usage:usage,...params})=>{const styleElements=new Map
-const elementsWithStyleAttributes=[]
-const tagsUsage=new Set
-const idsUsage=new Set
-const classesUsage=new Set
-let enableTagsUsage=true
-let enableIdsUsage=true
-let enableClassesUsage=true
-let forceUsageDeoptimized=false
-if(typeof usage==="boolean"){enableTagsUsage=usage
-enableIdsUsage=usage
-enableClassesUsage=usage}else if(usage){enableTagsUsage=usage.tags==null||usage.tags
-enableIdsUsage=usage.ids==null||usage.ids
-enableClassesUsage=usage.classes==null||usage.classes
-forceUsageDeoptimized=usage.force!=null&&usage.force}let deoptimized=false
-return{element:{enter:(node,parentNode)=>{hasScripts(node)&&(deoptimized=true)
-tagsUsage.add(node.name)
-node.attributes.id!=null&&idsUsage.add(node.attributes.id)
-if(node.attributes.class!=null)for(const className of node.attributes.class.split(/\s+/))classesUsage.add(className)
-node.name==="style"&&node.children.length!==0?styleElements.set(node,parentNode):node.attributes.style!=null&&elementsWithStyleAttributes.push(node)}},root:{exit:()=>{const cssoUsage={}
-if(!deoptimized||forceUsageDeoptimized){enableTagsUsage&&(cssoUsage.tags=Array.from(tagsUsage))
-enableIdsUsage&&(cssoUsage.ids=Array.from(idsUsage))
-enableClassesUsage&&(cssoUsage.classes=Array.from(classesUsage))}for(const[styleNode,styleNodeParent]of styleElements.entries())if(styleNode.children[0].type==="text"||styleNode.children[0].type==="cdata"){const cssText=styleNode.children[0].value
-const minified=csso__namespace.minify(cssText,{...params,usage:cssoUsage}).css
-if(minified.length===0){detachNodeFromParent(styleNode,styleNodeParent)
-continue}if(cssText.indexOf(">")>=0||cssText.indexOf("<")>=0){styleNode.children[0].type="cdata"
-styleNode.children[0].value=minified}else{styleNode.children[0].type="text"
-styleNode.children[0].value=minified}}for(const node of elementsWithStyleAttributes){const elemStyle=node.attributes.style
-node.attributes.style=csso__namespace.minifyBlock(elemStyle,{...params}).css}}}}}
-var minifyStyles=Object.freeze({__proto__:null,description:description$H,fn:fn$H,name:name$H})
-const name$G="cleanupIds"
-const description$G="removes unused IDs and minifies used"
-const generateIdChars=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
-const maxIdIndex=generateIdChars.length-1
-const hasStringPrefix=(string,prefixes)=>{for(const prefix of prefixes)if(string.startsWith(prefix))return true
-return false}
-const generateId=currentId=>{if(currentId==null)return[0]
-currentId[currentId.length-1]+=1
-for(let i=currentId.length-1;i>0;i--)if(currentId[i]>maxIdIndex){currentId[i]=0
-currentId[i-1]!==void 0&&currentId[i-1]++}if(currentId[0]>maxIdIndex){currentId[0]=0
-currentId.unshift(0)}return currentId}
-const getIdString=arr=>arr.map((i=>generateIdChars[i])).join("")
-const fn$G=(_root,params)=>{const{remove:remove=true,minify:minify=true,preserve:preserve=[],preservePrefixes:preservePrefixes=[],force:force=false}=params
-const preserveIds=new Set(Array.isArray(preserve)?preserve:preserve?[preserve]:[])
-const preserveIdPrefixes=Array.isArray(preservePrefixes)?preservePrefixes:preservePrefixes?[preservePrefixes]:[]
-const nodeById=new Map
-const referencesById=new Map
-let deoptimized=false
-return{element:{enter:node=>{if(!force){if(node.name==="style"&&node.children.length!==0||hasScripts(node)){deoptimized=true
-return}if(node.name==="svg"){let hasDefsOnly=true
-for(const child of node.children)if(child.type!=="element"||child.name!=="defs"){hasDefsOnly=false
-break}if(hasDefsOnly)return visitSkip}}for(const[name,value]of Object.entries(node.attributes))if(name==="id"){const id=value
-nodeById.has(id)?delete node.attributes.id:nodeById.set(id,node)}else{const ids=findReferences(name,value)
-for(const id of ids){let refs=referencesById.get(id)
-if(refs==null){refs=[]
-referencesById.set(id,refs)}refs.push({element:node,name:name})}}}},root:{exit:()=>{if(deoptimized)return
-const isIdPreserved=id=>preserveIds.has(id)||hasStringPrefix(id,preserveIdPrefixes)
-let currentId=null
-for(const[id,refs]of referencesById){const node=nodeById.get(id)
-if(node!=null){if(minify&&isIdPreserved(id)===false){let currentIdString=null
-do{currentId=generateId(currentId)
-currentIdString=getIdString(currentId)}while(isIdPreserved(currentIdString)||referencesById.has(currentIdString)&&nodeById.get(currentIdString)==null)
-node.attributes.id=currentIdString
-for(const{element:element,name:name}of refs){const value=element.attributes[name]
-value.includes("#")?element.attributes[name]=value.replace(`#${encodeURI(id)}`,`#${currentIdString}`).replace(`#${id}`,`#${currentIdString}`):element.attributes[name]=value.replace(`${id}.`,`${currentIdString}.`)}}nodeById.delete(id)}}if(remove)for(const[id,node]of nodeById)isIdPreserved(id)===false&&delete node.attributes.id}}}}
-var cleanupIds=Object.freeze({__proto__:null,description:description$G,fn:fn$G,name:name$G})
-const name$F="removeUselessDefs"
-const description$F="removes elements in <defs> without id"
-const fn$F=()=>({element:{enter:(node,parentNode)=>{if(node.name==="defs"||elemsGroups.nonRendering.has(node.name)&&node.attributes.id==null){const usefulNodes=[]
-collectUsefulNodes(node,usefulNodes)
-usefulNodes.length===0&&detachNodeFromParent(node,parentNode)
-for(const usefulNode of usefulNodes)Object.defineProperty(usefulNode,"parentNode",{writable:true,value:node})
-node.children=usefulNodes}}}})
-const collectUsefulNodes=(node,usefulNodes)=>{for(const child of node.children)child.type==="element"&&(child.attributes.id!=null||child.name==="style"?usefulNodes.push(child):collectUsefulNodes(child,usefulNodes))}
-var removeUselessDefs=Object.freeze({__proto__:null,description:description$F,fn:fn$F,name:name$F})
-const name$E="cleanupNumericValues"
-const description$E="rounds numeric values to the fixed precision, removes default ‘px’ units"
-const regNumericValues$3=/^([-+]?\d*\.?\d+([eE][-+]?\d+)?)(px|pt|pc|mm|cm|m|in|ft|em|ex|%)?$/
-const absoluteLengths$1={cm:96/2.54,mm:96/25.4,in:96,pt:4/3,pc:16,px:1}
-const fn$E=(_root,params)=>{const{floatPrecision:floatPrecision=3,leadingZero:leadingZero=true,defaultPx:defaultPx=true,convertToPx:convertToPx=true}=params
-return{element:{enter:node=>{if(node.attributes.viewBox!=null){const nums=node.attributes.viewBox.split(/\s,?\s*|,\s*/g)
-node.attributes.viewBox=nums.map((value=>{const num=Number(value)
-return Number.isNaN(num)?value:Number(num.toFixed(floatPrecision))})).join(" ")}for(const[name,value]of Object.entries(node.attributes)){if(name==="version")continue
-const match=value.match(regNumericValues$3)
-if(match){let num=Number(Number(match[1]).toFixed(floatPrecision))
-let matchedUnit=match[3]||""
-let units=matchedUnit
-if(convertToPx&&units!==""&&units in absoluteLengths$1){const pxNum=Number((absoluteLengths$1[units]*Number(match[1])).toFixed(floatPrecision))
-if(pxNum.toString().length<match[0].length){num=pxNum
-units="px"}}let str
-str=leadingZero?removeLeadingZero(num):num.toString()
-defaultPx&&units==="px"&&(units="")
-node.attributes[name]=str+units}}}}}}
-var cleanupNumericValues=Object.freeze({__proto__:null,description:description$E,fn:fn$E,name:name$E})
-const name$D="convertColors"
-const description$D="converts colors: rgb() to #rrggbb and #rrggbb to #rgb"
-const rNumber="([+-]?(?:\\d*\\.\\d+|\\d+\\.?)%?)"
-const rComma="\\s*,\\s*"
-const regRGB=new RegExp("^rgb\\(\\s*"+rNumber+rComma+rNumber+rComma+rNumber+"\\s*\\)$")
-const regHEX=/^#(([a-fA-F0-9])\2){3}$/
-const convertRgbToHex=([r,g,b])=>{const hexNumber=(256+r<<8|g)<<8|b
-return"#"+hexNumber.toString(16).slice(1).toUpperCase()}
-const fn$D=(_root,params)=>{const{currentColor:currentColor=false,names2hex:names2hex=true,rgb2hex:rgb2hex=true,convertCase:convertCase="lower",shorthex:shorthex=true,shortname:shortname=true}=params
-return{element:{enter:node=>{for(const[name,value]of Object.entries(node.attributes))if(colorsProps.has(name)){let val=value
-if(currentColor){let matched
-matched=typeof currentColor==="string"?val===currentColor:currentColor instanceof RegExp?currentColor.exec(val)!=null:val!=="none"
-matched&&(val="currentcolor")}if(names2hex){const colorName=val.toLowerCase()
-colorsNames[colorName]!=null&&(val=colorsNames[colorName])}if(rgb2hex){let match=val.match(regRGB)
-if(match!=null){let nums=match.slice(1,4).map((m=>{let n
-n=m.indexOf("%")>-1?Math.round(parseFloat(m)*2.55):Number(m)
-return Math.max(0,Math.min(n,255))}))
-val=convertRgbToHex(nums)}}convertCase&&!includesUrlReference(val)&&(convertCase==="lower"?val=val.toLowerCase():convertCase==="upper"&&(val=val.toUpperCase()))
-if(shorthex){let match=regHEX.exec(val)
-match!=null&&(val="#"+match[0][1]+match[0][3]+match[0][5])}if(shortname){const colorName=val.toLowerCase()
-colorsShortNames[colorName]!=null&&(val=colorsShortNames[colorName])}node.attributes[name]=val}}}}}
-var convertColors=Object.freeze({__proto__:null,description:description$D,fn:fn$D,name:name$D})
-const name$C="removeUnknownsAndDefaults"
-const description$C="removes unknown elements content and attributes, removes attrs with default values"
-const allowedChildrenPerElement=new Map
-const allowedAttributesPerElement=new Map
-const attributesDefaultsPerElement=new Map
-for(const[name,config]of Object.entries(elems)){const allowedChildren=new Set
-if(config.content)for(const elementName of config.content)allowedChildren.add(elementName)
-if(config.contentGroups)for(const contentGroupName of config.contentGroups){const elemsGroup=elemsGroups[contentGroupName]
-if(elemsGroup)for(const elementName of elemsGroup)allowedChildren.add(elementName)}const allowedAttributes=new Set
-if(config.attrs)for(const attrName of config.attrs)allowedAttributes.add(attrName)
-const attributesDefaults=new Map
-if(config.defaults)for(const[attrName,defaultValue]of Object.entries(config.defaults))attributesDefaults.set(attrName,defaultValue)
-for(const attrsGroupName of config.attrsGroups){const attrsGroup=attrsGroups[attrsGroupName]
-if(attrsGroup)for(const attrName of attrsGroup)allowedAttributes.add(attrName)
-const groupDefaults=attrsGroupsDefaults[attrsGroupName]
-if(groupDefaults)for(const[attrName,defaultValue]of Object.entries(groupDefaults))attributesDefaults.set(attrName,defaultValue)}allowedChildrenPerElement.set(name,allowedChildren)
-allowedAttributesPerElement.set(name,allowedAttributes)
-attributesDefaultsPerElement.set(name,attributesDefaults)}const fn$C=(root,params)=>{const{unknownContent:unknownContent=true,unknownAttrs:unknownAttrs=true,defaultAttrs:defaultAttrs=true,defaultMarkupDeclarations:defaultMarkupDeclarations=true,uselessOverrides:uselessOverrides=true,keepDataAttrs:keepDataAttrs=true,keepAriaAttrs:keepAriaAttrs=true,keepRoleAttr:keepRoleAttr=false}=params
-const stylesheet=collectStylesheet(root)
-return{instruction:{enter:node=>{defaultMarkupDeclarations&&(node.value=node.value.replace(/\s*standalone\s*=\s*(["'])no\1/,""))}},element:{enter:(node,parentNode)=>{if(node.name.includes(":"))return
-if(node.name==="foreignObject")return visitSkip
-if(unknownContent&&parentNode.type==="element"){const allowedChildren=allowedChildrenPerElement.get(parentNode.name)
-if(allowedChildren==null||allowedChildren.size===0){if(allowedChildrenPerElement.get(node.name)==null){detachNodeFromParent(node,parentNode)
-return}}else if(allowedChildren.has(node.name)===false){detachNodeFromParent(node,parentNode)
-return}}const allowedAttributes=allowedAttributesPerElement.get(node.name)
-const attributesDefaults=attributesDefaultsPerElement.get(node.name)
-const computedParentStyle=parentNode.type==="element"?computeStyle(stylesheet,parentNode):null
-for(const[name,value]of Object.entries(node.attributes)){if(keepDataAttrs&&name.startsWith("data-"))continue
-if(keepAriaAttrs&&name.startsWith("aria-"))continue
-if(keepRoleAttr&&name==="role")continue
-if(name==="xmlns")continue
-if(name.includes(":")){const[prefix]=name.split(":")
-if(prefix!=="xml"&&prefix!=="xlink")continue}unknownAttrs&&allowedAttributes&&allowedAttributes.has(name)===false&&delete node.attributes[name]
-defaultAttrs&&node.attributes.id==null&&attributesDefaults&&attributesDefaults.get(name)===value&&computedParentStyle?.[name]==null&&delete node.attributes[name]
-if(uselessOverrides&&node.attributes.id==null){const style=computedParentStyle?.[name]
-presentationNonInheritableGroupAttrs.has(name)===false&&style!=null&&style.type==="static"&&style.value===value&&delete node.attributes[name]}}}}}}
-var removeUnknownsAndDefaults=Object.freeze({__proto__:null,description:description$C,fn:fn$C,name:name$C})
-const name$B="removeNonInheritableGroupAttrs"
-const description$B="removes non-inheritable group’s presentational attributes"
-const fn$B=()=>({element:{enter:node=>{if(node.name==="g")for(const name of Object.keys(node.attributes))!attrsGroups.presentation.has(name)||inheritableAttrs.has(name)||presentationNonInheritableGroupAttrs.has(name)||delete node.attributes[name]}}})
-var removeNonInheritableGroupAttrs=Object.freeze({__proto__:null,description:description$B,fn:fn$B,name:name$B})
-const name$A="removeUselessStrokeAndFill"
-const description$A="removes useless stroke and fill attributes"
-const fn$A=(root,params)=>{const{stroke:removeStroke=true,fill:removeFill=true,removeNone:removeNone=false}=params
-let hasStyleOrScript=false
-visit(root,{element:{enter:node=>{(node.name==="style"||hasScripts(node))&&(hasStyleOrScript=true)}}})
-if(hasStyleOrScript)return null
-const stylesheet=collectStylesheet(root)
-return{element:{enter:(node,parentNode)=>{if(node.attributes.id!=null)return visitSkip
-if(!elemsGroups.shape.has(node.name))return
-const computedStyle=computeStyle(stylesheet,node)
-const stroke=computedStyle.stroke
-const strokeOpacity=computedStyle["stroke-opacity"]
-const strokeWidth=computedStyle["stroke-width"]
-const markerEnd=computedStyle["marker-end"]
-const fill=computedStyle.fill
-const fillOpacity=computedStyle["fill-opacity"]
-const computedParentStyle=parentNode.type==="element"?computeStyle(stylesheet,parentNode):null
-const parentStroke=computedParentStyle==null?null:computedParentStyle.stroke
-if(removeStroke&&(stroke==null||stroke.type==="static"&&stroke.value=="none"||strokeOpacity!=null&&strokeOpacity.type==="static"&&strokeOpacity.value==="0"||strokeWidth!=null&&strokeWidth.type==="static"&&strokeWidth.value==="0")&&(strokeWidth!=null&&strokeWidth.type==="static"&&strokeWidth.value==="0"||markerEnd==null)){for(const name of Object.keys(node.attributes))name.startsWith("stroke")&&delete node.attributes[name]
-parentStroke!=null&&parentStroke.type==="static"&&parentStroke.value!=="none"&&(node.attributes.stroke="none")}if(removeFill&&(fill!=null&&fill.type==="static"&&fill.value==="none"||fillOpacity!=null&&fillOpacity.type==="static"&&fillOpacity.value==="0")){for(const name of Object.keys(node.attributes))name.startsWith("fill-")&&delete node.attributes[name];(fill==null||fill.type==="static"&&fill.value!=="none")&&(node.attributes.fill="none")}removeNone&&(stroke!=null&&node.attributes.stroke!=="none"||(fill==null||fill.type!=="static"||fill.value!=="none")&&node.attributes.fill!=="none"||detachNodeFromParent(node,parentNode))}}}}
-var removeUselessStrokeAndFill=Object.freeze({__proto__:null,description:description$A,fn:fn$A,name:name$A})
-const name$z="removeViewBox"
-const description$z="removes viewBox attribute when possible"
-const viewBoxElems=new Set(["pattern","svg","symbol"])
-const fn$z=()=>({element:{enter:(node,parentNode)=>{if(viewBoxElems.has(node.name)&&node.attributes.viewBox!=null&&node.attributes.width!=null&&node.attributes.height!=null){if(node.name==="svg"&&parentNode.type!=="root")return
-const nums=node.attributes.viewBox.split(/[ ,]+/g)
-nums[0]==="0"&&nums[1]==="0"&&node.attributes.width.replace(/px$/,"")===nums[2]&&node.attributes.height.replace(/px$/,"")===nums[3]&&delete node.attributes.viewBox}}}})
-var removeViewBox=Object.freeze({__proto__:null,description:description$z,fn:fn$z,name:name$z})
-const name$y="cleanupEnableBackground"
-const description$y="remove or cleanup enable-background attribute when possible"
-const regEnableBackground=/^new\s0\s0\s([-+]?\d*\.?\d+([eE][-+]?\d+)?)\s([-+]?\d*\.?\d+([eE][-+]?\d+)?)$/
-const fn$y=root=>{let hasFilter=false
-visit(root,{element:{enter:node=>{node.name==="filter"&&(hasFilter=true)}}})
-return{element:{enter:node=>{let newStyle=null
-let enableBackgroundDeclaration=null
-if(node.attributes.style!=null){newStyle=csstree__namespace.parse(node.attributes.style,{context:"declarationList"})
-if(newStyle.type==="DeclarationList"){const enableBackgroundDeclarations=[]
-csstree__namespace.walk(newStyle,((node,nodeItem)=>{if(node.type==="Declaration"&&node.property==="enable-background"){enableBackgroundDeclarations.push(nodeItem)
-enableBackgroundDeclaration=nodeItem}}))
-for(let i=0;i<enableBackgroundDeclarations.length-1;i++)newStyle.children.remove(enableBackgroundDeclarations[i])}}if(!hasFilter){delete node.attributes["enable-background"]
-if(newStyle?.type==="DeclarationList"){enableBackgroundDeclaration&&newStyle.children.remove(enableBackgroundDeclaration)
-newStyle.children.isEmpty?delete node.attributes.style:node.attributes.style=csstree__namespace.generate(newStyle)}return}const hasDimensions=node.attributes.width!=null&&node.attributes.height!=null
-if((node.name==="svg"||node.name==="mask"||node.name==="pattern")&&hasDimensions){const attrValue=node.attributes["enable-background"]
-const attrCleaned=cleanupValue(attrValue,node.name,node.attributes.width,node.attributes.height)
-attrCleaned?node.attributes["enable-background"]=attrCleaned:delete node.attributes["enable-background"]
-if(newStyle?.type==="DeclarationList"&&enableBackgroundDeclaration){const styleValue=csstree__namespace.generate(enableBackgroundDeclaration.data.value)
-const styleCleaned=cleanupValue(styleValue,node.name,node.attributes.width,node.attributes.height)
-styleCleaned?enableBackgroundDeclaration.data.value={type:"Raw",value:styleCleaned}:newStyle.children.remove(enableBackgroundDeclaration)}}newStyle?.type==="DeclarationList"&&(newStyle.children.isEmpty?delete node.attributes.style:node.attributes.style=csstree__namespace.generate(newStyle))}}}}
-const cleanupValue=(value,nodeName,width,height)=>{const match=regEnableBackground.exec(value)
-if(match!=null&&width===match[1]&&height===match[3])return nodeName==="svg"?void 0:"new"
-return value}
-var cleanupEnableBackground=Object.freeze({__proto__:null,description:description$y,fn:fn$y,name:name$y})
-const argsCountPerCommand={M:2,m:2,Z:0,z:0,L:2,l:2,H:1,h:1,V:1,v:1,C:6,c:6,S:4,s:4,Q:4,q:4,T:2,t:2,A:7,a:7}
-const isCommand=c=>c in argsCountPerCommand
-const isWsp=c=>{const codePoint=c.codePointAt(0)
-return codePoint===0x20||codePoint===0x9||codePoint===0xd||codePoint===0xa}
-const isDigit=c=>{const codePoint=c.codePointAt(0)
-if(codePoint==null)return false
-return 48<=codePoint&&codePoint<=57}
-const readNumber=(string,cursor)=>{let i=cursor
-let value=""
-let state="none"
-for(;i<string.length;i+=1){const c=string[i]
-if(c==="+"||c==="-"){if(state==="none"){state="sign"
-value+=c
-continue}if(state==="e"){state="exponent_sign"
-value+=c
-continue}}if(isDigit(c)){if(state==="none"||state==="sign"||state==="whole"){state="whole"
-value+=c
-continue}if(state==="decimal_point"||state==="decimal"){state="decimal"
-value+=c
-continue}if(state==="e"||state==="exponent_sign"||state==="exponent"){state="exponent"
-value+=c
-continue}}if(c==="."&&(state==="none"||state==="sign"||state==="whole")){state="decimal_point"
-value+=c
-continue}if((c==="E"||c=="e")&&(state==="whole"||state==="decimal_point"||state==="decimal")){state="e"
-value+=c
-continue}break}const number=Number.parseFloat(value)
-return Number.isNaN(number)?[cursor,null]:[i-1,number]}
-const parsePathData=string=>{const pathData=[]
-let command=null
-let args=[]
-let argsCount=0
-let canHaveComma=false
-let hadComma=false
-for(let i=0;i<string.length;i+=1){const c=string.charAt(i)
-if(isWsp(c))continue
-if(canHaveComma&&c===","){if(hadComma)break
-hadComma=true
-continue}if(isCommand(c)){if(hadComma)return pathData
-if(command==null){if(c!=="M"&&c!=="m")return pathData}else if(args.length!==0)return pathData
-command=c
-args=[]
-argsCount=argsCountPerCommand[command]
-canHaveComma=false
-argsCount===0&&pathData.push({command:command,args:args})
-continue}if(command==null)return pathData
-let newCursor=i
-let number=null
-if(command==="A"||command==="a"){const position=args.length
-position!==0&&position!==1||c!=="+"&&c!=="-"&&([newCursor,number]=readNumber(string,i))
-position!==2&&position!==5&&position!==6||([newCursor,number]=readNumber(string,i))
-if(position===3||position===4){c==="0"&&(number=0)
-c==="1"&&(number=1)}}else[newCursor,number]=readNumber(string,i)
-if(number==null)return pathData
-args.push(number)
-canHaveComma=true
-hadComma=false
-i=newCursor
-if(args.length===argsCount){pathData.push({command:command,args:args})
-command==="M"&&(command="L")
-command==="m"&&(command="l")
-args=[]}}return pathData}
-const roundAndStringify=(number,precision)=>{precision!=null&&(number=toFixed(number,precision))
-return{roundedStr:removeLeadingZero(number),rounded:number}}
-const stringifyArgs=(command,args,precision,disableSpaceAfterFlags)=>{let result=""
-let previous
-for(let i=0;i<args.length;i++){const{roundedStr:roundedStr,rounded:rounded}=roundAndStringify(args[i],precision)
-!disableSpaceAfterFlags||command!=="A"&&command!=="a"||i%7!==4&&i%7!==5?i===0||rounded<0?result+=roundedStr:Number.isInteger(previous)||isDigit(roundedStr[0])?result+=` ${roundedStr}`:result+=roundedStr:result+=roundedStr
-previous=rounded}return result}
-const stringifyPathData=({pathData:pathData,precision:precision,disableSpaceAfterFlags:disableSpaceAfterFlags})=>{if(pathData.length===1){const{command:command,args:args}=pathData[0]
-return command+stringifyArgs(command,args,precision,disableSpaceAfterFlags)}let result=""
-let prev={...pathData[0]}
-pathData[1].command==="L"?prev.command="M":pathData[1].command==="l"&&(prev.command="m")
-for(let i=1;i<pathData.length;i++){const{command:command,args:args}=pathData[i]
-if(prev.command===command&&prev.command!=="M"&&prev.command!=="m"||prev.command==="M"&&command==="L"||prev.command==="m"&&command==="l"){prev.args=[...prev.args,...args]
-i===pathData.length-1&&(result+=prev.command+stringifyArgs(prev.command,prev.args,precision,disableSpaceAfterFlags))}else{result+=prev.command+stringifyArgs(prev.command,prev.args,precision,disableSpaceAfterFlags)
-i===pathData.length-1?result+=command+stringifyArgs(command,args,precision,disableSpaceAfterFlags):prev={command:command,args:args}}}return result}
-const nonRendering=elemsGroups.nonRendering
-const name$x="removeHiddenElems"
-const description$x="removes hidden elements (zero sized, with absent attributes)"
-const fn$x=(root,params)=>{const{isHidden:isHidden=true,displayNone:displayNone=true,opacity0:opacity0=true,circleR0:circleR0=true,ellipseRX0:ellipseRX0=true,ellipseRY0:ellipseRY0=true,rectWidth0:rectWidth0=true,rectHeight0:rectHeight0=true,patternWidth0:patternWidth0=true,patternHeight0:patternHeight0=true,imageWidth0:imageWidth0=true,imageHeight0:imageHeight0=true,pathEmptyD:pathEmptyD=true,polylineEmptyPoints:polylineEmptyPoints=true,polygonEmptyPoints:polygonEmptyPoints=true}=params
-const stylesheet=collectStylesheet(root)
-const nonRenderedNodes=new Map
-const removedDefIds=new Set
-const allDefs=new Map
-const allReferences=new Set
-const referencesById=new Map
-let deoptimized=false
-function canRemoveNonRenderingNode(node){if(allReferences.has(node.attributes.id))return false
-for(const child of node.children)if(child.type==="element"&&!canRemoveNonRenderingNode(child))return false
-return true}function removeElement(node,parentNode){node.type==="element"&&node.attributes.id!=null&&parentNode.type==="element"&&parentNode.name==="defs"&&removedDefIds.add(node.attributes.id)
-detachNodeFromParent(node,parentNode)}visit(root,{element:{enter:(node,parentNode)=>{if(nonRendering.has(node.name)){nonRenderedNodes.set(node,parentNode)
-return visitSkip}const computedStyle=computeStyle(stylesheet,node)
-if(opacity0&&computedStyle.opacity&&computedStyle.opacity.type==="static"&&computedStyle.opacity.value==="0"){if(node.name==="path"){nonRenderedNodes.set(node,parentNode)
-return visitSkip}removeElement(node,parentNode)}}}})
-return{element:{enter:(node,parentNode)=>{if(node.name==="style"&&node.children.length!==0||hasScripts(node)){deoptimized=true
-return}node.name==="defs"&&allDefs.set(node,parentNode)
-if(node.name==="use")for(const attr of Object.keys(node.attributes)){if(attr!=="href"&&!attr.endsWith(":href"))continue
-const value=node.attributes[attr]
-const id=value.slice(1)
-let refs=referencesById.get(id)
-if(!refs){refs=[]
-referencesById.set(id,refs)}refs.push({node:node,parentNode:parentNode})}const computedStyle=computeStyle(stylesheet,node)
-if(isHidden&&computedStyle.visibility&&computedStyle.visibility.type==="static"&&computedStyle.visibility.value==="hidden"&&querySelector(node,"[visibility=visible]")==null){removeElement(node,parentNode)
-return}if(displayNone&&computedStyle.display&&computedStyle.display.type==="static"&&computedStyle.display.value==="none"&&node.name!=="marker"){removeElement(node,parentNode)
-return}if(circleR0&&node.name==="circle"&&node.children.length===0&&node.attributes.r==="0"){removeElement(node,parentNode)
-return}if(ellipseRX0&&node.name==="ellipse"&&node.children.length===0&&node.attributes.rx==="0"){removeElement(node,parentNode)
-return}if(ellipseRY0&&node.name==="ellipse"&&node.children.length===0&&node.attributes.ry==="0"){removeElement(node,parentNode)
-return}if(rectWidth0&&node.name==="rect"&&node.children.length===0&&node.attributes.width==="0"){removeElement(node,parentNode)
-return}if(rectHeight0&&rectWidth0&&node.name==="rect"&&node.children.length===0&&node.attributes.height==="0"){removeElement(node,parentNode)
-return}if(patternWidth0&&node.name==="pattern"&&node.attributes.width==="0"){removeElement(node,parentNode)
-return}if(patternHeight0&&node.name==="pattern"&&node.attributes.height==="0"){removeElement(node,parentNode)
-return}if(imageWidth0&&node.name==="image"&&node.attributes.width==="0"){removeElement(node,parentNode)
-return}if(imageHeight0&&node.name==="image"&&node.attributes.height==="0"){removeElement(node,parentNode)
-return}if(pathEmptyD&&node.name==="path"){if(node.attributes.d==null){removeElement(node,parentNode)
-return}const pathData=parsePathData(node.attributes.d)
-if(pathData.length===0){removeElement(node,parentNode)
-return}if(pathData.length===1&&computedStyle["marker-start"]==null&&computedStyle["marker-end"]==null){removeElement(node,parentNode)
-return}}if(polylineEmptyPoints&&node.name==="polyline"&&node.attributes.points==null){removeElement(node,parentNode)
-return}if(polygonEmptyPoints&&node.name==="polygon"&&node.attributes.points==null){removeElement(node,parentNode)
-return}for(const[name,value]of Object.entries(node.attributes)){const ids=findReferences(name,value)
-for(const id of ids)allReferences.add(id)}}},root:{exit:()=>{for(const id of removedDefIds){const refs=referencesById.get(id)
-if(refs)for(const{node:node,parentNode:parentNode}of refs)detachNodeFromParent(node,parentNode)}if(!deoptimized)for(const[nonRenderedNode,nonRenderedParent]of nonRenderedNodes.entries())canRemoveNonRenderingNode(nonRenderedNode)&&detachNodeFromParent(nonRenderedNode,nonRenderedParent)
-for(const[node,parentNode]of allDefs.entries())node.children.length===0&&detachNodeFromParent(node,parentNode)}}}}
-var removeHiddenElems=Object.freeze({__proto__:null,description:description$x,fn:fn$x,name:name$x})
-const name$w="removeEmptyText"
-const description$w="removes empty <text> elements"
-const fn$w=(root,params)=>{const{text:text=true,tspan:tspan=true,tref:tref=true}=params
-return{element:{enter:(node,parentNode)=>{text&&node.name==="text"&&node.children.length===0&&detachNodeFromParent(node,parentNode)
-tspan&&node.name==="tspan"&&node.children.length===0&&detachNodeFromParent(node,parentNode)
-tref&&node.name==="tref"&&node.attributes["xlink:href"]==null&&detachNodeFromParent(node,parentNode)}}}}
-var removeEmptyText=Object.freeze({__proto__:null,description:description$w,fn:fn$w,name:name$w})
-const name$v="convertShapeToPath"
-const description$v="converts basic shapes to more compact path form"
-const regNumber=/[-+]?(?:\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?/g
-const fn$v=(root,params)=>{const{convertArcs:convertArcs=false,floatPrecision:precision}=params
-return{element:{enter:(node,parentNode)=>{if(node.name==="rect"&&node.attributes.width!=null&&node.attributes.height!=null&&node.attributes.rx==null&&node.attributes.ry==null){const x=Number(node.attributes.x||"0")
-const y=Number(node.attributes.y||"0")
-const width=Number(node.attributes.width)
-const height=Number(node.attributes.height)
-if(Number.isNaN(x-y+width-height))return
-const pathData=[{command:"M",args:[x,y]},{command:"H",args:[x+width]},{command:"V",args:[y+height]},{command:"H",args:[x]},{command:"z",args:[]}]
-node.name="path"
-node.attributes.d=stringifyPathData({pathData:pathData,precision:precision})
-delete node.attributes.x
-delete node.attributes.y
-delete node.attributes.width
-delete node.attributes.height}if(node.name==="line"){const x1=Number(node.attributes.x1||"0")
-const y1=Number(node.attributes.y1||"0")
-const x2=Number(node.attributes.x2||"0")
-const y2=Number(node.attributes.y2||"0")
-if(Number.isNaN(x1-y1+x2-y2))return
-const pathData=[{command:"M",args:[x1,y1]},{command:"L",args:[x2,y2]}]
-node.name="path"
-node.attributes.d=stringifyPathData({pathData:pathData,precision:precision})
-delete node.attributes.x1
-delete node.attributes.y1
-delete node.attributes.x2
-delete node.attributes.y2}if((node.name==="polyline"||node.name==="polygon")&&node.attributes.points!=null){const coords=(node.attributes.points.match(regNumber)||[]).map(Number)
-if(coords.length<4){detachNodeFromParent(node,parentNode)
-return}const pathData=[]
-for(let i=0;i<coords.length;i+=2)pathData.push({command:i===0?"M":"L",args:coords.slice(i,i+2)})
-node.name==="polygon"&&pathData.push({command:"z",args:[]})
-node.name="path"
-node.attributes.d=stringifyPathData({pathData:pathData,precision:precision})
-delete node.attributes.points}if(node.name==="circle"&&convertArcs){const cx=Number(node.attributes.cx||"0")
-const cy=Number(node.attributes.cy||"0")
-const r=Number(node.attributes.r||"0")
-if(Number.isNaN(cx-cy+r))return
-const pathData=[{command:"M",args:[cx,cy-r]},{command:"A",args:[r,r,0,1,0,cx,cy+r]},{command:"A",args:[r,r,0,1,0,cx,cy-r]},{command:"z",args:[]}]
-node.name="path"
-node.attributes.d=stringifyPathData({pathData:pathData,precision:precision})
-delete node.attributes.cx
-delete node.attributes.cy
-delete node.attributes.r}if(node.name==="ellipse"&&convertArcs){const ecx=Number(node.attributes.cx||"0")
-const ecy=Number(node.attributes.cy||"0")
-const rx=Number(node.attributes.rx||"0")
-const ry=Number(node.attributes.ry||"0")
-if(Number.isNaN(ecx-ecy+rx-ry))return
-const pathData=[{command:"M",args:[ecx,ecy-ry]},{command:"A",args:[rx,ry,0,1,0,ecx,ecy+ry]},{command:"A",args:[rx,ry,0,1,0,ecx,ecy-ry]},{command:"z",args:[]}]
-node.name="path"
-node.attributes.d=stringifyPathData({pathData:pathData,precision:precision})
-delete node.attributes.cx
-delete node.attributes.cy
-delete node.attributes.rx
-delete node.attributes.ry}}}}}
-var convertShapeToPath=Object.freeze({__proto__:null,description:description$v,fn:fn$v,name:name$v})
-const name$u="convertEllipseToCircle"
-const description$u="converts non-eccentric <ellipse>s to <circle>s"
-const fn$u=()=>({element:{enter:node=>{if(node.name==="ellipse"){const rx=node.attributes.rx||"0"
-const ry=node.attributes.ry||"0"
-if(rx===ry||rx==="auto"||ry==="auto"){node.name="circle"
-const radius=rx==="auto"?ry:rx
-delete node.attributes.rx
-delete node.attributes.ry
-node.attributes.r=radius}}}}})
-var convertEllipseToCircle=Object.freeze({__proto__:null,description:description$u,fn:fn$u,name:name$u})
-const name$t="moveElemsAttrsToGroup"
-const description$t="Move common attributes of group children to the group"
-const fn$t=root=>{let deoptimizedWithStyles=false
-visit(root,{element:{enter:node=>{node.name==="style"&&(deoptimizedWithStyles=true)}}})
-return{element:{exit:node=>{if(node.name!=="g"||node.children.length<=1)return
-if(deoptimizedWithStyles)return
-const commonAttributes=new Map
-let initial=true
-let everyChildIsPath=true
-for(const child of node.children)if(child.type==="element"){pathElems.has(child.name)||(everyChildIsPath=false)
-if(initial){initial=false
-for(const[name,value]of Object.entries(child.attributes))inheritableAttrs.has(name)&&commonAttributes.set(name,value)}else for(const[name,value]of commonAttributes)child.attributes[name]!==value&&commonAttributes.delete(name)}node.attributes["filter"]==null&&node.attributes["clip-path"]==null&&node.attributes.mask==null||commonAttributes.delete("transform")
-everyChildIsPath&&commonAttributes.delete("transform")
-for(const[name,value]of commonAttributes)name==="transform"?node.attributes.transform!=null?node.attributes.transform=`${node.attributes.transform} ${value}`:node.attributes.transform=value:node.attributes[name]=value
-for(const child of node.children)if(child.type==="element")for(const[name]of commonAttributes)delete child.attributes[name]}}}}
-var moveElemsAttrsToGroup=Object.freeze({__proto__:null,description:description$t,fn:fn$t,name:name$t})
-const name$s="moveGroupAttrsToElems"
-const description$s="moves some group attributes to the content elements"
-const pathElemsWithGroupsAndText=[...pathElems,"g","text"]
-const fn$s=()=>({element:{enter:node=>{if(node.name==="g"&&node.children.length!==0&&node.attributes.transform!=null&&Object.entries(node.attributes).some((([name,value])=>referencesProps.has(name)&&includesUrlReference(value)))===false&&node.children.every((child=>child.type==="element"&&pathElemsWithGroupsAndText.includes(child.name)&&child.attributes.id==null))){for(const child of node.children){const value=node.attributes.transform
-child.type==="element"&&(child.attributes.transform!=null?child.attributes.transform=`${value} ${child.attributes.transform}`:child.attributes.transform=value)}delete node.attributes.transform}}}})
-var moveGroupAttrsToElems=Object.freeze({__proto__:null,description:description$s,fn:fn$s,name:name$s})
-const name$r="collapseGroups"
-const description$r="collapses useless groups"
-const hasAnimatedAttr=(node,name)=>{if(node.type==="element"){if(elemsGroups.animation.has(node.name)&&node.attributes.attributeName===name)return true
-for(const child of node.children)if(hasAnimatedAttr(child,name))return true}return false}
-const fn$r=root=>{const stylesheet=collectStylesheet(root)
-return{element:{exit:(node,parentNode)=>{if(parentNode.type==="root"||parentNode.name==="switch")return
-if(node.name!=="g"||node.children.length===0)return
-if(Object.keys(node.attributes).length!==0&&node.children.length===1){const firstChild=node.children[0]
-const nodeHasFilter=!!(node.attributes.filter||computeStyle(stylesheet,node).filter)
-if(firstChild.type==="element"&&firstChild.attributes.id==null&&!nodeHasFilter&&(node.attributes.class==null||firstChild.attributes.class==null)&&(node.attributes["clip-path"]==null&&node.attributes.mask==null||firstChild.name==="g"&&node.attributes.transform==null&&firstChild.attributes.transform==null)){const newChildElemAttrs={...firstChild.attributes}
-for(const[name,value]of Object.entries(node.attributes)){if(hasAnimatedAttr(firstChild,name))return
-if(newChildElemAttrs[name]==null)newChildElemAttrs[name]=value
-else if(name==="transform")newChildElemAttrs[name]=value+" "+newChildElemAttrs[name]
-else if(newChildElemAttrs[name]==="inherit")newChildElemAttrs[name]=value
-else if(!inheritableAttrs.has(name)&&newChildElemAttrs[name]!==value)return}node.attributes={}
-firstChild.attributes=newChildElemAttrs}}if(Object.keys(node.attributes).length===0){for(const child of node.children)if(child.type==="element"&&elemsGroups.animation.has(child.name))return
-const index=parentNode.children.indexOf(node)
-parentNode.children.splice(index,1,...node.children)
-for(const child of node.children)Object.defineProperty(child,"parentNode",{writable:true,value:parentNode})}}}}}
-var collapseGroups=Object.freeze({__proto__:null,description:description$r,fn:fn$r,name:name$r})
-var prevCtrlPoint
-const path2js=path=>{if(path.pathJS)return path.pathJS
-const pathData=[]
-const newPathData=parsePathData(path.attributes.d)
-for(const{command:command,args:args}of newPathData)pathData.push({command:command,args:args})
-pathData.length&&pathData[0].command=="m"&&(pathData[0].command="M")
-path.pathJS=pathData
-return pathData}
-const convertRelativeToAbsolute=data=>{const newData=[]
-let start=[0,0]
-let cursor=[0,0]
-for(let{command:command,args:args}of data){args=args.slice()
-if(command==="m"){args[0]+=cursor[0]
-args[1]+=cursor[1]
-command="M"}if(command==="M"){cursor[0]=args[0]
-cursor[1]=args[1]
-start[0]=cursor[0]
-start[1]=cursor[1]}if(command==="h"){args[0]+=cursor[0]
-command="H"}command==="H"&&(cursor[0]=args[0])
-if(command==="v"){args[0]+=cursor[1]
-command="V"}command==="V"&&(cursor[1]=args[0])
-if(command==="l"){args[0]+=cursor[0]
-args[1]+=cursor[1]
-command="L"}if(command==="L"){cursor[0]=args[0]
-cursor[1]=args[1]}if(command==="c"){args[0]+=cursor[0]
-args[1]+=cursor[1]
-args[2]+=cursor[0]
-args[3]+=cursor[1]
-args[4]+=cursor[0]
-args[5]+=cursor[1]
-command="C"}if(command==="C"){cursor[0]=args[4]
-cursor[1]=args[5]}if(command==="s"){args[0]+=cursor[0]
-args[1]+=cursor[1]
-args[2]+=cursor[0]
-args[3]+=cursor[1]
-command="S"}if(command==="S"){cursor[0]=args[2]
-cursor[1]=args[3]}if(command==="q"){args[0]+=cursor[0]
-args[1]+=cursor[1]
-args[2]+=cursor[0]
-args[3]+=cursor[1]
-command="Q"}if(command==="Q"){cursor[0]=args[2]
-cursor[1]=args[3]}if(command==="t"){args[0]+=cursor[0]
-args[1]+=cursor[1]
-command="T"}if(command==="T"){cursor[0]=args[0]
-cursor[1]=args[1]}if(command==="a"){args[5]+=cursor[0]
-args[6]+=cursor[1]
-command="A"}if(command==="A"){cursor[0]=args[5]
-cursor[1]=args[6]}if(command==="z"||command==="Z"){cursor[0]=start[0]
-cursor[1]=start[1]
-command="z"}newData.push({command:command,args:args})}return newData}
-const js2path=function(path,data,params){path.pathJS=data
-const pathData=[]
-for(const item of data){if(pathData.length!==0&&(item.command==="M"||item.command==="m")){const last=pathData[pathData.length-1]
-last.command!=="M"&&last.command!=="m"||pathData.pop()}pathData.push({command:item.command,args:item.args})}path.attributes.d=stringifyPathData({pathData:pathData,precision:params.floatPrecision,disableSpaceAfterFlags:params.noSpaceAfterFlags})}
-function set(dest,source){dest[0]=source[source.length-2]
-dest[1]=source[source.length-1]
-return dest}const intersects=function(path1,path2){const points1=gatherPoints(convertRelativeToAbsolute(path1))
-const points2=gatherPoints(convertRelativeToAbsolute(path2))
-if(points1.maxX<=points2.minX||points2.maxX<=points1.minX||points1.maxY<=points2.minY||points2.maxY<=points1.minY||points1.list.every((set1=>points2.list.every((set2=>set1.list[set1.maxX][0]<=set2.list[set2.minX][0]||set2.list[set2.maxX][0]<=set1.list[set1.minX][0]||set1.list[set1.maxY][1]<=set2.list[set2.minY][1]||set2.list[set2.maxY][1]<=set1.list[set1.minY][1])))))return false
-const hullNest1=points1.list.map(convexHull)
-const hullNest2=points2.list.map(convexHull)
-return hullNest1.some((function(hull1){if(hull1.list.length<3)return false
-return hullNest2.some((function(hull2){if(hull2.list.length<3)return false
-var simplex=[getSupport(hull1,hull2,[1,0])],direction=minus(simplex[0])
-var iterations=1e4
-while(true){if(iterations--==0){console.error("Error: infinite loop while processing mergePaths plugin.")
-return true}simplex.push(getSupport(hull1,hull2,direction))
-if(dot(direction,simplex[simplex.length-1])<=0)return false
-if(processSimplex(simplex,direction))return true}}))}))
-function getSupport(a,b,direction){return sub(supportPoint(a,direction),supportPoint(b,minus(direction)))}function supportPoint(polygon,direction){var index=direction[1]>=0?direction[0]<0?polygon.maxY:polygon.maxX:direction[0]<0?polygon.minX:polygon.minY,max=-1/0,value
-while((value=dot(polygon.list[index],direction))>max){max=value
-index=++index%polygon.list.length}return polygon.list[(index||polygon.list.length)-1]}}
-function processSimplex(simplex,direction){if(simplex.length==2){let a=simplex[1],b=simplex[0],AO=minus(simplex[1]),AB=sub(b,a)
-if(dot(AO,AB)>0)set(direction,orth(AB,a))
-else{set(direction,AO)
-simplex.shift()}}else{let a=simplex[2],b=simplex[1],c=simplex[0],AB=sub(b,a),AC=sub(c,a),AO=minus(a),ACB=orth(AB,AC),ABC=orth(AC,AB)
-if(dot(ACB,AO)>0)if(dot(AB,AO)>0){set(direction,ACB)
-simplex.shift()}else{set(direction,AO)
-simplex.splice(0,2)}else{if(!(dot(ABC,AO)>0))return true
-if(dot(AC,AO)>0){set(direction,ABC)
-simplex.splice(1,1)}else{set(direction,AO)
-simplex.splice(0,2)}}}return false}function minus(v){return[-v[0],-v[1]]}function sub(v1,v2){return[v1[0]-v2[0],v1[1]-v2[1]]}function dot(v1,v2){return v1[0]*v2[0]+v1[1]*v2[1]}function orth(v,from){var o=[-v[1],v[0]]
-return dot(o,minus(from))<0?minus(o):o}function gatherPoints(pathData){const points={list:[],minX:0,minY:0,maxX:0,maxY:0}
-const addPoint=(path,point)=>{if(!path.list.length||point[1]>path.list[path.maxY][1]){path.maxY=path.list.length
-points.maxY=points.list.length?Math.max(point[1],points.maxY):point[1]}if(!path.list.length||point[0]>path.list[path.maxX][0]){path.maxX=path.list.length
-points.maxX=points.list.length?Math.max(point[0],points.maxX):point[0]}if(!path.list.length||point[1]<path.list[path.minY][1]){path.minY=path.list.length
-points.minY=points.list.length?Math.min(point[1],points.minY):point[1]}if(!path.list.length||point[0]<path.list[path.minX][0]){path.minX=path.list.length
-points.minX=points.list.length?Math.min(point[0],points.minX):point[0]}path.list.push(point)}
-for(let i=0;i<pathData.length;i+=1){const pathDataItem=pathData[i]
-let subPath=points.list.length===0?{list:[],minX:0,minY:0,maxX:0,maxY:0}:points.list[points.list.length-1]
-let prev=i===0?null:pathData[i-1]
-let basePoint=subPath.list.length===0?null:subPath.list[subPath.list.length-1]
-let data=pathDataItem.args
-let ctrlPoint=basePoint
-const toAbsolute=(n,i)=>n+(basePoint==null?0:basePoint[i%2])
-switch(pathDataItem.command){case"M":subPath={list:[],minX:0,minY:0,maxX:0,maxY:0}
-points.list.push(subPath)
-break
-case"H":basePoint!=null&&addPoint(subPath,[data[0],basePoint[1]])
-break
-case"V":basePoint!=null&&addPoint(subPath,[basePoint[0],data[0]])
-break
-case"Q":addPoint(subPath,data.slice(0,2))
-prevCtrlPoint=[data[2]-data[0],data[3]-data[1]]
-break
-case"T":if(basePoint!=null&&prev!=null&&(prev.command=="Q"||prev.command=="T")){ctrlPoint=[basePoint[0]+prevCtrlPoint[0],basePoint[1]+prevCtrlPoint[1]]
-addPoint(subPath,ctrlPoint)
-prevCtrlPoint=[data[0]-ctrlPoint[0],data[1]-ctrlPoint[1]]}break
-case"C":basePoint!=null&&addPoint(subPath,[0.5*(basePoint[0]+data[0]),0.5*(basePoint[1]+data[1])])
-addPoint(subPath,[0.5*(data[0]+data[2]),0.5*(data[1]+data[3])])
-addPoint(subPath,[0.5*(data[2]+data[4]),0.5*(data[3]+data[5])])
-prevCtrlPoint=[data[4]-data[2],data[5]-data[3]]
-break
-case"S":if(basePoint!=null&&prev!=null&&(prev.command=="C"||prev.command=="S")){addPoint(subPath,[basePoint[0]+0.5*prevCtrlPoint[0],basePoint[1]+0.5*prevCtrlPoint[1]])
-ctrlPoint=[basePoint[0]+prevCtrlPoint[0],basePoint[1]+prevCtrlPoint[1]]}ctrlPoint!=null&&addPoint(subPath,[0.5*(ctrlPoint[0]+data[0]),0.5*(ctrlPoint[1]+data[1])])
-addPoint(subPath,[0.5*(data[0]+data[2]),0.5*(data[1]+data[3])])
-prevCtrlPoint=[data[2]-data[0],data[3]-data[1]]
-break
-case"A":if(basePoint!=null){var curves=a2c.apply(0,basePoint.concat(data))
-for(var cData;(cData=curves.splice(0,6).map(toAbsolute)).length;){basePoint!=null&&addPoint(subPath,[0.5*(basePoint[0]+cData[0]),0.5*(basePoint[1]+cData[1])])
-addPoint(subPath,[0.5*(cData[0]+cData[2]),0.5*(cData[1]+cData[3])])
-addPoint(subPath,[0.5*(cData[2]+cData[4]),0.5*(cData[3]+cData[5])])
-curves.length&&addPoint(subPath,basePoint=cData.slice(-2))}}break}data.length>=2&&addPoint(subPath,data.slice(-2))}return points}function convexHull(points){points.list.sort((function(a,b){return a[0]==b[0]?a[1]-b[1]:a[0]-b[0]}))
-var lower=[],minY=0,bottom=0
-for(let i=0;i<points.list.length;i++){while(lower.length>=2&&cross(lower[lower.length-2],lower[lower.length-1],points.list[i])<=0)lower.pop()
-if(points.list[i][1]<points.list[minY][1]){minY=i
-bottom=lower.length}lower.push(points.list[i])}var upper=[],maxY=points.list.length-1,top=0
-for(let i=points.list.length;i--;){while(upper.length>=2&&cross(upper[upper.length-2],upper[upper.length-1],points.list[i])<=0)upper.pop()
-if(points.list[i][1]>points.list[maxY][1]){maxY=i
-top=upper.length}upper.push(points.list[i])}upper.pop()
-lower.pop()
-const hullList=lower.concat(upper)
-const hull={list:hullList,minX:0,maxX:lower.length,minY:bottom,maxY:(lower.length+top)%hullList.length}
-return hull}function cross(o,a,b){return(a[0]-o[0])*(b[1]-o[1])-(a[1]-o[1])*(b[0]-o[0])}const a2c=(x1,y1,rx,ry,angle,large_arc_flag,sweep_flag,x2,y2,recursive)=>{const _120=Math.PI*120/180
-const rad=Math.PI/180*(+angle||0)
-let res=[]
-const rotateX=(x,y,rad)=>x*Math.cos(rad)-y*Math.sin(rad)
-const rotateY=(x,y,rad)=>x*Math.sin(rad)+y*Math.cos(rad)
-if(recursive){f1=recursive[0]
-f2=recursive[1]
-cx=recursive[2]
-cy=recursive[3]}else{x1=rotateX(x1,y1,-rad)
-y1=rotateY(x1,y1,-rad)
-x2=rotateX(x2,y2,-rad)
-y2=rotateY(x2,y2,-rad)
-var x=(x1-x2)/2,y=(y1-y2)/2
-var h=x*x/(rx*rx)+y*y/(ry*ry)
-if(h>1){h=Math.sqrt(h)
-rx*=h
-ry*=h}var rx2=rx*rx
-var ry2=ry*ry
-var k=(large_arc_flag==sweep_flag?-1:1)*Math.sqrt(Math.abs((rx2*ry2-rx2*y*y-ry2*x*x)/(rx2*y*y+ry2*x*x)))
-var cx=k*rx*y/ry+(x1+x2)/2
-var cy=k*-ry*x/rx+(y1+y2)/2
-var f1=Math.asin(Number(((y1-cy)/ry).toFixed(9)))
-var f2=Math.asin(Number(((y2-cy)/ry).toFixed(9)))
-f1=x1<cx?Math.PI-f1:f1
-f2=x2<cx?Math.PI-f2:f2
-f1<0&&(f1=Math.PI*2+f1)
-f2<0&&(f2=Math.PI*2+f2)
-sweep_flag&&f1>f2&&(f1-=Math.PI*2)
-!sweep_flag&&f2>f1&&(f2-=Math.PI*2)}var df=f2-f1
-if(Math.abs(df)>_120){var f2old=f2,x2old=x2,y2old=y2
-f2=f1+_120*(sweep_flag&&f2>f1?1:-1)
-x2=cx+rx*Math.cos(f2)
-y2=cy+ry*Math.sin(f2)
-res=a2c(x2,y2,rx,ry,angle,0,sweep_flag,x2old,y2old,[f2,f2old,cx,cy])}df=f2-f1
-var c1=Math.cos(f1),s1=Math.sin(f1),c2=Math.cos(f2),s2=Math.sin(f2),t=Math.tan(df/4),hx=4/3*rx*t,hy=4/3*ry*t,m=[-hx*s1,hy*c1,x2+hx*s2-x1,y2-hy*c2-y1,x2-x1,y2-y1]
-if(recursive)return m.concat(res)
-res=m.concat(res)
-var newres=[]
-for(var i=0,n=res.length;i<n;i++)newres[i]=i%2?rotateY(res[i-1],res[i],rad):rotateX(res[i],res[i+1],rad)
-return newres}
-const transformTypes=new Set(["matrix","rotate","scale","skewX","skewY","translate"])
-const regTransformSplit=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/
-const regNumericValues$2=/[-+]?(?:\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?/g
-const transform2js=transformString=>{const transforms=[]
-let currentTransform=null
-for(const item of transformString.split(regTransformSplit)){if(!item)continue
-if(transformTypes.has(item)){currentTransform={name:item,data:[]}
-transforms.push(currentTransform)}else{let num
-while(num=regNumericValues$2.exec(item)){num=Number(num)
-currentTransform!=null&&currentTransform.data.push(num)}}}return currentTransform==null||currentTransform.data.length==0?[]:transforms}
-const transformsMultiply=transforms=>{const matrixData=transforms.map((transform=>{if(transform.name==="matrix")return transform.data
-return transformToMatrix(transform)}))
-const matrixTransform={name:"matrix",data:matrixData.length>0?matrixData.reduce(multiplyTransformMatrices):[]}
-return matrixTransform}
-const mth={rad:deg=>deg*Math.PI/180,deg:rad=>rad*180/Math.PI,cos:deg=>Math.cos(mth.rad(deg)),acos:(val,floatPrecision)=>toFixed(mth.deg(Math.acos(val)),floatPrecision),sin:deg=>Math.sin(mth.rad(deg)),asin:(val,floatPrecision)=>toFixed(mth.deg(Math.asin(val)),floatPrecision),tan:deg=>Math.tan(mth.rad(deg)),atan:(val,floatPrecision)=>toFixed(mth.deg(Math.atan(val)),floatPrecision)}
-const getDecompositions=matrix=>{const decompositions=[]
-const qrab=decomposeQRAB(matrix)
-const qrcd=decomposeQRCD(matrix)
-qrab&&decompositions.push(qrab)
-qrcd&&decompositions.push(qrcd)
-return decompositions}
-const decomposeQRAB=matrix=>{const data=matrix.data
-const[a,b,c,d,e,f]=data
-const delta=a*d-b*c
-if(delta===0)return
-const r=Math.hypot(a,b)
-if(r===0)return
-const decomposition=[]
-const cosOfRotationAngle=a/r;(e||f)&&decomposition.push({name:"translate",data:[e,f]})
-if(cosOfRotationAngle!==1){const rotationAngleRads=Math.acos(cosOfRotationAngle)
-decomposition.push({name:"rotate",data:[mth.deg(b<0?-rotationAngleRads:rotationAngleRads),0,0]})}const sx=r
-const sy=delta/sx
-sx===1&&sy===1||decomposition.push({name:"scale",data:[sx,sy]})
-const ac_plus_bd=a*c+b*d
-ac_plus_bd&&decomposition.push({name:"skewX",data:[mth.deg(Math.atan(ac_plus_bd/(a*a+b*b)))]})
-return decomposition}
-const decomposeQRCD=matrix=>{const data=matrix.data
-const[a,b,c,d,e,f]=data
-const delta=a*d-b*c
-if(delta===0)return
-const s=Math.hypot(c,d)
-if(s===0)return
-const decomposition=[];(e||f)&&decomposition.push({name:"translate",data:[e,f]})
-const rotationAngleRads=Math.PI/2-(d<0?-1:1)*Math.acos(-c/s)
-decomposition.push({name:"rotate",data:[mth.deg(rotationAngleRads),0,0]})
-const sx=delta/s
-const sy=s
-sx===1&&sy===1||decomposition.push({name:"scale",data:[sx,sy]})
-const ac_plus_bd=a*c+b*d
-ac_plus_bd&&decomposition.push({name:"skewY",data:[mth.deg(Math.atan(ac_plus_bd/(c*c+d*d)))]})
-return decomposition}
-const mergeTranslateAndRotate=(tx,ty,a)=>{const rotationAngleRads=mth.rad(a)
-const d=1-Math.cos(rotationAngleRads)
-const e=Math.sin(rotationAngleRads)
-const cy=(d*ty+e*tx)/(d*d+e*e)
-const cx=(tx-e*cy)/d
-return{name:"rotate",data:[a,cx,cy]}}
-const isIdentityTransform=t=>{switch(t.name){case"rotate":case"skewX":case"skewY":return t.data[0]===0
-case"scale":return t.data[0]===1&&t.data[1]===1
-case"translate":return t.data[0]===0&&t.data[1]===0}return false}
-const optimize$2=(roundedTransforms,rawTransforms)=>{const optimizedTransforms=[]
-for(let index=0;index<roundedTransforms.length;index++){const roundedTransform=roundedTransforms[index]
-if(isIdentityTransform(roundedTransform))continue
-const data=roundedTransform.data
-switch(roundedTransform.name){case"rotate":switch(data[0]){case 180:case-180:{const next=roundedTransforms[index+1]
-if(next&&next.name==="scale"){optimizedTransforms.push(createScaleTransform(next.data.map((v=>-v))))
-index++}else optimizedTransforms.push({name:"scale",data:[-1]})}continue}optimizedTransforms.push({name:"rotate",data:data.slice(0,data[1]||data[2]?3:1)})
-break
-case"scale":optimizedTransforms.push(createScaleTransform(data))
-break
-case"skewX":case"skewY":optimizedTransforms.push({name:roundedTransform.name,data:[data[0]]})
-break
-case"translate":{const next=roundedTransforms[index+1]
-if(next&&next.name==="rotate"&&next.data[0]!==180&&next.data[0]!==-180&&next.data[0]!==0&&next.data[1]===0&&next.data[2]===0){const data=rawTransforms[index].data
-optimizedTransforms.push(mergeTranslateAndRotate(data[0],data[1],rawTransforms[index+1].data[0]))
-index++
-continue}}optimizedTransforms.push({name:"translate",data:data.slice(0,data[1]?2:1)})
-break}}return optimizedTransforms.length?optimizedTransforms:[{name:"scale",data:[1]}]}
-const createScaleTransform=data=>{const scaleData=data.slice(0,data[0]===data[1]?1:2)
-return{name:"scale",data:scaleData}}
-const matrixToTransform=(origMatrix,params)=>{const decomposed=getDecompositions(origMatrix)
-let shortest
-let shortestLen=Number.MAX_VALUE
-for(const decomposition of decomposed){const roundedTransforms=decomposition.map((transformItem=>{const transformCopy={name:transformItem.name,data:[...transformItem.data]}
-return roundTransform(transformCopy,params)}))
-const optimized=optimize$2(roundedTransforms,decomposition)
-const len=js2transform(optimized,params).length
-if(len<shortestLen){shortest=optimized
-shortestLen=len}}return shortest??[origMatrix]}
-const transformToMatrix=transform=>{if(transform.name==="matrix")return transform.data
-switch(transform.name){case"translate":return[1,0,0,1,transform.data[0],transform.data[1]||0]
-case"scale":return[transform.data[0],0,0,transform.data[1]??transform.data[0],0,0]
-case"rotate":var cos=mth.cos(transform.data[0]),sin=mth.sin(transform.data[0]),cx=transform.data[1]||0,cy=transform.data[2]||0
-return[cos,sin,-sin,cos,(1-cos)*cx+sin*cy,(1-cos)*cy-sin*cx]
-case"skewX":return[1,0,mth.tan(transform.data[0]),1,0,0]
-case"skewY":return[1,mth.tan(transform.data[0]),0,1,0,0]
-default:throw Error(`Unknown transform ${transform.name}`)}}
-const transformArc=(cursor,arc,transform)=>{const x=arc[5]-cursor[0]
-const y=arc[6]-cursor[1]
-let a=arc[0]
-let b=arc[1]
-const rot=arc[2]*Math.PI/180
-const cos=Math.cos(rot)
-const sin=Math.sin(rot)
-if(a>0&&b>0){let h=Math.pow(x*cos+y*sin,2)/(4*a*a)+Math.pow(y*cos-x*sin,2)/(4*b*b)
-if(h>1){h=Math.sqrt(h)
-a*=h
-b*=h}}const ellipse=[a*cos,a*sin,-b*sin,b*cos,0,0]
-const m=multiplyTransformMatrices(transform,ellipse)
-const lastCol=m[2]*m[2]+m[3]*m[3]
-const squareSum=m[0]*m[0]+m[1]*m[1]+lastCol
-const root=Math.hypot(m[0]-m[3],m[1]+m[2])*Math.hypot(m[0]+m[3],m[1]-m[2])
-if(root){const majorAxisSqr=(squareSum+root)/2
-const minorAxisSqr=(squareSum-root)/2
-const major=Math.abs(majorAxisSqr-lastCol)>1e-6
-const sub=(major?majorAxisSqr:minorAxisSqr)-lastCol
-const rowsSum=m[0]*m[2]+m[1]*m[3]
-const term1=m[0]*sub+m[2]*rowsSum
-const term2=m[1]*sub+m[3]*rowsSum
-arc[0]=Math.sqrt(majorAxisSqr)
-arc[1]=Math.sqrt(minorAxisSqr)
-arc[2]=((major?term2<0:term1>0)?-1:1)*Math.acos((major?term1:term2)/Math.hypot(term1,term2))*180/Math.PI}else{arc[0]=arc[1]=Math.sqrt(squareSum/2)
-arc[2]=0}transform[0]<0!==transform[3]<0&&(arc[4]=1-arc[4])
-return arc}
-const multiplyTransformMatrices=(a,b)=>[a[0]*b[0]+a[2]*b[1],a[1]*b[0]+a[3]*b[1],a[0]*b[2]+a[2]*b[3],a[1]*b[2]+a[3]*b[3],a[0]*b[4]+a[2]*b[5]+a[4],a[1]*b[4]+a[3]*b[5]+a[5]]
-const roundTransform=(transform,params)=>{switch(transform.name){case"translate":transform.data=floatRound(transform.data,params)
-break
-case"rotate":transform.data=[...degRound(transform.data.slice(0,1),params),...floatRound(transform.data.slice(1),params)]
-break
-case"skewX":case"skewY":transform.data=degRound(transform.data,params)
-break
-case"scale":transform.data=transformRound(transform.data,params)
-break
-case"matrix":transform.data=[...transformRound(transform.data.slice(0,4),params),...floatRound(transform.data.slice(4),params)]
-break}return transform}
-const degRound=(data,params)=>params.degPrecision!=null&&params.degPrecision>=1&&params.floatPrecision<20?smartRound(params.degPrecision,data):round$1(data)
-const floatRound=(data,params)=>params.floatPrecision>=1&&params.floatPrecision<20?smartRound(params.floatPrecision,data):round$1(data)
-const transformRound=(data,params)=>params.transformPrecision>=1&&params.floatPrecision<20?smartRound(params.transformPrecision,data):round$1(data)
-const round$1=data=>data.map(Math.round)
-const smartRound=(precision,data)=>{for(var i=data.length,tolerance=+Math.pow(0.1,precision).toFixed(precision);i--;)if(toFixed(data[i],precision)!==data[i]){var rounded=+data[i].toFixed(precision-1)
-data[i]=+Math.abs(rounded-data[i]).toFixed(precision+1)>=tolerance?+data[i].toFixed(precision):rounded}return data}
-const js2transform=(transformJS,params)=>{const transformString=transformJS.map((transform=>{roundTransform(transform,params)
-return`${transform.name}(${cleanupOutData(transform.data,params)})`})).join("")
-return transformString}
-const regNumericValues$1=/[-+]?(\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?/g
-const applyTransforms=(root,params)=>{const stylesheet=collectStylesheet(root)
-return{element:{enter:node=>{if(node.attributes.d==null)return
-if(node.attributes.id!=null)return
-if(node.attributes.transform==null||node.attributes.transform===""||node.attributes.style!=null||Object.entries(node.attributes).some((([name,value])=>referencesProps.has(name)&&includesUrlReference(value))))return
-const computedStyle=computeStyle(stylesheet,node)
-const transformStyle=computedStyle.transform
-if(transformStyle.type==="static"&&transformStyle.value!==node.attributes.transform)return
-const matrix=transformsMultiply(transform2js(node.attributes.transform))
-const stroke=computedStyle.stroke?.type==="static"?computedStyle.stroke.value:null
-const strokeWidth=computedStyle["stroke-width"]?.type==="static"?computedStyle["stroke-width"].value:null
-const transformPrecision=params.transformPrecision
-if(computedStyle.stroke?.type==="dynamic"||computedStyle["stroke-width"]?.type==="dynamic")return
-const scale=Number(Math.hypot(matrix.data[0],matrix.data[1]).toFixed(transformPrecision))
-if(stroke&&stroke!="none"){if(!params.applyTransformsStroked)return
-if((matrix.data[0]!==matrix.data[3]||matrix.data[1]!==-matrix.data[2])&&(matrix.data[0]!==-matrix.data[3]||matrix.data[1]!==matrix.data[2]))return
-if(scale!==1&&node.attributes["vector-effect"]!=="non-scaling-stroke"){node.attributes["stroke-width"]=(strokeWidth||attrsGroupsDefaults.presentation["stroke-width"]).trim().replace(regNumericValues$1,(num=>removeLeadingZero(Number(num)*scale)))
-node.attributes["stroke-dashoffset"]!=null&&(node.attributes["stroke-dashoffset"]=node.attributes["stroke-dashoffset"].trim().replace(regNumericValues$1,(num=>removeLeadingZero(Number(num)*scale))))
-node.attributes["stroke-dasharray"]!=null&&(node.attributes["stroke-dasharray"]=node.attributes["stroke-dasharray"].trim().replace(regNumericValues$1,(num=>removeLeadingZero(Number(num)*scale))))}}const pathData=path2js(node)
-applyMatrixToPathData(pathData,matrix.data)
-delete node.attributes.transform}}}}
-const transformAbsolutePoint=(matrix,x,y)=>{const newX=matrix[0]*x+matrix[2]*y+matrix[4]
-const newY=matrix[1]*x+matrix[3]*y+matrix[5]
-return[newX,newY]}
-const transformRelativePoint=(matrix,x,y)=>{const newX=matrix[0]*x+matrix[2]*y
-const newY=matrix[1]*x+matrix[3]*y
-return[newX,newY]}
-const applyMatrixToPathData=(pathData,matrix)=>{const start=[0,0]
-const cursor=[0,0]
-for(const pathItem of pathData){let{command:command,args:args}=pathItem
-if(command==="M"){cursor[0]=args[0]
-cursor[1]=args[1]
-start[0]=cursor[0]
-start[1]=cursor[1]
-const[x,y]=transformAbsolutePoint(matrix,args[0],args[1])
-args[0]=x
-args[1]=y}if(command==="m"){cursor[0]+=args[0]
-cursor[1]+=args[1]
-start[0]=cursor[0]
-start[1]=cursor[1]
-const[x,y]=transformRelativePoint(matrix,args[0],args[1])
-args[0]=x
-args[1]=y}if(command==="H"){command="L"
-args=[args[0],cursor[1]]}if(command==="h"){command="l"
-args=[args[0],0]}if(command==="V"){command="L"
-args=[cursor[0],args[0]]}if(command==="v"){command="l"
-args=[0,args[0]]}if(command==="L"){cursor[0]=args[0]
-cursor[1]=args[1]
-const[x,y]=transformAbsolutePoint(matrix,args[0],args[1])
-args[0]=x
-args[1]=y}if(command==="l"){cursor[0]+=args[0]
-cursor[1]+=args[1]
-const[x,y]=transformRelativePoint(matrix,args[0],args[1])
-args[0]=x
-args[1]=y}if(command==="C"){cursor[0]=args[4]
-cursor[1]=args[5]
-const[x1,y1]=transformAbsolutePoint(matrix,args[0],args[1])
-const[x2,y2]=transformAbsolutePoint(matrix,args[2],args[3])
-const[x,y]=transformAbsolutePoint(matrix,args[4],args[5])
-args[0]=x1
-args[1]=y1
-args[2]=x2
-args[3]=y2
-args[4]=x
-args[5]=y}if(command==="c"){cursor[0]+=args[4]
-cursor[1]+=args[5]
-const[x1,y1]=transformRelativePoint(matrix,args[0],args[1])
-const[x2,y2]=transformRelativePoint(matrix,args[2],args[3])
-const[x,y]=transformRelativePoint(matrix,args[4],args[5])
-args[0]=x1
-args[1]=y1
-args[2]=x2
-args[3]=y2
-args[4]=x
-args[5]=y}if(command==="S"){cursor[0]=args[2]
-cursor[1]=args[3]
-const[x2,y2]=transformAbsolutePoint(matrix,args[0],args[1])
-const[x,y]=transformAbsolutePoint(matrix,args[2],args[3])
-args[0]=x2
-args[1]=y2
-args[2]=x
-args[3]=y}if(command==="s"){cursor[0]+=args[2]
-cursor[1]+=args[3]
-const[x2,y2]=transformRelativePoint(matrix,args[0],args[1])
-const[x,y]=transformRelativePoint(matrix,args[2],args[3])
-args[0]=x2
-args[1]=y2
-args[2]=x
-args[3]=y}if(command==="Q"){cursor[0]=args[2]
-cursor[1]=args[3]
-const[x1,y1]=transformAbsolutePoint(matrix,args[0],args[1])
-const[x,y]=transformAbsolutePoint(matrix,args[2],args[3])
-args[0]=x1
-args[1]=y1
-args[2]=x
-args[3]=y}if(command==="q"){cursor[0]+=args[2]
-cursor[1]+=args[3]
-const[x1,y1]=transformRelativePoint(matrix,args[0],args[1])
-const[x,y]=transformRelativePoint(matrix,args[2],args[3])
-args[0]=x1
-args[1]=y1
-args[2]=x
-args[3]=y}if(command==="T"){cursor[0]=args[0]
-cursor[1]=args[1]
-const[x,y]=transformAbsolutePoint(matrix,args[0],args[1])
-args[0]=x
-args[1]=y}if(command==="t"){cursor[0]+=args[0]
-cursor[1]+=args[1]
-const[x,y]=transformRelativePoint(matrix,args[0],args[1])
-args[0]=x
-args[1]=y}if(command==="A"){transformArc(cursor,args,matrix)
-cursor[0]=args[5]
-cursor[1]=args[6]
-if(Math.abs(args[2])>80){const a=args[0]
-const rotation=args[2]
-args[0]=args[1]
-args[1]=a
-args[2]=rotation+(rotation>0?-90:90)}const[x,y]=transformAbsolutePoint(matrix,args[5],args[6])
-args[5]=x
-args[6]=y}if(command==="a"){transformArc([0,0],args,matrix)
-cursor[0]+=args[5]
-cursor[1]+=args[6]
-if(Math.abs(args[2])>80){const a=args[0]
-const rotation=args[2]
-args[0]=args[1]
-args[1]=a
-args[2]=rotation+(rotation>0?-90:90)}const[x,y]=transformRelativePoint(matrix,args[5],args[6])
-args[5]=x
-args[6]=y}if(command==="z"||command==="Z"){cursor[0]=start[0]
-cursor[1]=start[1]}pathItem.command=command
-pathItem.args=args}}
-const name$q="convertPathData"
-const description$q="optimizes path data: writes in shorter form, applies transformations"
-let roundData
-let precision
-let error
-let arcThreshold
-let arcTolerance
-const fn$q=(root,params)=>{const{applyTransforms:_applyTransforms=true,applyTransformsStroked:applyTransformsStroked=true,makeArcs:makeArcs={threshold:2.5,tolerance:0.5},straightCurves:straightCurves=true,convertToQ:convertToQ=true,lineShorthands:lineShorthands=true,convertToZ:convertToZ=true,curveSmoothShorthands:curveSmoothShorthands=true,floatPrecision:floatPrecision=3,transformPrecision:transformPrecision=5,smartArcRounding:smartArcRounding=true,removeUseless:removeUseless=true,collapseRepeated:collapseRepeated=true,utilizeAbsolute:utilizeAbsolute=true,leadingZero:leadingZero=true,negativeExtraSpace:negativeExtraSpace=true,noSpaceAfterFlags:noSpaceAfterFlags=false,forceAbsolutePath:forceAbsolutePath=false}=params
-const newParams={applyTransforms:_applyTransforms,applyTransformsStroked:applyTransformsStroked,makeArcs:makeArcs,straightCurves:straightCurves,convertToQ:convertToQ,lineShorthands:lineShorthands,convertToZ:convertToZ,curveSmoothShorthands:curveSmoothShorthands,floatPrecision:floatPrecision,transformPrecision:transformPrecision,smartArcRounding:smartArcRounding,removeUseless:removeUseless,collapseRepeated:collapseRepeated,utilizeAbsolute:utilizeAbsolute,leadingZero:leadingZero,negativeExtraSpace:negativeExtraSpace,noSpaceAfterFlags:noSpaceAfterFlags,forceAbsolutePath:forceAbsolutePath}
-_applyTransforms&&visit(root,applyTransforms(root,{transformPrecision:transformPrecision,applyTransformsStroked:applyTransformsStroked}))
-const stylesheet=collectStylesheet(root)
-return{element:{enter:node=>{if(pathElems.has(node.name)&&node.attributes.d!=null){const computedStyle=computeStyle(stylesheet,node)
-precision=floatPrecision
-error=precision!==false?+Math.pow(0.1,precision).toFixed(precision):1e-2
-roundData=precision&&precision>0&&precision<20?strongRound:round
-if(makeArcs){arcThreshold=makeArcs.threshold
-arcTolerance=makeArcs.tolerance}const hasMarkerMid=computedStyle["marker-mid"]!=null
-const maybeHasStroke=computedStyle.stroke&&(computedStyle.stroke.type==="dynamic"||computedStyle.stroke.value!=="none")
-const maybeHasLinecap=computedStyle["stroke-linecap"]&&(computedStyle["stroke-linecap"].type==="dynamic"||computedStyle["stroke-linecap"].value!=="butt")
-const maybeHasStrokeAndLinecap=maybeHasStroke&&maybeHasLinecap
-const isSafeToUseZ=!maybeHasStroke||computedStyle["stroke-linecap"]?.type==="static"&&computedStyle["stroke-linecap"].value==="round"&&computedStyle["stroke-linejoin"]?.type==="static"&&computedStyle["stroke-linejoin"].value==="round"
-let data=path2js(node)
-if(data.length){const includesVertices=data.some((item=>item.command!=="m"&&item.command!=="M"))
-convertToRelative(data)
-data=filters(data,newParams,{isSafeToUseZ:isSafeToUseZ,maybeHasStrokeAndLinecap:maybeHasStrokeAndLinecap,hasMarkerMid:hasMarkerMid})
-utilizeAbsolute&&(data=convertToMixed(data,newParams))
-const hasMarker=node.attributes["marker-start"]!=null||node.attributes["marker-end"]!=null
-const isMarkersOnlyPath=hasMarker&&includesVertices&&data.every((item=>item.command==="m"||item.command==="M"))
-isMarkersOnlyPath&&data.push({command:"z",args:[]})
-js2path(node,data,newParams)}}}}}}
-const convertToRelative=pathData=>{let start=[0,0]
-let cursor=[0,0]
-let prevCoords=[0,0]
-for(let i=0;i<pathData.length;i+=1){const pathItem=pathData[i]
-let{command:command,args:args}=pathItem
-if(command==="m"){cursor[0]+=args[0]
-cursor[1]+=args[1]
-start[0]=cursor[0]
-start[1]=cursor[1]}if(command==="M"){i!==0&&(command="m")
-args[0]-=cursor[0]
-args[1]-=cursor[1]
-cursor[0]+=args[0]
-cursor[1]+=args[1]
-start[0]=cursor[0]
-start[1]=cursor[1]}if(command==="l"){cursor[0]+=args[0]
-cursor[1]+=args[1]}if(command==="L"){command="l"
-args[0]-=cursor[0]
-args[1]-=cursor[1]
-cursor[0]+=args[0]
-cursor[1]+=args[1]}command==="h"&&(cursor[0]+=args[0])
-if(command==="H"){command="h"
-args[0]-=cursor[0]
-cursor[0]+=args[0]}command==="v"&&(cursor[1]+=args[0])
-if(command==="V"){command="v"
-args[0]-=cursor[1]
-cursor[1]+=args[0]}if(command==="c"){cursor[0]+=args[4]
-cursor[1]+=args[5]}if(command==="C"){command="c"
-args[0]-=cursor[0]
-args[1]-=cursor[1]
-args[2]-=cursor[0]
-args[3]-=cursor[1]
-args[4]-=cursor[0]
-args[5]-=cursor[1]
-cursor[0]+=args[4]
-cursor[1]+=args[5]}if(command==="s"){cursor[0]+=args[2]
-cursor[1]+=args[3]}if(command==="S"){command="s"
-args[0]-=cursor[0]
-args[1]-=cursor[1]
-args[2]-=cursor[0]
-args[3]-=cursor[1]
-cursor[0]+=args[2]
-cursor[1]+=args[3]}if(command==="q"){cursor[0]+=args[2]
-cursor[1]+=args[3]}if(command==="Q"){command="q"
-args[0]-=cursor[0]
-args[1]-=cursor[1]
-args[2]-=cursor[0]
-args[3]-=cursor[1]
-cursor[0]+=args[2]
-cursor[1]+=args[3]}if(command==="t"){cursor[0]+=args[0]
-cursor[1]+=args[1]}if(command==="T"){command="t"
-args[0]-=cursor[0]
-args[1]-=cursor[1]
-cursor[0]+=args[0]
-cursor[1]+=args[1]}if(command==="a"){cursor[0]+=args[5]
-cursor[1]+=args[6]}if(command==="A"){command="a"
-args[5]-=cursor[0]
-args[6]-=cursor[1]
-cursor[0]+=args[5]
-cursor[1]+=args[6]}if(command==="Z"||command==="z"){cursor[0]=start[0]
-cursor[1]=start[1]}pathItem.command=command
-pathItem.args=args
-pathItem.base=prevCoords
-pathItem.coords=[cursor[0],cursor[1]]
-prevCoords=pathItem.coords}return pathData}
-function filters(path,params,{isSafeToUseZ:isSafeToUseZ,maybeHasStrokeAndLinecap:maybeHasStrokeAndLinecap,hasMarkerMid:hasMarkerMid}){const stringify=data2Path.bind(null,params)
-const relSubpoint=[0,0]
-const pathBase=[0,0]
-let prev={}
-let prevQControlPoint
-path=path.filter((function(item,index,path){const qControlPoint=prevQControlPoint
-let command=item.command
-let data=item.args
-let next=path[index+1]
-if(command!=="Z"&&command!=="z"){var sdata=data,circle
-if(command==="s"){sdata=[0,0].concat(data)
-const pdata=prev.args
-const n=pdata.length
-sdata[0]=pdata[n-2]-pdata[n-4]
-sdata[1]=pdata[n-1]-pdata[n-3]}if(params.makeArcs&&(command=="c"||command=="s")&&isConvex(sdata)&&(circle=findCircle(sdata))){var r=roundData([circle.radius])[0],angle=findArcAngle(sdata,circle),sweep=sdata[5]*sdata[0]-sdata[4]*sdata[1]>0?1:0,arc={command:"a",args:[r,r,0,0,sweep,sdata[4],sdata[5]],coords:item.coords.slice(),base:item.base},output=[arc],relCenter=[circle.center[0]-sdata[4],circle.center[1]-sdata[5]],relCircle={center:relCenter,radius:circle.radius},arcCurves=[item],hasPrev=0,suffix="",nextLonghand
-if(prev.command=="c"&&isConvex(prev.args)&&isArcPrev(prev.args,circle)||prev.command=="a"&&prev.sdata&&isArcPrev(prev.sdata,circle)){arcCurves.unshift(prev)
-arc.base=prev.base
-arc.args[5]=arc.coords[0]-arc.base[0]
-arc.args[6]=arc.coords[1]-arc.base[1]
-var prevData=prev.command=="a"?prev.sdata:prev.args
-var prevAngle=findArcAngle(prevData,{center:[prevData[4]+circle.center[0],prevData[5]+circle.center[1]],radius:circle.radius})
-angle+=prevAngle
-angle>Math.PI&&(arc.args[3]=1)
-hasPrev=1}for(var j=index;(next=path[++j])&&(next.command==="c"||next.command==="s");){var nextData=next.args
-if(next.command=="s"){nextLonghand=makeLonghand({command:"s",args:next.args.slice()},path[j-1].args)
-nextData=nextLonghand.args
-nextLonghand.args=nextData.slice(0,2)
-suffix=stringify([nextLonghand])}if(!isConvex(nextData)||!isArc(nextData,relCircle))break
-angle+=findArcAngle(nextData,relCircle)
-if(angle-2*Math.PI>1e-3)break
-angle>Math.PI&&(arc.args[3]=1)
-arcCurves.push(next)
-if(!(2*Math.PI-angle>1e-3)){arc.args[5]=2*(relCircle.center[0]-nextData[4])
-arc.args[6]=2*(relCircle.center[1]-nextData[5])
-arc.coords=[arc.base[0]+arc.args[5],arc.base[1]+arc.args[6]]
-arc={command:"a",args:[r,r,0,0,sweep,next.coords[0]-arc.coords[0],next.coords[1]-arc.coords[1]],coords:next.coords,base:arc.coords}
-output.push(arc)
-j++
-break}arc.coords=next.coords
-arc.args[5]=arc.coords[0]-arc.base[0]
-arc.args[6]=arc.coords[1]-arc.base[1]
-relCenter[0]-=nextData[4]
-relCenter[1]-=nextData[5]}if((stringify(output)+suffix).length<stringify(arcCurves).length){path[j]&&path[j].command=="s"&&makeLonghand(path[j],path[j-1].args)
-if(hasPrev){var prevArc=output.shift()
-roundData(prevArc.args)
-relSubpoint[0]+=prevArc.args[5]-prev.args[prev.args.length-2]
-relSubpoint[1]+=prevArc.args[6]-prev.args[prev.args.length-1]
-prev.command="a"
-prev.args=prevArc.args
-item.base=prev.coords=prevArc.coords}arc=output.shift()
-arcCurves.length==1?item.sdata=sdata.slice():arcCurves.length-1-hasPrev>0&&path.splice(index+1,arcCurves.length-1-hasPrev,...output)
-if(!arc)return false
-command="a"
-data=arc.args
-item.coords=arc.coords}}if(precision!==false){if(command==="m"||command==="l"||command==="t"||command==="q"||command==="s"||command==="c")for(var i=data.length;i--;)data[i]+=item.base[i%2]-relSubpoint[i%2]
-else if(command=="h")data[0]+=item.base[0]-relSubpoint[0]
-else if(command=="v")data[0]+=item.base[1]-relSubpoint[1]
-else if(command=="a"){data[5]+=item.base[0]-relSubpoint[0]
-data[6]+=item.base[1]-relSubpoint[1]}roundData(data)
-if(command=="h")relSubpoint[0]+=data[0]
-else if(command=="v")relSubpoint[1]+=data[0]
-else{relSubpoint[0]+=data[data.length-2]
-relSubpoint[1]+=data[data.length-1]}roundData(relSubpoint)
-if(command==="M"||command==="m"){pathBase[0]=relSubpoint[0]
-pathBase[1]=relSubpoint[1]}}const sagitta=command==="a"?calculateSagitta(data):void 0
-if(params.smartArcRounding&&sagitta!==void 0&&precision)for(let precisionNew=precision;precisionNew>=0;precisionNew--){const radius=toFixed(data[0],precisionNew)
-const sagittaNew=calculateSagitta([radius,radius,...data.slice(2)])
-if(!(Math.abs(sagitta-sagittaNew)<error))break
-data[0]=radius
-data[1]=radius}if(params.straightCurves)if(command==="c"&&isCurveStraightLine(data)||command==="s"&&isCurveStraightLine(sdata)){next&&next.command=="s"&&makeLonghand(next,data)
-command="l"
-data=data.slice(-2)}else if(command==="q"&&isCurveStraightLine(data)){next&&next.command=="t"&&makeLonghand(next,data)
-command="l"
-data=data.slice(-2)}else if(command==="t"&&prev.command!=="q"&&prev.command!=="t"){command="l"
-data=data.slice(-2)}else if(command==="a"&&(data[0]===0||data[1]===0||sagitta!==void 0&&sagitta<error)){command="l"
-data=data.slice(-2)}if(params.convertToQ&&command=="c"){const x1=0.75*(item.base[0]+data[0])-0.25*item.base[0]
-const x2=0.75*(item.base[0]+data[2])-0.25*(item.base[0]+data[4])
-if(Math.abs(x1-x2)<error*2){const y1=0.75*(item.base[1]+data[1])-0.25*item.base[1]
-const y2=0.75*(item.base[1]+data[3])-0.25*(item.base[1]+data[5])
-if(Math.abs(y1-y2)<error*2){const newData=data.slice()
-newData.splice(0,4,x1+x2-item.base[0],y1+y2-item.base[1])
-roundData(newData)
-const originalLength=cleanupOutData(data,params).length,newLength=cleanupOutData(newData,params).length
-if(newLength<originalLength){command="q"
-data=newData
-next&&next.command=="s"&&makeLonghand(next,data)}}}}if(params.lineShorthands&&command==="l")if(data[1]===0){command="h"
-data.pop()}else if(data[0]===0){command="v"
-data.shift()}if(params.collapseRepeated&&hasMarkerMid===false&&(command==="m"||command==="h"||command==="v")&&prev.command&&command==prev.command.toLowerCase()&&(command!="h"&&command!="v"||prev.args[0]>=0==data[0]>=0)){prev.args[0]+=data[0]
-command!="h"&&command!="v"&&(prev.args[1]+=data[1])
-prev.coords=item.coords
-path[index]=prev
-return false}if(params.curveSmoothShorthands&&prev.command)if(command==="c"){if(prev.command==="c"&&Math.abs(data[0]- -(prev.args[2]-prev.args[4]))<error&&Math.abs(data[1]- -(prev.args[3]-prev.args[5]))<error){command="s"
-data=data.slice(2)}else if(prev.command==="s"&&Math.abs(data[0]- -(prev.args[0]-prev.args[2]))<error&&Math.abs(data[1]- -(prev.args[1]-prev.args[3]))<error){command="s"
-data=data.slice(2)}else if(prev.command!=="c"&&prev.command!=="s"&&Math.abs(data[0])<error&&Math.abs(data[1])<error){command="s"
-data=data.slice(2)}}else if(command==="q")if(prev.command==="q"&&Math.abs(data[0]-(prev.args[2]-prev.args[0]))<error&&Math.abs(data[1]-(prev.args[3]-prev.args[1]))<error){command="t"
-data=data.slice(2)}else if(prev.command==="t"){const predictedControlPoint=reflectPoint(qControlPoint,item.base)
-const realControlPoint=[data[0]+item.base[0],data[1]+item.base[1]]
-if(Math.abs(predictedControlPoint[0]-realControlPoint[0])<error&&Math.abs(predictedControlPoint[1]-realControlPoint[1])<error){command="t"
-data=data.slice(2)}}if(params.removeUseless&&!maybeHasStrokeAndLinecap){if((command==="l"||command==="h"||command==="v"||command==="q"||command==="t"||command==="c"||command==="s")&&data.every((function(i){return i===0}))){path[index]=prev
-return false}if(command==="a"&&data[5]===0&&data[6]===0){path[index]=prev
-return false}}if(params.convertToZ&&(isSafeToUseZ||next?.command==="Z"||next?.command==="z")&&(command==="l"||command==="h"||command==="v")&&Math.abs(pathBase[0]-item.coords[0])<error&&Math.abs(pathBase[1]-item.coords[1])<error){command="z"
-data=[]}item.command=command
-item.args=data}else{relSubpoint[0]=pathBase[0]
-relSubpoint[1]=pathBase[1]
-if(prev.command==="Z"||prev.command==="z")return false}if((command==="Z"||command==="z")&&params.removeUseless&&isSafeToUseZ&&Math.abs(item.base[0]-item.coords[0])<error/10&&Math.abs(item.base[1]-item.coords[1])<error/10)return false
-prevQControlPoint=command==="q"?[data[0]+item.base[0],data[1]+item.base[1]]:command==="t"?qControlPoint?reflectPoint(qControlPoint,item.base):item.coords:void 0
-prev=item
-return true}))
-return path}function convertToMixed(path,params){var prev=path[0]
-path=path.filter((function(item,index){if(index==0)return true
-if(item.command==="Z"||item.command==="z"){prev=item
-return true}var command=item.command,data=item.args,adata=data.slice(),rdata=data.slice()
-if(command==="m"||command==="l"||command==="t"||command==="q"||command==="s"||command==="c")for(var i=adata.length;i--;)adata[i]+=item.base[i%2]
-else if(command=="h")adata[0]+=item.base[0]
-else if(command=="v")adata[0]+=item.base[1]
-else if(command=="a"){adata[5]+=item.base[0]
-adata[6]+=item.base[1]}roundData(adata)
-roundData(rdata)
-var absoluteDataStr=cleanupOutData(adata,params),relativeDataStr=cleanupOutData(rdata,params)
-if(params.forceAbsolutePath||absoluteDataStr.length<relativeDataStr.length&&!(params.negativeExtraSpace&&command==prev.command&&prev.command.charCodeAt(0)>96&&absoluteDataStr.length==relativeDataStr.length-1&&(data[0]<0||Math.floor(data[0])===0&&!Number.isInteger(data[0])&&prev.args[prev.args.length-1]%1))){item.command=command.toUpperCase()
-item.args=adata}prev=item
-return true}))
-return path}function isConvex(data){var center=getIntersection([0,0,data[2],data[3],data[0],data[1],data[4],data[5]])
-return center!=null&&data[2]<center[0]==center[0]<0&&data[3]<center[1]==center[1]<0&&data[4]<center[0]==center[0]<data[0]&&data[5]<center[1]==center[1]<data[1]}function getIntersection(coords){var a1=coords[1]-coords[3],b1=coords[2]-coords[0],c1=coords[0]*coords[3]-coords[2]*coords[1],a2=coords[5]-coords[7],b2=coords[6]-coords[4],c2=coords[4]*coords[7]-coords[5]*coords[6],denom=a1*b2-a2*b1
-if(!denom)return
-var cross=[(b1*c2-b2*c1)/denom,(a1*c2-a2*c1)/-denom]
-if(!isNaN(cross[0])&&!isNaN(cross[1])&&isFinite(cross[0])&&isFinite(cross[1]))return cross}function strongRound(data){const precisionNum=precision||0
-for(let i=data.length;i-- >0;){const fixed=toFixed(data[i],precisionNum)
-if(fixed!==data[i]){const rounded=toFixed(data[i],precisionNum-1)
-data[i]=toFixed(Math.abs(rounded-data[i]),precisionNum+1)>=error?fixed:rounded}}return data}function round(data){for(var i=data.length;i-- >0;)data[i]=Math.round(data[i])
-return data}function isCurveStraightLine(data){var i=data.length-2,a=-data[i+1],b=data[i],d=1/(a*a+b*b)
-if(i<=1||!isFinite(d))return false
-while((i-=2)>=0)if(Math.sqrt(Math.pow(a*data[i]+b*data[i+1],2)*d)>error)return false
-return true}function calculateSagitta(data){if(data[3]===1)return
-const[rx,ry]=data
-if(Math.abs(rx-ry)>error)return
-const chord=Math.hypot(data[5],data[6])
-if(chord>rx*2)return
-return rx-Math.sqrt(rx**2-0.25*chord**2)}function makeLonghand(item,data){switch(item.command){case"s":item.command="c"
-break
-case"t":item.command="q"
-break}item.args.unshift(data[data.length-2]-data[data.length-4],data[data.length-1]-data[data.length-3])
-return item}function getDistance(point1,point2){return Math.hypot(point1[0]-point2[0],point1[1]-point2[1])}function reflectPoint(controlPoint,base){return[2*base[0]-controlPoint[0],2*base[1]-controlPoint[1]]}function getCubicBezierPoint(curve,t){var sqrT=t*t,cubT=sqrT*t,mt=1-t,sqrMt=mt*mt
-return[3*sqrMt*t*curve[0]+3*mt*sqrT*curve[2]+cubT*curve[4],3*sqrMt*t*curve[1]+3*mt*sqrT*curve[3]+cubT*curve[5]]}function findCircle(curve){var midPoint=getCubicBezierPoint(curve,.5),m1=[midPoint[0]/2,midPoint[1]/2],m2=[(midPoint[0]+curve[4])/2,(midPoint[1]+curve[5])/2],center=getIntersection([m1[0],m1[1],m1[0]+m1[1],m1[1]-m1[0],m2[0],m2[1],m2[0]+(m2[1]-midPoint[1]),m2[1]-(m2[0]-midPoint[0])]),radius=center&&getDistance([0,0],center),tolerance=Math.min(arcThreshold*error,arcTolerance*radius/100)
-if(center&&radius<1e15&&[1/4,3/4].every((function(point){return Math.abs(getDistance(getCubicBezierPoint(curve,point),center)-radius)<=tolerance})))return{center:center,radius:radius}}function isArc(curve,circle){var tolerance=Math.min(arcThreshold*error,arcTolerance*circle.radius/100)
-return[0,1/4,.5,3/4,1].every((function(point){return Math.abs(getDistance(getCubicBezierPoint(curve,point),circle.center)-circle.radius)<=tolerance}))}function isArcPrev(curve,circle){return isArc(curve,{center:[circle.center[0]+curve[4],circle.center[1]+curve[5]],radius:circle.radius})}function findArcAngle(curve,relCircle){var x1=-relCircle.center[0],y1=-relCircle.center[1],x2=curve[4]-relCircle.center[0],y2=curve[5]-relCircle.center[1]
-return Math.acos((x1*x2+y1*y2)/Math.sqrt((x1*x1+y1*y1)*(x2*x2+y2*y2)))}function data2Path(params,pathData){return pathData.reduce((function(pathString,item){var strData=""
-item.args&&(strData=cleanupOutData(roundData(item.args.slice()),params))
-return pathString+item.command+strData}),"")}var convertPathData=Object.freeze({__proto__:null,description:description$q,fn:fn$q,name:name$q})
-const name$p="convertTransform"
-const description$p="collapses multiple transformations and optimizes it"
-const fn$p=(_root,params)=>{const{convertToShorts:convertToShorts=true,degPrecision:degPrecision,floatPrecision:floatPrecision=3,transformPrecision:transformPrecision=5,matrixToTransform:matrixToTransform=true,shortTranslate:shortTranslate=true,shortScale:shortScale=true,shortRotate:shortRotate=true,removeUseless:removeUseless=true,collapseIntoOne:collapseIntoOne=true,leadingZero:leadingZero=true,negativeExtraSpace:negativeExtraSpace=false}=params
-const newParams={convertToShorts:convertToShorts,degPrecision:degPrecision,floatPrecision:floatPrecision,transformPrecision:transformPrecision,matrixToTransform:matrixToTransform,shortTranslate:shortTranslate,shortScale:shortScale,shortRotate:shortRotate,removeUseless:removeUseless,collapseIntoOne:collapseIntoOne,leadingZero:leadingZero,negativeExtraSpace:negativeExtraSpace}
-return{element:{enter:node=>{node.attributes.transform!=null&&convertTransform(node,"transform",newParams)
-node.attributes.gradientTransform!=null&&convertTransform(node,"gradientTransform",newParams)
-node.attributes.patternTransform!=null&&convertTransform(node,"patternTransform",newParams)}}}}
-const convertTransform=(item,attrName,params)=>{let data=transform2js(item.attributes[attrName])
-params=definePrecision(data,params)
-params.collapseIntoOne&&data.length>1&&(data=[transformsMultiply(data)])
-params.convertToShorts?data=convertToShorts(data,params):data.forEach((item=>roundTransform(item,params)))
-params.removeUseless&&(data=removeUseless(data))
-data.length?item.attributes[attrName]=js2transform(data,params):delete item.attributes[attrName]}
-const definePrecision=(data,{...newParams})=>{const matrixData=[]
-for(const item of data)item.name=="matrix"&&matrixData.push(...item.data.slice(0,4))
-let numberOfDigits=newParams.transformPrecision
-if(matrixData.length){newParams.transformPrecision=Math.min(newParams.transformPrecision,Math.max.apply(Math,matrixData.map(floatDigits))||newParams.transformPrecision)
-numberOfDigits=Math.max.apply(Math,matrixData.map((n=>n.toString().replace(/\D+/g,"").length)))}newParams.degPrecision==null&&(newParams.degPrecision=Math.max(0,Math.min(newParams.floatPrecision,numberOfDigits-2)))
-return newParams}
-const floatDigits=n=>{const str=n.toString()
-return str.slice(str.indexOf(".")).length-1}
-const convertToShorts=(transforms,params)=>{for(var i=0;i<transforms.length;i++){let transform=transforms[i]
-if(params.matrixToTransform&&transform.name==="matrix"){var decomposed=matrixToTransform(transform,params)
-js2transform(decomposed,params).length<=js2transform([transform],params).length&&transforms.splice(i,1,...decomposed)
-transform=transforms[i]}roundTransform(transform,params)
-params.shortTranslate&&transform.name==="translate"&&transform.data.length===2&&!transform.data[1]&&transform.data.pop()
-params.shortScale&&transform.name==="scale"&&transform.data.length===2&&transform.data[0]===transform.data[1]&&transform.data.pop()
-if(params.shortRotate&&transforms[i-2]?.name==="translate"&&transforms[i-1].name==="rotate"&&transforms[i].name==="translate"&&transforms[i-2].data[0]===-transforms[i].data[0]&&transforms[i-2].data[1]===-transforms[i].data[1]){transforms.splice(i-2,3,{name:"rotate",data:[transforms[i-1].data[0],transforms[i-2].data[0],transforms[i-2].data[1]]})
-i-=2}}return transforms}
-const removeUseless=transforms=>transforms.filter((transform=>{if(["translate","rotate","skewX","skewY"].indexOf(transform.name)>-1&&(transform.data.length==1||transform.name=="rotate")&&!transform.data[0]||transform.name=="translate"&&!transform.data[0]&&!transform.data[1]||transform.name=="scale"&&transform.data[0]==1&&(transform.data.length<2||transform.data[1]==1)||transform.name=="matrix"&&transform.data[0]==1&&transform.data[3]==1&&!(transform.data[1]||transform.data[2]||transform.data[4]||transform.data[5]))return false
-return true}))
-var convertTransform$1=Object.freeze({__proto__:null,description:description$p,fn:fn$p,name:name$p})
-const name$o="removeEmptyAttrs"
-const description$o="removes empty attributes"
-const fn$o=()=>({element:{enter:node=>{for(const[name,value]of Object.entries(node.attributes))value!==""||attrsGroups.conditionalProcessing.has(name)||delete node.attributes[name]}}})
-var removeEmptyAttrs=Object.freeze({__proto__:null,description:description$o,fn:fn$o,name:name$o})
-const name$n="removeEmptyContainers"
-const description$n="removes empty container elements"
-const fn$n=()=>({element:{exit:(node,parentNode)=>{if(node.name==="svg"||!elemsGroups.container.has(node.name)||node.children.length!==0)return
-if(node.name==="pattern"&&Object.keys(node.attributes).length!==0)return
-if(node.name==="g"&&node.attributes.filter!=null)return
-if(node.name==="mask"&&node.attributes.id!=null)return
-if(parentNode.type==="element"&&parentNode.name==="switch")return
-detachNodeFromParent(node,parentNode)}}})
-var removeEmptyContainers=Object.freeze({__proto__:null,description:description$n,fn:fn$n,name:name$n})
-const name$m="mergePaths"
-const description$m="merges multiple paths in one if possible"
-function elementHasUrl(computedStyle,attName){const style=computedStyle[attName]
-if(style?.type==="static")return includesUrlReference(style.value)
-return false}const fn$m=(root,params)=>{const{force:force=false,floatPrecision:floatPrecision=3,noSpaceAfterFlags:noSpaceAfterFlags=false}=params
-const stylesheet=collectStylesheet(root)
-return{element:{enter:node=>{if(node.children.length<=1)return
-const elementsToRemove=[]
-let prevChild=node.children[0]
-let prevPathData=null
-const updatePreviousPath=(child,pathData)=>{js2path(child,pathData,{floatPrecision:floatPrecision,noSpaceAfterFlags:noSpaceAfterFlags})
-prevPathData=null}
-for(let i=1;i<node.children.length;i++){const child=node.children[i]
-if(prevChild.type!=="element"||prevChild.name!=="path"||prevChild.children.length!==0||prevChild.attributes.d==null){prevPathData&&prevChild.type==="element"&&updatePreviousPath(prevChild,prevPathData)
-prevChild=child
-continue}if(child.type!=="element"||child.name!=="path"||child.children.length!==0||child.attributes.d==null){prevPathData&&updatePreviousPath(prevChild,prevPathData)
-prevChild=child
-continue}const computedStyle=computeStyle(stylesheet,child)
-if(computedStyle["marker-start"]||computedStyle["marker-mid"]||computedStyle["marker-end"]||computedStyle["clip-path"]||computedStyle["mask"]||computedStyle["mask-image"]||["fill","filter","stroke"].some((attName=>elementHasUrl(computedStyle,attName)))){prevPathData&&updatePreviousPath(prevChild,prevPathData)
-prevChild=child
-continue}const childAttrs=Object.keys(child.attributes)
-if(childAttrs.length!==Object.keys(prevChild.attributes).length){prevPathData&&updatePreviousPath(prevChild,prevPathData)
-prevChild=child
-continue}const areAttrsEqual=childAttrs.some((attr=>attr!=="d"&&prevChild.type==="element"&&prevChild.attributes[attr]!==child.attributes[attr]))
-if(areAttrsEqual){prevPathData&&updatePreviousPath(prevChild,prevPathData)
-prevChild=child
-continue}const hasPrevPath=prevPathData!=null
-const currentPathData=path2js(child)
-prevPathData=prevPathData??path2js(prevChild)
-if(force||!intersects(prevPathData,currentPathData)){prevPathData.push(...currentPathData)
-elementsToRemove.push(child)
-continue}hasPrevPath&&updatePreviousPath(prevChild,prevPathData)
-prevChild=child
-prevPathData=null}prevPathData&&prevChild.type==="element"&&updatePreviousPath(prevChild,prevPathData)
-node.children=node.children.filter((child=>!elementsToRemove.includes(child)))}}}}
-var mergePaths=Object.freeze({__proto__:null,description:description$m,fn:fn$m,name:name$m})
-const name$l="removeUnusedNS"
-const description$l="removes unused namespaces declaration"
-const fn$l=()=>{const unusedNamespaces=new Set
-return{element:{enter:(node,parentNode)=>{if(node.name==="svg"&&parentNode.type==="root")for(const name of Object.keys(node.attributes))if(name.startsWith("xmlns:")){const local=name.slice(6)
-unusedNamespaces.add(local)}if(unusedNamespaces.size!==0){if(node.name.includes(":")){const[ns]=node.name.split(":")
-unusedNamespaces.has(ns)&&unusedNamespaces.delete(ns)}for(const name of Object.keys(node.attributes))if(name.includes(":")){const[ns]=name.split(":")
-unusedNamespaces.delete(ns)}}},exit:(node,parentNode)=>{if(node.name==="svg"&&parentNode.type==="root")for(const name of unusedNamespaces)delete node.attributes[`xmlns:${name}`]}}}}
-var removeUnusedNS=Object.freeze({__proto__:null,description:description$l,fn:fn$l,name:name$l})
-const name$k="sortAttrs"
-const description$k="Sort element attributes for better compression"
-const fn$k=(_root,params)=>{const{order:order=["id","width","height","x","x1","x2","y","y1","y2","cx","cy","r","fill","stroke","marker","d","points"],xmlnsOrder:xmlnsOrder="front"}=params
-const getNsPriority=name=>{if(xmlnsOrder==="front"){if(name==="xmlns")return 3
-if(name.startsWith("xmlns:"))return 2}if(name.includes(":"))return 1
-return 0}
-const compareAttrs=([aName],[bName])=>{const aPriority=getNsPriority(aName)
-const bPriority=getNsPriority(bName)
-const priorityNs=bPriority-aPriority
-if(priorityNs!==0)return priorityNs
-const[aPart]=aName.split("-")
-const[bPart]=bName.split("-")
-if(aPart!==bPart){const aInOrderFlag=order.includes(aPart)?1:0
-const bInOrderFlag=order.includes(bPart)?1:0
-if(aInOrderFlag===1&&bInOrderFlag===1)return order.indexOf(aPart)-order.indexOf(bPart)
-const priorityOrder=bInOrderFlag-aInOrderFlag
-if(priorityOrder!==0)return priorityOrder}return aName<bName?-1:1}
-return{element:{enter:node=>{const attrs=Object.entries(node.attributes)
-attrs.sort(compareAttrs)
-const sortedAttributes={}
-for(const[name,value]of attrs)sortedAttributes[name]=value
-node.attributes=sortedAttributes}}}}
-var sortAttrs=Object.freeze({__proto__:null,description:description$k,fn:fn$k,name:name$k})
-const name$j="sortDefsChildren"
-const description$j="Sorts children of <defs> to improve compression"
-const fn$j=()=>({element:{enter:node=>{if(node.name==="defs"){const frequencies=new Map
-for(const child of node.children)if(child.type==="element"){const frequency=frequencies.get(child.name)
-frequency==null?frequencies.set(child.name,1):frequencies.set(child.name,frequency+1)}node.children.sort(((a,b)=>{if(a.type!=="element"||b.type!=="element")return 0
-const aFrequency=frequencies.get(a.name)
-const bFrequency=frequencies.get(b.name)
-if(aFrequency!=null&&bFrequency!=null){const frequencyComparison=bFrequency-aFrequency
-if(frequencyComparison!==0)return frequencyComparison}const lengthComparison=b.name.length-a.name.length
-if(lengthComparison!==0)return lengthComparison
-if(a.name!==b.name)return a.name>b.name?-1:1
-return 0}))}}}})
-var sortDefsChildren=Object.freeze({__proto__:null,description:description$j,fn:fn$j,name:name$j})
-const name$i="removeTitle"
-const description$i="removes <title>"
-const fn$i=()=>({element:{enter:(node,parentNode)=>{node.name==="title"&&detachNodeFromParent(node,parentNode)}}})
-var removeTitle=Object.freeze({__proto__:null,description:description$i,fn:fn$i,name:name$i})
-const name$h="removeDesc"
-const description$h="removes <desc>"
-const standardDescs=/^(Created with|Created using)/
-const fn$h=(root,params)=>{const{removeAny:removeAny=false}=params
-return{element:{enter:(node,parentNode)=>{node.name==="desc"&&(removeAny||node.children.length===0||node.children[0].type==="text"&&standardDescs.test(node.children[0].value))&&detachNodeFromParent(node,parentNode)}}}}
-var removeDesc=Object.freeze({__proto__:null,description:description$h,fn:fn$h,name:name$h})
-const presetDefault=createPreset({name:"preset-default",plugins:[removeDoctype,removeXMLProcInst,removeComments,removeDeprecatedAttrs,removeMetadata,removeEditorsNSData,cleanupAttrs,mergeStyles,inlineStyles,minifyStyles,cleanupIds,removeUselessDefs,cleanupNumericValues,convertColors,removeUnknownsAndDefaults,removeNonInheritableGroupAttrs,removeUselessStrokeAndFill,removeViewBox,cleanupEnableBackground,removeHiddenElems,removeEmptyText,convertShapeToPath,convertEllipseToCircle,moveElemsAttrsToGroup,moveGroupAttrsToElems,collapseGroups,convertPathData,convertTransform$1,removeEmptyAttrs,removeEmptyContainers,mergePaths,removeUnusedNS,sortAttrs,sortDefsChildren,removeTitle,removeDesc]})
-const name$g="addAttributesToSVGElement"
-const description$g="adds attributes to an outer <svg> element"
-var ENOCLS$1='Error in plugin "addAttributesToSVGElement": absent parameters.\nIt should have a list of "attributes" or one "attribute".\nConfig example:\n\nplugins: [\n {\n name: \'addAttributesToSVGElement\',\n params: {\n attribute: "mySvg"\n }\n }\n]\n\nplugins: [\n {\n name: \'addAttributesToSVGElement\',\n params: {\n attributes: ["mySvg", "size-big"]\n }\n }\n]\n\nplugins: [\n {\n name: \'addAttributesToSVGElement\',\n params: {\n attributes: [\n {\n focusable: false\n },\n {\n \'data-image\': icon\n }\n ]\n }\n }\n]\n'
-const fn$g=(root,params)=>{if(!Array.isArray(params.attributes)&&!params.attribute){console.error(ENOCLS$1)
-return null}const attributes=params.attributes||[params.attribute]
-return{element:{enter:(node,parentNode)=>{if(node.name==="svg"&&parentNode.type==="root")for(const attribute of attributes){typeof attribute==="string"&&node.attributes[attribute]==null&&(node.attributes[attribute]=void 0)
-if(typeof attribute==="object")for(const key of Object.keys(attribute))node.attributes[key]==null&&(node.attributes[key]=attribute[key])}}}}}
-var addAttributesToSVGElement=Object.freeze({__proto__:null,description:description$g,fn:fn$g,name:name$g})
-const name$f="addClassesToSVGElement"
-const description$f="adds classnames to an outer <svg> element"
-var ENOCLS='Error in plugin "addClassesToSVGElement": absent parameters.\nIt should have a list of classes in "classNames" or one "className".\nConfig example:\n\nplugins: [\n {\n name: "addClassesToSVGElement",\n params: {\n className: "mySvg"\n }\n }\n]\n\nplugins: [\n {\n name: "addClassesToSVGElement",\n params: {\n classNames: ["mySvg", "size-big"]\n }\n }\n]\n'
-const fn$f=(root,params,info)=>{if(!(Array.isArray(params.classNames)&&params.classNames.length!==0)&&!params.className){console.error(ENOCLS)
-return null}const classNames=params.classNames||[params.className]
-return{element:{enter:(node,parentNode)=>{if(node.name==="svg"&&parentNode.type==="root"){const classList=new Set(node.attributes.class==null?null:node.attributes.class.split(" "))
-for(const className of classNames)if(className!=null){const classToAdd=typeof className==="string"?className:className(node,info)
-classList.add(classToAdd)}node.attributes.class=Array.from(classList).join(" ")}}}}}
-var addClassesToSVGElement=Object.freeze({__proto__:null,description:description$f,fn:fn$f,name:name$f})
-const name$e="cleanupListOfValues"
-const description$e="rounds list of values to the fixed precision"
-const regNumericValues=/^([-+]?\d*\.?\d+([eE][-+]?\d+)?)(px|pt|pc|mm|cm|m|in|ft|em|ex|%)?$/
-const regSeparator=/\s+,?\s*|,\s*/
-const absoluteLengths={cm:96/2.54,mm:96/25.4,in:96,pt:4/3,pc:16,px:1}
-const fn$e=(_root,params)=>{const{floatPrecision:floatPrecision=3,leadingZero:leadingZero=true,defaultPx:defaultPx=true,convertToPx:convertToPx=true}=params
-const roundValues=lists=>{const roundedList=[]
-for(const elem of lists.split(regSeparator)){const match=elem.match(regNumericValues)
-const matchNew=elem.match(/new/)
-if(match){let num=Number(Number(match[1]).toFixed(floatPrecision))
-let matchedUnit=match[3]||""
-let units=matchedUnit
-if(convertToPx&&units&&units in absoluteLengths){const pxNum=Number((absoluteLengths[units]*Number(match[1])).toFixed(floatPrecision))
-if(pxNum.toString().length<match[0].length){num=pxNum
-units="px"}}let str
-str=leadingZero?removeLeadingZero(num):num.toString()
-defaultPx&&units==="px"&&(units="")
-roundedList.push(str+units)}else matchNew?roundedList.push("new"):elem&&roundedList.push(elem)}return roundedList.join(" ")}
-return{element:{enter:node=>{node.attributes.points!=null&&(node.attributes.points=roundValues(node.attributes.points))
-node.attributes["enable-background"]!=null&&(node.attributes["enable-background"]=roundValues(node.attributes["enable-background"]))
-node.attributes.viewBox!=null&&(node.attributes.viewBox=roundValues(node.attributes.viewBox))
-node.attributes["stroke-dasharray"]!=null&&(node.attributes["stroke-dasharray"]=roundValues(node.attributes["stroke-dasharray"]))
-node.attributes.dx!=null&&(node.attributes.dx=roundValues(node.attributes.dx))
-node.attributes.dy!=null&&(node.attributes.dy=roundValues(node.attributes.dy))
-node.attributes.x!=null&&(node.attributes.x=roundValues(node.attributes.x))
-node.attributes.y!=null&&(node.attributes.y=roundValues(node.attributes.y))}}}}
-var cleanupListOfValues=Object.freeze({__proto__:null,description:description$e,fn:fn$e,name:name$e})
-const name$d="convertOneStopGradients"
-const description$d="converts one-stop (single color) gradients to a plain color"
-const fn$d=root=>{const stylesheet=collectStylesheet(root)
-const effectedDefs=new Set
-const allDefs=new Map
-const gradientsToDetach=new Map
-let xlinkHrefCount=0
-return{element:{enter:(node,parentNode)=>{node.attributes["xlink:href"]!=null&&xlinkHrefCount++
-if(node.name==="defs"){allDefs.set(node,parentNode)
-return}if(node.name!=="linearGradient"&&node.name!=="radialGradient")return
-const stops=node.children.filter((child=>child.type==="element"&&child.name==="stop"))
-const href=node.attributes["xlink:href"]||node.attributes["href"]
-let effectiveNode=stops.length===0&&href!=null&&href.startsWith("#")?querySelector(root,href):node
-if(effectiveNode==null||effectiveNode.type!=="element"){gradientsToDetach.set(node,parentNode)
-return}const effectiveStops=effectiveNode.children.filter((child=>child.type==="element"&&child.name==="stop"))
-if(effectiveStops.length!==1||effectiveStops[0].type!=="element")return
-parentNode.type==="element"&&parentNode.name==="defs"&&effectedDefs.add(parentNode)
-gradientsToDetach.set(node,parentNode)
-let color
-const style=computeStyle(stylesheet,effectiveStops[0])["stop-color"]
-style!=null&&style.type==="static"&&(color=style.value)
-const selectorVal=`url(#${node.attributes.id})`
-const selector=[...colorsProps].map((attr=>`[${attr}="${selectorVal}"]`)).join(",")
-const elements=querySelectorAll(root,selector)
-for(const element of elements){if(element.type!=="element")continue
-for(const attr of colorsProps){if(element.attributes[attr]!==selectorVal)continue
-color!=null?element.attributes[attr]=color:delete element.attributes[attr]}}const styledElements=querySelectorAll(root,`[style*=${selectorVal}]`)
-for(const element of styledElements){if(element.type!=="element")continue
-element.attributes.style=element.attributes.style.replace(selectorVal,color||attrsGroupsDefaults.presentation["stop-color"])}},exit:node=>{if(node.name==="svg"){for(const[gradient,parent]of gradientsToDetach.entries()){gradient.attributes["xlink:href"]!=null&&xlinkHrefCount--
-detachNodeFromParent(gradient,parent)}xlinkHrefCount===0&&delete node.attributes["xmlns:xlink"]
-for(const[defs,parent]of allDefs.entries())effectedDefs.has(defs)&&defs.children.length===0&&detachNodeFromParent(defs,parent)}}}}}
-var convertOneStopGradients=Object.freeze({__proto__:null,description:description$d,fn:fn$d,name:name$d})
-const name$c="convertStyleToAttrs"
-const description$c="converts style to attributes"
-const g=(...args)=>"(?:"+args.join("|")+")"
-const stylingProps=attrsGroups.presentation
-const rEscape="\\\\(?:[0-9a-f]{1,6}\\s?|\\r\\n|.)"
-const rAttr="\\s*("+g("[^:;\\\\]",rEscape)+"*?)\\s*"
-const rSingleQuotes="'(?:[^'\\n\\r\\\\]|"+rEscape+")*?(?:'|$)"
-const rQuotes='"(?:[^"\\n\\r\\\\]|'+rEscape+')*?(?:"|$)'
-const rQuotedString=new RegExp("^"+g(rSingleQuotes,rQuotes)+"$")
-const rParenthesis="\\("+g("[^'\"()\\\\]+",rEscape,rSingleQuotes,rQuotes)+"*?\\)"
-const rValue="\\s*("+g("[^!'\"();\\\\]+?",rEscape,rSingleQuotes,rQuotes,rParenthesis,"[^;]*?")+"*?)"
-const rDeclEnd="\\s*(?:;\\s*|$)"
-const rImportant="(\\s*!important(?![-(\\w]))?"
-const regDeclarationBlock=new RegExp(rAttr+":"+rValue+rImportant+rDeclEnd,"ig")
-const regStripComments=new RegExp(g(rEscape,rSingleQuotes,rQuotes,"/\\*[^]*?\\*/"),"ig")
-const fn$c=(_root,params)=>{const{keepImportant:keepImportant=false}=params
-return{element:{enter:node=>{if(node.attributes.style!=null){let styles=[]
-const newAttributes={}
-const styleValue=node.attributes.style.replace(regStripComments,(match=>match[0]=="/"?"":match[0]=="\\"&&/[-g-z]/i.test(match[1])?match[1]:match))
-regDeclarationBlock.lastIndex=0
-for(var rule;rule=regDeclarationBlock.exec(styleValue);)keepImportant&&rule[3]||styles.push([rule[1],rule[2]])
-if(styles.length){styles=styles.filter((function(style){if(style[0]){var prop=style[0].toLowerCase(),val=style[1]
-rQuotedString.test(val)&&(val=val.slice(1,-1))
-if(stylingProps.has(prop)){newAttributes[prop]=val
-return false}}return true}))
-Object.assign(node.attributes,newAttributes)
-styles.length?node.attributes.style=styles.map((declaration=>declaration.join(":"))).join(";"):delete node.attributes.style}}}}}}
-var convertStyleToAttrs=Object.freeze({__proto__:null,description:description$c,fn:fn$c,name:name$c})
-const name$b="prefixIds"
-const description$b="prefix IDs"
-const getBasename=path=>{const matched=/[/\\]?([^/\\]+)$/.exec(path)
-if(matched)return matched[1]
-return""}
-const escapeIdentifierName=str=>str.replace(/[. ]/g,"_")
-const unquote=string=>{if(string.startsWith('"')&&string.endsWith('"')||string.startsWith("'")&&string.endsWith("'"))return string.slice(1,-1)
-return string}
-const prefixId=(prefixGenerator,body)=>{const prefix=prefixGenerator(body)
-if(body.startsWith(prefix))return body
-return prefix+body}
-const prefixReference=(prefixGenerator,reference)=>{if(reference.startsWith("#"))return"#"+prefixId(prefixGenerator,reference.slice(1))
-return null}
-const generatePrefix=(body,node,info,prefixGenerator,delim,history)=>{if(typeof prefixGenerator==="function"){let prefix=history.get(body)
-if(prefix!=null)return prefix
-prefix=prefixGenerator(node,info)+delim
-history.set(body,prefix)
-return prefix}if(typeof prefixGenerator==="string")return prefixGenerator+delim
-if(prefixGenerator===false)return""
-if(info.path!=null&&info.path.length>0)return escapeIdentifierName(getBasename(info.path))+delim
-return"prefix"+delim}
-const fn$b=(_root,params,info)=>{const{delim:delim="__",prefix:prefix,prefixIds:prefixIds=true,prefixClassNames:prefixClassNames=true}=params
-const prefixMap=new Map
-return{element:{enter:node=>{const prefixGenerator=id=>generatePrefix(id,node,info,prefix,delim,prefixMap)
-if(node.name==="style"){if(node.children.length===0)return
-for(const child of node.children){if(child.type!=="text"&&child.type!=="cdata")continue
-const cssText=child.value
-let cssAst=null
-try{cssAst=csstree__namespace.parse(cssText,{parseValue:true,parseCustomProperty:false})}catch{return}csstree__namespace.walk(cssAst,(node=>{if(prefixIds&&node.type==="IdSelector"||prefixClassNames&&node.type==="ClassSelector"){node.name=prefixId(prefixGenerator,node.name)
-return}if(node.type==="Url"&&node.value.length>0){const prefixed=prefixReference(prefixGenerator,unquote(node.value))
-prefixed!=null&&(node.value=prefixed)}}))
-child.value=csstree__namespace.generate(cssAst)}}prefixIds&&node.attributes.id!=null&&node.attributes.id.length!==0&&(node.attributes.id=prefixId(prefixGenerator,node.attributes.id))
-prefixClassNames&&node.attributes.class!=null&&node.attributes.class.length!==0&&(node.attributes.class=node.attributes.class.split(/\s+/).map((name=>prefixId(prefixGenerator,name))).join(" "))
-for(const name of["href","xlink:href"])if(node.attributes[name]!=null&&node.attributes[name].length!==0){const prefixed=prefixReference(prefixGenerator,node.attributes[name])
-prefixed!=null&&(node.attributes[name]=prefixed)}for(const name of referencesProps)node.attributes[name]!=null&&node.attributes[name].length!==0&&(node.attributes[name]=node.attributes[name].replace(/\burl\((["'])?(#.+?)\1\)/gi,((match,_,url)=>{const prefixed=prefixReference(prefixGenerator,url)
-if(prefixed==null)return match
-return`url(${prefixed})`})))
-for(const name of["begin","end"])if(node.attributes[name]!=null&&node.attributes[name].length!==0){const parts=node.attributes[name].split(/\s*;\s+/).map((val=>{if(val.endsWith(".end")||val.endsWith(".start")){const[id,postfix]=val.split(".")
-return`${prefixId(prefixGenerator,id)}.${postfix}`}return val}))
-node.attributes[name]=parts.join("; ")}}}}}
-var prefixIds=Object.freeze({__proto__:null,description:description$b,fn:fn$b,name:name$b})
-const name$a="removeAttributesBySelector"
-const description$a="removes attributes of elements that match a css selector"
-const fn$a=(root,params)=>{const selectors=Array.isArray(params.selectors)?params.selectors:[params]
-for(const{selector:selector,attributes:attributes}of selectors){const nodes=querySelectorAll(root,selector)
-for(const node of nodes)if(node.type==="element")if(Array.isArray(attributes))for(const name of attributes)delete node.attributes[name]
-else delete node.attributes[attributes]}return{}}
-var removeAttributesBySelector=Object.freeze({__proto__:null,description:description$a,fn:fn$a,name:name$a})
-const name$9="removeAttrs"
-const description$9="removes specified attributes"
-const DEFAULT_SEPARATOR=":"
-const ENOATTRS='Warning: The plugin "removeAttrs" requires the "attrs" parameter.\nIt should have a pattern to remove, otherwise the plugin is a noop.\nConfig example:\n\nplugins: [\n {\n name: "removeAttrs",\n params: {\n attrs: "(fill|stroke)"\n }\n }\n]\n'
-const fn$9=(root,params)=>{if(typeof params.attrs=="undefined"){console.warn(ENOATTRS)
-return null}const elemSeparator=typeof params.elemSeparator=="string"?params.elemSeparator:DEFAULT_SEPARATOR
-const preserveCurrentColor=typeof params.preserveCurrentColor=="boolean"&&params.preserveCurrentColor
-const attrs=Array.isArray(params.attrs)?params.attrs:[params.attrs]
-return{element:{enter:node=>{for(let pattern of attrs){pattern.includes(elemSeparator)?pattern.split(elemSeparator).length<3&&(pattern=[pattern,".*"].join(elemSeparator)):pattern=[".*",pattern,".*"].join(elemSeparator)
-const list=pattern.split(elemSeparator).map((value=>{value==="*"&&(value=".*")
-return new RegExp(["^",value,"$"].join(""),"i")}))
-if(list[0].test(node.name))for(const[name,value]of Object.entries(node.attributes)){const isCurrentColor=value.toLowerCase()==="currentcolor"
-const isFillCurrentColor=preserveCurrentColor&&name=="fill"&&isCurrentColor
-const isStrokeCurrentColor=preserveCurrentColor&&name=="stroke"&&isCurrentColor
-!isFillCurrentColor&&!isStrokeCurrentColor&&list[1].test(name)&&list[2].test(value)&&delete node.attributes[name]}}}}}}
-var removeAttrs=Object.freeze({__proto__:null,description:description$9,fn:fn$9,name:name$9})
-const name$8="removeDimensions"
-const description$8="removes width and height in presence of viewBox (opposite to removeViewBox, disable it first)"
-const fn$8=()=>({element:{enter:node=>{if(node.name==="svg")if(node.attributes.viewBox!=null){delete node.attributes.width
-delete node.attributes.height}else if(node.attributes.width!=null&&node.attributes.height!=null&&Number.isNaN(Number(node.attributes.width))===false&&Number.isNaN(Number(node.attributes.height))===false){const width=Number(node.attributes.width)
-const height=Number(node.attributes.height)
-node.attributes.viewBox=`0 0 ${width} ${height}`
-delete node.attributes.width
-delete node.attributes.height}}}})
-var removeDimensions=Object.freeze({__proto__:null,description:description$8,fn:fn$8,name:name$8})
-const name$7="removeElementsByAttr"
-const description$7="removes arbitrary elements by ID or className (disabled by default)"
-const fn$7=(root,params)=>{const ids=params.id==null?[]:Array.isArray(params.id)?params.id:[params.id]
-const classes=params.class==null?[]:Array.isArray(params.class)?params.class:[params.class]
-return{element:{enter:(node,parentNode)=>{node.attributes.id!=null&&ids.length!==0&&ids.includes(node.attributes.id)&&detachNodeFromParent(node,parentNode)
-if(node.attributes.class&&classes.length!==0){const classList=node.attributes.class.split(" ")
-for(const item of classes)if(classList.includes(item)){detachNodeFromParent(node,parentNode)
-break}}}}}}
-var removeElementsByAttr=Object.freeze({__proto__:null,description:description$7,fn:fn$7,name:name$7})
-const name$6="removeOffCanvasPaths"
-const description$6="removes elements that are drawn outside of the viewbox (disabled by default)"
-const fn$6=()=>{let viewBoxData=null
-return{element:{enter:(node,parentNode)=>{if(node.name==="svg"&&parentNode.type==="root"){let viewBox=""
-node.attributes.viewBox!=null?viewBox=node.attributes.viewBox:node.attributes.height!=null&&node.attributes.width!=null&&(viewBox=`0 0 ${node.attributes.width} ${node.attributes.height}`)
-viewBox=viewBox.replace(/[,+]|px/g," ").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")
-const m=/^(-?\d*\.?\d+) (-?\d*\.?\d+) (\d*\.?\d+) (\d*\.?\d+)$/.exec(viewBox)
-if(m==null)return
-const left=Number.parseFloat(m[1])
-const top=Number.parseFloat(m[2])
-const width=Number.parseFloat(m[3])
-const height=Number.parseFloat(m[4])
-viewBoxData={left:left,top:top,right:left+width,bottom:top+height,width:width,height:height}}if(node.attributes.transform!=null)return visitSkip
-if(node.name==="path"&&node.attributes.d!=null&&viewBoxData!=null){const pathData=parsePathData(node.attributes.d)
-let visible=false
-for(const pathDataItem of pathData)if(pathDataItem.command==="M"){const[x,y]=pathDataItem.args
-x>=viewBoxData.left&&x<=viewBoxData.right&&y>=viewBoxData.top&&y<=viewBoxData.bottom&&(visible=true)}if(visible)return
-pathData.length===2&&pathData.push({command:"z",args:[]})
-const{left:left,top:top,width:width,height:height}=viewBoxData
-const viewBoxPathData=[{command:"M",args:[left,top]},{command:"h",args:[width]},{command:"v",args:[height]},{command:"H",args:[left]},{command:"z",args:[]}]
-intersects(viewBoxPathData,pathData)===false&&detachNodeFromParent(node,parentNode)}}}}}
-var removeOffCanvasPaths=Object.freeze({__proto__:null,description:description$6,fn:fn$6,name:name$6})
-const name$5="removeRasterImages"
-const description$5="removes raster images (disabled by default)"
-const fn$5=()=>({element:{enter:(node,parentNode)=>{node.name==="image"&&node.attributes["xlink:href"]!=null&&/(\.|image\/)(jpe?g|png|gif)/.test(node.attributes["xlink:href"])&&detachNodeFromParent(node,parentNode)}}})
-var removeRasterImages=Object.freeze({__proto__:null,description:description$5,fn:fn$5,name:name$5})
-const name$4="removeScriptElement"
-const description$4="removes scripts (disabled by default)"
-const eventAttrs=[...attrsGroups.animationEvent,...attrsGroups.documentEvent,...attrsGroups.documentElementEvent,...attrsGroups.globalEvent,...attrsGroups.graphicalEvent]
-const fn$4=()=>({element:{enter:(node,parentNode)=>{if(node.name==="script"){detachNodeFromParent(node,parentNode)
-return}for(const attr of eventAttrs)node.attributes[attr]!=null&&delete node.attributes[attr]},exit:(node,parentNode)=>{if(node.name!=="a")return
-for(const attr of Object.keys(node.attributes))if(attr==="href"||attr.endsWith(":href")){if(node.attributes[attr]==null||!node.attributes[attr].trimStart().startsWith("javascript:"))continue
-const index=parentNode.children.indexOf(node)
-const usefulChildren=node.children.filter((child=>!(child.type==="text"&&/\s*/.test(child.value))))
-parentNode.children.splice(index,1,...usefulChildren)
-for(const child of node.children)Object.defineProperty(child,"parentNode",{writable:true,value:parentNode})}}}})
-var removeScriptElement=Object.freeze({__proto__:null,description:description$4,fn:fn$4,name:name$4})
-const name$3="removeStyleElement"
-const description$3="removes <style> element (disabled by default)"
-const fn$3=()=>({element:{enter:(node,parentNode)=>{node.name==="style"&&detachNodeFromParent(node,parentNode)}}})
-var removeStyleElement=Object.freeze({__proto__:null,description:description$3,fn:fn$3,name:name$3})
-const name$2="removeXlink"
-const description$2="remove xlink namespace and replaces attributes with the SVG 2 equivalent where applicable"
-const XLINK_NAMESPACE="http://www.w3.org/1999/xlink"
-const SHOW_TO_TARGET={new:"_blank",replace:"_self"}
-const LEGACY_ELEMENTS=new Set(["cursor","filter","font-face-uri","glyphRef","tref"])
-const findPrefixedAttrs=(node,prefixes,attr)=>prefixes.map((prefix=>`${prefix}:${attr}`)).filter((attr=>node.attributes[attr]!=null))
-const fn$2=(_,params)=>{const{includeLegacy:includeLegacy}=params
-const xlinkPrefixes=[]
-const overriddenPrefixes=[]
-const usedInLegacyElement=[]
-return{element:{enter:node=>{for(const[key,value]of Object.entries(node.attributes))if(key.startsWith("xmlns:")){const prefix=key.split(":",2)[1]
-if(value===XLINK_NAMESPACE){xlinkPrefixes.push(prefix)
-continue}xlinkPrefixes.includes(prefix)&&overriddenPrefixes.push(prefix)}if(overriddenPrefixes.some((prefix=>xlinkPrefixes.includes(prefix))))return
-const showAttrs=findPrefixedAttrs(node,xlinkPrefixes,"show")
-let showHandled=node.attributes.target!=null
-for(let i=showAttrs.length-1;i>=0;i--){const attr=showAttrs[i]
-const value=node.attributes[attr]
-const mapping=SHOW_TO_TARGET[value]
-if(showHandled||mapping==null){delete node.attributes[attr]
-continue}mapping!==elems[node.name]?.defaults?.target&&(node.attributes.target=mapping)
-delete node.attributes[attr]
-showHandled=true}const titleAttrs=findPrefixedAttrs(node,xlinkPrefixes,"title")
-for(let i=titleAttrs.length-1;i>=0;i--){const attr=titleAttrs[i]
-const value=node.attributes[attr]
-const hasTitle=node.children.filter((child=>child.type==="element"&&child.name==="title"))
-if(hasTitle.length>0){delete node.attributes[attr]
-continue}const titleTag={type:"element",name:"title",attributes:{},children:[{type:"text",value:value}]}
-Object.defineProperty(titleTag,"parentNode",{writable:true,value:node})
-node.children.unshift(titleTag)
-delete node.attributes[attr]}const hrefAttrs=findPrefixedAttrs(node,xlinkPrefixes,"href")
-if(hrefAttrs.length>0&&LEGACY_ELEMENTS.has(node.name)&&!includeLegacy){hrefAttrs.map((attr=>attr.split(":",1)[0])).forEach((prefix=>usedInLegacyElement.push(prefix)))
-return}for(let i=hrefAttrs.length-1;i>=0;i--){const attr=hrefAttrs[i]
-const value=node.attributes[attr]
-if(node.attributes.href!=null){delete node.attributes[attr]
-continue}node.attributes.href=value
-delete node.attributes[attr]}},exit:node=>{for(const[key,value]of Object.entries(node.attributes)){const[prefix,attr]=key.split(":",2)
-if(xlinkPrefixes.includes(prefix)&&!overriddenPrefixes.includes(prefix)&&!usedInLegacyElement.includes(prefix)&&!includeLegacy){delete node.attributes[key]
-continue}if(key.startsWith("xmlns:")&&!usedInLegacyElement.includes(attr)){if(value===XLINK_NAMESPACE){const index=xlinkPrefixes.indexOf(attr)
-xlinkPrefixes.splice(index,1)
-delete node.attributes[key]
-continue}if(overriddenPrefixes.includes(prefix)){const index=overriddenPrefixes.indexOf(attr)
-overriddenPrefixes.splice(index,1)}}}}}}}
-var removeXlink=Object.freeze({__proto__:null,description:description$2,fn:fn$2,name:name$2})
-const name$1="removeXMLNS"
-const description$1="removes xmlns attribute (for inline svg, disabled by default)"
-const fn$1=()=>({element:{enter:node=>{node.name==="svg"&&delete node.attributes.xmlns}}})
-var removeXMLNS=Object.freeze({__proto__:null,description:description$1,fn:fn$1,name:name$1})
-const name="reusePaths"
-const description="Finds <path> elements with the same d, fill, and stroke, and converts them to <use> elements referencing a single <path> def."
-const fn=root=>{const stylesheet=collectStylesheet(root)
-const paths=new Map
-let svgDefs
-const hrefs=new Set
-return{element:{enter:(node,parentNode)=>{if(node.name==="path"&&node.attributes.d!=null){const d=node.attributes.d
-const fill=node.attributes.fill||""
-const stroke=node.attributes.stroke||""
-const key=d+";s:"+stroke+";f:"+fill
-let list=paths.get(key)
-if(list==null){list=[]
-paths.set(key,list)}list.push(node)}svgDefs==null&&node.name==="defs"&&parentNode.type==="element"&&parentNode.name==="svg"&&(svgDefs=node)
-if(node.name==="use")for(const name of["href","xlink:href"]){const href=node.attributes[name]
-href!=null&&href.startsWith("#")&&href.length>1&&hrefs.add(href.slice(1))}},exit:(node,parentNode)=>{if(node.name==="svg"&&parentNode.type==="root"){let defsTag=svgDefs
-if(defsTag==null){defsTag={type:"element",name:"defs",attributes:{},children:[]}
-Object.defineProperty(defsTag,"parentNode",{writable:true,value:node})}let index=0
-for(const list of paths.values())if(list.length>1){const reusablePath={type:"element",name:"path",attributes:{},children:[]}
-for(const attr of["fill","stroke","d"])list[0].attributes[attr]!=null&&(reusablePath.attributes[attr]=list[0].attributes[attr])
-const originalId=list[0].attributes.id
-if(originalId==null||hrefs.has(originalId)||stylesheet.rules.some((rule=>rule.selector===`#${originalId}`)))reusablePath.attributes.id="reuse-"+index++
-else{reusablePath.attributes.id=originalId
-delete list[0].attributes.id}Object.defineProperty(reusablePath,"parentNode",{writable:true,value:defsTag})
-defsTag.children.push(reusablePath)
-for(const pathNode of list){delete pathNode.attributes.d
-delete pathNode.attributes.stroke
-delete pathNode.attributes.fill
-if(defsTag.children.includes(pathNode)&&pathNode.children.length===0){if(Object.keys(pathNode.attributes).length===0){detachNodeFromParent(pathNode,defsTag)
-continue}if(Object.keys(pathNode.attributes).length===1&&pathNode.attributes.id!=null){detachNodeFromParent(pathNode,defsTag)
-const selector=`[xlink\\:href=#${pathNode.attributes.id}], [href=#${pathNode.attributes.id}]`
-for(const child of querySelectorAll(node,selector)){if(child.type!=="element")continue
-for(const name of["href","xlink:href"])child.attributes[name]!=null&&(child.attributes[name]="#"+reusablePath.attributes.id)}continue}}pathNode.name="use"
-pathNode.attributes["xlink:href"]="#"+reusablePath.attributes.id}}if(defsTag.children.length!==0){node.attributes["xmlns:xlink"]==null&&(node.attributes["xmlns:xlink"]="http://www.w3.org/1999/xlink")
-svgDefs==null&&node.children.unshift(defsTag)}}}}}}
-var reusePaths=Object.freeze({__proto__:null,description:description,fn:fn,name:name})
-const builtin=[presetDefault,addAttributesToSVGElement,addClassesToSVGElement,cleanupAttrs,cleanupEnableBackground,cleanupIds,cleanupListOfValues,cleanupNumericValues,collapseGroups,convertColors,convertEllipseToCircle,convertOneStopGradients,convertPathData,convertShapeToPath,convertStyleToAttrs,convertTransform$1,mergeStyles,inlineStyles,mergePaths,minifyStyles,moveElemsAttrsToGroup,moveGroupAttrsToElems,prefixIds,removeAttributesBySelector,removeAttrs,removeComments,removeDeprecatedAttrs,removeDesc,removeDimensions,removeDoctype,removeEditorsNSData,removeElementsByAttr,removeEmptyAttrs,removeEmptyContainers,removeEmptyText,removeHiddenElems,removeMetadata,removeNonInheritableGroupAttrs,removeOffCanvasPaths,removeRasterImages,removeScriptElement,removeStyleElement,removeTitle,removeUnknownsAndDefaults,removeUnusedNS,removeUselessDefs,removeUselessStrokeAndFill,removeViewBox,removeXlink,removeXMLNS,removeXMLProcInst,reusePaths,sortAttrs,sortDefsChildren]
-const pluginsMap={}
-for(const plugin of builtin)pluginsMap[plugin.name]=plugin
-const resolvePluginConfig=plugin=>{if(typeof plugin==="string"){const builtinPlugin=pluginsMap[plugin]
-if(builtinPlugin==null)throw Error(`Unknown builtin plugin "${plugin}" specified.`)
-return{name:plugin,params:{},fn:builtinPlugin.fn}}if(typeof plugin==="object"&&plugin!=null){if(plugin.name==null)throw Error("Plugin name should be specified")
-let fn=plugin.fn
-if(fn==null){const builtinPlugin=pluginsMap[plugin.name]
-if(builtinPlugin==null)throw Error(`Unknown builtin plugin "${plugin.name}" specified.`)
-fn=builtinPlugin.fn}return{name:plugin.name,params:plugin.params,fn:fn}}return null}
-const optimize$1=(input,config)=>{config==null&&(config={})
-if(typeof config!=="object")throw Error("Config should be an object")
-const maxPassCount=config.multipass?10:1
-let prevResultSize=Number.POSITIVE_INFINITY
-let output=""
-const info={}
-config.path!=null&&(info.path=config.path)
-for(let i=0;i<maxPassCount;i+=1){info.multipassCount=i
-const ast=parseSvg(input,config.path)
-const plugins=config.plugins||["preset-default"]
-if(!Array.isArray(plugins))throw Error("malformed config, `plugins` property must be an array.\nSee more info here: https://github.com/svg/svgo#configuration")
-const resolvedPlugins=plugins.filter((plugin=>plugin!=null)).map(resolvePluginConfig)
-resolvedPlugins.length<plugins.length&&console.warn("Warning: plugins list includes null or undefined elements, these will be ignored.")
-const globalOverrides={}
-config.floatPrecision!=null&&(globalOverrides.floatPrecision=config.floatPrecision)
-invokePlugins(ast,info,resolvedPlugins,null,globalOverrides)
-output=stringifySvg(ast,config.js2svg)
-if(!(output.length<prevResultSize))break
-input=output
-prevResultSize=output.length}config.datauri&&(output=encodeSVGDatauri(output,config.datauri))
-return{data:output}}
-const importConfig=async configFile=>{const imported=await import(url.pathToFileURL(configFile))
-const config=imported.default
-if(config==null||typeof config!=="object"||Array.isArray(config))throw Error(`Invalid config file "${configFile}"`)
-return config}
-const isFile=async file=>{try{const stats=await fs.promises.stat(file)
-return stats.isFile()}catch{return false}}
-const loadConfig=async(configFile,cwd=process.cwd())=>{if(configFile!=null)return path.isAbsolute(configFile)?await importConfig(configFile):await importConfig(path.join(cwd,configFile))
-let dir=cwd
-while(true){const js=path.join(dir,"svgo.config.js")
-if(await isFile(js))return await importConfig(js)
-const mjs=path.join(dir,"svgo.config.mjs")
-if(await isFile(mjs))return await importConfig(mjs)
-const cjs=path.join(dir,"svgo.config.cjs")
-if(await isFile(cjs))return await importConfig(cjs)
-const parent=path.dirname(dir)
-if(dir===parent)return null
-dir=parent}}
-const optimize=(input,config)=>{config==null&&(config={})
-if(typeof config!=="object")throw Error("Config should be an object")
-return optimize$1(input,{...config,js2svg:{eol:os.EOL==="\r\n"?"crlf":"lf",...config.js2svg}})}
-exports.loadConfig=loadConfig
-exports.optimize=optimize
diff --git a/node_modules/svgo/dist/svgo.browser.js b/node_modules/svgo/dist/svgo.browser.js
deleted file mode 100644
index f16060ab..00000000
--- a/node_modules/svgo/dist/svgo.browser.js
+++ /dev/null
@@ -1 +0,0 @@
-var commonjsGlobal=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function getAugmentedNamespace(n){var f=n.default;if(typeof f=="function"){var a=function(){return f.apply(this,arguments)};a.prototype=f.prototype}else a={};Object.defineProperty(a,"__esModule",{value:true});Object.keys(n).forEach((function(k){var d=Object.getOwnPropertyDescriptor(n,k);Object.defineProperty(a,k,d.get?d:{enumerable:true,get:function(){return n[k]}})}));return a}var svgo={};var parser$4={};var sax={};(function(exports){(function(sax){sax.parser=function(strict,opt){return new SAXParser(strict,opt)};sax.SAXParser=SAXParser;sax.MAX_BUFFER_LENGTH=64*1024;var buffers=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];sax.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function SAXParser(strict,opt){if(!(this instanceof SAXParser)){return new SAXParser(strict,opt)}var parser=this;clearBuffers(parser);parser.q=parser.c="";parser.bufferCheckPosition=sax.MAX_BUFFER_LENGTH;parser.opt=opt||{};parser.opt.lowercase=parser.opt.lowercase||parser.opt.lowercasetags;parser.looseCase=parser.opt.lowercase?"toLowerCase":"toUpperCase";parser.tags=[];parser.closed=parser.closedRoot=parser.sawRoot=false;parser.tag=parser.error=null;parser.strict=!!strict;parser.noscript=!!(strict||parser.opt.noscript);parser.state=S.BEGIN;parser.strictEntities=parser.opt.strictEntities;parser.ENTITIES=parser.strictEntities?Object.create(sax.XML_ENTITIES):Object.create(sax.ENTITIES);parser.attribList=[];if(parser.opt.xmlns){parser.ns=Object.create(rootNS)}parser.trackPosition=parser.opt.position!==false;if(parser.trackPosition){parser.position=parser.line=parser.column=0}emit(parser,"onready")}if(!Object.create){Object.create=function(o){function F(){}F.prototype=o;var newf=new F;return newf}}if(!Object.keys){Object.keys=function(o){var a=[];for(var i in o)if(o.hasOwnProperty(i))a.push(i);return a}}function checkBufferLength(parser){var maxAllowed=Math.max(sax.MAX_BUFFER_LENGTH,10);var maxActual=0;for(var i=0,l=buffers.length;i<l;i++){var len=parser[buffers[i]].length;if(len>maxAllowed){switch(buffers[i]){case"textNode":closeText(parser);break;case"cdata":emitNode(parser,"oncdata",parser.cdata);parser.cdata="";break;case"script":emitNode(parser,"onscript",parser.script);parser.script="";break;default:error(parser,"Max buffer length exceeded: "+buffers[i])}}maxActual=Math.max(maxActual,len)}var m=sax.MAX_BUFFER_LENGTH-maxActual;parser.bufferCheckPosition=m+parser.position}function clearBuffers(parser){for(var i=0,l=buffers.length;i<l;i++){parser[buffers[i]]=""}}function flushBuffers(parser){closeText(parser);if(parser.cdata!==""){emitNode(parser,"oncdata",parser.cdata);parser.cdata=""}if(parser.script!==""){emitNode(parser,"onscript",parser.script);parser.script=""}}SAXParser.prototype={end:function(){end(this)},write:write,resume:function(){this.error=null;return this},close:function(){return this.write(null)},flush:function(){flushBuffers(this)}};var CDATA="[CDATA[";var DOCTYPE="DOCTYPE";var XML_NAMESPACE="http://www.w3.org/XML/1998/namespace";var XMLNS_NAMESPACE="http://www.w3.org/2000/xmlns/";var rootNS={xml:XML_NAMESPACE,xmlns:XMLNS_NAMESPACE};var nameStart=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;var nameBody=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;var entityStart=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;var entityBody=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function isWhitespace(c){return c===" "||c==="\n"||c==="\r"||c==="\t"}function isQuote(c){return c==='"'||c==="'"}function isAttribEnd(c){return c===">"||isWhitespace(c)}function isMatch(regex,c){return regex.test(c)}function notMatch(regex,c){return!isMatch(regex,c)}var S=0;sax.STATE={BEGIN:S++,BEGIN_WHITESPACE:S++,TEXT:S++,TEXT_ENTITY:S++,OPEN_WAKA:S++,SGML_DECL:S++,SGML_DECL_QUOTED:S++,DOCTYPE:S++,DOCTYPE_QUOTED:S++,DOCTYPE_DTD:S++,DOCTYPE_DTD_QUOTED:S++,COMMENT_STARTING:S++,COMMENT:S++,COMMENT_ENDING:S++,COMMENT_ENDED:S++,CDATA:S++,CDATA_ENDING:S++,CDATA_ENDING_2:S++,PROC_INST:S++,PROC_INST_BODY:S++,PROC_INST_ENDING:S++,OPEN_TAG:S++,OPEN_TAG_SLASH:S++,ATTRIB:S++,ATTRIB_NAME:S++,ATTRIB_NAME_SAW_WHITE:S++,ATTRIB_VALUE:S++,ATTRIB_VALUE_QUOTED:S++,ATTRIB_VALUE_CLOSED:S++,ATTRIB_VALUE_UNQUOTED:S++,ATTRIB_VALUE_ENTITY_Q:S++,ATTRIB_VALUE_ENTITY_U:S++,CLOSE_TAG:S++,CLOSE_TAG_SAW_WHITE:S++,SCRIPT:S++,SCRIPT_ENDING:S++};sax.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"};sax.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830};Object.keys(sax.ENTITIES).forEach((function(key){var e=sax.ENTITIES[key];var s=typeof e==="number"?String.fromCharCode(e):e;sax.ENTITIES[key]=s}));for(var s in sax.STATE){sax.STATE[sax.STATE[s]]=s}S=sax.STATE;function emit(parser,event,data){parser[event]&&parser[event](data)}function emitNode(parser,nodeType,data){if(parser.textNode)closeText(parser);emit(parser,nodeType,data)}function closeText(parser){parser.textNode=textopts(parser.opt,parser.textNode);if(parser.textNode)emit(parser,"ontext",parser.textNode);parser.textNode=""}function textopts(opt,text){if(opt.trim)text=text.trim();if(opt.normalize)text=text.replace(/\s+/g," ");return text}function error(parser,reason){closeText(parser);const message=reason+"\nLine: "+parser.line+"\nColumn: "+parser.column+"\nChar: "+parser.c;const error=new Error(message);error.reason=reason;error.line=parser.line;error.column=parser.column;parser.error=error;emit(parser,"onerror",error);return parser}function end(parser){if(parser.sawRoot&&!parser.closedRoot)strictFail(parser,"Unclosed root tag");if(parser.state!==S.BEGIN&&parser.state!==S.BEGIN_WHITESPACE&&parser.state!==S.TEXT){error(parser,"Unexpected end")}closeText(parser);parser.c="";parser.closed=true;emit(parser,"onend");SAXParser.call(parser,parser.strict,parser.opt);return parser}function strictFail(parser,message){if(typeof parser!=="object"||!(parser instanceof SAXParser)){throw new Error("bad call to strictFail")}if(parser.strict){error(parser,message)}}function newTag(parser){if(!parser.strict)parser.tagName=parser.tagName[parser.looseCase]();var parent=parser.tags[parser.tags.length-1]||parser;var tag=parser.tag={name:parser.tagName,attributes:{}};if(parser.opt.xmlns){tag.ns=parent.ns}parser.attribList.length=0;emitNode(parser,"onopentagstart",tag)}function qname(name,attribute){var i=name.indexOf(":");var qualName=i<0?["",name]:name.split(":");var prefix=qualName[0];var local=qualName[1];if(attribute&&name==="xmlns"){prefix="xmlns";local=""}return{prefix:prefix,local:local}}function attrib(parser){if(!parser.strict){parser.attribName=parser.attribName[parser.looseCase]()}if(parser.attribList.indexOf(parser.attribName)!==-1||parser.tag.attributes.hasOwnProperty(parser.attribName)){parser.attribName=parser.attribValue="";return}if(parser.opt.xmlns){var qn=qname(parser.attribName,true);var prefix=qn.prefix;var local=qn.local;if(prefix==="xmlns"){if(local==="xml"&&parser.attribValue!==XML_NAMESPACE){strictFail(parser,"xml: prefix must be bound to "+XML_NAMESPACE+"\n"+"Actual: "+parser.attribValue)}else if(local==="xmlns"&&parser.attribValue!==XMLNS_NAMESPACE){strictFail(parser,"xmlns: prefix must be bound to "+XMLNS_NAMESPACE+"\n"+"Actual: "+parser.attribValue)}else{var tag=parser.tag;var parent=parser.tags[parser.tags.length-1]||parser;if(tag.ns===parent.ns){tag.ns=Object.create(parent.ns)}tag.ns[local]=parser.attribValue}}parser.attribList.push([parser.attribName,parser.attribValue])}else{parser.tag.attributes[parser.attribName]=parser.attribValue;emitNode(parser,"onattribute",{name:parser.attribName,value:parser.attribValue})}parser.attribName=parser.attribValue=""}function openTag(parser,selfClosing){if(parser.opt.xmlns){var tag=parser.tag;var qn=qname(parser.tagName);tag.prefix=qn.prefix;tag.local=qn.local;tag.uri=tag.ns[qn.prefix]||"";if(tag.prefix&&!tag.uri){strictFail(parser,"Unbound namespace prefix: "+JSON.stringify(parser.tagName));tag.uri=qn.prefix}var parent=parser.tags[parser.tags.length-1]||parser;if(tag.ns&&parent.ns!==tag.ns){Object.keys(tag.ns).forEach((function(p){emitNode(parser,"onopennamespace",{prefix:p,uri:tag.ns[p]})}))}for(var i=0,l=parser.attribList.length;i<l;i++){var nv=parser.attribList[i];var name=nv[0];var value=nv[1];var qualName=qname(name,true);var prefix=qualName.prefix;var local=qualName.local;var uri=prefix===""?"":tag.ns[prefix]||"";var a={name:name,value:value,prefix:prefix,local:local,uri:uri};if(prefix&&prefix!=="xmlns"&&!uri){strictFail(parser,"Unbound namespace prefix: "+JSON.stringify(prefix));a.uri=prefix}parser.tag.attributes[name]=a;emitNode(parser,"onattribute",a)}parser.attribList.length=0}parser.tag.isSelfClosing=!!selfClosing;parser.sawRoot=true;parser.tags.push(parser.tag);emitNode(parser,"onopentag",parser.tag);if(!selfClosing){if(!parser.noscript&&parser.tagName.toLowerCase()==="script"){parser.state=S.SCRIPT}else{parser.state=S.TEXT}parser.tag=null;parser.tagName=""}parser.attribName=parser.attribValue="";parser.attribList.length=0}function closeTag(parser){if(!parser.tagName){strictFail(parser,"Weird empty close tag.");parser.textNode+="</>";parser.state=S.TEXT;return}if(parser.script){if(parser.tagName!=="script"){parser.script+="</"+parser.tagName+">";parser.tagName="";parser.state=S.SCRIPT;return}emitNode(parser,"onscript",parser.script);parser.script=""}var t=parser.tags.length;var tagName=parser.tagName;if(!parser.strict){tagName=tagName[parser.looseCase]()}var closeTo=tagName;while(t--){var close=parser.tags[t];if(close.name!==closeTo){strictFail(parser,"Unexpected close tag")}else{break}}if(t<0){strictFail(parser,"Unmatched closing tag: "+parser.tagName);parser.textNode+="</"+parser.tagName+">";parser.state=S.TEXT;return}parser.tagName=tagName;var s=parser.tags.length;while(s-- >t){var tag=parser.tag=parser.tags.pop();parser.tagName=parser.tag.name;emitNode(parser,"onclosetag",parser.tagName);var x={};for(var i in tag.ns){x[i]=tag.ns[i]}var parent=parser.tags[parser.tags.length-1]||parser;if(parser.opt.xmlns&&tag.ns!==parent.ns){Object.keys(tag.ns).forEach((function(p){var n=tag.ns[p];emitNode(parser,"onclosenamespace",{prefix:p,uri:n})}))}}if(t===0)parser.closedRoot=true;parser.tagName=parser.attribValue=parser.attribName="";parser.attribList.length=0;parser.state=S.TEXT}function parseEntity(parser){var entity=parser.entity;var entityLC=entity.toLowerCase();var num;var numStr="";if(parser.ENTITIES[entity]){return parser.ENTITIES[entity]}if(parser.ENTITIES[entityLC]){return parser.ENTITIES[entityLC]}entity=entityLC;if(entity.charAt(0)==="#"){if(entity.charAt(1)==="x"){entity=entity.slice(2);num=parseInt(entity,16);numStr=num.toString(16)}else{entity=entity.slice(1);num=parseInt(entity,10);numStr=num.toString(10)}}entity=entity.replace(/^0+/,"");if(isNaN(num)||numStr.toLowerCase()!==entity){strictFail(parser,"Invalid character entity");return"&"+parser.entity+";"}return String.fromCodePoint(num)}function beginWhiteSpace(parser,c){if(c==="<"){parser.state=S.OPEN_WAKA;parser.startTagPosition=parser.position}else if(!isWhitespace(c)){strictFail(parser,"Non-whitespace before first tag.");parser.textNode=c;parser.state=S.TEXT}}function charAt(chunk,i){var result="";if(i<chunk.length){result=chunk.charAt(i)}return result}function write(chunk){var parser=this;if(this.error){throw this.error}if(parser.closed){return error(parser,"Cannot write after close. Assign an onready handler.")}if(chunk===null){return end(parser)}if(typeof chunk==="object"){chunk=chunk.toString()}var i=0;var c="";while(true){c=charAt(chunk,i++);parser.c=c;if(!c){break}if(parser.trackPosition){parser.position++;if(c==="\n"){parser.line++;parser.column=0}else{parser.column++}}switch(parser.state){case S.BEGIN:parser.state=S.BEGIN_WHITESPACE;if(c==="\ufeff"){continue}beginWhiteSpace(parser,c);continue;case S.BEGIN_WHITESPACE:beginWhiteSpace(parser,c);continue;case S.TEXT:if(parser.sawRoot&&!parser.closedRoot){var starti=i-1;while(c&&c!=="<"&&c!=="&"){c=charAt(chunk,i++);if(c&&parser.trackPosition){parser.position++;if(c==="\n"){parser.line++;parser.column=0}else{parser.column++}}}parser.textNode+=chunk.substring(starti,i-1)}if(c==="<"&&!(parser.sawRoot&&parser.closedRoot&&!parser.strict)){parser.state=S.OPEN_WAKA;parser.startTagPosition=parser.position}else{if(!isWhitespace(c)&&(!parser.sawRoot||parser.closedRoot)){strictFail(parser,"Text data outside of root node.")}if(c==="&"){parser.state=S.TEXT_ENTITY}else{parser.textNode+=c}}continue;case S.SCRIPT:if(c==="<"){parser.state=S.SCRIPT_ENDING}else{parser.script+=c}continue;case S.SCRIPT_ENDING:if(c==="/"){parser.state=S.CLOSE_TAG}else{parser.script+="<"+c;parser.state=S.SCRIPT}continue;case S.OPEN_WAKA:if(c==="!"){parser.state=S.SGML_DECL;parser.sgmlDecl=""}else if(isWhitespace(c));else if(isMatch(nameStart,c)){parser.state=S.OPEN_TAG;parser.tagName=c}else if(c==="/"){parser.state=S.CLOSE_TAG;parser.tagName=""}else if(c==="?"){parser.state=S.PROC_INST;parser.procInstName=parser.procInstBody=""}else{strictFail(parser,"Unencoded <");if(parser.startTagPosition+1<parser.position){var pad=parser.position-parser.startTagPosition;c=new Array(pad).join(" ")+c}parser.textNode+="<"+c;parser.state=S.TEXT}continue;case S.SGML_DECL:if((parser.sgmlDecl+c).toUpperCase()===CDATA){emitNode(parser,"onopencdata");parser.state=S.CDATA;parser.sgmlDecl="";parser.cdata=""}else if(parser.sgmlDecl+c==="--"){parser.state=S.COMMENT;parser.comment="";parser.sgmlDecl=""}else if((parser.sgmlDecl+c).toUpperCase()===DOCTYPE){parser.state=S.DOCTYPE;if(parser.doctype||parser.sawRoot){strictFail(parser,"Inappropriately located doctype declaration")}parser.doctype="";parser.sgmlDecl=""}else if(c===">"){emitNode(parser,"onsgmldeclaration",parser.sgmlDecl);parser.sgmlDecl="";parser.state=S.TEXT}else if(isQuote(c)){parser.state=S.SGML_DECL_QUOTED;parser.sgmlDecl+=c}else{parser.sgmlDecl+=c}continue;case S.SGML_DECL_QUOTED:if(c===parser.q){parser.state=S.SGML_DECL;parser.q=""}parser.sgmlDecl+=c;continue;case S.DOCTYPE:if(c===">"){parser.state=S.TEXT;emitNode(parser,"ondoctype",parser.doctype);parser.doctype=true}else{parser.doctype+=c;if(c==="["){parser.state=S.DOCTYPE_DTD}else if(isQuote(c)){parser.state=S.DOCTYPE_QUOTED;parser.q=c}}continue;case S.DOCTYPE_QUOTED:parser.doctype+=c;if(c===parser.q){parser.q="";parser.state=S.DOCTYPE}continue;case S.DOCTYPE_DTD:parser.doctype+=c;if(c==="]"){parser.state=S.DOCTYPE}else if(isQuote(c)){parser.state=S.DOCTYPE_DTD_QUOTED;parser.q=c}continue;case S.DOCTYPE_DTD_QUOTED:parser.doctype+=c;if(c===parser.q){parser.state=S.DOCTYPE_DTD;parser.q=""}continue;case S.COMMENT:if(c==="-"){parser.state=S.COMMENT_ENDING}else{parser.comment+=c}continue;case S.COMMENT_ENDING:if(c==="-"){parser.state=S.COMMENT_ENDED;parser.comment=textopts(parser.opt,parser.comment);if(parser.comment){emitNode(parser,"oncomment",parser.comment)}parser.comment=""}else{parser.comment+="-"+c;parser.state=S.COMMENT}continue;case S.COMMENT_ENDED:if(c!==">"){strictFail(parser,"Malformed comment");parser.comment+="--"+c;parser.state=S.COMMENT}else{parser.state=S.TEXT}continue;case S.CDATA:if(c==="]"){parser.state=S.CDATA_ENDING}else{parser.cdata+=c}continue;case S.CDATA_ENDING:if(c==="]"){parser.state=S.CDATA_ENDING_2}else{parser.cdata+="]"+c;parser.state=S.CDATA}continue;case S.CDATA_ENDING_2:if(c===">"){if(parser.cdata){emitNode(parser,"oncdata",parser.cdata)}emitNode(parser,"onclosecdata");parser.cdata="";parser.state=S.TEXT}else if(c==="]"){parser.cdata+="]"}else{parser.cdata+="]]"+c;parser.state=S.CDATA}continue;case S.PROC_INST:if(c==="?"){parser.state=S.PROC_INST_ENDING}else if(isWhitespace(c)){parser.state=S.PROC_INST_BODY}else{parser.procInstName+=c}continue;case S.PROC_INST_BODY:if(!parser.procInstBody&&isWhitespace(c)){continue}else if(c==="?"){parser.state=S.PROC_INST_ENDING}else{parser.procInstBody+=c}continue;case S.PROC_INST_ENDING:if(c===">"){emitNode(parser,"onprocessinginstruction",{name:parser.procInstName,body:parser.procInstBody});parser.procInstName=parser.procInstBody="";parser.state=S.TEXT}else{parser.procInstBody+="?"+c;parser.state=S.PROC_INST_BODY}continue;case S.OPEN_TAG:if(isMatch(nameBody,c)){parser.tagName+=c}else{newTag(parser);if(c===">"){openTag(parser)}else if(c==="/"){parser.state=S.OPEN_TAG_SLASH}else{if(!isWhitespace(c)){strictFail(parser,"Invalid character in tag name")}parser.state=S.ATTRIB}}continue;case S.OPEN_TAG_SLASH:if(c===">"){openTag(parser,true);closeTag(parser)}else{strictFail(parser,"Forward-slash in opening tag not followed by >");parser.state=S.ATTRIB}continue;case S.ATTRIB:if(isWhitespace(c)){continue}else if(c===">"){openTag(parser)}else if(c==="/"){parser.state=S.OPEN_TAG_SLASH}else if(isMatch(nameStart,c)){parser.attribName=c;parser.attribValue="";parser.state=S.ATTRIB_NAME}else{strictFail(parser,"Invalid attribute name")}continue;case S.ATTRIB_NAME:if(c==="="){parser.state=S.ATTRIB_VALUE}else if(c===">"){strictFail(parser,"Attribute without value");parser.attribValue=parser.attribName;attrib(parser);openTag(parser)}else if(isWhitespace(c)){parser.state=S.ATTRIB_NAME_SAW_WHITE}else if(isMatch(nameBody,c)){parser.attribName+=c}else{strictFail(parser,"Invalid attribute name")}continue;case S.ATTRIB_NAME_SAW_WHITE:if(c==="="){parser.state=S.ATTRIB_VALUE}else if(isWhitespace(c)){continue}else{strictFail(parser,"Attribute without value");parser.tag.attributes[parser.attribName]="";parser.attribValue="";emitNode(parser,"onattribute",{name:parser.attribName,value:""});parser.attribName="";if(c===">"){openTag(parser)}else if(isMatch(nameStart,c)){parser.attribName=c;parser.state=S.ATTRIB_NAME}else{strictFail(parser,"Invalid attribute name");parser.state=S.ATTRIB}}continue;case S.ATTRIB_VALUE:if(isWhitespace(c)){continue}else if(isQuote(c)){parser.q=c;parser.state=S.ATTRIB_VALUE_QUOTED}else{strictFail(parser,"Unquoted attribute value");parser.state=S.ATTRIB_VALUE_UNQUOTED;parser.attribValue=c}continue;case S.ATTRIB_VALUE_QUOTED:if(c!==parser.q){if(c==="&"){parser.state=S.ATTRIB_VALUE_ENTITY_Q}else{parser.attribValue+=c}continue}attrib(parser);parser.q="";parser.state=S.ATTRIB_VALUE_CLOSED;continue;case S.ATTRIB_VALUE_CLOSED:if(isWhitespace(c)){parser.state=S.ATTRIB}else if(c===">"){openTag(parser)}else if(c==="/"){parser.state=S.OPEN_TAG_SLASH}else if(isMatch(nameStart,c)){strictFail(parser,"No whitespace between attributes");parser.attribName=c;parser.attribValue="";parser.state=S.ATTRIB_NAME}else{strictFail(parser,"Invalid attribute name")}continue;case S.ATTRIB_VALUE_UNQUOTED:if(!isAttribEnd(c)){if(c==="&"){parser.state=S.ATTRIB_VALUE_ENTITY_U}else{parser.attribValue+=c}continue}attrib(parser);if(c===">"){openTag(parser)}else{parser.state=S.ATTRIB}continue;case S.CLOSE_TAG:if(!parser.tagName){if(isWhitespace(c)){continue}else if(notMatch(nameStart,c)){if(parser.script){parser.script+="</"+c;parser.state=S.SCRIPT}else{strictFail(parser,"Invalid tagname in closing tag.")}}else{parser.tagName=c}}else if(c===">"){closeTag(parser)}else if(isMatch(nameBody,c)){parser.tagName+=c}else if(parser.script){parser.script+="</"+parser.tagName;parser.tagName="";parser.state=S.SCRIPT}else{if(!isWhitespace(c)){strictFail(parser,"Invalid tagname in closing tag")}parser.state=S.CLOSE_TAG_SAW_WHITE}continue;case S.CLOSE_TAG_SAW_WHITE:if(isWhitespace(c)){continue}if(c===">"){closeTag(parser)}else{strictFail(parser,"Invalid characters in closing tag")}continue;case S.TEXT_ENTITY:case S.ATTRIB_VALUE_ENTITY_Q:case S.ATTRIB_VALUE_ENTITY_U:var returnState;var buffer;switch(parser.state){case S.TEXT_ENTITY:returnState=S.TEXT;buffer="textNode";break;case S.ATTRIB_VALUE_ENTITY_Q:returnState=S.ATTRIB_VALUE_QUOTED;buffer="attribValue";break;case S.ATTRIB_VALUE_ENTITY_U:returnState=S.ATTRIB_VALUE_UNQUOTED;buffer="attribValue";break}if(c===";"){var parsedEntity=parseEntity(parser);if(parser.state===S.TEXT_ENTITY&&!sax.ENTITIES[parser.entity]&&parsedEntity!=="&"+parser.entity+";"){chunk=chunk.slice(0,i)+parsedEntity+chunk.slice(i)}else{parser[buffer]+=parsedEntity}parser.entity="";parser.state=returnState}else if(isMatch(parser.entity.length?entityBody:entityStart,c)){parser.entity+=c}else{strictFail(parser,"Invalid character in entity name");parser[buffer]+="&"+parser.entity+c;parser.entity="";parser.state=returnState}continue;default:throw new Error(parser,"Unknown state: "+parser.state)}}if(parser.position>=parser.bufferCheckPosition){checkBufferLength(parser)}return parser}})(exports)})(sax);var _collections={};(function(exports){exports.elemsGroups={animation:new Set(["animate","animateColor","animateMotion","animateTransform","set"]),descriptive:new Set(["desc","metadata","title"]),shape:new Set(["circle","ellipse","line","path","polygon","polyline","rect"]),structural:new Set(["defs","g","svg","symbol","use"]),paintServer:new Set(["hatch","linearGradient","meshGradient","pattern","radialGradient","solidColor"]),nonRendering:new Set(["clipPath","filter","linearGradient","marker","mask","pattern","radialGradient","solidColor","symbol"]),container:new Set(["a","defs","foreignObject","g","marker","mask","missing-glyph","pattern","svg","switch","symbol"]),textContent:new Set(["altGlyph","altGlyphDef","altGlyphItem","glyph","glyphRef","text","textPath","tref","tspan"]),textContentChild:new Set(["altGlyph","textPath","tref","tspan"]),lightSource:new Set(["feDiffuseLighting","feDistantLight","fePointLight","feSpecularLighting","feSpotLight"]),filterPrimitive:new Set(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence"])};exports.textElems=new Set([...exports.elemsGroups.textContent,"pre","title"]);exports.pathElems=new Set(["glyph","missing-glyph","path"]);exports.attrsGroups={animationAddition:new Set(["additive","accumulate"]),animationAttributeTarget:new Set(["attributeType","attributeName"]),animationEvent:new Set(["onbegin","onend","onrepeat","onload"]),animationTiming:new Set(["begin","dur","end","fill","max","min","repeatCount","repeatDur","restart"]),animationValue:new Set(["by","calcMode","from","keySplines","keyTimes","to","values"]),conditionalProcessing:new Set(["requiredExtensions","requiredFeatures","systemLanguage"]),core:new Set(["id","tabindex","xml:base","xml:lang","xml:space"]),graphicalEvent:new Set(["onactivate","onclick","onfocusin","onfocusout","onload","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup"]),presentation:new Set(["alignment-baseline","baseline-shift","clip-path","clip-rule","clip","color-interpolation-filters","color-interpolation","color-profile","color-rendering","color","cursor","direction","display","dominant-baseline","enable-background","fill-opacity","fill-rule","fill","filter","flood-color","flood-opacity","font-family","font-size-adjust","font-size","font-stretch","font-style","font-variant","font-weight","glyph-orientation-horizontal","glyph-orientation-vertical","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","mask","opacity","overflow","paint-order","pointer-events","shape-rendering","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","stroke","text-anchor","text-decoration","text-overflow","text-rendering","transform-origin","transform","unicode-bidi","vector-effect","visibility","word-spacing","writing-mode"]),xlink:new Set(["xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type"]),documentEvent:new Set(["onabort","onerror","onresize","onscroll","onunload","onzoom"]),documentElementEvent:new Set(["oncopy","oncut","onpaste"]),globalEvent:new Set(["oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onresize","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","onvolumechange","onwaiting"]),filterPrimitive:new Set(["x","y","width","height","result"]),transferFunction:new Set(["amplitude","exponent","intercept","offset","slope","tableValues","type"])};exports.attrsGroupsDefaults={core:{"xml:space":"default"},presentation:{clip:"auto","clip-path":"none","clip-rule":"nonzero",mask:"none",opacity:"1","stop-color":"#000","stop-opacity":"1","fill-opacity":"1","fill-rule":"nonzero",fill:"#000",stroke:"none","stroke-width":"1","stroke-linecap":"butt","stroke-linejoin":"miter","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-dashoffset":"0","stroke-opacity":"1","paint-order":"normal","vector-effect":"none",display:"inline",visibility:"visible","marker-start":"none","marker-mid":"none","marker-end":"none","color-interpolation":"sRGB","color-interpolation-filters":"linearRGB","color-rendering":"auto","shape-rendering":"auto","text-rendering":"auto","image-rendering":"auto","font-style":"normal","font-variant":"normal","font-weight":"normal","font-stretch":"normal","font-size":"medium","font-size-adjust":"none",kerning:"auto","letter-spacing":"normal","word-spacing":"normal","text-decoration":"none","text-anchor":"start","text-overflow":"clip","writing-mode":"lr-tb","glyph-orientation-vertical":"auto","glyph-orientation-horizontal":"0deg",direction:"ltr","unicode-bidi":"normal","dominant-baseline":"auto","alignment-baseline":"baseline","baseline-shift":"baseline"},transferFunction:{slope:"1",intercept:"0",amplitude:"1",exponent:"1",offset:"0"}};exports.elems={a:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation","xlink"]),attrs:new Set(["class","externalResourcesRequired","style","target","transform"]),defaults:{target:"_self"},contentGroups:new Set(["animation","descriptive","paintServer","shape","structural"]),content:new Set(["a","altGlyphDef","clipPath","color-profile","cursor","filter","font-face","font","foreignObject","image","marker","mask","pattern","script","style","switch","text","view","tspan"])},altGlyph:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation","xlink"]),attrs:new Set(["class","dx","dy","externalResourcesRequired","format","glyphRef","rotate","style","x","y"])},altGlyphDef:{attrsGroups:new Set(["core"]),content:new Set(["glyphRef"])},altGlyphItem:{attrsGroups:new Set(["core"]),content:new Set(["glyphRef","altGlyphItem"])},animate:{attrsGroups:new Set(["animationAddition","animationAttributeTarget","animationEvent","animationTiming","animationValue","conditionalProcessing","core","presentation","xlink"]),attrs:new Set(["externalResourcesRequired"]),contentGroups:new Set(["descriptive"])},animateColor:{attrsGroups:new Set(["animationAddition","animationAttributeTarget","animationEvent","animationTiming","animationValue","conditionalProcessing","core","presentation","xlink"]),attrs:new Set(["externalResourcesRequired"]),contentGroups:new Set(["descriptive"])},animateMotion:{attrsGroups:new Set(["animationAddition","animationEvent","animationTiming","animationValue","conditionalProcessing","core","xlink"]),attrs:new Set(["externalResourcesRequired","keyPoints","origin","path","rotate"]),defaults:{rotate:"0"},contentGroups:new Set(["descriptive"]),content:new Set(["mpath"])},animateTransform:{attrsGroups:new Set(["animationAddition","animationAttributeTarget","animationEvent","animationTiming","animationValue","conditionalProcessing","core","xlink"]),attrs:new Set(["externalResourcesRequired","type"]),contentGroups:new Set(["descriptive"])},circle:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","cx","cy","externalResourcesRequired","r","style","transform"]),defaults:{cx:"0",cy:"0"},contentGroups:new Set(["animation","descriptive"])},clipPath:{attrsGroups:new Set(["conditionalProcessing","core","presentation"]),attrs:new Set(["class","clipPathUnits","externalResourcesRequired","style","transform"]),defaults:{clipPathUnits:"userSpaceOnUse"},contentGroups:new Set(["animation","descriptive","shape"]),content:new Set(["text","use"])},"color-profile":{attrsGroups:new Set(["core","xlink"]),attrs:new Set(["local","name","rendering-intent"]),defaults:{name:"sRGB","rendering-intent":"auto"},contentGroups:new Set(["descriptive"])},cursor:{attrsGroups:new Set(["core","conditionalProcessing","xlink"]),attrs:new Set(["externalResourcesRequired","x","y"]),defaults:{x:"0",y:"0"},contentGroups:new Set(["descriptive"])},defs:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","externalResourcesRequired","style","transform"]),contentGroups:new Set(["animation","descriptive","paintServer","shape","structural"]),content:new Set(["a","altGlyphDef","clipPath","color-profile","cursor","filter","font-face","font","foreignObject","image","marker","mask","pattern","script","style","switch","text","view"])},desc:{attrsGroups:new Set(["core"]),attrs:new Set(["class","style"])},ellipse:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","cx","cy","externalResourcesRequired","rx","ry","style","transform"]),defaults:{cx:"0",cy:"0"},contentGroups:new Set(["animation","descriptive"])},feBlend:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","style","in","in2","mode"]),defaults:{mode:"normal"},content:new Set(["animate","set"])},feColorMatrix:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","style","in","type","values"]),defaults:{type:"matrix"},content:new Set(["animate","set"])},feComponentTransfer:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","style","in"]),content:new Set(["feFuncA","feFuncB","feFuncG","feFuncR"])},feComposite:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","in","in2","k1","k2","k3","k4","operator","style"]),defaults:{operator:"over",k1:"0",k2:"0",k3:"0",k4:"0"},content:new Set(["animate","set"])},feConvolveMatrix:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","in","kernelMatrix","order","style","bias","divisor","edgeMode","targetX","targetY","kernelUnitLength","preserveAlpha"]),defaults:{order:"3",bias:"0",edgeMode:"duplicate",preserveAlpha:"false"},content:new Set(["animate","set"])},feDiffuseLighting:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","diffuseConstant","in","kernelUnitLength","style","surfaceScale"]),defaults:{surfaceScale:"1",diffuseConstant:"1"},contentGroups:new Set(["descriptive"]),content:new Set(["feDistantLight","fePointLight","feSpotLight"])},feDisplacementMap:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","in","in2","scale","style","xChannelSelector","yChannelSelector"]),defaults:{scale:"0",xChannelSelector:"A",yChannelSelector:"A"},content:new Set(["animate","set"])},feDistantLight:{attrsGroups:new Set(["core"]),attrs:new Set(["azimuth","elevation"]),defaults:{azimuth:"0",elevation:"0"},content:new Set(["animate","set"])},feFlood:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","style"]),content:new Set(["animate","animateColor","set"])},feFuncA:{attrsGroups:new Set(["core","transferFunction"]),content:new Set(["set","animate"])},feFuncB:{attrsGroups:new Set(["core","transferFunction"]),content:new Set(["set","animate"])},feFuncG:{attrsGroups:new Set(["core","transferFunction"]),content:new Set(["set","animate"])},feFuncR:{attrsGroups:new Set(["core","transferFunction"]),content:new Set(["set","animate"])},feGaussianBlur:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","style","in","stdDeviation"]),defaults:{stdDeviation:"0"},content:new Set(["set","animate"])},feImage:{attrsGroups:new Set(["core","presentation","filterPrimitive","xlink"]),attrs:new Set(["class","externalResourcesRequired","href","preserveAspectRatio","style","xlink:href"]),defaults:{preserveAspectRatio:"xMidYMid meet"},content:new Set(["animate","animateTransform","set"])},feMerge:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","style"]),content:new Set(["feMergeNode"])},feMergeNode:{attrsGroups:new Set(["core"]),attrs:new Set(["in"]),content:new Set(["animate","set"])},feMorphology:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","style","in","operator","radius"]),defaults:{operator:"erode",radius:"0"},content:new Set(["animate","set"])},feOffset:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","style","in","dx","dy"]),defaults:{dx:"0",dy:"0"},content:new Set(["animate","set"])},fePointLight:{attrsGroups:new Set(["core"]),attrs:new Set(["x","y","z"]),defaults:{x:"0",y:"0",z:"0"},content:new Set(["animate","set"])},feSpecularLighting:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","in","kernelUnitLength","specularConstant","specularExponent","style","surfaceScale"]),defaults:{surfaceScale:"1",specularConstant:"1",specularExponent:"1"},contentGroups:new Set(["descriptive","lightSource"])},feSpotLight:{attrsGroups:new Set(["core"]),attrs:new Set(["limitingConeAngle","pointsAtX","pointsAtY","pointsAtZ","specularExponent","x","y","z"]),defaults:{x:"0",y:"0",z:"0",pointsAtX:"0",pointsAtY:"0",pointsAtZ:"0",specularExponent:"1"},content:new Set(["animate","set"])},feTile:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["class","style","in"]),content:new Set(["animate","set"])},feTurbulence:{attrsGroups:new Set(["core","presentation","filterPrimitive"]),attrs:new Set(["baseFrequency","class","numOctaves","seed","stitchTiles","style","type"]),defaults:{baseFrequency:"0",numOctaves:"1",seed:"0",stitchTiles:"noStitch",type:"turbulence"},content:new Set(["animate","set"])},filter:{attrsGroups:new Set(["core","presentation","xlink"]),attrs:new Set(["class","externalResourcesRequired","filterRes","filterUnits","height","href","primitiveUnits","style","width","x","xlink:href","y"]),defaults:{primitiveUnits:"userSpaceOnUse",x:"-10%",y:"-10%",width:"120%",height:"120%"},contentGroups:new Set(["descriptive","filterPrimitive"]),content:new Set(["animate","set"])},font:{attrsGroups:new Set(["core","presentation"]),attrs:new Set(["class","externalResourcesRequired","horiz-adv-x","horiz-origin-x","horiz-origin-y","style","vert-adv-y","vert-origin-x","vert-origin-y"]),defaults:{"horiz-origin-x":"0","horiz-origin-y":"0"},contentGroups:new Set(["descriptive"]),content:new Set(["font-face","glyph","hkern","missing-glyph","vkern"])},"font-face":{attrsGroups:new Set(["core"]),attrs:new Set(["font-family","font-style","font-variant","font-weight","font-stretch","font-size","unicode-range","units-per-em","panose-1","stemv","stemh","slope","cap-height","x-height","accent-height","ascent","descent","widths","bbox","ideographic","alphabetic","mathematical","hanging","v-ideographic","v-alphabetic","v-mathematical","v-hanging","underline-position","underline-thickness","strikethrough-position","strikethrough-thickness","overline-position","overline-thickness"]),defaults:{"font-style":"all","font-variant":"normal","font-weight":"all","font-stretch":"normal","unicode-range":"U+0-10FFFF","units-per-em":"1000","panose-1":"0 0 0 0 0 0 0 0 0 0",slope:"0"},contentGroups:new Set(["descriptive"]),content:new Set(["font-face-src"])},"font-face-format":{attrsGroups:new Set(["core"]),attrs:new Set(["string"])},"font-face-name":{attrsGroups:new Set(["core"]),attrs:new Set(["name"])},"font-face-src":{attrsGroups:new Set(["core"]),content:new Set(["font-face-name","font-face-uri"])},"font-face-uri":{attrsGroups:new Set(["core","xlink"]),attrs:new Set(["href","xlink:href"]),content:new Set(["font-face-format"])},foreignObject:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","externalResourcesRequired","height","style","transform","width","x","y"]),defaults:{x:"0",y:"0"}},g:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","externalResourcesRequired","style","transform"]),contentGroups:new Set(["animation","descriptive","paintServer","shape","structural"]),content:new Set(["a","altGlyphDef","clipPath","color-profile","cursor","filter","font-face","font","foreignObject","image","marker","mask","pattern","script","style","switch","text","view"])},glyph:{attrsGroups:new Set(["core","presentation"]),attrs:new Set(["arabic-form","class","d","glyph-name","horiz-adv-x","lang","orientation","style","unicode","vert-adv-y","vert-origin-x","vert-origin-y"]),defaults:{"arabic-form":"initial"},contentGroups:new Set(["animation","descriptive","paintServer","shape","structural"]),content:new Set(["a","altGlyphDef","clipPath","color-profile","cursor","filter","font-face","font","foreignObject","image","marker","mask","pattern","script","style","switch","text","view"])},glyphRef:{attrsGroups:new Set(["core","presentation"]),attrs:new Set(["class","d","horiz-adv-x","style","vert-adv-y","vert-origin-x","vert-origin-y"]),contentGroups:new Set(["animation","descriptive","paintServer","shape","structural"]),content:new Set(["a","altGlyphDef","clipPath","color-profile","cursor","filter","font-face","font","foreignObject","image","marker","mask","pattern","script","style","switch","text","view"])},hatch:{attrsGroups:new Set(["core","presentation","xlink"]),attrs:new Set(["class","hatchContentUnits","hatchUnits","pitch","rotate","style","transform","x","y"]),defaults:{hatchUnits:"objectBoundingBox",hatchContentUnits:"userSpaceOnUse",x:"0",y:"0",pitch:"0",rotate:"0"},contentGroups:new Set(["animation","descriptive"]),content:new Set(["hatchPath"])},hatchPath:{attrsGroups:new Set(["core","presentation","xlink"]),attrs:new Set(["class","style","d","offset"]),defaults:{offset:"0"},contentGroups:new Set(["animation","descriptive"])},hkern:{attrsGroups:new Set(["core"]),attrs:new Set(["u1","g1","u2","g2","k"])},image:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation","xlink"]),attrs:new Set(["class","externalResourcesRequired","height","href","preserveAspectRatio","style","transform","width","x","xlink:href","y"]),defaults:{x:"0",y:"0",preserveAspectRatio:"xMidYMid meet"},contentGroups:new Set(["animation","descriptive"])},line:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","externalResourcesRequired","style","transform","x1","x2","y1","y2"]),defaults:{x1:"0",y1:"0",x2:"0",y2:"0"},contentGroups:new Set(["animation","descriptive"])},linearGradient:{attrsGroups:new Set(["core","presentation","xlink"]),attrs:new Set(["class","externalResourcesRequired","gradientTransform","gradientUnits","href","spreadMethod","style","x1","x2","xlink:href","y1","y2"]),defaults:{x1:"0",y1:"0",x2:"100%",y2:"0",spreadMethod:"pad"},contentGroups:new Set(["descriptive"]),content:new Set(["animate","animateTransform","set","stop"])},marker:{attrsGroups:new Set(["core","presentation"]),attrs:new Set(["class","externalResourcesRequired","markerHeight","markerUnits","markerWidth","orient","preserveAspectRatio","refX","refY","style","viewBox"]),defaults:{markerUnits:"strokeWidth",refX:"0",refY:"0",markerWidth:"3",markerHeight:"3"},contentGroups:new Set(["animation","descriptive","paintServer","shape","structural"]),content:new Set(["a","altGlyphDef","clipPath","color-profile","cursor","filter","font-face","font","foreignObject","image","marker","mask","pattern","script","style","switch","text","view"])},mask:{attrsGroups:new Set(["conditionalProcessing","core","presentation"]),attrs:new Set(["class","externalResourcesRequired","height","mask-type","maskContentUnits","maskUnits","style","width","x","y"]),defaults:{maskUnits:"objectBoundingBox",maskContentUnits:"userSpaceOnUse",x:"-10%",y:"-10%",width:"120%",height:"120%"},contentGroups:new Set(["animation","descriptive","paintServer","shape","structural"]),content:new Set(["a","altGlyphDef","clipPath","color-profile","cursor","filter","font-face","font","foreignObject","image","marker","mask","pattern","script","style","switch","text","view"])},metadata:{attrsGroups:new Set(["core"])},"missing-glyph":{attrsGroups:new Set(["core","presentation"]),attrs:new Set(["class","d","horiz-adv-x","style","vert-adv-y","vert-origin-x","vert-origin-y"]),contentGroups:new Set(["animation","descriptive","paintServer","shape","structural"]),content:new Set(["a","altGlyphDef","clipPath","color-profile","cursor","filter","font-face","font","foreignObject","image","marker","mask","pattern","script","style","switch","text","view"])},mpath:{attrsGroups:new Set(["core","xlink"]),attrs:new Set(["externalResourcesRequired","href","xlink:href"]),contentGroups:new Set(["descriptive"])},path:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","d","externalResourcesRequired","pathLength","style","transform"]),contentGroups:new Set(["animation","descriptive"])},pattern:{attrsGroups:new Set(["conditionalProcessing","core","presentation","xlink"]),attrs:new Set(["class","externalResourcesRequired","height","href","patternContentUnits","patternTransform","patternUnits","preserveAspectRatio","style","viewBox","width","x","xlink:href","y"]),defaults:{patternUnits:"objectBoundingBox",patternContentUnits:"userSpaceOnUse",x:"0",y:"0",width:"0",height:"0",preserveAspectRatio:"xMidYMid meet"},contentGroups:new Set(["animation","descriptive","paintServer","shape","structural"]),content:new Set(["a","altGlyphDef","clipPath","color-profile","cursor","filter","font-face","font","foreignObject","image","marker","mask","pattern","script","style","switch","text","view"])},polygon:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","externalResourcesRequired","points","style","transform"]),contentGroups:new Set(["animation","descriptive"])},polyline:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","externalResourcesRequired","points","style","transform"]),contentGroups:new Set(["animation","descriptive"])},radialGradient:{attrsGroups:new Set(["core","presentation","xlink"]),attrs:new Set(["class","cx","cy","externalResourcesRequired","fr","fx","fy","gradientTransform","gradientUnits","href","r","spreadMethod","style","xlink:href"]),defaults:{gradientUnits:"objectBoundingBox",cx:"50%",cy:"50%",r:"50%"},contentGroups:new Set(["descriptive"]),content:new Set(["animate","animateTransform","set","stop"])},meshGradient:{attrsGroups:new Set(["core","presentation","xlink"]),attrs:new Set(["class","style","x","y","gradientUnits","transform"]),contentGroups:new Set(["descriptive","paintServer","animation"]),content:new Set(["meshRow"])},meshRow:{attrsGroups:new Set(["core","presentation"]),attrs:new Set(["class","style"]),contentGroups:new Set(["descriptive"]),content:new Set(["meshPatch"])},meshPatch:{attrsGroups:new Set(["core","presentation"]),attrs:new Set(["class","style"]),contentGroups:new Set(["descriptive"]),content:new Set(["stop"])},rect:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","externalResourcesRequired","height","rx","ry","style","transform","width","x","y"]),defaults:{x:"0",y:"0"},contentGroups:new Set(["animation","descriptive"])},script:{attrsGroups:new Set(["core","xlink"]),attrs:new Set(["externalResourcesRequired","type","href","xlink:href"])},set:{attrsGroups:new Set(["animation","animationAttributeTarget","animationTiming","conditionalProcessing","core","xlink"]),attrs:new Set(["externalResourcesRequired","to"]),contentGroups:new Set(["descriptive"])},solidColor:{attrsGroups:new Set(["core","presentation"]),attrs:new Set(["class","style"]),contentGroups:new Set(["paintServer"])},stop:{attrsGroups:new Set(["core","presentation"]),attrs:new Set(["class","style","offset","path"]),content:new Set(["animate","animateColor","set"])},style:{attrsGroups:new Set(["core"]),attrs:new Set(["type","media","title"]),defaults:{type:"text/css"}},svg:{attrsGroups:new Set(["conditionalProcessing","core","documentEvent","graphicalEvent","presentation"]),attrs:new Set(["baseProfile","class","contentScriptType","contentStyleType","height","preserveAspectRatio","style","version","viewBox","width","x","y","zoomAndPan"]),defaults:{x:"0",y:"0",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid meet",zoomAndPan:"magnify",version:"1.1",baseProfile:"none",contentScriptType:"application/ecmascript",contentStyleType:"text/css"},contentGroups:new Set(["animation","descriptive","paintServer","shape","structural"]),content:new Set(["a","altGlyphDef","clipPath","color-profile","cursor","filter","font-face","font","foreignObject","image","marker","mask","pattern","script","style","switch","text","view"])},switch:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","externalResourcesRequired","style","transform"]),contentGroups:new Set(["animation","descriptive","shape"]),content:new Set(["a","foreignObject","g","image","svg","switch","text","use"])},symbol:{attrsGroups:new Set(["core","graphicalEvent","presentation"]),attrs:new Set(["class","externalResourcesRequired","preserveAspectRatio","refX","refY","style","viewBox"]),defaults:{refX:"0",refY:"0"},contentGroups:new Set(["animation","descriptive","paintServer","shape","structural"]),content:new Set(["a","altGlyphDef","clipPath","color-profile","cursor","filter","font-face","font","foreignObject","image","marker","mask","pattern","script","style","switch","text","view"])},text:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","dx","dy","externalResourcesRequired","lengthAdjust","rotate","style","textLength","transform","x","y"]),defaults:{x:"0",y:"0",lengthAdjust:"spacing"},contentGroups:new Set(["animation","descriptive","textContentChild"]),content:new Set(["a"])},textPath:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation","xlink"]),attrs:new Set(["class","d","externalResourcesRequired","href","method","spacing","startOffset","style","xlink:href"]),defaults:{startOffset:"0",method:"align",spacing:"exact"},contentGroups:new Set(["descriptive"]),content:new Set(["a","altGlyph","animate","animateColor","set","tref","tspan"])},title:{attrsGroups:new Set(["core"]),attrs:new Set(["class","style"])},tref:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation","xlink"]),attrs:new Set(["class","externalResourcesRequired","href","style","xlink:href"]),contentGroups:new Set(["descriptive"]),content:new Set(["animate","animateColor","set"])},tspan:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation"]),attrs:new Set(["class","dx","dy","externalResourcesRequired","lengthAdjust","rotate","style","textLength","x","y"]),contentGroups:new Set(["descriptive"]),content:new Set(["a","altGlyph","animate","animateColor","set","tref","tspan"])},use:{attrsGroups:new Set(["conditionalProcessing","core","graphicalEvent","presentation","xlink"]),attrs:new Set(["class","externalResourcesRequired","height","href","style","transform","width","x","xlink:href","y"]),defaults:{x:"0",y:"0"},contentGroups:new Set(["animation","descriptive"])},view:{attrsGroups:new Set(["core"]),attrs:new Set(["externalResourcesRequired","preserveAspectRatio","viewBox","viewTarget","zoomAndPan"]),contentGroups:new Set(["descriptive"])},vkern:{attrsGroups:new Set(["core"]),attrs:new Set(["u1","g1","u2","g2","k"])}};exports.editorNamespaces=new Set(["http://creativecommons.org/ns#","http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd","http://ns.adobe.com/AdobeIllustrator/10.0/","http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/","http://ns.adobe.com/Extensibility/1.0/","http://ns.adobe.com/Flows/1.0/","http://ns.adobe.com/GenericCustomNamespace/1.0/","http://ns.adobe.com/Graphs/1.0/","http://ns.adobe.com/ImageReplacement/1.0/","http://ns.adobe.com/SaveForWeb/1.0/","http://ns.adobe.com/Variables/1.0/","http://ns.adobe.com/XPath/1.0/","http://purl.org/dc/elements/1.1/","http://schemas.microsoft.com/visio/2003/SVGExtensions/","http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd","http://taptrix.com/vectorillustrator/svg_extensions","http://www.bohemiancoding.com/sketch/ns","http://www.figma.com/figma/ns","http://www.inkscape.org/namespaces/inkscape","http://www.serif.com/","http://www.vector.evaxdesign.sk","http://www.w3.org/1999/02/22-rdf-syntax-ns#"]);exports.referencesProps=new Set(["clip-path","color-profile","fill","filter","marker-end","marker-mid","marker-start","mask","stroke","style"]);exports.inheritableAttrs=new Set(["clip-rule","color-interpolation-filters","color-interpolation","color-profile","color-rendering","color","cursor","direction","dominant-baseline","fill-opacity","fill-rule","fill","font-family","font-size-adjust","font-size","font-stretch","font-style","font-variant","font-weight","font","glyph-orientation-horizontal","glyph-orientation-vertical","image-rendering","letter-spacing","marker-end","marker-mid","marker-start","marker","paint-order","pointer-events","shape-rendering","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","stroke","text-anchor","text-rendering","transform","visibility","word-spacing","writing-mode"]);exports.presentationNonInheritableGroupAttrs=new Set(["clip-path","display","filter","mask","opacity","text-decoration","transform","unicode-bidi"]);exports.colorsNames={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#0ff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000",blanchedalmond:"#ffebcd",blue:"#00f",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#f0f",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#789",lightslategrey:"#789",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#0f0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#f0f",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#639",red:"#f00",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#fff",whitesmoke:"#f5f5f5",yellow:"#ff0",yellowgreen:"#9acd32"};exports.colorsShortNames={"#f0ffff":"azure","#f5f5dc":"beige","#ffe4c4":"bisque","#a52a2a":"brown","#ff7f50":"coral","#ffd700":"gold","#808080":"gray","#008000":"green","#4b0082":"indigo","#fffff0":"ivory","#f0e68c":"khaki","#faf0e6":"linen","#800000":"maroon","#000080":"navy","#808000":"olive","#ffa500":"orange","#da70d6":"orchid","#cd853f":"peru","#ffc0cb":"pink","#dda0dd":"plum","#800080":"purple","#f00":"red","#ff0000":"red","#fa8072":"salmon","#a0522d":"sienna","#c0c0c0":"silver","#fffafa":"snow","#d2b48c":"tan","#008080":"teal","#ff6347":"tomato","#ee82ee":"violet","#f5deb3":"wheat"};exports.colorsProps=new Set(["color","fill","flood-color","lighting-color","stop-color","stroke"]);exports.pseudoClasses={displayState:new Set(["fullscreen","modal","picture-in-picture"]),input:new Set(["autofill","blank","checked","default","disabled","enabled","in-range","indetermined","invalid","optional","out-of-range","placeholder-shown","read-only","read-write","required","user-invalid","valid"]),linguistic:new Set(["dir","lang"]),location:new Set(["any-link","link","local-link","scope","target-within","target","visited"]),resourceState:new Set(["playing","paused"]),timeDimensional:new Set(["current","past","future"]),treeStructural:new Set(["empty","first-child","first-of-type","last-child","last-of-type","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","root"]),userAction:new Set(["active","focus-visible","focus-within","focus","hover"]),functional:new Set(["is","not","where","has"])}})(_collections);const SAX=sax;const{textElems:textElems$1}=_collections;class SvgoParserError extends Error{constructor(message,line,column,source,file){super(message);this.name="SvgoParserError";this.message=`${file||"<input>"}:${line}:${column}: ${message}`;this.reason=message;this.line=line;this.column=column;this.source=source;if(Error.captureStackTrace){Error.captureStackTrace(this,SvgoParserError)}}toString(){const lines=this.source.split(/\r?\n/);const startLine=Math.max(this.line-3,0);const endLine=Math.min(this.line+2,lines.length);const lineNumberWidth=String(endLine).length;const startColumn=Math.max(this.column-54,0);const endColumn=Math.max(this.column+20,80);const code=lines.slice(startLine,endLine).map(((line,index)=>{const lineSlice=line.slice(startColumn,endColumn);let ellipsisPrefix="";let ellipsisSuffix="";if(startColumn!==0){ellipsisPrefix=startColumn>line.length-1?" ":"…"}if(endColumn<line.length-1){ellipsisSuffix="…"}const number=startLine+1+index;const gutter=` ${number.toString().padStart(lineNumberWidth)} | `;if(number===this.line){const gutterSpacing=gutter.replace(/[^|]/g," ");const lineSpacing=(ellipsisPrefix+line.slice(startColumn,this.column-1)).replace(/[^\t]/g," ");const spacing=gutterSpacing+lineSpacing;return`>${gutter}${ellipsisPrefix}${lineSlice}${ellipsisSuffix}\n ${spacing}^`}return` ${gutter}${ellipsisPrefix}${lineSlice}${ellipsisSuffix}`})).join("\n");return`${this.name}: ${this.message}\n\n${code}\n`}}const entityDeclaration=/<!ENTITY\s+(\S+)\s+(?:'([^']+)'|"([^"]+)")\s*>/g;const config$4={strict:true,trim:false,normalize:false,lowercase:true,xmlns:true,position:true};const parseSvg$1=(data,from)=>{const sax=SAX.parser(config$4.strict,config$4);const root={type:"root",children:[]};let current=root;const stack=[root];const pushToContent=node=>{Object.defineProperty(node,"parentNode",{writable:true,value:current});current.children.push(node)};sax.ondoctype=doctype=>{const node={type:"doctype",name:"svg",data:{doctype:doctype}};pushToContent(node);const subsetStart=doctype.indexOf("[");if(subsetStart>=0){entityDeclaration.lastIndex=subsetStart;let entityMatch=entityDeclaration.exec(data);while(entityMatch!=null){sax.ENTITIES[entityMatch[1]]=entityMatch[2]||entityMatch[3];entityMatch=entityDeclaration.exec(data)}}};sax.onprocessinginstruction=data=>{const node={type:"instruction",name:data.name,value:data.body};pushToContent(node)};sax.oncomment=comment=>{const node={type:"comment",value:comment.trim()};pushToContent(node)};sax.oncdata=cdata=>{const node={type:"cdata",value:cdata};pushToContent(node)};sax.onopentag=data=>{let element={type:"element",name:data.name,attributes:{},children:[]};for(const[name,attr]of Object.entries(data.attributes)){element.attributes[name]=attr.value}pushToContent(element);current=element;stack.push(element)};sax.ontext=text=>{if(current.type==="element"){if(textElems$1.has(current.name)){const node={type:"text",value:text};pushToContent(node)}else if(/\S/.test(text)){const node={type:"text",value:text.trim()};pushToContent(node)}}};sax.onclosetag=()=>{stack.pop();current=stack[stack.length-1]};sax.onerror=e=>{const error=new SvgoParserError(e.reason,e.line+1,e.column,data,from);if(e.message.indexOf("Unexpected end")===-1){throw error}};sax.write(data).close();return root};parser$4.parseSvg=parseSvg$1;var stringifier={};const{textElems:textElems}=_collections;const encodeEntity=char=>entities[char];const defaults={doctypeStart:"<!DOCTYPE",doctypeEnd:">",procInstStart:"<?",procInstEnd:"?>",tagOpenStart:"<",tagOpenEnd:">",tagCloseStart:"</",tagCloseEnd:">",tagShortStart:"<",tagShortEnd:"/>",attrStart:'="',attrEnd:'"',commentStart:"\x3c!--",commentEnd:"--\x3e",cdataStart:"<![CDATA[",cdataEnd:"]]>",textStart:"",textEnd:"",indent:4,regEntities:/[&'"<>]/g,regValEntities:/[&"<>]/g,encodeEntity:encodeEntity,pretty:false,useShortTags:true,eol:"lf",finalNewline:false};const entities={"&":"&amp;","'":"&apos;",'"':"&quot;",">":"&gt;","<":"&lt;"};const stringifySvg$1=(data,userOptions={})=>{const config={...defaults,...userOptions};const indent=config.indent;let newIndent=" ";if(typeof indent==="number"&&Number.isNaN(indent)===false){newIndent=indent<0?"\t":" ".repeat(indent)}else if(typeof indent==="string"){newIndent=indent}const state={indent:newIndent,textContext:null,indentLevel:0};const eol=config.eol==="crlf"?"\r\n":"\n";if(config.pretty){config.doctypeEnd+=eol;config.procInstEnd+=eol;config.commentEnd+=eol;config.cdataEnd+=eol;config.tagShortEnd+=eol;config.tagOpenEnd+=eol;config.tagCloseEnd+=eol;config.textEnd+=eol}let svg=stringifyNode(data,config,state);if(config.finalNewline&&svg.length>0&&!svg.endsWith("\n")){svg+=eol}return svg};stringifier.stringifySvg=stringifySvg$1;const stringifyNode=(data,config,state)=>{let svg="";state.indentLevel+=1;for(const item of data.children){if(item.type==="element"){svg+=stringifyElement(item,config,state)}if(item.type==="text"){svg+=stringifyText(item,config,state)}if(item.type==="doctype"){svg+=stringifyDoctype(item,config)}if(item.type==="instruction"){svg+=stringifyInstruction(item,config)}if(item.type==="comment"){svg+=stringifyComment(item,config)}if(item.type==="cdata"){svg+=stringifyCdata(item,config,state)}}state.indentLevel-=1;return svg};const createIndent=(config,state)=>{let indent="";if(config.pretty&&state.textContext==null){indent=state.indent.repeat(state.indentLevel-1)}return indent};const stringifyDoctype=(node,config)=>config.doctypeStart+node.data.doctype+config.doctypeEnd;const stringifyInstruction=(node,config)=>config.procInstStart+node.name+" "+node.value+config.procInstEnd;const stringifyComment=(node,config)=>config.commentStart+node.value+config.commentEnd;const stringifyCdata=(node,config,state)=>createIndent(config,state)+config.cdataStart+node.value+config.cdataEnd;const stringifyElement=(node,config,state)=>{if(node.children.length===0){if(config.useShortTags){return createIndent(config,state)+config.tagShortStart+node.name+stringifyAttributes(node,config)+config.tagShortEnd}else{return createIndent(config,state)+config.tagShortStart+node.name+stringifyAttributes(node,config)+config.tagOpenEnd+config.tagCloseStart+node.name+config.tagCloseEnd}}else{let tagOpenStart=config.tagOpenStart;let tagOpenEnd=config.tagOpenEnd;let tagCloseStart=config.tagCloseStart;let tagCloseEnd=config.tagCloseEnd;let openIndent=createIndent(config,state);let closeIndent=createIndent(config,state);if(state.textContext){tagOpenStart=defaults.tagOpenStart;tagOpenEnd=defaults.tagOpenEnd;tagCloseStart=defaults.tagCloseStart;tagCloseEnd=defaults.tagCloseEnd;openIndent=""}else if(textElems.has(node.name)){tagOpenEnd=defaults.tagOpenEnd;tagCloseStart=defaults.tagCloseStart;closeIndent="";state.textContext=node}const children=stringifyNode(node,config,state);if(state.textContext===node){state.textContext=null}return openIndent+tagOpenStart+node.name+stringifyAttributes(node,config)+tagOpenEnd+children+closeIndent+tagCloseStart+node.name+tagCloseEnd}};const stringifyAttributes=(node,config)=>{let attrs="";for(const[name,value]of Object.entries(node.attributes)){if(value!==undefined){const encodedValue=value.toString().replace(config.regValEntities,config.encodeEntity);attrs+=" "+name+config.attrStart+encodedValue+config.attrEnd}else{attrs+=" "+name}}return attrs};const stringifyText=(node,config,state)=>createIndent(config,state)+config.textStart+node.value.replace(config.regEntities,config.encodeEntity)+(state.textContext?"":config.textEnd);var builtin$1={};var plugins={};var xast={};var lib$6={};var lib$5={};var stringify$1={};var lib$4={};var lib$3={};(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.Doctype=exports.CDATA=exports.Tag=exports.Style=exports.Script=exports.Comment=exports.Directive=exports.Text=exports.Root=exports.isTag=exports.ElementType=void 0;var ElementType;(function(ElementType){ElementType["Root"]="root";ElementType["Text"]="text";ElementType["Directive"]="directive";ElementType["Comment"]="comment";ElementType["Script"]="script";ElementType["Style"]="style";ElementType["Tag"]="tag";ElementType["CDATA"]="cdata";ElementType["Doctype"]="doctype"})(ElementType=exports.ElementType||(exports.ElementType={}));function isTag(elem){return elem.type===ElementType.Tag||elem.type===ElementType.Script||elem.type===ElementType.Style}exports.isTag=isTag;exports.Root=ElementType.Root;exports.Text=ElementType.Text;exports.Directive=ElementType.Directive;exports.Comment=ElementType.Comment;exports.Script=ElementType.Script;exports.Style=ElementType.Style;exports.Tag=ElementType.Tag;exports.CDATA=ElementType.CDATA;exports.Doctype=ElementType.Doctype})(lib$3);var node$2={};var __extends=commonjsGlobal&&commonjsGlobal.__extends||function(){var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(Object.prototype.hasOwnProperty.call(b,p))d[p]=b[p]};return extendStatics(d,b)};return function(d,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}}();var __assign$1=commonjsGlobal&&commonjsGlobal.__assign||function(){__assign$1=Object.assign||function(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))t[p]=s[p]}return t};return __assign$1.apply(this,arguments)};Object.defineProperty(node$2,"__esModule",{value:true});node$2.cloneNode=node$2.hasChildren=node$2.isDocument=node$2.isDirective=node$2.isComment=node$2.isText=node$2.isCDATA=node$2.isTag=node$2.Element=node$2.Document=node$2.CDATA=node$2.NodeWithChildren=node$2.ProcessingInstruction=node$2.Comment=node$2.Text=node$2.DataNode=node$2.Node=void 0;var domelementtype_1$1=lib$3;var Node=function(){function Node(){this.parent=null;this.prev=null;this.next=null;this.startIndex=null;this.endIndex=null}Object.defineProperty(Node.prototype,"parentNode",{get:function(){return this.parent},set:function(parent){this.parent=parent},enumerable:false,configurable:true});Object.defineProperty(Node.prototype,"previousSibling",{get:function(){return this.prev},set:function(prev){this.prev=prev},enumerable:false,configurable:true});Object.defineProperty(Node.prototype,"nextSibling",{get:function(){return this.next},set:function(next){this.next=next},enumerable:false,configurable:true});Node.prototype.cloneNode=function(recursive){if(recursive===void 0){recursive=false}return cloneNode(this,recursive)};return Node}();node$2.Node=Node;var DataNode=function(_super){__extends(DataNode,_super);function DataNode(data){var _this=_super.call(this)||this;_this.data=data;return _this}Object.defineProperty(DataNode.prototype,"nodeValue",{get:function(){return this.data},set:function(data){this.data=data},enumerable:false,configurable:true});return DataNode}(Node);node$2.DataNode=DataNode;var Text=function(_super){__extends(Text,_super);function Text(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.type=domelementtype_1$1.ElementType.Text;return _this}Object.defineProperty(Text.prototype,"nodeType",{get:function(){return 3},enumerable:false,configurable:true});return Text}(DataNode);node$2.Text=Text;var Comment$a=function(_super){__extends(Comment,_super);function Comment(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.type=domelementtype_1$1.ElementType.Comment;return _this}Object.defineProperty(Comment.prototype,"nodeType",{get:function(){return 8},enumerable:false,configurable:true});return Comment}(DataNode);node$2.Comment=Comment$a;var ProcessingInstruction=function(_super){__extends(ProcessingInstruction,_super);function ProcessingInstruction(name,data){var _this=_super.call(this,data)||this;_this.name=name;_this.type=domelementtype_1$1.ElementType.Directive;return _this}Object.defineProperty(ProcessingInstruction.prototype,"nodeType",{get:function(){return 1},enumerable:false,configurable:true});return ProcessingInstruction}(DataNode);node$2.ProcessingInstruction=ProcessingInstruction;var NodeWithChildren=function(_super){__extends(NodeWithChildren,_super);function NodeWithChildren(children){var _this=_super.call(this)||this;_this.children=children;return _this}Object.defineProperty(NodeWithChildren.prototype,"firstChild",{get:function(){var _a;return(_a=this.children[0])!==null&&_a!==void 0?_a:null},enumerable:false,configurable:true});Object.defineProperty(NodeWithChildren.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:false,configurable:true});Object.defineProperty(NodeWithChildren.prototype,"childNodes",{get:function(){return this.children},set:function(children){this.children=children},enumerable:false,configurable:true});return NodeWithChildren}(Node);node$2.NodeWithChildren=NodeWithChildren;var CDATA=function(_super){__extends(CDATA,_super);function CDATA(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.type=domelementtype_1$1.ElementType.CDATA;return _this}Object.defineProperty(CDATA.prototype,"nodeType",{get:function(){return 4},enumerable:false,configurable:true});return CDATA}(NodeWithChildren);node$2.CDATA=CDATA;var Document=function(_super){__extends(Document,_super);function Document(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.type=domelementtype_1$1.ElementType.Root;return _this}Object.defineProperty(Document.prototype,"nodeType",{get:function(){return 9},enumerable:false,configurable:true});return Document}(NodeWithChildren);node$2.Document=Document;var Element=function(_super){__extends(Element,_super);function Element(name,attribs,children,type){if(children===void 0){children=[]}if(type===void 0){type=name==="script"?domelementtype_1$1.ElementType.Script:name==="style"?domelementtype_1$1.ElementType.Style:domelementtype_1$1.ElementType.Tag}var _this=_super.call(this,children)||this;_this.name=name;_this.attribs=attribs;_this.type=type;return _this}Object.defineProperty(Element.prototype,"nodeType",{get:function(){return 1},enumerable:false,configurable:true});Object.defineProperty(Element.prototype,"tagName",{get:function(){return this.name},set:function(name){this.name=name},enumerable:false,configurable:true});Object.defineProperty(Element.prototype,"attributes",{get:function(){var _this=this;return Object.keys(this.attribs).map((function(name){var _a,_b;return{name:name,value:_this.attribs[name],namespace:(_a=_this["x-attribsNamespace"])===null||_a===void 0?void 0:_a[name],prefix:(_b=_this["x-attribsPrefix"])===null||_b===void 0?void 0:_b[name]}}))},enumerable:false,configurable:true});return Element}(NodeWithChildren);node$2.Element=Element;function isTag$1(node){return(0,domelementtype_1$1.isTag)(node)}node$2.isTag=isTag$1;function isCDATA(node){return node.type===domelementtype_1$1.ElementType.CDATA}node$2.isCDATA=isCDATA;function isText(node){return node.type===domelementtype_1$1.ElementType.Text}node$2.isText=isText;function isComment(node){return node.type===domelementtype_1$1.ElementType.Comment}node$2.isComment=isComment;function isDirective(node){return node.type===domelementtype_1$1.ElementType.Directive}node$2.isDirective=isDirective;function isDocument(node){return node.type===domelementtype_1$1.ElementType.Root}node$2.isDocument=isDocument;function hasChildren(node){return Object.prototype.hasOwnProperty.call(node,"children")}node$2.hasChildren=hasChildren;function cloneNode(node,recursive){if(recursive===void 0){recursive=false}var result;if(isText(node)){result=new Text(node.data)}else if(isComment(node)){result=new Comment$a(node.data)}else if(isTag$1(node)){var children=recursive?cloneChildren(node.children):[];var clone_1=new Element(node.name,__assign$1({},node.attribs),children);children.forEach((function(child){return child.parent=clone_1}));if(node.namespace!=null){clone_1.namespace=node.namespace}if(node["x-attribsNamespace"]){clone_1["x-attribsNamespace"]=__assign$1({},node["x-attribsNamespace"])}if(node["x-attribsPrefix"]){clone_1["x-attribsPrefix"]=__assign$1({},node["x-attribsPrefix"])}result=clone_1}else if(isCDATA(node)){var children=recursive?cloneChildren(node.children):[];var clone_2=new CDATA(children);children.forEach((function(child){return child.parent=clone_2}));result=clone_2}else if(isDocument(node)){var children=recursive?cloneChildren(node.children):[];var clone_3=new Document(children);children.forEach((function(child){return child.parent=clone_3}));if(node["x-mode"]){clone_3["x-mode"]=node["x-mode"]}result=clone_3}else if(isDirective(node)){var instruction=new ProcessingInstruction(node.name,node.data);if(node["x-name"]!=null){instruction["x-name"]=node["x-name"];instruction["x-publicId"]=node["x-publicId"];instruction["x-systemId"]=node["x-systemId"]}result=instruction}else{throw new Error("Not implemented yet: ".concat(node.type))}result.startIndex=node.startIndex;result.endIndex=node.endIndex;if(node.sourceCodeLocation!=null){result.sourceCodeLocation=node.sourceCodeLocation}return result}node$2.cloneNode=cloneNode;function cloneChildren(childs){var children=childs.map((function(child){return cloneNode(child,true)}));for(var i=1;i<children.length;i++){children[i].prev=children[i-1];children[i-1].next=children[i]}return children}(function(exports){var __createBinding=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(o,m,k,k2){if(k2===undefined)k2=k;var desc=Object.getOwnPropertyDescriptor(m,k);if(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable)){desc={enumerable:true,get:function(){return m[k]}}}Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){if(k2===undefined)k2=k;o[k2]=m[k]});var __exportStar=commonjsGlobal&&commonjsGlobal.__exportStar||function(m,exports){for(var p in m)if(p!=="default"&&!Object.prototype.hasOwnProperty.call(exports,p))__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:true});exports.DomHandler=void 0;var domelementtype_1=lib$3;var node_js_1=node$2;__exportStar(node$2,exports);var defaultOpts={withStartIndices:false,withEndIndices:false,xmlMode:false};var DomHandler=function(){function DomHandler(callback,options,elementCB){this.dom=[];this.root=new node_js_1.Document(this.dom);this.done=false;this.tagStack=[this.root];this.lastNode=null;this.parser=null;if(typeof options==="function"){elementCB=options;options=defaultOpts}if(typeof callback==="object"){options=callback;callback=undefined}this.callback=callback!==null&&callback!==void 0?callback:null;this.options=options!==null&&options!==void 0?options:defaultOpts;this.elementCB=elementCB!==null&&elementCB!==void 0?elementCB:null}DomHandler.prototype.onparserinit=function(parser){this.parser=parser};DomHandler.prototype.onreset=function(){this.dom=[];this.root=new node_js_1.Document(this.dom);this.done=false;this.tagStack=[this.root];this.lastNode=null;this.parser=null};DomHandler.prototype.onend=function(){if(this.done)return;this.done=true;this.parser=null;this.handleCallback(null)};DomHandler.prototype.onerror=function(error){this.handleCallback(error)};DomHandler.prototype.onclosetag=function(){this.lastNode=null;var elem=this.tagStack.pop();if(this.options.withEndIndices){elem.endIndex=this.parser.endIndex}if(this.elementCB)this.elementCB(elem)};DomHandler.prototype.onopentag=function(name,attribs){var type=this.options.xmlMode?domelementtype_1.ElementType.Tag:undefined;var element=new node_js_1.Element(name,attribs,undefined,type);this.addNode(element);this.tagStack.push(element)};DomHandler.prototype.ontext=function(data){var lastNode=this.lastNode;if(lastNode&&lastNode.type===domelementtype_1.ElementType.Text){lastNode.data+=data;if(this.options.withEndIndices){lastNode.endIndex=this.parser.endIndex}}else{var node=new node_js_1.Text(data);this.addNode(node);this.lastNode=node}};DomHandler.prototype.oncomment=function(data){if(this.lastNode&&this.lastNode.type===domelementtype_1.ElementType.Comment){this.lastNode.data+=data;return}var node=new node_js_1.Comment(data);this.addNode(node);this.lastNode=node};DomHandler.prototype.oncommentend=function(){this.lastNode=null};DomHandler.prototype.oncdatastart=function(){var text=new node_js_1.Text("");var node=new node_js_1.CDATA([text]);this.addNode(node);text.parent=node;this.lastNode=text};DomHandler.prototype.oncdataend=function(){this.lastNode=null};DomHandler.prototype.onprocessinginstruction=function(name,data){var node=new node_js_1.ProcessingInstruction(name,data);this.addNode(node)};DomHandler.prototype.handleCallback=function(error){if(typeof this.callback==="function"){this.callback(error,this.dom)}else if(error){throw error}};DomHandler.prototype.addNode=function(node){var parent=this.tagStack[this.tagStack.length-1];var previousSibling=parent.children[parent.children.length-1];if(this.options.withStartIndices){node.startIndex=this.parser.startIndex}if(this.options.withEndIndices){node.endIndex=this.parser.endIndex}parent.children.push(node);if(previousSibling){node.prev=previousSibling;previousSibling.next=node}node.parent=parent;this.lastNode=null};return DomHandler}();exports.DomHandler=DomHandler;exports.default=DomHandler})(lib$4);var lib$2={};var lib$1={};var decode$6={};var decodeDataHtml={};Object.defineProperty(decodeDataHtml,"__esModule",{value:true});decodeDataHtml.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((function(c){return c.charCodeAt(0)})));var decodeDataXml={};Object.defineProperty(decodeDataXml,"__esModule",{value:true});decodeDataXml.default=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((function(c){return c.charCodeAt(0)})));var decode_codepoint={};(function(exports){var _a;Object.defineProperty(exports,"__esModule",{value:true});exports.replaceCodePoint=exports.fromCodePoint=void 0;var decodeMap=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);exports.fromCodePoint=(_a=String.fromCodePoint)!==null&&_a!==void 0?_a:function(codePoint){var output="";if(codePoint>65535){codePoint-=65536;output+=String.fromCharCode(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}output+=String.fromCharCode(codePoint);return output};function replaceCodePoint(codePoint){var _a;if(codePoint>=55296&&codePoint<=57343||codePoint>1114111){return 65533}return(_a=decodeMap.get(codePoint))!==null&&_a!==void 0?_a:codePoint}exports.replaceCodePoint=replaceCodePoint;function decodeCodePoint(codePoint){return(0,exports.fromCodePoint)(replaceCodePoint(codePoint))}exports.default=decodeCodePoint})(decode_codepoint);(function(exports){var __importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:true});exports.decodeXML=exports.decodeHTMLStrict=exports.decodeHTML=exports.determineBranch=exports.BinTrieFlags=exports.fromCodePoint=exports.replaceCodePoint=exports.decodeCodePoint=exports.xmlDecodeTree=exports.htmlDecodeTree=void 0;var decode_data_html_js_1=__importDefault(decodeDataHtml);exports.htmlDecodeTree=decode_data_html_js_1.default;var decode_data_xml_js_1=__importDefault(decodeDataXml);exports.xmlDecodeTree=decode_data_xml_js_1.default;var decode_codepoint_js_1=__importDefault(decode_codepoint);exports.decodeCodePoint=decode_codepoint_js_1.default;var decode_codepoint_js_2=decode_codepoint;Object.defineProperty(exports,"replaceCodePoint",{enumerable:true,get:function(){return decode_codepoint_js_2.replaceCodePoint}});Object.defineProperty(exports,"fromCodePoint",{enumerable:true,get:function(){return decode_codepoint_js_2.fromCodePoint}});var CharCodes;(function(CharCodes){CharCodes[CharCodes["NUM"]=35]="NUM";CharCodes[CharCodes["SEMI"]=59]="SEMI";CharCodes[CharCodes["ZERO"]=48]="ZERO";CharCodes[CharCodes["NINE"]=57]="NINE";CharCodes[CharCodes["LOWER_A"]=97]="LOWER_A";CharCodes[CharCodes["LOWER_F"]=102]="LOWER_F";CharCodes[CharCodes["LOWER_X"]=120]="LOWER_X";CharCodes[CharCodes["To_LOWER_BIT"]=32]="To_LOWER_BIT"})(CharCodes||(CharCodes={}));var BinTrieFlags;(function(BinTrieFlags){BinTrieFlags[BinTrieFlags["VALUE_LENGTH"]=49152]="VALUE_LENGTH";BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"]=16256]="BRANCH_LENGTH";BinTrieFlags[BinTrieFlags["JUMP_TABLE"]=127]="JUMP_TABLE"})(BinTrieFlags=exports.BinTrieFlags||(exports.BinTrieFlags={}));function getDecoder(decodeTree){return function decodeHTMLBinary(str,strict){var ret="";var lastIdx=0;var strIdx=0;while((strIdx=str.indexOf("&",strIdx))>=0){ret+=str.slice(lastIdx,strIdx);lastIdx=strIdx;strIdx+=1;if(str.charCodeAt(strIdx)===CharCodes.NUM){var start=strIdx+1;var base=10;var cp=str.charCodeAt(start);if((cp|CharCodes.To_LOWER_BIT)===CharCodes.LOWER_X){base=16;strIdx+=1;start+=1}do{cp=str.charCodeAt(++strIdx)}while(cp>=CharCodes.ZERO&&cp<=CharCodes.NINE||base===16&&(cp|CharCodes.To_LOWER_BIT)>=CharCodes.LOWER_A&&(cp|CharCodes.To_LOWER_BIT)<=CharCodes.LOWER_F);if(start!==strIdx){var entity=str.substring(start,strIdx);var parsed=parseInt(entity,base);if(str.charCodeAt(strIdx)===CharCodes.SEMI){strIdx+=1}else if(strict){continue}ret+=(0,decode_codepoint_js_1.default)(parsed);lastIdx=strIdx}continue}var resultIdx=0;var excess=1;var treeIdx=0;var current=decodeTree[treeIdx];for(;strIdx<str.length;strIdx++,excess++){treeIdx=determineBranch(decodeTree,current,treeIdx+1,str.charCodeAt(strIdx));if(treeIdx<0)break;current=decodeTree[treeIdx];var masked=current&BinTrieFlags.VALUE_LENGTH;if(masked){if(!strict||str.charCodeAt(strIdx)===CharCodes.SEMI){resultIdx=treeIdx;excess=0}var valueLength=(masked>>14)-1;if(valueLength===0)break;treeIdx+=valueLength}}if(resultIdx!==0){var valueLength=(decodeTree[resultIdx]&BinTrieFlags.VALUE_LENGTH)>>14;ret+=valueLength===1?String.fromCharCode(decodeTree[resultIdx]&~BinTrieFlags.VALUE_LENGTH):valueLength===2?String.fromCharCode(decodeTree[resultIdx+1]):String.fromCharCode(decodeTree[resultIdx+1],decodeTree[resultIdx+2]);lastIdx=strIdx-excess+1}}return ret+str.slice(lastIdx)}}function determineBranch(decodeTree,current,nodeIdx,char){var branchCount=(current&BinTrieFlags.BRANCH_LENGTH)>>7;var jumpOffset=current&BinTrieFlags.JUMP_TABLE;if(branchCount===0){return jumpOffset!==0&&char===jumpOffset?nodeIdx:-1}if(jumpOffset){var value=char-jumpOffset;return value<0||value>=branchCount?-1:decodeTree[nodeIdx+value]-1}var lo=nodeIdx;var hi=lo+branchCount-1;while(lo<=hi){var mid=lo+hi>>>1;var midVal=decodeTree[mid];if(midVal<char){lo=mid+1}else if(midVal>char){hi=mid-1}else{return decodeTree[mid+branchCount]}}return-1}exports.determineBranch=determineBranch;var htmlDecoder=getDecoder(decode_data_html_js_1.default);var xmlDecoder=getDecoder(decode_data_xml_js_1.default);function decodeHTML(str){return htmlDecoder(str,false)}exports.decodeHTML=decodeHTML;function decodeHTMLStrict(str){return htmlDecoder(str,true)}exports.decodeHTMLStrict=decodeHTMLStrict;function decodeXML(str){return xmlDecoder(str,true)}exports.decodeXML=decodeXML})(decode$6);var encode$6={};var encodeHtml={};Object.defineProperty(encodeHtml,"__esModule",{value:true});function restoreDiff(arr){for(var i=1;i<arr.length;i++){arr[i][0]+=arr[i-1][0]+1}return arr}encodeHtml.default=new Map(restoreDiff([[9,"&Tab;"],[0,"&NewLine;"],[22,"&excl;"],[0,"&quot;"],[0,"&num;"],[0,"&dollar;"],[0,"&percnt;"],[0,"&amp;"],[0,"&apos;"],[0,"&lpar;"],[0,"&rpar;"],[0,"&ast;"],[0,"&plus;"],[0,"&comma;"],[1,"&period;"],[0,"&sol;"],[10,"&colon;"],[0,"&semi;"],[0,{v:"&lt;",n:8402,o:"&nvlt;"}],[0,{v:"&equals;",n:8421,o:"&bne;"}],[0,{v:"&gt;",n:8402,o:"&nvgt;"}],[0,"&quest;"],[0,"&commat;"],[26,"&lbrack;"],[0,"&bsol;"],[0,"&rbrack;"],[0,"&Hat;"],[0,"&lowbar;"],[0,"&DiacriticalGrave;"],[5,{n:106,o:"&fjlig;"}],[20,"&lbrace;"],[0,"&verbar;"],[0,"&rbrace;"],[34,"&nbsp;"],[0,"&iexcl;"],[0,"&cent;"],[0,"&pound;"],[0,"&curren;"],[0,"&yen;"],[0,"&brvbar;"],[0,"&sect;"],[0,"&die;"],[0,"&copy;"],[0,"&ordf;"],[0,"&laquo;"],[0,"&not;"],[0,"&shy;"],[0,"&circledR;"],[0,"&macr;"],[0,"&deg;"],[0,"&PlusMinus;"],[0,"&sup2;"],[0,"&sup3;"],[0,"&acute;"],[0,"&micro;"],[0,"&para;"],[0,"&centerdot;"],[0,"&cedil;"],[0,"&sup1;"],[0,"&ordm;"],[0,"&raquo;"],[0,"&frac14;"],[0,"&frac12;"],[0,"&frac34;"],[0,"&iquest;"],[0,"&Agrave;"],[0,"&Aacute;"],[0,"&Acirc;"],[0,"&Atilde;"],[0,"&Auml;"],[0,"&angst;"],[0,"&AElig;"],[0,"&Ccedil;"],[0,"&Egrave;"],[0,"&Eacute;"],[0,"&Ecirc;"],[0,"&Euml;"],[0,"&Igrave;"],[0,"&Iacute;"],[0,"&Icirc;"],[0,"&Iuml;"],[0,"&ETH;"],[0,"&Ntilde;"],[0,"&Ograve;"],[0,"&Oacute;"],[0,"&Ocirc;"],[0,"&Otilde;"],[0,"&Ouml;"],[0,"&times;"],[0,"&Oslash;"],[0,"&Ugrave;"],[0,"&Uacute;"],[0,"&Ucirc;"],[0,"&Uuml;"],[0,"&Yacute;"],[0,"&THORN;"],[0,"&szlig;"],[0,"&agrave;"],[0,"&aacute;"],[0,"&acirc;"],[0,"&atilde;"],[0,"&auml;"],[0,"&aring;"],[0,"&aelig;"],[0,"&ccedil;"],[0,"&egrave;"],[0,"&eacute;"],[0,"&ecirc;"],[0,"&euml;"],[0,"&igrave;"],[0,"&iacute;"],[0,"&icirc;"],[0,"&iuml;"],[0,"&eth;"],[0,"&ntilde;"],[0,"&ograve;"],[0,"&oacute;"],[0,"&ocirc;"],[0,"&otilde;"],[0,"&ouml;"],[0,"&div;"],[0,"&oslash;"],[0,"&ugrave;"],[0,"&uacute;"],[0,"&ucirc;"],[0,"&uuml;"],[0,"&yacute;"],[0,"&thorn;"],[0,"&yuml;"],[0,"&Amacr;"],[0,"&amacr;"],[0,"&Abreve;"],[0,"&abreve;"],[0,"&Aogon;"],[0,"&aogon;"],[0,"&Cacute;"],[0,"&cacute;"],[0,"&Ccirc;"],[0,"&ccirc;"],[0,"&Cdot;"],[0,"&cdot;"],[0,"&Ccaron;"],[0,"&ccaron;"],[0,"&Dcaron;"],[0,"&dcaron;"],[0,"&Dstrok;"],[0,"&dstrok;"],[0,"&Emacr;"],[0,"&emacr;"],[2,"&Edot;"],[0,"&edot;"],[0,"&Eogon;"],[0,"&eogon;"],[0,"&Ecaron;"],[0,"&ecaron;"],[0,"&Gcirc;"],[0,"&gcirc;"],[0,"&Gbreve;"],[0,"&gbreve;"],[0,"&Gdot;"],[0,"&gdot;"],[0,"&Gcedil;"],[1,"&Hcirc;"],[0,"&hcirc;"],[0,"&Hstrok;"],[0,"&hstrok;"],[0,"&Itilde;"],[0,"&itilde;"],[0,"&Imacr;"],[0,"&imacr;"],[2,"&Iogon;"],[0,"&iogon;"],[0,"&Idot;"],[0,"&imath;"],[0,"&IJlig;"],[0,"&ijlig;"],[0,"&Jcirc;"],[0,"&jcirc;"],[0,"&Kcedil;"],[0,"&kcedil;"],[0,"&kgreen;"],[0,"&Lacute;"],[0,"&lacute;"],[0,"&Lcedil;"],[0,"&lcedil;"],[0,"&Lcaron;"],[0,"&lcaron;"],[0,"&Lmidot;"],[0,"&lmidot;"],[0,"&Lstrok;"],[0,"&lstrok;"],[0,"&Nacute;"],[0,"&nacute;"],[0,"&Ncedil;"],[0,"&ncedil;"],[0,"&Ncaron;"],[0,"&ncaron;"],[0,"&napos;"],[0,"&ENG;"],[0,"&eng;"],[0,"&Omacr;"],[0,"&omacr;"],[2,"&Odblac;"],[0,"&odblac;"],[0,"&OElig;"],[0,"&oelig;"],[0,"&Racute;"],[0,"&racute;"],[0,"&Rcedil;"],[0,"&rcedil;"],[0,"&Rcaron;"],[0,"&rcaron;"],[0,"&Sacute;"],[0,"&sacute;"],[0,"&Scirc;"],[0,"&scirc;"],[0,"&Scedil;"],[0,"&scedil;"],[0,"&Scaron;"],[0,"&scaron;"],[0,"&Tcedil;"],[0,"&tcedil;"],[0,"&Tcaron;"],[0,"&tcaron;"],[0,"&Tstrok;"],[0,"&tstrok;"],[0,"&Utilde;"],[0,"&utilde;"],[0,"&Umacr;"],[0,"&umacr;"],[0,"&Ubreve;"],[0,"&ubreve;"],[0,"&Uring;"],[0,"&uring;"],[0,"&Udblac;"],[0,"&udblac;"],[0,"&Uogon;"],[0,"&uogon;"],[0,"&Wcirc;"],[0,"&wcirc;"],[0,"&Ycirc;"],[0,"&ycirc;"],[0,"&Yuml;"],[0,"&Zacute;"],[0,"&zacute;"],[0,"&Zdot;"],[0,"&zdot;"],[0,"&Zcaron;"],[0,"&zcaron;"],[19,"&fnof;"],[34,"&imped;"],[63,"&gacute;"],[65,"&jmath;"],[142,"&circ;"],[0,"&caron;"],[16,"&breve;"],[0,"&DiacriticalDot;"],[0,"&ring;"],[0,"&ogon;"],[0,"&DiacriticalTilde;"],[0,"&dblac;"],[51,"&DownBreve;"],[127,"&Alpha;"],[0,"&Beta;"],[0,"&Gamma;"],[0,"&Delta;"],[0,"&Epsilon;"],[0,"&Zeta;"],[0,"&Eta;"],[0,"&Theta;"],[0,"&Iota;"],[0,"&Kappa;"],[0,"&Lambda;"],[0,"&Mu;"],[0,"&Nu;"],[0,"&Xi;"],[0,"&Omicron;"],[0,"&Pi;"],[0,"&Rho;"],[1,"&Sigma;"],[0,"&Tau;"],[0,"&Upsilon;"],[0,"&Phi;"],[0,"&Chi;"],[0,"&Psi;"],[0,"&ohm;"],[7,"&alpha;"],[0,"&beta;"],[0,"&gamma;"],[0,"&delta;"],[0,"&epsi;"],[0,"&zeta;"],[0,"&eta;"],[0,"&theta;"],[0,"&iota;"],[0,"&kappa;"],[0,"&lambda;"],[0,"&mu;"],[0,"&nu;"],[0,"&xi;"],[0,"&omicron;"],[0,"&pi;"],[0,"&rho;"],[0,"&sigmaf;"],[0,"&sigma;"],[0,"&tau;"],[0,"&upsi;"],[0,"&phi;"],[0,"&chi;"],[0,"&psi;"],[0,"&omega;"],[7,"&thetasym;"],[0,"&Upsi;"],[2,"&phiv;"],[0,"&piv;"],[5,"&Gammad;"],[0,"&digamma;"],[18,"&kappav;"],[0,"&rhov;"],[3,"&epsiv;"],[0,"&backepsilon;"],[10,"&IOcy;"],[0,"&DJcy;"],[0,"&GJcy;"],[0,"&Jukcy;"],[0,"&DScy;"],[0,"&Iukcy;"],[0,"&YIcy;"],[0,"&Jsercy;"],[0,"&LJcy;"],[0,"&NJcy;"],[0,"&TSHcy;"],[0,"&KJcy;"],[1,"&Ubrcy;"],[0,"&DZcy;"],[0,"&Acy;"],[0,"&Bcy;"],[0,"&Vcy;"],[0,"&Gcy;"],[0,"&Dcy;"],[0,"&IEcy;"],[0,"&ZHcy;"],[0,"&Zcy;"],[0,"&Icy;"],[0,"&Jcy;"],[0,"&Kcy;"],[0,"&Lcy;"],[0,"&Mcy;"],[0,"&Ncy;"],[0,"&Ocy;"],[0,"&Pcy;"],[0,"&Rcy;"],[0,"&Scy;"],[0,"&Tcy;"],[0,"&Ucy;"],[0,"&Fcy;"],[0,"&KHcy;"],[0,"&TScy;"],[0,"&CHcy;"],[0,"&SHcy;"],[0,"&SHCHcy;"],[0,"&HARDcy;"],[0,"&Ycy;"],[0,"&SOFTcy;"],[0,"&Ecy;"],[0,"&YUcy;"],[0,"&YAcy;"],[0,"&acy;"],[0,"&bcy;"],[0,"&vcy;"],[0,"&gcy;"],[0,"&dcy;"],[0,"&iecy;"],[0,"&zhcy;"],[0,"&zcy;"],[0,"&icy;"],[0,"&jcy;"],[0,"&kcy;"],[0,"&lcy;"],[0,"&mcy;"],[0,"&ncy;"],[0,"&ocy;"],[0,"&pcy;"],[0,"&rcy;"],[0,"&scy;"],[0,"&tcy;"],[0,"&ucy;"],[0,"&fcy;"],[0,"&khcy;"],[0,"&tscy;"],[0,"&chcy;"],[0,"&shcy;"],[0,"&shchcy;"],[0,"&hardcy;"],[0,"&ycy;"],[0,"&softcy;"],[0,"&ecy;"],[0,"&yucy;"],[0,"&yacy;"],[1,"&iocy;"],[0,"&djcy;"],[0,"&gjcy;"],[0,"&jukcy;"],[0,"&dscy;"],[0,"&iukcy;"],[0,"&yicy;"],[0,"&jsercy;"],[0,"&ljcy;"],[0,"&njcy;"],[0,"&tshcy;"],[0,"&kjcy;"],[1,"&ubrcy;"],[0,"&dzcy;"],[7074,"&ensp;"],[0,"&emsp;"],[0,"&emsp13;"],[0,"&emsp14;"],[1,"&numsp;"],[0,"&puncsp;"],[0,"&ThinSpace;"],[0,"&hairsp;"],[0,"&NegativeMediumSpace;"],[0,"&zwnj;"],[0,"&zwj;"],[0,"&lrm;"],[0,"&rlm;"],[0,"&dash;"],[2,"&ndash;"],[0,"&mdash;"],[0,"&horbar;"],[0,"&Verbar;"],[1,"&lsquo;"],[0,"&CloseCurlyQuote;"],[0,"&lsquor;"],[1,"&ldquo;"],[0,"&CloseCurlyDoubleQuote;"],[0,"&bdquo;"],[1,"&dagger;"],[0,"&Dagger;"],[0,"&bull;"],[2,"&nldr;"],[0,"&hellip;"],[9,"&permil;"],[0,"&pertenk;"],[0,"&prime;"],[0,"&Prime;"],[0,"&tprime;"],[0,"&backprime;"],[3,"&lsaquo;"],[0,"&rsaquo;"],[3,"&oline;"],[2,"&caret;"],[1,"&hybull;"],[0,"&frasl;"],[10,"&bsemi;"],[7,"&qprime;"],[7,{v:"&MediumSpace;",n:8202,o:"&ThickSpace;"}],[0,"&NoBreak;"],[0,"&af;"],[0,"&InvisibleTimes;"],[0,"&ic;"],[72,"&euro;"],[46,"&tdot;"],[0,"&DotDot;"],[37,"&complexes;"],[2,"&incare;"],[4,"&gscr;"],[0,"&hamilt;"],[0,"&Hfr;"],[0,"&Hopf;"],[0,"&planckh;"],[0,"&hbar;"],[0,"&imagline;"],[0,"&Ifr;"],[0,"&lagran;"],[0,"&ell;"],[1,"&naturals;"],[0,"&numero;"],[0,"&copysr;"],[0,"&weierp;"],[0,"&Popf;"],[0,"&Qopf;"],[0,"&realine;"],[0,"&real;"],[0,"&reals;"],[0,"&rx;"],[3,"&trade;"],[1,"&integers;"],[2,"&mho;"],[0,"&zeetrf;"],[0,"&iiota;"],[2,"&bernou;"],[0,"&Cayleys;"],[1,"&escr;"],[0,"&Escr;"],[0,"&Fouriertrf;"],[1,"&Mellintrf;"],[0,"&order;"],[0,"&alefsym;"],[0,"&beth;"],[0,"&gimel;"],[0,"&daleth;"],[12,"&CapitalDifferentialD;"],[0,"&dd;"],[0,"&ee;"],[0,"&ii;"],[10,"&frac13;"],[0,"&frac23;"],[0,"&frac15;"],[0,"&frac25;"],[0,"&frac35;"],[0,"&frac45;"],[0,"&frac16;"],[0,"&frac56;"],[0,"&frac18;"],[0,"&frac38;"],[0,"&frac58;"],[0,"&frac78;"],[49,"&larr;"],[0,"&ShortUpArrow;"],[0,"&rarr;"],[0,"&darr;"],[0,"&harr;"],[0,"&updownarrow;"],[0,"&nwarr;"],[0,"&nearr;"],[0,"&LowerRightArrow;"],[0,"&LowerLeftArrow;"],[0,"&nlarr;"],[0,"&nrarr;"],[1,{v:"&rarrw;",n:824,o:"&nrarrw;"}],[0,"&Larr;"],[0,"&Uarr;"],[0,"&Rarr;"],[0,"&Darr;"],[0,"&larrtl;"],[0,"&rarrtl;"],[0,"&LeftTeeArrow;"],[0,"&mapstoup;"],[0,"&map;"],[0,"&DownTeeArrow;"],[1,"&hookleftarrow;"],[0,"&hookrightarrow;"],[0,"&larrlp;"],[0,"&looparrowright;"],[0,"&harrw;"],[0,"&nharr;"],[1,"&lsh;"],[0,"&rsh;"],[0,"&ldsh;"],[0,"&rdsh;"],[1,"&crarr;"],[0,"&cularr;"],[0,"&curarr;"],[2,"&circlearrowleft;"],[0,"&circlearrowright;"],[0,"&leftharpoonup;"],[0,"&DownLeftVector;"],[0,"&RightUpVector;"],[0,"&LeftUpVector;"],[0,"&rharu;"],[0,"&DownRightVector;"],[0,"&dharr;"],[0,"&dharl;"],[0,"&RightArrowLeftArrow;"],[0,"&udarr;"],[0,"&LeftArrowRightArrow;"],[0,"&leftleftarrows;"],[0,"&upuparrows;"],[0,"&rightrightarrows;"],[0,"&ddarr;"],[0,"&leftrightharpoons;"],[0,"&Equilibrium;"],[0,"&nlArr;"],[0,"&nhArr;"],[0,"&nrArr;"],[0,"&DoubleLeftArrow;"],[0,"&DoubleUpArrow;"],[0,"&DoubleRightArrow;"],[0,"&dArr;"],[0,"&DoubleLeftRightArrow;"],[0,"&DoubleUpDownArrow;"],[0,"&nwArr;"],[0,"&neArr;"],[0,"&seArr;"],[0,"&swArr;"],[0,"&lAarr;"],[0,"&rAarr;"],[1,"&zigrarr;"],[6,"&larrb;"],[0,"&rarrb;"],[15,"&DownArrowUpArrow;"],[7,"&loarr;"],[0,"&roarr;"],[0,"&hoarr;"],[0,"&forall;"],[0,"&comp;"],[0,{v:"&part;",n:824,o:"&npart;"}],[0,"&exist;"],[0,"&nexist;"],[0,"&empty;"],[1,"&Del;"],[0,"&Element;"],[0,"&NotElement;"],[1,"&ni;"],[0,"&notni;"],[2,"&prod;"],[0,"&coprod;"],[0,"&sum;"],[0,"&minus;"],[0,"&MinusPlus;"],[0,"&dotplus;"],[1,"&Backslash;"],[0,"&lowast;"],[0,"&compfn;"],[1,"&radic;"],[2,"&prop;"],[0,"&infin;"],[0,"&angrt;"],[0,{v:"&ang;",n:8402,o:"&nang;"}],[0,"&angmsd;"],[0,"&angsph;"],[0,"&mid;"],[0,"&nmid;"],[0,"&DoubleVerticalBar;"],[0,"&NotDoubleVerticalBar;"],[0,"&and;"],[0,"&or;"],[0,{v:"&cap;",n:65024,o:"&caps;"}],[0,{v:"&cup;",n:65024,o:"&cups;"}],[0,"&int;"],[0,"&Int;"],[0,"&iiint;"],[0,"&conint;"],[0,"&Conint;"],[0,"&Cconint;"],[0,"&cwint;"],[0,"&ClockwiseContourIntegral;"],[0,"&awconint;"],[0,"&there4;"],[0,"&becaus;"],[0,"&ratio;"],[0,"&Colon;"],[0,"&dotminus;"],[1,"&mDDot;"],[0,"&homtht;"],[0,{v:"&sim;",n:8402,o:"&nvsim;"}],[0,{v:"&backsim;",n:817,o:"&race;"}],[0,{v:"&ac;",n:819,o:"&acE;"}],[0,"&acd;"],[0,"&VerticalTilde;"],[0,"&NotTilde;"],[0,{v:"&eqsim;",n:824,o:"&nesim;"}],[0,"&sime;"],[0,"&NotTildeEqual;"],[0,"&cong;"],[0,"&simne;"],[0,"&ncong;"],[0,"&ap;"],[0,"&nap;"],[0,"&ape;"],[0,{v:"&apid;",n:824,o:"&napid;"}],[0,"&backcong;"],[0,{v:"&asympeq;",n:8402,o:"&nvap;"}],[0,{v:"&bump;",n:824,o:"&nbump;"}],[0,{v:"&bumpe;",n:824,o:"&nbumpe;"}],[0,{v:"&doteq;",n:824,o:"&nedot;"}],[0,"&doteqdot;"],[0,"&efDot;"],[0,"&erDot;"],[0,"&Assign;"],[0,"&ecolon;"],[0,"&ecir;"],[0,"&circeq;"],[1,"&wedgeq;"],[0,"&veeeq;"],[1,"&triangleq;"],[2,"&equest;"],[0,"&ne;"],[0,{v:"&Congruent;",n:8421,o:"&bnequiv;"}],[0,"&nequiv;"],[1,{v:"&le;",n:8402,o:"&nvle;"}],[0,{v:"&ge;",n:8402,o:"&nvge;"}],[0,{v:"&lE;",n:824,o:"&nlE;"}],[0,{v:"&gE;",n:824,o:"&ngE;"}],[0,{v:"&lnE;",n:65024,o:"&lvertneqq;"}],[0,{v:"&gnE;",n:65024,o:"&gvertneqq;"}],[0,{v:"&ll;",n:new Map(restoreDiff([[824,"&nLtv;"],[7577,"&nLt;"]]))}],[0,{v:"&gg;",n:new Map(restoreDiff([[824,"&nGtv;"],[7577,"&nGt;"]]))}],[0,"&between;"],[0,"&NotCupCap;"],[0,"&nless;"],[0,"&ngt;"],[0,"&nle;"],[0,"&nge;"],[0,"&lesssim;"],[0,"&GreaterTilde;"],[0,"&nlsim;"],[0,"&ngsim;"],[0,"&LessGreater;"],[0,"&gl;"],[0,"&NotLessGreater;"],[0,"&NotGreaterLess;"],[0,"&pr;"],[0,"&sc;"],[0,"&prcue;"],[0,"&sccue;"],[0,"&PrecedesTilde;"],[0,{v:"&scsim;",n:824,o:"&NotSucceedsTilde;"}],[0,"&NotPrecedes;"],[0,"&NotSucceeds;"],[0,{v:"&sub;",n:8402,o:"&NotSubset;"}],[0,{v:"&sup;",n:8402,o:"&NotSuperset;"}],[0,"&nsub;"],[0,"&nsup;"],[0,"&sube;"],[0,"&supe;"],[0,"&NotSubsetEqual;"],[0,"&NotSupersetEqual;"],[0,{v:"&subne;",n:65024,o:"&varsubsetneq;"}],[0,{v:"&supne;",n:65024,o:"&varsupsetneq;"}],[1,"&cupdot;"],[0,"&UnionPlus;"],[0,{v:"&sqsub;",n:824,o:"&NotSquareSubset;"}],[0,{v:"&sqsup;",n:824,o:"&NotSquareSuperset;"}],[0,"&sqsube;"],[0,"&sqsupe;"],[0,{v:"&sqcap;",n:65024,o:"&sqcaps;"}],[0,{v:"&sqcup;",n:65024,o:"&sqcups;"}],[0,"&CirclePlus;"],[0,"&CircleMinus;"],[0,"&CircleTimes;"],[0,"&osol;"],[0,"&CircleDot;"],[0,"&circledcirc;"],[0,"&circledast;"],[1,"&circleddash;"],[0,"&boxplus;"],[0,"&boxminus;"],[0,"&boxtimes;"],[0,"&dotsquare;"],[0,"&RightTee;"],[0,"&dashv;"],[0,"&DownTee;"],[0,"&bot;"],[1,"&models;"],[0,"&DoubleRightTee;"],[0,"&Vdash;"],[0,"&Vvdash;"],[0,"&VDash;"],[0,"&nvdash;"],[0,"&nvDash;"],[0,"&nVdash;"],[0,"&nVDash;"],[0,"&prurel;"],[1,"&LeftTriangle;"],[0,"&RightTriangle;"],[0,{v:"&LeftTriangleEqual;",n:8402,o:"&nvltrie;"}],[0,{v:"&RightTriangleEqual;",n:8402,o:"&nvrtrie;"}],[0,"&origof;"],[0,"&imof;"],[0,"&multimap;"],[0,"&hercon;"],[0,"&intcal;"],[0,"&veebar;"],[1,"&barvee;"],[0,"&angrtvb;"],[0,"&lrtri;"],[0,"&bigwedge;"],[0,"&bigvee;"],[0,"&bigcap;"],[0,"&bigcup;"],[0,"&diam;"],[0,"&sdot;"],[0,"&sstarf;"],[0,"&divideontimes;"],[0,"&bowtie;"],[0,"&ltimes;"],[0,"&rtimes;"],[0,"&leftthreetimes;"],[0,"&rightthreetimes;"],[0,"&backsimeq;"],[0,"&curlyvee;"],[0,"&curlywedge;"],[0,"&Sub;"],[0,"&Sup;"],[0,"&Cap;"],[0,"&Cup;"],[0,"&fork;"],[0,"&epar;"],[0,"&lessdot;"],[0,"&gtdot;"],[0,{v:"&Ll;",n:824,o:"&nLl;"}],[0,{v:"&Gg;",n:824,o:"&nGg;"}],[0,{v:"&leg;",n:65024,o:"&lesg;"}],[0,{v:"&gel;",n:65024,o:"&gesl;"}],[2,"&cuepr;"],[0,"&cuesc;"],[0,"&NotPrecedesSlantEqual;"],[0,"&NotSucceedsSlantEqual;"],[0,"&NotSquareSubsetEqual;"],[0,"&NotSquareSupersetEqual;"],[2,"&lnsim;"],[0,"&gnsim;"],[0,"&precnsim;"],[0,"&scnsim;"],[0,"&nltri;"],[0,"&NotRightTriangle;"],[0,"&nltrie;"],[0,"&NotRightTriangleEqual;"],[0,"&vellip;"],[0,"&ctdot;"],[0,"&utdot;"],[0,"&dtdot;"],[0,"&disin;"],[0,"&isinsv;"],[0,"&isins;"],[0,{v:"&isindot;",n:824,o:"&notindot;"}],[0,"&notinvc;"],[0,"&notinvb;"],[1,{v:"&isinE;",n:824,o:"&notinE;"}],[0,"&nisd;"],[0,"&xnis;"],[0,"&nis;"],[0,"&notnivc;"],[0,"&notnivb;"],[6,"&barwed;"],[0,"&Barwed;"],[1,"&lceil;"],[0,"&rceil;"],[0,"&LeftFloor;"],[0,"&rfloor;"],[0,"&drcrop;"],[0,"&dlcrop;"],[0,"&urcrop;"],[0,"&ulcrop;"],[0,"&bnot;"],[1,"&profline;"],[0,"&profsurf;"],[1,"&telrec;"],[0,"&target;"],[5,"&ulcorn;"],[0,"&urcorn;"],[0,"&dlcorn;"],[0,"&drcorn;"],[2,"&frown;"],[0,"&smile;"],[9,"&cylcty;"],[0,"&profalar;"],[7,"&topbot;"],[6,"&ovbar;"],[1,"&solbar;"],[60,"&angzarr;"],[51,"&lmoustache;"],[0,"&rmoustache;"],[2,"&OverBracket;"],[0,"&bbrk;"],[0,"&bbrktbrk;"],[37,"&OverParenthesis;"],[0,"&UnderParenthesis;"],[0,"&OverBrace;"],[0,"&UnderBrace;"],[2,"&trpezium;"],[4,"&elinters;"],[59,"&blank;"],[164,"&circledS;"],[55,"&boxh;"],[1,"&boxv;"],[9,"&boxdr;"],[3,"&boxdl;"],[3,"&boxur;"],[3,"&boxul;"],[3,"&boxvr;"],[7,"&boxvl;"],[7,"&boxhd;"],[7,"&boxhu;"],[7,"&boxvh;"],[19,"&boxH;"],[0,"&boxV;"],[0,"&boxdR;"],[0,"&boxDr;"],[0,"&boxDR;"],[0,"&boxdL;"],[0,"&boxDl;"],[0,"&boxDL;"],[0,"&boxuR;"],[0,"&boxUr;"],[0,"&boxUR;"],[0,"&boxuL;"],[0,"&boxUl;"],[0,"&boxUL;"],[0,"&boxvR;"],[0,"&boxVr;"],[0,"&boxVR;"],[0,"&boxvL;"],[0,"&boxVl;"],[0,"&boxVL;"],[0,"&boxHd;"],[0,"&boxhD;"],[0,"&boxHD;"],[0,"&boxHu;"],[0,"&boxhU;"],[0,"&boxHU;"],[0,"&boxvH;"],[0,"&boxVh;"],[0,"&boxVH;"],[19,"&uhblk;"],[3,"&lhblk;"],[3,"&block;"],[8,"&blk14;"],[0,"&blk12;"],[0,"&blk34;"],[13,"&square;"],[8,"&blacksquare;"],[0,"&EmptyVerySmallSquare;"],[1,"&rect;"],[0,"&marker;"],[2,"&fltns;"],[1,"&bigtriangleup;"],[0,"&blacktriangle;"],[0,"&triangle;"],[2,"&blacktriangleright;"],[0,"&rtri;"],[3,"&bigtriangledown;"],[0,"&blacktriangledown;"],[0,"&dtri;"],[2,"&blacktriangleleft;"],[0,"&ltri;"],[6,"&loz;"],[0,"&cir;"],[32,"&tridot;"],[2,"&bigcirc;"],[8,"&ultri;"],[0,"&urtri;"],[0,"&lltri;"],[0,"&EmptySmallSquare;"],[0,"&FilledSmallSquare;"],[8,"&bigstar;"],[0,"&star;"],[7,"&phone;"],[49,"&female;"],[1,"&male;"],[29,"&spades;"],[2,"&clubs;"],[1,"&hearts;"],[0,"&diamondsuit;"],[3,"&sung;"],[2,"&flat;"],[0,"&natural;"],[0,"&sharp;"],[163,"&check;"],[3,"&cross;"],[8,"&malt;"],[21,"&sext;"],[33,"&VerticalSeparator;"],[25,"&lbbrk;"],[0,"&rbbrk;"],[84,"&bsolhsub;"],[0,"&suphsol;"],[28,"&LeftDoubleBracket;"],[0,"&RightDoubleBracket;"],[0,"&lang;"],[0,"&rang;"],[0,"&Lang;"],[0,"&Rang;"],[0,"&loang;"],[0,"&roang;"],[7,"&longleftarrow;"],[0,"&longrightarrow;"],[0,"&longleftrightarrow;"],[0,"&DoubleLongLeftArrow;"],[0,"&DoubleLongRightArrow;"],[0,"&DoubleLongLeftRightArrow;"],[1,"&longmapsto;"],[2,"&dzigrarr;"],[258,"&nvlArr;"],[0,"&nvrArr;"],[0,"&nvHarr;"],[0,"&Map;"],[6,"&lbarr;"],[0,"&bkarow;"],[0,"&lBarr;"],[0,"&dbkarow;"],[0,"&drbkarow;"],[0,"&DDotrahd;"],[0,"&UpArrowBar;"],[0,"&DownArrowBar;"],[2,"&Rarrtl;"],[2,"&latail;"],[0,"&ratail;"],[0,"&lAtail;"],[0,"&rAtail;"],[0,"&larrfs;"],[0,"&rarrfs;"],[0,"&larrbfs;"],[0,"&rarrbfs;"],[2,"&nwarhk;"],[0,"&nearhk;"],[0,"&hksearow;"],[0,"&hkswarow;"],[0,"&nwnear;"],[0,"&nesear;"],[0,"&seswar;"],[0,"&swnwar;"],[8,{v:"&rarrc;",n:824,o:"&nrarrc;"}],[1,"&cudarrr;"],[0,"&ldca;"],[0,"&rdca;"],[0,"&cudarrl;"],[0,"&larrpl;"],[2,"&curarrm;"],[0,"&cularrp;"],[7,"&rarrpl;"],[2,"&harrcir;"],[0,"&Uarrocir;"],[0,"&lurdshar;"],[0,"&ldrushar;"],[2,"&LeftRightVector;"],[0,"&RightUpDownVector;"],[0,"&DownLeftRightVector;"],[0,"&LeftUpDownVector;"],[0,"&LeftVectorBar;"],[0,"&RightVectorBar;"],[0,"&RightUpVectorBar;"],[0,"&RightDownVectorBar;"],[0,"&DownLeftVectorBar;"],[0,"&DownRightVectorBar;"],[0,"&LeftUpVectorBar;"],[0,"&LeftDownVectorBar;"],[0,"&LeftTeeVector;"],[0,"&RightTeeVector;"],[0,"&RightUpTeeVector;"],[0,"&RightDownTeeVector;"],[0,"&DownLeftTeeVector;"],[0,"&DownRightTeeVector;"],[0,"&LeftUpTeeVector;"],[0,"&LeftDownTeeVector;"],[0,"&lHar;"],[0,"&uHar;"],[0,"&rHar;"],[0,"&dHar;"],[0,"&luruhar;"],[0,"&ldrdhar;"],[0,"&ruluhar;"],[0,"&rdldhar;"],[0,"&lharul;"],[0,"&llhard;"],[0,"&rharul;"],[0,"&lrhard;"],[0,"&udhar;"],[0,"&duhar;"],[0,"&RoundImplies;"],[0,"&erarr;"],[0,"&simrarr;"],[0,"&larrsim;"],[0,"&rarrsim;"],[0,"&rarrap;"],[0,"&ltlarr;"],[1,"&gtrarr;"],[0,"&subrarr;"],[1,"&suplarr;"],[0,"&lfisht;"],[0,"&rfisht;"],[0,"&ufisht;"],[0,"&dfisht;"],[5,"&lopar;"],[0,"&ropar;"],[4,"&lbrke;"],[0,"&rbrke;"],[0,"&lbrkslu;"],[0,"&rbrksld;"],[0,"&lbrksld;"],[0,"&rbrkslu;"],[0,"&langd;"],[0,"&rangd;"],[0,"&lparlt;"],[0,"&rpargt;"],[0,"&gtlPar;"],[0,"&ltrPar;"],[3,"&vzigzag;"],[1,"&vangrt;"],[0,"&angrtvbd;"],[6,"&ange;"],[0,"&range;"],[0,"&dwangle;"],[0,"&uwangle;"],[0,"&angmsdaa;"],[0,"&angmsdab;"],[0,"&angmsdac;"],[0,"&angmsdad;"],[0,"&angmsdae;"],[0,"&angmsdaf;"],[0,"&angmsdag;"],[0,"&angmsdah;"],[0,"&bemptyv;"],[0,"&demptyv;"],[0,"&cemptyv;"],[0,"&raemptyv;"],[0,"&laemptyv;"],[0,"&ohbar;"],[0,"&omid;"],[0,"&opar;"],[1,"&operp;"],[1,"&olcross;"],[0,"&odsold;"],[1,"&olcir;"],[0,"&ofcir;"],[0,"&olt;"],[0,"&ogt;"],[0,"&cirscir;"],[0,"&cirE;"],[0,"&solb;"],[0,"&bsolb;"],[3,"&boxbox;"],[3,"&trisb;"],[0,"&rtriltri;"],[0,{v:"&LeftTriangleBar;",n:824,o:"&NotLeftTriangleBar;"}],[0,{v:"&RightTriangleBar;",n:824,o:"&NotRightTriangleBar;"}],[11,"&iinfin;"],[0,"&infintie;"],[0,"&nvinfin;"],[4,"&eparsl;"],[0,"&smeparsl;"],[0,"&eqvparsl;"],[5,"&blacklozenge;"],[8,"&RuleDelayed;"],[1,"&dsol;"],[9,"&bigodot;"],[0,"&bigoplus;"],[0,"&bigotimes;"],[1,"&biguplus;"],[1,"&bigsqcup;"],[5,"&iiiint;"],[0,"&fpartint;"],[2,"&cirfnint;"],[0,"&awint;"],[0,"&rppolint;"],[0,"&scpolint;"],[0,"&npolint;"],[0,"&pointint;"],[0,"&quatint;"],[0,"&intlarhk;"],[10,"&pluscir;"],[0,"&plusacir;"],[0,"&simplus;"],[0,"&plusdu;"],[0,"&plussim;"],[0,"&plustwo;"],[1,"&mcomma;"],[0,"&minusdu;"],[2,"&loplus;"],[0,"&roplus;"],[0,"&Cross;"],[0,"&timesd;"],[0,"&timesbar;"],[1,"&smashp;"],[0,"&lotimes;"],[0,"&rotimes;"],[0,"&otimesas;"],[0,"&Otimes;"],[0,"&odiv;"],[0,"&triplus;"],[0,"&triminus;"],[0,"&tritime;"],[0,"&intprod;"],[2,"&amalg;"],[0,"&capdot;"],[1,"&ncup;"],[0,"&ncap;"],[0,"&capand;"],[0,"&cupor;"],[0,"&cupcap;"],[0,"&capcup;"],[0,"&cupbrcap;"],[0,"&capbrcup;"],[0,"&cupcup;"],[0,"&capcap;"],[0,"&ccups;"],[0,"&ccaps;"],[2,"&ccupssm;"],[2,"&And;"],[0,"&Or;"],[0,"&andand;"],[0,"&oror;"],[0,"&orslope;"],[0,"&andslope;"],[1,"&andv;"],[0,"&orv;"],[0,"&andd;"],[0,"&ord;"],[1,"&wedbar;"],[6,"&sdote;"],[3,"&simdot;"],[2,{v:"&congdot;",n:824,o:"&ncongdot;"}],[0,"&easter;"],[0,"&apacir;"],[0,{v:"&apE;",n:824,o:"&napE;"}],[0,"&eplus;"],[0,"&pluse;"],[0,"&Esim;"],[0,"&Colone;"],[0,"&Equal;"],[1,"&ddotseq;"],[0,"&equivDD;"],[0,"&ltcir;"],[0,"&gtcir;"],[0,"&ltquest;"],[0,"&gtquest;"],[0,{v:"&leqslant;",n:824,o:"&nleqslant;"}],[0,{v:"&geqslant;",n:824,o:"&ngeqslant;"}],[0,"&lesdot;"],[0,"&gesdot;"],[0,"&lesdoto;"],[0,"&gesdoto;"],[0,"&lesdotor;"],[0,"&gesdotol;"],[0,"&lap;"],[0,"&gap;"],[0,"&lne;"],[0,"&gne;"],[0,"&lnap;"],[0,"&gnap;"],[0,"&lEg;"],[0,"&gEl;"],[0,"&lsime;"],[0,"&gsime;"],[0,"&lsimg;"],[0,"&gsiml;"],[0,"&lgE;"],[0,"&glE;"],[0,"&lesges;"],[0,"&gesles;"],[0,"&els;"],[0,"&egs;"],[0,"&elsdot;"],[0,"&egsdot;"],[0,"&el;"],[0,"&eg;"],[2,"&siml;"],[0,"&simg;"],[0,"&simlE;"],[0,"&simgE;"],[0,{v:"&LessLess;",n:824,o:"&NotNestedLessLess;"}],[0,{v:"&GreaterGreater;",n:824,o:"&NotNestedGreaterGreater;"}],[1,"&glj;"],[0,"&gla;"],[0,"&ltcc;"],[0,"&gtcc;"],[0,"&lescc;"],[0,"&gescc;"],[0,"&smt;"],[0,"&lat;"],[0,{v:"&smte;",n:65024,o:"&smtes;"}],[0,{v:"&late;",n:65024,o:"&lates;"}],[0,"&bumpE;"],[0,{v:"&PrecedesEqual;",n:824,o:"&NotPrecedesEqual;"}],[0,{v:"&sce;",n:824,o:"&NotSucceedsEqual;"}],[2,"&prE;"],[0,"&scE;"],[0,"&precneqq;"],[0,"&scnE;"],[0,"&prap;"],[0,"&scap;"],[0,"&precnapprox;"],[0,"&scnap;"],[0,"&Pr;"],[0,"&Sc;"],[0,"&subdot;"],[0,"&supdot;"],[0,"&subplus;"],[0,"&supplus;"],[0,"&submult;"],[0,"&supmult;"],[0,"&subedot;"],[0,"&supedot;"],[0,{v:"&subE;",n:824,o:"&nsubE;"}],[0,{v:"&supE;",n:824,o:"&nsupE;"}],[0,"&subsim;"],[0,"&supsim;"],[2,{v:"&subnE;",n:65024,o:"&varsubsetneqq;"}],[0,{v:"&supnE;",n:65024,o:"&varsupsetneqq;"}],[2,"&csub;"],[0,"&csup;"],[0,"&csube;"],[0,"&csupe;"],[0,"&subsup;"],[0,"&supsub;"],[0,"&subsub;"],[0,"&supsup;"],[0,"&suphsub;"],[0,"&supdsub;"],[0,"&forkv;"],[0,"&topfork;"],[0,"&mlcp;"],[8,"&Dashv;"],[1,"&Vdashl;"],[0,"&Barv;"],[0,"&vBar;"],[0,"&vBarv;"],[1,"&Vbar;"],[0,"&Not;"],[0,"&bNot;"],[0,"&rnmid;"],[0,"&cirmid;"],[0,"&midcir;"],[0,"&topcir;"],[0,"&nhpar;"],[0,"&parsim;"],[9,{v:"&parsl;",n:8421,o:"&nparsl;"}],[44343,{n:new Map(restoreDiff([[56476,"&Ascr;"],[1,"&Cscr;"],[0,"&Dscr;"],[2,"&Gscr;"],[2,"&Jscr;"],[0,"&Kscr;"],[2,"&Nscr;"],[0,"&Oscr;"],[0,"&Pscr;"],[0,"&Qscr;"],[1,"&Sscr;"],[0,"&Tscr;"],[0,"&Uscr;"],[0,"&Vscr;"],[0,"&Wscr;"],[0,"&Xscr;"],[0,"&Yscr;"],[0,"&Zscr;"],[0,"&ascr;"],[0,"&bscr;"],[0,"&cscr;"],[0,"&dscr;"],[1,"&fscr;"],[1,"&hscr;"],[0,"&iscr;"],[0,"&jscr;"],[0,"&kscr;"],[0,"&lscr;"],[0,"&mscr;"],[0,"&nscr;"],[1,"&pscr;"],[0,"&qscr;"],[0,"&rscr;"],[0,"&sscr;"],[0,"&tscr;"],[0,"&uscr;"],[0,"&vscr;"],[0,"&wscr;"],[0,"&xscr;"],[0,"&yscr;"],[0,"&zscr;"],[52,"&Afr;"],[0,"&Bfr;"],[1,"&Dfr;"],[0,"&Efr;"],[0,"&Ffr;"],[0,"&Gfr;"],[2,"&Jfr;"],[0,"&Kfr;"],[0,"&Lfr;"],[0,"&Mfr;"],[0,"&Nfr;"],[0,"&Ofr;"],[0,"&Pfr;"],[0,"&Qfr;"],[1,"&Sfr;"],[0,"&Tfr;"],[0,"&Ufr;"],[0,"&Vfr;"],[0,"&Wfr;"],[0,"&Xfr;"],[0,"&Yfr;"],[1,"&afr;"],[0,"&bfr;"],[0,"&cfr;"],[0,"&dfr;"],[0,"&efr;"],[0,"&ffr;"],[0,"&gfr;"],[0,"&hfr;"],[0,"&ifr;"],[0,"&jfr;"],[0,"&kfr;"],[0,"&lfr;"],[0,"&mfr;"],[0,"&nfr;"],[0,"&ofr;"],[0,"&pfr;"],[0,"&qfr;"],[0,"&rfr;"],[0,"&sfr;"],[0,"&tfr;"],[0,"&ufr;"],[0,"&vfr;"],[0,"&wfr;"],[0,"&xfr;"],[0,"&yfr;"],[0,"&zfr;"],[0,"&Aopf;"],[0,"&Bopf;"],[1,"&Dopf;"],[0,"&Eopf;"],[0,"&Fopf;"],[0,"&Gopf;"],[1,"&Iopf;"],[0,"&Jopf;"],[0,"&Kopf;"],[0,"&Lopf;"],[0,"&Mopf;"],[1,"&Oopf;"],[3,"&Sopf;"],[0,"&Topf;"],[0,"&Uopf;"],[0,"&Vopf;"],[0,"&Wopf;"],[0,"&Xopf;"],[0,"&Yopf;"],[1,"&aopf;"],[0,"&bopf;"],[0,"&copf;"],[0,"&dopf;"],[0,"&eopf;"],[0,"&fopf;"],[0,"&gopf;"],[0,"&hopf;"],[0,"&iopf;"],[0,"&jopf;"],[0,"&kopf;"],[0,"&lopf;"],[0,"&mopf;"],[0,"&nopf;"],[0,"&oopf;"],[0,"&popf;"],[0,"&qopf;"],[0,"&ropf;"],[0,"&sopf;"],[0,"&topf;"],[0,"&uopf;"],[0,"&vopf;"],[0,"&wopf;"],[0,"&xopf;"],[0,"&yopf;"],[0,"&zopf;"]]))}],[8906,"&fflig;"],[0,"&filig;"],[0,"&fllig;"],[0,"&ffilig;"],[0,"&ffllig;"]]));var _escape={};(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.escapeText=exports.escapeAttribute=exports.escapeUTF8=exports.escape=exports.encodeXML=exports.getCodePoint=exports.xmlReplacer=void 0;exports.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var xmlCodeMap=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]);exports.getCodePoint=String.prototype.codePointAt!=null?function(str,index){return str.codePointAt(index)}:function(c,index){return(c.charCodeAt(index)&64512)===55296?(c.charCodeAt(index)-55296)*1024+c.charCodeAt(index+1)-56320+65536:c.charCodeAt(index)};function encodeXML(str){var ret="";var lastIdx=0;var match;while((match=exports.xmlReplacer.exec(str))!==null){var i=match.index;var char=str.charCodeAt(i);var next=xmlCodeMap.get(char);if(next!==undefined){ret+=str.substring(lastIdx,i)+next;lastIdx=i+1}else{ret+="".concat(str.substring(lastIdx,i),"&#x").concat((0,exports.getCodePoint)(str,i).toString(16),";");lastIdx=exports.xmlReplacer.lastIndex+=Number((char&64512)===55296)}}return ret+str.substr(lastIdx)}exports.encodeXML=encodeXML;exports.escape=encodeXML;function getEscaper(regex,map){return function escape(data){var match;var lastIdx=0;var result="";while(match=regex.exec(data)){if(lastIdx!==match.index){result+=data.substring(lastIdx,match.index)}result+=map.get(match[0].charCodeAt(0));lastIdx=match.index+1}return result+data.substring(lastIdx)}}exports.escapeUTF8=getEscaper(/[&<>'"]/g,xmlCodeMap);exports.escapeAttribute=getEscaper(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]]));exports.escapeText=getEscaper(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]))})(_escape);var __importDefault$4=commonjsGlobal&&commonjsGlobal.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(encode$6,"__esModule",{value:true});encode$6.encodeNonAsciiHTML=encode$6.encodeHTML=void 0;var encode_html_js_1=__importDefault$4(encodeHtml);var escape_js_1=_escape;var htmlReplacer=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function encodeHTML(data){return encodeHTMLTrieRe(htmlReplacer,data)}encode$6.encodeHTML=encodeHTML;function encodeNonAsciiHTML(data){return encodeHTMLTrieRe(escape_js_1.xmlReplacer,data)}encode$6.encodeNonAsciiHTML=encodeNonAsciiHTML;function encodeHTMLTrieRe(regExp,str){var ret="";var lastIdx=0;var match;while((match=regExp.exec(str))!==null){var i=match.index;ret+=str.substring(lastIdx,i);var char=str.charCodeAt(i);var next=encode_html_js_1.default.get(char);if(typeof next==="object"){if(i+1<str.length){var nextChar=str.charCodeAt(i+1);var value=typeof next.n==="number"?next.n===nextChar?next.o:undefined:next.n.get(nextChar);if(value!==undefined){ret+=value;lastIdx=regExp.lastIndex+=1;continue}}next=next.v}if(next!==undefined){ret+=next;lastIdx=i+1}else{var cp=(0,escape_js_1.getCodePoint)(str,i);ret+="&#x".concat(cp.toString(16),";");lastIdx=regExp.lastIndex+=Number(cp!==char)}}return ret+str.substr(lastIdx)}(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.decodeXMLStrict=exports.decodeHTML5Strict=exports.decodeHTML4Strict=exports.decodeHTML5=exports.decodeHTML4=exports.decodeHTMLStrict=exports.decodeHTML=exports.decodeXML=exports.encodeHTML5=exports.encodeHTML4=exports.encodeNonAsciiHTML=exports.encodeHTML=exports.escapeText=exports.escapeAttribute=exports.escapeUTF8=exports.escape=exports.encodeXML=exports.encode=exports.decodeStrict=exports.decode=exports.EncodingMode=exports.DecodingMode=exports.EntityLevel=void 0;var decode_js_1=decode$6;var encode_js_1=encode$6;var escape_js_1=_escape;var EntityLevel;(function(EntityLevel){EntityLevel[EntityLevel["XML"]=0]="XML";EntityLevel[EntityLevel["HTML"]=1]="HTML"})(EntityLevel=exports.EntityLevel||(exports.EntityLevel={}));var DecodingMode;(function(DecodingMode){DecodingMode[DecodingMode["Legacy"]=0]="Legacy";DecodingMode[DecodingMode["Strict"]=1]="Strict"})(DecodingMode=exports.DecodingMode||(exports.DecodingMode={}));var EncodingMode;(function(EncodingMode){EncodingMode[EncodingMode["UTF8"]=0]="UTF8";EncodingMode[EncodingMode["ASCII"]=1]="ASCII";EncodingMode[EncodingMode["Extensive"]=2]="Extensive";EncodingMode[EncodingMode["Attribute"]=3]="Attribute";EncodingMode[EncodingMode["Text"]=4]="Text"})(EncodingMode=exports.EncodingMode||(exports.EncodingMode={}));function decode(data,options){if(options===void 0){options=EntityLevel.XML}var opts=typeof options==="number"?{level:options}:options;if(opts.level===EntityLevel.HTML){if(opts.mode===DecodingMode.Strict){return(0,decode_js_1.decodeHTMLStrict)(data)}return(0,decode_js_1.decodeHTML)(data)}return(0,decode_js_1.decodeXML)(data)}exports.decode=decode;function decodeStrict(data,options){if(options===void 0){options=EntityLevel.XML}var opts=typeof options==="number"?{level:options}:options;if(opts.level===EntityLevel.HTML){if(opts.mode===DecodingMode.Legacy){return(0,decode_js_1.decodeHTML)(data)}return(0,decode_js_1.decodeHTMLStrict)(data)}return(0,decode_js_1.decodeXML)(data)}exports.decodeStrict=decodeStrict;function encode(data,options){if(options===void 0){options=EntityLevel.XML}var opts=typeof options==="number"?{level:options}:options;if(opts.mode===EncodingMode.UTF8)return(0,escape_js_1.escapeUTF8)(data);if(opts.mode===EncodingMode.Attribute)return(0,escape_js_1.escapeAttribute)(data);if(opts.mode===EncodingMode.Text)return(0,escape_js_1.escapeText)(data);if(opts.level===EntityLevel.HTML){if(opts.mode===EncodingMode.ASCII){return(0,encode_js_1.encodeNonAsciiHTML)(data)}return(0,encode_js_1.encodeHTML)(data)}return(0,escape_js_1.encodeXML)(data)}exports.encode=encode;var escape_js_2=_escape;Object.defineProperty(exports,"encodeXML",{enumerable:true,get:function(){return escape_js_2.encodeXML}});Object.defineProperty(exports,"escape",{enumerable:true,get:function(){return escape_js_2.escape}});Object.defineProperty(exports,"escapeUTF8",{enumerable:true,get:function(){return escape_js_2.escapeUTF8}});Object.defineProperty(exports,"escapeAttribute",{enumerable:true,get:function(){return escape_js_2.escapeAttribute}});Object.defineProperty(exports,"escapeText",{enumerable:true,get:function(){return escape_js_2.escapeText}});var encode_js_2=encode$6;Object.defineProperty(exports,"encodeHTML",{enumerable:true,get:function(){return encode_js_2.encodeHTML}});Object.defineProperty(exports,"encodeNonAsciiHTML",{enumerable:true,get:function(){return encode_js_2.encodeNonAsciiHTML}});Object.defineProperty(exports,"encodeHTML4",{enumerable:true,get:function(){return encode_js_2.encodeHTML}});Object.defineProperty(exports,"encodeHTML5",{enumerable:true,get:function(){return encode_js_2.encodeHTML}});var decode_js_2=decode$6;Object.defineProperty(exports,"decodeXML",{enumerable:true,get:function(){return decode_js_2.decodeXML}});Object.defineProperty(exports,"decodeHTML",{enumerable:true,get:function(){return decode_js_2.decodeHTML}});Object.defineProperty(exports,"decodeHTMLStrict",{enumerable:true,get:function(){return decode_js_2.decodeHTMLStrict}});Object.defineProperty(exports,"decodeHTML4",{enumerable:true,get:function(){return decode_js_2.decodeHTML}});Object.defineProperty(exports,"decodeHTML5",{enumerable:true,get:function(){return decode_js_2.decodeHTML}});Object.defineProperty(exports,"decodeHTML4Strict",{enumerable:true,get:function(){return decode_js_2.decodeHTMLStrict}});Object.defineProperty(exports,"decodeHTML5Strict",{enumerable:true,get:function(){return decode_js_2.decodeHTMLStrict}});Object.defineProperty(exports,"decodeXMLStrict",{enumerable:true,get:function(){return decode_js_2.decodeXML}})})(lib$1);var foreignNames={};Object.defineProperty(foreignNames,"__esModule",{value:true});foreignNames.attributeNames=foreignNames.elementNames=void 0;foreignNames.elementNames=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((function(val){return[val.toLowerCase(),val]})));foreignNames.attributeNames=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((function(val){return[val.toLowerCase(),val]})));var __assign=commonjsGlobal&&commonjsGlobal.__assign||function(){__assign=Object.assign||function(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))t[p]=s[p]}return t};return __assign.apply(this,arguments)};var __createBinding$1=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(o,m,k,k2){if(k2===undefined)k2=k;var desc=Object.getOwnPropertyDescriptor(m,k);if(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable)){desc={enumerable:true,get:function(){return m[k]}}}Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){if(k2===undefined)k2=k;o[k2]=m[k]});var __setModuleDefault$1=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:true,value:v})}:function(o,v){o["default"]=v});var __importStar$1=commonjsGlobal&&commonjsGlobal.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)if(k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k))__createBinding$1(result,mod,k);__setModuleDefault$1(result,mod);return result};Object.defineProperty(lib$2,"__esModule",{value:true});lib$2.render=void 0;var ElementType=__importStar$1(lib$3);var entities_1=lib$1;var foreignNames_js_1=foreignNames;var unencodedElements=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function replaceQuotes(value){return value.replace(/"/g,"&quot;")}function formatAttributes(attributes,opts){var _a;if(!attributes)return;var encode=((_a=opts.encodeEntities)!==null&&_a!==void 0?_a:opts.decodeEntities)===false?replaceQuotes:opts.xmlMode||opts.encodeEntities!=="utf8"?entities_1.encodeXML:entities_1.escapeAttribute;return Object.keys(attributes).map((function(key){var _a,_b;var value=(_a=attributes[key])!==null&&_a!==void 0?_a:"";if(opts.xmlMode==="foreign"){key=(_b=foreignNames_js_1.attributeNames.get(key))!==null&&_b!==void 0?_b:key}if(!opts.emptyAttrs&&!opts.xmlMode&&value===""){return key}return"".concat(key,'="').concat(encode(value),'"')})).join(" ")}var singleTag=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function render(node,options){if(options===void 0){options={}}var nodes="length"in node?node:[node];var output="";for(var i=0;i<nodes.length;i++){output+=renderNode(nodes[i],options)}return output}lib$2.render=render;lib$2.default=render;function renderNode(node,options){switch(node.type){case ElementType.Root:return render(node.children,options);case ElementType.Doctype:case ElementType.Directive:return renderDirective(node);case ElementType.Comment:return renderComment(node);case ElementType.CDATA:return renderCdata(node);case ElementType.Script:case ElementType.Style:case ElementType.Tag:return renderTag(node,options);case ElementType.Text:return renderText(node,options)}}var foreignModeIntegrationPoints=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]);var foreignElements=new Set(["svg","math"]);function renderTag(elem,opts){var _a;if(opts.xmlMode==="foreign"){elem.name=(_a=foreignNames_js_1.elementNames.get(elem.name))!==null&&_a!==void 0?_a:elem.name;if(elem.parent&&foreignModeIntegrationPoints.has(elem.parent.name)){opts=__assign(__assign({},opts),{xmlMode:false})}}if(!opts.xmlMode&&foreignElements.has(elem.name)){opts=__assign(__assign({},opts),{xmlMode:"foreign"})}var tag="<".concat(elem.name);var attribs=formatAttributes(elem.attribs,opts);if(attribs){tag+=" ".concat(attribs)}if(elem.children.length===0&&(opts.xmlMode?opts.selfClosingTags!==false:opts.selfClosingTags&&singleTag.has(elem.name))){if(!opts.xmlMode)tag+=" ";tag+="/>"}else{tag+=">";if(elem.children.length>0){tag+=render(elem.children,opts)}if(opts.xmlMode||!singleTag.has(elem.name)){tag+="</".concat(elem.name,">")}}return tag}function renderDirective(elem){return"<".concat(elem.data,">")}function renderText(elem,opts){var _a;var data=elem.data||"";if(((_a=opts.encodeEntities)!==null&&_a!==void 0?_a:opts.decodeEntities)!==false&&!(!opts.xmlMode&&elem.parent&&unencodedElements.has(elem.parent.name))){data=opts.xmlMode||opts.encodeEntities!=="utf8"?(0,entities_1.encodeXML)(data):(0,entities_1.escapeText)(data)}return data}function renderCdata(elem){return"<![CDATA[".concat(elem.children[0].data,"]]>")}function renderComment(elem){return"\x3c!--".concat(elem.data,"--\x3e")}var __importDefault$3=commonjsGlobal&&commonjsGlobal.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(stringify$1,"__esModule",{value:true});stringify$1.innerText=stringify$1.textContent=stringify$1.getText=stringify$1.getInnerHTML=stringify$1.getOuterHTML=void 0;var domhandler_1$3=lib$4;var dom_serializer_1=__importDefault$3(lib$2);var domelementtype_1=lib$3;function getOuterHTML(node,options){return(0,dom_serializer_1.default)(node,options)}stringify$1.getOuterHTML=getOuterHTML;function getInnerHTML(node,options){return(0,domhandler_1$3.hasChildren)(node)?node.children.map((function(node){return getOuterHTML(node,options)})).join(""):""}stringify$1.getInnerHTML=getInnerHTML;function getText$1(node){if(Array.isArray(node))return node.map(getText$1).join("");if((0,domhandler_1$3.isTag)(node))return node.name==="br"?"\n":getText$1(node.children);if((0,domhandler_1$3.isCDATA)(node))return getText$1(node.children);if((0,domhandler_1$3.isText)(node))return node.data;return""}stringify$1.getText=getText$1;function textContent(node){if(Array.isArray(node))return node.map(textContent).join("");if((0,domhandler_1$3.hasChildren)(node)&&!(0,domhandler_1$3.isComment)(node)){return textContent(node.children)}if((0,domhandler_1$3.isText)(node))return node.data;return""}stringify$1.textContent=textContent;function innerText(node){if(Array.isArray(node))return node.map(innerText).join("");if((0,domhandler_1$3.hasChildren)(node)&&(node.type===domelementtype_1.ElementType.Tag||(0,domhandler_1$3.isCDATA)(node))){return innerText(node.children)}if((0,domhandler_1$3.isText)(node))return node.data;return""}stringify$1.innerText=innerText;var traversal={};Object.defineProperty(traversal,"__esModule",{value:true});traversal.prevElementSibling=traversal.nextElementSibling=traversal.getName=traversal.hasAttrib=traversal.getAttributeValue=traversal.getSiblings=traversal.getParent=traversal.getChildren=void 0;var domhandler_1$2=lib$4;function getChildren$1(elem){return(0,domhandler_1$2.hasChildren)(elem)?elem.children:[]}traversal.getChildren=getChildren$1;function getParent$1(elem){return elem.parent||null}traversal.getParent=getParent$1;function getSiblings$1(elem){var _a,_b;var parent=getParent$1(elem);if(parent!=null)return getChildren$1(parent);var siblings=[elem];var prev=elem.prev,next=elem.next;while(prev!=null){siblings.unshift(prev);_a=prev,prev=_a.prev}while(next!=null){siblings.push(next);_b=next,next=_b.next}return siblings}traversal.getSiblings=getSiblings$1;function getAttributeValue$1(elem,name){var _a;return(_a=elem.attribs)===null||_a===void 0?void 0:_a[name]}traversal.getAttributeValue=getAttributeValue$1;function hasAttrib$1(elem,name){return elem.attribs!=null&&Object.prototype.hasOwnProperty.call(elem.attribs,name)&&elem.attribs[name]!=null}traversal.hasAttrib=hasAttrib$1;function getName$1(elem){return elem.name}traversal.getName=getName$1;function nextElementSibling(elem){var _a;var next=elem.next;while(next!==null&&!(0,domhandler_1$2.isTag)(next))_a=next,next=_a.next;return next}traversal.nextElementSibling=nextElementSibling;function prevElementSibling(elem){var _a;var prev=elem.prev;while(prev!==null&&!(0,domhandler_1$2.isTag)(prev))_a=prev,prev=_a.prev;return prev}traversal.prevElementSibling=prevElementSibling;var manipulation={};Object.defineProperty(manipulation,"__esModule",{value:true});manipulation.prepend=manipulation.prependChild=manipulation.append=manipulation.appendChild=manipulation.replaceElement=manipulation.removeElement=void 0;function removeElement(elem){if(elem.prev)elem.prev.next=elem.next;if(elem.next)elem.next.prev=elem.prev;if(elem.parent){var childs=elem.parent.children;childs.splice(childs.lastIndexOf(elem),1)}}manipulation.removeElement=removeElement;function replaceElement(elem,replacement){var prev=replacement.prev=elem.prev;if(prev){prev.next=replacement}var next=replacement.next=elem.next;if(next){next.prev=replacement}var parent=replacement.parent=elem.parent;if(parent){var childs=parent.children;childs[childs.lastIndexOf(elem)]=replacement;elem.parent=null}}manipulation.replaceElement=replaceElement;function appendChild(elem,child){removeElement(child);child.next=null;child.parent=elem;if(elem.children.push(child)>1){var sibling=elem.children[elem.children.length-2];sibling.next=child;child.prev=sibling}else{child.prev=null}}manipulation.appendChild=appendChild;function append$1(elem,next){removeElement(next);var parent=elem.parent;var currNext=elem.next;next.next=currNext;next.prev=elem;elem.next=next;next.parent=parent;if(currNext){currNext.prev=next;if(parent){var childs=parent.children;childs.splice(childs.lastIndexOf(currNext),0,next)}}else if(parent){parent.children.push(next)}}manipulation.append=append$1;function prependChild(elem,child){removeElement(child);child.parent=elem;child.prev=null;if(elem.children.unshift(child)!==1){var sibling=elem.children[1];sibling.prev=child;child.next=sibling}else{child.next=null}}manipulation.prependChild=prependChild;function prepend(elem,prev){removeElement(prev);var parent=elem.parent;if(parent){var childs=parent.children;childs.splice(childs.indexOf(elem),0,prev)}if(elem.prev){elem.prev.next=prev}prev.parent=parent;prev.prev=elem.prev;prev.next=elem;elem.prev=prev}manipulation.prepend=prepend;var querying={};Object.defineProperty(querying,"__esModule",{value:true});querying.findAll=querying.existsOne=querying.findOne=querying.findOneChild=querying.find=querying.filter=void 0;var domhandler_1$1=lib$4;function filter(test,node,recurse,limit){if(recurse===void 0){recurse=true}if(limit===void 0){limit=Infinity}if(!Array.isArray(node))node=[node];return find$3(test,node,recurse,limit)}querying.filter=filter;function find$3(test,nodes,recurse,limit){var result=[];for(var _i=0,nodes_1=nodes;_i<nodes_1.length;_i++){var elem=nodes_1[_i];if(test(elem)){result.push(elem);if(--limit<=0)break}if(recurse&&(0,domhandler_1$1.hasChildren)(elem)&&elem.children.length>0){var children=find$3(test,elem.children,recurse,limit);result.push.apply(result,children);limit-=children.length;if(limit<=0)break}}return result}querying.find=find$3;function findOneChild(test,nodes){return nodes.find(test)}querying.findOneChild=findOneChild;function findOne$1(test,nodes,recurse){if(recurse===void 0){recurse=true}var elem=null;for(var i=0;i<nodes.length&&!elem;i++){var checked=nodes[i];if(!(0,domhandler_1$1.isTag)(checked)){continue}else if(test(checked)){elem=checked}else if(recurse&&checked.children.length>0){elem=findOne$1(test,checked.children,true)}}return elem}querying.findOne=findOne$1;function existsOne$1(test,nodes){return nodes.some((function(checked){return(0,domhandler_1$1.isTag)(checked)&&(test(checked)||checked.children.length>0&&existsOne$1(test,checked.children))}))}querying.existsOne=existsOne$1;function findAll$4(test,nodes){var _a;var result=[];var stack=nodes.filter(domhandler_1$1.isTag);var elem;while(elem=stack.shift()){var children=(_a=elem.children)===null||_a===void 0?void 0:_a.filter(domhandler_1$1.isTag);if(children&&children.length>0){stack.unshift.apply(stack,children)}if(test(elem))result.push(elem)}return result}querying.findAll=findAll$4;var legacy={};Object.defineProperty(legacy,"__esModule",{value:true});legacy.getElementsByTagType=legacy.getElementsByTagName=legacy.getElementById=legacy.getElements=legacy.testElement=void 0;var domhandler_1=lib$4;var querying_js_1=querying;var Checks={tag_name:function(name){if(typeof name==="function"){return function(elem){return(0,domhandler_1.isTag)(elem)&&name(elem.name)}}else if(name==="*"){return domhandler_1.isTag}return function(elem){return(0,domhandler_1.isTag)(elem)&&elem.name===name}},tag_type:function(type){if(typeof type==="function"){return function(elem){return type(elem.type)}}return function(elem){return elem.type===type}},tag_contains:function(data){if(typeof data==="function"){return function(elem){return(0,domhandler_1.isText)(elem)&&data(elem.data)}}return function(elem){return(0,domhandler_1.isText)(elem)&&elem.data===data}}};function getAttribCheck(attrib,value){if(typeof value==="function"){return function(elem){return(0,domhandler_1.isTag)(elem)&&value(elem.attribs[attrib])}}return function(elem){return(0,domhandler_1.isTag)(elem)&&elem.attribs[attrib]===value}}function combineFuncs(a,b){return function(elem){return a(elem)||b(elem)}}function compileTest(options){var funcs=Object.keys(options).map((function(key){var value=options[key];return Object.prototype.hasOwnProperty.call(Checks,key)?Checks[key](value):getAttribCheck(key,value)}));return funcs.length===0?null:funcs.reduce(combineFuncs)}function testElement(options,node){var test=compileTest(options);return test?test(node):true}legacy.testElement=testElement;function getElements(options,nodes,recurse,limit){if(limit===void 0){limit=Infinity}var test=compileTest(options);return test?(0,querying_js_1.filter)(test,nodes,recurse,limit):[]}legacy.getElements=getElements;function getElementById(id,nodes,recurse){if(recurse===void 0){recurse=true}if(!Array.isArray(nodes))nodes=[nodes];return(0,querying_js_1.findOne)(getAttribCheck("id",id),nodes,recurse)}legacy.getElementById=getElementById;function getElementsByTagName(tagName,nodes,recurse,limit){if(recurse===void 0){recurse=true}if(limit===void 0){limit=Infinity}return(0,querying_js_1.filter)(Checks["tag_name"](tagName),nodes,recurse,limit)}legacy.getElementsByTagName=getElementsByTagName;function getElementsByTagType(type,nodes,recurse,limit){if(recurse===void 0){recurse=true}if(limit===void 0){limit=Infinity}return(0,querying_js_1.filter)(Checks["tag_type"](type),nodes,recurse,limit)}legacy.getElementsByTagType=getElementsByTagType;var helpers={};(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.uniqueSort=exports.compareDocumentPosition=exports.DocumentPosition=exports.removeSubsets=void 0;var domhandler_1=lib$4;function removeSubsets(nodes){var idx=nodes.length;while(--idx>=0){var node=nodes[idx];if(idx>0&&nodes.lastIndexOf(node,idx-1)>=0){nodes.splice(idx,1);continue}for(var ancestor=node.parent;ancestor;ancestor=ancestor.parent){if(nodes.includes(ancestor)){nodes.splice(idx,1);break}}}return nodes}exports.removeSubsets=removeSubsets;var DocumentPosition;(function(DocumentPosition){DocumentPosition[DocumentPosition["DISCONNECTED"]=1]="DISCONNECTED";DocumentPosition[DocumentPosition["PRECEDING"]=2]="PRECEDING";DocumentPosition[DocumentPosition["FOLLOWING"]=4]="FOLLOWING";DocumentPosition[DocumentPosition["CONTAINS"]=8]="CONTAINS";DocumentPosition[DocumentPosition["CONTAINED_BY"]=16]="CONTAINED_BY"})(DocumentPosition=exports.DocumentPosition||(exports.DocumentPosition={}));function compareDocumentPosition(nodeA,nodeB){var aParents=[];var bParents=[];if(nodeA===nodeB){return 0}var current=(0,domhandler_1.hasChildren)(nodeA)?nodeA:nodeA.parent;while(current){aParents.unshift(current);current=current.parent}current=(0,domhandler_1.hasChildren)(nodeB)?nodeB:nodeB.parent;while(current){bParents.unshift(current);current=current.parent}var maxIdx=Math.min(aParents.length,bParents.length);var idx=0;while(idx<maxIdx&&aParents[idx]===bParents[idx]){idx++}if(idx===0){return DocumentPosition.DISCONNECTED}var sharedParent=aParents[idx-1];var siblings=sharedParent.children;var aSibling=aParents[idx];var bSibling=bParents[idx];if(siblings.indexOf(aSibling)>siblings.indexOf(bSibling)){if(sharedParent===nodeB){return DocumentPosition.FOLLOWING|DocumentPosition.CONTAINED_BY}return DocumentPosition.FOLLOWING}if(sharedParent===nodeA){return DocumentPosition.PRECEDING|DocumentPosition.CONTAINS}return DocumentPosition.PRECEDING}exports.compareDocumentPosition=compareDocumentPosition;function uniqueSort(nodes){nodes=nodes.filter((function(node,i,arr){return!arr.includes(node,i+1)}));nodes.sort((function(a,b){var relative=compareDocumentPosition(a,b);if(relative&DocumentPosition.PRECEDING){return-1}else if(relative&DocumentPosition.FOLLOWING){return 1}return 0}));return nodes}exports.uniqueSort=uniqueSort})(helpers);var feeds={};Object.defineProperty(feeds,"__esModule",{value:true});feeds.getFeed=void 0;var stringify_js_1=stringify$1;var legacy_js_1=legacy;function getFeed(doc){var feedRoot=getOneElement(isValidFeed,doc);return!feedRoot?null:feedRoot.name==="feed"?getAtomFeed(feedRoot):getRssFeed(feedRoot)}feeds.getFeed=getFeed;function getAtomFeed(feedRoot){var _a;var childs=feedRoot.children;var feed={type:"atom",items:(0,legacy_js_1.getElementsByTagName)("entry",childs).map((function(item){var _a;var children=item.children;var entry={media:getMediaElements(children)};addConditionally(entry,"id","id",children);addConditionally(entry,"title","title",children);var href=(_a=getOneElement("link",children))===null||_a===void 0?void 0:_a.attribs["href"];if(href){entry.link=href}var description=fetch("summary",children)||fetch("content",children);if(description){entry.description=description}var pubDate=fetch("updated",children);if(pubDate){entry.pubDate=new Date(pubDate)}return entry}))};addConditionally(feed,"id","id",childs);addConditionally(feed,"title","title",childs);var href=(_a=getOneElement("link",childs))===null||_a===void 0?void 0:_a.attribs["href"];if(href){feed.link=href}addConditionally(feed,"description","subtitle",childs);var updated=fetch("updated",childs);if(updated){feed.updated=new Date(updated)}addConditionally(feed,"author","email",childs,true);return feed}function getRssFeed(feedRoot){var _a,_b;var childs=(_b=(_a=getOneElement("channel",feedRoot.children))===null||_a===void 0?void 0:_a.children)!==null&&_b!==void 0?_b:[];var feed={type:feedRoot.name.substr(0,3),id:"",items:(0,legacy_js_1.getElementsByTagName)("item",feedRoot.children).map((function(item){var children=item.children;var entry={media:getMediaElements(children)};addConditionally(entry,"id","guid",children);addConditionally(entry,"title","title",children);addConditionally(entry,"link","link",children);addConditionally(entry,"description","description",children);var pubDate=fetch("pubDate",children);if(pubDate)entry.pubDate=new Date(pubDate);return entry}))};addConditionally(feed,"title","title",childs);addConditionally(feed,"link","link",childs);addConditionally(feed,"description","description",childs);var updated=fetch("lastBuildDate",childs);if(updated){feed.updated=new Date(updated)}addConditionally(feed,"author","managingEditor",childs,true);return feed}var MEDIA_KEYS_STRING=["url","type","lang"];var MEDIA_KEYS_INT=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function getMediaElements(where){return(0,legacy_js_1.getElementsByTagName)("media:content",where).map((function(elem){var attribs=elem.attribs;var media={medium:attribs["medium"],isDefault:!!attribs["isDefault"]};for(var _i=0,MEDIA_KEYS_STRING_1=MEDIA_KEYS_STRING;_i<MEDIA_KEYS_STRING_1.length;_i++){var attrib=MEDIA_KEYS_STRING_1[_i];if(attribs[attrib]){media[attrib]=attribs[attrib]}}for(var _a=0,MEDIA_KEYS_INT_1=MEDIA_KEYS_INT;_a<MEDIA_KEYS_INT_1.length;_a++){var attrib=MEDIA_KEYS_INT_1[_a];if(attribs[attrib]){media[attrib]=parseInt(attribs[attrib],10)}}if(attribs["expression"]){media.expression=attribs["expression"]}return media}))}function getOneElement(tagName,node){return(0,legacy_js_1.getElementsByTagName)(tagName,node,true,1)[0]}function fetch(tagName,where,recurse){if(recurse===void 0){recurse=false}return(0,stringify_js_1.textContent)((0,legacy_js_1.getElementsByTagName)(tagName,where,recurse,1)).trim()}function addConditionally(obj,prop,tagName,where,recurse){if(recurse===void 0){recurse=false}var val=fetch(tagName,where,recurse);if(val)obj[prop]=val}function isValidFeed(value){return value==="rss"||value==="feed"||value==="rdf:RDF"}(function(exports){var __createBinding=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(o,m,k,k2){if(k2===undefined)k2=k;var desc=Object.getOwnPropertyDescriptor(m,k);if(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable)){desc={enumerable:true,get:function(){return m[k]}}}Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){if(k2===undefined)k2=k;o[k2]=m[k]});var __exportStar=commonjsGlobal&&commonjsGlobal.__exportStar||function(m,exports){for(var p in m)if(p!=="default"&&!Object.prototype.hasOwnProperty.call(exports,p))__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:true});exports.hasChildren=exports.isDocument=exports.isComment=exports.isText=exports.isCDATA=exports.isTag=void 0;__exportStar(stringify$1,exports);__exportStar(traversal,exports);__exportStar(manipulation,exports);__exportStar(querying,exports);__exportStar(legacy,exports);__exportStar(helpers,exports);__exportStar(feeds,exports);var domhandler_1=lib$4;Object.defineProperty(exports,"isTag",{enumerable:true,get:function(){return domhandler_1.isTag}});Object.defineProperty(exports,"isCDATA",{enumerable:true,get:function(){return domhandler_1.isCDATA}});Object.defineProperty(exports,"isText",{enumerable:true,get:function(){return domhandler_1.isText}});Object.defineProperty(exports,"isComment",{enumerable:true,get:function(){return domhandler_1.isComment}});Object.defineProperty(exports,"isDocument",{enumerable:true,get:function(){return domhandler_1.isDocument}});Object.defineProperty(exports,"hasChildren",{enumerable:true,get:function(){return domhandler_1.hasChildren}})})(lib$5);var boolbase={trueFunc:function trueFunc(){return true},falseFunc:function falseFunc(){return false}};var compile$3={};var SelectorType;(function(SelectorType){SelectorType["Attribute"]="attribute";SelectorType["Pseudo"]="pseudo";SelectorType["PseudoElement"]="pseudo-element";SelectorType["Tag"]="tag";SelectorType["Universal"]="universal";SelectorType["Adjacent"]="adjacent";SelectorType["Child"]="child";SelectorType["Descendant"]="descendant";SelectorType["Parent"]="parent";SelectorType["Sibling"]="sibling";SelectorType["ColumnCombinator"]="column-combinator"})(SelectorType||(SelectorType={}));const IgnoreCaseMode={Unknown:null,QuirksMode:"quirks",IgnoreCase:true,CaseSensitive:false};var AttributeAction;(function(AttributeAction){AttributeAction["Any"]="any";AttributeAction["Element"]="element";AttributeAction["End"]="end";AttributeAction["Equals"]="equals";AttributeAction["Exists"]="exists";AttributeAction["Hyphen"]="hyphen";AttributeAction["Not"]="not";AttributeAction["Start"]="start"})(AttributeAction||(AttributeAction={}));const reName=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/;const reEscape=/\\([\da-f]{1,6}\s?|(\s)|.)/gi;const actionTypes=new Map([[126,AttributeAction.Element],[94,AttributeAction.Start],[36,AttributeAction.End],[42,AttributeAction.Any],[33,AttributeAction.Not],[124,AttributeAction.Hyphen]]);const unpackPseudos=new Set(["has","not","matches","is","where","host","host-context"]);function isTraversal$1(selector){switch(selector.type){case SelectorType.Adjacent:case SelectorType.Child:case SelectorType.Descendant:case SelectorType.Parent:case SelectorType.Sibling:case SelectorType.ColumnCombinator:return true;default:return false}}const stripQuotesFromPseudos=new Set(["contains","icontains"]);function funescape(_,escaped,escapedWhitespace){const high=parseInt(escaped,16)-65536;return high!==high||escapedWhitespace?escaped:high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,high&1023|56320)}function unescapeCSS(str){return str.replace(reEscape,funescape)}function isQuote(c){return c===39||c===34}function isWhitespace(c){return c===32||c===9||c===10||c===12||c===13}function parse$1x(selector){const subselects=[];const endIndex=parseSelector(subselects,`${selector}`,0);if(endIndex<selector.length){throw new Error(`Unmatched selector: ${selector.slice(endIndex)}`)}return subselects}function parseSelector(subselects,selector,selectorIndex){let tokens=[];function getName(offset){const match=selector.slice(selectorIndex+offset).match(reName);if(!match){throw new Error(`Expected name, found ${selector.slice(selectorIndex)}`)}const[name]=match;selectorIndex+=offset+name.length;return unescapeCSS(name)}function stripWhitespace(offset){selectorIndex+=offset;while(selectorIndex<selector.length&&isWhitespace(selector.charCodeAt(selectorIndex))){selectorIndex++}}function readValueWithParenthesis(){selectorIndex+=1;const start=selectorIndex;let counter=1;for(;counter>0&&selectorIndex<selector.length;selectorIndex++){if(selector.charCodeAt(selectorIndex)===40&&!isEscaped(selectorIndex)){counter++}else if(selector.charCodeAt(selectorIndex)===41&&!isEscaped(selectorIndex)){counter--}}if(counter){throw new Error("Parenthesis not matched")}return unescapeCSS(selector.slice(start,selectorIndex-1))}function isEscaped(pos){let slashCount=0;while(selector.charCodeAt(--pos)===92)slashCount++;return(slashCount&1)===1}function ensureNotTraversal(){if(tokens.length>0&&isTraversal$1(tokens[tokens.length-1])){throw new Error("Did not expect successive traversals.")}}function addTraversal(type){if(tokens.length>0&&tokens[tokens.length-1].type===SelectorType.Descendant){tokens[tokens.length-1].type=type;return}ensureNotTraversal();tokens.push({type:type})}function addSpecialAttribute(name,action){tokens.push({type:SelectorType.Attribute,name:name,action:action,value:getName(1),namespace:null,ignoreCase:"quirks"})}function finalizeSubselector(){if(tokens.length&&tokens[tokens.length-1].type===SelectorType.Descendant){tokens.pop()}if(tokens.length===0){throw new Error("Empty sub-selector")}subselects.push(tokens)}stripWhitespace(0);if(selector.length===selectorIndex){return selectorIndex}loop:while(selectorIndex<selector.length){const firstChar=selector.charCodeAt(selectorIndex);switch(firstChar){case 32:case 9:case 10:case 12:case 13:{if(tokens.length===0||tokens[0].type!==SelectorType.Descendant){ensureNotTraversal();tokens.push({type:SelectorType.Descendant})}stripWhitespace(1);break}case 62:{addTraversal(SelectorType.Child);stripWhitespace(1);break}case 60:{addTraversal(SelectorType.Parent);stripWhitespace(1);break}case 126:{addTraversal(SelectorType.Sibling);stripWhitespace(1);break}case 43:{addTraversal(SelectorType.Adjacent);stripWhitespace(1);break}case 46:{addSpecialAttribute("class",AttributeAction.Element);break}case 35:{addSpecialAttribute("id",AttributeAction.Equals);break}case 91:{stripWhitespace(1);let name;let namespace=null;if(selector.charCodeAt(selectorIndex)===124){name=getName(1)}else if(selector.startsWith("*|",selectorIndex)){namespace="*";name=getName(2)}else{name=getName(0);if(selector.charCodeAt(selectorIndex)===124&&selector.charCodeAt(selectorIndex+1)!==61){namespace=name;name=getName(1)}}stripWhitespace(0);let action=AttributeAction.Exists;const possibleAction=actionTypes.get(selector.charCodeAt(selectorIndex));if(possibleAction){action=possibleAction;if(selector.charCodeAt(selectorIndex+1)!==61){throw new Error("Expected `=`")}stripWhitespace(2)}else if(selector.charCodeAt(selectorIndex)===61){action=AttributeAction.Equals;stripWhitespace(1)}let value="";let ignoreCase=null;if(action!=="exists"){if(isQuote(selector.charCodeAt(selectorIndex))){const quote=selector.charCodeAt(selectorIndex);let sectionEnd=selectorIndex+1;while(sectionEnd<selector.length&&(selector.charCodeAt(sectionEnd)!==quote||isEscaped(sectionEnd))){sectionEnd+=1}if(selector.charCodeAt(sectionEnd)!==quote){throw new Error("Attribute value didn't end")}value=unescapeCSS(selector.slice(selectorIndex+1,sectionEnd));selectorIndex=sectionEnd+1}else{const valueStart=selectorIndex;while(selectorIndex<selector.length&&(!isWhitespace(selector.charCodeAt(selectorIndex))&&selector.charCodeAt(selectorIndex)!==93||isEscaped(selectorIndex))){selectorIndex+=1}value=unescapeCSS(selector.slice(valueStart,selectorIndex))}stripWhitespace(0);const forceIgnore=selector.charCodeAt(selectorIndex)|32;if(forceIgnore===115){ignoreCase=false;stripWhitespace(1)}else if(forceIgnore===105){ignoreCase=true;stripWhitespace(1)}}if(selector.charCodeAt(selectorIndex)!==93){throw new Error("Attribute selector didn't terminate")}selectorIndex+=1;const attributeSelector={type:SelectorType.Attribute,name:name,action:action,value:value,namespace:namespace,ignoreCase:ignoreCase};tokens.push(attributeSelector);break}case 58:{if(selector.charCodeAt(selectorIndex+1)===58){tokens.push({type:SelectorType.PseudoElement,name:getName(2).toLowerCase(),data:selector.charCodeAt(selectorIndex)===40?readValueWithParenthesis():null});continue}const name=getName(1).toLowerCase();let data=null;if(selector.charCodeAt(selectorIndex)===40){if(unpackPseudos.has(name)){if(isQuote(selector.charCodeAt(selectorIndex+1))){throw new Error(`Pseudo-selector ${name} cannot be quoted`)}data=[];selectorIndex=parseSelector(data,selector,selectorIndex+1);if(selector.charCodeAt(selectorIndex)!==41){throw new Error(`Missing closing parenthesis in :${name} (${selector})`)}selectorIndex+=1}else{data=readValueWithParenthesis();if(stripQuotesFromPseudos.has(name)){const quot=data.charCodeAt(0);if(quot===data.charCodeAt(data.length-1)&&isQuote(quot)){data=data.slice(1,-1)}}data=unescapeCSS(data)}}tokens.push({type:SelectorType.Pseudo,name:name,data:data});break}case 44:{finalizeSubselector();tokens=[];stripWhitespace(1);break}default:{if(selector.startsWith("/*",selectorIndex)){const endIndex=selector.indexOf("*/",selectorIndex+2);if(endIndex<0){throw new Error("Comment was not terminated")}selectorIndex=endIndex+2;if(tokens.length===0){stripWhitespace(0)}break}let namespace=null;let name;if(firstChar===42){selectorIndex+=1;name="*"}else if(firstChar===124){name="";if(selector.charCodeAt(selectorIndex+1)===124){addTraversal(SelectorType.ColumnCombinator);stripWhitespace(2);break}}else if(reName.test(selector.slice(selectorIndex))){name=getName(0)}else{break loop}if(selector.charCodeAt(selectorIndex)===124&&selector.charCodeAt(selectorIndex+1)!==124){namespace=name;if(selector.charCodeAt(selectorIndex+1)===42){name="*";selectorIndex+=2}else{name=getName(1)}}tokens.push(name==="*"?{type:SelectorType.Universal,namespace:namespace}:{type:SelectorType.Tag,name:name,namespace:namespace})}}}finalizeSubselector();return selectorIndex}const attribValChars=["\\",'"'];const pseudoValChars=[...attribValChars,"(",")"];const charsToEscapeInAttributeValue=new Set(attribValChars.map((c=>c.charCodeAt(0))));const charsToEscapeInPseudoValue=new Set(pseudoValChars.map((c=>c.charCodeAt(0))));const charsToEscapeInName=new Set([...pseudoValChars,"~","^","$","*","+","!","|",":","[","]"," ","."].map((c=>c.charCodeAt(0))));function stringify(selector){return selector.map((token=>token.map(stringifyToken).join(""))).join(", ")}function stringifyToken(token,index,arr){switch(token.type){case SelectorType.Child:return index===0?"> ":" > ";case SelectorType.Parent:return index===0?"< ":" < ";case SelectorType.Sibling:return index===0?"~ ":" ~ ";case SelectorType.Adjacent:return index===0?"+ ":" + ";case SelectorType.Descendant:return" ";case SelectorType.ColumnCombinator:return index===0?"|| ":" || ";case SelectorType.Universal:return token.namespace==="*"&&index+1<arr.length&&"name"in arr[index+1]?"":`${getNamespace(token.namespace)}*`;case SelectorType.Tag:return getNamespacedName(token);case SelectorType.PseudoElement:return`::${escapeName(token.name,charsToEscapeInName)}${token.data===null?"":`(${escapeName(token.data,charsToEscapeInPseudoValue)})`}`;case SelectorType.Pseudo:return`:${escapeName(token.name,charsToEscapeInName)}${token.data===null?"":`(${typeof token.data==="string"?escapeName(token.data,charsToEscapeInPseudoValue):stringify(token.data)})`}`;case SelectorType.Attribute:{if(token.name==="id"&&token.action===AttributeAction.Equals&&token.ignoreCase==="quirks"&&!token.namespace){return`#${escapeName(token.value,charsToEscapeInName)}`}if(token.name==="class"&&token.action===AttributeAction.Element&&token.ignoreCase==="quirks"&&!token.namespace){return`.${escapeName(token.value,charsToEscapeInName)}`}const name=getNamespacedName(token);if(token.action===AttributeAction.Exists){return`[${name}]`}return`[${name}${getActionValue(token.action)}="${escapeName(token.value,charsToEscapeInAttributeValue)}"${token.ignoreCase===null?"":token.ignoreCase?" i":" s"}]`}}}function getActionValue(action){switch(action){case AttributeAction.Equals:return"";case AttributeAction.Element:return"~";case AttributeAction.Start:return"^";case AttributeAction.End:return"$";case AttributeAction.Any:return"*";case AttributeAction.Not:return"!";case AttributeAction.Hyphen:return"|";case AttributeAction.Exists:throw new Error("Shouldn't be here")}}function getNamespacedName(token){return`${getNamespace(token.namespace)}${escapeName(token.name,charsToEscapeInName)}`}function getNamespace(namespace){return namespace!==null?`${namespace==="*"?"*":escapeName(namespace,charsToEscapeInName)}|`:""}function escapeName(str,charsToEscape){let lastIdx=0;let ret="";for(let i=0;i<str.length;i++){if(charsToEscape.has(str.charCodeAt(i))){ret+=`${str.slice(lastIdx,i)}\\${str.charAt(i)}`;lastIdx=i+1}}return ret.length>0?ret+str.slice(lastIdx):str}var es=Object.freeze({__proto__:null,isTraversal:isTraversal$1,parse:parse$1x,stringify:stringify,get SelectorType(){return SelectorType},IgnoreCaseMode:IgnoreCaseMode,get AttributeAction(){return AttributeAction}});var require$$1=getAugmentedNamespace(es);var sort={};Object.defineProperty(sort,"__esModule",{value:true});sort.isTraversal=void 0;var css_what_1$2=require$$1;var procedure=new Map([[css_what_1$2.SelectorType.Universal,50],[css_what_1$2.SelectorType.Tag,30],[css_what_1$2.SelectorType.Attribute,1],[css_what_1$2.SelectorType.Pseudo,0]]);function isTraversal(token){return!procedure.has(token.type)}sort.isTraversal=isTraversal;var attributes$1=new Map([[css_what_1$2.AttributeAction.Exists,10],[css_what_1$2.AttributeAction.Equals,8],[css_what_1$2.AttributeAction.Not,7],[css_what_1$2.AttributeAction.Start,6],[css_what_1$2.AttributeAction.End,6],[css_what_1$2.AttributeAction.Any,5]]);function sortByProcedure(arr){var procs=arr.map(getProcedure);for(var i=1;i<arr.length;i++){var procNew=procs[i];if(procNew<0)continue;for(var j=i-1;j>=0&&procNew<procs[j];j--){var token=arr[j+1];arr[j+1]=arr[j];arr[j]=token;procs[j+1]=procs[j];procs[j]=procNew}}}sort.default=sortByProcedure;function getProcedure(token){var _a,_b;var proc=(_a=procedure.get(token.type))!==null&&_a!==void 0?_a:-1;if(token.type===css_what_1$2.SelectorType.Attribute){proc=(_b=attributes$1.get(token.action))!==null&&_b!==void 0?_b:4;if(token.action===css_what_1$2.AttributeAction.Equals&&token.name==="id"){proc=9}if(token.ignoreCase){proc>>=1}}else if(token.type===css_what_1$2.SelectorType.Pseudo){if(!token.data){proc=3}else if(token.name==="has"||token.name==="contains"){proc=0}else if(Array.isArray(token.data)){proc=Math.min.apply(Math,token.data.map((function(d){return Math.min.apply(Math,d.map(getProcedure))})));if(proc<0){proc=0}}else{proc=2}}return proc}var general={};var attributes={};var __importDefault$2=commonjsGlobal&&commonjsGlobal.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(attributes,"__esModule",{value:true});attributes.attributeRules=void 0;var boolbase_1$2=__importDefault$2(boolbase);var reChars=/[-[\]{}()*+?.,\\^$|#\s]/g;function escapeRegex(value){return value.replace(reChars,"\\$&")}var caseInsensitiveAttributes=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function shouldIgnoreCase(selector,options){return typeof selector.ignoreCase==="boolean"?selector.ignoreCase:selector.ignoreCase==="quirks"?!!options.quirksMode:!options.xmlMode&&caseInsensitiveAttributes.has(selector.name)}attributes.attributeRules={equals:function(next,data,options){var adapter=options.adapter;var name=data.name;var value=data.value;if(shouldIgnoreCase(data,options)){value=value.toLowerCase();return function(elem){var attr=adapter.getAttributeValue(elem,name);return attr!=null&&attr.length===value.length&&attr.toLowerCase()===value&&next(elem)}}return function(elem){return adapter.getAttributeValue(elem,name)===value&&next(elem)}},hyphen:function(next,data,options){var adapter=options.adapter;var name=data.name;var value=data.value;var len=value.length;if(shouldIgnoreCase(data,options)){value=value.toLowerCase();return function hyphenIC(elem){var attr=adapter.getAttributeValue(elem,name);return attr!=null&&(attr.length===len||attr.charAt(len)==="-")&&attr.substr(0,len).toLowerCase()===value&&next(elem)}}return function hyphen(elem){var attr=adapter.getAttributeValue(elem,name);return attr!=null&&(attr.length===len||attr.charAt(len)==="-")&&attr.substr(0,len)===value&&next(elem)}},element:function(next,data,options){var adapter=options.adapter;var name=data.name,value=data.value;if(/\s/.test(value)){return boolbase_1$2.default.falseFunc}var regex=new RegExp("(?:^|\\s)".concat(escapeRegex(value),"(?:$|\\s)"),shouldIgnoreCase(data,options)?"i":"");return function element(elem){var attr=adapter.getAttributeValue(elem,name);return attr!=null&&attr.length>=value.length&&regex.test(attr)&&next(elem)}},exists:function(next,_a,_b){var name=_a.name;var adapter=_b.adapter;return function(elem){return adapter.hasAttrib(elem,name)&&next(elem)}},start:function(next,data,options){var adapter=options.adapter;var name=data.name;var value=data.value;var len=value.length;if(len===0){return boolbase_1$2.default.falseFunc}if(shouldIgnoreCase(data,options)){value=value.toLowerCase();return function(elem){var attr=adapter.getAttributeValue(elem,name);return attr!=null&&attr.length>=len&&attr.substr(0,len).toLowerCase()===value&&next(elem)}}return function(elem){var _a;return!!((_a=adapter.getAttributeValue(elem,name))===null||_a===void 0?void 0:_a.startsWith(value))&&next(elem)}},end:function(next,data,options){var adapter=options.adapter;var name=data.name;var value=data.value;var len=-value.length;if(len===0){return boolbase_1$2.default.falseFunc}if(shouldIgnoreCase(data,options)){value=value.toLowerCase();return function(elem){var _a;return((_a=adapter.getAttributeValue(elem,name))===null||_a===void 0?void 0:_a.substr(len).toLowerCase())===value&&next(elem)}}return function(elem){var _a;return!!((_a=adapter.getAttributeValue(elem,name))===null||_a===void 0?void 0:_a.endsWith(value))&&next(elem)}},any:function(next,data,options){var adapter=options.adapter;var name=data.name,value=data.value;if(value===""){return boolbase_1$2.default.falseFunc}if(shouldIgnoreCase(data,options)){var regex_1=new RegExp(escapeRegex(value),"i");return function anyIC(elem){var attr=adapter.getAttributeValue(elem,name);return attr!=null&&attr.length>=value.length&&regex_1.test(attr)&&next(elem)}}return function(elem){var _a;return!!((_a=adapter.getAttributeValue(elem,name))===null||_a===void 0?void 0:_a.includes(value))&&next(elem)}},not:function(next,data,options){var adapter=options.adapter;var name=data.name;var value=data.value;if(value===""){return function(elem){return!!adapter.getAttributeValue(elem,name)&&next(elem)}}else if(shouldIgnoreCase(data,options)){value=value.toLowerCase();return function(elem){var attr=adapter.getAttributeValue(elem,name);return(attr==null||attr.length!==value.length||attr.toLowerCase()!==value)&&next(elem)}}return function(elem){return adapter.getAttributeValue(elem,name)!==value&&next(elem)}}};var pseudoSelectors={};var filters$1={};var lib={};var parse$1w={};Object.defineProperty(parse$1w,"__esModule",{value:true});parse$1w.parse=void 0;var whitespace=new Set([9,10,12,13,32]);var ZERO="0".charCodeAt(0);var NINE="9".charCodeAt(0);function parse$1v(formula){formula=formula.trim().toLowerCase();if(formula==="even"){return[2,0]}else if(formula==="odd"){return[2,1]}var idx=0;var a=0;var sign=readSign();var number=readNumber();if(idx<formula.length&&formula.charAt(idx)==="n"){idx++;a=sign*(number!==null&&number!==void 0?number:1);skipWhitespace();if(idx<formula.length){sign=readSign();skipWhitespace();number=readNumber()}else{sign=number=0}}if(number===null||idx<formula.length){throw new Error("n-th rule couldn't be parsed ('".concat(formula,"')"))}return[a,sign*number];function readSign(){if(formula.charAt(idx)==="-"){idx++;return-1}if(formula.charAt(idx)==="+"){idx++}return 1}function readNumber(){var start=idx;var value=0;while(idx<formula.length&&formula.charCodeAt(idx)>=ZERO&&formula.charCodeAt(idx)<=NINE){value=value*10+(formula.charCodeAt(idx)-ZERO);idx++}return idx===start?null:value}function skipWhitespace(){while(idx<formula.length&&whitespace.has(formula.charCodeAt(idx))){idx++}}}parse$1w.parse=parse$1v;var compile$2={};var __importDefault$1=commonjsGlobal&&commonjsGlobal.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(compile$2,"__esModule",{value:true});compile$2.generate=compile$2.compile=void 0;var boolbase_1$1=__importDefault$1(boolbase);function compile$1(parsed){var a=parsed[0];var b=parsed[1]-1;if(b<0&&a<=0)return boolbase_1$1.default.falseFunc;if(a===-1)return function(index){return index<=b};if(a===0)return function(index){return index===b};if(a===1)return b<0?boolbase_1$1.default.trueFunc:function(index){return index>=b};var absA=Math.abs(a);var bMod=(b%absA+absA)%absA;return a>1?function(index){return index>=b&&index%absA===bMod}:function(index){return index<=b&&index%absA===bMod}}compile$2.compile=compile$1;function generate$1v(parsed){var a=parsed[0];var b=parsed[1]-1;var n=0;if(a<0){var aPos_1=-a;var minValue_1=(b%aPos_1+aPos_1)%aPos_1;return function(){var val=minValue_1+aPos_1*n++;return val>b?null:val}}if(a===0)return b<0?function(){return null}:function(){return n++===0?b:null};if(b<0){b+=a*Math.ceil(-b/a)}return function(){return a*n+++b}}compile$2.generate=generate$1v;(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.sequence=exports.generate=exports.compile=exports.parse=void 0;var parse_js_1=parse$1w;Object.defineProperty(exports,"parse",{enumerable:true,get:function(){return parse_js_1.parse}});var compile_js_1=compile$2;Object.defineProperty(exports,"compile",{enumerable:true,get:function(){return compile_js_1.compile}});Object.defineProperty(exports,"generate",{enumerable:true,get:function(){return compile_js_1.generate}});function nthCheck(formula){return(0,compile_js_1.compile)((0,parse_js_1.parse)(formula))}exports.default=nthCheck;function sequence(formula){return(0,compile_js_1.generate)((0,parse_js_1.parse)(formula))}exports.sequence=sequence})(lib);(function(exports){var __importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:true});exports.filters=void 0;var nth_check_1=__importDefault(lib);var boolbase_1=__importDefault(boolbase);function getChildFunc(next,adapter){return function(elem){var parent=adapter.getParent(elem);return parent!=null&&adapter.isTag(parent)&&next(elem)}}exports.filters={contains:function(next,text,_a){var adapter=_a.adapter;return function contains(elem){return next(elem)&&adapter.getText(elem).includes(text)}},icontains:function(next,text,_a){var adapter=_a.adapter;var itext=text.toLowerCase();return function icontains(elem){return next(elem)&&adapter.getText(elem).toLowerCase().includes(itext)}},"nth-child":function(next,rule,_a){var adapter=_a.adapter,equals=_a.equals;var func=(0,nth_check_1.default)(rule);if(func===boolbase_1.default.falseFunc)return boolbase_1.default.falseFunc;if(func===boolbase_1.default.trueFunc)return getChildFunc(next,adapter);return function nthChild(elem){var siblings=adapter.getSiblings(elem);var pos=0;for(var i=0;i<siblings.length;i++){if(equals(elem,siblings[i]))break;if(adapter.isTag(siblings[i])){pos++}}return func(pos)&&next(elem)}},"nth-last-child":function(next,rule,_a){var adapter=_a.adapter,equals=_a.equals;var func=(0,nth_check_1.default)(rule);if(func===boolbase_1.default.falseFunc)return boolbase_1.default.falseFunc;if(func===boolbase_1.default.trueFunc)return getChildFunc(next,adapter);return function nthLastChild(elem){var siblings=adapter.getSiblings(elem);var pos=0;for(var i=siblings.length-1;i>=0;i--){if(equals(elem,siblings[i]))break;if(adapter.isTag(siblings[i])){pos++}}return func(pos)&&next(elem)}},"nth-of-type":function(next,rule,_a){var adapter=_a.adapter,equals=_a.equals;var func=(0,nth_check_1.default)(rule);if(func===boolbase_1.default.falseFunc)return boolbase_1.default.falseFunc;if(func===boolbase_1.default.trueFunc)return getChildFunc(next,adapter);return function nthOfType(elem){var siblings=adapter.getSiblings(elem);var pos=0;for(var i=0;i<siblings.length;i++){var currentSibling=siblings[i];if(equals(elem,currentSibling))break;if(adapter.isTag(currentSibling)&&adapter.getName(currentSibling)===adapter.getName(elem)){pos++}}return func(pos)&&next(elem)}},"nth-last-of-type":function(next,rule,_a){var adapter=_a.adapter,equals=_a.equals;var func=(0,nth_check_1.default)(rule);if(func===boolbase_1.default.falseFunc)return boolbase_1.default.falseFunc;if(func===boolbase_1.default.trueFunc)return getChildFunc(next,adapter);return function nthLastOfType(elem){var siblings=adapter.getSiblings(elem);var pos=0;for(var i=siblings.length-1;i>=0;i--){var currentSibling=siblings[i];if(equals(elem,currentSibling))break;if(adapter.isTag(currentSibling)&&adapter.getName(currentSibling)===adapter.getName(elem)){pos++}}return func(pos)&&next(elem)}},root:function(next,_rule,_a){var adapter=_a.adapter;return function(elem){var parent=adapter.getParent(elem);return(parent==null||!adapter.isTag(parent))&&next(elem)}},scope:function(next,rule,options,context){var equals=options.equals;if(!context||context.length===0){return exports.filters["root"](next,rule,options)}if(context.length===1){return function(elem){return equals(context[0],elem)&&next(elem)}}return function(elem){return context.includes(elem)&&next(elem)}},hover:dynamicStatePseudo("isHovered"),visited:dynamicStatePseudo("isVisited"),active:dynamicStatePseudo("isActive")};function dynamicStatePseudo(name){return function dynamicPseudo(next,_rule,_a){var adapter=_a.adapter;var func=adapter[name];if(typeof func!=="function"){return boolbase_1.default.falseFunc}return function active(elem){return func(elem)&&next(elem)}}}})(filters$1);var pseudos={};Object.defineProperty(pseudos,"__esModule",{value:true});pseudos.verifyPseudoArgs=pseudos.pseudos=void 0;pseudos.pseudos={empty:function(elem,_a){var adapter=_a.adapter;return!adapter.getChildren(elem).some((function(elem){return adapter.isTag(elem)||adapter.getText(elem)!==""}))},"first-child":function(elem,_a){var adapter=_a.adapter,equals=_a.equals;if(adapter.prevElementSibling){return adapter.prevElementSibling(elem)==null}var firstChild=adapter.getSiblings(elem).find((function(elem){return adapter.isTag(elem)}));return firstChild!=null&&equals(elem,firstChild)},"last-child":function(elem,_a){var adapter=_a.adapter,equals=_a.equals;var siblings=adapter.getSiblings(elem);for(var i=siblings.length-1;i>=0;i--){if(equals(elem,siblings[i]))return true;if(adapter.isTag(siblings[i]))break}return false},"first-of-type":function(elem,_a){var adapter=_a.adapter,equals=_a.equals;var siblings=adapter.getSiblings(elem);var elemName=adapter.getName(elem);for(var i=0;i<siblings.length;i++){var currentSibling=siblings[i];if(equals(elem,currentSibling))return true;if(adapter.isTag(currentSibling)&&adapter.getName(currentSibling)===elemName){break}}return false},"last-of-type":function(elem,_a){var adapter=_a.adapter,equals=_a.equals;var siblings=adapter.getSiblings(elem);var elemName=adapter.getName(elem);for(var i=siblings.length-1;i>=0;i--){var currentSibling=siblings[i];if(equals(elem,currentSibling))return true;if(adapter.isTag(currentSibling)&&adapter.getName(currentSibling)===elemName){break}}return false},"only-of-type":function(elem,_a){var adapter=_a.adapter,equals=_a.equals;var elemName=adapter.getName(elem);return adapter.getSiblings(elem).every((function(sibling){return equals(elem,sibling)||!adapter.isTag(sibling)||adapter.getName(sibling)!==elemName}))},"only-child":function(elem,_a){var adapter=_a.adapter,equals=_a.equals;return adapter.getSiblings(elem).every((function(sibling){return equals(elem,sibling)||!adapter.isTag(sibling)}))}};function verifyPseudoArgs(func,name,subselect,argIndex){if(subselect===null){if(func.length>argIndex){throw new Error("Pseudo-class :".concat(name," requires an argument"))}}else if(func.length===argIndex){throw new Error("Pseudo-class :".concat(name," doesn't have any arguments"))}}pseudos.verifyPseudoArgs=verifyPseudoArgs;var aliases={};Object.defineProperty(aliases,"__esModule",{value:true});aliases.aliases=void 0;aliases.aliases={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:":is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] > option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )",enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"};var subselects={};(function(exports){var __spreadArray=commonjsGlobal&&commonjsGlobal.__spreadArray||function(to,from,pack){if(pack||arguments.length===2)for(var i=0,l=from.length,ar;i<l;i++){if(ar||!(i in from)){if(!ar)ar=Array.prototype.slice.call(from,0,i);ar[i]=from[i]}}return to.concat(ar||Array.prototype.slice.call(from))};var __importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:true});exports.subselects=exports.getNextSiblings=exports.ensureIsTag=exports.PLACEHOLDER_ELEMENT=void 0;var boolbase_1=__importDefault(boolbase);var sort_js_1=sort;exports.PLACEHOLDER_ELEMENT={};function ensureIsTag(next,adapter){if(next===boolbase_1.default.falseFunc)return boolbase_1.default.falseFunc;return function(elem){return adapter.isTag(elem)&&next(elem)}}exports.ensureIsTag=ensureIsTag;function getNextSiblings(elem,adapter){var siblings=adapter.getSiblings(elem);if(siblings.length<=1)return[];var elemIndex=siblings.indexOf(elem);if(elemIndex<0||elemIndex===siblings.length-1)return[];return siblings.slice(elemIndex+1).filter(adapter.isTag)}exports.getNextSiblings=getNextSiblings;function copyOptions(options){return{xmlMode:!!options.xmlMode,lowerCaseAttributeNames:!!options.lowerCaseAttributeNames,lowerCaseTags:!!options.lowerCaseTags,quirksMode:!!options.quirksMode,cacheResults:!!options.cacheResults,pseudos:options.pseudos,adapter:options.adapter,equals:options.equals}}var is=function(next,token,options,context,compileToken){var func=compileToken(token,copyOptions(options),context);return func===boolbase_1.default.trueFunc?next:func===boolbase_1.default.falseFunc?boolbase_1.default.falseFunc:function(elem){return func(elem)&&next(elem)}};exports.subselects={is:is,matches:is,where:is,not:function(next,token,options,context,compileToken){var func=compileToken(token,copyOptions(options),context);return func===boolbase_1.default.falseFunc?next:func===boolbase_1.default.trueFunc?boolbase_1.default.falseFunc:function(elem){return!func(elem)&&next(elem)}},has:function(next,subselect,options,_context,compileToken){var adapter=options.adapter;var opts=copyOptions(options);opts.relativeSelector=true;var context=subselect.some((function(s){return s.some(sort_js_1.isTraversal)}))?[exports.PLACEHOLDER_ELEMENT]:undefined;var compiled=compileToken(subselect,opts,context);if(compiled===boolbase_1.default.falseFunc)return boolbase_1.default.falseFunc;var hasElement=ensureIsTag(compiled,adapter);if(context&&compiled!==boolbase_1.default.trueFunc){var _a=compiled.shouldTestNextSiblings,shouldTestNextSiblings_1=_a===void 0?false:_a;return function(elem){if(!next(elem))return false;context[0]=elem;var childs=adapter.getChildren(elem);var nextElements=shouldTestNextSiblings_1?__spreadArray(__spreadArray([],childs,true),getNextSiblings(elem,adapter),true):childs;return adapter.existsOne(hasElement,nextElements)}}return function(elem){return next(elem)&&adapter.existsOne(hasElement,adapter.getChildren(elem))}}}})(subselects);(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.compilePseudoSelector=exports.aliases=exports.pseudos=exports.filters=void 0;var css_what_1=require$$1;var filters_js_1=filters$1;Object.defineProperty(exports,"filters",{enumerable:true,get:function(){return filters_js_1.filters}});var pseudos_js_1=pseudos;Object.defineProperty(exports,"pseudos",{enumerable:true,get:function(){return pseudos_js_1.pseudos}});var aliases_js_1=aliases;Object.defineProperty(exports,"aliases",{enumerable:true,get:function(){return aliases_js_1.aliases}});var subselects_js_1=subselects;function compilePseudoSelector(next,selector,options,context,compileToken){var _a;var name=selector.name,data=selector.data;if(Array.isArray(data)){if(!(name in subselects_js_1.subselects)){throw new Error("Unknown pseudo-class :".concat(name,"(").concat(data,")"))}return subselects_js_1.subselects[name](next,data,options,context,compileToken)}var userPseudo=(_a=options.pseudos)===null||_a===void 0?void 0:_a[name];var stringPseudo=typeof userPseudo==="string"?userPseudo:aliases_js_1.aliases[name];if(typeof stringPseudo==="string"){if(data!=null){throw new Error("Pseudo ".concat(name," doesn't have any arguments"))}var alias=(0,css_what_1.parse)(stringPseudo);return subselects_js_1.subselects["is"](next,alias,options,context,compileToken)}if(typeof userPseudo==="function"){(0,pseudos_js_1.verifyPseudoArgs)(userPseudo,name,data,1);return function(elem){return userPseudo(elem,data)&&next(elem)}}if(name in filters_js_1.filters){return filters_js_1.filters[name](next,data,options,context)}if(name in pseudos_js_1.pseudos){var pseudo_1=pseudos_js_1.pseudos[name];(0,pseudos_js_1.verifyPseudoArgs)(pseudo_1,name,data,2);return function(elem){return pseudo_1(elem,options,data)&&next(elem)}}throw new Error("Unknown pseudo-class :".concat(name))}exports.compilePseudoSelector=compilePseudoSelector})(pseudoSelectors);Object.defineProperty(general,"__esModule",{value:true});general.compileGeneralSelector=void 0;var attributes_js_1=attributes;var index_js_1=pseudoSelectors;var css_what_1$1=require$$1;function getElementParent(node,adapter){var parent=adapter.getParent(node);if(parent&&adapter.isTag(parent)){return parent}return null}function compileGeneralSelector(next,selector,options,context,compileToken){var adapter=options.adapter,equals=options.equals;switch(selector.type){case css_what_1$1.SelectorType.PseudoElement:{throw new Error("Pseudo-elements are not supported by css-select")}case css_what_1$1.SelectorType.ColumnCombinator:{throw new Error("Column combinators are not yet supported by css-select")}case css_what_1$1.SelectorType.Attribute:{if(selector.namespace!=null){throw new Error("Namespaced attributes are not yet supported by css-select")}if(!options.xmlMode||options.lowerCaseAttributeNames){selector.name=selector.name.toLowerCase()}return attributes_js_1.attributeRules[selector.action](next,selector,options)}case css_what_1$1.SelectorType.Pseudo:{return(0,index_js_1.compilePseudoSelector)(next,selector,options,context,compileToken)}case css_what_1$1.SelectorType.Tag:{if(selector.namespace!=null){throw new Error("Namespaced tag names are not yet supported by css-select")}var name_1=selector.name;if(!options.xmlMode||options.lowerCaseTags){name_1=name_1.toLowerCase()}return function tag(elem){return adapter.getName(elem)===name_1&&next(elem)}}case css_what_1$1.SelectorType.Descendant:{if(options.cacheResults===false||typeof WeakSet==="undefined"){return function descendant(elem){var current=elem;while(current=getElementParent(current,adapter)){if(next(current)){return true}}return false}}var isFalseCache_1=new WeakSet;return function cachedDescendant(elem){var current=elem;while(current=getElementParent(current,adapter)){if(!isFalseCache_1.has(current)){if(adapter.isTag(current)&&next(current)){return true}isFalseCache_1.add(current)}}return false}}case"_flexibleDescendant":{return function flexibleDescendant(elem){var current=elem;do{if(next(current))return true}while(current=getElementParent(current,adapter));return false}}case css_what_1$1.SelectorType.Parent:{return function parent(elem){return adapter.getChildren(elem).some((function(elem){return adapter.isTag(elem)&&next(elem)}))}}case css_what_1$1.SelectorType.Child:{return function child(elem){var parent=adapter.getParent(elem);return parent!=null&&adapter.isTag(parent)&&next(parent)}}case css_what_1$1.SelectorType.Sibling:{return function sibling(elem){var siblings=adapter.getSiblings(elem);for(var i=0;i<siblings.length;i++){var currentSibling=siblings[i];if(equals(elem,currentSibling))break;if(adapter.isTag(currentSibling)&&next(currentSibling)){return true}}return false}}case css_what_1$1.SelectorType.Adjacent:{if(adapter.prevElementSibling){return function adjacent(elem){var previous=adapter.prevElementSibling(elem);return previous!=null&&next(previous)}}return function adjacent(elem){var siblings=adapter.getSiblings(elem);var lastElement;for(var i=0;i<siblings.length;i++){var currentSibling=siblings[i];if(equals(elem,currentSibling))break;if(adapter.isTag(currentSibling)){lastElement=currentSibling}}return!!lastElement&&next(lastElement)}}case css_what_1$1.SelectorType.Universal:{if(selector.namespace!=null&&selector.namespace!=="*"){throw new Error("Namespaced universal selectors are not yet supported by css-select")}return next}}}general.compileGeneralSelector=compileGeneralSelector;var __createBinding=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(o,m,k,k2){if(k2===undefined)k2=k;var desc=Object.getOwnPropertyDescriptor(m,k);if(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable)){desc={enumerable:true,get:function(){return m[k]}}}Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){if(k2===undefined)k2=k;o[k2]=m[k]});var __setModuleDefault=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:true,value:v})}:function(o,v){o["default"]=v});var __importStar=commonjsGlobal&&commonjsGlobal.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)if(k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k))__createBinding(result,mod,k);__setModuleDefault(result,mod);return result};var __importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(compile$3,"__esModule",{value:true});compile$3.compileToken=compile$3.compileUnsafe=compile$3.compile=void 0;var css_what_1=require$$1;var boolbase_1=__importDefault(boolbase);var sort_js_1=__importStar(sort);var general_js_1=general;var subselects_js_1=subselects;function compile(selector,options,context){var next=compileUnsafe(selector,options,context);return(0,subselects_js_1.ensureIsTag)(next,options.adapter)}compile$3.compile=compile;function compileUnsafe(selector,options,context){var token=typeof selector==="string"?(0,css_what_1.parse)(selector):selector;return compileToken(token,options,context)}compile$3.compileUnsafe=compileUnsafe;function includesScopePseudo(t){return t.type===css_what_1.SelectorType.Pseudo&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some((function(data){return data.some(includesScopePseudo)})))}var DESCENDANT_TOKEN={type:css_what_1.SelectorType.Descendant};var FLEXIBLE_DESCENDANT_TOKEN={type:"_flexibleDescendant"};var SCOPE_TOKEN={type:css_what_1.SelectorType.Pseudo,name:"scope",data:null};function absolutize(token,_a,context){var adapter=_a.adapter;var hasContext=!!(context===null||context===void 0?void 0:context.every((function(e){var parent=adapter.isTag(e)&&adapter.getParent(e);return e===subselects_js_1.PLACEHOLDER_ELEMENT||parent&&adapter.isTag(parent)})));for(var _i=0,token_1=token;_i<token_1.length;_i++){var t=token_1[_i];if(t.length>0&&(0,sort_js_1.isTraversal)(t[0])&&t[0].type!==css_what_1.SelectorType.Descendant);else if(hasContext&&!t.some(includesScopePseudo)){t.unshift(DESCENDANT_TOKEN)}else{continue}t.unshift(SCOPE_TOKEN)}}function compileToken(token,options,context){var _a;token.forEach(sort_js_1.default);context=(_a=options.context)!==null&&_a!==void 0?_a:context;var isArrayContext=Array.isArray(context);var finalContext=context&&(Array.isArray(context)?context:[context]);if(options.relativeSelector!==false){absolutize(token,options,finalContext)}else if(token.some((function(t){return t.length>0&&(0,sort_js_1.isTraversal)(t[0])}))){throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled")}var shouldTestNextSiblings=false;var query=token.map((function(rules){if(rules.length>=2){var first=rules[0],second=rules[1];if(first.type!==css_what_1.SelectorType.Pseudo||first.name!=="scope");else if(isArrayContext&&second.type===css_what_1.SelectorType.Descendant){rules[1]=FLEXIBLE_DESCENDANT_TOKEN}else if(second.type===css_what_1.SelectorType.Adjacent||second.type===css_what_1.SelectorType.Sibling){shouldTestNextSiblings=true}}return compileRules(rules,options,finalContext)})).reduce(reduceRules,boolbase_1.default.falseFunc);query.shouldTestNextSiblings=shouldTestNextSiblings;return query}compile$3.compileToken=compileToken;function compileRules(rules,options,context){var _a;return rules.reduce((function(previous,rule){return previous===boolbase_1.default.falseFunc?boolbase_1.default.falseFunc:(0,general_js_1.compileGeneralSelector)(previous,rule,options,context,compileToken)}),(_a=options.rootFunc)!==null&&_a!==void 0?_a:boolbase_1.default.trueFunc)}function reduceRules(a,b){if(b===boolbase_1.default.falseFunc||a===boolbase_1.default.trueFunc){return a}if(a===boolbase_1.default.falseFunc||b===boolbase_1.default.trueFunc){return b}return function combine(elem){return a(elem)||b(elem)}}(function(exports){var __createBinding=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(o,m,k,k2){if(k2===undefined)k2=k;var desc=Object.getOwnPropertyDescriptor(m,k);if(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable)){desc={enumerable:true,get:function(){return m[k]}}}Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){if(k2===undefined)k2=k;o[k2]=m[k]});var __setModuleDefault=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:true,value:v})}:function(o,v){o["default"]=v});var __importStar=commonjsGlobal&&commonjsGlobal.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)if(k!=="default"&&Object.prototype.hasOwnProperty.call(mod,k))__createBinding(result,mod,k);__setModuleDefault(result,mod);return result};var __importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:true});exports.aliases=exports.pseudos=exports.filters=exports.is=exports.selectOne=exports.selectAll=exports.prepareContext=exports._compileToken=exports._compileUnsafe=exports.compile=void 0;var DomUtils=__importStar(lib$5);var boolbase_1=__importDefault(boolbase);var compile_js_1=compile$3;var subselects_js_1=subselects;var defaultEquals=function(a,b){return a===b};var defaultOptions={adapter:DomUtils,equals:defaultEquals};function convertOptionFormats(options){var _a,_b,_c,_d;var opts=options!==null&&options!==void 0?options:defaultOptions;(_a=opts.adapter)!==null&&_a!==void 0?_a:opts.adapter=DomUtils;(_b=opts.equals)!==null&&_b!==void 0?_b:opts.equals=(_d=(_c=opts.adapter)===null||_c===void 0?void 0:_c.equals)!==null&&_d!==void 0?_d:defaultEquals;return opts}function wrapCompile(func){return function addAdapter(selector,options,context){var opts=convertOptionFormats(options);return func(selector,opts,context)}}exports.compile=wrapCompile(compile_js_1.compile);exports._compileUnsafe=wrapCompile(compile_js_1.compileUnsafe);exports._compileToken=wrapCompile(compile_js_1.compileToken);function getSelectorFunc(searchFunc){return function select(query,elements,options){var opts=convertOptionFormats(options);if(typeof query!=="function"){query=(0,compile_js_1.compileUnsafe)(query,opts,elements)}var filteredElements=prepareContext(elements,opts.adapter,query.shouldTestNextSiblings);return searchFunc(query,filteredElements,opts)}}function prepareContext(elems,adapter,shouldTestNextSiblings){if(shouldTestNextSiblings===void 0){shouldTestNextSiblings=false}if(shouldTestNextSiblings){elems=appendNextSiblings(elems,adapter)}return Array.isArray(elems)?adapter.removeSubsets(elems):adapter.getChildren(elems)}exports.prepareContext=prepareContext;function appendNextSiblings(elem,adapter){var elems=Array.isArray(elem)?elem.slice(0):[elem];var elemsLength=elems.length;for(var i=0;i<elemsLength;i++){var nextSiblings=(0,subselects_js_1.getNextSiblings)(elems[i],adapter);elems.push.apply(elems,nextSiblings)}return elems}exports.selectAll=getSelectorFunc((function(query,elems,options){return query===boolbase_1.default.falseFunc||!elems||elems.length===0?[]:options.adapter.findAll(query,elems)}));exports.selectOne=getSelectorFunc((function(query,elems,options){return query===boolbase_1.default.falseFunc||!elems||elems.length===0?null:options.adapter.findOne(query,elems)}));function is(elem,query,options){var opts=convertOptionFormats(options);return(typeof query==="function"?query:(0,compile_js_1.compile)(query,opts))(elem)}exports.is=is;exports.default=exports.selectAll;var index_js_1=pseudoSelectors;Object.defineProperty(exports,"filters",{enumerable:true,get:function(){return index_js_1.filters}});Object.defineProperty(exports,"pseudos",{enumerable:true,get:function(){return index_js_1.pseudos}});Object.defineProperty(exports,"aliases",{enumerable:true,get:function(){return index_js_1.aliases}})})(lib$6);const isTag=node=>node.type==="element";const existsOne=(test,elems)=>elems.some((elem=>{if(isTag(elem)){return test(elem)||existsOne(test,getChildren(elem))}else{return false}}));const getAttributeValue=(elem,name)=>elem.attributes[name];const getChildren=node=>node.children||[];const getName=elemAst=>elemAst.name;const getParent=node=>node.parentNode||null;const getSiblings=elem=>{var parent=getParent(elem);return parent?getChildren(parent):[]};const getText=node=>{if(node.children[0].type==="text"&&node.children[0].type==="cdata"){return node.children[0].value}return""};const hasAttrib=(elem,name)=>elem.attributes[name]!==undefined;const removeSubsets=nodes=>{let idx=nodes.length;let node;let ancestor;let replace;while(--idx>-1){node=ancestor=nodes[idx];nodes[idx]=null;replace=true;while(ancestor){if(nodes.includes(ancestor)){replace=false;nodes.splice(idx,1);break}ancestor=getParent(ancestor)}if(replace){nodes[idx]=node}}return nodes};const findAll$3=(test,elems)=>{const result=[];for(const elem of elems){if(isTag(elem)){if(test(elem)){result.push(elem)}result.push(...findAll$3(test,getChildren(elem)))}}return result};const findOne=(test,elems)=>{for(const elem of elems){if(isTag(elem)){if(test(elem)){return elem}const result=findOne(test,getChildren(elem));if(result){return result}}}return null};const svgoCssSelectAdapter={isTag:isTag,existsOne:existsOne,getAttributeValue:getAttributeValue,getChildren:getChildren,getName:getName,getParent:getParent,getSiblings:getSiblings,getText:getText,hasAttrib:hasAttrib,removeSubsets:removeSubsets,findAll:findAll$3,findOne:findOne};var cssSelectAdapter=svgoCssSelectAdapter;const{selectAll:selectAll,selectOne:selectOne,is:is}=lib$6;const xastAdaptor=cssSelectAdapter;const cssSelectOptions={xmlMode:true,adapter:xastAdaptor};const querySelectorAll$4=(node,selector)=>selectAll(selector,node,cssSelectOptions);xast.querySelectorAll=querySelectorAll$4;const querySelector$2=(node,selector)=>selectOne(selector,node,cssSelectOptions);xast.querySelector=querySelector$2;const matches$1=(node,selector)=>is(node,selector,cssSelectOptions);xast.matches=matches$1;const visitSkip$7=Symbol();xast.visitSkip=visitSkip$7;const visit$7=(node,visitor,parentNode)=>{const callbacks=visitor[node.type];if(callbacks&&callbacks.enter){const symbol=callbacks.enter(node,parentNode);if(symbol===visitSkip$7){return}}if(node.type==="root"){for(const child of node.children){visit$7(child,visitor,node)}}if(node.type==="element"){if(parentNode.children.includes(node)){for(const child of node.children){visit$7(child,visitor,node)}}}if(callbacks&&callbacks.exit){callbacks.exit(node,parentNode)}};xast.visit=visit$7;const detachNodeFromParent$o=(node,parentNode)=>{parentNode.children=parentNode.children.filter((child=>child!==node))};xast.detachNodeFromParent=detachNodeFromParent$o;const{visit:visit$6}=xast;const invokePlugins$1=(ast,info,plugins,overrides,globalOverrides)=>{for(const plugin of plugins){const override=overrides?.[plugin.name];if(override===false){continue}const params={...plugin.params,...globalOverrides,...override};const visitor=plugin.fn(ast,params,info);if(visitor!=null){visit$6(ast,visitor)}}};plugins.invokePlugins=invokePlugins$1;const createPreset$1=({name:name,plugins:plugins})=>({name:name,fn:(ast,params,info)=>{const{floatPrecision:floatPrecision,overrides:overrides}=params;const globalOverrides={};if(floatPrecision!=null){globalOverrides.floatPrecision=floatPrecision}if(overrides){const pluginNames=plugins.map((({name:name})=>name));for(const pluginName of Object.keys(overrides)){if(!pluginNames.includes(pluginName)){console.warn(`You are trying to configure ${pluginName} which is not part of ${name}.\n`+`Try to put it before or after, for example\n\n`+`plugins: [\n`+` {\n`+` name: '${name}',\n`+` },\n`+` '${pluginName}'\n`+`]\n`)}}}invokePlugins$1(ast,info,plugins,overrides,globalOverrides)}});plugins.createPreset=createPreset$1;var removeDoctype$1={};const{detachNodeFromParent:detachNodeFromParent$n}=xast;removeDoctype$1.name="removeDoctype";removeDoctype$1.description="removes doctype declaration";removeDoctype$1.fn=()=>({doctype:{enter:(node,parentNode)=>{detachNodeFromParent$n(node,parentNode)}}});var removeXMLProcInst$1={};const{detachNodeFromParent:detachNodeFromParent$m}=xast;removeXMLProcInst$1.name="removeXMLProcInst";removeXMLProcInst$1.description="removes XML processing instructions";removeXMLProcInst$1.fn=()=>({instruction:{enter:(node,parentNode)=>{if(node.name==="xml"){detachNodeFromParent$m(node,parentNode)}}}});var removeComments$1={};const{detachNodeFromParent:detachNodeFromParent$l}=xast;removeComments$1.name="removeComments";removeComments$1.description="removes comments";const DEFAULT_PRESERVE_PATTERNS=[/^!/];removeComments$1.fn=(_root,params)=>{const{preservePatterns:preservePatterns=DEFAULT_PRESERVE_PATTERNS}=params;return{comment:{enter:(node,parentNode)=>{if(preservePatterns){if(!Array.isArray(preservePatterns)){throw Error(`Expected array in removeComments preservePatterns parameter but received ${preservePatterns}`)}const matches=preservePatterns.some((pattern=>new RegExp(pattern).test(node.value)));if(matches){return}}detachNodeFromParent$l(node,parentNode)}}}};var removeMetadata$1={};const{detachNodeFromParent:detachNodeFromParent$k}=xast;removeMetadata$1.name="removeMetadata";removeMetadata$1.description="removes <metadata>";removeMetadata$1.fn=()=>({element:{enter:(node,parentNode)=>{if(node.name==="metadata"){detachNodeFromParent$k(node,parentNode)}}}});var removeEditorsNSData$1={};const{detachNodeFromParent:detachNodeFromParent$j}=xast;const{editorNamespaces:editorNamespaces}=_collections;removeEditorsNSData$1.name="removeEditorsNSData";removeEditorsNSData$1.description="removes editors namespaces, elements and attributes";removeEditorsNSData$1.fn=(_root,params)=>{let namespaces=[...editorNamespaces];if(Array.isArray(params.additionalNamespaces)){namespaces=[...editorNamespaces,...params.additionalNamespaces]}const prefixes=[];return{element:{enter:(node,parentNode)=>{if(node.name==="svg"){for(const[name,value]of Object.entries(node.attributes)){if(name.startsWith("xmlns:")&&namespaces.includes(value)){prefixes.push(name.slice("xmlns:".length));delete node.attributes[name]}}}for(const name of Object.keys(node.attributes)){if(name.includes(":")){const[prefix]=name.split(":");if(prefixes.includes(prefix)){delete node.attributes[name]}}}if(node.name.includes(":")){const[prefix]=node.name.split(":");if(prefixes.includes(prefix)){detachNodeFromParent$j(node,parentNode)}}}}}};var cleanupAttrs$1={};cleanupAttrs$1.name="cleanupAttrs";cleanupAttrs$1.description="cleanups attributes from newlines, trailing and repeating spaces";const regNewlinesNeedSpace=/(\S)\r?\n(\S)/g;const regNewlines=/\r?\n/g;const regSpaces=/\s{2,}/g;cleanupAttrs$1.fn=(root,params)=>{const{newlines:newlines=true,trim:trim=true,spaces:spaces=true}=params;return{element:{enter:node=>{for(const name of Object.keys(node.attributes)){if(newlines){node.attributes[name]=node.attributes[name].replace(regNewlinesNeedSpace,((match,p1,p2)=>p1+" "+p2));node.attributes[name]=node.attributes[name].replace(regNewlines,"")}if(trim){node.attributes[name]=node.attributes[name].trim()}if(spaces){node.attributes[name]=node.attributes[name].replace(regSpaces," ")}}}}}};var mergeStyles$1={};const{visitSkip:visitSkip$6,detachNodeFromParent:detachNodeFromParent$i}=xast;mergeStyles$1.name="mergeStyles";mergeStyles$1.description="merge multiple style elements into one";mergeStyles$1.fn=()=>{let firstStyleElement=null;let collectedStyles="";let styleContentType="text";return{element:{enter:(node,parentNode)=>{if(node.name==="foreignObject"){return visitSkip$6}if(node.name!=="style"){return}if(node.attributes.type!=null&&node.attributes.type!==""&&node.attributes.type!=="text/css"){return}let css="";for(const child of node.children){if(child.type==="text"){css+=child.value}if(child.type==="cdata"){styleContentType="cdata";css+=child.value}}if(css.trim().length===0){detachNodeFromParent$i(node,parentNode);return}if(node.attributes.media==null){collectedStyles+=css}else{collectedStyles+=`@media ${node.attributes.media}{${css}}`;delete node.attributes.media}if(firstStyleElement==null){firstStyleElement=node}else{detachNodeFromParent$i(node,parentNode);const child={type:styleContentType,value:collectedStyles};Object.defineProperty(child,"parentNode",{writable:true,value:firstStyleElement});firstStyleElement.children=[child]}}}}};var inlineStyles$1={};var cjs$2={};var tokenizer$5={};var types$1I={};const EOF$3=0;const Ident$1=1;const Function$5=2;const AtKeyword$1=3;const Hash$7=4;const String$4=5;const BadString$1=6;const Url$9=7;const BadUrl$1=8;const Delim$1=9;const Number$5=10;const Percentage$9=11;const Dimension$9=12;const WhiteSpace$9=13;const CDO$7=14;const CDC$7=15;const Colon$1=16;const Semicolon$1=17;const Comma$1=18;const LeftSquareBracket$1=19;const RightSquareBracket$1=20;const LeftParenthesis$1=21;const RightParenthesis$1=22;const LeftCurlyBracket$1=23;const RightCurlyBracket$1=24;const Comment$9=25;types$1I.AtKeyword=AtKeyword$1;types$1I.BadString=BadString$1;types$1I.BadUrl=BadUrl$1;types$1I.CDC=CDC$7;types$1I.CDO=CDO$7;types$1I.Colon=Colon$1;types$1I.Comma=Comma$1;types$1I.Comment=Comment$9;types$1I.Delim=Delim$1;types$1I.Dimension=Dimension$9;types$1I.EOF=EOF$3;types$1I.Function=Function$5;types$1I.Hash=Hash$7;types$1I.Ident=Ident$1;types$1I.LeftCurlyBracket=LeftCurlyBracket$1;types$1I.LeftParenthesis=LeftParenthesis$1;types$1I.LeftSquareBracket=LeftSquareBracket$1;types$1I.Number=Number$5;types$1I.Percentage=Percentage$9;types$1I.RightCurlyBracket=RightCurlyBracket$1;types$1I.RightParenthesis=RightParenthesis$1;types$1I.RightSquareBracket=RightSquareBracket$1;types$1I.Semicolon=Semicolon$1;types$1I.String=String$4;types$1I.Url=Url$9;types$1I.WhiteSpace=WhiteSpace$9;var charCodeDefinitions$p={};const EOF$2=0;function isDigit$2(code){return code>=48&&code<=57}function isHexDigit$1(code){return isDigit$2(code)||code>=65&&code<=70||code>=97&&code<=102}function isUppercaseLetter$1(code){return code>=65&&code<=90}function isLowercaseLetter$1(code){return code>=97&&code<=122}function isLetter$1(code){return isUppercaseLetter$1(code)||isLowercaseLetter$1(code)}function isNonAscii$1(code){return code>=128}function isNameStart$1(code){return isLetter$1(code)||isNonAscii$1(code)||code===95}function isName$1(code){return isNameStart$1(code)||isDigit$2(code)||code===45}function isNonPrintable$1(code){return code>=0&&code<=8||code===11||code>=14&&code<=31||code===127}function isNewline$1(code){return code===10||code===13||code===12}function isWhiteSpace$1(code){return isNewline$1(code)||code===32||code===9}function isValidEscape$1(first,second){if(first!==92){return false}if(isNewline$1(second)||second===EOF$2){return false}return true}function isIdentifierStart$1(first,second,third){if(first===45){return isNameStart$1(second)||second===45||isValidEscape$1(second,third)}if(isNameStart$1(first)){return true}if(first===92){return isValidEscape$1(first,second)}return false}function isNumberStart$1(first,second,third){if(first===43||first===45){if(isDigit$2(second)){return 2}return second===46&&isDigit$2(third)?3:0}if(first===46){return isDigit$2(second)?2:0}if(isDigit$2(first)){return 1}return 0}function isBOM$1(code){if(code===65279){return 1}if(code===65534){return 1}return 0}const CATEGORY$1=new Array(128);const EofCategory$1=128;const WhiteSpaceCategory$1=130;const DigitCategory$1=131;const NameStartCategory$1=132;const NonPrintableCategory$1=133;for(let i=0;i<CATEGORY$1.length;i++){CATEGORY$1[i]=isWhiteSpace$1(i)&&WhiteSpaceCategory$1||isDigit$2(i)&&DigitCategory$1||isNameStart$1(i)&&NameStartCategory$1||isNonPrintable$1(i)&&NonPrintableCategory$1||i||EofCategory$1}function charCodeCategory$1(code){return code<128?CATEGORY$1[code]:NameStartCategory$1}charCodeDefinitions$p.DigitCategory=DigitCategory$1;charCodeDefinitions$p.EofCategory=EofCategory$1;charCodeDefinitions$p.NameStartCategory=NameStartCategory$1;charCodeDefinitions$p.NonPrintableCategory=NonPrintableCategory$1;charCodeDefinitions$p.WhiteSpaceCategory=WhiteSpaceCategory$1;charCodeDefinitions$p.charCodeCategory=charCodeCategory$1;charCodeDefinitions$p.isBOM=isBOM$1;charCodeDefinitions$p.isDigit=isDigit$2;charCodeDefinitions$p.isHexDigit=isHexDigit$1;charCodeDefinitions$p.isIdentifierStart=isIdentifierStart$1;charCodeDefinitions$p.isLetter=isLetter$1;charCodeDefinitions$p.isLowercaseLetter=isLowercaseLetter$1;charCodeDefinitions$p.isName=isName$1;charCodeDefinitions$p.isNameStart=isNameStart$1;charCodeDefinitions$p.isNewline=isNewline$1;charCodeDefinitions$p.isNonAscii=isNonAscii$1;charCodeDefinitions$p.isNonPrintable=isNonPrintable$1;charCodeDefinitions$p.isNumberStart=isNumberStart$1;charCodeDefinitions$p.isUppercaseLetter=isUppercaseLetter$1;charCodeDefinitions$p.isValidEscape=isValidEscape$1;charCodeDefinitions$p.isWhiteSpace=isWhiteSpace$1;var utils$u={};const charCodeDefinitions$o=charCodeDefinitions$p;function getCharCode$1(source,offset){return offset<source.length?source.charCodeAt(offset):0}function getNewlineLength$1(source,offset,code){if(code===13&&getCharCode$1(source,offset+1)===10){return 2}return 1}function cmpChar$1(testStr,offset,referenceCode){let code=testStr.charCodeAt(offset);if(charCodeDefinitions$o.isUppercaseLetter(code)){code=code|32}return code===referenceCode}function cmpStr$1(testStr,start,end,referenceStr){if(end-start!==referenceStr.length){return false}if(start<0||end>testStr.length){return false}for(let i=start;i<end;i++){const referenceCode=referenceStr.charCodeAt(i-start);let testCode=testStr.charCodeAt(i);if(charCodeDefinitions$o.isUppercaseLetter(testCode)){testCode=testCode|32}if(testCode!==referenceCode){return false}}return true}function findWhiteSpaceStart$1(source,offset){for(;offset>=0;offset--){if(!charCodeDefinitions$o.isWhiteSpace(source.charCodeAt(offset))){break}}return offset+1}function findWhiteSpaceEnd$1(source,offset){for(;offset<source.length;offset++){if(!charCodeDefinitions$o.isWhiteSpace(source.charCodeAt(offset))){break}}return offset}function findDecimalNumberEnd$1(source,offset){for(;offset<source.length;offset++){if(!charCodeDefinitions$o.isDigit(source.charCodeAt(offset))){break}}return offset}function consumeEscaped$1(source,offset){offset+=2;if(charCodeDefinitions$o.isHexDigit(getCharCode$1(source,offset-1))){for(const maxOffset=Math.min(source.length,offset+5);offset<maxOffset;offset++){if(!charCodeDefinitions$o.isHexDigit(getCharCode$1(source,offset))){break}}const code=getCharCode$1(source,offset);if(charCodeDefinitions$o.isWhiteSpace(code)){offset+=getNewlineLength$1(source,offset,code)}}return offset}function consumeName$1(source,offset){for(;offset<source.length;offset++){const code=source.charCodeAt(offset);if(charCodeDefinitions$o.isName(code)){continue}if(charCodeDefinitions$o.isValidEscape(code,getCharCode$1(source,offset+1))){offset=consumeEscaped$1(source,offset)-1;continue}break}return offset}function consumeNumber$3(source,offset){let code=source.charCodeAt(offset);if(code===43||code===45){code=source.charCodeAt(offset+=1)}if(charCodeDefinitions$o.isDigit(code)){offset=findDecimalNumberEnd$1(source,offset+1);code=source.charCodeAt(offset)}if(code===46&&charCodeDefinitions$o.isDigit(source.charCodeAt(offset+1))){offset+=2;offset=findDecimalNumberEnd$1(source,offset)}if(cmpChar$1(source,offset,101)){let sign=0;code=source.charCodeAt(offset+1);if(code===45||code===43){sign=1;code=source.charCodeAt(offset+2)}if(charCodeDefinitions$o.isDigit(code)){offset=findDecimalNumberEnd$1(source,offset+1+sign+1)}}return offset}function consumeBadUrlRemnants$1(source,offset){for(;offset<source.length;offset++){const code=source.charCodeAt(offset);if(code===41){offset++;break}if(charCodeDefinitions$o.isValidEscape(code,getCharCode$1(source,offset+1))){offset=consumeEscaped$1(source,offset)}}return offset}function decodeEscaped$1(escaped){if(escaped.length===1&&!charCodeDefinitions$o.isHexDigit(escaped.charCodeAt(0))){return escaped[0]}let code=parseInt(escaped,16);if(code===0||code>=55296&&code<=57343||code>1114111){code=65533}return String.fromCodePoint(code)}utils$u.cmpChar=cmpChar$1;utils$u.cmpStr=cmpStr$1;utils$u.consumeBadUrlRemnants=consumeBadUrlRemnants$1;utils$u.consumeEscaped=consumeEscaped$1;utils$u.consumeName=consumeName$1;utils$u.consumeNumber=consumeNumber$3;utils$u.decodeEscaped=decodeEscaped$1;utils$u.findDecimalNumberEnd=findDecimalNumberEnd$1;utils$u.findWhiteSpaceEnd=findWhiteSpaceEnd$1;utils$u.findWhiteSpaceStart=findWhiteSpaceStart$1;utils$u.getNewlineLength=getNewlineLength$1;const tokenNames$1=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token"];var names$g=tokenNames$1;var OffsetToLocation$7={};var adoptBuffer$7={};const MIN_SIZE$1=16*1024;function adoptBuffer$6(buffer=null,size){if(buffer===null||buffer.length<size){return new Uint32Array(Math.max(size+1024,MIN_SIZE$1))}return buffer}adoptBuffer$7.adoptBuffer=adoptBuffer$6;const adoptBuffer$5=adoptBuffer$7;const charCodeDefinitions$n=charCodeDefinitions$p;const N$9=10;const F$5=12;const R$5=13;function computeLinesAndColumns$1(host){const source=host.source;const sourceLength=source.length;const startOffset=source.length>0?charCodeDefinitions$n.isBOM(source.charCodeAt(0)):0;const lines=adoptBuffer$5.adoptBuffer(host.lines,sourceLength);const columns=adoptBuffer$5.adoptBuffer(host.columns,sourceLength);let line=host.startLine;let column=host.startColumn;for(let i=startOffset;i<sourceLength;i++){const code=source.charCodeAt(i);lines[i]=line;columns[i]=column++;if(code===N$9||code===R$5||code===F$5){if(code===R$5&&i+1<sourceLength&&source.charCodeAt(i+1)===N$9){i++;lines[i]=line;columns[i]=column}line++;column=1}}lines[sourceLength]=line;columns[sourceLength]=column;host.lines=lines;host.columns=columns;host.computed=true}class OffsetToLocation$6{constructor(){this.lines=null;this.columns=null;this.computed=false}setSource(source,startOffset=0,startLine=1,startColumn=1){this.source=source;this.startOffset=startOffset;this.startLine=startLine;this.startColumn=startColumn;this.computed=false}getLocation(offset,filename){if(!this.computed){computeLinesAndColumns$1(this)}return{source:filename,offset:this.startOffset+offset,line:this.lines[offset],column:this.columns[offset]}}getLocationRange(start,end,filename){if(!this.computed){computeLinesAndColumns$1(this)}return{source:filename,start:{offset:this.startOffset+start,line:this.lines[start],column:this.columns[start]},end:{offset:this.startOffset+end,line:this.lines[end],column:this.columns[end]}}}}OffsetToLocation$7.OffsetToLocation=OffsetToLocation$6;var TokenStream$9={};const adoptBuffer$4=adoptBuffer$7;const utils$t=utils$u;const names$f=names$g;const types$1H=types$1I;const OFFSET_MASK$1=16777215;const TYPE_SHIFT$1=24;const balancePair$3=new Map([[types$1H.Function,types$1H.RightParenthesis],[types$1H.LeftParenthesis,types$1H.RightParenthesis],[types$1H.LeftSquareBracket,types$1H.RightSquareBracket],[types$1H.LeftCurlyBracket,types$1H.RightCurlyBracket]]);class TokenStream$8{constructor(source,tokenize){this.setSource(source,tokenize)}reset(){this.eof=false;this.tokenIndex=-1;this.tokenType=0;this.tokenStart=this.firstCharOffset;this.tokenEnd=this.firstCharOffset}setSource(source="",tokenize=(()=>{})){source=String(source||"");const sourceLength=source.length;const offsetAndType=adoptBuffer$4.adoptBuffer(this.offsetAndType,source.length+1);const balance=adoptBuffer$4.adoptBuffer(this.balance,source.length+1);let tokenCount=0;let balanceCloseType=0;let balanceStart=0;let firstCharOffset=-1;this.offsetAndType=null;this.balance=null;tokenize(source,((type,start,end)=>{switch(type){default:balance[tokenCount]=sourceLength;break;case balanceCloseType:{let balancePrev=balanceStart&OFFSET_MASK$1;balanceStart=balance[balancePrev];balanceCloseType=balanceStart>>TYPE_SHIFT$1;balance[tokenCount]=balancePrev;balance[balancePrev++]=tokenCount;for(;balancePrev<tokenCount;balancePrev++){if(balance[balancePrev]===sourceLength){balance[balancePrev]=tokenCount}}break}case types$1H.LeftParenthesis:case types$1H.Function:case types$1H.LeftSquareBracket:case types$1H.LeftCurlyBracket:balance[tokenCount]=balanceStart;balanceCloseType=balancePair$3.get(type);balanceStart=balanceCloseType<<TYPE_SHIFT$1|tokenCount;break}offsetAndType[tokenCount++]=type<<TYPE_SHIFT$1|end;if(firstCharOffset===-1){firstCharOffset=start}}));offsetAndType[tokenCount]=types$1H.EOF<<TYPE_SHIFT$1|sourceLength;balance[tokenCount]=sourceLength;balance[sourceLength]=sourceLength;while(balanceStart!==0){const balancePrev=balanceStart&OFFSET_MASK$1;balanceStart=balance[balancePrev];balance[balancePrev]=sourceLength}this.source=source;this.firstCharOffset=firstCharOffset===-1?0:firstCharOffset;this.tokenCount=tokenCount;this.offsetAndType=offsetAndType;this.balance=balance;this.reset();this.next()}lookupType(offset){offset+=this.tokenIndex;if(offset<this.tokenCount){return this.offsetAndType[offset]>>TYPE_SHIFT$1}return types$1H.EOF}lookupOffset(offset){offset+=this.tokenIndex;if(offset<this.tokenCount){return this.offsetAndType[offset-1]&OFFSET_MASK$1}return this.source.length}lookupValue(offset,referenceStr){offset+=this.tokenIndex;if(offset<this.tokenCount){return utils$t.cmpStr(this.source,this.offsetAndType[offset-1]&OFFSET_MASK$1,this.offsetAndType[offset]&OFFSET_MASK$1,referenceStr)}return false}getTokenStart(tokenIndex){if(tokenIndex===this.tokenIndex){return this.tokenStart}if(tokenIndex>0){return tokenIndex<this.tokenCount?this.offsetAndType[tokenIndex-1]&OFFSET_MASK$1:this.offsetAndType[this.tokenCount]&OFFSET_MASK$1}return this.firstCharOffset}substrToCursor(start){return this.source.substring(start,this.tokenStart)}isBalanceEdge(pos){return this.balance[this.tokenIndex]<pos}isDelim(code,offset){if(offset){return this.lookupType(offset)===types$1H.Delim&&this.source.charCodeAt(this.lookupOffset(offset))===code}return this.tokenType===types$1H.Delim&&this.source.charCodeAt(this.tokenStart)===code}skip(tokenCount){let next=this.tokenIndex+tokenCount;if(next<this.tokenCount){this.tokenIndex=next;this.tokenStart=this.offsetAndType[next-1]&OFFSET_MASK$1;next=this.offsetAndType[next];this.tokenType=next>>TYPE_SHIFT$1;this.tokenEnd=next&OFFSET_MASK$1}else{this.tokenIndex=this.tokenCount;this.next()}}next(){let next=this.tokenIndex+1;if(next<this.tokenCount){this.tokenIndex=next;this.tokenStart=this.tokenEnd;next=this.offsetAndType[next];this.tokenType=next>>TYPE_SHIFT$1;this.tokenEnd=next&OFFSET_MASK$1}else{this.eof=true;this.tokenIndex=this.tokenCount;this.tokenType=types$1H.EOF;this.tokenStart=this.tokenEnd=this.source.length}}skipSC(){while(this.tokenType===types$1H.WhiteSpace||this.tokenType===types$1H.Comment){this.next()}}skipUntilBalanced(startToken,stopConsume){let cursor=startToken;let balanceEnd;let offset;loop:for(;cursor<this.tokenCount;cursor++){balanceEnd=this.balance[cursor];if(balanceEnd<startToken){break loop}offset=cursor>0?this.offsetAndType[cursor-1]&OFFSET_MASK$1:this.firstCharOffset;switch(stopConsume(this.source.charCodeAt(offset))){case 1:break loop;case 2:cursor++;break loop;default:if(this.balance[balanceEnd]===cursor){cursor=balanceEnd}}}this.skip(cursor-this.tokenIndex)}forEachToken(fn){for(let i=0,offset=this.firstCharOffset;i<this.tokenCount;i++){const start=offset;const item=this.offsetAndType[i];const end=item&OFFSET_MASK$1;const type=item>>TYPE_SHIFT$1;offset=end;fn(type,start,end,i)}}dump(){const tokens=new Array(this.tokenCount);this.forEachToken(((type,start,end,index)=>{tokens[index]={idx:index,type:names$f[type],chunk:this.source.substring(start,end),balance:this.balance[index]}}));return tokens}}TokenStream$9.TokenStream=TokenStream$8;const types$1G=types$1I;const charCodeDefinitions$m=charCodeDefinitions$p;const utils$s=utils$u;const names$e=names$g;const OffsetToLocation$5=OffsetToLocation$7;const TokenStream$7=TokenStream$9;function tokenize$4(source,onToken){function getCharCode(offset){return offset<sourceLength?source.charCodeAt(offset):0}function consumeNumericToken(){offset=utils$s.consumeNumber(source,offset);if(charCodeDefinitions$m.isIdentifierStart(getCharCode(offset),getCharCode(offset+1),getCharCode(offset+2))){type=types$1G.Dimension;offset=utils$s.consumeName(source,offset);return}if(getCharCode(offset)===37){type=types$1G.Percentage;offset++;return}type=types$1G.Number}function consumeIdentLikeToken(){const nameStartOffset=offset;offset=utils$s.consumeName(source,offset);if(utils$s.cmpStr(source,nameStartOffset,offset,"url")&&getCharCode(offset)===40){offset=utils$s.findWhiteSpaceEnd(source,offset+1);if(getCharCode(offset)===34||getCharCode(offset)===39){type=types$1G.Function;offset=nameStartOffset+4;return}consumeUrlToken();return}if(getCharCode(offset)===40){type=types$1G.Function;offset++;return}type=types$1G.Ident}function consumeStringToken(endingCodePoint){if(!endingCodePoint){endingCodePoint=getCharCode(offset++)}type=types$1G.String;for(;offset<source.length;offset++){const code=source.charCodeAt(offset);switch(charCodeDefinitions$m.charCodeCategory(code)){case endingCodePoint:offset++;return;case charCodeDefinitions$m.WhiteSpaceCategory:if(charCodeDefinitions$m.isNewline(code)){offset+=utils$s.getNewlineLength(source,offset,code);type=types$1G.BadString;return}break;case 92:if(offset===source.length-1){break}const nextCode=getCharCode(offset+1);if(charCodeDefinitions$m.isNewline(nextCode)){offset+=utils$s.getNewlineLength(source,offset+1,nextCode)}else if(charCodeDefinitions$m.isValidEscape(code,nextCode)){offset=utils$s.consumeEscaped(source,offset)-1}break}}}function consumeUrlToken(){type=types$1G.Url;offset=utils$s.findWhiteSpaceEnd(source,offset);for(;offset<source.length;offset++){const code=source.charCodeAt(offset);switch(charCodeDefinitions$m.charCodeCategory(code)){case 41:offset++;return;case charCodeDefinitions$m.WhiteSpaceCategory:offset=utils$s.findWhiteSpaceEnd(source,offset);if(getCharCode(offset)===41||offset>=source.length){if(offset<source.length){offset++}return}offset=utils$s.consumeBadUrlRemnants(source,offset);type=types$1G.BadUrl;return;case 34:case 39:case 40:case charCodeDefinitions$m.NonPrintableCategory:offset=utils$s.consumeBadUrlRemnants(source,offset);type=types$1G.BadUrl;return;case 92:if(charCodeDefinitions$m.isValidEscape(code,getCharCode(offset+1))){offset=utils$s.consumeEscaped(source,offset)-1;break}offset=utils$s.consumeBadUrlRemnants(source,offset);type=types$1G.BadUrl;return}}}source=String(source||"");const sourceLength=source.length;let start=charCodeDefinitions$m.isBOM(getCharCode(0));let offset=start;let type;while(offset<sourceLength){const code=source.charCodeAt(offset);switch(charCodeDefinitions$m.charCodeCategory(code)){case charCodeDefinitions$m.WhiteSpaceCategory:type=types$1G.WhiteSpace;offset=utils$s.findWhiteSpaceEnd(source,offset+1);break;case 34:consumeStringToken();break;case 35:if(charCodeDefinitions$m.isName(getCharCode(offset+1))||charCodeDefinitions$m.isValidEscape(getCharCode(offset+1),getCharCode(offset+2))){type=types$1G.Hash;offset=utils$s.consumeName(source,offset+1)}else{type=types$1G.Delim;offset++}break;case 39:consumeStringToken();break;case 40:type=types$1G.LeftParenthesis;offset++;break;case 41:type=types$1G.RightParenthesis;offset++;break;case 43:if(charCodeDefinitions$m.isNumberStart(code,getCharCode(offset+1),getCharCode(offset+2))){consumeNumericToken()}else{type=types$1G.Delim;offset++}break;case 44:type=types$1G.Comma;offset++;break;case 45:if(charCodeDefinitions$m.isNumberStart(code,getCharCode(offset+1),getCharCode(offset+2))){consumeNumericToken()}else{if(getCharCode(offset+1)===45&&getCharCode(offset+2)===62){type=types$1G.CDC;offset=offset+3}else{if(charCodeDefinitions$m.isIdentifierStart(code,getCharCode(offset+1),getCharCode(offset+2))){consumeIdentLikeToken()}else{type=types$1G.Delim;offset++}}}break;case 46:if(charCodeDefinitions$m.isNumberStart(code,getCharCode(offset+1),getCharCode(offset+2))){consumeNumericToken()}else{type=types$1G.Delim;offset++}break;case 47:if(getCharCode(offset+1)===42){type=types$1G.Comment;offset=source.indexOf("*/",offset+2);offset=offset===-1?source.length:offset+2}else{type=types$1G.Delim;offset++}break;case 58:type=types$1G.Colon;offset++;break;case 59:type=types$1G.Semicolon;offset++;break;case 60:if(getCharCode(offset+1)===33&&getCharCode(offset+2)===45&&getCharCode(offset+3)===45){type=types$1G.CDO;offset=offset+4}else{type=types$1G.Delim;offset++}break;case 64:if(charCodeDefinitions$m.isIdentifierStart(getCharCode(offset+1),getCharCode(offset+2),getCharCode(offset+3))){type=types$1G.AtKeyword;offset=utils$s.consumeName(source,offset+1)}else{type=types$1G.Delim;offset++}break;case 91:type=types$1G.LeftSquareBracket;offset++;break;case 92:if(charCodeDefinitions$m.isValidEscape(code,getCharCode(offset+1))){consumeIdentLikeToken()}else{type=types$1G.Delim;offset++}break;case 93:type=types$1G.RightSquareBracket;offset++;break;case 123:type=types$1G.LeftCurlyBracket;offset++;break;case 125:type=types$1G.RightCurlyBracket;offset++;break;case charCodeDefinitions$m.DigitCategory:consumeNumericToken();break;case charCodeDefinitions$m.NameStartCategory:consumeIdentLikeToken();break;default:type=types$1G.Delim;offset++}onToken(type,start,start=offset)}}tokenizer$5.AtKeyword=types$1G.AtKeyword;tokenizer$5.BadString=types$1G.BadString;tokenizer$5.BadUrl=types$1G.BadUrl;tokenizer$5.CDC=types$1G.CDC;tokenizer$5.CDO=types$1G.CDO;tokenizer$5.Colon=types$1G.Colon;tokenizer$5.Comma=types$1G.Comma;tokenizer$5.Comment=types$1G.Comment;tokenizer$5.Delim=types$1G.Delim;tokenizer$5.Dimension=types$1G.Dimension;tokenizer$5.EOF=types$1G.EOF;tokenizer$5.Function=types$1G.Function;tokenizer$5.Hash=types$1G.Hash;tokenizer$5.Ident=types$1G.Ident;tokenizer$5.LeftCurlyBracket=types$1G.LeftCurlyBracket;tokenizer$5.LeftParenthesis=types$1G.LeftParenthesis;tokenizer$5.LeftSquareBracket=types$1G.LeftSquareBracket;tokenizer$5.Number=types$1G.Number;tokenizer$5.Percentage=types$1G.Percentage;tokenizer$5.RightCurlyBracket=types$1G.RightCurlyBracket;tokenizer$5.RightParenthesis=types$1G.RightParenthesis;tokenizer$5.RightSquareBracket=types$1G.RightSquareBracket;tokenizer$5.Semicolon=types$1G.Semicolon;tokenizer$5.String=types$1G.String;tokenizer$5.Url=types$1G.Url;tokenizer$5.WhiteSpace=types$1G.WhiteSpace;tokenizer$5.tokenTypes=types$1G;tokenizer$5.DigitCategory=charCodeDefinitions$m.DigitCategory;tokenizer$5.EofCategory=charCodeDefinitions$m.EofCategory;tokenizer$5.NameStartCategory=charCodeDefinitions$m.NameStartCategory;tokenizer$5.NonPrintableCategory=charCodeDefinitions$m.NonPrintableCategory;tokenizer$5.WhiteSpaceCategory=charCodeDefinitions$m.WhiteSpaceCategory;tokenizer$5.charCodeCategory=charCodeDefinitions$m.charCodeCategory;tokenizer$5.isBOM=charCodeDefinitions$m.isBOM;tokenizer$5.isDigit=charCodeDefinitions$m.isDigit;tokenizer$5.isHexDigit=charCodeDefinitions$m.isHexDigit;tokenizer$5.isIdentifierStart=charCodeDefinitions$m.isIdentifierStart;tokenizer$5.isLetter=charCodeDefinitions$m.isLetter;tokenizer$5.isLowercaseLetter=charCodeDefinitions$m.isLowercaseLetter;tokenizer$5.isName=charCodeDefinitions$m.isName;tokenizer$5.isNameStart=charCodeDefinitions$m.isNameStart;tokenizer$5.isNewline=charCodeDefinitions$m.isNewline;tokenizer$5.isNonAscii=charCodeDefinitions$m.isNonAscii;tokenizer$5.isNonPrintable=charCodeDefinitions$m.isNonPrintable;tokenizer$5.isNumberStart=charCodeDefinitions$m.isNumberStart;tokenizer$5.isUppercaseLetter=charCodeDefinitions$m.isUppercaseLetter;tokenizer$5.isValidEscape=charCodeDefinitions$m.isValidEscape;tokenizer$5.isWhiteSpace=charCodeDefinitions$m.isWhiteSpace;tokenizer$5.cmpChar=utils$s.cmpChar;tokenizer$5.cmpStr=utils$s.cmpStr;tokenizer$5.consumeBadUrlRemnants=utils$s.consumeBadUrlRemnants;tokenizer$5.consumeEscaped=utils$s.consumeEscaped;tokenizer$5.consumeName=utils$s.consumeName;tokenizer$5.consumeNumber=utils$s.consumeNumber;tokenizer$5.decodeEscaped=utils$s.decodeEscaped;tokenizer$5.findDecimalNumberEnd=utils$s.findDecimalNumberEnd;tokenizer$5.findWhiteSpaceEnd=utils$s.findWhiteSpaceEnd;tokenizer$5.findWhiteSpaceStart=utils$s.findWhiteSpaceStart;tokenizer$5.getNewlineLength=utils$s.getNewlineLength;tokenizer$5.tokenNames=names$e;tokenizer$5.OffsetToLocation=OffsetToLocation$5.OffsetToLocation;tokenizer$5.TokenStream=TokenStream$7.TokenStream;tokenizer$5.tokenize=tokenize$4;var create$e={};var List$f={};let releasedCursors$1=null;class List$e{static createItem(data){return{prev:null,next:null,data:data}}constructor(){this.head=null;this.tail=null;this.cursor=null}createItem(data){return List$e.createItem(data)}allocateCursor(prev,next){let cursor;if(releasedCursors$1!==null){cursor=releasedCursors$1;releasedCursors$1=releasedCursors$1.cursor;cursor.prev=prev;cursor.next=next;cursor.cursor=this.cursor}else{cursor={prev:prev,next:next,cursor:this.cursor}}this.cursor=cursor;return cursor}releaseCursor(){const{cursor:cursor}=this;this.cursor=cursor.cursor;cursor.prev=null;cursor.next=null;cursor.cursor=releasedCursors$1;releasedCursors$1=cursor}updateCursors(prevOld,prevNew,nextOld,nextNew){let{cursor:cursor}=this;while(cursor!==null){if(cursor.prev===prevOld){cursor.prev=prevNew}if(cursor.next===nextOld){cursor.next=nextNew}cursor=cursor.cursor}}*[Symbol.iterator](){for(let cursor=this.head;cursor!==null;cursor=cursor.next){yield cursor.data}}get size(){let size=0;for(let cursor=this.head;cursor!==null;cursor=cursor.next){size++}return size}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(array){let cursor=null;this.head=null;for(let data of array){const item=List$e.createItem(data);if(cursor!==null){cursor.next=item}else{this.head=item}item.prev=cursor;cursor=item}this.tail=cursor;return this}toArray(){return[...this]}toJSON(){return[...this]}forEach(fn,thisArg=this){const cursor=this.allocateCursor(null,this.head);while(cursor.next!==null){const item=cursor.next;cursor.next=item.next;fn.call(thisArg,item.data,item,this)}this.releaseCursor()}forEachRight(fn,thisArg=this){const cursor=this.allocateCursor(this.tail,null);while(cursor.prev!==null){const item=cursor.prev;cursor.prev=item.prev;fn.call(thisArg,item.data,item,this)}this.releaseCursor()}reduce(fn,initialValue,thisArg=this){let cursor=this.allocateCursor(null,this.head);let acc=initialValue;let item;while(cursor.next!==null){item=cursor.next;cursor.next=item.next;acc=fn.call(thisArg,acc,item.data,item,this)}this.releaseCursor();return acc}reduceRight(fn,initialValue,thisArg=this){let cursor=this.allocateCursor(this.tail,null);let acc=initialValue;let item;while(cursor.prev!==null){item=cursor.prev;cursor.prev=item.prev;acc=fn.call(thisArg,acc,item.data,item,this)}this.releaseCursor();return acc}some(fn,thisArg=this){for(let cursor=this.head;cursor!==null;cursor=cursor.next){if(fn.call(thisArg,cursor.data,cursor,this)){return true}}return false}map(fn,thisArg=this){const result=new List$e;for(let cursor=this.head;cursor!==null;cursor=cursor.next){result.appendData(fn.call(thisArg,cursor.data,cursor,this))}return result}filter(fn,thisArg=this){const result=new List$e;for(let cursor=this.head;cursor!==null;cursor=cursor.next){if(fn.call(thisArg,cursor.data,cursor,this)){result.appendData(cursor.data)}}return result}nextUntil(start,fn,thisArg=this){if(start===null){return}const cursor=this.allocateCursor(null,start);while(cursor.next!==null){const item=cursor.next;cursor.next=item.next;if(fn.call(thisArg,item.data,item,this)){break}}this.releaseCursor()}prevUntil(start,fn,thisArg=this){if(start===null){return}const cursor=this.allocateCursor(start,null);while(cursor.prev!==null){const item=cursor.prev;cursor.prev=item.prev;if(fn.call(thisArg,item.data,item,this)){break}}this.releaseCursor()}clear(){this.head=null;this.tail=null}copy(){const result=new List$e;for(let data of this){result.appendData(data)}return result}prepend(item){this.updateCursors(null,item,this.head,item);if(this.head!==null){this.head.prev=item;item.next=this.head}else{this.tail=item}this.head=item;return this}prependData(data){return this.prepend(List$e.createItem(data))}append(item){return this.insert(item)}appendData(data){return this.insert(List$e.createItem(data))}insert(item,before=null){if(before!==null){this.updateCursors(before.prev,item,before,item);if(before.prev===null){if(this.head!==before){throw new Error("before doesn't belong to list")}this.head=item;before.prev=item;item.next=before;this.updateCursors(null,item)}else{before.prev.next=item;item.prev=before.prev;before.prev=item;item.next=before}}else{this.updateCursors(this.tail,item,null,item);if(this.tail!==null){this.tail.next=item;item.prev=this.tail}else{this.head=item}this.tail=item}return this}insertData(data,before){return this.insert(List$e.createItem(data),before)}remove(item){this.updateCursors(item,item.prev,item,item.next);if(item.prev!==null){item.prev.next=item.next}else{if(this.head!==item){throw new Error("item doesn't belong to list")}this.head=item.next}if(item.next!==null){item.next.prev=item.prev}else{if(this.tail!==item){throw new Error("item doesn't belong to list")}this.tail=item.prev}item.prev=null;item.next=null;return item}push(data){this.insert(List$e.createItem(data))}pop(){return this.tail!==null?this.remove(this.tail):null}unshift(data){this.prepend(List$e.createItem(data))}shift(){return this.head!==null?this.remove(this.head):null}prependList(list){return this.insertList(list,this.head)}appendList(list){return this.insertList(list)}insertList(list,before){if(list.head===null){return this}if(before!==undefined&&before!==null){this.updateCursors(before.prev,list.tail,before,list.head);if(before.prev!==null){before.prev.next=list.head;list.head.prev=before.prev}else{this.head=list.head}before.prev=list.tail;list.tail.next=before}else{this.updateCursors(this.tail,list.tail,null,list.head);if(this.tail!==null){this.tail.next=list.head;list.head.prev=this.tail}else{this.head=list.head}this.tail=list.tail}list.head=null;list.tail=null;return this}replace(oldItem,newItemOrList){if("head"in newItemOrList){this.insertList(newItemOrList,oldItem)}else{this.insert(newItemOrList,oldItem)}this.remove(oldItem)}}List$f.List=List$e;var _SyntaxError$3={};var createCustomError$9={};function createCustomError$8(name,message){const error=Object.create(SyntaxError.prototype);const errorStack=new Error;return Object.assign(error,{name:name,message:message,get stack(){return(errorStack.stack||"").replace(/^(.+\n){1,3}/,`${name}: ${message}\n`)}})}createCustomError$9.createCustomError=createCustomError$8;const createCustomError$7=createCustomError$9;const MAX_LINE_LENGTH$1=100;const OFFSET_CORRECTION$1=60;const TAB_REPLACEMENT$1=" ";function sourceFragment$1({source:source,line:line,column:column},extraLines){function processLines(start,end){return lines.slice(start,end).map(((line,idx)=>String(start+idx+1).padStart(maxNumLength)+" |"+line)).join("\n")}const lines=source.split(/\r\n?|\n|\f/);const startLine=Math.max(1,line-extraLines)-1;const endLine=Math.min(line+extraLines,lines.length+1);const maxNumLength=Math.max(4,String(endLine).length)+1;let cutLeft=0;column+=(TAB_REPLACEMENT$1.length-1)*(lines[line-1].substr(0,column-1).match(/\t/g)||[]).length;if(column>MAX_LINE_LENGTH$1){cutLeft=column-OFFSET_CORRECTION$1+3;column=OFFSET_CORRECTION$1-2}for(let i=startLine;i<=endLine;i++){if(i>=0&&i<lines.length){lines[i]=lines[i].replace(/\t/g,TAB_REPLACEMENT$1);lines[i]=(cutLeft>0&&lines[i].length>cutLeft?"…":"")+lines[i].substr(cutLeft,MAX_LINE_LENGTH$1-2)+(lines[i].length>cutLeft+MAX_LINE_LENGTH$1-1?"…":"")}}return[processLines(startLine,line),new Array(column+maxNumLength+2).join("-")+"^",processLines(line,endLine)].filter(Boolean).join("\n")}function SyntaxError$a(message,source,offset,line,column){const error=Object.assign(createCustomError$7.createCustomError("SyntaxError",message),{source:source,offset:offset,line:line,column:column,sourceFragment(extraLines){return sourceFragment$1({source:source,line:line,column:column},isNaN(extraLines)?0:extraLines)},get formattedMessage(){return`Parse error: ${message}\n`+sourceFragment$1({source:source,line:line,column:column},2)}});return error}_SyntaxError$3.SyntaxError=SyntaxError$a;var sequence$3={};const types$1F=types$1I;function readSequence$3(recognizer){const children=this.createList();let space=false;const context={recognizer:recognizer};while(!this.eof){switch(this.tokenType){case types$1F.Comment:this.next();continue;case types$1F.WhiteSpace:space=true;this.next();continue}let child=recognizer.getNode.call(this,context);if(child===undefined){break}if(space){if(recognizer.onWhiteSpace){recognizer.onWhiteSpace.call(this,child,children,context)}space=false}children.push(child)}if(space&&recognizer.onWhiteSpace){recognizer.onWhiteSpace.call(this,null,children,context)}return children}sequence$3.readSequence=readSequence$3;const List$d=List$f;const SyntaxError$9=_SyntaxError$3;const index$j=tokenizer$5;const sequence$2=sequence$3;const OffsetToLocation$4=OffsetToLocation$7;const TokenStream$6=TokenStream$9;const utils$r=utils$u;const types$1E=types$1I;const names$d=names$g;const NOOP$1=()=>{};const EXCLAMATIONMARK$7=33;const NUMBERSIGN$9=35;const SEMICOLON$1=59;const LEFTCURLYBRACKET$3=123;const NULL$1=0;function createParseContext$1(name){return function(){return this[name]()}}function fetchParseValues$1(dict){const result=Object.create(null);for(const name in dict){const item=dict[name];const fn=item.parse||item;if(fn){result[name]=fn}}return result}function processConfig$1(config){const parseConfig={context:Object.create(null),scope:Object.assign(Object.create(null),config.scope),atrule:fetchParseValues$1(config.atrule),pseudo:fetchParseValues$1(config.pseudo),node:fetchParseValues$1(config.node)};for(const name in config.parseContext){switch(typeof config.parseContext[name]){case"function":parseConfig.context[name]=config.parseContext[name];break;case"string":parseConfig.context[name]=createParseContext$1(config.parseContext[name]);break}}return{config:parseConfig,...parseConfig,...parseConfig.node}}function createParser$1(config){let source="";let filename="<unknown>";let needPositions=false;let onParseError=NOOP$1;let onParseErrorThrow=false;const locationMap=new OffsetToLocation$4.OffsetToLocation;const parser=Object.assign(new TokenStream$6.TokenStream,processConfig$1(config||{}),{parseAtrulePrelude:true,parseRulePrelude:true,parseValue:true,parseCustomProperty:false,readSequence:sequence$2.readSequence,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(code){return code===LEFTCURLYBRACKET$3?1:0},consumeUntilLeftCurlyBracketOrSemicolon(code){return code===LEFTCURLYBRACKET$3||code===SEMICOLON$1?1:0},consumeUntilExclamationMarkOrSemicolon(code){return code===EXCLAMATIONMARK$7||code===SEMICOLON$1?1:0},consumeUntilSemicolonIncluded(code){return code===SEMICOLON$1?2:0},createList(){return new List$d.List},createSingleNodeList(node){return(new List$d.List).appendData(node)},getFirstListNode(list){return list&&list.first},getLastListNode(list){return list&&list.last},parseWithFallback(consumer,fallback){const startToken=this.tokenIndex;try{return consumer.call(this)}catch(e){if(onParseErrorThrow){throw e}const fallbackNode=fallback.call(this,startToken);onParseErrorThrow=true;onParseError(e,fallbackNode);onParseErrorThrow=false;return fallbackNode}},lookupNonWSType(offset){let type;do{type=this.lookupType(offset++);if(type!==types$1E.WhiteSpace){return type}}while(type!==NULL$1);return NULL$1},charCodeAt(offset){return offset>=0&&offset<source.length?source.charCodeAt(offset):0},substring(offsetStart,offsetEnd){return source.substring(offsetStart,offsetEnd)},substrToCursor(start){return this.source.substring(start,this.tokenStart)},cmpChar(offset,charCode){return utils$r.cmpChar(source,offset,charCode)},cmpStr(offsetStart,offsetEnd,str){return utils$r.cmpStr(source,offsetStart,offsetEnd,str)},consume(tokenType){const start=this.tokenStart;this.eat(tokenType);return this.substrToCursor(start)},consumeFunctionName(){const name=source.substring(this.tokenStart,this.tokenEnd-1);this.eat(types$1E.Function);return name},consumeNumber(type){const number=source.substring(this.tokenStart,utils$r.consumeNumber(source,this.tokenStart));this.eat(type);return number},eat(tokenType){if(this.tokenType!==tokenType){const tokenName=names$d[tokenType].slice(0,-6).replace(/-/g," ").replace(/^./,(m=>m.toUpperCase()));let message=`${/[[\](){}]/.test(tokenName)?`"${tokenName}"`:tokenName} is expected`;let offset=this.tokenStart;switch(tokenType){case types$1E.Ident:if(this.tokenType===types$1E.Function||this.tokenType===types$1E.Url){offset=this.tokenEnd-1;message="Identifier is expected but function found"}else{message="Identifier is expected"}break;case types$1E.Hash:if(this.isDelim(NUMBERSIGN$9)){this.next();offset++;message="Name is expected"}break;case types$1E.Percentage:if(this.tokenType===types$1E.Number){offset=this.tokenEnd;message="Percent sign is expected"}break}this.error(message,offset)}this.next()},eatIdent(name){if(this.tokenType!==types$1E.Ident||this.lookupValue(0,name)===false){this.error(`Identifier "${name}" is expected`)}this.next()},eatDelim(code){if(!this.isDelim(code)){this.error(`Delim "${String.fromCharCode(code)}" is expected`)}this.next()},getLocation(start,end){if(needPositions){return locationMap.getLocationRange(start,end,filename)}return null},getLocationFromList(list){if(needPositions){const head=this.getFirstListNode(list);const tail=this.getLastListNode(list);return locationMap.getLocationRange(head!==null?head.loc.start.offset-locationMap.startOffset:this.tokenStart,tail!==null?tail.loc.end.offset-locationMap.startOffset:this.tokenStart,filename)}return null},error(message,offset){const location=typeof offset!=="undefined"&&offset<source.length?locationMap.getLocation(offset):this.eof?locationMap.getLocation(utils$r.findWhiteSpaceStart(source,source.length-1)):locationMap.getLocation(this.tokenStart);throw new SyntaxError$9.SyntaxError(message||"Unexpected input",source,location.offset,location.line,location.column)}});const parse=function(source_,options){source=source_;options=options||{};parser.setSource(source,index$j.tokenize);locationMap.setSource(source,options.offset,options.line,options.column);filename=options.filename||"<unknown>";needPositions=Boolean(options.positions);onParseError=typeof options.onParseError==="function"?options.onParseError:NOOP$1;onParseErrorThrow=false;parser.parseAtrulePrelude="parseAtrulePrelude"in options?Boolean(options.parseAtrulePrelude):true;parser.parseRulePrelude="parseRulePrelude"in options?Boolean(options.parseRulePrelude):true;parser.parseValue="parseValue"in options?Boolean(options.parseValue):true;parser.parseCustomProperty="parseCustomProperty"in options?Boolean(options.parseCustomProperty):false;const{context:context="default",onComment:onComment}=options;if(context in parser.context===false){throw new Error("Unknown context `"+context+"`")}if(typeof onComment==="function"){parser.forEachToken(((type,start,end)=>{if(type===types$1E.Comment){const loc=parser.getLocation(start,end);const value=utils$r.cmpStr(source,end-2,end,"*/")?source.slice(start+2,end-2):source.slice(start+2,end);onComment(value,loc)}}))}const ast=parser.context[context].call(parser,options);if(!parser.eof){parser.error()}return ast};return Object.assign(parse,{SyntaxError:SyntaxError$9.SyntaxError,config:parser.config})}create$e.createParser=createParser$1;var create$d={};var sourceMap$3={};var sourceMapGenerator={};var base64Vlq={};var base64$1={};var intToCharMap="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");base64$1.encode=function(number){if(0<=number&&number<intToCharMap.length){return intToCharMap[number]}throw new TypeError("Must be between 0 and 63: "+number)};base64$1.decode=function(charCode){var bigA=65;var bigZ=90;var littleA=97;var littleZ=122;var zero=48;var nine=57;var plus=43;var slash=47;var littleOffset=26;var numberOffset=52;if(bigA<=charCode&&charCode<=bigZ){return charCode-bigA}if(littleA<=charCode&&charCode<=littleZ){return charCode-littleA+littleOffset}if(zero<=charCode&&charCode<=nine){return charCode-zero+numberOffset}if(charCode==plus){return 62}if(charCode==slash){return 63}return-1};var base64=base64$1;var VLQ_BASE_SHIFT=5;var VLQ_BASE=1<<VLQ_BASE_SHIFT;var VLQ_BASE_MASK=VLQ_BASE-1;var VLQ_CONTINUATION_BIT=VLQ_BASE;function toVLQSigned(aValue){return aValue<0?(-aValue<<1)+1:(aValue<<1)+0}function fromVLQSigned(aValue){var isNegative=(aValue&1)===1;var shifted=aValue>>1;return isNegative?-shifted:shifted}base64Vlq.encode=function base64VLQ_encode(aValue){var encoded="";var digit;var vlq=toVLQSigned(aValue);do{digit=vlq&VLQ_BASE_MASK;vlq>>>=VLQ_BASE_SHIFT;if(vlq>0){digit|=VLQ_CONTINUATION_BIT}encoded+=base64.encode(digit)}while(vlq>0);return encoded};base64Vlq.decode=function base64VLQ_decode(aStr,aIndex,aOutParam){var strLen=aStr.length;var result=0;var shift=0;var continuation,digit;do{if(aIndex>=strLen){throw new Error("Expected more digits in base 64 VLQ value.")}digit=base64.decode(aStr.charCodeAt(aIndex++));if(digit===-1){throw new Error("Invalid base64 digit: "+aStr.charAt(aIndex-1))}continuation=!!(digit&VLQ_CONTINUATION_BIT);digit&=VLQ_BASE_MASK;result=result+(digit<<shift);shift+=VLQ_BASE_SHIFT}while(continuation);aOutParam.value=fromVLQSigned(result);aOutParam.rest=aIndex};var util$3={};(function(exports){function getArg(aArgs,aName,aDefaultValue){if(aName in aArgs){return aArgs[aName]}else if(arguments.length===3){return aDefaultValue}else{throw new Error('"'+aName+'" is a required argument.')}}exports.getArg=getArg;var urlRegexp=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;var dataUrlRegexp=/^data:.+\,.+$/;function urlParse(aUrl){var match=aUrl.match(urlRegexp);if(!match){return null}return{scheme:match[1],auth:match[2],host:match[3],port:match[4],path:match[5]}}exports.urlParse=urlParse;function urlGenerate(aParsedUrl){var url="";if(aParsedUrl.scheme){url+=aParsedUrl.scheme+":"}url+="//";if(aParsedUrl.auth){url+=aParsedUrl.auth+"@"}if(aParsedUrl.host){url+=aParsedUrl.host}if(aParsedUrl.port){url+=":"+aParsedUrl.port}if(aParsedUrl.path){url+=aParsedUrl.path}return url}exports.urlGenerate=urlGenerate;var MAX_CACHED_INPUTS=32;function lruMemoize(f){var cache=[];return function(input){for(var i=0;i<cache.length;i++){if(cache[i].input===input){var temp=cache[0];cache[0]=cache[i];cache[i]=temp;return cache[0].result}}var result=f(input);cache.unshift({input:input,result:result});if(cache.length>MAX_CACHED_INPUTS){cache.pop()}return result}}var normalize=lruMemoize((function normalize(aPath){var path=aPath;var url=urlParse(aPath);if(url){if(!url.path){return aPath}path=url.path}var isAbsolute=exports.isAbsolute(path);var parts=[];var start=0;var i=0;while(true){start=i;i=path.indexOf("/",start);if(i===-1){parts.push(path.slice(start));break}else{parts.push(path.slice(start,i));while(i<path.length&&path[i]==="/"){i++}}}for(var part,up=0,i=parts.length-1;i>=0;i--){part=parts[i];if(part==="."){parts.splice(i,1)}else if(part===".."){up++}else if(up>0){if(part===""){parts.splice(i+1,up);up=0}else{parts.splice(i,2);up--}}}path=parts.join("/");if(path===""){path=isAbsolute?"/":"."}if(url){url.path=path;return urlGenerate(url)}return path}));exports.normalize=normalize;function join(aRoot,aPath){if(aRoot===""){aRoot="."}if(aPath===""){aPath="."}var aPathUrl=urlParse(aPath);var aRootUrl=urlParse(aRoot);if(aRootUrl){aRoot=aRootUrl.path||"/"}if(aPathUrl&&!aPathUrl.scheme){if(aRootUrl){aPathUrl.scheme=aRootUrl.scheme}return urlGenerate(aPathUrl)}if(aPathUrl||aPath.match(dataUrlRegexp)){return aPath}if(aRootUrl&&!aRootUrl.host&&!aRootUrl.path){aRootUrl.host=aPath;return urlGenerate(aRootUrl)}var joined=aPath.charAt(0)==="/"?aPath:normalize(aRoot.replace(/\/+$/,"")+"/"+aPath);if(aRootUrl){aRootUrl.path=joined;return urlGenerate(aRootUrl)}return joined}exports.join=join;exports.isAbsolute=function(aPath){return aPath.charAt(0)==="/"||urlRegexp.test(aPath)};function relative(aRoot,aPath){if(aRoot===""){aRoot="."}aRoot=aRoot.replace(/\/$/,"");var level=0;while(aPath.indexOf(aRoot+"/")!==0){var index=aRoot.lastIndexOf("/");if(index<0){return aPath}aRoot=aRoot.slice(0,index);if(aRoot.match(/^([^\/]+:\/)?\/*$/)){return aPath}++level}return Array(level+1).join("../")+aPath.substr(aRoot.length+1)}exports.relative=relative;var supportsNullProto=function(){var obj=Object.create(null);return!("__proto__"in obj)}();function identity(s){return s}function toSetString(aStr){if(isProtoString(aStr)){return"$"+aStr}return aStr}exports.toSetString=supportsNullProto?identity:toSetString;function fromSetString(aStr){if(isProtoString(aStr)){return aStr.slice(1)}return aStr}exports.fromSetString=supportsNullProto?identity:fromSetString;function isProtoString(s){if(!s){return false}var length=s.length;if(length<9){return false}if(s.charCodeAt(length-1)!==95||s.charCodeAt(length-2)!==95||s.charCodeAt(length-3)!==111||s.charCodeAt(length-4)!==116||s.charCodeAt(length-5)!==111||s.charCodeAt(length-6)!==114||s.charCodeAt(length-7)!==112||s.charCodeAt(length-8)!==95||s.charCodeAt(length-9)!==95){return false}for(var i=length-10;i>=0;i--){if(s.charCodeAt(i)!==36){return false}}return true}function compareByOriginalPositions(mappingA,mappingB,onlyCompareOriginal){var cmp=strcmp(mappingA.source,mappingB.source);if(cmp!==0){return cmp}cmp=mappingA.originalLine-mappingB.originalLine;if(cmp!==0){return cmp}cmp=mappingA.originalColumn-mappingB.originalColumn;if(cmp!==0||onlyCompareOriginal){return cmp}cmp=mappingA.generatedColumn-mappingB.generatedColumn;if(cmp!==0){return cmp}cmp=mappingA.generatedLine-mappingB.generatedLine;if(cmp!==0){return cmp}return strcmp(mappingA.name,mappingB.name)}exports.compareByOriginalPositions=compareByOriginalPositions;function compareByOriginalPositionsNoSource(mappingA,mappingB,onlyCompareOriginal){var cmp;cmp=mappingA.originalLine-mappingB.originalLine;if(cmp!==0){return cmp}cmp=mappingA.originalColumn-mappingB.originalColumn;if(cmp!==0||onlyCompareOriginal){return cmp}cmp=mappingA.generatedColumn-mappingB.generatedColumn;if(cmp!==0){return cmp}cmp=mappingA.generatedLine-mappingB.generatedLine;if(cmp!==0){return cmp}return strcmp(mappingA.name,mappingB.name)}exports.compareByOriginalPositionsNoSource=compareByOriginalPositionsNoSource;function compareByGeneratedPositionsDeflated(mappingA,mappingB,onlyCompareGenerated){var cmp=mappingA.generatedLine-mappingB.generatedLine;if(cmp!==0){return cmp}cmp=mappingA.generatedColumn-mappingB.generatedColumn;if(cmp!==0||onlyCompareGenerated){return cmp}cmp=strcmp(mappingA.source,mappingB.source);if(cmp!==0){return cmp}cmp=mappingA.originalLine-mappingB.originalLine;if(cmp!==0){return cmp}cmp=mappingA.originalColumn-mappingB.originalColumn;if(cmp!==0){return cmp}return strcmp(mappingA.name,mappingB.name)}exports.compareByGeneratedPositionsDeflated=compareByGeneratedPositionsDeflated;function compareByGeneratedPositionsDeflatedNoLine(mappingA,mappingB,onlyCompareGenerated){var cmp=mappingA.generatedColumn-mappingB.generatedColumn;if(cmp!==0||onlyCompareGenerated){return cmp}cmp=strcmp(mappingA.source,mappingB.source);if(cmp!==0){return cmp}cmp=mappingA.originalLine-mappingB.originalLine;if(cmp!==0){return cmp}cmp=mappingA.originalColumn-mappingB.originalColumn;if(cmp!==0){return cmp}return strcmp(mappingA.name,mappingB.name)}exports.compareByGeneratedPositionsDeflatedNoLine=compareByGeneratedPositionsDeflatedNoLine;function strcmp(aStr1,aStr2){if(aStr1===aStr2){return 0}if(aStr1===null){return 1}if(aStr2===null){return-1}if(aStr1>aStr2){return 1}return-1}function compareByGeneratedPositionsInflated(mappingA,mappingB){var cmp=mappingA.generatedLine-mappingB.generatedLine;if(cmp!==0){return cmp}cmp=mappingA.generatedColumn-mappingB.generatedColumn;if(cmp!==0){return cmp}cmp=strcmp(mappingA.source,mappingB.source);if(cmp!==0){return cmp}cmp=mappingA.originalLine-mappingB.originalLine;if(cmp!==0){return cmp}cmp=mappingA.originalColumn-mappingB.originalColumn;if(cmp!==0){return cmp}return strcmp(mappingA.name,mappingB.name)}exports.compareByGeneratedPositionsInflated=compareByGeneratedPositionsInflated;function parseSourceMapInput(str){return JSON.parse(str.replace(/^\)]}'[^\n]*\n/,""))}exports.parseSourceMapInput=parseSourceMapInput;function computeSourceURL(sourceRoot,sourceURL,sourceMapURL){sourceURL=sourceURL||"";if(sourceRoot){if(sourceRoot[sourceRoot.length-1]!=="/"&&sourceURL[0]!=="/"){sourceRoot+="/"}sourceURL=sourceRoot+sourceURL}if(sourceMapURL){var parsed=urlParse(sourceMapURL);if(!parsed){throw new Error("sourceMapURL could not be parsed")}if(parsed.path){var index=parsed.path.lastIndexOf("/");if(index>=0){parsed.path=parsed.path.substring(0,index+1)}}sourceURL=join(urlGenerate(parsed),sourceURL)}return normalize(sourceURL)}exports.computeSourceURL=computeSourceURL})(util$3);var arraySet={};var util$2=util$3;var has=Object.prototype.hasOwnProperty;var hasNativeMap=typeof Map!=="undefined";function ArraySet$1(){this._array=[];this._set=hasNativeMap?new Map:Object.create(null)}ArraySet$1.fromArray=function ArraySet_fromArray(aArray,aAllowDuplicates){var set=new ArraySet$1;for(var i=0,len=aArray.length;i<len;i++){set.add(aArray[i],aAllowDuplicates)}return set};ArraySet$1.prototype.size=function ArraySet_size(){return hasNativeMap?this._set.size:Object.getOwnPropertyNames(this._set).length};ArraySet$1.prototype.add=function ArraySet_add(aStr,aAllowDuplicates){var sStr=hasNativeMap?aStr:util$2.toSetString(aStr);var isDuplicate=hasNativeMap?this.has(aStr):has.call(this._set,sStr);var idx=this._array.length;if(!isDuplicate||aAllowDuplicates){this._array.push(aStr)}if(!isDuplicate){if(hasNativeMap){this._set.set(aStr,idx)}else{this._set[sStr]=idx}}};ArraySet$1.prototype.has=function ArraySet_has(aStr){if(hasNativeMap){return this._set.has(aStr)}else{var sStr=util$2.toSetString(aStr);return has.call(this._set,sStr)}};ArraySet$1.prototype.indexOf=function ArraySet_indexOf(aStr){if(hasNativeMap){var idx=this._set.get(aStr);if(idx>=0){return idx}}else{var sStr=util$2.toSetString(aStr);if(has.call(this._set,sStr)){return this._set[sStr]}}throw new Error('"'+aStr+'" is not in the set.')};ArraySet$1.prototype.at=function ArraySet_at(aIdx){if(aIdx>=0&&aIdx<this._array.length){return this._array[aIdx]}throw new Error("No element indexed by "+aIdx)};ArraySet$1.prototype.toArray=function ArraySet_toArray(){return this._array.slice()};arraySet.ArraySet=ArraySet$1;var mappingList={};var util$1=util$3;function generatedPositionAfter(mappingA,mappingB){var lineA=mappingA.generatedLine;var lineB=mappingB.generatedLine;var columnA=mappingA.generatedColumn;var columnB=mappingB.generatedColumn;return lineB>lineA||lineB==lineA&&columnB>=columnA||util$1.compareByGeneratedPositionsInflated(mappingA,mappingB)<=0}function MappingList$1(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList$1.prototype.unsortedForEach=function MappingList_forEach(aCallback,aThisArg){this._array.forEach(aCallback,aThisArg)};MappingList$1.prototype.add=function MappingList_add(aMapping){if(generatedPositionAfter(this._last,aMapping)){this._last=aMapping;this._array.push(aMapping)}else{this._sorted=false;this._array.push(aMapping)}};MappingList$1.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(util$1.compareByGeneratedPositionsInflated);this._sorted=true}return this._array};mappingList.MappingList=MappingList$1;var base64VLQ=base64Vlq;var util=util$3;var ArraySet=arraySet.ArraySet;var MappingList=mappingList.MappingList;function SourceMapGenerator(aArgs){if(!aArgs){aArgs={}}this._file=util.getArg(aArgs,"file",null);this._sourceRoot=util.getArg(aArgs,"sourceRoot",null);this._skipValidation=util.getArg(aArgs,"skipValidation",false);this._sources=new ArraySet;this._names=new ArraySet;this._mappings=new MappingList;this._sourcesContents=null}SourceMapGenerator.prototype._version=3;SourceMapGenerator.fromSourceMap=function SourceMapGenerator_fromSourceMap(aSourceMapConsumer){var sourceRoot=aSourceMapConsumer.sourceRoot;var generator=new SourceMapGenerator({file:aSourceMapConsumer.file,sourceRoot:sourceRoot});aSourceMapConsumer.eachMapping((function(mapping){var newMapping={generated:{line:mapping.generatedLine,column:mapping.generatedColumn}};if(mapping.source!=null){newMapping.source=mapping.source;if(sourceRoot!=null){newMapping.source=util.relative(sourceRoot,newMapping.source)}newMapping.original={line:mapping.originalLine,column:mapping.originalColumn};if(mapping.name!=null){newMapping.name=mapping.name}}generator.addMapping(newMapping)}));aSourceMapConsumer.sources.forEach((function(sourceFile){var sourceRelative=sourceFile;if(sourceRoot!==null){sourceRelative=util.relative(sourceRoot,sourceFile)}if(!generator._sources.has(sourceRelative)){generator._sources.add(sourceRelative)}var content=aSourceMapConsumer.sourceContentFor(sourceFile);if(content!=null){generator.setSourceContent(sourceFile,content)}}));return generator};SourceMapGenerator.prototype.addMapping=function SourceMapGenerator_addMapping(aArgs){var generated=util.getArg(aArgs,"generated");var original=util.getArg(aArgs,"original",null);var source=util.getArg(aArgs,"source",null);var name=util.getArg(aArgs,"name",null);if(!this._skipValidation){this._validateMapping(generated,original,source,name)}if(source!=null){source=String(source);if(!this._sources.has(source)){this._sources.add(source)}}if(name!=null){name=String(name);if(!this._names.has(name)){this._names.add(name)}}this._mappings.add({generatedLine:generated.line,generatedColumn:generated.column,originalLine:original!=null&&original.line,originalColumn:original!=null&&original.column,source:source,name:name})};SourceMapGenerator.prototype.setSourceContent=function SourceMapGenerator_setSourceContent(aSourceFile,aSourceContent){var source=aSourceFile;if(this._sourceRoot!=null){source=util.relative(this._sourceRoot,source)}if(aSourceContent!=null){if(!this._sourcesContents){this._sourcesContents=Object.create(null)}this._sourcesContents[util.toSetString(source)]=aSourceContent}else if(this._sourcesContents){delete this._sourcesContents[util.toSetString(source)];if(Object.keys(this._sourcesContents).length===0){this._sourcesContents=null}}};SourceMapGenerator.prototype.applySourceMap=function SourceMapGenerator_applySourceMap(aSourceMapConsumer,aSourceFile,aSourceMapPath){var sourceFile=aSourceFile;if(aSourceFile==null){if(aSourceMapConsumer.file==null){throw new Error("SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, "+'or the source map\'s "file" property. Both were omitted.')}sourceFile=aSourceMapConsumer.file}var sourceRoot=this._sourceRoot;if(sourceRoot!=null){sourceFile=util.relative(sourceRoot,sourceFile)}var newSources=new ArraySet;var newNames=new ArraySet;this._mappings.unsortedForEach((function(mapping){if(mapping.source===sourceFile&&mapping.originalLine!=null){var original=aSourceMapConsumer.originalPositionFor({line:mapping.originalLine,column:mapping.originalColumn});if(original.source!=null){mapping.source=original.source;if(aSourceMapPath!=null){mapping.source=util.join(aSourceMapPath,mapping.source)}if(sourceRoot!=null){mapping.source=util.relative(sourceRoot,mapping.source)}mapping.originalLine=original.line;mapping.originalColumn=original.column;if(original.name!=null){mapping.name=original.name}}}var source=mapping.source;if(source!=null&&!newSources.has(source)){newSources.add(source)}var name=mapping.name;if(name!=null&&!newNames.has(name)){newNames.add(name)}}),this);this._sources=newSources;this._names=newNames;aSourceMapConsumer.sources.forEach((function(sourceFile){var content=aSourceMapConsumer.sourceContentFor(sourceFile);if(content!=null){if(aSourceMapPath!=null){sourceFile=util.join(aSourceMapPath,sourceFile)}if(sourceRoot!=null){sourceFile=util.relative(sourceRoot,sourceFile)}this.setSourceContent(sourceFile,content)}}),this)};SourceMapGenerator.prototype._validateMapping=function SourceMapGenerator_validateMapping(aGenerated,aOriginal,aSource,aName){if(aOriginal&&typeof aOriginal.line!=="number"&&typeof aOriginal.column!=="number"){throw new Error("original.line and original.column are not numbers -- you probably meant to omit "+"the original mapping entirely and only map the generated position. If so, pass "+"null for the original mapping instead of an object with empty or null values.")}if(aGenerated&&"line"in aGenerated&&"column"in aGenerated&&aGenerated.line>0&&aGenerated.column>=0&&!aOriginal&&!aSource&&!aName){return}else if(aGenerated&&"line"in aGenerated&&"column"in aGenerated&&aOriginal&&"line"in aOriginal&&"column"in aOriginal&&aGenerated.line>0&&aGenerated.column>=0&&aOriginal.line>0&&aOriginal.column>=0&&aSource){return}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:aGenerated,source:aSource,original:aOriginal,name:aName}))}};SourceMapGenerator.prototype._serializeMappings=function SourceMapGenerator_serializeMappings(){var previousGeneratedColumn=0;var previousGeneratedLine=1;var previousOriginalColumn=0;var previousOriginalLine=0;var previousName=0;var previousSource=0;var result="";var next;var mapping;var nameIdx;var sourceIdx;var mappings=this._mappings.toArray();for(var i=0,len=mappings.length;i<len;i++){mapping=mappings[i];next="";if(mapping.generatedLine!==previousGeneratedLine){previousGeneratedColumn=0;while(mapping.generatedLine!==previousGeneratedLine){next+=";";previousGeneratedLine++}}else{if(i>0){if(!util.compareByGeneratedPositionsInflated(mapping,mappings[i-1])){continue}next+=","}}next+=base64VLQ.encode(mapping.generatedColumn-previousGeneratedColumn);previousGeneratedColumn=mapping.generatedColumn;if(mapping.source!=null){sourceIdx=this._sources.indexOf(mapping.source);next+=base64VLQ.encode(sourceIdx-previousSource);previousSource=sourceIdx;next+=base64VLQ.encode(mapping.originalLine-1-previousOriginalLine);previousOriginalLine=mapping.originalLine-1;next+=base64VLQ.encode(mapping.originalColumn-previousOriginalColumn);previousOriginalColumn=mapping.originalColumn;if(mapping.name!=null){nameIdx=this._names.indexOf(mapping.name);next+=base64VLQ.encode(nameIdx-previousName);previousName=nameIdx}}result+=next}return result};SourceMapGenerator.prototype._generateSourcesContent=function SourceMapGenerator_generateSourcesContent(aSources,aSourceRoot){return aSources.map((function(source){if(!this._sourcesContents){return null}if(aSourceRoot!=null){source=util.relative(aSourceRoot,source)}var key=util.toSetString(source);return Object.prototype.hasOwnProperty.call(this._sourcesContents,key)?this._sourcesContents[key]:null}),this)};SourceMapGenerator.prototype.toJSON=function SourceMapGenerator_toJSON(){var map={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){map.file=this._file}if(this._sourceRoot!=null){map.sourceRoot=this._sourceRoot}if(this._sourcesContents){map.sourcesContent=this._generateSourcesContent(map.sources,map.sourceRoot)}return map};SourceMapGenerator.prototype.toString=function SourceMapGenerator_toString(){return JSON.stringify(this.toJSON())};sourceMapGenerator.SourceMapGenerator=SourceMapGenerator;const sourceMapGenerator_js$1=sourceMapGenerator;const trackNodes$1=new Set(["Atrule","Selector","Declaration"]);function generateSourceMap$1(handlers){const map=new sourceMapGenerator_js$1.SourceMapGenerator;const generated={line:1,column:0};const original={line:0,column:0};const activatedGenerated={line:1,column:0};const activatedMapping={generated:activatedGenerated};let line=1;let column=0;let sourceMappingActive=false;const origHandlersNode=handlers.node;handlers.node=function(node){if(node.loc&&node.loc.start&&trackNodes$1.has(node.type)){const nodeLine=node.loc.start.line;const nodeColumn=node.loc.start.column-1;if(original.line!==nodeLine||original.column!==nodeColumn){original.line=nodeLine;original.column=nodeColumn;generated.line=line;generated.column=column;if(sourceMappingActive){sourceMappingActive=false;if(generated.line!==activatedGenerated.line||generated.column!==activatedGenerated.column){map.addMapping(activatedMapping)}}sourceMappingActive=true;map.addMapping({source:node.loc.source,original:original,generated:generated})}}origHandlersNode.call(this,node);if(sourceMappingActive&&trackNodes$1.has(node.type)){activatedGenerated.line=line;activatedGenerated.column=column}};const origHandlersEmit=handlers.emit;handlers.emit=function(value,type,auto){for(let i=0;i<value.length;i++){if(value.charCodeAt(i)===10){line++;column=0}else{column++}}origHandlersEmit(value,type,auto)};const origHandlersResult=handlers.result;handlers.result=function(){if(sourceMappingActive){map.addMapping(activatedMapping)}return{css:origHandlersResult(),map:map}};return handlers}sourceMap$3.generateSourceMap=generateSourceMap$1;var tokenBefore$3={};const types$1D=types$1I;const PLUSSIGN$j=43;const HYPHENMINUS$d=45;const code$1=(type,value)=>{if(type===types$1D.Delim){type=value}if(typeof type==="string"){const charCode=type.charCodeAt(0);return charCode>127?32768:charCode<<8}return type};const specPairs$1=[[types$1D.Ident,types$1D.Ident],[types$1D.Ident,types$1D.Function],[types$1D.Ident,types$1D.Url],[types$1D.Ident,types$1D.BadUrl],[types$1D.Ident,"-"],[types$1D.Ident,types$1D.Number],[types$1D.Ident,types$1D.Percentage],[types$1D.Ident,types$1D.Dimension],[types$1D.Ident,types$1D.CDC],[types$1D.Ident,types$1D.LeftParenthesis],[types$1D.AtKeyword,types$1D.Ident],[types$1D.AtKeyword,types$1D.Function],[types$1D.AtKeyword,types$1D.Url],[types$1D.AtKeyword,types$1D.BadUrl],[types$1D.AtKeyword,"-"],[types$1D.AtKeyword,types$1D.Number],[types$1D.AtKeyword,types$1D.Percentage],[types$1D.AtKeyword,types$1D.Dimension],[types$1D.AtKeyword,types$1D.CDC],[types$1D.Hash,types$1D.Ident],[types$1D.Hash,types$1D.Function],[types$1D.Hash,types$1D.Url],[types$1D.Hash,types$1D.BadUrl],[types$1D.Hash,"-"],[types$1D.Hash,types$1D.Number],[types$1D.Hash,types$1D.Percentage],[types$1D.Hash,types$1D.Dimension],[types$1D.Hash,types$1D.CDC],[types$1D.Dimension,types$1D.Ident],[types$1D.Dimension,types$1D.Function],[types$1D.Dimension,types$1D.Url],[types$1D.Dimension,types$1D.BadUrl],[types$1D.Dimension,"-"],[types$1D.Dimension,types$1D.Number],[types$1D.Dimension,types$1D.Percentage],[types$1D.Dimension,types$1D.Dimension],[types$1D.Dimension,types$1D.CDC],["#",types$1D.Ident],["#",types$1D.Function],["#",types$1D.Url],["#",types$1D.BadUrl],["#","-"],["#",types$1D.Number],["#",types$1D.Percentage],["#",types$1D.Dimension],["#",types$1D.CDC],["-",types$1D.Ident],["-",types$1D.Function],["-",types$1D.Url],["-",types$1D.BadUrl],["-","-"],["-",types$1D.Number],["-",types$1D.Percentage],["-",types$1D.Dimension],["-",types$1D.CDC],[types$1D.Number,types$1D.Ident],[types$1D.Number,types$1D.Function],[types$1D.Number,types$1D.Url],[types$1D.Number,types$1D.BadUrl],[types$1D.Number,types$1D.Number],[types$1D.Number,types$1D.Percentage],[types$1D.Number,types$1D.Dimension],[types$1D.Number,"%"],[types$1D.Number,types$1D.CDC],["@",types$1D.Ident],["@",types$1D.Function],["@",types$1D.Url],["@",types$1D.BadUrl],["@","-"],["@",types$1D.CDC],[".",types$1D.Number],[".",types$1D.Percentage],[".",types$1D.Dimension],["+",types$1D.Number],["+",types$1D.Percentage],["+",types$1D.Dimension],["/","*"]];const safePairs$1=specPairs$1.concat([[types$1D.Ident,types$1D.Hash],[types$1D.Dimension,types$1D.Hash],[types$1D.Hash,types$1D.Hash],[types$1D.AtKeyword,types$1D.LeftParenthesis],[types$1D.AtKeyword,types$1D.String],[types$1D.AtKeyword,types$1D.Colon],[types$1D.Percentage,types$1D.Percentage],[types$1D.Percentage,types$1D.Dimension],[types$1D.Percentage,types$1D.Function],[types$1D.Percentage,"-"],[types$1D.RightParenthesis,types$1D.Ident],[types$1D.RightParenthesis,types$1D.Function],[types$1D.RightParenthesis,types$1D.Percentage],[types$1D.RightParenthesis,types$1D.Dimension],[types$1D.RightParenthesis,types$1D.Hash],[types$1D.RightParenthesis,"-"]]);function createMap$1(pairs){const isWhiteSpaceRequired=new Set(pairs.map((([prev,next])=>code$1(prev)<<16|code$1(next))));return function(prevCode,type,value){const nextCode=code$1(type,value);const nextCharCode=value.charCodeAt(0);const emitWs=nextCharCode===HYPHENMINUS$d&&type!==types$1D.Ident&&type!==types$1D.Function&&type!==types$1D.CDC||nextCharCode===PLUSSIGN$j?isWhiteSpaceRequired.has(prevCode<<16|nextCharCode<<8):isWhiteSpaceRequired.has(prevCode<<16|nextCode);if(emitWs){this.emit(" ",types$1D.WhiteSpace,true)}return nextCode}}const spec$1=createMap$1(specPairs$1);const safe$1=createMap$1(safePairs$1);tokenBefore$3.safe=safe$1;tokenBefore$3.spec=spec$1;const index$i=tokenizer$5;const sourceMap$2=sourceMap$3;const tokenBefore$2=tokenBefore$3;const types$1C=types$1I;const REVERSESOLIDUS$1=92;function processChildren$1(node,delimeter){if(typeof delimeter==="function"){let prev=null;node.children.forEach((node=>{if(prev!==null){delimeter.call(this,prev)}this.node(node);prev=node}));return}node.children.forEach(this.node,this)}function processChunk$1(chunk){index$i.tokenize(chunk,((type,start,end)=>{this.token(type,chunk.slice(start,end))}))}function createGenerator$1(config){const types$1=new Map;for(let name in config.node){const item=config.node[name];const fn=item.generate||item;if(typeof fn==="function"){types$1.set(name,item.generate||item)}}return function(node,options){let buffer="";let prevCode=0;let handlers={node(node){if(types$1.has(node.type)){types$1.get(node.type).call(publicApi,node)}else{throw new Error("Unknown node type: "+node.type)}},tokenBefore:tokenBefore$2.safe,token(type,value){prevCode=this.tokenBefore(prevCode,type,value);this.emit(value,type,false);if(type===types$1C.Delim&&value.charCodeAt(0)===REVERSESOLIDUS$1){this.emit("\n",types$1C.WhiteSpace,true)}},emit(value){buffer+=value},result(){return buffer}};if(options){if(typeof options.decorator==="function"){handlers=options.decorator(handlers)}if(options.sourceMap){handlers=sourceMap$2.generateSourceMap(handlers)}if(options.mode in tokenBefore$2){handlers.tokenBefore=tokenBefore$2[options.mode]}}const publicApi={node:node=>handlers.node(node),children:processChildren$1,token:(type,value)=>handlers.token(type,value),tokenize:processChunk$1};handlers.node(node);return handlers.result()}}create$d.createGenerator=createGenerator$1;var create$c={};const List$c=List$f;function createConvertor$1(walk){return{fromPlainObject(ast){walk(ast,{enter(node){if(node.children&&node.children instanceof List$c.List===false){node.children=(new List$c.List).fromArray(node.children)}}});return ast},toPlainObject(ast){walk(ast,{leave(node){if(node.children&&node.children instanceof List$c.List){node.children=node.children.toArray()}}});return ast}}}create$c.createConvertor=createConvertor$1;var create$b={};const{hasOwnProperty:hasOwnProperty$b}=Object.prototype;const noop$5=function(){};function ensureFunction$3(value){return typeof value==="function"?value:noop$5}function invokeForType$1(fn,type){return function(node,item,list){if(node.type===type){fn.call(this,node,item,list)}}}function getWalkersFromStructure$1(name,nodeType){const structure=nodeType.structure;const walkers=[];for(const key in structure){if(hasOwnProperty$b.call(structure,key)===false){continue}let fieldTypes=structure[key];const walker={name:key,type:false,nullable:false};if(!Array.isArray(fieldTypes)){fieldTypes=[fieldTypes]}for(const fieldType of fieldTypes){if(fieldType===null){walker.nullable=true}else if(typeof fieldType==="string"){walker.type="node"}else if(Array.isArray(fieldType)){walker.type="list"}}if(walker.type){walkers.push(walker)}}if(walkers.length){return{context:nodeType.walkContext,fields:walkers}}return null}function getTypesFromConfig$1(config){const types={};for(const name in config.node){if(hasOwnProperty$b.call(config.node,name)){const nodeType=config.node[name];if(!nodeType.structure){throw new Error("Missed `structure` field in `"+name+"` node type definition")}types[name]=getWalkersFromStructure$1(name,nodeType)}}return types}function createTypeIterator$1(config,reverse){const fields=config.fields.slice();const contextName=config.context;const useContext=typeof contextName==="string";if(reverse){fields.reverse()}return function(node,context,walk,walkReducer){let prevContextValue;if(useContext){prevContextValue=context[contextName];context[contextName]=node}for(const field of fields){const ref=node[field.name];if(!field.nullable||ref){if(field.type==="list"){const breakWalk=reverse?ref.reduceRight(walkReducer,false):ref.reduce(walkReducer,false);if(breakWalk){return true}}else if(walk(ref)){return true}}}if(useContext){context[contextName]=prevContextValue}}}function createFastTraveralMap$1({StyleSheet:StyleSheet,Atrule:Atrule,Rule:Rule,Block:Block,DeclarationList:DeclarationList}){return{Atrule:{StyleSheet:StyleSheet,Atrule:Atrule,Rule:Rule,Block:Block},Rule:{StyleSheet:StyleSheet,Atrule:Atrule,Rule:Rule,Block:Block},Declaration:{StyleSheet:StyleSheet,Atrule:Atrule,Rule:Rule,Block:Block,DeclarationList:DeclarationList}}}function createWalker$1(config){const types=getTypesFromConfig$1(config);const iteratorsNatural={};const iteratorsReverse={};const breakWalk=Symbol("break-walk");const skipNode=Symbol("skip-node");for(const name in types){if(hasOwnProperty$b.call(types,name)&&types[name]!==null){iteratorsNatural[name]=createTypeIterator$1(types[name],false);iteratorsReverse[name]=createTypeIterator$1(types[name],true)}}const fastTraversalIteratorsNatural=createFastTraveralMap$1(iteratorsNatural);const fastTraversalIteratorsReverse=createFastTraveralMap$1(iteratorsReverse);const walk=function(root,options){function walkNode(node,item,list){const enterRet=enter.call(context,node,item,list);if(enterRet===breakWalk){return true}if(enterRet===skipNode){return false}if(iterators.hasOwnProperty(node.type)){if(iterators[node.type](node,context,walkNode,walkReducer)){return true}}if(leave.call(context,node,item,list)===breakWalk){return true}return false}let enter=noop$5;let leave=noop$5;let iterators=iteratorsNatural;let walkReducer=(ret,data,item,list)=>ret||walkNode(data,item,list);const context={break:breakWalk,skip:skipNode,root:root,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof options==="function"){enter=options}else if(options){enter=ensureFunction$3(options.enter);leave=ensureFunction$3(options.leave);if(options.reverse){iterators=iteratorsReverse}if(options.visit){if(fastTraversalIteratorsNatural.hasOwnProperty(options.visit)){iterators=options.reverse?fastTraversalIteratorsReverse[options.visit]:fastTraversalIteratorsNatural[options.visit]}else if(!types.hasOwnProperty(options.visit)){throw new Error("Bad value `"+options.visit+"` for `visit` option (should be: "+Object.keys(types).sort().join(", ")+")")}enter=invokeForType$1(enter,options.visit);leave=invokeForType$1(leave,options.visit)}}if(enter===noop$5&&leave===noop$5){throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function")}walkNode(root)};walk.break=breakWalk;walk.skip=skipNode;walk.find=function(ast,fn){let found=null;walk(ast,(function(node,item,list){if(fn.call(this,node,item,list)){found=node;return breakWalk}}));return found};walk.findLast=function(ast,fn){let found=null;walk(ast,{reverse:true,enter(node,item,list){if(fn.call(this,node,item,list)){found=node;return breakWalk}}});return found};walk.findAll=function(ast,fn){const found=[];walk(ast,(function(node,item,list){if(fn.call(this,node,item,list)){found.push(node)}}));return found};return walk}create$b.createWalker=createWalker$1;var Lexer$7={};var error$4={};var generate$1u={};function noop$4(value){return value}function generateMultiplier$1(multiplier){const{min:min,max:max,comma:comma}=multiplier;if(min===0&&max===0){return comma?"#?":"*"}if(min===0&&max===1){return"?"}if(min===1&&max===0){return comma?"#":"+"}if(min===1&&max===1){return""}return(comma?"#":"")+(min===max?"{"+min+"}":"{"+min+","+(max!==0?max:"")+"}")}function generateTypeOpts$1(node){switch(node.type){case"Range":return" ["+(node.min===null?"-∞":node.min)+","+(node.max===null?"∞":node.max)+"]";default:throw new Error("Unknown node type `"+node.type+"`")}}function generateSequence$1(node,decorate,forceBraces,compact){const combinator=node.combinator===" "||compact?node.combinator:" "+node.combinator+" ";const result=node.terms.map((term=>internalGenerate$1(term,decorate,forceBraces,compact))).join(combinator);if(node.explicit||forceBraces){return(compact||result[0]===","?"[":"[ ")+result+(compact?"]":" ]")}return result}function internalGenerate$1(node,decorate,forceBraces,compact){let result;switch(node.type){case"Group":result=generateSequence$1(node,decorate,forceBraces,compact)+(node.disallowEmpty?"!":"");break;case"Multiplier":return internalGenerate$1(node.term,decorate,forceBraces,compact)+decorate(generateMultiplier$1(node),node);case"Type":result="<"+node.name+(node.opts?decorate(generateTypeOpts$1(node.opts),node.opts):"")+">";break;case"Property":result="<'"+node.name+"'>";break;case"Keyword":result=node.name;break;case"AtKeyword":result="@"+node.name;break;case"Function":result=node.name+"(";break;case"String":case"Token":result=node.value;break;case"Comma":result=",";break;default:throw new Error("Unknown node type `"+node.type+"`")}return decorate(result,node)}function generate$1t(node,options){let decorate=noop$4;let forceBraces=false;let compact=false;if(typeof options==="function"){decorate=options}else if(options){forceBraces=Boolean(options.forceBraces);compact=Boolean(options.compact);if(typeof options.decorate==="function"){decorate=options.decorate}}return internalGenerate$1(node,decorate,forceBraces,compact)}generate$1u.generate=generate$1t;const createCustomError$6=createCustomError$9;const generate$1s=generate$1u;const defaultLoc$1={offset:0,line:1,column:1};function locateMismatch$1(matchResult,node){const tokens=matchResult.tokens;const longestMatch=matchResult.longestMatch;const mismatchNode=longestMatch<tokens.length?tokens[longestMatch].node||null:null;const badNode=mismatchNode!==node?mismatchNode:null;let mismatchOffset=0;let mismatchLength=0;let entries=0;let css="";let start;let end;for(let i=0;i<tokens.length;i++){const token=tokens[i].value;if(i===longestMatch){mismatchLength=token.length;mismatchOffset=css.length}if(badNode!==null&&tokens[i].node===badNode){if(i<=longestMatch){entries++}else{entries=0}}css+=token}if(longestMatch===tokens.length||entries>1){start=fromLoc$1(badNode||node,"end")||buildLoc$1(defaultLoc$1,css);end=buildLoc$1(start)}else{start=fromLoc$1(badNode,"start")||buildLoc$1(fromLoc$1(node,"start")||defaultLoc$1,css.slice(0,mismatchOffset));end=fromLoc$1(badNode,"end")||buildLoc$1(start,css.substr(mismatchOffset,mismatchLength))}return{css:css,mismatchOffset:mismatchOffset,mismatchLength:mismatchLength,start:start,end:end}}function fromLoc$1(node,point){const value=node&&node.loc&&node.loc[point];if(value){return"line"in value?buildLoc$1(value):value}return null}function buildLoc$1({offset:offset,line:line,column:column},extra){const loc={offset:offset,line:line,column:column};if(extra){const lines=extra.split(/\n|\r\n?|\f/);loc.offset+=extra.length;loc.line+=lines.length-1;loc.column=lines.length===1?loc.column+extra.length:lines.pop().length+1}return loc}const SyntaxReferenceError$1=function(type,referenceName){const error=createCustomError$6.createCustomError("SyntaxReferenceError",type+(referenceName?" `"+referenceName+"`":""));error.reference=referenceName;return error};const SyntaxMatchError$1=function(message,syntax,node,matchResult){const error=createCustomError$6.createCustomError("SyntaxMatchError",message);const{css:css,mismatchOffset:mismatchOffset,mismatchLength:mismatchLength,start:start,end:end}=locateMismatch$1(matchResult,node);error.rawMessage=message;error.syntax=syntax?generate$1s.generate(syntax):"<generic>";error.css=css;error.mismatchOffset=mismatchOffset;error.mismatchLength=mismatchLength;error.message=message+"\n"+" syntax: "+error.syntax+"\n"+" value: "+(css||"<empty string>")+"\n"+" --------"+new Array(error.mismatchOffset+1).join("-")+"^";Object.assign(error,start);error.loc={source:node&&node.loc&&node.loc.source||"<unknown>",start:start,end:end};return error};error$4.SyntaxMatchError=SyntaxMatchError$1;error$4.SyntaxReferenceError=SyntaxReferenceError$1;var names$c={};const keywords$1=new Map;const properties$1=new Map;const HYPHENMINUS$c=45;const keyword$1=getKeywordDescriptor$1;const property$1=getPropertyDescriptor$1;const vendorPrefix$1=getVendorPrefix$1;function isCustomProperty$1(str,offset){offset=offset||0;return str.length-offset>=2&&str.charCodeAt(offset)===HYPHENMINUS$c&&str.charCodeAt(offset+1)===HYPHENMINUS$c}function getVendorPrefix$1(str,offset){offset=offset||0;if(str.length-offset>=3){if(str.charCodeAt(offset)===HYPHENMINUS$c&&str.charCodeAt(offset+1)!==HYPHENMINUS$c){const secondDashIndex=str.indexOf("-",offset+2);if(secondDashIndex!==-1){return str.substring(offset,secondDashIndex+1)}}}return""}function getKeywordDescriptor$1(keyword){if(keywords$1.has(keyword)){return keywords$1.get(keyword)}const name=keyword.toLowerCase();let descriptor=keywords$1.get(name);if(descriptor===undefined){const custom=isCustomProperty$1(name,0);const vendor=!custom?getVendorPrefix$1(name,0):"";descriptor=Object.freeze({basename:name.substr(vendor.length),name:name,prefix:vendor,vendor:vendor,custom:custom})}keywords$1.set(keyword,descriptor);return descriptor}function getPropertyDescriptor$1(property){if(properties$1.has(property)){return properties$1.get(property)}let name=property;let hack=property[0];if(hack==="/"){hack=property[1]==="/"?"//":"/"}else if(hack!=="_"&&hack!=="*"&&hack!=="$"&&hack!=="#"&&hack!=="+"&&hack!=="&"){hack=""}const custom=isCustomProperty$1(name,hack.length);if(!custom){name=name.toLowerCase();if(properties$1.has(name)){const descriptor=properties$1.get(name);properties$1.set(property,descriptor);return descriptor}}const vendor=!custom?getVendorPrefix$1(name,hack.length):"";const prefix=name.substr(0,hack.length+vendor.length);const descriptor=Object.freeze({basename:name.substr(prefix.length),name:name.substr(hack.length),hack:hack,vendor:vendor,prefix:prefix,custom:custom});properties$1.set(property,descriptor);return descriptor}names$c.isCustomProperty=isCustomProperty$1;names$c.keyword=keyword$1;names$c.property=property$1;names$c.vendorPrefix=vendorPrefix$1;var genericConst$5={};const cssWideKeywords$1=["initial","inherit","unset","revert","revert-layer"];genericConst$5.cssWideKeywords=cssWideKeywords$1;var generic$3={};const charCodeDefinitions$l=charCodeDefinitions$p;const types$1B=types$1I;const utils$q=utils$u;const PLUSSIGN$i=43;const HYPHENMINUS$b=45;const N$8=110;const DISALLOW_SIGN$3=true;const ALLOW_SIGN$3=false;function isDelim$3(token,code){return token!==null&&token.type===types$1B.Delim&&token.value.charCodeAt(0)===code}function skipSC$1(token,offset,getNextToken){while(token!==null&&(token.type===types$1B.WhiteSpace||token.type===types$1B.Comment)){token=getNextToken(++offset)}return offset}function checkInteger$3(token,valueOffset,disallowSign,offset){if(!token){return 0}const code=token.value.charCodeAt(valueOffset);if(code===PLUSSIGN$i||code===HYPHENMINUS$b){if(disallowSign){return 0}valueOffset++}for(;valueOffset<token.value.length;valueOffset++){if(!charCodeDefinitions$l.isDigit(token.value.charCodeAt(valueOffset))){return 0}}return offset+1}function consumeB$3(token,offset_,getNextToken){let sign=false;let offset=skipSC$1(token,offset_,getNextToken);token=getNextToken(offset);if(token===null){return offset_}if(token.type!==types$1B.Number){if(isDelim$3(token,PLUSSIGN$i)||isDelim$3(token,HYPHENMINUS$b)){sign=true;offset=skipSC$1(getNextToken(++offset),offset,getNextToken);token=getNextToken(offset);if(token===null||token.type!==types$1B.Number){return 0}}else{return offset_}}if(!sign){const code=token.value.charCodeAt(0);if(code!==PLUSSIGN$i&&code!==HYPHENMINUS$b){return 0}}return checkInteger$3(token,sign?0:1,sign,offset)}function anPlusB$1(token,getNextToken){let offset=0;if(!token){return 0}if(token.type===types$1B.Number){return checkInteger$3(token,0,ALLOW_SIGN$3,offset)}else if(token.type===types$1B.Ident&&token.value.charCodeAt(0)===HYPHENMINUS$b){if(!utils$q.cmpChar(token.value,1,N$8)){return 0}switch(token.value.length){case 2:return consumeB$3(getNextToken(++offset),offset,getNextToken);case 3:if(token.value.charCodeAt(2)!==HYPHENMINUS$b){return 0}offset=skipSC$1(getNextToken(++offset),offset,getNextToken);token=getNextToken(offset);return checkInteger$3(token,0,DISALLOW_SIGN$3,offset);default:if(token.value.charCodeAt(2)!==HYPHENMINUS$b){return 0}return checkInteger$3(token,3,DISALLOW_SIGN$3,offset)}}else if(token.type===types$1B.Ident||isDelim$3(token,PLUSSIGN$i)&&getNextToken(offset+1).type===types$1B.Ident){if(token.type!==types$1B.Ident){token=getNextToken(++offset)}if(token===null||!utils$q.cmpChar(token.value,0,N$8)){return 0}switch(token.value.length){case 1:return consumeB$3(getNextToken(++offset),offset,getNextToken);case 2:if(token.value.charCodeAt(1)!==HYPHENMINUS$b){return 0}offset=skipSC$1(getNextToken(++offset),offset,getNextToken);token=getNextToken(offset);return checkInteger$3(token,0,DISALLOW_SIGN$3,offset);default:if(token.value.charCodeAt(1)!==HYPHENMINUS$b){return 0}return checkInteger$3(token,2,DISALLOW_SIGN$3,offset)}}else if(token.type===types$1B.Dimension){let code=token.value.charCodeAt(0);let sign=code===PLUSSIGN$i||code===HYPHENMINUS$b?1:0;let i=sign;for(;i<token.value.length;i++){if(!charCodeDefinitions$l.isDigit(token.value.charCodeAt(i))){break}}if(i===sign){return 0}if(!utils$q.cmpChar(token.value,i,N$8)){return 0}if(i+1===token.value.length){return consumeB$3(getNextToken(++offset),offset,getNextToken)}else{if(token.value.charCodeAt(i+1)!==HYPHENMINUS$b){return 0}if(i+2===token.value.length){offset=skipSC$1(getNextToken(++offset),offset,getNextToken);token=getNextToken(offset);return checkInteger$3(token,0,DISALLOW_SIGN$3,offset)}else{return checkInteger$3(token,i+2,DISALLOW_SIGN$3,offset)}}}return 0}var genericAnPlusB$3=anPlusB$1;const charCodeDefinitions$k=charCodeDefinitions$p;const types$1A=types$1I;const utils$p=utils$u;const PLUSSIGN$h=43;const HYPHENMINUS$a=45;const QUESTIONMARK$5=63;const U$3=117;function isDelim$2(token,code){return token!==null&&token.type===types$1A.Delim&&token.value.charCodeAt(0)===code}function startsWith$3(token,code){return token.value.charCodeAt(0)===code}function hexSequence$1(token,offset,allowDash){let hexlen=0;for(let pos=offset;pos<token.value.length;pos++){const code=token.value.charCodeAt(pos);if(code===HYPHENMINUS$a&&allowDash&&hexlen!==0){hexSequence$1(token,offset+hexlen+1,false);return 6}if(!charCodeDefinitions$k.isHexDigit(code)){return 0}if(++hexlen>6){return 0}}return hexlen}function withQuestionMarkSequence$1(consumed,length,getNextToken){if(!consumed){return 0}while(isDelim$2(getNextToken(length),QUESTIONMARK$5)){if(++consumed>6){return 0}length++}return length}function urange$1(token,getNextToken){let length=0;if(token===null||token.type!==types$1A.Ident||!utils$p.cmpChar(token.value,0,U$3)){return 0}token=getNextToken(++length);if(token===null){return 0}if(isDelim$2(token,PLUSSIGN$h)){token=getNextToken(++length);if(token===null){return 0}if(token.type===types$1A.Ident){return withQuestionMarkSequence$1(hexSequence$1(token,0,true),++length,getNextToken)}if(isDelim$2(token,QUESTIONMARK$5)){return withQuestionMarkSequence$1(1,++length,getNextToken)}return 0}if(token.type===types$1A.Number){const consumedHexLength=hexSequence$1(token,1,true);if(consumedHexLength===0){return 0}token=getNextToken(++length);if(token===null){return length}if(token.type===types$1A.Dimension||token.type===types$1A.Number){if(!startsWith$3(token,HYPHENMINUS$a)||!hexSequence$1(token,1,false)){return 0}return length+1}return withQuestionMarkSequence$1(consumedHexLength,length,getNextToken)}if(token.type===types$1A.Dimension){return withQuestionMarkSequence$1(hexSequence$1(token,1,true),++length,getNextToken)}return 0}var genericUrange$3=urange$1;const genericConst$4=genericConst$5;const genericAnPlusB$2=genericAnPlusB$3;const genericUrange$2=genericUrange$3;const types$1z=types$1I;const charCodeDefinitions$j=charCodeDefinitions$p;const utils$o=utils$u;const calcFunctionNames$1=["calc(","-moz-calc(","-webkit-calc("];const balancePair$2=new Map([[types$1z.Function,types$1z.RightParenthesis],[types$1z.LeftParenthesis,types$1z.RightParenthesis],[types$1z.LeftSquareBracket,types$1z.RightSquareBracket],[types$1z.LeftCurlyBracket,types$1z.RightCurlyBracket]]);function charCodeAt$1(str,index){return index<str.length?str.charCodeAt(index):0}function eqStr$1(actual,expected){return utils$o.cmpStr(actual,0,actual.length,expected)}function eqStrAny$1(actual,expected){for(let i=0;i<expected.length;i++){if(eqStr$1(actual,expected[i])){return true}}return false}function isPostfixIeHack$1(str,offset){if(offset!==str.length-2){return false}return charCodeAt$1(str,offset)===92&&charCodeDefinitions$j.isDigit(charCodeAt$1(str,offset+1))}function outOfRange$1(opts,value,numEnd){if(opts&&opts.type==="Range"){const num=Number(numEnd!==undefined&&numEnd!==value.length?value.substr(0,numEnd):value);if(isNaN(num)){return true}if(opts.min!==null&&num<opts.min&&typeof opts.min!=="string"){return true}if(opts.max!==null&&num>opts.max&&typeof opts.max!=="string"){return true}}return false}function consumeFunction$1(token,getNextToken){let balanceCloseType=0;let balanceStash=[];let length=0;scan:do{switch(token.type){case types$1z.RightCurlyBracket:case types$1z.RightParenthesis:case types$1z.RightSquareBracket:if(token.type!==balanceCloseType){break scan}balanceCloseType=balanceStash.pop();if(balanceStash.length===0){length++;break scan}break;case types$1z.Function:case types$1z.LeftParenthesis:case types$1z.LeftSquareBracket:case types$1z.LeftCurlyBracket:balanceStash.push(balanceCloseType);balanceCloseType=balancePair$2.get(token.type);break}length++}while(token=getNextToken(length));return length}function calc$1(next){return function(token,getNextToken,opts){if(token===null){return 0}if(token.type===types$1z.Function&&eqStrAny$1(token.value,calcFunctionNames$1)){return consumeFunction$1(token,getNextToken)}return next(token,getNextToken,opts)}}function tokenType$1(expectedTokenType){return function(token){if(token===null||token.type!==expectedTokenType){return 0}return 1}}function customIdent$1(token){if(token===null||token.type!==types$1z.Ident){return 0}const name=token.value.toLowerCase();if(eqStrAny$1(name,genericConst$4.cssWideKeywords)){return 0}if(eqStr$1(name,"default")){return 0}return 1}function customPropertyName$1(token){if(token===null||token.type!==types$1z.Ident){return 0}if(charCodeAt$1(token.value,0)!==45||charCodeAt$1(token.value,1)!==45){return 0}return 1}function hexColor$1(token){if(token===null||token.type!==types$1z.Hash){return 0}const length=token.value.length;if(length!==4&&length!==5&&length!==7&&length!==9){return 0}for(let i=1;i<length;i++){if(!charCodeDefinitions$j.isHexDigit(charCodeAt$1(token.value,i))){return 0}}return 1}function idSelector$1(token){if(token===null||token.type!==types$1z.Hash){return 0}if(!charCodeDefinitions$j.isIdentifierStart(charCodeAt$1(token.value,1),charCodeAt$1(token.value,2),charCodeAt$1(token.value,3))){return 0}return 1}function declarationValue$1(token,getNextToken){if(!token){return 0}let balanceCloseType=0;let balanceStash=[];let length=0;scan:do{switch(token.type){case types$1z.BadString:case types$1z.BadUrl:break scan;case types$1z.RightCurlyBracket:case types$1z.RightParenthesis:case types$1z.RightSquareBracket:if(token.type!==balanceCloseType){break scan}balanceCloseType=balanceStash.pop();break;case types$1z.Semicolon:if(balanceCloseType===0){break scan}break;case types$1z.Delim:if(balanceCloseType===0&&token.value==="!"){break scan}break;case types$1z.Function:case types$1z.LeftParenthesis:case types$1z.LeftSquareBracket:case types$1z.LeftCurlyBracket:balanceStash.push(balanceCloseType);balanceCloseType=balancePair$2.get(token.type);break}length++}while(token=getNextToken(length));return length}function anyValue$1(token,getNextToken){if(!token){return 0}let balanceCloseType=0;let balanceStash=[];let length=0;scan:do{switch(token.type){case types$1z.BadString:case types$1z.BadUrl:break scan;case types$1z.RightCurlyBracket:case types$1z.RightParenthesis:case types$1z.RightSquareBracket:if(token.type!==balanceCloseType){break scan}balanceCloseType=balanceStash.pop();break;case types$1z.Function:case types$1z.LeftParenthesis:case types$1z.LeftSquareBracket:case types$1z.LeftCurlyBracket:balanceStash.push(balanceCloseType);balanceCloseType=balancePair$2.get(token.type);break}length++}while(token=getNextToken(length));return length}function dimension$1(type){if(type){type=new Set(type)}return function(token,getNextToken,opts){if(token===null||token.type!==types$1z.Dimension){return 0}const numberEnd=utils$o.consumeNumber(token.value,0);if(type!==null){const reverseSolidusOffset=token.value.indexOf("\\",numberEnd);const unit=reverseSolidusOffset===-1||!isPostfixIeHack$1(token.value,reverseSolidusOffset)?token.value.substr(numberEnd):token.value.substring(numberEnd,reverseSolidusOffset);if(type.has(unit.toLowerCase())===false){return 0}}if(outOfRange$1(opts,token.value,numberEnd)){return 0}return 1}}function percentage$1(token,getNextToken,opts){if(token===null||token.type!==types$1z.Percentage){return 0}if(outOfRange$1(opts,token.value,token.value.length-1)){return 0}return 1}function zero$1(next){if(typeof next!=="function"){next=function(){return 0}}return function(token,getNextToken,opts){if(token!==null&&token.type===types$1z.Number){if(Number(token.value)===0){return 1}}return next(token,getNextToken,opts)}}function number$1(token,getNextToken,opts){if(token===null){return 0}const numberEnd=utils$o.consumeNumber(token.value,0);const isNumber=numberEnd===token.value.length;if(!isNumber&&!isPostfixIeHack$1(token.value,numberEnd)){return 0}if(outOfRange$1(opts,token.value,numberEnd)){return 0}return 1}function integer$1(token,getNextToken,opts){if(token===null||token.type!==types$1z.Number){return 0}let i=charCodeAt$1(token.value,0)===43||charCodeAt$1(token.value,0)===45?1:0;for(;i<token.value.length;i++){if(!charCodeDefinitions$j.isDigit(charCodeAt$1(token.value,i))){return 0}}if(outOfRange$1(opts,token.value,i)){return 0}return 1}const tokenTypes={"ident-token":tokenType$1(types$1z.Ident),"function-token":tokenType$1(types$1z.Function),"at-keyword-token":tokenType$1(types$1z.AtKeyword),"hash-token":tokenType$1(types$1z.Hash),"string-token":tokenType$1(types$1z.String),"bad-string-token":tokenType$1(types$1z.BadString),"url-token":tokenType$1(types$1z.Url),"bad-url-token":tokenType$1(types$1z.BadUrl),"delim-token":tokenType$1(types$1z.Delim),"number-token":tokenType$1(types$1z.Number),"percentage-token":tokenType$1(types$1z.Percentage),"dimension-token":tokenType$1(types$1z.Dimension),"whitespace-token":tokenType$1(types$1z.WhiteSpace),"CDO-token":tokenType$1(types$1z.CDO),"CDC-token":tokenType$1(types$1z.CDC),"colon-token":tokenType$1(types$1z.Colon),"semicolon-token":tokenType$1(types$1z.Semicolon),"comma-token":tokenType$1(types$1z.Comma),"[-token":tokenType$1(types$1z.LeftSquareBracket),"]-token":tokenType$1(types$1z.RightSquareBracket),"(-token":tokenType$1(types$1z.LeftParenthesis),")-token":tokenType$1(types$1z.RightParenthesis),"{-token":tokenType$1(types$1z.LeftCurlyBracket),"}-token":tokenType$1(types$1z.RightCurlyBracket)};const productionTypes={string:tokenType$1(types$1z.String),ident:tokenType$1(types$1z.Ident),percentage:calc$1(percentage$1),zero:zero$1(),number:calc$1(number$1),integer:calc$1(integer$1),"custom-ident":customIdent$1,"custom-property-name":customPropertyName$1,"hex-color":hexColor$1,"id-selector":idSelector$1,"an-plus-b":genericAnPlusB$2,urange:genericUrange$2,"declaration-value":declarationValue$1,"any-value":anyValue$1};function createDemensionTypes(units){const{angle:angle,decibel:decibel,frequency:frequency,flex:flex,length:length,resolution:resolution,semitones:semitones,time:time}=units||{};return{dimension:calc$1(dimension$1(null)),angle:calc$1(dimension$1(angle)),decibel:calc$1(dimension$1(decibel)),frequency:calc$1(dimension$1(frequency)),flex:calc$1(dimension$1(flex)),length:calc$1(zero$1(dimension$1(length))),resolution:calc$1(dimension$1(resolution)),semitones:calc$1(dimension$1(semitones)),time:calc$1(dimension$1(time))}}function createGenericTypes(units){return{...tokenTypes,...productionTypes,...createDemensionTypes(units)}}generic$3.createDemensionTypes=createDemensionTypes;generic$3.createGenericTypes=createGenericTypes;generic$3.productionTypes=productionTypes;generic$3.tokenTypes=tokenTypes;var units$1={};const length=["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"];const angle=["deg","grad","rad","turn"];const time=["s","ms"];const frequency=["hz","khz"];const resolution=["dpi","dpcm","dppx","x"];const flex=["fr"];const decibel=["db"];const semitones=["st"];units$1.angle=angle;units$1.decibel=decibel;units$1.flex=flex;units$1.frequency=frequency;units$1.length=length;units$1.resolution=resolution;units$1.semitones=semitones;units$1.time=time;const index$h=tokenizer$5;const astToTokens$1={decorator(handlers){const tokens=[];let curNode=null;return{...handlers,node(node){const tmp=curNode;curNode=node;handlers.node.call(this,node);curNode=tmp},emit(value,type,auto){tokens.push({type:type,value:value,node:auto?null:curNode})},result(){return tokens}}}};function stringToTokens$1(str){const tokens=[];index$h.tokenize(str,((type,start,end)=>tokens.push({type:type,value:str.slice(start,end),node:null})));return tokens}function prepareTokens$3(value,syntax){if(typeof value==="string"){return stringToTokens$1(value)}return syntax.generate(value,astToTokens$1)}var prepareTokens_1$1=prepareTokens$3;var matchGraph$5={};var parse$1u={};var tokenizer$4={};var _SyntaxError$2={};const createCustomError$5=createCustomError$9;function SyntaxError$8(message,input,offset){return Object.assign(createCustomError$5.createCustomError("SyntaxError",message),{input:input,offset:offset,rawMessage:message,message:message+"\n"+" "+input+"\n"+"--"+new Array((offset||input.length)+1).join("-")+"^"})}_SyntaxError$2.SyntaxError=SyntaxError$8;const SyntaxError$7=_SyntaxError$2;const TAB$3=9;const N$7=10;const F$4=12;const R$4=13;const SPACE$7=32;class Tokenizer$1{constructor(str){this.str=str;this.pos=0}charCodeAt(pos){return pos<this.str.length?this.str.charCodeAt(pos):0}charCode(){return this.charCodeAt(this.pos)}nextCharCode(){return this.charCodeAt(this.pos+1)}nextNonWsCode(pos){return this.charCodeAt(this.findWsEnd(pos))}findWsEnd(pos){for(;pos<this.str.length;pos++){const code=this.str.charCodeAt(pos);if(code!==R$4&&code!==N$7&&code!==F$4&&code!==SPACE$7&&code!==TAB$3){break}}return pos}substringToPos(end){return this.str.substring(this.pos,this.pos=end)}eat(code){if(this.charCode()!==code){this.error("Expect `"+String.fromCharCode(code)+"`")}this.pos++}peek(){return this.pos<this.str.length?this.str.charAt(this.pos++):""}error(message){throw new SyntaxError$7.SyntaxError(message,this.str,this.pos)}}tokenizer$4.Tokenizer=Tokenizer$1;const tokenizer$3=tokenizer$4;const TAB$2=9;const N$6=10;const F$3=12;const R$3=13;const SPACE$6=32;const EXCLAMATIONMARK$6=33;const NUMBERSIGN$8=35;const AMPERSAND$7=38;const APOSTROPHE$5=39;const LEFTPARENTHESIS$5=40;const RIGHTPARENTHESIS$5=41;const ASTERISK$d=42;const PLUSSIGN$g=43;const COMMA$1=44;const HYPERMINUS$1=45;const LESSTHANSIGN$1=60;const GREATERTHANSIGN$5=62;const QUESTIONMARK$4=63;const COMMERCIALAT$1=64;const LEFTSQUAREBRACKET$1=91;const RIGHTSQUAREBRACKET$1=93;const LEFTCURLYBRACKET$2=123;const VERTICALLINE$7=124;const RIGHTCURLYBRACKET$1=125;const INFINITY$1=8734;const NAME_CHAR$1=new Uint8Array(128).map(((_,idx)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(idx))?1:0));const COMBINATOR_PRECEDENCE$1={" ":1,"&&":2,"||":3,"|":4};function scanSpaces$1(tokenizer){return tokenizer.substringToPos(tokenizer.findWsEnd(tokenizer.pos))}function scanWord$1(tokenizer){let end=tokenizer.pos;for(;end<tokenizer.str.length;end++){const code=tokenizer.str.charCodeAt(end);if(code>=128||NAME_CHAR$1[code]===0){break}}if(tokenizer.pos===end){tokenizer.error("Expect a keyword")}return tokenizer.substringToPos(end)}function scanNumber$1(tokenizer){let end=tokenizer.pos;for(;end<tokenizer.str.length;end++){const code=tokenizer.str.charCodeAt(end);if(code<48||code>57){break}}if(tokenizer.pos===end){tokenizer.error("Expect a number")}return tokenizer.substringToPos(end)}function scanString$1(tokenizer){const end=tokenizer.str.indexOf("'",tokenizer.pos+1);if(end===-1){tokenizer.pos=tokenizer.str.length;tokenizer.error("Expect an apostrophe")}return tokenizer.substringToPos(end+1)}function readMultiplierRange$1(tokenizer){let min=null;let max=null;tokenizer.eat(LEFTCURLYBRACKET$2);min=scanNumber$1(tokenizer);if(tokenizer.charCode()===COMMA$1){tokenizer.pos++;if(tokenizer.charCode()!==RIGHTCURLYBRACKET$1){max=scanNumber$1(tokenizer)}}else{max=min}tokenizer.eat(RIGHTCURLYBRACKET$1);return{min:Number(min),max:max?Number(max):0}}function readMultiplier$1(tokenizer){let range=null;let comma=false;switch(tokenizer.charCode()){case ASTERISK$d:tokenizer.pos++;range={min:0,max:0};break;case PLUSSIGN$g:tokenizer.pos++;range={min:1,max:0};break;case QUESTIONMARK$4:tokenizer.pos++;range={min:0,max:1};break;case NUMBERSIGN$8:tokenizer.pos++;comma=true;if(tokenizer.charCode()===LEFTCURLYBRACKET$2){range=readMultiplierRange$1(tokenizer)}else if(tokenizer.charCode()===QUESTIONMARK$4){tokenizer.pos++;range={min:0,max:0}}else{range={min:1,max:0}}break;case LEFTCURLYBRACKET$2:range=readMultiplierRange$1(tokenizer);break;default:return null}return{type:"Multiplier",comma:comma,min:range.min,max:range.max,term:null}}function maybeMultiplied$1(tokenizer,node){const multiplier=readMultiplier$1(tokenizer);if(multiplier!==null){multiplier.term=node;if(tokenizer.charCode()===NUMBERSIGN$8&&tokenizer.charCodeAt(tokenizer.pos-1)===PLUSSIGN$g){return maybeMultiplied$1(tokenizer,multiplier)}return multiplier}return node}function maybeToken$1(tokenizer){const ch=tokenizer.peek();if(ch===""){return null}return{type:"Token",value:ch}}function readProperty$3(tokenizer){let name;tokenizer.eat(LESSTHANSIGN$1);tokenizer.eat(APOSTROPHE$5);name=scanWord$1(tokenizer);tokenizer.eat(APOSTROPHE$5);tokenizer.eat(GREATERTHANSIGN$5);return maybeMultiplied$1(tokenizer,{type:"Property",name:name})}function readTypeRange$1(tokenizer){let min=null;let max=null;let sign=1;tokenizer.eat(LEFTSQUAREBRACKET$1);if(tokenizer.charCode()===HYPERMINUS$1){tokenizer.peek();sign=-1}if(sign==-1&&tokenizer.charCode()===INFINITY$1){tokenizer.peek()}else{min=sign*Number(scanNumber$1(tokenizer));if(NAME_CHAR$1[tokenizer.charCode()]!==0){min+=scanWord$1(tokenizer)}}scanSpaces$1(tokenizer);tokenizer.eat(COMMA$1);scanSpaces$1(tokenizer);if(tokenizer.charCode()===INFINITY$1){tokenizer.peek()}else{sign=1;if(tokenizer.charCode()===HYPERMINUS$1){tokenizer.peek();sign=-1}max=sign*Number(scanNumber$1(tokenizer));if(NAME_CHAR$1[tokenizer.charCode()]!==0){max+=scanWord$1(tokenizer)}}tokenizer.eat(RIGHTSQUAREBRACKET$1);return{type:"Range",min:min,max:max}}function readType$1(tokenizer){let name;let opts=null;tokenizer.eat(LESSTHANSIGN$1);name=scanWord$1(tokenizer);if(tokenizer.charCode()===LEFTPARENTHESIS$5&&tokenizer.nextCharCode()===RIGHTPARENTHESIS$5){tokenizer.pos+=2;name+="()"}if(tokenizer.charCodeAt(tokenizer.findWsEnd(tokenizer.pos))===LEFTSQUAREBRACKET$1){scanSpaces$1(tokenizer);opts=readTypeRange$1(tokenizer)}tokenizer.eat(GREATERTHANSIGN$5);return maybeMultiplied$1(tokenizer,{type:"Type",name:name,opts:opts})}function readKeywordOrFunction$1(tokenizer){const name=scanWord$1(tokenizer);if(tokenizer.charCode()===LEFTPARENTHESIS$5){tokenizer.pos++;return{type:"Function",name:name}}return maybeMultiplied$1(tokenizer,{type:"Keyword",name:name})}function regroupTerms$1(terms,combinators){function createGroup(terms,combinator){return{type:"Group",terms:terms,combinator:combinator,disallowEmpty:false,explicit:false}}let combinator;combinators=Object.keys(combinators).sort(((a,b)=>COMBINATOR_PRECEDENCE$1[a]-COMBINATOR_PRECEDENCE$1[b]));while(combinators.length>0){combinator=combinators.shift();let i=0;let subgroupStart=0;for(;i<terms.length;i++){const term=terms[i];if(term.type==="Combinator"){if(term.value===combinator){if(subgroupStart===-1){subgroupStart=i-1}terms.splice(i,1);i--}else{if(subgroupStart!==-1&&i-subgroupStart>1){terms.splice(subgroupStart,i-subgroupStart,createGroup(terms.slice(subgroupStart,i),combinator));i=subgroupStart+1}subgroupStart=-1}}}if(subgroupStart!==-1&&combinators.length){terms.splice(subgroupStart,i-subgroupStart,createGroup(terms.slice(subgroupStart,i),combinator))}}return combinator}function readImplicitGroup$1(tokenizer){const terms=[];const combinators={};let token;let prevToken=null;let prevTokenPos=tokenizer.pos;while(token=peek$1(tokenizer)){if(token.type!=="Spaces"){if(token.type==="Combinator"){if(prevToken===null||prevToken.type==="Combinator"){tokenizer.pos=prevTokenPos;tokenizer.error("Unexpected combinator")}combinators[token.value]=true}else if(prevToken!==null&&prevToken.type!=="Combinator"){combinators[" "]=true;terms.push({type:"Combinator",value:" "})}terms.push(token);prevToken=token;prevTokenPos=tokenizer.pos}}if(prevToken!==null&&prevToken.type==="Combinator"){tokenizer.pos-=prevTokenPos;tokenizer.error("Unexpected combinator")}return{type:"Group",terms:terms,combinator:regroupTerms$1(terms,combinators)||" ",disallowEmpty:false,explicit:false}}function readGroup$1(tokenizer){let result;tokenizer.eat(LEFTSQUAREBRACKET$1);result=readImplicitGroup$1(tokenizer);tokenizer.eat(RIGHTSQUAREBRACKET$1);result.explicit=true;if(tokenizer.charCode()===EXCLAMATIONMARK$6){tokenizer.pos++;result.disallowEmpty=true}return result}function peek$1(tokenizer){let code=tokenizer.charCode();if(code<128&&NAME_CHAR$1[code]===1){return readKeywordOrFunction$1(tokenizer)}switch(code){case RIGHTSQUAREBRACKET$1:break;case LEFTSQUAREBRACKET$1:return maybeMultiplied$1(tokenizer,readGroup$1(tokenizer));case LESSTHANSIGN$1:return tokenizer.nextCharCode()===APOSTROPHE$5?readProperty$3(tokenizer):readType$1(tokenizer);case VERTICALLINE$7:return{type:"Combinator",value:tokenizer.substringToPos(tokenizer.pos+(tokenizer.nextCharCode()===VERTICALLINE$7?2:1))};case AMPERSAND$7:tokenizer.pos++;tokenizer.eat(AMPERSAND$7);return{type:"Combinator",value:"&&"};case COMMA$1:tokenizer.pos++;return{type:"Comma"};case APOSTROPHE$5:return maybeMultiplied$1(tokenizer,{type:"String",value:scanString$1(tokenizer)});case SPACE$6:case TAB$2:case N$6:case R$3:case F$3:return{type:"Spaces",value:scanSpaces$1(tokenizer)};case COMMERCIALAT$1:code=tokenizer.nextCharCode();if(code<128&&NAME_CHAR$1[code]===1){tokenizer.pos++;return{type:"AtKeyword",name:scanWord$1(tokenizer)}}return maybeToken$1(tokenizer);case ASTERISK$d:case PLUSSIGN$g:case QUESTIONMARK$4:case NUMBERSIGN$8:case EXCLAMATIONMARK$6:break;case LEFTCURLYBRACKET$2:code=tokenizer.nextCharCode();if(code<48||code>57){return maybeToken$1(tokenizer)}break;default:return maybeToken$1(tokenizer)}}function parse$1t(source){const tokenizer$1=new tokenizer$3.Tokenizer(source);const result=readImplicitGroup$1(tokenizer$1);if(tokenizer$1.pos!==source.length){tokenizer$1.error("Unexpected input")}if(result.terms.length===1&&result.terms[0].type==="Group"){return result.terms[0]}return result}parse$1u.parse=parse$1t;const parse$1s=parse$1u;const MATCH$1={type:"Match"};const MISMATCH$1={type:"Mismatch"};const DISALLOW_EMPTY$1={type:"DisallowEmpty"};const LEFTPARENTHESIS$4=40;const RIGHTPARENTHESIS$4=41;function createCondition$1(match,thenBranch,elseBranch){if(thenBranch===MATCH$1&&elseBranch===MISMATCH$1){return match}if(match===MATCH$1&&thenBranch===MATCH$1&&elseBranch===MATCH$1){return match}if(match.type==="If"&&match.else===MISMATCH$1&&thenBranch===MATCH$1){thenBranch=match.then;match=match.match}return{type:"If",match:match,then:thenBranch,else:elseBranch}}function isFunctionType$1(name){return name.length>2&&name.charCodeAt(name.length-2)===LEFTPARENTHESIS$4&&name.charCodeAt(name.length-1)===RIGHTPARENTHESIS$4}function isEnumCapatible$1(term){return term.type==="Keyword"||term.type==="AtKeyword"||term.type==="Function"||term.type==="Type"&&isFunctionType$1(term.name)}function buildGroupMatchGraph$1(combinator,terms,atLeastOneTermMatched){switch(combinator){case" ":{let result=MATCH$1;for(let i=terms.length-1;i>=0;i--){const term=terms[i];result=createCondition$1(term,result,MISMATCH$1)}return result}case"|":{let result=MISMATCH$1;let map=null;for(let i=terms.length-1;i>=0;i--){let term=terms[i];if(isEnumCapatible$1(term)){if(map===null&&i>0&&isEnumCapatible$1(terms[i-1])){map=Object.create(null);result=createCondition$1({type:"Enum",map:map},MATCH$1,result)}if(map!==null){const key=(isFunctionType$1(term.name)?term.name.slice(0,-1):term.name).toLowerCase();if(key in map===false){map[key]=term;continue}}}map=null;result=createCondition$1(term,MATCH$1,result)}return result}case"&&":{if(terms.length>5){return{type:"MatchOnce",terms:terms,all:true}}let result=MISMATCH$1;for(let i=terms.length-1;i>=0;i--){const term=terms[i];let thenClause;if(terms.length>1){thenClause=buildGroupMatchGraph$1(combinator,terms.filter((function(newGroupTerm){return newGroupTerm!==term})),false)}else{thenClause=MATCH$1}result=createCondition$1(term,thenClause,result)}return result}case"||":{if(terms.length>5){return{type:"MatchOnce",terms:terms,all:false}}let result=atLeastOneTermMatched?MATCH$1:MISMATCH$1;for(let i=terms.length-1;i>=0;i--){const term=terms[i];let thenClause;if(terms.length>1){thenClause=buildGroupMatchGraph$1(combinator,terms.filter((function(newGroupTerm){return newGroupTerm!==term})),true)}else{thenClause=MATCH$1}result=createCondition$1(term,thenClause,result)}return result}}}function buildMultiplierMatchGraph$1(node){let result=MATCH$1;let matchTerm=buildMatchGraphInternal$1(node.term);if(node.max===0){matchTerm=createCondition$1(matchTerm,DISALLOW_EMPTY$1,MISMATCH$1);result=createCondition$1(matchTerm,null,MISMATCH$1);result.then=createCondition$1(MATCH$1,MATCH$1,result);if(node.comma){result.then.else=createCondition$1({type:"Comma",syntax:node},result,MISMATCH$1)}}else{for(let i=node.min||1;i<=node.max;i++){if(node.comma&&result!==MATCH$1){result=createCondition$1({type:"Comma",syntax:node},result,MISMATCH$1)}result=createCondition$1(matchTerm,createCondition$1(MATCH$1,MATCH$1,result),MISMATCH$1)}}if(node.min===0){result=createCondition$1(MATCH$1,MATCH$1,result)}else{for(let i=0;i<node.min-1;i++){if(node.comma&&result!==MATCH$1){result=createCondition$1({type:"Comma",syntax:node},result,MISMATCH$1)}result=createCondition$1(matchTerm,result,MISMATCH$1)}}return result}function buildMatchGraphInternal$1(node){if(typeof node==="function"){return{type:"Generic",fn:node}}switch(node.type){case"Group":{let result=buildGroupMatchGraph$1(node.combinator,node.terms.map(buildMatchGraphInternal$1),false);if(node.disallowEmpty){result=createCondition$1(result,DISALLOW_EMPTY$1,MISMATCH$1)}return result}case"Multiplier":return buildMultiplierMatchGraph$1(node);case"Type":case"Property":return{type:node.type,name:node.name,syntax:node};case"Keyword":return{type:node.type,name:node.name.toLowerCase(),syntax:node};case"AtKeyword":return{type:node.type,name:"@"+node.name.toLowerCase(),syntax:node};case"Function":return{type:node.type,name:node.name.toLowerCase()+"(",syntax:node};case"String":if(node.value.length===3){return{type:"Token",value:node.value.charAt(1),syntax:node}}return{type:node.type,value:node.value.substr(1,node.value.length-2).replace(/\\'/g,"'"),syntax:node};case"Token":return{type:node.type,value:node.value,syntax:node};case"Comma":return{type:node.type,syntax:node};default:throw new Error("Unknown node type:",node.type)}}function buildMatchGraph$1(syntaxTree,ref){if(typeof syntaxTree==="string"){syntaxTree=parse$1s.parse(syntaxTree)}return{type:"MatchGraph",match:buildMatchGraphInternal$1(syntaxTree),syntax:ref||null,source:syntaxTree}}matchGraph$5.DISALLOW_EMPTY=DISALLOW_EMPTY$1;matchGraph$5.MATCH=MATCH$1;matchGraph$5.MISMATCH=MISMATCH$1;matchGraph$5.buildMatchGraph=buildMatchGraph$1;var match$3={};const matchGraph$4=matchGraph$5;const types$1y=types$1I;const{hasOwnProperty:hasOwnProperty$a}=Object.prototype;const STUB$1=0;const TOKEN$1=1;const OPEN_SYNTAX$1=2;const CLOSE_SYNTAX$1=3;const EXIT_REASON_MATCH$1="Match";const EXIT_REASON_MISMATCH$1="Mismatch";const EXIT_REASON_ITERATION_LIMIT$1="Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)";const ITERATION_LIMIT$1=15e3;function reverseList$1(list){let prev=null;let next=null;let item=list;while(item!==null){next=item.prev;item.prev=prev;prev=item;item=next}return prev}function areStringsEqualCaseInsensitive$1(testStr,referenceStr){if(testStr.length!==referenceStr.length){return false}for(let i=0;i<testStr.length;i++){const referenceCode=referenceStr.charCodeAt(i);let testCode=testStr.charCodeAt(i);if(testCode>=65&&testCode<=90){testCode=testCode|32}if(testCode!==referenceCode){return false}}return true}function isContextEdgeDelim$1(token){if(token.type!==types$1y.Delim){return false}return token.value!=="?"}function isCommaContextStart$1(token){if(token===null){return true}return token.type===types$1y.Comma||token.type===types$1y.Function||token.type===types$1y.LeftParenthesis||token.type===types$1y.LeftSquareBracket||token.type===types$1y.LeftCurlyBracket||isContextEdgeDelim$1(token)}function isCommaContextEnd$1(token){if(token===null){return true}return token.type===types$1y.RightParenthesis||token.type===types$1y.RightSquareBracket||token.type===types$1y.RightCurlyBracket||token.type===types$1y.Delim&&token.value==="/"}function internalMatch$1(tokens,state,syntaxes){function moveToNextToken(){do{tokenIndex++;token=tokenIndex<tokens.length?tokens[tokenIndex]:null}while(token!==null&&(token.type===types$1y.WhiteSpace||token.type===types$1y.Comment))}function getNextToken(offset){const nextIndex=tokenIndex+offset;return nextIndex<tokens.length?tokens[nextIndex]:null}function stateSnapshotFromSyntax(nextState,prev){return{nextState:nextState,matchStack:matchStack,syntaxStack:syntaxStack,thenStack:thenStack,tokenIndex:tokenIndex,prev:prev}}function pushThenStack(nextState){thenStack={nextState:nextState,matchStack:matchStack,syntaxStack:syntaxStack,prev:thenStack}}function pushElseStack(nextState){elseStack=stateSnapshotFromSyntax(nextState,elseStack)}function addTokenToMatch(){matchStack={type:TOKEN$1,syntax:state.syntax,token:token,prev:matchStack};moveToNextToken();syntaxStash=null;if(tokenIndex>longestMatch){longestMatch=tokenIndex}}function openSyntax(){syntaxStack={syntax:state.syntax,opts:state.syntax.opts||syntaxStack!==null&&syntaxStack.opts||null,prev:syntaxStack};matchStack={type:OPEN_SYNTAX$1,syntax:state.syntax,token:matchStack.token,prev:matchStack}}function closeSyntax(){if(matchStack.type===OPEN_SYNTAX$1){matchStack=matchStack.prev}else{matchStack={type:CLOSE_SYNTAX$1,syntax:syntaxStack.syntax,token:matchStack.token,prev:matchStack}}syntaxStack=syntaxStack.prev}let syntaxStack=null;let thenStack=null;let elseStack=null;let syntaxStash=null;let iterationCount=0;let exitReason=null;let token=null;let tokenIndex=-1;let longestMatch=0;let matchStack={type:STUB$1,syntax:null,token:null,prev:null};moveToNextToken();while(exitReason===null&&++iterationCount<ITERATION_LIMIT$1){switch(state.type){case"Match":if(thenStack===null){if(token!==null){if(tokenIndex!==tokens.length-1||token.value!=="\\0"&&token.value!=="\\9"){state=matchGraph$4.MISMATCH;break}}exitReason=EXIT_REASON_MATCH$1;break}state=thenStack.nextState;if(state===matchGraph$4.DISALLOW_EMPTY){if(thenStack.matchStack===matchStack){state=matchGraph$4.MISMATCH;break}else{state=matchGraph$4.MATCH}}while(thenStack.syntaxStack!==syntaxStack){closeSyntax()}thenStack=thenStack.prev;break;case"Mismatch":if(syntaxStash!==null&&syntaxStash!==false){if(elseStack===null||tokenIndex>elseStack.tokenIndex){elseStack=syntaxStash;syntaxStash=false}}else if(elseStack===null){exitReason=EXIT_REASON_MISMATCH$1;break}state=elseStack.nextState;thenStack=elseStack.thenStack;syntaxStack=elseStack.syntaxStack;matchStack=elseStack.matchStack;tokenIndex=elseStack.tokenIndex;token=tokenIndex<tokens.length?tokens[tokenIndex]:null;elseStack=elseStack.prev;break;case"MatchGraph":state=state.match;break;case"If":if(state.else!==matchGraph$4.MISMATCH){pushElseStack(state.else)}if(state.then!==matchGraph$4.MATCH){pushThenStack(state.then)}state=state.match;break;case"MatchOnce":state={type:"MatchOnceBuffer",syntax:state,index:0,mask:0};break;case"MatchOnceBuffer":{const terms=state.syntax.terms;if(state.index===terms.length){if(state.mask===0||state.syntax.all){state=matchGraph$4.MISMATCH;break}state=matchGraph$4.MATCH;break}if(state.mask===(1<<terms.length)-1){state=matchGraph$4.MATCH;break}for(;state.index<terms.length;state.index++){const matchFlag=1<<state.index;if((state.mask&matchFlag)===0){pushElseStack(state);pushThenStack({type:"AddMatchOnce",syntax:state.syntax,mask:state.mask|matchFlag});state=terms[state.index++];break}}break}case"AddMatchOnce":state={type:"MatchOnceBuffer",syntax:state.syntax,index:0,mask:state.mask};break;case"Enum":if(token!==null){let name=token.value.toLowerCase();if(name.indexOf("\\")!==-1){name=name.replace(/\\[09].*$/,"")}if(hasOwnProperty$a.call(state.map,name)){state=state.map[name];break}}state=matchGraph$4.MISMATCH;break;case"Generic":{const opts=syntaxStack!==null?syntaxStack.opts:null;const lastTokenIndex=tokenIndex+Math.floor(state.fn(token,getNextToken,opts));if(!isNaN(lastTokenIndex)&&lastTokenIndex>tokenIndex){while(tokenIndex<lastTokenIndex){addTokenToMatch()}state=matchGraph$4.MATCH}else{state=matchGraph$4.MISMATCH}break}case"Type":case"Property":{const syntaxDict=state.type==="Type"?"types":"properties";const dictSyntax=hasOwnProperty$a.call(syntaxes,syntaxDict)?syntaxes[syntaxDict][state.name]:null;if(!dictSyntax||!dictSyntax.match){throw new Error("Bad syntax reference: "+(state.type==="Type"?"<"+state.name+">":"<'"+state.name+"'>"))}if(syntaxStash!==false&&token!==null&&state.type==="Type"){const lowPriorityMatching=state.name==="custom-ident"&&token.type===types$1y.Ident||state.name==="length"&&token.value==="0";if(lowPriorityMatching){if(syntaxStash===null){syntaxStash=stateSnapshotFromSyntax(state,elseStack)}state=matchGraph$4.MISMATCH;break}}openSyntax();state=dictSyntax.match;break}case"Keyword":{const name=state.name;if(token!==null){let keywordName=token.value;if(keywordName.indexOf("\\")!==-1){keywordName=keywordName.replace(/\\[09].*$/,"")}if(areStringsEqualCaseInsensitive$1(keywordName,name)){addTokenToMatch();state=matchGraph$4.MATCH;break}}state=matchGraph$4.MISMATCH;break}case"AtKeyword":case"Function":if(token!==null&&areStringsEqualCaseInsensitive$1(token.value,state.name)){addTokenToMatch();state=matchGraph$4.MATCH;break}state=matchGraph$4.MISMATCH;break;case"Token":if(token!==null&&token.value===state.value){addTokenToMatch();state=matchGraph$4.MATCH;break}state=matchGraph$4.MISMATCH;break;case"Comma":if(token!==null&&token.type===types$1y.Comma){if(isCommaContextStart$1(matchStack.token)){state=matchGraph$4.MISMATCH}else{addTokenToMatch();state=isCommaContextEnd$1(token)?matchGraph$4.MISMATCH:matchGraph$4.MATCH}}else{state=isCommaContextStart$1(matchStack.token)||isCommaContextEnd$1(token)?matchGraph$4.MATCH:matchGraph$4.MISMATCH}break;case"String":let string="";let lastTokenIndex=tokenIndex;for(;lastTokenIndex<tokens.length&&string.length<state.value.length;lastTokenIndex++){string+=tokens[lastTokenIndex].value}if(areStringsEqualCaseInsensitive$1(string,state.value)){while(tokenIndex<lastTokenIndex){addTokenToMatch()}state=matchGraph$4.MATCH}else{state=matchGraph$4.MISMATCH}break;default:throw new Error("Unknown node type: "+state.type)}}switch(exitReason){case null:console.warn("[csstree-match] BREAK after "+ITERATION_LIMIT$1+" iterations");exitReason=EXIT_REASON_ITERATION_LIMIT$1;matchStack=null;break;case EXIT_REASON_MATCH$1:while(syntaxStack!==null){closeSyntax()}break;default:matchStack=null}return{tokens:tokens,reason:exitReason,iterations:iterationCount,match:matchStack,longestMatch:longestMatch}}function matchAsList$1(tokens,matchGraph,syntaxes){const matchResult=internalMatch$1(tokens,matchGraph,syntaxes||{});if(matchResult.match!==null){let item=reverseList$1(matchResult.match).prev;matchResult.match=[];while(item!==null){switch(item.type){case OPEN_SYNTAX$1:case CLOSE_SYNTAX$1:matchResult.match.push({type:item.type,syntax:item.syntax});break;default:matchResult.match.push({token:item.token.value,node:item.token.node});break}item=item.prev}}return matchResult}function matchAsTree$1(tokens,matchGraph,syntaxes){const matchResult=internalMatch$1(tokens,matchGraph,syntaxes||{});if(matchResult.match===null){return matchResult}let item=matchResult.match;let host=matchResult.match={syntax:matchGraph.syntax||null,match:[]};const hostStack=[host];item=reverseList$1(item).prev;while(item!==null){switch(item.type){case OPEN_SYNTAX$1:host.match.push(host={syntax:item.syntax,match:[]});hostStack.push(host);break;case CLOSE_SYNTAX$1:hostStack.pop();host=hostStack[hostStack.length-1];break;default:host.match.push({syntax:item.syntax||null,token:item.token.value,node:item.token.node})}item=item.prev}return matchResult}match$3.matchAsList=matchAsList$1;match$3.matchAsTree=matchAsTree$1;var trace$3={};function getTrace$1(node){function shouldPutToTrace(syntax){if(syntax===null){return false}return syntax.type==="Type"||syntax.type==="Property"||syntax.type==="Keyword"}function hasMatch(matchNode){if(Array.isArray(matchNode.match)){for(let i=0;i<matchNode.match.length;i++){if(hasMatch(matchNode.match[i])){if(shouldPutToTrace(matchNode.syntax)){result.unshift(matchNode.syntax)}return true}}}else if(matchNode.node===node){result=shouldPutToTrace(matchNode.syntax)?[matchNode.syntax]:[];return true}return false}let result=null;if(this.matched!==null){hasMatch(this.matched)}return result}function isType$1(node,type){return testNode$1(this,node,(match=>match.type==="Type"&&match.name===type))}function isProperty$1(node,property){return testNode$1(this,node,(match=>match.type==="Property"&&match.name===property))}function isKeyword$1(node){return testNode$1(this,node,(match=>match.type==="Keyword"))}function testNode$1(match,node,fn){const trace=getTrace$1.call(match,node);if(trace===null){return false}return trace.some(fn)}trace$3.getTrace=getTrace$1;trace$3.isKeyword=isKeyword$1;trace$3.isProperty=isProperty$1;trace$3.isType=isType$1;var search$3={};const List$b=List$f;function getFirstMatchNode$1(matchNode){if("node"in matchNode){return matchNode.node}return getFirstMatchNode$1(matchNode.match[0])}function getLastMatchNode$1(matchNode){if("node"in matchNode){return matchNode.node}return getLastMatchNode$1(matchNode.match[matchNode.match.length-1])}function matchFragments$1(lexer,ast,match,type,name){function findFragments(matchNode){if(matchNode.syntax!==null&&matchNode.syntax.type===type&&matchNode.syntax.name===name){const start=getFirstMatchNode$1(matchNode);const end=getLastMatchNode$1(matchNode);lexer.syntax.walk(ast,(function(node,item,list){if(node===start){const nodes=new List$b.List;do{nodes.appendData(item.data);if(item.data===end){break}item=item.next}while(item!==null);fragments.push({parent:list,nodes:nodes})}}))}if(Array.isArray(matchNode.match)){matchNode.match.forEach(findFragments)}}const fragments=[];if(match.matched!==null){findFragments(match.matched)}return fragments}search$3.matchFragments=matchFragments$1;var structure$1k={};const List$a=List$f;const{hasOwnProperty:hasOwnProperty$9}=Object.prototype;function isValidNumber$1(value){return typeof value==="number"&&isFinite(value)&&Math.floor(value)===value&&value>=0}function isValidLocation$1(loc){return Boolean(loc)&&isValidNumber$1(loc.offset)&&isValidNumber$1(loc.line)&&isValidNumber$1(loc.column)}function createNodeStructureChecker$1(type,fields){return function checkNode(node,warn){if(!node||node.constructor!==Object){return warn(node,"Type of node should be an Object")}for(let key in node){let valid=true;if(hasOwnProperty$9.call(node,key)===false){continue}if(key==="type"){if(node.type!==type){warn(node,"Wrong node type `"+node.type+"`, expected `"+type+"`")}}else if(key==="loc"){if(node.loc===null){continue}else if(node.loc&&node.loc.constructor===Object){if(typeof node.loc.source!=="string"){key+=".source"}else if(!isValidLocation$1(node.loc.start)){key+=".start"}else if(!isValidLocation$1(node.loc.end)){key+=".end"}else{continue}}valid=false}else if(fields.hasOwnProperty(key)){valid=false;for(let i=0;!valid&&i<fields[key].length;i++){const fieldType=fields[key][i];switch(fieldType){case String:valid=typeof node[key]==="string";break;case Boolean:valid=typeof node[key]==="boolean";break;case null:valid=node[key]===null;break;default:if(typeof fieldType==="string"){valid=node[key]&&node[key].type===fieldType}else if(Array.isArray(fieldType)){valid=node[key]instanceof List$a.List}}}}else{warn(node,"Unknown field `"+key+"` for "+type+" node type")}if(!valid){warn(node,"Bad value for `"+type+"."+key+"`")}}for(const key in fields){if(hasOwnProperty$9.call(fields,key)&&hasOwnProperty$9.call(node,key)===false){warn(node,"Field `"+type+"."+key+"` is missed")}}}}function processStructure$1(name,nodeType){const structure=nodeType.structure;const fields={type:String,loc:true};const docs={type:'"'+name+'"'};for(const key in structure){if(hasOwnProperty$9.call(structure,key)===false){continue}const docsTypes=[];const fieldTypes=fields[key]=Array.isArray(structure[key])?structure[key].slice():[structure[key]];for(let i=0;i<fieldTypes.length;i++){const fieldType=fieldTypes[i];if(fieldType===String||fieldType===Boolean){docsTypes.push(fieldType.name)}else if(fieldType===null){docsTypes.push("null")}else if(typeof fieldType==="string"){docsTypes.push("<"+fieldType+">")}else if(Array.isArray(fieldType)){docsTypes.push("List")}else{throw new Error("Wrong value `"+fieldType+"` in `"+name+"."+key+"` structure definition")}}docs[key]=docsTypes.join(" | ")}return{docs:docs,check:createNodeStructureChecker$1(name,fields)}}function getStructureFromConfig$1(config){const structure={};if(config.node){for(const name in config.node){if(hasOwnProperty$9.call(config.node,name)){const nodeType=config.node[name];if(nodeType.structure){structure[name]=processStructure$1(name,nodeType)}else{throw new Error("Missed `structure` field in `"+name+"` node type definition")}}}}return structure}structure$1k.getStructureFromConfig=getStructureFromConfig$1;var walk$a={};const noop$3=function(){};function ensureFunction$2(value){return typeof value==="function"?value:noop$3}function walk$9(node,options,context){function walk(node){enter.call(context,node);switch(node.type){case"Group":node.terms.forEach(walk);break;case"Multiplier":walk(node.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+node.type)}leave.call(context,node)}let enter=noop$3;let leave=noop$3;if(typeof options==="function"){enter=options}else if(options){enter=ensureFunction$2(options.enter);leave=ensureFunction$2(options.leave)}if(enter===noop$3&&leave===noop$3){throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function")}walk(node)}walk$a.walk=walk$9;const error$3=error$4;const names$b=names$c;const genericConst$3=genericConst$5;const generic$2=generic$3;const units=units$1;const prepareTokens$2=prepareTokens_1$1;const matchGraph$3=matchGraph$5;const match$2=match$3;const trace$2=trace$3;const search$2=search$3;const structure$1j=structure$1k;const parse$1r=parse$1u;const generate$1r=generate$1u;const walk$8=walk$a;const cssWideKeywordsSyntax$1=matchGraph$3.buildMatchGraph(genericConst$3.cssWideKeywords.join(" | "));function dumpMapSyntax$1(map,compact,syntaxAsAst){const result={};for(const name in map){if(map[name].syntax){result[name]=syntaxAsAst?map[name].syntax:generate$1r.generate(map[name].syntax,{compact:compact})}}return result}function dumpAtruleMapSyntax$1(map,compact,syntaxAsAst){const result={};for(const[name,atrule]of Object.entries(map)){result[name]={prelude:atrule.prelude&&(syntaxAsAst?atrule.prelude.syntax:generate$1r.generate(atrule.prelude.syntax,{compact:compact})),descriptors:atrule.descriptors&&dumpMapSyntax$1(atrule.descriptors,compact,syntaxAsAst)}}return result}function valueHasVar$1(tokens){for(let i=0;i<tokens.length;i++){if(tokens[i].value.toLowerCase()==="var("){return true}}return false}function buildMatchResult$1(matched,error,iterations){return{matched:matched,iterations:iterations,error:error,...trace$2}}function matchSyntax$1(lexer,syntax,value,useCssWideKeywords){const tokens=prepareTokens$2(value,lexer.syntax);let result;if(valueHasVar$1(tokens)){return buildMatchResult$1(null,new Error("Matching for a tree with var() is not supported"))}if(useCssWideKeywords){result=match$2.matchAsTree(tokens,lexer.cssWideKeywordsSyntax,lexer)}if(!useCssWideKeywords||!result.match){result=match$2.matchAsTree(tokens,syntax.match,lexer);if(!result.match){return buildMatchResult$1(null,new error$3.SyntaxMatchError(result.reason,syntax.syntax,value,result),result.iterations)}}return buildMatchResult$1(result.match,null,result.iterations)}class Lexer$6{constructor(config,syntax,structure$1){this.cssWideKeywordsSyntax=cssWideKeywordsSyntax$1;this.syntax=syntax;this.generic=false;this.units={...units};this.atrules=Object.create(null);this.properties=Object.create(null);this.types=Object.create(null);this.structure=structure$1||structure$1j.getStructureFromConfig(config);if(config){if(config.units){for(const group of Object.keys(units)){if(Array.isArray(config.units[group])){this.units[group]=config.units[group]}}}if(config.types){for(const name in config.types){this.addType_(name,config.types[name])}}if(config.generic){this.generic=true;for(const[name,value]of Object.entries(generic$2.createGenericTypes(this.units))){this.addType_(name,value)}}if(config.atrules){for(const name in config.atrules){this.addAtrule_(name,config.atrules[name])}}if(config.properties){for(const name in config.properties){this.addProperty_(name,config.properties[name])}}}}checkStructure(ast){function collectWarning(node,message){warns.push({node:node,message:message})}const structure=this.structure;const warns=[];this.syntax.walk(ast,(function(node){if(structure.hasOwnProperty(node.type)){structure[node.type].check(node,collectWarning)}else{collectWarning(node,"Unknown node type `"+node.type+"`")}}));return warns.length?warns:false}createDescriptor(syntax,type,name,parent=null){const ref={type:type,name:name};const descriptor={type:type,name:name,parent:parent,serializable:typeof syntax==="string"||syntax&&typeof syntax.type==="string",syntax:null,match:null};if(typeof syntax==="function"){descriptor.match=matchGraph$3.buildMatchGraph(syntax,ref)}else{if(typeof syntax==="string"){Object.defineProperty(descriptor,"syntax",{get(){Object.defineProperty(descriptor,"syntax",{value:parse$1r.parse(syntax)});return descriptor.syntax}})}else{descriptor.syntax=syntax}Object.defineProperty(descriptor,"match",{get(){Object.defineProperty(descriptor,"match",{value:matchGraph$3.buildMatchGraph(descriptor.syntax,ref)});return descriptor.match}})}return descriptor}addAtrule_(name,syntax){if(!syntax){return}this.atrules[name]={type:"Atrule",name:name,prelude:syntax.prelude?this.createDescriptor(syntax.prelude,"AtrulePrelude",name):null,descriptors:syntax.descriptors?Object.keys(syntax.descriptors).reduce(((map,descName)=>{map[descName]=this.createDescriptor(syntax.descriptors[descName],"AtruleDescriptor",descName,name);return map}),Object.create(null)):null}}addProperty_(name,syntax){if(!syntax){return}this.properties[name]=this.createDescriptor(syntax,"Property",name)}addType_(name,syntax){if(!syntax){return}this.types[name]=this.createDescriptor(syntax,"Type",name)}checkAtruleName(atruleName){if(!this.getAtrule(atruleName)){return new error$3.SyntaxReferenceError("Unknown at-rule","@"+atruleName)}}checkAtrulePrelude(atruleName,prelude){const error=this.checkAtruleName(atruleName);if(error){return error}const atrule=this.getAtrule(atruleName);if(!atrule.prelude&&prelude){return new SyntaxError("At-rule `@"+atruleName+"` should not contain a prelude")}if(atrule.prelude&&!prelude){if(!matchSyntax$1(this,atrule.prelude,"",false).matched){return new SyntaxError("At-rule `@"+atruleName+"` should contain a prelude")}}}checkAtruleDescriptorName(atruleName,descriptorName){const error$1=this.checkAtruleName(atruleName);if(error$1){return error$1}const atrule=this.getAtrule(atruleName);const descriptor=names$b.keyword(descriptorName);if(!atrule.descriptors){return new SyntaxError("At-rule `@"+atruleName+"` has no known descriptors")}if(!atrule.descriptors[descriptor.name]&&!atrule.descriptors[descriptor.basename]){return new error$3.SyntaxReferenceError("Unknown at-rule descriptor",descriptorName)}}checkPropertyName(propertyName){if(!this.getProperty(propertyName)){return new error$3.SyntaxReferenceError("Unknown property",propertyName)}}matchAtrulePrelude(atruleName,prelude){const error=this.checkAtrulePrelude(atruleName,prelude);if(error){return buildMatchResult$1(null,error)}const atrule=this.getAtrule(atruleName);if(!atrule.prelude){return buildMatchResult$1(null,null)}return matchSyntax$1(this,atrule.prelude,prelude||"",false)}matchAtruleDescriptor(atruleName,descriptorName,value){const error=this.checkAtruleDescriptorName(atruleName,descriptorName);if(error){return buildMatchResult$1(null,error)}const atrule=this.getAtrule(atruleName);const descriptor=names$b.keyword(descriptorName);return matchSyntax$1(this,atrule.descriptors[descriptor.name]||atrule.descriptors[descriptor.basename],value,false)}matchDeclaration(node){if(node.type!=="Declaration"){return buildMatchResult$1(null,new Error("Not a Declaration node"))}return this.matchProperty(node.property,node.value)}matchProperty(propertyName,value){if(names$b.property(propertyName).custom){return buildMatchResult$1(null,new Error("Lexer matching doesn't applicable for custom properties"))}const error=this.checkPropertyName(propertyName);if(error){return buildMatchResult$1(null,error)}return matchSyntax$1(this,this.getProperty(propertyName),value,true)}matchType(typeName,value){const typeSyntax=this.getType(typeName);if(!typeSyntax){return buildMatchResult$1(null,new error$3.SyntaxReferenceError("Unknown type",typeName))}return matchSyntax$1(this,typeSyntax,value,false)}match(syntax,value){if(typeof syntax!=="string"&&(!syntax||!syntax.type)){return buildMatchResult$1(null,new error$3.SyntaxReferenceError("Bad syntax"))}if(typeof syntax==="string"||!syntax.match){syntax=this.createDescriptor(syntax,"Type","anonymous")}return matchSyntax$1(this,syntax,value,false)}findValueFragments(propertyName,value,type,name){return search$2.matchFragments(this,value,this.matchProperty(propertyName,value),type,name)}findDeclarationValueFragments(declaration,type,name){return search$2.matchFragments(this,declaration.value,this.matchDeclaration(declaration),type,name)}findAllFragments(ast,type,name){const result=[];this.syntax.walk(ast,{visit:"Declaration",enter:declaration=>{result.push.apply(result,this.findDeclarationValueFragments(declaration,type,name))}});return result}getAtrule(atruleName,fallbackBasename=true){const atrule=names$b.keyword(atruleName);const atruleEntry=atrule.vendor&&fallbackBasename?this.atrules[atrule.name]||this.atrules[atrule.basename]:this.atrules[atrule.name];return atruleEntry||null}getAtrulePrelude(atruleName,fallbackBasename=true){const atrule=this.getAtrule(atruleName,fallbackBasename);return atrule&&atrule.prelude||null}getAtruleDescriptor(atruleName,name){return this.atrules.hasOwnProperty(atruleName)&&this.atrules.declarators?this.atrules[atruleName].declarators[name]||null:null}getProperty(propertyName,fallbackBasename=true){const property=names$b.property(propertyName);const propertyEntry=property.vendor&&fallbackBasename?this.properties[property.name]||this.properties[property.basename]:this.properties[property.name];return propertyEntry||null}getType(name){return hasOwnProperty.call(this.types,name)?this.types[name]:null}validate(){function validate(syntax,name,broken,descriptor){if(broken.has(name)){return broken.get(name)}broken.set(name,false);if(descriptor.syntax!==null){walk$8.walk(descriptor.syntax,(function(node){if(node.type!=="Type"&&node.type!=="Property"){return}const map=node.type==="Type"?syntax.types:syntax.properties;const brokenMap=node.type==="Type"?brokenTypes:brokenProperties;if(!hasOwnProperty.call(map,node.name)||validate(syntax,node.name,brokenMap,map[node.name])){broken.set(name,true)}}),this)}}let brokenTypes=new Map;let brokenProperties=new Map;for(const key in this.types){validate(this,key,brokenTypes,this.types[key])}for(const key in this.properties){validate(this,key,brokenProperties,this.properties[key])}brokenTypes=[...brokenTypes.keys()].filter((name=>brokenTypes.get(name)));brokenProperties=[...brokenProperties.keys()].filter((name=>brokenProperties.get(name)));if(brokenTypes.length||brokenProperties.length){return{types:brokenTypes,properties:brokenProperties}}return null}dump(syntaxAsAst,pretty){return{generic:this.generic,units:this.units,types:dumpMapSyntax$1(this.types,!pretty,syntaxAsAst),properties:dumpMapSyntax$1(this.properties,!pretty,syntaxAsAst),atrules:dumpAtruleMapSyntax$1(this.atrules,!pretty,syntaxAsAst)}}toString(){return JSON.stringify(this.dump())}}Lexer$7.Lexer=Lexer$6;function appendOrSet(a,b){if(typeof b==="string"&&/^\s*\|/.test(b)){return typeof a==="string"?a+b:b.replace(/^\s*\|\s*/,"")}return b||null}function sliceProps(obj,props){const result=Object.create(null);for(const[key,value]of Object.entries(obj)){if(value){result[key]={};for(const prop of Object.keys(value)){if(props.includes(prop)){result[key][prop]=value[prop]}}}}return result}function mix$3(dest,src){const result={...dest};for(const[prop,value]of Object.entries(src)){switch(prop){case"generic":result[prop]=Boolean(value);break;case"units":result[prop]={...dest[prop]};for(const[name,patch]of Object.entries(value)){result[prop][name]=Array.isArray(patch)?patch:[]}break;case"atrules":result[prop]={...dest[prop]};for(const[name,atrule]of Object.entries(value)){const exists=result[prop][name]||{};const current=result[prop][name]={prelude:exists.prelude||null,descriptors:{...exists.descriptors}};if(!atrule){continue}current.prelude=atrule.prelude?appendOrSet(current.prelude,atrule.prelude):current.prelude||null;for(const[descriptorName,descriptorValue]of Object.entries(atrule.descriptors||{})){current.descriptors[descriptorName]=descriptorValue?appendOrSet(current.descriptors[descriptorName],descriptorValue):null}if(!Object.keys(current.descriptors).length){current.descriptors=null}}break;case"types":case"properties":result[prop]={...dest[prop]};for(const[name,syntax]of Object.entries(value)){result[prop][name]=appendOrSet(result[prop][name],syntax)}break;case"scope":result[prop]={...dest[prop]};for(const[name,props]of Object.entries(value)){result[prop][name]={...result[prop][name],...props}}break;case"parseContext":result[prop]={...dest[prop],...value};break;case"atrule":case"pseudo":result[prop]={...dest[prop],...sliceProps(value,["parse"])};break;case"node":result[prop]={...dest[prop],...sliceProps(value,["name","structure","parse","generate","walkContext"])};break}}return result}var mix_1$1=mix$3;const index$g=tokenizer$5;const create$a=create$e;const create$2$2=create$d;const create$3$1=create$c;const create$1$2=create$b;const Lexer$5=Lexer$7;const mix$2=mix_1$1;function createSyntax$2(config){const parse=create$a.createParser(config);const walk=create$1$2.createWalker(config);const generate=create$2$2.createGenerator(config);const{fromPlainObject:fromPlainObject,toPlainObject:toPlainObject}=create$3$1.createConvertor(walk);const syntax={lexer:null,createLexer:config=>new Lexer$5.Lexer(config,syntax,syntax.lexer.structure),tokenize:index$g.tokenize,parse:parse,generate:generate,walk:walk,find:walk.find,findLast:walk.findLast,findAll:walk.findAll,fromPlainObject:fromPlainObject,toPlainObject:toPlainObject,fork(extension){const base=mix$2({},config);return createSyntax$2(typeof extension==="function"?extension(base,Object.assign):mix$2(base,extension))}};syntax.lexer=new Lexer$5.Lexer({generic:true,units:config.units,types:config.types,atrules:config.atrules,properties:config.properties,node:config.node},syntax);return syntax}const createSyntax$1$1=config=>createSyntax$2(mix$2({},config));var create_1$1=createSyntax$1$1;var data$3={generic:true,units:{angle:["deg","grad","rad","turn"],decibel:["db"],flex:["fr"],frequency:["hz","khz"],length:["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],resolution:["dpi","dpcm","dppx","x"],semitones:["st"],time:["s","ms"]},types:{"abs()":"abs( <calc-sum> )","absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","acos()":"acos( <calc-sum> )","alpha-value":"<number>|<percentage>","angle-percentage":"<angle>|<percentage>","angular-color-hint":"<angle-percentage>","angular-color-stop":"<color>&&<color-stop-angle>?","angular-color-stop-list":"[<angular-color-stop> [, <angular-color-hint>]?]# , <angular-color-stop>","animateable-feature":"scroll-position|contents|<custom-ident>","asin()":"asin( <calc-sum> )","atan()":"atan( <calc-sum> )","atan2()":"atan2( <calc-sum> , <calc-sum> )",attachment:"scroll|fixed|local","attr()":"attr( <attr-name> <type-or-unit>? [, <attr-fallback>]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' <wq-name> ']'|'[' <wq-name> <attr-matcher> [<string-token>|<ident-token>] <attr-modifier>? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [<line-names>? <fixed-size>]+ <line-names>? )","auto-track-list":"[<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>? <auto-repeat> [<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>?",axis:"block|inline|vertical|horizontal","baseline-position":"[first|last]? baseline","basic-shape":"<inset()>|<circle()>|<ellipse()>|<polygon()>|<path()>","bg-image":"none|<image>","bg-layer":"<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","bg-position":"[[left|center|right|top|bottom|<length-percentage>]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]|[center|[left|right] <length-percentage>?]&&[center|[top|bottom] <length-percentage>?]]","bg-size":"[<length-percentage>|auto]{1,2}|cover|contain","blur()":"blur( <length> )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( <number-percentage> )","calc()":"calc( <calc-sum> )","calc-sum":"<calc-product> [['+'|'-'] <calc-product>]*","calc-product":"<calc-value> ['*' <calc-value>|'/' <number>]*","calc-value":"<number>|<dimension>|<percentage>|<calc-constant>|( <calc-sum> )","calc-constant":"e|pi|infinity|-infinity|NaN","cf-final-image":"<image>|<color>","cf-mixing-image":"<percentage>?&&<image>","circle()":"circle( [<shape-radius>]? [at <position>]? )","clamp()":"clamp( <calc-sum>#{3} )","class-selector":"'.' <ident-token>","clip-source":"<url>",color:"<rgb()>|<rgba()>|<hsl()>|<hsla()>|<hwb()>|<lab()>|<lch()>|<hex-color>|<named-color>|currentcolor|<deprecated-system-color>","color-stop":"<color-stop-length>|<color-stop-angle>","color-stop-angle":"<angle-percentage>{1,2}","color-stop-length":"<length-percentage>{1,2}","color-stop-list":"[<linear-color-stop> [, <linear-color-hint>]?]# , <linear-color-stop>",combinator:"'>'|'+'|'~'|['||']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[<type-selector>? <subclass-selector>* [<pseudo-element-selector> <pseudo-class-selector>*]*]!","compound-selector-list":"<compound-selector>#","complex-selector":"<compound-selector> [<combinator>? <compound-selector>]*","complex-selector-list":"<complex-selector>#","conic-gradient()":"conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[<string>|contents|<image>|<counter>|<quote>|<target>|<leader()>|<attr()>]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"<image>","contrast()":"contrast( [<number-percentage>] )","cos()":"cos( <calc-sum> )",counter:"<counter()>|<counters()>","counter()":"counter( <counter-name> , <counter-style>? )","counter-name":"<custom-ident>","counter-style":"<counter-style-name>|symbols( )","counter-style-name":"<custom-ident>","counters()":"counters( <counter-name> , <string> , <counter-style>? )","cross-fade()":"cross-fade( <cf-mixing-image> , <cf-final-image>? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( <number [0,1]> , <number> , <number [0,1]> , <number> )","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"<display-outside>?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( <length>{2,3} <color>? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( <custom-ident> , [first|start|last|first-except]? )|element( <id-selector> )","ellipse()":"ellipse( [<shape-radius>{2}]? [at <position>]? )","ending-shape":"circle|ellipse","env()":"env( <custom-ident> , <declaration-value>? )","exp()":"exp( <calc-sum> )","explicit-track-list":"[<line-names>? <track-size>]+ <line-names>?","family-name":"<string>|<custom-ident>+","feature-tag-value":"<string> [<integer>|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":"<feature-type> '{' <feature-value-declaration-list> '}'","feature-value-block-list":"<feature-value-block>+","feature-value-declaration":"<custom-ident> : <integer>+ ;","feature-value-declaration-list":"<feature-value-declaration>","feature-value-name":"<custom-ident>","fill-rule":"nonzero|evenodd","filter-function":"<blur()>|<brightness()>|<contrast()>|<drop-shadow()>|<grayscale()>|<hue-rotate()>|<invert()>|<opacity()>|<saturate()>|<sepia()>","filter-function-list":"[<filter-function>|<url>]+","final-bg-layer":"<'background-color'>||<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","fixed-breadth":"<length-percentage>","fixed-repeat":"repeat( [<integer [1,∞]>] , [<line-names>? <fixed-size>]+ <line-names>? )","fixed-size":"<fixed-breadth>|minmax( <fixed-breadth> , <track-breadth> )|minmax( <inflexible-breadth> , <fixed-breadth> )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|<percentage>","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|<number [1,1000]>","frequency-percentage":"<frequency>|<percentage>","general-enclosed":"[<function-token> <any-value> )]|( <ident> <any-value> )","generic-family":"serif|sans-serif|cursive|fantasy|monospace|-apple-system","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"<shape-box>|fill-box|stroke-box|view-box",gradient:"<linear-gradient()>|<repeating-linear-gradient()>|<radial-gradient()>|<repeating-radial-gradient()>|<conic-gradient()>|<repeating-conic-gradient()>|<-legacy-gradient>","grayscale()":"grayscale( <number-percentage> )","grid-line":"auto|<custom-ident>|[<integer>&&<custom-ident>?]|[span&&[<integer>||<custom-ident>]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsl( <hue> , <percentage> , <percentage> , <alpha-value>? )","hsla()":"hsla( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsla( <hue> , <percentage> , <percentage> , <alpha-value>? )",hue:"<number>|<angle>","hue-rotate()":"hue-rotate( <angle> )","hwb()":"hwb( [<hue>|none] [<percentage>|none] [<percentage>|none] [/ [<alpha-value>|none]]? )","hypot()":"hypot( <calc-sum># )",image:"<url>|<image()>|<image-set()>|<element()>|<paint()>|<cross-fade()>|<gradient>","image()":"image( <image-tags>? [<image-src>? , <color>?]! )","image-set()":"image-set( <image-set-option># )","image-set-option":"[<image>|<string>] [<resolution>||type( <string> )]","image-src":"<url>|<string>","image-tags":"ltr|rtl","inflexible-breadth":"<length-percentage>|min-content|max-content|auto","inset()":"inset( <length-percentage>{1,4} [round <'border-radius'>]? )","invert()":"invert( <number-percentage> )","keyframes-name":"<custom-ident>|<string>","keyframe-block":"<keyframe-selector># { <declaration-list> }","keyframe-block-list":"<keyframe-block>+","keyframe-selector":"from|to|<percentage>","lab()":"lab( [<percentage>|<number>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )","layer()":"layer( <layer-name> )","layer-name":"<ident> ['.' <ident>]*","lch()":"lch( [<percentage>|<number>|none] [<percentage>|<number>|none] [<hue>|none] [/ [<alpha-value>|none]]? )","leader()":"leader( <leader-type> )","leader-type":"dotted|solid|space|<string>","length-percentage":"<length>|<percentage>","line-names":"'[' <custom-ident>* ']'","line-name-list":"[<line-names>|<name-repeat>]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"<length>|thin|medium|thick","linear-color-hint":"<length-percentage>","linear-color-stop":"<color> <color-stop-length>?","linear-gradient()":"linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","log()":"log( <calc-sum> , <calc-sum>? )","mask-layer":"<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||<geometry-box>||[<geometry-box>|no-clip]||<compositing-operator>||<masking-mode>","mask-position":"[<length-percentage>|left|center|right] [<length-percentage>|top|center|bottom]?","mask-reference":"none|<image>|<mask-source>","mask-source":"<url>","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( <number>#{6} )","matrix3d()":"matrix3d( <number>#{16} )","max()":"max( <calc-sum># )","media-and":"<media-in-parens> [and <media-in-parens>]+","media-condition":"<media-not>|<media-and>|<media-or>|<media-in-parens>","media-condition-without-or":"<media-not>|<media-and>|<media-in-parens>","media-feature":"( [<mf-plain>|<mf-boolean>|<mf-range>] )","media-in-parens":"( <media-condition> )|<media-feature>|<general-enclosed>","media-not":"not <media-in-parens>","media-or":"<media-in-parens> [or <media-in-parens>]+","media-query":"<media-condition>|[not|only]? <media-type> [and <media-condition-without-or>]?","media-query-list":"<media-query>#","media-type":"<ident>","mf-boolean":"<mf-name>","mf-name":"<ident>","mf-plain":"<mf-name> : <mf-value>","mf-range":"<mf-name> ['<'|'>']? '='? <mf-value>|<mf-value> ['<'|'>']? '='? <mf-name>|<mf-value> '<' '='? <mf-name> '<' '='? <mf-value>|<mf-value> '>' '='? <mf-name> '>' '='? <mf-value>","mf-value":"<number>|<dimension>|<ident>|<ratio>","min()":"min( <calc-sum># )","minmax()":"minmax( [<length-percentage>|min-content|max-content|auto] , [<length-percentage>|<flex>|min-content|max-content|auto] )","mod()":"mod( <calc-sum> , <calc-sum> )","name-repeat":"repeat( [<integer [1,∞]>|auto-fill] , <line-names>+ )","named-color":"transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>","namespace-prefix":"<ident>","ns-prefix":"[<ident-token>|'*']? '|'","number-percentage":"<number>|<percentage>","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"<an-plus-b>|even|odd","opacity()":"opacity( [<number-percentage>] )","overflow-position":"unsafe|safe","outline-radius":"<length>|<percentage>","page-body":"<declaration>? [; <page-body>]?|<page-margin-box> <page-body>","page-margin-box":"<page-margin-box-type> '{' <declaration-list> '}'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector-list":"[<page-selector>#]?","page-selector":"<pseudo-page>+|<ident> <pseudo-page>*","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger","path()":"path( [<fill-rule> ,]? <string> )","paint()":"paint( <ident> , <declaration-value>? )","perspective()":"perspective( [<length [0,∞]>|none] )","polygon()":"polygon( <fill-rule>? , [<length-percentage> <length-percentage>]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]?|[[left|right] <length-percentage>]&&[[top|bottom] <length-percentage>]]","pow()":"pow( <calc-sum> , <calc-sum> )","pseudo-class-selector":"':' <ident-token>|':' <function-token> <any-value> ')'","pseudo-element-selector":"':' <pseudo-class-selector>","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )",ratio:"<number [0,∞]> [/ <number [0,∞]>]?","relative-selector":"<combinator>? <complex-selector>","relative-selector-list":"<relative-selector>#","relative-size":"larger|smaller","rem()":"rem( <calc-sum> , <calc-sum> )","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-conic-gradient()":"repeating-conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","repeating-linear-gradient()":"repeating-linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","repeating-radial-gradient()":"repeating-radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )","reversed-counter-name":"reversed( <counter-name> )","rgb()":"rgb( <percentage>{3} [/ <alpha-value>]? )|rgb( <number>{3} [/ <alpha-value>]? )|rgb( <percentage>#{3} , <alpha-value>? )|rgb( <number>#{3} , <alpha-value>? )","rgba()":"rgba( <percentage>{3} [/ <alpha-value>]? )|rgba( <number>{3} [/ <alpha-value>]? )|rgba( <percentage>#{3} , <alpha-value>? )|rgba( <number>#{3} , <alpha-value>? )","rotate()":"rotate( [<angle>|<zero>] )","rotate3d()":"rotate3d( <number> , <number> , <number> , [<angle>|<zero>] )","rotateX()":"rotateX( [<angle>|<zero>] )","rotateY()":"rotateY( [<angle>|<zero>] )","rotateZ()":"rotateZ( [<angle>|<zero>] )","round()":"round( <rounding-strategy>? , <calc-sum> , <calc-sum> )","rounding-strategy":"nearest|up|down|to-zero","saturate()":"saturate( <number-percentage> )","scale()":"scale( [<number>|<percentage>]#{1,2} )","scale3d()":"scale3d( [<number>|<percentage>]#{3} )","scaleX()":"scaleX( [<number>|<percentage>] )","scaleY()":"scaleY( [<number>|<percentage>] )","scaleZ()":"scaleZ( [<number>|<percentage>] )",scroller:"root|nearest","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"<length-percentage>|closest-side|farthest-side","sign()":"sign( <calc-sum> )","skew()":"skew( [<angle>|<zero>] , [<angle>|<zero>]? )","skewX()":"skewX( [<angle>|<zero>] )","skewY()":"skewY( [<angle>|<zero>] )","sepia()":"sepia( <number-percentage> )",shadow:"inset?&&<length>{2,4}&&<color>?","shadow-t":"[<length>{2,3}&&<color>?]",shape:"rect( <top> , <right> , <bottom> , <left> )|rect( <top> <right> <bottom> <left> )","shape-box":"<box>|margin-box","side-or-corner":"[left|right]||[top|bottom]","sin()":"sin( <calc-sum> )","single-animation":"<time>||<easing-function>||<time>||<single-animation-iteration-count>||<single-animation-direction>||<single-animation-fill-mode>||<single-animation-play-state>||[none|<keyframes-name>]","single-animation-direction":"normal|reverse|alternate|alternate-reverse","single-animation-fill-mode":"none|forwards|backwards|both","single-animation-iteration-count":"infinite|<number>","single-animation-play-state":"running|paused","single-animation-timeline":"auto|none|<timeline-name>|scroll( <axis>? <scroller>? )","single-transition":"[none|<single-transition-property>]||<time>||<easing-function>||<time>","single-transition-property":"all|<custom-ident>",size:"closest-side|farthest-side|closest-corner|farthest-corner|<length>|<length-percentage>{2}","sqrt()":"sqrt( <calc-sum> )","step-position":"jump-start|jump-end|jump-none|jump-both|start|end","step-timing-function":"step-start|step-end|steps( <integer> [, <step-position>]? )","subclass-selector":"<id-selector>|<class-selector>|<attribute-selector>|<pseudo-class-selector>","supports-condition":"not <supports-in-parens>|<supports-in-parens> [and <supports-in-parens>]*|<supports-in-parens> [or <supports-in-parens>]*","supports-in-parens":"( <supports-condition> )|<supports-feature>|<general-enclosed>","supports-feature":"<supports-decl>|<supports-selector-fn>","supports-decl":"( <declaration> )","supports-selector-fn":"selector( <complex-selector> )",symbol:"<string>|<image>|<custom-ident>","tan()":"tan( <calc-sum> )",target:"<target-counter()>|<target-counters()>|<target-text()>","target-counter()":"target-counter( [<string>|<url>] , <custom-ident> , <counter-style>? )","target-counters()":"target-counters( [<string>|<url>] , <custom-ident> , <string> , <counter-style>? )","target-text()":"target-text( [<string>|<url>] , [content|before|after|first-letter]? )","time-percentage":"<time>|<percentage>","timeline-name":"<custom-ident>|<string>","easing-function":"linear|<cubic-bezier-timing-function>|<step-timing-function>","track-breadth":"<length-percentage>|<flex>|min-content|max-content|auto","track-list":"[<line-names>? [<track-size>|<track-repeat>]]+ <line-names>?","track-repeat":"repeat( [<integer [1,∞]>] , [<line-names>? <track-size>]+ <line-names>? )","track-size":"<track-breadth>|minmax( <inflexible-breadth> , <track-breadth> )|fit-content( <length-percentage> )","transform-function":"<matrix()>|<translate()>|<translateX()>|<translateY()>|<scale()>|<scaleX()>|<scaleY()>|<rotate()>|<skew()>|<skewX()>|<skewY()>|<matrix3d()>|<translate3d()>|<translateZ()>|<scale3d()>|<scaleZ()>|<rotate3d()>|<rotateX()>|<rotateY()>|<rotateZ()>|<perspective()>","transform-list":"<transform-function>+","translate()":"translate( <length-percentage> , <length-percentage>? )","translate3d()":"translate3d( <length-percentage> , <length-percentage> , <length> )","translateX()":"translateX( <length-percentage> )","translateY()":"translateY( <length-percentage> )","translateZ()":"translateZ( <length> )","type-or-unit":"string|color|url|integer|number|length|angle|time|frequency|cap|ch|em|ex|ic|lh|rlh|rem|vb|vi|vw|vh|vmin|vmax|mm|Q|cm|in|pt|pc|px|deg|grad|rad|turn|ms|s|Hz|kHz|%","type-selector":"<wq-name>|<ns-prefix>? '*'","var()":"var( <custom-property-name> , <declaration-value>? )","viewport-length":"auto|<length-percentage>","visual-box":"content-box|padding-box|border-box","wq-name":"<ns-prefix>? <ident-token>","-legacy-gradient":"<-webkit-gradient()>|<-legacy-linear-gradient>|<-legacy-repeating-linear-gradient>|<-legacy-radial-gradient>|<-legacy-repeating-radial-gradient>","-legacy-linear-gradient":"-moz-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-repeating-linear-gradient":"-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-linear-gradient-arguments":"[<angle>|<side-or-corner>]? , <color-stop-list>","-legacy-radial-gradient":"-moz-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-repeating-radial-gradient":"-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-radial-gradient-arguments":"[<position> ,]? [[[<-legacy-radial-gradient-shape>||<-legacy-radial-gradient-size>]|[<length>|<percentage>]{2}] ,]? <color-stop-list>","-legacy-radial-gradient-size":"closest-side|closest-corner|farthest-side|farthest-corner|contain|cover","-legacy-radial-gradient-shape":"circle|ellipse","-non-standard-font":"-apple-system-body|-apple-system-headline|-apple-system-subheadline|-apple-system-caption1|-apple-system-caption2|-apple-system-footnote|-apple-system-short-body|-apple-system-short-headline|-apple-system-short-subheadline|-apple-system-short-caption1|-apple-system-short-footnote|-apple-system-tall-body","-non-standard-color":"-moz-ButtonDefault|-moz-ButtonHoverFace|-moz-ButtonHoverText|-moz-CellHighlight|-moz-CellHighlightText|-moz-Combobox|-moz-ComboboxText|-moz-Dialog|-moz-DialogText|-moz-dragtargetzone|-moz-EvenTreeRow|-moz-Field|-moz-FieldText|-moz-html-CellHighlight|-moz-html-CellHighlightText|-moz-mac-accentdarkestshadow|-moz-mac-accentdarkshadow|-moz-mac-accentface|-moz-mac-accentlightesthighlight|-moz-mac-accentlightshadow|-moz-mac-accentregularhighlight|-moz-mac-accentregularshadow|-moz-mac-chrome-active|-moz-mac-chrome-inactive|-moz-mac-focusring|-moz-mac-menuselect|-moz-mac-menushadow|-moz-mac-menutextselect|-moz-MenuHover|-moz-MenuHoverText|-moz-MenuBarText|-moz-MenuBarHoverText|-moz-nativehyperlinktext|-moz-OddTreeRow|-moz-win-communicationstext|-moz-win-mediatext|-moz-activehyperlinktext|-moz-default-background-color|-moz-default-color|-moz-hyperlinktext|-moz-visitedhyperlinktext|-webkit-activelink|-webkit-focus-ring-color|-webkit-link|-webkit-text","-non-standard-image-rendering":"optimize-contrast|-moz-crisp-edges|-o-crisp-edges|-webkit-optimize-contrast","-non-standard-overflow":"-moz-scrollbars-none|-moz-scrollbars-horizontal|-moz-scrollbars-vertical|-moz-hidden-unscrollable","-non-standard-width":"fill-available|min-intrinsic|intrinsic|-moz-available|-moz-fit-content|-moz-min-content|-moz-max-content|-webkit-min-content|-webkit-max-content","-webkit-gradient()":"-webkit-gradient( <-webkit-gradient-type> , <-webkit-gradient-point> [, <-webkit-gradient-point>|, <-webkit-gradient-radius> , <-webkit-gradient-point>] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )","-webkit-gradient-color-stop":"from( <color> )|color-stop( [<number-zero-one>|<percentage>] , <color> )|to( <color> )","-webkit-gradient-point":"[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]","-webkit-gradient-radius":"<length>|<percentage>","-webkit-gradient-type":"linear|radial","-webkit-mask-box-repeat":"repeat|stretch|round","-webkit-mask-clip-style":"border|border-box|padding|padding-box|content|content-box|text","-ms-filter-function-list":"<-ms-filter-function>+","-ms-filter-function":"<-ms-filter-function-progid>|<-ms-filter-function-legacy>","-ms-filter-function-progid":"'progid:' [<ident-token> '.']* [<ident-token>|<function-token> <any-value>? )]","-ms-filter-function-legacy":"<ident-token>|<function-token> <any-value>? )","-ms-filter":"<string>",age:"child|young|old","attr-name":"<wq-name>","attr-fallback":"<any-value>","bg-clip":"<box>|border|text",bottom:"<length>|auto","generic-voice":"[<age>? <gender> <integer>?]",gender:"male|female|neutral",left:"<length>|auto","mask-image":"<mask-reference>#",paint:"none|<color>|<url> [none|<color>]?|context-fill|context-stroke",right:"<length>|auto","scroll-timeline-axis":"block|inline|vertical|horizontal","scroll-timeline-name":"none|<custom-ident>","single-animation-composition":"replace|add|accumulate","svg-length":"<percentage>|<length>|<number>","svg-writing-mode":"lr-tb|rl-tb|tb-rl|lr|rl|tb",top:"<length>|auto",x:"<number>",y:"<number>",declaration:"<ident-token> : <declaration-value>? ['!' important]?","declaration-list":"[<declaration>? ';']* <declaration>?",url:"url( <string> <url-modifier>* )|<url-token>","url-modifier":"<ident>|<function-token> <any-value> )","number-zero-one":"<number [0,1]>","number-one-or-greater":"<number [1,∞]>","-non-standard-display":"-ms-inline-flexbox|-ms-grid|-ms-inline-grid|-webkit-flex|-webkit-inline-flex|-webkit-box|-webkit-inline-box|-moz-inline-stack|-moz-box|-moz-inline-box"},properties:{"--*":"<declaration-value>","-ms-accelerator":"false|true","-ms-block-progression":"tb|rl|bt|lr","-ms-content-zoom-chaining":"none|chained","-ms-content-zooming":"none|zoom","-ms-content-zoom-limit":"<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>","-ms-content-zoom-limit-max":"<percentage>","-ms-content-zoom-limit-min":"<percentage>","-ms-content-zoom-snap":"<'-ms-content-zoom-snap-type'>||<'-ms-content-zoom-snap-points'>","-ms-content-zoom-snap-points":"snapInterval( <percentage> , <percentage> )|snapList( <percentage># )","-ms-content-zoom-snap-type":"none|proximity|mandatory","-ms-filter":"<string>","-ms-flow-from":"[none|<custom-ident>]#","-ms-flow-into":"[none|<custom-ident>]#","-ms-grid-columns":"none|<track-list>|<auto-track-list>","-ms-grid-rows":"none|<track-list>|<auto-track-list>","-ms-high-contrast-adjust":"auto|none","-ms-hyphenate-limit-chars":"auto|<integer>{1,3}","-ms-hyphenate-limit-lines":"no-limit|<integer>","-ms-hyphenate-limit-zone":"<percentage>|<length>","-ms-ime-align":"auto|after","-ms-overflow-style":"auto|none|scrollbar|-ms-autohiding-scrollbar","-ms-scrollbar-3dlight-color":"<color>","-ms-scrollbar-arrow-color":"<color>","-ms-scrollbar-base-color":"<color>","-ms-scrollbar-darkshadow-color":"<color>","-ms-scrollbar-face-color":"<color>","-ms-scrollbar-highlight-color":"<color>","-ms-scrollbar-shadow-color":"<color>","-ms-scrollbar-track-color":"<color>","-ms-scroll-chaining":"chained|none","-ms-scroll-limit":"<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>","-ms-scroll-limit-x-max":"auto|<length>","-ms-scroll-limit-x-min":"<length>","-ms-scroll-limit-y-max":"auto|<length>","-ms-scroll-limit-y-min":"<length>","-ms-scroll-rails":"none|railed","-ms-scroll-snap-points-x":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-points-y":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-type":"none|proximity|mandatory","-ms-scroll-snap-x":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>","-ms-scroll-snap-y":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>","-ms-scroll-translation":"none|vertical-to-horizontal","-ms-text-autospace":"none|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space","-ms-touch-select":"grippers|none","-ms-user-select":"none|element|text","-ms-wrap-flow":"auto|both|start|end|maximum|clear","-ms-wrap-margin":"<length>","-ms-wrap-through":"wrap|none","-moz-appearance":"none|button|button-arrow-down|button-arrow-next|button-arrow-previous|button-arrow-up|button-bevel|button-focus|caret|checkbox|checkbox-container|checkbox-label|checkmenuitem|dualbutton|groupbox|listbox|listitem|menuarrow|menubar|menucheckbox|menuimage|menuitem|menuitemtext|menulist|menulist-button|menulist-text|menulist-textfield|menupopup|menuradio|menuseparator|meterbar|meterchunk|progressbar|progressbar-vertical|progresschunk|progresschunk-vertical|radio|radio-container|radio-label|radiomenuitem|range|range-thumb|resizer|resizerpanel|scale-horizontal|scalethumbend|scalethumb-horizontal|scalethumbstart|scalethumbtick|scalethumb-vertical|scale-vertical|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|separator|sheet|spinner|spinner-downbutton|spinner-textfield|spinner-upbutton|splitter|statusbar|statusbarpanel|tab|tabpanel|tabpanels|tab-scroll-arrow-back|tab-scroll-arrow-forward|textfield|textfield-multiline|toolbar|toolbarbutton|toolbarbutton-dropdown|toolbargripper|toolbox|tooltip|treeheader|treeheadercell|treeheadersortarrow|treeitem|treeline|treetwisty|treetwistyopen|treeview|-moz-mac-unified-toolbar|-moz-win-borderless-glass|-moz-win-browsertabbar-toolbox|-moz-win-communicationstext|-moz-win-communications-toolbox|-moz-win-exclude-glass|-moz-win-glass|-moz-win-mediatext|-moz-win-media-toolbox|-moz-window-button-box|-moz-window-button-box-maximized|-moz-window-button-close|-moz-window-button-maximize|-moz-window-button-minimize|-moz-window-button-restore|-moz-window-frame-bottom|-moz-window-frame-left|-moz-window-frame-right|-moz-window-titlebar|-moz-window-titlebar-maximized","-moz-binding":"<url>|none","-moz-border-bottom-colors":"<color>+|none","-moz-border-left-colors":"<color>+|none","-moz-border-right-colors":"<color>+|none","-moz-border-top-colors":"<color>+|none","-moz-context-properties":"none|[fill|fill-opacity|stroke|stroke-opacity]#","-moz-float-edge":"border-box|content-box|margin-box|padding-box","-moz-force-broken-image-icon":"0|1","-moz-image-region":"<shape>|auto","-moz-orient":"inline|block|horizontal|vertical","-moz-outline-radius":"<outline-radius>{1,4} [/ <outline-radius>{1,4}]?","-moz-outline-radius-bottomleft":"<outline-radius>","-moz-outline-radius-bottomright":"<outline-radius>","-moz-outline-radius-topleft":"<outline-radius>","-moz-outline-radius-topright":"<outline-radius>","-moz-stack-sizing":"ignore|stretch-to-fit","-moz-text-blink":"none|blink","-moz-user-focus":"ignore|normal|select-after|select-before|select-menu|select-same|select-all|none","-moz-user-input":"auto|none|enabled|disabled","-moz-user-modify":"read-only|read-write|write-only","-moz-window-dragging":"drag|no-drag","-moz-window-shadow":"default|menu|tooltip|sheet|none","-webkit-appearance":"none|button|button-bevel|caps-lock-indicator|caret|checkbox|default-button|inner-spin-button|listbox|listitem|media-controls-background|media-controls-fullscreen-background|media-current-time-display|media-enter-fullscreen-button|media-exit-fullscreen-button|media-fullscreen-button|media-mute-button|media-overlay-play-button|media-play-button|media-seek-back-button|media-seek-forward-button|media-slider|media-sliderthumb|media-time-remaining-display|media-toggle-closed-captions-button|media-volume-slider|media-volume-slider-container|media-volume-sliderthumb|menulist|menulist-button|menulist-text|menulist-textfield|meter|progress-bar|progress-bar-value|push-button|radio|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbargripper-horizontal|scrollbargripper-vertical|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|searchfield-cancel-button|searchfield-decoration|searchfield-results-button|searchfield-results-decoration|slider-horizontal|slider-vertical|sliderthumb-horizontal|sliderthumb-vertical|square-button|textarea|textfield|-apple-pay-button","-webkit-border-before":"<'border-width'>||<'border-style'>||<color>","-webkit-border-before-color":"<color>","-webkit-border-before-style":"<'border-style'>","-webkit-border-before-width":"<'border-width'>","-webkit-box-reflect":"[above|below|right|left]? <length>? <image>?","-webkit-line-clamp":"none|<integer>","-webkit-mask":"[<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||[<box>|border|padding|content|text]||[<box>|border|padding|content]]#","-webkit-mask-attachment":"<attachment>#","-webkit-mask-clip":"[<box>|border|padding|content|text]#","-webkit-mask-composite":"<composite-style>#","-webkit-mask-image":"<mask-reference>#","-webkit-mask-origin":"[<box>|border|padding|content]#","-webkit-mask-position":"<position>#","-webkit-mask-position-x":"[<length-percentage>|left|center|right]#","-webkit-mask-position-y":"[<length-percentage>|top|center|bottom]#","-webkit-mask-repeat":"<repeat-style>#","-webkit-mask-repeat-x":"repeat|no-repeat|space|round","-webkit-mask-repeat-y":"repeat|no-repeat|space|round","-webkit-mask-size":"<bg-size>#","-webkit-overflow-scrolling":"auto|touch","-webkit-tap-highlight-color":"<color>","-webkit-text-fill-color":"<color>","-webkit-text-stroke":"<length>||<color>","-webkit-text-stroke-color":"<color>","-webkit-text-stroke-width":"<length>","-webkit-touch-callout":"default|none","-webkit-user-modify":"read-only|read-write|read-write-plaintext-only","accent-color":"auto|<color>","align-content":"normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>","align-items":"normal|stretch|<baseline-position>|[<overflow-position>? <self-position>]","align-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? <self-position>","align-tracks":"[normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>]#",all:"initial|inherit|unset|revert|revert-layer",animation:"<single-animation>#","animation-composition":"<single-animation-composition>#","animation-delay":"<time>#","animation-direction":"<single-animation-direction>#","animation-duration":"<time>#","animation-fill-mode":"<single-animation-fill-mode>#","animation-iteration-count":"<single-animation-iteration-count>#","animation-name":"[none|<keyframes-name>]#","animation-play-state":"<single-animation-play-state>#","animation-timing-function":"<easing-function>#","animation-timeline":"<single-animation-timeline>#",appearance:"none|auto|textfield|menulist-button|<compat-auto>","aspect-ratio":"auto|<ratio>",azimuth:"<angle>|[[left-side|far-left|left|center-left|center|center-right|right|far-right|right-side]||behind]|leftwards|rightwards","backdrop-filter":"none|<filter-function-list>","backface-visibility":"visible|hidden",background:"[<bg-layer> ,]* <final-bg-layer>","background-attachment":"<attachment>#","background-blend-mode":"<blend-mode>#","background-clip":"<bg-clip>#","background-color":"<color>","background-image":"<bg-image>#","background-origin":"<box>#","background-position":"<bg-position>#","background-position-x":"[center|[[left|right|x-start|x-end]? <length-percentage>?]!]#","background-position-y":"[center|[[top|bottom|y-start|y-end]? <length-percentage>?]!]#","background-repeat":"<repeat-style>#","background-size":"<bg-size>#","block-overflow":"clip|ellipsis|<string>","block-size":"<'width'>",border:"<line-width>||<line-style>||<color>","border-block":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-color":"<'border-top-color'>{1,2}","border-block-style":"<'border-top-style'>","border-block-width":"<'border-top-width'>","border-block-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-end-color":"<'border-top-color'>","border-block-end-style":"<'border-top-style'>","border-block-end-width":"<'border-top-width'>","border-block-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-start-color":"<'border-top-color'>","border-block-start-style":"<'border-top-style'>","border-block-start-width":"<'border-top-width'>","border-bottom":"<line-width>||<line-style>||<color>","border-bottom-color":"<'border-top-color'>","border-bottom-left-radius":"<length-percentage>{1,2}","border-bottom-right-radius":"<length-percentage>{1,2}","border-bottom-style":"<line-style>","border-bottom-width":"<line-width>","border-collapse":"collapse|separate","border-color":"<color>{1,4}","border-end-end-radius":"<length-percentage>{1,2}","border-end-start-radius":"<length-percentage>{1,2}","border-image":"<'border-image-source'>||<'border-image-slice'> [/ <'border-image-width'>|/ <'border-image-width'>? / <'border-image-outset'>]?||<'border-image-repeat'>","border-image-outset":"[<length>|<number>]{1,4}","border-image-repeat":"[stretch|repeat|round|space]{1,2}","border-image-slice":"<number-percentage>{1,4}&&fill?","border-image-source":"none|<image>","border-image-width":"[<length-percentage>|<number>|auto]{1,4}","border-inline":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-color":"<'border-top-color'>{1,2}","border-inline-style":"<'border-top-style'>","border-inline-width":"<'border-top-width'>","border-inline-end-color":"<'border-top-color'>","border-inline-end-style":"<'border-top-style'>","border-inline-end-width":"<'border-top-width'>","border-inline-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-start-color":"<'border-top-color'>","border-inline-start-style":"<'border-top-style'>","border-inline-start-width":"<'border-top-width'>","border-left":"<line-width>||<line-style>||<color>","border-left-color":"<color>","border-left-style":"<line-style>","border-left-width":"<line-width>","border-radius":"<length-percentage>{1,4} [/ <length-percentage>{1,4}]?","border-right":"<line-width>||<line-style>||<color>","border-right-color":"<color>","border-right-style":"<line-style>","border-right-width":"<line-width>","border-spacing":"<length> <length>?","border-start-end-radius":"<length-percentage>{1,2}","border-start-start-radius":"<length-percentage>{1,2}","border-style":"<line-style>{1,4}","border-top":"<line-width>||<line-style>||<color>","border-top-color":"<color>","border-top-left-radius":"<length-percentage>{1,2}","border-top-right-radius":"<length-percentage>{1,2}","border-top-style":"<line-style>","border-top-width":"<line-width>","border-width":"<line-width>{1,4}",bottom:"<length>|<percentage>|auto","box-align":"start|center|end|baseline|stretch","box-decoration-break":"slice|clone","box-direction":"normal|reverse|inherit","box-flex":"<number>","box-flex-group":"<integer>","box-lines":"single|multiple","box-ordinal-group":"<integer>","box-orient":"horizontal|vertical|inline-axis|block-axis|inherit","box-pack":"start|center|end|justify","box-shadow":"none|<shadow>#","box-sizing":"content-box|border-box","break-after":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-before":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-inside":"auto|avoid|avoid-page|avoid-column|avoid-region","caption-side":"top|bottom|block-start|block-end|inline-start|inline-end",caret:"<'caret-color'>||<'caret-shape'>","caret-color":"auto|<color>","caret-shape":"auto|bar|block|underscore",clear:"none|left|right|both|inline-start|inline-end",clip:"<shape>|auto","clip-path":"<clip-source>|[<basic-shape>||<geometry-box>]|none",color:"<color>","print-color-adjust":"economy|exact","color-scheme":"normal|[light|dark|<custom-ident>]+&&only?","column-count":"<integer>|auto","column-fill":"auto|balance|balance-all","column-gap":"normal|<length-percentage>","column-rule":"<'column-rule-width'>||<'column-rule-style'>||<'column-rule-color'>","column-rule-color":"<color>","column-rule-style":"<'border-style'>","column-rule-width":"<'border-width'>","column-span":"none|all","column-width":"<length>|auto",columns:"<'column-width'>||<'column-count'>",contain:"none|strict|content|[[size||inline-size]||layout||style||paint]","contain-intrinsic-size":"[none|<length>|auto <length>]{1,2}","contain-intrinsic-block-size":"none|<length>|auto <length>","contain-intrinsic-height":"none|<length>|auto <length>","contain-intrinsic-inline-size":"none|<length>|auto <length>","contain-intrinsic-width":"none|<length>|auto <length>",content:"normal|none|[<content-replacement>|<content-list>] [/ [<string>|<counter>]+]?","content-visibility":"visible|auto|hidden","counter-increment":"[<counter-name> <integer>?]+|none","counter-reset":"[<counter-name> <integer>?|<reversed-counter-name> <integer>?]+|none","counter-set":"[<counter-name> <integer>?]+|none",cursor:"[[<url> [<x> <y>]? ,]* [auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing|hand|-webkit-grab|-webkit-grabbing|-webkit-zoom-in|-webkit-zoom-out|-moz-grab|-moz-grabbing|-moz-zoom-in|-moz-zoom-out]]",direction:"ltr|rtl",display:"[<display-outside>||<display-inside>]|<display-listitem>|<display-internal>|<display-box>|<display-legacy>|<-non-standard-display>","empty-cells":"show|hide",filter:"none|<filter-function-list>|<-ms-filter-function-list>",flex:"none|[<'flex-grow'> <'flex-shrink'>?||<'flex-basis'>]","flex-basis":"content|<'width'>","flex-direction":"row|row-reverse|column|column-reverse","flex-flow":"<'flex-direction'>||<'flex-wrap'>","flex-grow":"<number>","flex-shrink":"<number>","flex-wrap":"nowrap|wrap|wrap-reverse",float:"left|right|none|inline-start|inline-end",font:"[[<'font-style'>||<font-variant-css21>||<'font-weight'>||<'font-stretch'>]? <'font-size'> [/ <'line-height'>]? <'font-family'>]|caption|icon|menu|message-box|small-caption|status-bar","font-family":"[<family-name>|<generic-family>]#","font-feature-settings":"normal|<feature-tag-value>#","font-kerning":"auto|normal|none","font-language-override":"normal|<string>","font-optical-sizing":"auto|none","font-variation-settings":"normal|[<string> <number>]#","font-size":"<absolute-size>|<relative-size>|<length-percentage>","font-size-adjust":"none|[ex-height|cap-height|ch-width|ic-width|ic-height]? [from-font|<number>]","font-smooth":"auto|never|always|<absolute-size>|<length>","font-stretch":"<font-stretch-absolute>","font-style":"normal|italic|oblique <angle>?","font-synthesis":"none|[weight||style||small-caps]","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-alternates":"normal|[stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )]","font-variant-caps":"normal|small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","font-variant-east-asian":"normal|[<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-ligatures":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>]","font-variant-numeric":"normal|[<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero]","font-variant-position":"normal|sub|super","font-weight":"<font-weight-absolute>|bolder|lighter","forced-color-adjust":"auto|none",gap:"<'row-gap'> <'column-gap'>?",grid:"<'grid-template'>|<'grid-template-rows'> / [auto-flow&&dense?] <'grid-auto-columns'>?|[auto-flow&&dense?] <'grid-auto-rows'>? / <'grid-template-columns'>","grid-area":"<grid-line> [/ <grid-line>]{0,3}","grid-auto-columns":"<track-size>+","grid-auto-flow":"[row|column]||dense","grid-auto-rows":"<track-size>+","grid-column":"<grid-line> [/ <grid-line>]?","grid-column-end":"<grid-line>","grid-column-gap":"<length-percentage>","grid-column-start":"<grid-line>","grid-gap":"<'grid-row-gap'> <'grid-column-gap'>?","grid-row":"<grid-line> [/ <grid-line>]?","grid-row-end":"<grid-line>","grid-row-gap":"<length-percentage>","grid-row-start":"<grid-line>","grid-template":"none|[<'grid-template-rows'> / <'grid-template-columns'>]|[<line-names>? <string> <track-size>? <line-names>?]+ [/ <explicit-track-list>]?","grid-template-areas":"none|<string>+","grid-template-columns":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","grid-template-rows":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","hanging-punctuation":"none|[first||[force-end|allow-end]||last]",height:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","hyphenate-character":"auto|<string>",hyphens:"none|manual|auto","image-orientation":"from-image|<angle>|[<angle>? flip]","image-rendering":"auto|crisp-edges|pixelated|optimizeSpeed|optimizeQuality|<-non-standard-image-rendering>","image-resolution":"[from-image||<resolution>]&&snap?","ime-mode":"auto|normal|active|inactive|disabled","initial-letter":"normal|[<number> <integer>?]","initial-letter-align":"[auto|alphabetic|hanging|ideographic]","inline-size":"<'width'>","input-security":"auto|none",inset:"<'top'>{1,4}","inset-block":"<'top'>{1,2}","inset-block-end":"<'top'>","inset-block-start":"<'top'>","inset-inline":"<'top'>{1,2}","inset-inline-end":"<'top'>","inset-inline-start":"<'top'>",isolation:"auto|isolate","justify-content":"normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]","justify-items":"normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|legacy|legacy&&[left|right|center]","justify-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]","justify-tracks":"[normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]]#",left:"<length>|<percentage>|auto","letter-spacing":"normal|<length-percentage>","line-break":"auto|loose|normal|strict|anywhere","line-clamp":"none|<integer>","line-height":"normal|<number>|<length>|<percentage>","line-height-step":"<length>","list-style":"<'list-style-type'>||<'list-style-position'>||<'list-style-image'>","list-style-image":"<image>|none","list-style-position":"inside|outside","list-style-type":"<counter-style>|<string>|none",margin:"[<length>|<percentage>|auto]{1,4}","margin-block":"<'margin-left'>{1,2}","margin-block-end":"<'margin-left'>","margin-block-start":"<'margin-left'>","margin-bottom":"<length>|<percentage>|auto","margin-inline":"<'margin-left'>{1,2}","margin-inline-end":"<'margin-left'>","margin-inline-start":"<'margin-left'>","margin-left":"<length>|<percentage>|auto","margin-right":"<length>|<percentage>|auto","margin-top":"<length>|<percentage>|auto","margin-trim":"none|in-flow|all",mask:"<mask-layer>#","mask-border":"<'mask-border-source'>||<'mask-border-slice'> [/ <'mask-border-width'>? [/ <'mask-border-outset'>]?]?||<'mask-border-repeat'>||<'mask-border-mode'>","mask-border-mode":"luminance|alpha","mask-border-outset":"[<length>|<number>]{1,4}","mask-border-repeat":"[stretch|repeat|round|space]{1,2}","mask-border-slice":"<number-percentage>{1,4} fill?","mask-border-source":"none|<image>","mask-border-width":"[<length-percentage>|<number>|auto]{1,4}","mask-clip":"[<geometry-box>|no-clip]#","mask-composite":"<compositing-operator>#","mask-image":"<mask-reference>#","mask-mode":"<masking-mode>#","mask-origin":"<geometry-box>#","mask-position":"<position>#","mask-repeat":"<repeat-style>#","mask-size":"<bg-size>#","mask-type":"luminance|alpha","masonry-auto-flow":"[pack|next]||[definite-first|ordered]","math-depth":"auto-add|add( <integer> )|<integer>","math-shift":"normal|compact","math-style":"normal|compact","max-block-size":"<'max-width'>","max-height":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","max-inline-size":"<'max-width'>","max-lines":"none|<integer>","max-width":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","min-block-size":"<'min-width'>","min-height":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","min-inline-size":"<'min-width'>","min-width":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","mix-blend-mode":"<blend-mode>|plus-lighter","object-fit":"fill|contain|cover|none|scale-down","object-position":"<position>",offset:"[<'offset-position'>? [<'offset-path'> [<'offset-distance'>||<'offset-rotate'>]?]?]! [/ <'offset-anchor'>]?","offset-anchor":"auto|<position>","offset-distance":"<length-percentage>","offset-path":"none|ray( [<angle>&&<size>&&contain?] )|<path()>|<url>|[<basic-shape>||<geometry-box>]","offset-position":"auto|<position>","offset-rotate":"[auto|reverse]||<angle>",opacity:"<alpha-value>",order:"<integer>",orphans:"<integer>",outline:"[<'outline-color'>||<'outline-style'>||<'outline-width'>]","outline-color":"<color>|invert","outline-offset":"<length>","outline-style":"auto|<'border-style'>","outline-width":"<line-width>",overflow:"[visible|hidden|clip|scroll|auto]{1,2}|<-non-standard-overflow>","overflow-anchor":"auto|none","overflow-block":"visible|hidden|clip|scroll|auto","overflow-clip-box":"padding-box|content-box","overflow-clip-margin":"<visual-box>||<length [0,∞]>","overflow-inline":"visible|hidden|clip|scroll|auto","overflow-wrap":"normal|break-word|anywhere","overflow-x":"visible|hidden|clip|scroll|auto","overflow-y":"visible|hidden|clip|scroll|auto","overscroll-behavior":"[contain|none|auto]{1,2}","overscroll-behavior-block":"contain|none|auto","overscroll-behavior-inline":"contain|none|auto","overscroll-behavior-x":"contain|none|auto","overscroll-behavior-y":"contain|none|auto",padding:"[<length>|<percentage>]{1,4}","padding-block":"<'padding-left'>{1,2}","padding-block-end":"<'padding-left'>","padding-block-start":"<'padding-left'>","padding-bottom":"<length>|<percentage>","padding-inline":"<'padding-left'>{1,2}","padding-inline-end":"<'padding-left'>","padding-inline-start":"<'padding-left'>","padding-left":"<length>|<percentage>","padding-right":"<length>|<percentage>","padding-top":"<length>|<percentage>","page-break-after":"auto|always|avoid|left|right|recto|verso","page-break-before":"auto|always|avoid|left|right|recto|verso","page-break-inside":"auto|avoid","paint-order":"normal|[fill||stroke||markers]",perspective:"none|<length>","perspective-origin":"<position>","place-content":"<'align-content'> <'justify-content'>?","place-items":"<'align-items'> <'justify-items'>?","place-self":"<'align-self'> <'justify-self'>?","pointer-events":"auto|none|visiblePainted|visibleFill|visibleStroke|visible|painted|fill|stroke|all|inherit",position:"static|relative|absolute|sticky|fixed|-webkit-sticky",quotes:"none|auto|[<string> <string>]+",resize:"none|both|horizontal|vertical|block|inline",right:"<length>|<percentage>|auto",rotate:"none|<angle>|[x|y|z|<number>{3}]&&<angle>","row-gap":"normal|<length-percentage>","ruby-align":"start|center|space-between|space-around","ruby-merge":"separate|collapse|auto","ruby-position":"[alternate||[over|under]]|inter-character",scale:"none|<number>{1,3}","scrollbar-color":"auto|<color>{2}","scrollbar-gutter":"auto|stable&&both-edges?","scrollbar-width":"auto|thin|none","scroll-behavior":"auto|smooth","scroll-margin":"<length>{1,4}","scroll-margin-block":"<length>{1,2}","scroll-margin-block-start":"<length>","scroll-margin-block-end":"<length>","scroll-margin-bottom":"<length>","scroll-margin-inline":"<length>{1,2}","scroll-margin-inline-start":"<length>","scroll-margin-inline-end":"<length>","scroll-margin-left":"<length>","scroll-margin-right":"<length>","scroll-margin-top":"<length>","scroll-padding":"[auto|<length-percentage>]{1,4}","scroll-padding-block":"[auto|<length-percentage>]{1,2}","scroll-padding-block-start":"auto|<length-percentage>","scroll-padding-block-end":"auto|<length-percentage>","scroll-padding-bottom":"auto|<length-percentage>","scroll-padding-inline":"[auto|<length-percentage>]{1,2}","scroll-padding-inline-start":"auto|<length-percentage>","scroll-padding-inline-end":"auto|<length-percentage>","scroll-padding-left":"auto|<length-percentage>","scroll-padding-right":"auto|<length-percentage>","scroll-padding-top":"auto|<length-percentage>","scroll-snap-align":"[none|start|end|center]{1,2}","scroll-snap-coordinate":"none|<position>#","scroll-snap-destination":"<position>","scroll-snap-points-x":"none|repeat( <length-percentage> )","scroll-snap-points-y":"none|repeat( <length-percentage> )","scroll-snap-stop":"normal|always","scroll-snap-type":"none|[x|y|block|inline|both] [mandatory|proximity]?","scroll-snap-type-x":"none|mandatory|proximity","scroll-snap-type-y":"none|mandatory|proximity","scroll-timeline":"<scroll-timeline-name>||<scroll-timeline-axis>","scroll-timeline-axis":"block|inline|vertical|horizontal","scroll-timeline-name":"none|<custom-ident>","shape-image-threshold":"<alpha-value>","shape-margin":"<length-percentage>","shape-outside":"none|[<shape-box>||<basic-shape>]|<image>","tab-size":"<integer>|<length>","table-layout":"auto|fixed","text-align":"start|end|left|right|center|justify|match-parent","text-align-last":"auto|start|end|left|right|center|justify","text-combine-upright":"none|all|[digits <integer>?]","text-decoration":"<'text-decoration-line'>||<'text-decoration-style'>||<'text-decoration-color'>||<'text-decoration-thickness'>","text-decoration-color":"<color>","text-decoration-line":"none|[underline||overline||line-through||blink]|spelling-error|grammar-error","text-decoration-skip":"none|[objects||[spaces|[leading-spaces||trailing-spaces]]||edges||box-decoration]","text-decoration-skip-ink":"auto|all|none","text-decoration-style":"solid|double|dotted|dashed|wavy","text-decoration-thickness":"auto|from-font|<length>|<percentage>","text-emphasis":"<'text-emphasis-style'>||<'text-emphasis-color'>","text-emphasis-color":"<color>","text-emphasis-position":"[over|under]&&[right|left]","text-emphasis-style":"none|[[filled|open]||[dot|circle|double-circle|triangle|sesame]]|<string>","text-indent":"<length-percentage>&&hanging?&&each-line?","text-justify":"auto|inter-character|inter-word|none","text-orientation":"mixed|upright|sideways","text-overflow":"[clip|ellipsis|<string>]{1,2}","text-rendering":"auto|optimizeSpeed|optimizeLegibility|geometricPrecision","text-shadow":"none|<shadow-t>#","text-size-adjust":"none|auto|<percentage>","text-transform":"none|capitalize|uppercase|lowercase|full-width|full-size-kana","text-underline-offset":"auto|<length>|<percentage>","text-underline-position":"auto|from-font|[under||[left|right]]",top:"<length>|<percentage>|auto","touch-action":"auto|none|[[pan-x|pan-left|pan-right]||[pan-y|pan-up|pan-down]||pinch-zoom]|manipulation",transform:"none|<transform-list>","transform-box":"content-box|border-box|fill-box|stroke-box|view-box","transform-origin":"[<length-percentage>|left|center|right|top|bottom]|[[<length-percentage>|left|center|right]&&[<length-percentage>|top|center|bottom]] <length>?","transform-style":"flat|preserve-3d",transition:"<single-transition>#","transition-delay":"<time>#","transition-duration":"<time>#","transition-property":"none|<single-transition-property>#","transition-timing-function":"<easing-function>#",translate:"none|<length-percentage> [<length-percentage> <length>?]?","unicode-bidi":"normal|embed|isolate|bidi-override|isolate-override|plaintext|-moz-isolate|-moz-isolate-override|-moz-plaintext|-webkit-isolate|-webkit-isolate-override|-webkit-plaintext","user-select":"auto|text|none|contain|all","vertical-align":"baseline|sub|super|text-top|text-bottom|middle|top|bottom|<percentage>|<length>",visibility:"visible|hidden|collapse","white-space":"normal|pre|nowrap|pre-wrap|pre-line|break-spaces",widows:"<integer>",width:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|fill|stretch|intrinsic|-moz-max-content|-webkit-max-content|-moz-fit-content|-webkit-fit-content","will-change":"auto|<animateable-feature>#","word-break":"normal|break-all|keep-all|break-word","word-spacing":"normal|<length>","word-wrap":"normal|break-word","writing-mode":"horizontal-tb|vertical-rl|vertical-lr|sideways-rl|sideways-lr|<svg-writing-mode>","z-index":"auto|<integer>",zoom:"normal|reset|<number>|<percentage>","-moz-background-clip":"padding|border","-moz-border-radius-bottomleft":"<'border-bottom-left-radius'>","-moz-border-radius-bottomright":"<'border-bottom-right-radius'>","-moz-border-radius-topleft":"<'border-top-left-radius'>","-moz-border-radius-topright":"<'border-bottom-right-radius'>","-moz-control-character-visibility":"visible|hidden","-moz-osx-font-smoothing":"auto|grayscale","-moz-user-select":"none|text|all|-moz-none","-ms-flex-align":"start|end|center|baseline|stretch","-ms-flex-item-align":"auto|start|end|center|baseline|stretch","-ms-flex-line-pack":"start|end|center|justify|distribute|stretch","-ms-flex-negative":"<'flex-shrink'>","-ms-flex-pack":"start|end|center|justify|distribute","-ms-flex-order":"<integer>","-ms-flex-positive":"<'flex-grow'>","-ms-flex-preferred-size":"<'flex-basis'>","-ms-interpolation-mode":"nearest-neighbor|bicubic","-ms-grid-column-align":"start|end|center|stretch","-ms-grid-row-align":"start|end|center|stretch","-ms-hyphenate-limit-last":"none|always|column|page|spread","-webkit-background-clip":"[<box>|border|padding|content|text]#","-webkit-column-break-after":"always|auto|avoid","-webkit-column-break-before":"always|auto|avoid","-webkit-column-break-inside":"always|auto|avoid","-webkit-font-smoothing":"auto|none|antialiased|subpixel-antialiased","-webkit-mask-box-image":"[<url>|<gradient>|none] [<length-percentage>{4} <-webkit-mask-box-repeat>{2}]?","-webkit-print-color-adjust":"economy|exact","-webkit-text-security":"none|circle|disc|square","-webkit-user-drag":"none|element|auto","-webkit-user-select":"auto|none|text|all","alignment-baseline":"auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical","baseline-shift":"baseline|sub|super|<svg-length>",behavior:"<url>+","clip-rule":"nonzero|evenodd",cue:"<'cue-before'> <'cue-after'>?","cue-after":"<url> <decibel>?|none","cue-before":"<url> <decibel>?|none","dominant-baseline":"auto|use-script|no-change|reset-size|ideographic|alphabetic|hanging|mathematical|central|middle|text-after-edge|text-before-edge",fill:"<paint>","fill-opacity":"<number-zero-one>","fill-rule":"nonzero|evenodd","glyph-orientation-horizontal":"<angle>","glyph-orientation-vertical":"<angle>",kerning:"auto|<svg-length>",marker:"none|<url>","marker-end":"none|<url>","marker-mid":"none|<url>","marker-start":"none|<url>",pause:"<'pause-before'> <'pause-after'>?","pause-after":"<time>|none|x-weak|weak|medium|strong|x-strong","pause-before":"<time>|none|x-weak|weak|medium|strong|x-strong",rest:"<'rest-before'> <'rest-after'>?","rest-after":"<time>|none|x-weak|weak|medium|strong|x-strong","rest-before":"<time>|none|x-weak|weak|medium|strong|x-strong","shape-rendering":"auto|optimizeSpeed|crispEdges|geometricPrecision",src:"[<url> [format( <string># )]?|local( <family-name> )]#",speak:"auto|none|normal","speak-as":"normal|spell-out||digits||[literal-punctuation|no-punctuation]",stroke:"<paint>","stroke-dasharray":"none|[<svg-length>+]#","stroke-dashoffset":"<svg-length>","stroke-linecap":"butt|round|square","stroke-linejoin":"miter|round|bevel","stroke-miterlimit":"<number-one-or-greater>","stroke-opacity":"<number-zero-one>","stroke-width":"<svg-length>","text-anchor":"start|middle|end","unicode-range":"<urange>#","voice-balance":"<number>|left|center|right|leftwards|rightwards","voice-duration":"auto|<time>","voice-family":"[[<family-name>|<generic-voice>] ,]* [<family-name>|<generic-voice>]|preserve","voice-pitch":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-range":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-rate":"[normal|x-slow|slow|medium|fast|x-fast]||<percentage>","voice-stress":"normal|strong|moderate|none|reduced","voice-volume":"silent|[[x-soft|soft|medium|loud|x-loud]||<decibel>]"},atrules:{charset:{prelude:"<string>",descriptors:null},"counter-style":{prelude:"<counter-style-name>",descriptors:{"additive-symbols":"[<integer>&&<symbol>]#",fallback:"<counter-style-name>",negative:"<symbol> <symbol>?",pad:"<integer>&&<symbol>",prefix:"<symbol>",range:"[[<integer>|infinite]{2}]#|auto","speak-as":"auto|bullets|numbers|words|spell-out|<counter-style-name>",suffix:"<symbol>",symbols:"<symbol>+",system:"cyclic|numeric|alphabetic|symbolic|additive|[fixed <integer>?]|[extends <counter-style-name>]"}},document:{prelude:"[<url>|url-prefix( <string> )|domain( <string> )|media-document( <string> )|regexp( <string> )]#",descriptors:null},"font-face":{prelude:null,descriptors:{"ascent-override":"normal|<percentage>","descent-override":"normal|<percentage>","font-display":"[auto|block|swap|fallback|optional]","font-family":"<family-name>","font-feature-settings":"normal|<feature-tag-value>#","font-variation-settings":"normal|[<string> <number>]#","font-stretch":"<font-stretch-absolute>{1,2}","font-style":"normal|italic|oblique <angle>{0,2}","font-weight":"<font-weight-absolute>{1,2}","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","line-gap-override":"normal|<percentage>","size-adjust":"<percentage>",src:"[<url> [format( <string># )]?|local( <family-name> )]#","unicode-range":"<urange>#"}},"font-feature-values":{prelude:"<family-name>#",descriptors:null},import:{prelude:"[<string>|<url>] [layer|layer( <layer-name> )]? [supports( [<supports-condition>|<declaration>] )]? <media-query-list>?",descriptors:null},keyframes:{prelude:"<keyframes-name>",descriptors:null},layer:{prelude:"[<layer-name>#|<layer-name>?]",descriptors:null},media:{prelude:"<media-query-list>",descriptors:null},namespace:{prelude:"<namespace-prefix>? [<string>|<url>]",descriptors:null},page:{prelude:"<page-selector-list>",descriptors:{bleed:"auto|<length>",marks:"none|[crop||cross]",size:"<length>{1,2}|auto|[<page-size>||[portrait|landscape]]"}},property:{prelude:"<custom-property-name>",descriptors:{syntax:"<string>",inherits:"true|false","initial-value":"<string>"}},"scroll-timeline":{prelude:"<timeline-name>",descriptors:null},supports:{prelude:"<supports-condition>",descriptors:null},viewport:{prelude:null,descriptors:{height:"<viewport-length>{1,2}","max-height":"<viewport-length>","max-width":"<viewport-length>","max-zoom":"auto|<number>|<percentage>","min-height":"<viewport-length>","min-width":"<viewport-length>","min-zoom":"auto|<number>|<percentage>",orientation:"auto|portrait|landscape","user-zoom":"zoom|fixed","viewport-fit":"auto|contain|cover",width:"<viewport-length>{1,2}",zoom:"auto|<number>|<percentage>"}},nest:{prelude:"<complex-selector-list>",descriptors:null}}};var node$1={};var AnPlusB$5={};const types$1x=types$1I;const charCodeDefinitions$i=charCodeDefinitions$p;const PLUSSIGN$f=43;const HYPHENMINUS$9=45;const N$5=110;const DISALLOW_SIGN$2=true;const ALLOW_SIGN$2=false;function checkInteger$2(offset,disallowSign){let pos=this.tokenStart+offset;const code=this.charCodeAt(pos);if(code===PLUSSIGN$f||code===HYPHENMINUS$9){if(disallowSign){this.error("Number sign is not allowed")}pos++}for(;pos<this.tokenEnd;pos++){if(!charCodeDefinitions$i.isDigit(this.charCodeAt(pos))){this.error("Integer is expected",pos)}}}function checkTokenIsInteger$1(disallowSign){return checkInteger$2.call(this,0,disallowSign)}function expectCharCode$1(offset,code){if(!this.cmpChar(this.tokenStart+offset,code)){let msg="";switch(code){case N$5:msg="N is expected";break;case HYPHENMINUS$9:msg="HyphenMinus is expected";break}this.error(msg,this.tokenStart+offset)}}function consumeB$2(){let offset=0;let sign=0;let type=this.tokenType;while(type===types$1x.WhiteSpace||type===types$1x.Comment){type=this.lookupType(++offset)}if(type!==types$1x.Number){if(this.isDelim(PLUSSIGN$f,offset)||this.isDelim(HYPHENMINUS$9,offset)){sign=this.isDelim(PLUSSIGN$f,offset)?PLUSSIGN$f:HYPHENMINUS$9;do{type=this.lookupType(++offset)}while(type===types$1x.WhiteSpace||type===types$1x.Comment);if(type!==types$1x.Number){this.skip(offset);checkTokenIsInteger$1.call(this,DISALLOW_SIGN$2)}}else{return null}}if(offset>0){this.skip(offset)}if(sign===0){type=this.charCodeAt(this.tokenStart);if(type!==PLUSSIGN$f&&type!==HYPHENMINUS$9){this.error("Number sign is expected")}}checkTokenIsInteger$1.call(this,sign!==0);return sign===HYPHENMINUS$9?"-"+this.consume(types$1x.Number):this.consume(types$1x.Number)}const name$1g="AnPlusB";const structure$1i={a:[String,null],b:[String,null]};function parse$1q(){const start=this.tokenStart;let a=null;let b=null;if(this.tokenType===types$1x.Number){checkTokenIsInteger$1.call(this,ALLOW_SIGN$2);b=this.consume(types$1x.Number)}else if(this.tokenType===types$1x.Ident&&this.cmpChar(this.tokenStart,HYPHENMINUS$9)){a="-1";expectCharCode$1.call(this,1,N$5);switch(this.tokenEnd-this.tokenStart){case 2:this.next();b=consumeB$2.call(this);break;case 3:expectCharCode$1.call(this,2,HYPHENMINUS$9);this.next();this.skipSC();checkTokenIsInteger$1.call(this,DISALLOW_SIGN$2);b="-"+this.consume(types$1x.Number);break;default:expectCharCode$1.call(this,2,HYPHENMINUS$9);checkInteger$2.call(this,3,DISALLOW_SIGN$2);this.next();b=this.substrToCursor(start+2)}}else if(this.tokenType===types$1x.Ident||this.isDelim(PLUSSIGN$f)&&this.lookupType(1)===types$1x.Ident){let sign=0;a="1";if(this.isDelim(PLUSSIGN$f)){sign=1;this.next()}expectCharCode$1.call(this,0,N$5);switch(this.tokenEnd-this.tokenStart){case 1:this.next();b=consumeB$2.call(this);break;case 2:expectCharCode$1.call(this,1,HYPHENMINUS$9);this.next();this.skipSC();checkTokenIsInteger$1.call(this,DISALLOW_SIGN$2);b="-"+this.consume(types$1x.Number);break;default:expectCharCode$1.call(this,1,HYPHENMINUS$9);checkInteger$2.call(this,2,DISALLOW_SIGN$2);this.next();b=this.substrToCursor(start+sign+1)}}else if(this.tokenType===types$1x.Dimension){const code=this.charCodeAt(this.tokenStart);const sign=code===PLUSSIGN$f||code===HYPHENMINUS$9;let i=this.tokenStart+sign;for(;i<this.tokenEnd;i++){if(!charCodeDefinitions$i.isDigit(this.charCodeAt(i))){break}}if(i===this.tokenStart+sign){this.error("Integer is expected",this.tokenStart+sign)}expectCharCode$1.call(this,i-this.tokenStart,N$5);a=this.substring(start,i);if(i+1===this.tokenEnd){this.next();b=consumeB$2.call(this)}else{expectCharCode$1.call(this,i-this.tokenStart+1,HYPHENMINUS$9);if(i+2===this.tokenEnd){this.next();this.skipSC();checkTokenIsInteger$1.call(this,DISALLOW_SIGN$2);b="-"+this.consume(types$1x.Number)}else{checkInteger$2.call(this,i-this.tokenStart+2,DISALLOW_SIGN$2);this.next();b=this.substrToCursor(i+1)}}}else{this.error()}if(a!==null&&a.charCodeAt(0)===PLUSSIGN$f){a=a.substr(1)}if(b!==null&&b.charCodeAt(0)===PLUSSIGN$f){b=b.substr(1)}return{type:"AnPlusB",loc:this.getLocation(start,this.tokenStart),a:a,b:b}}function generate$1q(node){if(node.a){const a=node.a==="+1"&&"n"||node.a==="1"&&"n"||node.a==="-1"&&"-n"||node.a+"n";if(node.b){const b=node.b[0]==="-"||node.b[0]==="+"?node.b:"+"+node.b;this.tokenize(a+b)}else{this.tokenize(a)}}else{this.tokenize(node.b)}}AnPlusB$5.generate=generate$1q;AnPlusB$5.name=name$1g;AnPlusB$5.parse=parse$1q;AnPlusB$5.structure=structure$1i;var Atrule$9={};const types$1w=types$1I;function consumeRaw$b(startToken){return this.Raw(startToken,this.consumeUntilLeftCurlyBracketOrSemicolon,true)}function isDeclarationBlockAtrule$1(){for(let offset=1,type;type=this.lookupType(offset);offset++){if(type===types$1w.RightCurlyBracket){return true}if(type===types$1w.LeftCurlyBracket||type===types$1w.AtKeyword){return false}}return false}const name$1f="Atrule";const walkContext$j="atrule";const structure$1h={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function parse$1p(isDeclaration=false){const start=this.tokenStart;let name;let nameLowerCase;let prelude=null;let block=null;this.eat(types$1w.AtKeyword);name=this.substrToCursor(start+1);nameLowerCase=name.toLowerCase();this.skipSC();if(this.eof===false&&this.tokenType!==types$1w.LeftCurlyBracket&&this.tokenType!==types$1w.Semicolon){if(this.parseAtrulePrelude){prelude=this.parseWithFallback(this.AtrulePrelude.bind(this,name,isDeclaration),consumeRaw$b)}else{prelude=consumeRaw$b.call(this,this.tokenIndex)}this.skipSC()}switch(this.tokenType){case types$1w.Semicolon:this.next();break;case types$1w.LeftCurlyBracket:if(hasOwnProperty.call(this.atrule,nameLowerCase)&&typeof this.atrule[nameLowerCase].block==="function"){block=this.atrule[nameLowerCase].block.call(this,isDeclaration)}else{block=this.Block(isDeclarationBlockAtrule$1.call(this))}break}return{type:"Atrule",loc:this.getLocation(start,this.tokenStart),name:name,prelude:prelude,block:block}}function generate$1p(node){this.token(types$1w.AtKeyword,"@"+node.name);if(node.prelude!==null){this.node(node.prelude)}if(node.block){this.node(node.block)}else{this.token(types$1w.Semicolon,";")}}Atrule$9.generate=generate$1p;Atrule$9.name=name$1f;Atrule$9.parse=parse$1p;Atrule$9.structure=structure$1h;Atrule$9.walkContext=walkContext$j;var AtrulePrelude$5={};const types$1v=types$1I;const name$1e="AtrulePrelude";const walkContext$i="atrulePrelude";const structure$1g={children:[[]]};function parse$1o(name){let children=null;if(name!==null){name=name.toLowerCase()}this.skipSC();if(hasOwnProperty.call(this.atrule,name)&&typeof this.atrule[name].prelude==="function"){children=this.atrule[name].prelude.call(this)}else{children=this.readSequence(this.scope.AtrulePrelude)}this.skipSC();if(this.eof!==true&&this.tokenType!==types$1v.LeftCurlyBracket&&this.tokenType!==types$1v.Semicolon){this.error("Semicolon or block is expected")}return{type:"AtrulePrelude",loc:this.getLocationFromList(children),children:children}}function generate$1o(node){this.children(node)}AtrulePrelude$5.generate=generate$1o;AtrulePrelude$5.name=name$1e;AtrulePrelude$5.parse=parse$1o;AtrulePrelude$5.structure=structure$1g;AtrulePrelude$5.walkContext=walkContext$i;var AttributeSelector$7={};const types$1u=types$1I;const DOLLARSIGN$3=36;const ASTERISK$c=42;const EQUALSSIGN$1=61;const CIRCUMFLEXACCENT$1=94;const VERTICALLINE$6=124;const TILDE$5=126;function getAttributeName$1(){if(this.eof){this.error("Unexpected end of input")}const start=this.tokenStart;let expectIdent=false;if(this.isDelim(ASTERISK$c)){expectIdent=true;this.next()}else if(!this.isDelim(VERTICALLINE$6)){this.eat(types$1u.Ident)}if(this.isDelim(VERTICALLINE$6)){if(this.charCodeAt(this.tokenStart+1)!==EQUALSSIGN$1){this.next();this.eat(types$1u.Ident)}else if(expectIdent){this.error("Identifier is expected",this.tokenEnd)}}else if(expectIdent){this.error("Vertical line is expected")}return{type:"Identifier",loc:this.getLocation(start,this.tokenStart),name:this.substrToCursor(start)}}function getOperator$1(){const start=this.tokenStart;const code=this.charCodeAt(start);if(code!==EQUALSSIGN$1&&code!==TILDE$5&&code!==CIRCUMFLEXACCENT$1&&code!==DOLLARSIGN$3&&code!==ASTERISK$c&&code!==VERTICALLINE$6){this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected")}this.next();if(code!==EQUALSSIGN$1){if(!this.isDelim(EQUALSSIGN$1)){this.error("Equal sign is expected")}this.next()}return this.substrToCursor(start)}const name$1d="AttributeSelector";const structure$1f={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function parse$1n(){const start=this.tokenStart;let name;let matcher=null;let value=null;let flags=null;this.eat(types$1u.LeftSquareBracket);this.skipSC();name=getAttributeName$1.call(this);this.skipSC();if(this.tokenType!==types$1u.RightSquareBracket){if(this.tokenType!==types$1u.Ident){matcher=getOperator$1.call(this);this.skipSC();value=this.tokenType===types$1u.String?this.String():this.Identifier();this.skipSC()}if(this.tokenType===types$1u.Ident){flags=this.consume(types$1u.Ident);this.skipSC()}}this.eat(types$1u.RightSquareBracket);return{type:"AttributeSelector",loc:this.getLocation(start,this.tokenStart),name:name,matcher:matcher,value:value,flags:flags}}function generate$1n(node){this.token(types$1u.Delim,"[");this.node(node.name);if(node.matcher!==null){this.tokenize(node.matcher);this.node(node.value)}if(node.flags!==null){this.token(types$1u.Ident,node.flags)}this.token(types$1u.Delim,"]")}AttributeSelector$7.generate=generate$1n;AttributeSelector$7.name=name$1d;AttributeSelector$7.parse=parse$1n;AttributeSelector$7.structure=structure$1f;var Block$5={};const types$1t=types$1I;const AMPERSAND$6=38;function consumeRaw$a(startToken){return this.Raw(startToken,null,true)}function consumeRule$1(){return this.parseWithFallback(this.Rule,consumeRaw$a)}function consumeRawDeclaration$1(startToken){return this.Raw(startToken,this.consumeUntilSemicolonIncluded,true)}function consumeDeclaration$1(){if(this.tokenType===types$1t.Semicolon){return consumeRawDeclaration$1.call(this,this.tokenIndex)}const node=this.parseWithFallback(this.Declaration,consumeRawDeclaration$1);if(this.tokenType===types$1t.Semicolon){this.next()}return node}const name$1c="Block";const walkContext$h="block";const structure$1e={children:[["Atrule","Rule","Declaration"]]};function parse$1m(isStyleBlock){const consumer=isStyleBlock?consumeDeclaration$1:consumeRule$1;const start=this.tokenStart;let children=this.createList();this.eat(types$1t.LeftCurlyBracket);scan:while(!this.eof){switch(this.tokenType){case types$1t.RightCurlyBracket:break scan;case types$1t.WhiteSpace:case types$1t.Comment:this.next();break;case types$1t.AtKeyword:children.push(this.parseWithFallback(this.Atrule.bind(this,isStyleBlock),consumeRaw$a));break;default:if(isStyleBlock&&this.isDelim(AMPERSAND$6)){children.push(consumeRule$1.call(this))}else{children.push(consumer.call(this))}}}if(!this.eof){this.eat(types$1t.RightCurlyBracket)}return{type:"Block",loc:this.getLocation(start,this.tokenStart),children:children}}function generate$1m(node){this.token(types$1t.LeftCurlyBracket,"{");this.children(node,(prev=>{if(prev.type==="Declaration"){this.token(types$1t.Semicolon,";")}}));this.token(types$1t.RightCurlyBracket,"}")}Block$5.generate=generate$1m;Block$5.name=name$1c;Block$5.parse=parse$1m;Block$5.structure=structure$1e;Block$5.walkContext=walkContext$h;var Brackets$5={};const types$1s=types$1I;const name$1b="Brackets";const structure$1d={children:[[]]};function parse$1l(readSequence,recognizer){const start=this.tokenStart;let children=null;this.eat(types$1s.LeftSquareBracket);children=readSequence.call(this,recognizer);if(!this.eof){this.eat(types$1s.RightSquareBracket)}return{type:"Brackets",loc:this.getLocation(start,this.tokenStart),children:children}}function generate$1l(node){this.token(types$1s.Delim,"[");this.children(node);this.token(types$1s.Delim,"]")}Brackets$5.generate=generate$1l;Brackets$5.name=name$1b;Brackets$5.parse=parse$1l;Brackets$5.structure=structure$1d;var CDC$6={};const types$1r=types$1I;const name$1a="CDC";const structure$1c=[];function parse$1k(){const start=this.tokenStart;this.eat(types$1r.CDC);return{type:"CDC",loc:this.getLocation(start,this.tokenStart)}}function generate$1k(){this.token(types$1r.CDC,"--\x3e")}CDC$6.generate=generate$1k;CDC$6.name=name$1a;CDC$6.parse=parse$1k;CDC$6.structure=structure$1c;var CDO$6={};const types$1q=types$1I;const name$19="CDO";const structure$1b=[];function parse$1j(){const start=this.tokenStart;this.eat(types$1q.CDO);return{type:"CDO",loc:this.getLocation(start,this.tokenStart)}}function generate$1j(){this.token(types$1q.CDO,"\x3c!--")}CDO$6.generate=generate$1j;CDO$6.name=name$19;CDO$6.parse=parse$1j;CDO$6.structure=structure$1b;var ClassSelector$5={};const types$1p=types$1I;const FULLSTOP$5=46;const name$18="ClassSelector";const structure$1a={name:String};function parse$1i(){this.eatDelim(FULLSTOP$5);return{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(types$1p.Ident)}}function generate$1i(node){this.token(types$1p.Delim,".");this.token(types$1p.Ident,node.name)}ClassSelector$5.generate=generate$1i;ClassSelector$5.name=name$18;ClassSelector$5.parse=parse$1i;ClassSelector$5.structure=structure$1a;var Combinator$5={};const types$1o=types$1I;const PLUSSIGN$e=43;const SOLIDUS$b=47;const GREATERTHANSIGN$4=62;const TILDE$4=126;const name$17="Combinator";const structure$19={name:String};function parse$1h(){const start=this.tokenStart;let name;switch(this.tokenType){case types$1o.WhiteSpace:name=" ";break;case types$1o.Delim:switch(this.charCodeAt(this.tokenStart)){case GREATERTHANSIGN$4:case PLUSSIGN$e:case TILDE$4:this.next();break;case SOLIDUS$b:this.next();this.eatIdent("deep");this.eatDelim(SOLIDUS$b);break;default:this.error("Combinator is expected")}name=this.substrToCursor(start);break}return{type:"Combinator",loc:this.getLocation(start,this.tokenStart),name:name}}function generate$1h(node){this.tokenize(node.name)}Combinator$5.generate=generate$1h;Combinator$5.name=name$17;Combinator$5.parse=parse$1h;Combinator$5.structure=structure$19;var Comment$8={};const types$1n=types$1I;const ASTERISK$b=42;const SOLIDUS$a=47;const name$16="Comment";const structure$18={value:String};function parse$1g(){const start=this.tokenStart;let end=this.tokenEnd;this.eat(types$1n.Comment);if(end-start+2>=2&&this.charCodeAt(end-2)===ASTERISK$b&&this.charCodeAt(end-1)===SOLIDUS$a){end-=2}return{type:"Comment",loc:this.getLocation(start,this.tokenStart),value:this.substring(start+2,end)}}function generate$1g(node){this.token(types$1n.Comment,"/*"+node.value+"*/")}Comment$8.generate=generate$1g;Comment$8.name=name$16;Comment$8.parse=parse$1g;Comment$8.structure=structure$18;var Declaration$7={};const names$a=names$c;const types$1m=types$1I;const EXCLAMATIONMARK$5=33;const NUMBERSIGN$7=35;const DOLLARSIGN$2=36;const AMPERSAND$5=38;const ASTERISK$a=42;const PLUSSIGN$d=43;const SOLIDUS$9=47;function consumeValueRaw$1(startToken){return this.Raw(startToken,this.consumeUntilExclamationMarkOrSemicolon,true)}function consumeCustomPropertyRaw$1(startToken){return this.Raw(startToken,this.consumeUntilExclamationMarkOrSemicolon,false)}function consumeValue$1(){const startValueToken=this.tokenIndex;const value=this.Value();if(value.type!=="Raw"&&this.eof===false&&this.tokenType!==types$1m.Semicolon&&this.isDelim(EXCLAMATIONMARK$5)===false&&this.isBalanceEdge(startValueToken)===false){this.error()}return value}const name$15="Declaration";const walkContext$g="declaration";const structure$17={important:[Boolean,String],property:String,value:["Value","Raw"]};function parse$1f(){const start=this.tokenStart;const startToken=this.tokenIndex;const property=readProperty$2.call(this);const customProperty=names$a.isCustomProperty(property);const parseValue=customProperty?this.parseCustomProperty:this.parseValue;const consumeRaw=customProperty?consumeCustomPropertyRaw$1:consumeValueRaw$1;let important=false;let value;this.skipSC();this.eat(types$1m.Colon);const valueStart=this.tokenIndex;if(!customProperty){this.skipSC()}if(parseValue){value=this.parseWithFallback(consumeValue$1,consumeRaw)}else{value=consumeRaw.call(this,this.tokenIndex)}if(customProperty&&value.type==="Value"&&value.children.isEmpty){for(let offset=valueStart-this.tokenIndex;offset<=0;offset++){if(this.lookupType(offset)===types$1m.WhiteSpace){value.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}}if(this.isDelim(EXCLAMATIONMARK$5)){important=getImportant$1.call(this);this.skipSC()}if(this.eof===false&&this.tokenType!==types$1m.Semicolon&&this.isBalanceEdge(startToken)===false){this.error()}return{type:"Declaration",loc:this.getLocation(start,this.tokenStart),important:important,property:property,value:value}}function generate$1f(node){this.token(types$1m.Ident,node.property);this.token(types$1m.Colon,":");this.node(node.value);if(node.important){this.token(types$1m.Delim,"!");this.token(types$1m.Ident,node.important===true?"important":node.important)}}function readProperty$2(){const start=this.tokenStart;if(this.tokenType===types$1m.Delim){switch(this.charCodeAt(this.tokenStart)){case ASTERISK$a:case DOLLARSIGN$2:case PLUSSIGN$d:case NUMBERSIGN$7:case AMPERSAND$5:this.next();break;case SOLIDUS$9:this.next();if(this.isDelim(SOLIDUS$9)){this.next()}break}}if(this.tokenType===types$1m.Hash){this.eat(types$1m.Hash)}else{this.eat(types$1m.Ident)}return this.substrToCursor(start)}function getImportant$1(){this.eat(types$1m.Delim);this.skipSC();const important=this.consume(types$1m.Ident);return important==="important"?true:important}Declaration$7.generate=generate$1f;Declaration$7.name=name$15;Declaration$7.parse=parse$1f;Declaration$7.structure=structure$17;Declaration$7.walkContext=walkContext$g;var DeclarationList$5={};const types$1l=types$1I;const AMPERSAND$4=38;function consumeRaw$9(startToken){return this.Raw(startToken,this.consumeUntilSemicolonIncluded,true)}const name$14="DeclarationList";const structure$16={children:[["Declaration","Atrule","Rule"]]};function parse$1e(){const children=this.createList();while(!this.eof){switch(this.tokenType){case types$1l.WhiteSpace:case types$1l.Comment:case types$1l.Semicolon:this.next();break;case types$1l.AtKeyword:children.push(this.parseWithFallback(this.Atrule.bind(this,true),consumeRaw$9));break;default:if(this.isDelim(AMPERSAND$4)){children.push(this.parseWithFallback(this.Rule,consumeRaw$9))}else{children.push(this.parseWithFallback(this.Declaration,consumeRaw$9))}}}return{type:"DeclarationList",loc:this.getLocationFromList(children),children:children}}function generate$1e(node){this.children(node,(prev=>{if(prev.type==="Declaration"){this.token(types$1l.Semicolon,";")}}))}DeclarationList$5.generate=generate$1e;DeclarationList$5.name=name$14;DeclarationList$5.parse=parse$1e;DeclarationList$5.structure=structure$16;var Dimension$8={};const types$1k=types$1I;const name$13="Dimension";const structure$15={value:String,unit:String};function parse$1d(){const start=this.tokenStart;const value=this.consumeNumber(types$1k.Dimension);return{type:"Dimension",loc:this.getLocation(start,this.tokenStart),value:value,unit:this.substring(start+value.length,this.tokenStart)}}function generate$1d(node){this.token(types$1k.Dimension,node.value+node.unit)}Dimension$8.generate=generate$1d;Dimension$8.name=name$13;Dimension$8.parse=parse$1d;Dimension$8.structure=structure$15;var _Function$1={};const types$1j=types$1I;const name$12="Function";const walkContext$f="function";const structure$14={name:String,children:[[]]};function parse$1c(readSequence,recognizer){const start=this.tokenStart;const name=this.consumeFunctionName();const nameLowerCase=name.toLowerCase();let children;children=recognizer.hasOwnProperty(nameLowerCase)?recognizer[nameLowerCase].call(this,recognizer):readSequence.call(this,recognizer);if(!this.eof){this.eat(types$1j.RightParenthesis)}return{type:"Function",loc:this.getLocation(start,this.tokenStart),name:name,children:children}}function generate$1c(node){this.token(types$1j.Function,node.name+"(");this.children(node);this.token(types$1j.RightParenthesis,")")}_Function$1.generate=generate$1c;_Function$1.name=name$12;_Function$1.parse=parse$1c;_Function$1.structure=structure$14;_Function$1.walkContext=walkContext$f;var Hash$6={};const types$1i=types$1I;const xxx$1="XXX";const name$11="Hash";const structure$13={value:String};function parse$1b(){const start=this.tokenStart;this.eat(types$1i.Hash);return{type:"Hash",loc:this.getLocation(start,this.tokenStart),value:this.substrToCursor(start+1)}}function generate$1b(node){this.token(types$1i.Hash,"#"+node.value)}Hash$6.generate=generate$1b;Hash$6.name=name$11;Hash$6.parse=parse$1b;Hash$6.structure=structure$13;Hash$6.xxx=xxx$1;var Identifier$5={};const types$1h=types$1I;const name$10="Identifier";const structure$12={name:String};function parse$1a(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(types$1h.Ident)}}function generate$1a(node){this.token(types$1h.Ident,node.name)}Identifier$5.generate=generate$1a;Identifier$5.name=name$10;Identifier$5.parse=parse$1a;Identifier$5.structure=structure$12;var IdSelector$5={};const types$1g=types$1I;const name$$="IdSelector";const structure$11={name:String};function parse$19(){const start=this.tokenStart;this.eat(types$1g.Hash);return{type:"IdSelector",loc:this.getLocation(start,this.tokenStart),name:this.substrToCursor(start+1)}}function generate$19(node){this.token(types$1g.Delim,"#"+node.name)}IdSelector$5.generate=generate$19;IdSelector$5.name=name$$;IdSelector$5.parse=parse$19;IdSelector$5.structure=structure$11;var MediaFeature$5={};const types$1f=types$1I;const name$_="MediaFeature";const structure$10={name:String,value:["Identifier","Number","Dimension","Ratio",null]};function parse$18(){const start=this.tokenStart;let name;let value=null;this.eat(types$1f.LeftParenthesis);this.skipSC();name=this.consume(types$1f.Ident);this.skipSC();if(this.tokenType!==types$1f.RightParenthesis){this.eat(types$1f.Colon);this.skipSC();switch(this.tokenType){case types$1f.Number:if(this.lookupNonWSType(1)===types$1f.Delim){value=this.Ratio()}else{value=this.Number()}break;case types$1f.Dimension:value=this.Dimension();break;case types$1f.Ident:value=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}this.eat(types$1f.RightParenthesis);return{type:"MediaFeature",loc:this.getLocation(start,this.tokenStart),name:name,value:value}}function generate$18(node){this.token(types$1f.LeftParenthesis,"(");this.token(types$1f.Ident,node.name);if(node.value!==null){this.token(types$1f.Colon,":");this.node(node.value)}this.token(types$1f.RightParenthesis,")")}MediaFeature$5.generate=generate$18;MediaFeature$5.name=name$_;MediaFeature$5.parse=parse$18;MediaFeature$5.structure=structure$10;var MediaQuery$5={};const types$1e=types$1I;const name$Z="MediaQuery";const structure$$={children:[["Identifier","MediaFeature","WhiteSpace"]]};function parse$17(){const children=this.createList();let child=null;this.skipSC();scan:while(!this.eof){switch(this.tokenType){case types$1e.Comment:case types$1e.WhiteSpace:this.next();continue;case types$1e.Ident:child=this.Identifier();break;case types$1e.LeftParenthesis:child=this.MediaFeature();break;default:break scan}children.push(child)}if(child===null){this.error("Identifier or parenthesis is expected")}return{type:"MediaQuery",loc:this.getLocationFromList(children),children:children}}function generate$17(node){this.children(node)}MediaQuery$5.generate=generate$17;MediaQuery$5.name=name$Z;MediaQuery$5.parse=parse$17;MediaQuery$5.structure=structure$$;var MediaQueryList$5={};const types$1d=types$1I;const name$Y="MediaQueryList";const structure$_={children:[["MediaQuery"]]};function parse$16(){const children=this.createList();this.skipSC();while(!this.eof){children.push(this.MediaQuery());if(this.tokenType!==types$1d.Comma){break}this.next()}return{type:"MediaQueryList",loc:this.getLocationFromList(children),children:children}}function generate$16(node){this.children(node,(()=>this.token(types$1d.Comma,",")))}MediaQueryList$5.generate=generate$16;MediaQueryList$5.name=name$Y;MediaQueryList$5.parse=parse$16;MediaQueryList$5.structure=structure$_;var NestingSelector$2={};const types$1c=types$1I;const AMPERSAND$3=38;const name$X="NestingSelector";const structure$Z={};function parse$15(){const start=this.tokenStart;this.eatDelim(AMPERSAND$3);return{type:"NestingSelector",loc:this.getLocation(start,this.tokenStart)}}function generate$15(){this.token(types$1c.Delim,"&")}NestingSelector$2.generate=generate$15;NestingSelector$2.name=name$X;NestingSelector$2.parse=parse$15;NestingSelector$2.structure=structure$Z;var Nth$5={};const types$1b=types$1I;const name$W="Nth";const structure$Y={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function parse$14(){this.skipSC();const start=this.tokenStart;let end=start;let selector=null;let nth;if(this.lookupValue(0,"odd")||this.lookupValue(0,"even")){nth=this.Identifier()}else{nth=this.AnPlusB()}end=this.tokenStart;this.skipSC();if(this.lookupValue(0,"of")){this.next();selector=this.SelectorList();end=this.tokenStart}return{type:"Nth",loc:this.getLocation(start,end),nth:nth,selector:selector}}function generate$14(node){this.node(node.nth);if(node.selector!==null){this.token(types$1b.Ident,"of");this.node(node.selector)}}Nth$5.generate=generate$14;Nth$5.name=name$W;Nth$5.parse=parse$14;Nth$5.structure=structure$Y;var _Number$6={};const types$1a=types$1I;const name$V="Number";const structure$X={value:String};function parse$13(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(types$1a.Number)}}function generate$13(node){this.token(types$1a.Number,node.value)}_Number$6.generate=generate$13;_Number$6.name=name$V;_Number$6.parse=parse$13;_Number$6.structure=structure$X;var Operator$5={};const name$U="Operator";const structure$W={value:String};function parse$12(){const start=this.tokenStart;this.next();return{type:"Operator",loc:this.getLocation(start,this.tokenStart),value:this.substrToCursor(start)}}function generate$12(node){this.tokenize(node.value)}Operator$5.generate=generate$12;Operator$5.name=name$U;Operator$5.parse=parse$12;Operator$5.structure=structure$W;var Parentheses$5={};const types$19=types$1I;const name$T="Parentheses";const structure$V={children:[[]]};function parse$11(readSequence,recognizer){const start=this.tokenStart;let children=null;this.eat(types$19.LeftParenthesis);children=readSequence.call(this,recognizer);if(!this.eof){this.eat(types$19.RightParenthesis)}return{type:"Parentheses",loc:this.getLocation(start,this.tokenStart),children:children}}function generate$11(node){this.token(types$19.LeftParenthesis,"(");this.children(node);this.token(types$19.RightParenthesis,")")}Parentheses$5.generate=generate$11;Parentheses$5.name=name$T;Parentheses$5.parse=parse$11;Parentheses$5.structure=structure$V;var Percentage$8={};const types$18=types$1I;const name$S="Percentage";const structure$U={value:String};function parse$10(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(types$18.Percentage)}}function generate$10(node){this.token(types$18.Percentage,node.value+"%")}Percentage$8.generate=generate$10;Percentage$8.name=name$S;Percentage$8.parse=parse$10;Percentage$8.structure=structure$U;var PseudoClassSelector$5={};const types$17=types$1I;const name$R="PseudoClassSelector";const walkContext$e="function";const structure$T={name:String,children:[["Raw"],null]};function parse$$(){const start=this.tokenStart;let children=null;let name;let nameLowerCase;this.eat(types$17.Colon);if(this.tokenType===types$17.Function){name=this.consumeFunctionName();nameLowerCase=name.toLowerCase();if(hasOwnProperty.call(this.pseudo,nameLowerCase)){this.skipSC();children=this.pseudo[nameLowerCase].call(this);this.skipSC()}else{children=this.createList();children.push(this.Raw(this.tokenIndex,null,false))}this.eat(types$17.RightParenthesis)}else{name=this.consume(types$17.Ident)}return{type:"PseudoClassSelector",loc:this.getLocation(start,this.tokenStart),name:name,children:children}}function generate$$(node){this.token(types$17.Colon,":");if(node.children===null){this.token(types$17.Ident,node.name)}else{this.token(types$17.Function,node.name+"(");this.children(node);this.token(types$17.RightParenthesis,")")}}PseudoClassSelector$5.generate=generate$$;PseudoClassSelector$5.name=name$R;PseudoClassSelector$5.parse=parse$$;PseudoClassSelector$5.structure=structure$T;PseudoClassSelector$5.walkContext=walkContext$e;var PseudoElementSelector$5={};const types$16=types$1I;const name$Q="PseudoElementSelector";const walkContext$d="function";const structure$S={name:String,children:[["Raw"],null]};function parse$_(){const start=this.tokenStart;let children=null;let name;let nameLowerCase;this.eat(types$16.Colon);this.eat(types$16.Colon);if(this.tokenType===types$16.Function){name=this.consumeFunctionName();nameLowerCase=name.toLowerCase();if(hasOwnProperty.call(this.pseudo,nameLowerCase)){this.skipSC();children=this.pseudo[nameLowerCase].call(this);this.skipSC()}else{children=this.createList();children.push(this.Raw(this.tokenIndex,null,false))}this.eat(types$16.RightParenthesis)}else{name=this.consume(types$16.Ident)}return{type:"PseudoElementSelector",loc:this.getLocation(start,this.tokenStart),name:name,children:children}}function generate$_(node){this.token(types$16.Colon,":");this.token(types$16.Colon,":");if(node.children===null){this.token(types$16.Ident,node.name)}else{this.token(types$16.Function,node.name+"(");this.children(node);this.token(types$16.RightParenthesis,")")}}PseudoElementSelector$5.generate=generate$_;PseudoElementSelector$5.name=name$Q;PseudoElementSelector$5.parse=parse$_;PseudoElementSelector$5.structure=structure$S;PseudoElementSelector$5.walkContext=walkContext$d;var Ratio$5={};const types$15=types$1I;const charCodeDefinitions$h=charCodeDefinitions$p;const SOLIDUS$8=47;const FULLSTOP$4=46;function consumeNumber$2(){this.skipSC();const value=this.consume(types$15.Number);for(let i=0;i<value.length;i++){const code=value.charCodeAt(i);if(!charCodeDefinitions$h.isDigit(code)&&code!==FULLSTOP$4){this.error("Unsigned number is expected",this.tokenStart-value.length+i)}}if(Number(value)===0){this.error("Zero number is not allowed",this.tokenStart-value.length)}return value}const name$P="Ratio";const structure$R={left:String,right:String};function parse$Z(){const start=this.tokenStart;const left=consumeNumber$2.call(this);let right;this.skipSC();this.eatDelim(SOLIDUS$8);right=consumeNumber$2.call(this);return{type:"Ratio",loc:this.getLocation(start,this.tokenStart),left:left,right:right}}function generate$Z(node){this.token(types$15.Number,node.left);this.token(types$15.Delim,"/");this.token(types$15.Number,node.right)}Ratio$5.generate=generate$Z;Ratio$5.name=name$P;Ratio$5.parse=parse$Z;Ratio$5.structure=structure$R;var Raw$7={};const types$14=types$1I;function getOffsetExcludeWS$1(){if(this.tokenIndex>0){if(this.lookupType(-1)===types$14.WhiteSpace){return this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset}}return this.tokenStart}const name$O="Raw";const structure$Q={value:String};function parse$Y(startToken,consumeUntil,excludeWhiteSpace){const startOffset=this.getTokenStart(startToken);let endOffset;this.skipUntilBalanced(startToken,consumeUntil||this.consumeUntilBalanceEnd);if(excludeWhiteSpace&&this.tokenStart>startOffset){endOffset=getOffsetExcludeWS$1.call(this)}else{endOffset=this.tokenStart}return{type:"Raw",loc:this.getLocation(startOffset,endOffset),value:this.substring(startOffset,endOffset)}}function generate$Y(node){this.tokenize(node.value)}Raw$7.generate=generate$Y;Raw$7.name=name$O;Raw$7.parse=parse$Y;Raw$7.structure=structure$Q;var Rule$7={};const types$13=types$1I;function consumeRaw$8(startToken){return this.Raw(startToken,this.consumeUntilLeftCurlyBracket,true)}function consumePrelude$1(){const prelude=this.SelectorList();if(prelude.type!=="Raw"&&this.eof===false&&this.tokenType!==types$13.LeftCurlyBracket){this.error()}return prelude}const name$N="Rule";const walkContext$c="rule";const structure$P={prelude:["SelectorList","Raw"],block:["Block"]};function parse$X(){const startToken=this.tokenIndex;const startOffset=this.tokenStart;let prelude;let block;if(this.parseRulePrelude){prelude=this.parseWithFallback(consumePrelude$1,consumeRaw$8)}else{prelude=consumeRaw$8.call(this,startToken)}block=this.Block(true);return{type:"Rule",loc:this.getLocation(startOffset,this.tokenStart),prelude:prelude,block:block}}function generate$X(node){this.node(node.prelude);this.node(node.block)}Rule$7.generate=generate$X;Rule$7.name=name$N;Rule$7.parse=parse$X;Rule$7.structure=structure$P;Rule$7.walkContext=walkContext$c;var Selector$7={};const name$M="Selector";const structure$O={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};function parse$W(){const children=this.readSequence(this.scope.Selector);if(this.getFirstListNode(children)===null){this.error("Selector is expected")}return{type:"Selector",loc:this.getLocationFromList(children),children:children}}function generate$W(node){this.children(node)}Selector$7.generate=generate$W;Selector$7.name=name$M;Selector$7.parse=parse$W;Selector$7.structure=structure$O;var SelectorList$5={};const types$12=types$1I;const name$L="SelectorList";const walkContext$b="selector";const structure$N={children:[["Selector","Raw"]]};function parse$V(){const children=this.createList();while(!this.eof){children.push(this.Selector());if(this.tokenType===types$12.Comma){this.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(children),children:children}}function generate$V(node){this.children(node,(()=>this.token(types$12.Comma,",")))}SelectorList$5.generate=generate$V;SelectorList$5.name=name$L;SelectorList$5.parse=parse$V;SelectorList$5.structure=structure$N;SelectorList$5.walkContext=walkContext$b;var _String$1={};var string$7={};const charCodeDefinitions$g=charCodeDefinitions$p;const utils$n=utils$u;const REVERSE_SOLIDUS$5=92;const QUOTATION_MARK$3=34;const APOSTROPHE$4=39;function decode$5(str){const len=str.length;const firstChar=str.charCodeAt(0);const start=firstChar===QUOTATION_MARK$3||firstChar===APOSTROPHE$4?1:0;const end=start===1&&len>1&&str.charCodeAt(len-1)===firstChar?len-2:len-1;let decoded="";for(let i=start;i<=end;i++){let code=str.charCodeAt(i);if(code===REVERSE_SOLIDUS$5){if(i===end){if(i!==len-1){decoded=str.substr(i+1)}break}code=str.charCodeAt(++i);if(charCodeDefinitions$g.isValidEscape(REVERSE_SOLIDUS$5,code)){const escapeStart=i-1;const escapeEnd=utils$n.consumeEscaped(str,escapeStart);i=escapeEnd-1;decoded+=utils$n.decodeEscaped(str.substring(escapeStart+1,escapeEnd))}else{if(code===13&&str.charCodeAt(i+1)===10){i++}}}else{decoded+=str[i]}}return decoded}function encode$5(str,apostrophe){const quote=apostrophe?"'":'"';const quoteCode=apostrophe?APOSTROPHE$4:QUOTATION_MARK$3;let encoded="";let wsBeforeHexIsNeeded=false;for(let i=0;i<str.length;i++){const code=str.charCodeAt(i);if(code===0){encoded+="�";continue}if(code<=31||code===127){encoded+="\\"+code.toString(16);wsBeforeHexIsNeeded=true;continue}if(code===quoteCode||code===REVERSE_SOLIDUS$5){encoded+="\\"+str.charAt(i);wsBeforeHexIsNeeded=false}else{if(wsBeforeHexIsNeeded&&(charCodeDefinitions$g.isHexDigit(code)||charCodeDefinitions$g.isWhiteSpace(code))){encoded+=" "}encoded+=str.charAt(i);wsBeforeHexIsNeeded=false}}return quote+encoded+quote}string$7.decode=decode$5;string$7.encode=encode$5;const string$6=string$7;const types$11=types$1I;const name$K="String";const structure$M={value:String};function parse$U(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:string$6.decode(this.consume(types$11.String))}}function generate$U(node){this.token(types$11.String,string$6.encode(node.value))}_String$1.generate=generate$U;_String$1.name=name$K;_String$1.parse=parse$U;_String$1.structure=structure$M;var StyleSheet$5={};const types$10=types$1I;const EXCLAMATIONMARK$4=33;function consumeRaw$7(startToken){return this.Raw(startToken,null,false)}const name$J="StyleSheet";const walkContext$a="stylesheet";const structure$L={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function parse$T(){const start=this.tokenStart;const children=this.createList();let child;while(!this.eof){switch(this.tokenType){case types$10.WhiteSpace:this.next();continue;case types$10.Comment:if(this.charCodeAt(this.tokenStart+2)!==EXCLAMATIONMARK$4){this.next();continue}child=this.Comment();break;case types$10.CDO:child=this.CDO();break;case types$10.CDC:child=this.CDC();break;case types$10.AtKeyword:child=this.parseWithFallback(this.Atrule,consumeRaw$7);break;default:child=this.parseWithFallback(this.Rule,consumeRaw$7)}children.push(child)}return{type:"StyleSheet",loc:this.getLocation(start,this.tokenStart),children:children}}function generate$T(node){this.children(node)}StyleSheet$5.generate=generate$T;StyleSheet$5.name=name$J;StyleSheet$5.parse=parse$T;StyleSheet$5.structure=structure$L;StyleSheet$5.walkContext=walkContext$a;var TypeSelector$7={};const types$$=types$1I;const ASTERISK$9=42;const VERTICALLINE$5=124;function eatIdentifierOrAsterisk$1(){if(this.tokenType!==types$$.Ident&&this.isDelim(ASTERISK$9)===false){this.error("Identifier or asterisk is expected")}this.next()}const name$I="TypeSelector";const structure$K={name:String};function parse$S(){const start=this.tokenStart;if(this.isDelim(VERTICALLINE$5)){this.next();eatIdentifierOrAsterisk$1.call(this)}else{eatIdentifierOrAsterisk$1.call(this);if(this.isDelim(VERTICALLINE$5)){this.next();eatIdentifierOrAsterisk$1.call(this)}}return{type:"TypeSelector",loc:this.getLocation(start,this.tokenStart),name:this.substrToCursor(start)}}function generate$S(node){this.tokenize(node.name)}TypeSelector$7.generate=generate$S;TypeSelector$7.name=name$I;TypeSelector$7.parse=parse$S;TypeSelector$7.structure=structure$K;var UnicodeRange$5={};const types$_=types$1I;const charCodeDefinitions$f=charCodeDefinitions$p;const PLUSSIGN$c=43;const HYPHENMINUS$8=45;const QUESTIONMARK$3=63;function eatHexSequence$1(offset,allowDash){let len=0;for(let pos=this.tokenStart+offset;pos<this.tokenEnd;pos++){const code=this.charCodeAt(pos);if(code===HYPHENMINUS$8&&allowDash&&len!==0){eatHexSequence$1.call(this,offset+len+1,false);return-1}if(!charCodeDefinitions$f.isHexDigit(code)){this.error(allowDash&&len!==0?"Hyphen minus"+(len<6?" or hex digit":"")+" is expected":len<6?"Hex digit is expected":"Unexpected input",pos)}if(++len>6){this.error("Too many hex digits",pos)}}this.next();return len}function eatQuestionMarkSequence$1(max){let count=0;while(this.isDelim(QUESTIONMARK$3)){if(++count>max){this.error("Too many question marks")}this.next()}}function startsWith$2(code){if(this.charCodeAt(this.tokenStart)!==code){this.error((code===PLUSSIGN$c?"Plus sign":"Hyphen minus")+" is expected")}}function scanUnicodeRange$1(){let hexLength=0;switch(this.tokenType){case types$_.Number:hexLength=eatHexSequence$1.call(this,1,true);if(this.isDelim(QUESTIONMARK$3)){eatQuestionMarkSequence$1.call(this,6-hexLength);break}if(this.tokenType===types$_.Dimension||this.tokenType===types$_.Number){startsWith$2.call(this,HYPHENMINUS$8);eatHexSequence$1.call(this,1,false);break}break;case types$_.Dimension:hexLength=eatHexSequence$1.call(this,1,true);if(hexLength>0){eatQuestionMarkSequence$1.call(this,6-hexLength)}break;default:this.eatDelim(PLUSSIGN$c);if(this.tokenType===types$_.Ident){hexLength=eatHexSequence$1.call(this,0,true);if(hexLength>0){eatQuestionMarkSequence$1.call(this,6-hexLength)}break}if(this.isDelim(QUESTIONMARK$3)){this.next();eatQuestionMarkSequence$1.call(this,5);break}this.error("Hex digit or question mark is expected")}}const name$H="UnicodeRange";const structure$J={value:String};function parse$R(){const start=this.tokenStart;this.eatIdent("u");scanUnicodeRange$1.call(this);return{type:"UnicodeRange",loc:this.getLocation(start,this.tokenStart),value:this.substrToCursor(start)}}function generate$R(node){this.tokenize(node.value)}UnicodeRange$5.generate=generate$R;UnicodeRange$5.name=name$H;UnicodeRange$5.parse=parse$R;UnicodeRange$5.structure=structure$J;var Url$8={};var url$5={};const charCodeDefinitions$e=charCodeDefinitions$p;const utils$m=utils$u;const SPACE$5=32;const REVERSE_SOLIDUS$4=92;const QUOTATION_MARK$2=34;const APOSTROPHE$3=39;const LEFTPARENTHESIS$3=40;const RIGHTPARENTHESIS$3=41;function decode$4(str){const len=str.length;let start=4;let end=str.charCodeAt(len-1)===RIGHTPARENTHESIS$3?len-2:len-1;let decoded="";while(start<end&&charCodeDefinitions$e.isWhiteSpace(str.charCodeAt(start))){start++}while(start<end&&charCodeDefinitions$e.isWhiteSpace(str.charCodeAt(end))){end--}for(let i=start;i<=end;i++){let code=str.charCodeAt(i);if(code===REVERSE_SOLIDUS$4){if(i===end){if(i!==len-1){decoded=str.substr(i+1)}break}code=str.charCodeAt(++i);if(charCodeDefinitions$e.isValidEscape(REVERSE_SOLIDUS$4,code)){const escapeStart=i-1;const escapeEnd=utils$m.consumeEscaped(str,escapeStart);i=escapeEnd-1;decoded+=utils$m.decodeEscaped(str.substring(escapeStart+1,escapeEnd))}else{if(code===13&&str.charCodeAt(i+1)===10){i++}}}else{decoded+=str[i]}}return decoded}function encode$4(str){let encoded="";let wsBeforeHexIsNeeded=false;for(let i=0;i<str.length;i++){const code=str.charCodeAt(i);if(code===0){encoded+="�";continue}if(code<=31||code===127){encoded+="\\"+code.toString(16);wsBeforeHexIsNeeded=true;continue}if(code===SPACE$5||code===REVERSE_SOLIDUS$4||code===QUOTATION_MARK$2||code===APOSTROPHE$3||code===LEFTPARENTHESIS$3||code===RIGHTPARENTHESIS$3){encoded+="\\"+str.charAt(i);wsBeforeHexIsNeeded=false}else{if(wsBeforeHexIsNeeded&&charCodeDefinitions$e.isHexDigit(code)){encoded+=" "}encoded+=str.charAt(i);wsBeforeHexIsNeeded=false}}return"url("+encoded+")"}url$5.decode=decode$4;url$5.encode=encode$4;const url$4=url$5;const string$5=string$7;const types$Z=types$1I;const name$G="Url";const structure$I={value:String};function parse$Q(){const start=this.tokenStart;let value;switch(this.tokenType){case types$Z.Url:value=url$4.decode(this.consume(types$Z.Url));break;case types$Z.Function:if(!this.cmpStr(this.tokenStart,this.tokenEnd,"url(")){this.error("Function name must be `url`")}this.eat(types$Z.Function);this.skipSC();value=string$5.decode(this.consume(types$Z.String));this.skipSC();if(!this.eof){this.eat(types$Z.RightParenthesis)}break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(start,this.tokenStart),value:value}}function generate$Q(node){this.token(types$Z.Url,url$4.encode(node.value))}Url$8.generate=generate$Q;Url$8.name=name$G;Url$8.parse=parse$Q;Url$8.structure=structure$I;var Value$7={};const name$F="Value";const structure$H={children:[[]]};function parse$P(){const start=this.tokenStart;const children=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(start,this.tokenStart),children:children}}function generate$P(node){this.children(node)}Value$7.generate=generate$P;Value$7.name=name$F;Value$7.parse=parse$P;Value$7.structure=structure$H;var WhiteSpace$8={};const types$Y=types$1I;const SPACE$4=Object.freeze({type:"WhiteSpace",loc:null,value:" "});const name$E="WhiteSpace";const structure$G={value:String};function parse$O(){this.eat(types$Y.WhiteSpace);return SPACE$4}function generate$O(node){this.token(types$Y.WhiteSpace,node.value)}WhiteSpace$8.generate=generate$O;WhiteSpace$8.name=name$E;WhiteSpace$8.parse=parse$O;WhiteSpace$8.structure=structure$G;const AnPlusB$4=AnPlusB$5;const Atrule$8=Atrule$9;const AtrulePrelude$4=AtrulePrelude$5;const AttributeSelector$6=AttributeSelector$7;const Block$4=Block$5;const Brackets$4=Brackets$5;const CDC$5=CDC$6;const CDO$5=CDO$6;const ClassSelector$4=ClassSelector$5;const Combinator$4=Combinator$5;const Comment$7=Comment$8;const Declaration$6=Declaration$7;const DeclarationList$4=DeclarationList$5;const Dimension$7=Dimension$8;const Function$4=_Function$1;const Hash$5=Hash$6;const Identifier$4=Identifier$5;const IdSelector$4=IdSelector$5;const MediaFeature$4=MediaFeature$5;const MediaQuery$4=MediaQuery$5;const MediaQueryList$4=MediaQueryList$5;const NestingSelector$1=NestingSelector$2;const Nth$4=Nth$5;const Number$1$2=_Number$6;const Operator$4=Operator$5;const Parentheses$4=Parentheses$5;const Percentage$7=Percentage$8;const PseudoClassSelector$4=PseudoClassSelector$5;const PseudoElementSelector$4=PseudoElementSelector$5;const Ratio$4=Ratio$5;const Raw$6=Raw$7;const Rule$6=Rule$7;const Selector$6=Selector$7;const SelectorList$4=SelectorList$5;const String$1$2=_String$1;const StyleSheet$4=StyleSheet$5;const TypeSelector$6=TypeSelector$7;const UnicodeRange$4=UnicodeRange$5;const Url$7=Url$8;const Value$6=Value$7;const WhiteSpace$7=WhiteSpace$8;node$1.AnPlusB=AnPlusB$4;node$1.Atrule=Atrule$8;node$1.AtrulePrelude=AtrulePrelude$4;node$1.AttributeSelector=AttributeSelector$6;node$1.Block=Block$4;node$1.Brackets=Brackets$4;node$1.CDC=CDC$5;node$1.CDO=CDO$5;node$1.ClassSelector=ClassSelector$4;node$1.Combinator=Combinator$4;node$1.Comment=Comment$7;node$1.Declaration=Declaration$6;node$1.DeclarationList=DeclarationList$4;node$1.Dimension=Dimension$7;node$1.Function=Function$4;node$1.Hash=Hash$5;node$1.Identifier=Identifier$4;node$1.IdSelector=IdSelector$4;node$1.MediaFeature=MediaFeature$4;node$1.MediaQuery=MediaQuery$4;node$1.MediaQueryList=MediaQueryList$4;node$1.NestingSelector=NestingSelector$1;node$1.Nth=Nth$4;node$1.Number=Number$1$2;node$1.Operator=Operator$4;node$1.Parentheses=Parentheses$4;node$1.Percentage=Percentage$7;node$1.PseudoClassSelector=PseudoClassSelector$4;node$1.PseudoElementSelector=PseudoElementSelector$4;node$1.Ratio=Ratio$4;node$1.Raw=Raw$6;node$1.Rule=Rule$6;node$1.Selector=Selector$6;node$1.SelectorList=SelectorList$4;node$1.String=String$1$2;node$1.StyleSheet=StyleSheet$4;node$1.TypeSelector=TypeSelector$6;node$1.UnicodeRange=UnicodeRange$4;node$1.Url=Url$7;node$1.Value=Value$6;node$1.WhiteSpace=WhiteSpace$7;const data$2=data$3;const index$f=node$1;const lexerConfig$1={generic:true,...data$2,node:index$f};var lexer$6=lexerConfig$1;var scope$1={};const types$X=types$1I;const NUMBERSIGN$6=35;const ASTERISK$8=42;const PLUSSIGN$b=43;const HYPHENMINUS$7=45;const SOLIDUS$7=47;const U$2=117;function defaultRecognizer$1(context){switch(this.tokenType){case types$X.Hash:return this.Hash();case types$X.Comma:return this.Operator();case types$X.LeftParenthesis:return this.Parentheses(this.readSequence,context.recognizer);case types$X.LeftSquareBracket:return this.Brackets(this.readSequence,context.recognizer);case types$X.String:return this.String();case types$X.Dimension:return this.Dimension();case types$X.Percentage:return this.Percentage();case types$X.Number:return this.Number();case types$X.Function:return this.cmpStr(this.tokenStart,this.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,context.recognizer);case types$X.Url:return this.Url();case types$X.Ident:if(this.cmpChar(this.tokenStart,U$2)&&this.cmpChar(this.tokenStart+1,PLUSSIGN$b)){return this.UnicodeRange()}else{return this.Identifier()}case types$X.Delim:{const code=this.charCodeAt(this.tokenStart);if(code===SOLIDUS$7||code===ASTERISK$8||code===PLUSSIGN$b||code===HYPHENMINUS$7){return this.Operator()}if(code===NUMBERSIGN$6){this.error("Hex or identifier is expected",this.tokenStart+1)}break}}}var _default$5=defaultRecognizer$1;const _default$4=_default$5;const atrulePrelude$3={getNode:_default$4};var atrulePrelude_1$1=atrulePrelude$3;const types$W=types$1I;const NUMBERSIGN$5=35;const AMPERSAND$2=38;const ASTERISK$7=42;const PLUSSIGN$a=43;const SOLIDUS$6=47;const FULLSTOP$3=46;const GREATERTHANSIGN$3=62;const VERTICALLINE$4=124;const TILDE$3=126;function onWhiteSpace$1(next,children){if(children.last!==null&&children.last.type!=="Combinator"&&next!==null&&next.type!=="Combinator"){children.push({type:"Combinator",loc:null,name:" "})}}function getNode$1(){switch(this.tokenType){case types$W.LeftSquareBracket:return this.AttributeSelector();case types$W.Hash:return this.IdSelector();case types$W.Colon:if(this.lookupType(1)===types$W.Colon){return this.PseudoElementSelector()}else{return this.PseudoClassSelector()}case types$W.Ident:return this.TypeSelector();case types$W.Number:case types$W.Percentage:return this.Percentage();case types$W.Dimension:if(this.charCodeAt(this.tokenStart)===FULLSTOP$3){this.error("Identifier is expected",this.tokenStart+1)}break;case types$W.Delim:{const code=this.charCodeAt(this.tokenStart);switch(code){case PLUSSIGN$a:case GREATERTHANSIGN$3:case TILDE$3:case SOLIDUS$6:return this.Combinator();case FULLSTOP$3:return this.ClassSelector();case ASTERISK$7:case VERTICALLINE$4:return this.TypeSelector();case NUMBERSIGN$5:return this.IdSelector();case AMPERSAND$2:return this.NestingSelector()}break}}}const Selector$5={onWhiteSpace:onWhiteSpace$1,getNode:getNode$1};var selector$5=Selector$5;function expressionFn$1(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,false))}var expression$3=expressionFn$1;const types$V=types$1I;function varFn$1(){const children=this.createList();this.skipSC();children.push(this.Identifier());this.skipSC();if(this.tokenType===types$V.Comma){children.push(this.Operator());const startIndex=this.tokenIndex;const value=this.parseCustomProperty?this.Value(null):this.Raw(this.tokenIndex,this.consumeUntilExclamationMarkOrSemicolon,false);if(value.type==="Value"&&value.children.isEmpty){for(let offset=startIndex-this.tokenIndex;offset<=0;offset++){if(this.lookupType(offset)===types$V.WhiteSpace){value.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}}children.push(value)}return children}var _var$3=varFn$1;const _default$3=_default$5;const expression$2=expression$3;const _var$2=_var$3;function isPlusMinusOperator$1(node){return node!==null&&node.type==="Operator"&&(node.value[node.value.length-1]==="-"||node.value[node.value.length-1]==="+")}const value$3={getNode:_default$3,onWhiteSpace(next,children){if(isPlusMinusOperator$1(next)){next.value=" "+next.value}if(isPlusMinusOperator$1(children.last)){children.last.value+=" "}},expression:expression$2,var:_var$2};var value_1$1=value$3;const atrulePrelude$2=atrulePrelude_1$1;const selector$4=selector$5;const value$2=value_1$1;scope$1.AtrulePrelude=atrulePrelude$2;scope$1.Selector=selector$4;scope$1.Value=value$2;const fontFace$3={parse:{prelude:null,block(){return this.Block(true)}}};var fontFace_1$1=fontFace$3;const types$U=types$1I;const importAtrule$1={parse:{prelude(){const children=this.createList();this.skipSC();switch(this.tokenType){case types$U.String:children.push(this.String());break;case types$U.Url:case types$U.Function:children.push(this.Url());break;default:this.error("String or url() is expected")}if(this.lookupNonWSType(0)===types$U.Ident||this.lookupNonWSType(0)===types$U.LeftParenthesis){children.push(this.MediaQueryList())}return children},block:null}};var _import$3=importAtrule$1;const media$3={parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(isStyleBlock=false){return this.Block(isStyleBlock)}}};var media_1$1=media$3;const nest$1={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(true)}}};var nest_1=nest$1;const page$3={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(true)}}};var page_1$1=page$3;const types$T=types$1I;function consumeRaw$6(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,false))}function parentheses$1(){this.skipSC();if(this.tokenType===types$T.Ident&&this.lookupNonWSType(1)===types$T.Colon){return this.createSingleNodeList(this.Declaration())}return readSequence$2.call(this)}function readSequence$2(){const children=this.createList();let child;this.skipSC();scan:while(!this.eof){switch(this.tokenType){case types$T.Comment:case types$T.WhiteSpace:this.next();continue;case types$T.Function:child=this.Function(consumeRaw$6,this.scope.AtrulePrelude);break;case types$T.Ident:child=this.Identifier();break;case types$T.LeftParenthesis:child=this.Parentheses(parentheses$1,this.scope.AtrulePrelude);break;default:break scan}children.push(child)}return children}const supports$3={parse:{prelude(){const children=readSequence$2.call(this);if(this.getFirstListNode(children)===null){this.error("Condition is expected")}return children},block(isStyleBlock=false){return this.Block(isStyleBlock)}}};var supports_1$1=supports$3;const fontFace$2=fontFace_1$1;const _import$2=_import$3;const media$2=media_1$1;const nest=nest_1;const page$2=page_1$1;const supports$2=supports_1$1;const atrule$1={"font-face":fontFace$2,import:_import$2,media:media$2,nest:nest,page:page$2,supports:supports$2};var atrule_1$1=atrule$1;const selectorList$1={parse(){return this.createSingleNodeList(this.SelectorList())}};const selector$3={parse(){return this.createSingleNodeList(this.Selector())}};const identList$1={parse(){return this.createSingleNodeList(this.Identifier())}};const nth$1={parse(){return this.createSingleNodeList(this.Nth())}};const pseudo$1={dir:identList$1,has:selectorList$1,lang:identList$1,matches:selectorList$1,is:selectorList$1,"-moz-any":selectorList$1,"-webkit-any":selectorList$1,where:selectorList$1,not:selectorList$1,"nth-child":nth$1,"nth-last-child":nth$1,"nth-last-of-type":nth$1,"nth-of-type":nth$1,slotted:selector$3,host:selector$3,"host-context":selector$3};var pseudo_1$1=pseudo$1;var indexParse$3={};const AnPlusB$3=AnPlusB$5;const Atrule$7=Atrule$9;const AtrulePrelude$3=AtrulePrelude$5;const AttributeSelector$5=AttributeSelector$7;const Block$3=Block$5;const Brackets$3=Brackets$5;const CDC$4=CDC$6;const CDO$4=CDO$6;const ClassSelector$3=ClassSelector$5;const Combinator$3=Combinator$5;const Comment$6=Comment$8;const Declaration$5=Declaration$7;const DeclarationList$3=DeclarationList$5;const Dimension$6=Dimension$8;const Function$3=_Function$1;const Hash$4=Hash$6;const Identifier$3=Identifier$5;const IdSelector$3=IdSelector$5;const MediaFeature$3=MediaFeature$5;const MediaQuery$3=MediaQuery$5;const MediaQueryList$3=MediaQueryList$5;const NestingSelector=NestingSelector$2;const Nth$3=Nth$5;const Number$4=_Number$6;const Operator$3=Operator$5;const Parentheses$3=Parentheses$5;const Percentage$6=Percentage$8;const PseudoClassSelector$3=PseudoClassSelector$5;const PseudoElementSelector$3=PseudoElementSelector$5;const Ratio$3=Ratio$5;const Raw$5=Raw$7;const Rule$5=Rule$7;const Selector$4=Selector$7;const SelectorList$3=SelectorList$5;const String$3=_String$1;const StyleSheet$3=StyleSheet$5;const TypeSelector$5=TypeSelector$7;const UnicodeRange$3=UnicodeRange$5;const Url$6=Url$8;const Value$5=Value$7;const WhiteSpace$6=WhiteSpace$8;indexParse$3.AnPlusB=AnPlusB$3.parse;indexParse$3.Atrule=Atrule$7.parse;indexParse$3.AtrulePrelude=AtrulePrelude$3.parse;indexParse$3.AttributeSelector=AttributeSelector$5.parse;indexParse$3.Block=Block$3.parse;indexParse$3.Brackets=Brackets$3.parse;indexParse$3.CDC=CDC$4.parse;indexParse$3.CDO=CDO$4.parse;indexParse$3.ClassSelector=ClassSelector$3.parse;indexParse$3.Combinator=Combinator$3.parse;indexParse$3.Comment=Comment$6.parse;indexParse$3.Declaration=Declaration$5.parse;indexParse$3.DeclarationList=DeclarationList$3.parse;indexParse$3.Dimension=Dimension$6.parse;indexParse$3.Function=Function$3.parse;indexParse$3.Hash=Hash$4.parse;indexParse$3.Identifier=Identifier$3.parse;indexParse$3.IdSelector=IdSelector$3.parse;indexParse$3.MediaFeature=MediaFeature$3.parse;indexParse$3.MediaQuery=MediaQuery$3.parse;indexParse$3.MediaQueryList=MediaQueryList$3.parse;indexParse$3.NestingSelector=NestingSelector.parse;indexParse$3.Nth=Nth$3.parse;indexParse$3.Number=Number$4.parse;indexParse$3.Operator=Operator$3.parse;indexParse$3.Parentheses=Parentheses$3.parse;indexParse$3.Percentage=Percentage$6.parse;indexParse$3.PseudoClassSelector=PseudoClassSelector$3.parse;indexParse$3.PseudoElementSelector=PseudoElementSelector$3.parse;indexParse$3.Ratio=Ratio$3.parse;indexParse$3.Raw=Raw$5.parse;indexParse$3.Rule=Rule$5.parse;indexParse$3.Selector=Selector$4.parse;indexParse$3.SelectorList=SelectorList$3.parse;indexParse$3.String=String$3.parse;indexParse$3.StyleSheet=StyleSheet$3.parse;indexParse$3.TypeSelector=TypeSelector$5.parse;indexParse$3.UnicodeRange=UnicodeRange$3.parse;indexParse$3.Url=Url$6.parse;indexParse$3.Value=Value$5.parse;indexParse$3.WhiteSpace=WhiteSpace$6.parse;const index$e=scope$1;const index$1$4=atrule_1$1;const index$2$2=pseudo_1$1;const indexParse$2=indexParse$3;const config$3={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude(options){return this.AtrulePrelude(options.atrule?String(options.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",rule:"Rule",selectorList:"SelectorList",selector:"Selector",block(){return this.Block(true)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},scope:index$e,atrule:index$1$4,pseudo:index$2$2,node:indexParse$2};var parser$3=config$3;const index$d=node$1;const config$2={node:index$d};var walker$3=config$2;const create$9=create_1$1;const lexer$5=lexer$6;const parser$2=parser$3;const walker$2=walker$3;const syntax$3=create$9({...lexer$5,...parser$2,...walker$2});var syntax_1$1=syntax$3;var version$5="2.3.1";var definitionSyntax$1={};const SyntaxError$6=_SyntaxError$2;const generate$N=generate$1u;const parse$N=parse$1u;const walk$7=walk$a;definitionSyntax$1.SyntaxError=SyntaxError$6.SyntaxError;definitionSyntax$1.generate=generate$N.generate;definitionSyntax$1.parse=parse$N.parse;definitionSyntax$1.walk=walk$7.walk;var clone$5={};const List$9=List$f;function clone$4(node){const result={};for(const key in node){let value=node[key];if(value){if(Array.isArray(value)||value instanceof List$9.List){value=value.map(clone$4)}else if(value.constructor===Object){value=clone$4(value)}}result[key]=value}return result}clone$5.clone=clone$4;var ident$3={};const charCodeDefinitions$d=charCodeDefinitions$p;const utils$l=utils$u;const REVERSE_SOLIDUS$3=92;function decode$3(str){const end=str.length-1;let decoded="";for(let i=0;i<str.length;i++){let code=str.charCodeAt(i);if(code===REVERSE_SOLIDUS$3){if(i===end){break}code=str.charCodeAt(++i);if(charCodeDefinitions$d.isValidEscape(REVERSE_SOLIDUS$3,code)){const escapeStart=i-1;const escapeEnd=utils$l.consumeEscaped(str,escapeStart);i=escapeEnd-1;decoded+=utils$l.decodeEscaped(str.substring(escapeStart+1,escapeEnd))}else{if(code===13&&str.charCodeAt(i+1)===10){i++}}}else{decoded+=str[i]}}return decoded}function encode$3(str){let encoded="";if(str.length===1&&str.charCodeAt(0)===45){return"\\-"}for(let i=0;i<str.length;i++){const code=str.charCodeAt(i);if(code===0){encoded+="�";continue}if(code<=31||code===127||code>=48&&code<=57&&(i===0||i===1&&str.charCodeAt(0)===45)){encoded+="\\"+code.toString(16)+" ";continue}if(charCodeDefinitions$d.isName(code)){encoded+=str.charAt(i)}else{encoded+="\\"+str.charAt(i)}}return encoded}ident$3.decode=decode$3;ident$3.encode=encode$3;const index$1$3=syntax_1$1;const version$4=version$5;const create$8=create_1$1;const List$8=List$f;const Lexer$4=Lexer$7;const index$c=definitionSyntax$1;const clone$3=clone$5;const names$1$1=names$c;const ident$2=ident$3;const string$4=string$7;const url$3=url$5;const types$S=types$1I;const names$9=names$g;const TokenStream$5=TokenStream$9;const{tokenize:tokenize$3,parse:parse$M,generate:generate$M,lexer:lexer$4,createLexer:createLexer$1,walk:walk$6,find:find$2,findLast:findLast$2,findAll:findAll$2,toPlainObject:toPlainObject$2,fromPlainObject:fromPlainObject$2,fork:fork$1}=index$1$3;cjs$2.version=version$4.version;cjs$2.createSyntax=create$8;cjs$2.List=List$8.List;cjs$2.Lexer=Lexer$4.Lexer;cjs$2.definitionSyntax=index$c;cjs$2.clone=clone$3.clone;cjs$2.isCustomProperty=names$1$1.isCustomProperty;cjs$2.keyword=names$1$1.keyword;cjs$2.property=names$1$1.property;cjs$2.vendorPrefix=names$1$1.vendorPrefix;cjs$2.ident=ident$2;cjs$2.string=string$4;cjs$2.url=url$3;cjs$2.tokenTypes=types$S;cjs$2.tokenNames=names$9;cjs$2.TokenStream=TokenStream$5.TokenStream;cjs$2.createLexer=createLexer$1;cjs$2.find=find$2;cjs$2.findAll=findAll$2;cjs$2.findLast=findLast$2;cjs$2.fork=fork$1;cjs$2.fromPlainObject=fromPlainObject$2;cjs$2.generate=generate$M;cjs$2.lexer=lexer$4;cjs$2.parse=parse$M;cjs$2.toPlainObject=toPlainObject$2;cjs$2.tokenize=tokenize$3;cjs$2.walk=walk$6;var cjs$1={};var version$3="5.0.5";var syntax$2={};var cjs={};var tokenizer$2={};var types$R={};const EOF$1=0;const Ident=1;const Function$2=2;const AtKeyword=3;const Hash$3=4;const String$2=5;const BadString=6;const Url$5=7;const BadUrl=8;const Delim=9;const Number$3=10;const Percentage$5=11;const Dimension$5=12;const WhiteSpace$5=13;const CDO$3=14;const CDC$3=15;const Colon=16;const Semicolon=17;const Comma=18;const LeftSquareBracket=19;const RightSquareBracket=20;const LeftParenthesis=21;const RightParenthesis=22;const LeftCurlyBracket=23;const RightCurlyBracket=24;const Comment$5=25;types$R.AtKeyword=AtKeyword;types$R.BadString=BadString;types$R.BadUrl=BadUrl;types$R.CDC=CDC$3;types$R.CDO=CDO$3;types$R.Colon=Colon;types$R.Comma=Comma;types$R.Comment=Comment$5;types$R.Delim=Delim;types$R.Dimension=Dimension$5;types$R.EOF=EOF$1;types$R.Function=Function$2;types$R.Hash=Hash$3;types$R.Ident=Ident;types$R.LeftCurlyBracket=LeftCurlyBracket;types$R.LeftParenthesis=LeftParenthesis;types$R.LeftSquareBracket=LeftSquareBracket;types$R.Number=Number$3;types$R.Percentage=Percentage$5;types$R.RightCurlyBracket=RightCurlyBracket;types$R.RightParenthesis=RightParenthesis;types$R.RightSquareBracket=RightSquareBracket;types$R.Semicolon=Semicolon;types$R.String=String$2;types$R.Url=Url$5;types$R.WhiteSpace=WhiteSpace$5;var charCodeDefinitions$c={};const EOF=0;function isDigit$1(code){return code>=48&&code<=57}function isHexDigit(code){return isDigit$1(code)||code>=65&&code<=70||code>=97&&code<=102}function isUppercaseLetter(code){return code>=65&&code<=90}function isLowercaseLetter(code){return code>=97&&code<=122}function isLetter(code){return isUppercaseLetter(code)||isLowercaseLetter(code)}function isNonAscii(code){return code>=128}function isNameStart(code){return isLetter(code)||isNonAscii(code)||code===95}function isName(code){return isNameStart(code)||isDigit$1(code)||code===45}function isNonPrintable(code){return code>=0&&code<=8||code===11||code>=14&&code<=31||code===127}function isNewline(code){return code===10||code===13||code===12}function isWhiteSpace(code){return isNewline(code)||code===32||code===9}function isValidEscape(first,second){if(first!==92){return false}if(isNewline(second)||second===EOF){return false}return true}function isIdentifierStart(first,second,third){if(first===45){return isNameStart(second)||second===45||isValidEscape(second,third)}if(isNameStart(first)){return true}if(first===92){return isValidEscape(first,second)}return false}function isNumberStart(first,second,third){if(first===43||first===45){if(isDigit$1(second)){return 2}return second===46&&isDigit$1(third)?3:0}if(first===46){return isDigit$1(second)?2:0}if(isDigit$1(first)){return 1}return 0}function isBOM(code){if(code===65279){return 1}if(code===65534){return 1}return 0}const CATEGORY=new Array(128);const EofCategory=128;const WhiteSpaceCategory=130;const DigitCategory=131;const NameStartCategory=132;const NonPrintableCategory=133;for(let i=0;i<CATEGORY.length;i++){CATEGORY[i]=isWhiteSpace(i)&&WhiteSpaceCategory||isDigit$1(i)&&DigitCategory||isNameStart(i)&&NameStartCategory||isNonPrintable(i)&&NonPrintableCategory||i||EofCategory}function charCodeCategory(code){return code<128?CATEGORY[code]:NameStartCategory}charCodeDefinitions$c.DigitCategory=DigitCategory;charCodeDefinitions$c.EofCategory=EofCategory;charCodeDefinitions$c.NameStartCategory=NameStartCategory;charCodeDefinitions$c.NonPrintableCategory=NonPrintableCategory;charCodeDefinitions$c.WhiteSpaceCategory=WhiteSpaceCategory;charCodeDefinitions$c.charCodeCategory=charCodeCategory;charCodeDefinitions$c.isBOM=isBOM;charCodeDefinitions$c.isDigit=isDigit$1;charCodeDefinitions$c.isHexDigit=isHexDigit;charCodeDefinitions$c.isIdentifierStart=isIdentifierStart;charCodeDefinitions$c.isLetter=isLetter;charCodeDefinitions$c.isLowercaseLetter=isLowercaseLetter;charCodeDefinitions$c.isName=isName;charCodeDefinitions$c.isNameStart=isNameStart;charCodeDefinitions$c.isNewline=isNewline;charCodeDefinitions$c.isNonAscii=isNonAscii;charCodeDefinitions$c.isNonPrintable=isNonPrintable;charCodeDefinitions$c.isNumberStart=isNumberStart;charCodeDefinitions$c.isUppercaseLetter=isUppercaseLetter;charCodeDefinitions$c.isValidEscape=isValidEscape;charCodeDefinitions$c.isWhiteSpace=isWhiteSpace;var utils$k={};const charCodeDefinitions$b=charCodeDefinitions$c;function getCharCode(source,offset){return offset<source.length?source.charCodeAt(offset):0}function getNewlineLength(source,offset,code){if(code===13&&getCharCode(source,offset+1)===10){return 2}return 1}function cmpChar(testStr,offset,referenceCode){let code=testStr.charCodeAt(offset);if(charCodeDefinitions$b.isUppercaseLetter(code)){code=code|32}return code===referenceCode}function cmpStr(testStr,start,end,referenceStr){if(end-start!==referenceStr.length){return false}if(start<0||end>testStr.length){return false}for(let i=start;i<end;i++){const referenceCode=referenceStr.charCodeAt(i-start);let testCode=testStr.charCodeAt(i);if(charCodeDefinitions$b.isUppercaseLetter(testCode)){testCode=testCode|32}if(testCode!==referenceCode){return false}}return true}function findWhiteSpaceStart(source,offset){for(;offset>=0;offset--){if(!charCodeDefinitions$b.isWhiteSpace(source.charCodeAt(offset))){break}}return offset+1}function findWhiteSpaceEnd(source,offset){for(;offset<source.length;offset++){if(!charCodeDefinitions$b.isWhiteSpace(source.charCodeAt(offset))){break}}return offset}function findDecimalNumberEnd(source,offset){for(;offset<source.length;offset++){if(!charCodeDefinitions$b.isDigit(source.charCodeAt(offset))){break}}return offset}function consumeEscaped(source,offset){offset+=2;if(charCodeDefinitions$b.isHexDigit(getCharCode(source,offset-1))){for(const maxOffset=Math.min(source.length,offset+5);offset<maxOffset;offset++){if(!charCodeDefinitions$b.isHexDigit(getCharCode(source,offset))){break}}const code=getCharCode(source,offset);if(charCodeDefinitions$b.isWhiteSpace(code)){offset+=getNewlineLength(source,offset,code)}}return offset}function consumeName(source,offset){for(;offset<source.length;offset++){const code=source.charCodeAt(offset);if(charCodeDefinitions$b.isName(code)){continue}if(charCodeDefinitions$b.isValidEscape(code,getCharCode(source,offset+1))){offset=consumeEscaped(source,offset)-1;continue}break}return offset}function consumeNumber$1(source,offset){let code=source.charCodeAt(offset);if(code===43||code===45){code=source.charCodeAt(offset+=1)}if(charCodeDefinitions$b.isDigit(code)){offset=findDecimalNumberEnd(source,offset+1);code=source.charCodeAt(offset)}if(code===46&&charCodeDefinitions$b.isDigit(source.charCodeAt(offset+1))){offset+=2;offset=findDecimalNumberEnd(source,offset)}if(cmpChar(source,offset,101)){let sign=0;code=source.charCodeAt(offset+1);if(code===45||code===43){sign=1;code=source.charCodeAt(offset+2)}if(charCodeDefinitions$b.isDigit(code)){offset=findDecimalNumberEnd(source,offset+1+sign+1)}}return offset}function consumeBadUrlRemnants(source,offset){for(;offset<source.length;offset++){const code=source.charCodeAt(offset);if(code===41){offset++;break}if(charCodeDefinitions$b.isValidEscape(code,getCharCode(source,offset+1))){offset=consumeEscaped(source,offset)}}return offset}function decodeEscaped(escaped){if(escaped.length===1&&!charCodeDefinitions$b.isHexDigit(escaped.charCodeAt(0))){return escaped[0]}let code=parseInt(escaped,16);if(code===0||code>=55296&&code<=57343||code>1114111){code=65533}return String.fromCodePoint(code)}utils$k.cmpChar=cmpChar;utils$k.cmpStr=cmpStr;utils$k.consumeBadUrlRemnants=consumeBadUrlRemnants;utils$k.consumeEscaped=consumeEscaped;utils$k.consumeName=consumeName;utils$k.consumeNumber=consumeNumber$1;utils$k.decodeEscaped=decodeEscaped;utils$k.findDecimalNumberEnd=findDecimalNumberEnd;utils$k.findWhiteSpaceEnd=findWhiteSpaceEnd;utils$k.findWhiteSpaceStart=findWhiteSpaceStart;utils$k.getNewlineLength=getNewlineLength;const tokenNames=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token"];var names$8=tokenNames;var OffsetToLocation$3={};var adoptBuffer$3={};const MIN_SIZE=16*1024;function adoptBuffer$2(buffer=null,size){if(buffer===null||buffer.length<size){return new Uint32Array(Math.max(size+1024,MIN_SIZE))}return buffer}adoptBuffer$3.adoptBuffer=adoptBuffer$2;const adoptBuffer$1=adoptBuffer$3;const charCodeDefinitions$a=charCodeDefinitions$c;const N$4=10;const F$2=12;const R$2=13;function computeLinesAndColumns(host){const source=host.source;const sourceLength=source.length;const startOffset=source.length>0?charCodeDefinitions$a.isBOM(source.charCodeAt(0)):0;const lines=adoptBuffer$1.adoptBuffer(host.lines,sourceLength);const columns=adoptBuffer$1.adoptBuffer(host.columns,sourceLength);let line=host.startLine;let column=host.startColumn;for(let i=startOffset;i<sourceLength;i++){const code=source.charCodeAt(i);lines[i]=line;columns[i]=column++;if(code===N$4||code===R$2||code===F$2){if(code===R$2&&i+1<sourceLength&&source.charCodeAt(i+1)===N$4){i++;lines[i]=line;columns[i]=column}line++;column=1}}lines[sourceLength]=line;columns[sourceLength]=column;host.lines=lines;host.columns=columns;host.computed=true}class OffsetToLocation$2{constructor(){this.lines=null;this.columns=null;this.computed=false}setSource(source,startOffset=0,startLine=1,startColumn=1){this.source=source;this.startOffset=startOffset;this.startLine=startLine;this.startColumn=startColumn;this.computed=false}getLocation(offset,filename){if(!this.computed){computeLinesAndColumns(this)}return{source:filename,offset:this.startOffset+offset,line:this.lines[offset],column:this.columns[offset]}}getLocationRange(start,end,filename){if(!this.computed){computeLinesAndColumns(this)}return{source:filename,start:{offset:this.startOffset+start,line:this.lines[start],column:this.columns[start]},end:{offset:this.startOffset+end,line:this.lines[end],column:this.columns[end]}}}}OffsetToLocation$3.OffsetToLocation=OffsetToLocation$2;var TokenStream$4={};const adoptBuffer=adoptBuffer$3;const utils$j=utils$k;const names$7=names$8;const types$Q=types$R;const OFFSET_MASK=16777215;const TYPE_SHIFT=24;const balancePair$1=new Map([[types$Q.Function,types$Q.RightParenthesis],[types$Q.LeftParenthesis,types$Q.RightParenthesis],[types$Q.LeftSquareBracket,types$Q.RightSquareBracket],[types$Q.LeftCurlyBracket,types$Q.RightCurlyBracket]]);class TokenStream$3{constructor(source,tokenize){this.setSource(source,tokenize)}reset(){this.eof=false;this.tokenIndex=-1;this.tokenType=0;this.tokenStart=this.firstCharOffset;this.tokenEnd=this.firstCharOffset}setSource(source="",tokenize=(()=>{})){source=String(source||"");const sourceLength=source.length;const offsetAndType=adoptBuffer.adoptBuffer(this.offsetAndType,source.length+1);const balance=adoptBuffer.adoptBuffer(this.balance,source.length+1);let tokenCount=0;let balanceCloseType=0;let balanceStart=0;let firstCharOffset=-1;this.offsetAndType=null;this.balance=null;tokenize(source,((type,start,end)=>{switch(type){default:balance[tokenCount]=sourceLength;break;case balanceCloseType:{let balancePrev=balanceStart&OFFSET_MASK;balanceStart=balance[balancePrev];balanceCloseType=balanceStart>>TYPE_SHIFT;balance[tokenCount]=balancePrev;balance[balancePrev++]=tokenCount;for(;balancePrev<tokenCount;balancePrev++){if(balance[balancePrev]===sourceLength){balance[balancePrev]=tokenCount}}break}case types$Q.LeftParenthesis:case types$Q.Function:case types$Q.LeftSquareBracket:case types$Q.LeftCurlyBracket:balance[tokenCount]=balanceStart;balanceCloseType=balancePair$1.get(type);balanceStart=balanceCloseType<<TYPE_SHIFT|tokenCount;break}offsetAndType[tokenCount++]=type<<TYPE_SHIFT|end;if(firstCharOffset===-1){firstCharOffset=start}}));offsetAndType[tokenCount]=types$Q.EOF<<TYPE_SHIFT|sourceLength;balance[tokenCount]=sourceLength;balance[sourceLength]=sourceLength;while(balanceStart!==0){const balancePrev=balanceStart&OFFSET_MASK;balanceStart=balance[balancePrev];balance[balancePrev]=sourceLength}this.source=source;this.firstCharOffset=firstCharOffset===-1?0:firstCharOffset;this.tokenCount=tokenCount;this.offsetAndType=offsetAndType;this.balance=balance;this.reset();this.next()}lookupType(offset){offset+=this.tokenIndex;if(offset<this.tokenCount){return this.offsetAndType[offset]>>TYPE_SHIFT}return types$Q.EOF}lookupOffset(offset){offset+=this.tokenIndex;if(offset<this.tokenCount){return this.offsetAndType[offset-1]&OFFSET_MASK}return this.source.length}lookupValue(offset,referenceStr){offset+=this.tokenIndex;if(offset<this.tokenCount){return utils$j.cmpStr(this.source,this.offsetAndType[offset-1]&OFFSET_MASK,this.offsetAndType[offset]&OFFSET_MASK,referenceStr)}return false}getTokenStart(tokenIndex){if(tokenIndex===this.tokenIndex){return this.tokenStart}if(tokenIndex>0){return tokenIndex<this.tokenCount?this.offsetAndType[tokenIndex-1]&OFFSET_MASK:this.offsetAndType[this.tokenCount]&OFFSET_MASK}return this.firstCharOffset}substrToCursor(start){return this.source.substring(start,this.tokenStart)}isBalanceEdge(pos){return this.balance[this.tokenIndex]<pos}isDelim(code,offset){if(offset){return this.lookupType(offset)===types$Q.Delim&&this.source.charCodeAt(this.lookupOffset(offset))===code}return this.tokenType===types$Q.Delim&&this.source.charCodeAt(this.tokenStart)===code}skip(tokenCount){let next=this.tokenIndex+tokenCount;if(next<this.tokenCount){this.tokenIndex=next;this.tokenStart=this.offsetAndType[next-1]&OFFSET_MASK;next=this.offsetAndType[next];this.tokenType=next>>TYPE_SHIFT;this.tokenEnd=next&OFFSET_MASK}else{this.tokenIndex=this.tokenCount;this.next()}}next(){let next=this.tokenIndex+1;if(next<this.tokenCount){this.tokenIndex=next;this.tokenStart=this.tokenEnd;next=this.offsetAndType[next];this.tokenType=next>>TYPE_SHIFT;this.tokenEnd=next&OFFSET_MASK}else{this.eof=true;this.tokenIndex=this.tokenCount;this.tokenType=types$Q.EOF;this.tokenStart=this.tokenEnd=this.source.length}}skipSC(){while(this.tokenType===types$Q.WhiteSpace||this.tokenType===types$Q.Comment){this.next()}}skipUntilBalanced(startToken,stopConsume){let cursor=startToken;let balanceEnd;let offset;loop:for(;cursor<this.tokenCount;cursor++){balanceEnd=this.balance[cursor];if(balanceEnd<startToken){break loop}offset=cursor>0?this.offsetAndType[cursor-1]&OFFSET_MASK:this.firstCharOffset;switch(stopConsume(this.source.charCodeAt(offset))){case 1:break loop;case 2:cursor++;break loop;default:if(this.balance[balanceEnd]===cursor){cursor=balanceEnd}}}this.skip(cursor-this.tokenIndex)}forEachToken(fn){for(let i=0,offset=this.firstCharOffset;i<this.tokenCount;i++){const start=offset;const item=this.offsetAndType[i];const end=item&OFFSET_MASK;const type=item>>TYPE_SHIFT;offset=end;fn(type,start,end,i)}}dump(){const tokens=new Array(this.tokenCount);this.forEachToken(((type,start,end,index)=>{tokens[index]={idx:index,type:names$7[type],chunk:this.source.substring(start,end),balance:this.balance[index]}}));return tokens}}TokenStream$4.TokenStream=TokenStream$3;const types$P=types$R;const charCodeDefinitions$9=charCodeDefinitions$c;const utils$i=utils$k;const names$6=names$8;const OffsetToLocation$1=OffsetToLocation$3;const TokenStream$2=TokenStream$4;function tokenize$2(source,onToken){function getCharCode(offset){return offset<sourceLength?source.charCodeAt(offset):0}function consumeNumericToken(){offset=utils$i.consumeNumber(source,offset);if(charCodeDefinitions$9.isIdentifierStart(getCharCode(offset),getCharCode(offset+1),getCharCode(offset+2))){type=types$P.Dimension;offset=utils$i.consumeName(source,offset);return}if(getCharCode(offset)===37){type=types$P.Percentage;offset++;return}type=types$P.Number}function consumeIdentLikeToken(){const nameStartOffset=offset;offset=utils$i.consumeName(source,offset);if(utils$i.cmpStr(source,nameStartOffset,offset,"url")&&getCharCode(offset)===40){offset=utils$i.findWhiteSpaceEnd(source,offset+1);if(getCharCode(offset)===34||getCharCode(offset)===39){type=types$P.Function;offset=nameStartOffset+4;return}consumeUrlToken();return}if(getCharCode(offset)===40){type=types$P.Function;offset++;return}type=types$P.Ident}function consumeStringToken(endingCodePoint){if(!endingCodePoint){endingCodePoint=getCharCode(offset++)}type=types$P.String;for(;offset<source.length;offset++){const code=source.charCodeAt(offset);switch(charCodeDefinitions$9.charCodeCategory(code)){case endingCodePoint:offset++;return;case charCodeDefinitions$9.WhiteSpaceCategory:if(charCodeDefinitions$9.isNewline(code)){offset+=utils$i.getNewlineLength(source,offset,code);type=types$P.BadString;return}break;case 92:if(offset===source.length-1){break}const nextCode=getCharCode(offset+1);if(charCodeDefinitions$9.isNewline(nextCode)){offset+=utils$i.getNewlineLength(source,offset+1,nextCode)}else if(charCodeDefinitions$9.isValidEscape(code,nextCode)){offset=utils$i.consumeEscaped(source,offset)-1}break}}}function consumeUrlToken(){type=types$P.Url;offset=utils$i.findWhiteSpaceEnd(source,offset);for(;offset<source.length;offset++){const code=source.charCodeAt(offset);switch(charCodeDefinitions$9.charCodeCategory(code)){case 41:offset++;return;case charCodeDefinitions$9.WhiteSpaceCategory:offset=utils$i.findWhiteSpaceEnd(source,offset);if(getCharCode(offset)===41||offset>=source.length){if(offset<source.length){offset++}return}offset=utils$i.consumeBadUrlRemnants(source,offset);type=types$P.BadUrl;return;case 34:case 39:case 40:case charCodeDefinitions$9.NonPrintableCategory:offset=utils$i.consumeBadUrlRemnants(source,offset);type=types$P.BadUrl;return;case 92:if(charCodeDefinitions$9.isValidEscape(code,getCharCode(offset+1))){offset=utils$i.consumeEscaped(source,offset)-1;break}offset=utils$i.consumeBadUrlRemnants(source,offset);type=types$P.BadUrl;return}}}source=String(source||"");const sourceLength=source.length;let start=charCodeDefinitions$9.isBOM(getCharCode(0));let offset=start;let type;while(offset<sourceLength){const code=source.charCodeAt(offset);switch(charCodeDefinitions$9.charCodeCategory(code)){case charCodeDefinitions$9.WhiteSpaceCategory:type=types$P.WhiteSpace;offset=utils$i.findWhiteSpaceEnd(source,offset+1);break;case 34:consumeStringToken();break;case 35:if(charCodeDefinitions$9.isName(getCharCode(offset+1))||charCodeDefinitions$9.isValidEscape(getCharCode(offset+1),getCharCode(offset+2))){type=types$P.Hash;offset=utils$i.consumeName(source,offset+1)}else{type=types$P.Delim;offset++}break;case 39:consumeStringToken();break;case 40:type=types$P.LeftParenthesis;offset++;break;case 41:type=types$P.RightParenthesis;offset++;break;case 43:if(charCodeDefinitions$9.isNumberStart(code,getCharCode(offset+1),getCharCode(offset+2))){consumeNumericToken()}else{type=types$P.Delim;offset++}break;case 44:type=types$P.Comma;offset++;break;case 45:if(charCodeDefinitions$9.isNumberStart(code,getCharCode(offset+1),getCharCode(offset+2))){consumeNumericToken()}else{if(getCharCode(offset+1)===45&&getCharCode(offset+2)===62){type=types$P.CDC;offset=offset+3}else{if(charCodeDefinitions$9.isIdentifierStart(code,getCharCode(offset+1),getCharCode(offset+2))){consumeIdentLikeToken()}else{type=types$P.Delim;offset++}}}break;case 46:if(charCodeDefinitions$9.isNumberStart(code,getCharCode(offset+1),getCharCode(offset+2))){consumeNumericToken()}else{type=types$P.Delim;offset++}break;case 47:if(getCharCode(offset+1)===42){type=types$P.Comment;offset=source.indexOf("*/",offset+2);offset=offset===-1?source.length:offset+2}else{type=types$P.Delim;offset++}break;case 58:type=types$P.Colon;offset++;break;case 59:type=types$P.Semicolon;offset++;break;case 60:if(getCharCode(offset+1)===33&&getCharCode(offset+2)===45&&getCharCode(offset+3)===45){type=types$P.CDO;offset=offset+4}else{type=types$P.Delim;offset++}break;case 64:if(charCodeDefinitions$9.isIdentifierStart(getCharCode(offset+1),getCharCode(offset+2),getCharCode(offset+3))){type=types$P.AtKeyword;offset=utils$i.consumeName(source,offset+1)}else{type=types$P.Delim;offset++}break;case 91:type=types$P.LeftSquareBracket;offset++;break;case 92:if(charCodeDefinitions$9.isValidEscape(code,getCharCode(offset+1))){consumeIdentLikeToken()}else{type=types$P.Delim;offset++}break;case 93:type=types$P.RightSquareBracket;offset++;break;case 123:type=types$P.LeftCurlyBracket;offset++;break;case 125:type=types$P.RightCurlyBracket;offset++;break;case charCodeDefinitions$9.DigitCategory:consumeNumericToken();break;case charCodeDefinitions$9.NameStartCategory:consumeIdentLikeToken();break;default:type=types$P.Delim;offset++}onToken(type,start,start=offset)}}tokenizer$2.AtKeyword=types$P.AtKeyword;tokenizer$2.BadString=types$P.BadString;tokenizer$2.BadUrl=types$P.BadUrl;tokenizer$2.CDC=types$P.CDC;tokenizer$2.CDO=types$P.CDO;tokenizer$2.Colon=types$P.Colon;tokenizer$2.Comma=types$P.Comma;tokenizer$2.Comment=types$P.Comment;tokenizer$2.Delim=types$P.Delim;tokenizer$2.Dimension=types$P.Dimension;tokenizer$2.EOF=types$P.EOF;tokenizer$2.Function=types$P.Function;tokenizer$2.Hash=types$P.Hash;tokenizer$2.Ident=types$P.Ident;tokenizer$2.LeftCurlyBracket=types$P.LeftCurlyBracket;tokenizer$2.LeftParenthesis=types$P.LeftParenthesis;tokenizer$2.LeftSquareBracket=types$P.LeftSquareBracket;tokenizer$2.Number=types$P.Number;tokenizer$2.Percentage=types$P.Percentage;tokenizer$2.RightCurlyBracket=types$P.RightCurlyBracket;tokenizer$2.RightParenthesis=types$P.RightParenthesis;tokenizer$2.RightSquareBracket=types$P.RightSquareBracket;tokenizer$2.Semicolon=types$P.Semicolon;tokenizer$2.String=types$P.String;tokenizer$2.Url=types$P.Url;tokenizer$2.WhiteSpace=types$P.WhiteSpace;tokenizer$2.tokenTypes=types$P;tokenizer$2.DigitCategory=charCodeDefinitions$9.DigitCategory;tokenizer$2.EofCategory=charCodeDefinitions$9.EofCategory;tokenizer$2.NameStartCategory=charCodeDefinitions$9.NameStartCategory;tokenizer$2.NonPrintableCategory=charCodeDefinitions$9.NonPrintableCategory;tokenizer$2.WhiteSpaceCategory=charCodeDefinitions$9.WhiteSpaceCategory;tokenizer$2.charCodeCategory=charCodeDefinitions$9.charCodeCategory;tokenizer$2.isBOM=charCodeDefinitions$9.isBOM;tokenizer$2.isDigit=charCodeDefinitions$9.isDigit;tokenizer$2.isHexDigit=charCodeDefinitions$9.isHexDigit;tokenizer$2.isIdentifierStart=charCodeDefinitions$9.isIdentifierStart;tokenizer$2.isLetter=charCodeDefinitions$9.isLetter;tokenizer$2.isLowercaseLetter=charCodeDefinitions$9.isLowercaseLetter;tokenizer$2.isName=charCodeDefinitions$9.isName;tokenizer$2.isNameStart=charCodeDefinitions$9.isNameStart;tokenizer$2.isNewline=charCodeDefinitions$9.isNewline;tokenizer$2.isNonAscii=charCodeDefinitions$9.isNonAscii;tokenizer$2.isNonPrintable=charCodeDefinitions$9.isNonPrintable;tokenizer$2.isNumberStart=charCodeDefinitions$9.isNumberStart;tokenizer$2.isUppercaseLetter=charCodeDefinitions$9.isUppercaseLetter;tokenizer$2.isValidEscape=charCodeDefinitions$9.isValidEscape;tokenizer$2.isWhiteSpace=charCodeDefinitions$9.isWhiteSpace;tokenizer$2.cmpChar=utils$i.cmpChar;tokenizer$2.cmpStr=utils$i.cmpStr;tokenizer$2.consumeBadUrlRemnants=utils$i.consumeBadUrlRemnants;tokenizer$2.consumeEscaped=utils$i.consumeEscaped;tokenizer$2.consumeName=utils$i.consumeName;tokenizer$2.consumeNumber=utils$i.consumeNumber;tokenizer$2.decodeEscaped=utils$i.decodeEscaped;tokenizer$2.findDecimalNumberEnd=utils$i.findDecimalNumberEnd;tokenizer$2.findWhiteSpaceEnd=utils$i.findWhiteSpaceEnd;tokenizer$2.findWhiteSpaceStart=utils$i.findWhiteSpaceStart;tokenizer$2.getNewlineLength=utils$i.getNewlineLength;tokenizer$2.tokenNames=names$6;tokenizer$2.OffsetToLocation=OffsetToLocation$1.OffsetToLocation;tokenizer$2.TokenStream=TokenStream$2.TokenStream;tokenizer$2.tokenize=tokenize$2;var create$7={};var List$7={};let releasedCursors=null;class List$6{static createItem(data){return{prev:null,next:null,data:data}}constructor(){this.head=null;this.tail=null;this.cursor=null}createItem(data){return List$6.createItem(data)}allocateCursor(prev,next){let cursor;if(releasedCursors!==null){cursor=releasedCursors;releasedCursors=releasedCursors.cursor;cursor.prev=prev;cursor.next=next;cursor.cursor=this.cursor}else{cursor={prev:prev,next:next,cursor:this.cursor}}this.cursor=cursor;return cursor}releaseCursor(){const{cursor:cursor}=this;this.cursor=cursor.cursor;cursor.prev=null;cursor.next=null;cursor.cursor=releasedCursors;releasedCursors=cursor}updateCursors(prevOld,prevNew,nextOld,nextNew){let{cursor:cursor}=this;while(cursor!==null){if(cursor.prev===prevOld){cursor.prev=prevNew}if(cursor.next===nextOld){cursor.next=nextNew}cursor=cursor.cursor}}*[Symbol.iterator](){for(let cursor=this.head;cursor!==null;cursor=cursor.next){yield cursor.data}}get size(){let size=0;for(let cursor=this.head;cursor!==null;cursor=cursor.next){size++}return size}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(array){let cursor=null;this.head=null;for(let data of array){const item=List$6.createItem(data);if(cursor!==null){cursor.next=item}else{this.head=item}item.prev=cursor;cursor=item}this.tail=cursor;return this}toArray(){return[...this]}toJSON(){return[...this]}forEach(fn,thisArg=this){const cursor=this.allocateCursor(null,this.head);while(cursor.next!==null){const item=cursor.next;cursor.next=item.next;fn.call(thisArg,item.data,item,this)}this.releaseCursor()}forEachRight(fn,thisArg=this){const cursor=this.allocateCursor(this.tail,null);while(cursor.prev!==null){const item=cursor.prev;cursor.prev=item.prev;fn.call(thisArg,item.data,item,this)}this.releaseCursor()}reduce(fn,initialValue,thisArg=this){let cursor=this.allocateCursor(null,this.head);let acc=initialValue;let item;while(cursor.next!==null){item=cursor.next;cursor.next=item.next;acc=fn.call(thisArg,acc,item.data,item,this)}this.releaseCursor();return acc}reduceRight(fn,initialValue,thisArg=this){let cursor=this.allocateCursor(this.tail,null);let acc=initialValue;let item;while(cursor.prev!==null){item=cursor.prev;cursor.prev=item.prev;acc=fn.call(thisArg,acc,item.data,item,this)}this.releaseCursor();return acc}some(fn,thisArg=this){for(let cursor=this.head;cursor!==null;cursor=cursor.next){if(fn.call(thisArg,cursor.data,cursor,this)){return true}}return false}map(fn,thisArg=this){const result=new List$6;for(let cursor=this.head;cursor!==null;cursor=cursor.next){result.appendData(fn.call(thisArg,cursor.data,cursor,this))}return result}filter(fn,thisArg=this){const result=new List$6;for(let cursor=this.head;cursor!==null;cursor=cursor.next){if(fn.call(thisArg,cursor.data,cursor,this)){result.appendData(cursor.data)}}return result}nextUntil(start,fn,thisArg=this){if(start===null){return}const cursor=this.allocateCursor(null,start);while(cursor.next!==null){const item=cursor.next;cursor.next=item.next;if(fn.call(thisArg,item.data,item,this)){break}}this.releaseCursor()}prevUntil(start,fn,thisArg=this){if(start===null){return}const cursor=this.allocateCursor(start,null);while(cursor.prev!==null){const item=cursor.prev;cursor.prev=item.prev;if(fn.call(thisArg,item.data,item,this)){break}}this.releaseCursor()}clear(){this.head=null;this.tail=null}copy(){const result=new List$6;for(let data of this){result.appendData(data)}return result}prepend(item){this.updateCursors(null,item,this.head,item);if(this.head!==null){this.head.prev=item;item.next=this.head}else{this.tail=item}this.head=item;return this}prependData(data){return this.prepend(List$6.createItem(data))}append(item){return this.insert(item)}appendData(data){return this.insert(List$6.createItem(data))}insert(item,before=null){if(before!==null){this.updateCursors(before.prev,item,before,item);if(before.prev===null){if(this.head!==before){throw new Error("before doesn't belong to list")}this.head=item;before.prev=item;item.next=before;this.updateCursors(null,item)}else{before.prev.next=item;item.prev=before.prev;before.prev=item;item.next=before}}else{this.updateCursors(this.tail,item,null,item);if(this.tail!==null){this.tail.next=item;item.prev=this.tail}else{this.head=item}this.tail=item}return this}insertData(data,before){return this.insert(List$6.createItem(data),before)}remove(item){this.updateCursors(item,item.prev,item,item.next);if(item.prev!==null){item.prev.next=item.next}else{if(this.head!==item){throw new Error("item doesn't belong to list")}this.head=item.next}if(item.next!==null){item.next.prev=item.prev}else{if(this.tail!==item){throw new Error("item doesn't belong to list")}this.tail=item.prev}item.prev=null;item.next=null;return item}push(data){this.insert(List$6.createItem(data))}pop(){return this.tail!==null?this.remove(this.tail):null}unshift(data){this.prepend(List$6.createItem(data))}shift(){return this.head!==null?this.remove(this.head):null}prependList(list){return this.insertList(list,this.head)}appendList(list){return this.insertList(list)}insertList(list,before){if(list.head===null){return this}if(before!==undefined&&before!==null){this.updateCursors(before.prev,list.tail,before,list.head);if(before.prev!==null){before.prev.next=list.head;list.head.prev=before.prev}else{this.head=list.head}before.prev=list.tail;list.tail.next=before}else{this.updateCursors(this.tail,list.tail,null,list.head);if(this.tail!==null){this.tail.next=list.head;list.head.prev=this.tail}else{this.head=list.head}this.tail=list.tail}list.head=null;list.tail=null;return this}replace(oldItem,newItemOrList){if("head"in newItemOrList){this.insertList(newItemOrList,oldItem)}else{this.insert(newItemOrList,oldItem)}this.remove(oldItem)}}List$7.List=List$6;var _SyntaxError$1={};var createCustomError$4={};function createCustomError$3(name,message){const error=Object.create(SyntaxError.prototype);const errorStack=new Error;return Object.assign(error,{name:name,message:message,get stack(){return(errorStack.stack||"").replace(/^(.+\n){1,3}/,`${name}: ${message}\n`)}})}createCustomError$4.createCustomError=createCustomError$3;const createCustomError$2=createCustomError$4;const MAX_LINE_LENGTH=100;const OFFSET_CORRECTION=60;const TAB_REPLACEMENT=" ";function sourceFragment({source:source,line:line,column:column},extraLines){function processLines(start,end){return lines.slice(start,end).map(((line,idx)=>String(start+idx+1).padStart(maxNumLength)+" |"+line)).join("\n")}const lines=source.split(/\r\n?|\n|\f/);const startLine=Math.max(1,line-extraLines)-1;const endLine=Math.min(line+extraLines,lines.length+1);const maxNumLength=Math.max(4,String(endLine).length)+1;let cutLeft=0;column+=(TAB_REPLACEMENT.length-1)*(lines[line-1].substr(0,column-1).match(/\t/g)||[]).length;if(column>MAX_LINE_LENGTH){cutLeft=column-OFFSET_CORRECTION+3;column=OFFSET_CORRECTION-2}for(let i=startLine;i<=endLine;i++){if(i>=0&&i<lines.length){lines[i]=lines[i].replace(/\t/g,TAB_REPLACEMENT);lines[i]=(cutLeft>0&&lines[i].length>cutLeft?"…":"")+lines[i].substr(cutLeft,MAX_LINE_LENGTH-2)+(lines[i].length>cutLeft+MAX_LINE_LENGTH-1?"…":"")}}return[processLines(startLine,line),new Array(column+maxNumLength+2).join("-")+"^",processLines(line,endLine)].filter(Boolean).join("\n")}function SyntaxError$5(message,source,offset,line,column){const error=Object.assign(createCustomError$2.createCustomError("SyntaxError",message),{source:source,offset:offset,line:line,column:column,sourceFragment(extraLines){return sourceFragment({source:source,line:line,column:column},isNaN(extraLines)?0:extraLines)},get formattedMessage(){return`Parse error: ${message}\n`+sourceFragment({source:source,line:line,column:column},2)}});return error}_SyntaxError$1.SyntaxError=SyntaxError$5;var sequence$1={};const types$O=types$R;function readSequence$1(recognizer){const children=this.createList();let space=false;const context={recognizer:recognizer};while(!this.eof){switch(this.tokenType){case types$O.Comment:this.next();continue;case types$O.WhiteSpace:space=true;this.next();continue}let child=recognizer.getNode.call(this,context);if(child===undefined){break}if(space){if(recognizer.onWhiteSpace){recognizer.onWhiteSpace.call(this,child,children,context)}space=false}children.push(child)}if(space&&recognizer.onWhiteSpace){recognizer.onWhiteSpace.call(this,null,children,context)}return children}sequence$1.readSequence=readSequence$1;const List$5=List$7;const SyntaxError$4=_SyntaxError$1;const index$b=tokenizer$2;const sequence=sequence$1;const OffsetToLocation=OffsetToLocation$3;const TokenStream$1=TokenStream$4;const utils$h=utils$k;const types$N=types$R;const names$5=names$8;const NOOP=()=>{};const EXCLAMATIONMARK$3=33;const NUMBERSIGN$4=35;const SEMICOLON=59;const LEFTCURLYBRACKET$1=123;const NULL=0;function createParseContext(name){return function(){return this[name]()}}function fetchParseValues(dict){const result=Object.create(null);for(const name in dict){const item=dict[name];const fn=item.parse||item;if(fn){result[name]=fn}}return result}function processConfig(config){const parseConfig={context:Object.create(null),scope:Object.assign(Object.create(null),config.scope),atrule:fetchParseValues(config.atrule),pseudo:fetchParseValues(config.pseudo),node:fetchParseValues(config.node)};for(const name in config.parseContext){switch(typeof config.parseContext[name]){case"function":parseConfig.context[name]=config.parseContext[name];break;case"string":parseConfig.context[name]=createParseContext(config.parseContext[name]);break}}return{config:parseConfig,...parseConfig,...parseConfig.node}}function createParser(config){let source="";let filename="<unknown>";let needPositions=false;let onParseError=NOOP;let onParseErrorThrow=false;const locationMap=new OffsetToLocation.OffsetToLocation;const parser=Object.assign(new TokenStream$1.TokenStream,processConfig(config||{}),{parseAtrulePrelude:true,parseRulePrelude:true,parseValue:true,parseCustomProperty:false,readSequence:sequence.readSequence,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(code){return code===LEFTCURLYBRACKET$1?1:0},consumeUntilLeftCurlyBracketOrSemicolon(code){return code===LEFTCURLYBRACKET$1||code===SEMICOLON?1:0},consumeUntilExclamationMarkOrSemicolon(code){return code===EXCLAMATIONMARK$3||code===SEMICOLON?1:0},consumeUntilSemicolonIncluded(code){return code===SEMICOLON?2:0},createList(){return new List$5.List},createSingleNodeList(node){return(new List$5.List).appendData(node)},getFirstListNode(list){return list&&list.first},getLastListNode(list){return list&&list.last},parseWithFallback(consumer,fallback){const startToken=this.tokenIndex;try{return consumer.call(this)}catch(e){if(onParseErrorThrow){throw e}const fallbackNode=fallback.call(this,startToken);onParseErrorThrow=true;onParseError(e,fallbackNode);onParseErrorThrow=false;return fallbackNode}},lookupNonWSType(offset){let type;do{type=this.lookupType(offset++);if(type!==types$N.WhiteSpace){return type}}while(type!==NULL);return NULL},charCodeAt(offset){return offset>=0&&offset<source.length?source.charCodeAt(offset):0},substring(offsetStart,offsetEnd){return source.substring(offsetStart,offsetEnd)},substrToCursor(start){return this.source.substring(start,this.tokenStart)},cmpChar(offset,charCode){return utils$h.cmpChar(source,offset,charCode)},cmpStr(offsetStart,offsetEnd,str){return utils$h.cmpStr(source,offsetStart,offsetEnd,str)},consume(tokenType){const start=this.tokenStart;this.eat(tokenType);return this.substrToCursor(start)},consumeFunctionName(){const name=source.substring(this.tokenStart,this.tokenEnd-1);this.eat(types$N.Function);return name},consumeNumber(type){const number=source.substring(this.tokenStart,utils$h.consumeNumber(source,this.tokenStart));this.eat(type);return number},eat(tokenType){if(this.tokenType!==tokenType){const tokenName=names$5[tokenType].slice(0,-6).replace(/-/g," ").replace(/^./,(m=>m.toUpperCase()));let message=`${/[[\](){}]/.test(tokenName)?`"${tokenName}"`:tokenName} is expected`;let offset=this.tokenStart;switch(tokenType){case types$N.Ident:if(this.tokenType===types$N.Function||this.tokenType===types$N.Url){offset=this.tokenEnd-1;message="Identifier is expected but function found"}else{message="Identifier is expected"}break;case types$N.Hash:if(this.isDelim(NUMBERSIGN$4)){this.next();offset++;message="Name is expected"}break;case types$N.Percentage:if(this.tokenType===types$N.Number){offset=this.tokenEnd;message="Percent sign is expected"}break}this.error(message,offset)}this.next()},eatIdent(name){if(this.tokenType!==types$N.Ident||this.lookupValue(0,name)===false){this.error(`Identifier "${name}" is expected`)}this.next()},eatDelim(code){if(!this.isDelim(code)){this.error(`Delim "${String.fromCharCode(code)}" is expected`)}this.next()},getLocation(start,end){if(needPositions){return locationMap.getLocationRange(start,end,filename)}return null},getLocationFromList(list){if(needPositions){const head=this.getFirstListNode(list);const tail=this.getLastListNode(list);return locationMap.getLocationRange(head!==null?head.loc.start.offset-locationMap.startOffset:this.tokenStart,tail!==null?tail.loc.end.offset-locationMap.startOffset:this.tokenStart,filename)}return null},error(message,offset){const location=typeof offset!=="undefined"&&offset<source.length?locationMap.getLocation(offset):this.eof?locationMap.getLocation(utils$h.findWhiteSpaceStart(source,source.length-1)):locationMap.getLocation(this.tokenStart);throw new SyntaxError$4.SyntaxError(message||"Unexpected input",source,location.offset,location.line,location.column)}});const parse=function(source_,options){source=source_;options=options||{};parser.setSource(source,index$b.tokenize);locationMap.setSource(source,options.offset,options.line,options.column);filename=options.filename||"<unknown>";needPositions=Boolean(options.positions);onParseError=typeof options.onParseError==="function"?options.onParseError:NOOP;onParseErrorThrow=false;parser.parseAtrulePrelude="parseAtrulePrelude"in options?Boolean(options.parseAtrulePrelude):true;parser.parseRulePrelude="parseRulePrelude"in options?Boolean(options.parseRulePrelude):true;parser.parseValue="parseValue"in options?Boolean(options.parseValue):true;parser.parseCustomProperty="parseCustomProperty"in options?Boolean(options.parseCustomProperty):false;const{context:context="default",onComment:onComment}=options;if(context in parser.context===false){throw new Error("Unknown context `"+context+"`")}if(typeof onComment==="function"){parser.forEachToken(((type,start,end)=>{if(type===types$N.Comment){const loc=parser.getLocation(start,end);const value=utils$h.cmpStr(source,end-2,end,"*/")?source.slice(start+2,end-2):source.slice(start+2,end);onComment(value,loc)}}))}const ast=parser.context[context].call(parser,options);if(!parser.eof){parser.error()}return ast};return Object.assign(parse,{SyntaxError:SyntaxError$4.SyntaxError,config:parser.config})}create$7.createParser=createParser;var create$6={};var sourceMap$1={};const sourceMapGenerator_js=sourceMapGenerator;const trackNodes=new Set(["Atrule","Selector","Declaration"]);function generateSourceMap(handlers){const map=new sourceMapGenerator_js.SourceMapGenerator;const generated={line:1,column:0};const original={line:0,column:0};const activatedGenerated={line:1,column:0};const activatedMapping={generated:activatedGenerated};let line=1;let column=0;let sourceMappingActive=false;const origHandlersNode=handlers.node;handlers.node=function(node){if(node.loc&&node.loc.start&&trackNodes.has(node.type)){const nodeLine=node.loc.start.line;const nodeColumn=node.loc.start.column-1;if(original.line!==nodeLine||original.column!==nodeColumn){original.line=nodeLine;original.column=nodeColumn;generated.line=line;generated.column=column;if(sourceMappingActive){sourceMappingActive=false;if(generated.line!==activatedGenerated.line||generated.column!==activatedGenerated.column){map.addMapping(activatedMapping)}}sourceMappingActive=true;map.addMapping({source:node.loc.source,original:original,generated:generated})}}origHandlersNode.call(this,node);if(sourceMappingActive&&trackNodes.has(node.type)){activatedGenerated.line=line;activatedGenerated.column=column}};const origHandlersEmit=handlers.emit;handlers.emit=function(value,type,auto){for(let i=0;i<value.length;i++){if(value.charCodeAt(i)===10){line++;column=0}else{column++}}origHandlersEmit(value,type,auto)};const origHandlersResult=handlers.result;handlers.result=function(){if(sourceMappingActive){map.addMapping(activatedMapping)}return{css:origHandlersResult(),map:map}};return handlers}sourceMap$1.generateSourceMap=generateSourceMap;var tokenBefore$1={};const types$M=types$R;const PLUSSIGN$9=43;const HYPHENMINUS$6=45;const code=(type,value)=>{if(type===types$M.Delim){type=value}if(typeof type==="string"){const charCode=type.charCodeAt(0);return charCode>127?32768:charCode<<8}return type};const specPairs=[[types$M.Ident,types$M.Ident],[types$M.Ident,types$M.Function],[types$M.Ident,types$M.Url],[types$M.Ident,types$M.BadUrl],[types$M.Ident,"-"],[types$M.Ident,types$M.Number],[types$M.Ident,types$M.Percentage],[types$M.Ident,types$M.Dimension],[types$M.Ident,types$M.CDC],[types$M.Ident,types$M.LeftParenthesis],[types$M.AtKeyword,types$M.Ident],[types$M.AtKeyword,types$M.Function],[types$M.AtKeyword,types$M.Url],[types$M.AtKeyword,types$M.BadUrl],[types$M.AtKeyword,"-"],[types$M.AtKeyword,types$M.Number],[types$M.AtKeyword,types$M.Percentage],[types$M.AtKeyword,types$M.Dimension],[types$M.AtKeyword,types$M.CDC],[types$M.Hash,types$M.Ident],[types$M.Hash,types$M.Function],[types$M.Hash,types$M.Url],[types$M.Hash,types$M.BadUrl],[types$M.Hash,"-"],[types$M.Hash,types$M.Number],[types$M.Hash,types$M.Percentage],[types$M.Hash,types$M.Dimension],[types$M.Hash,types$M.CDC],[types$M.Dimension,types$M.Ident],[types$M.Dimension,types$M.Function],[types$M.Dimension,types$M.Url],[types$M.Dimension,types$M.BadUrl],[types$M.Dimension,"-"],[types$M.Dimension,types$M.Number],[types$M.Dimension,types$M.Percentage],[types$M.Dimension,types$M.Dimension],[types$M.Dimension,types$M.CDC],["#",types$M.Ident],["#",types$M.Function],["#",types$M.Url],["#",types$M.BadUrl],["#","-"],["#",types$M.Number],["#",types$M.Percentage],["#",types$M.Dimension],["#",types$M.CDC],["-",types$M.Ident],["-",types$M.Function],["-",types$M.Url],["-",types$M.BadUrl],["-","-"],["-",types$M.Number],["-",types$M.Percentage],["-",types$M.Dimension],["-",types$M.CDC],[types$M.Number,types$M.Ident],[types$M.Number,types$M.Function],[types$M.Number,types$M.Url],[types$M.Number,types$M.BadUrl],[types$M.Number,types$M.Number],[types$M.Number,types$M.Percentage],[types$M.Number,types$M.Dimension],[types$M.Number,"%"],[types$M.Number,types$M.CDC],["@",types$M.Ident],["@",types$M.Function],["@",types$M.Url],["@",types$M.BadUrl],["@","-"],["@",types$M.CDC],[".",types$M.Number],[".",types$M.Percentage],[".",types$M.Dimension],["+",types$M.Number],["+",types$M.Percentage],["+",types$M.Dimension],["/","*"]];const safePairs=specPairs.concat([[types$M.Ident,types$M.Hash],[types$M.Dimension,types$M.Hash],[types$M.Hash,types$M.Hash],[types$M.AtKeyword,types$M.LeftParenthesis],[types$M.AtKeyword,types$M.String],[types$M.AtKeyword,types$M.Colon],[types$M.Percentage,types$M.Percentage],[types$M.Percentage,types$M.Dimension],[types$M.Percentage,types$M.Function],[types$M.Percentage,"-"],[types$M.RightParenthesis,types$M.Ident],[types$M.RightParenthesis,types$M.Function],[types$M.RightParenthesis,types$M.Percentage],[types$M.RightParenthesis,types$M.Dimension],[types$M.RightParenthesis,types$M.Hash],[types$M.RightParenthesis,"-"]]);function createMap(pairs){const isWhiteSpaceRequired=new Set(pairs.map((([prev,next])=>code(prev)<<16|code(next))));return function(prevCode,type,value){const nextCode=code(type,value);const nextCharCode=value.charCodeAt(0);const emitWs=nextCharCode===HYPHENMINUS$6&&type!==types$M.Ident&&type!==types$M.Function&&type!==types$M.CDC||nextCharCode===PLUSSIGN$9?isWhiteSpaceRequired.has(prevCode<<16|nextCharCode<<8):isWhiteSpaceRequired.has(prevCode<<16|nextCode);if(emitWs){this.emit(" ",types$M.WhiteSpace,true)}return nextCode}}const spec=createMap(specPairs);const safe=createMap(safePairs);tokenBefore$1.safe=safe;tokenBefore$1.spec=spec;const index$a=tokenizer$2;const sourceMap=sourceMap$1;const tokenBefore=tokenBefore$1;const types$L=types$R;const REVERSESOLIDUS=92;function processChildren(node,delimeter){if(typeof delimeter==="function"){let prev=null;node.children.forEach((node=>{if(prev!==null){delimeter.call(this,prev)}this.node(node);prev=node}));return}node.children.forEach(this.node,this)}function processChunk(chunk){index$a.tokenize(chunk,((type,start,end)=>{this.token(type,chunk.slice(start,end))}))}function createGenerator(config){const types$1=new Map;for(let name in config.node){const item=config.node[name];const fn=item.generate||item;if(typeof fn==="function"){types$1.set(name,item.generate||item)}}return function(node,options){let buffer="";let prevCode=0;let handlers={node(node){if(types$1.has(node.type)){types$1.get(node.type).call(publicApi,node)}else{throw new Error("Unknown node type: "+node.type)}},tokenBefore:tokenBefore.safe,token(type,value){prevCode=this.tokenBefore(prevCode,type,value);this.emit(value,type,false);if(type===types$L.Delim&&value.charCodeAt(0)===REVERSESOLIDUS){this.emit("\n",types$L.WhiteSpace,true)}},emit(value){buffer+=value},result(){return buffer}};if(options){if(typeof options.decorator==="function"){handlers=options.decorator(handlers)}if(options.sourceMap){handlers=sourceMap.generateSourceMap(handlers)}if(options.mode in tokenBefore){handlers.tokenBefore=tokenBefore[options.mode]}}const publicApi={node:node=>handlers.node(node),children:processChildren,token:(type,value)=>handlers.token(type,value),tokenize:processChunk};handlers.node(node);return handlers.result()}}create$6.createGenerator=createGenerator;var create$5={};const List$4=List$7;function createConvertor(walk){return{fromPlainObject(ast){walk(ast,{enter(node){if(node.children&&node.children instanceof List$4.List===false){node.children=(new List$4.List).fromArray(node.children)}}});return ast},toPlainObject(ast){walk(ast,{leave(node){if(node.children&&node.children instanceof List$4.List){node.children=node.children.toArray()}}});return ast}}}create$5.createConvertor=createConvertor;var create$4={};const{hasOwnProperty:hasOwnProperty$8}=Object.prototype;const noop$2=function(){};function ensureFunction$1(value){return typeof value==="function"?value:noop$2}function invokeForType(fn,type){return function(node,item,list){if(node.type===type){fn.call(this,node,item,list)}}}function getWalkersFromStructure(name,nodeType){const structure=nodeType.structure;const walkers=[];for(const key in structure){if(hasOwnProperty$8.call(structure,key)===false){continue}let fieldTypes=structure[key];const walker={name:key,type:false,nullable:false};if(!Array.isArray(fieldTypes)){fieldTypes=[fieldTypes]}for(const fieldType of fieldTypes){if(fieldType===null){walker.nullable=true}else if(typeof fieldType==="string"){walker.type="node"}else if(Array.isArray(fieldType)){walker.type="list"}}if(walker.type){walkers.push(walker)}}if(walkers.length){return{context:nodeType.walkContext,fields:walkers}}return null}function getTypesFromConfig(config){const types={};for(const name in config.node){if(hasOwnProperty$8.call(config.node,name)){const nodeType=config.node[name];if(!nodeType.structure){throw new Error("Missed `structure` field in `"+name+"` node type definition")}types[name]=getWalkersFromStructure(name,nodeType)}}return types}function createTypeIterator(config,reverse){const fields=config.fields.slice();const contextName=config.context;const useContext=typeof contextName==="string";if(reverse){fields.reverse()}return function(node,context,walk,walkReducer){let prevContextValue;if(useContext){prevContextValue=context[contextName];context[contextName]=node}for(const field of fields){const ref=node[field.name];if(!field.nullable||ref){if(field.type==="list"){const breakWalk=reverse?ref.reduceRight(walkReducer,false):ref.reduce(walkReducer,false);if(breakWalk){return true}}else if(walk(ref)){return true}}}if(useContext){context[contextName]=prevContextValue}}}function createFastTraveralMap({StyleSheet:StyleSheet,Atrule:Atrule,Rule:Rule,Block:Block,DeclarationList:DeclarationList}){return{Atrule:{StyleSheet:StyleSheet,Atrule:Atrule,Rule:Rule,Block:Block},Rule:{StyleSheet:StyleSheet,Atrule:Atrule,Rule:Rule,Block:Block},Declaration:{StyleSheet:StyleSheet,Atrule:Atrule,Rule:Rule,Block:Block,DeclarationList:DeclarationList}}}function createWalker(config){const types=getTypesFromConfig(config);const iteratorsNatural={};const iteratorsReverse={};const breakWalk=Symbol("break-walk");const skipNode=Symbol("skip-node");for(const name in types){if(hasOwnProperty$8.call(types,name)&&types[name]!==null){iteratorsNatural[name]=createTypeIterator(types[name],false);iteratorsReverse[name]=createTypeIterator(types[name],true)}}const fastTraversalIteratorsNatural=createFastTraveralMap(iteratorsNatural);const fastTraversalIteratorsReverse=createFastTraveralMap(iteratorsReverse);const walk=function(root,options){function walkNode(node,item,list){const enterRet=enter.call(context,node,item,list);if(enterRet===breakWalk){return true}if(enterRet===skipNode){return false}if(iterators.hasOwnProperty(node.type)){if(iterators[node.type](node,context,walkNode,walkReducer)){return true}}if(leave.call(context,node,item,list)===breakWalk){return true}return false}let enter=noop$2;let leave=noop$2;let iterators=iteratorsNatural;let walkReducer=(ret,data,item,list)=>ret||walkNode(data,item,list);const context={break:breakWalk,skip:skipNode,root:root,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof options==="function"){enter=options}else if(options){enter=ensureFunction$1(options.enter);leave=ensureFunction$1(options.leave);if(options.reverse){iterators=iteratorsReverse}if(options.visit){if(fastTraversalIteratorsNatural.hasOwnProperty(options.visit)){iterators=options.reverse?fastTraversalIteratorsReverse[options.visit]:fastTraversalIteratorsNatural[options.visit]}else if(!types.hasOwnProperty(options.visit)){throw new Error("Bad value `"+options.visit+"` for `visit` option (should be: "+Object.keys(types).sort().join(", ")+")")}enter=invokeForType(enter,options.visit);leave=invokeForType(leave,options.visit)}}if(enter===noop$2&&leave===noop$2){throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function")}walkNode(root)};walk.break=breakWalk;walk.skip=skipNode;walk.find=function(ast,fn){let found=null;walk(ast,(function(node,item,list){if(fn.call(this,node,item,list)){found=node;return breakWalk}}));return found};walk.findLast=function(ast,fn){let found=null;walk(ast,{reverse:true,enter(node,item,list){if(fn.call(this,node,item,list)){found=node;return breakWalk}}});return found};walk.findAll=function(ast,fn){const found=[];walk(ast,(function(node,item,list){if(fn.call(this,node,item,list)){found.push(node)}}));return found};return walk}create$4.createWalker=createWalker;var Lexer$3={};var error$2={};var generate$L={};function noop$1(value){return value}function generateMultiplier(multiplier){const{min:min,max:max,comma:comma}=multiplier;if(min===0&&max===0){return comma?"#?":"*"}if(min===0&&max===1){return"?"}if(min===1&&max===0){return comma?"#":"+"}if(min===1&&max===1){return""}return(comma?"#":"")+(min===max?"{"+min+"}":"{"+min+","+(max!==0?max:"")+"}")}function generateTypeOpts(node){switch(node.type){case"Range":return" ["+(node.min===null?"-∞":node.min)+","+(node.max===null?"∞":node.max)+"]";default:throw new Error("Unknown node type `"+node.type+"`")}}function generateSequence(node,decorate,forceBraces,compact){const combinator=node.combinator===" "||compact?node.combinator:" "+node.combinator+" ";const result=node.terms.map((term=>internalGenerate(term,decorate,forceBraces,compact))).join(combinator);if(node.explicit||forceBraces){return(compact||result[0]===","?"[":"[ ")+result+(compact?"]":" ]")}return result}function internalGenerate(node,decorate,forceBraces,compact){let result;switch(node.type){case"Group":result=generateSequence(node,decorate,forceBraces,compact)+(node.disallowEmpty?"!":"");break;case"Multiplier":return internalGenerate(node.term,decorate,forceBraces,compact)+decorate(generateMultiplier(node),node);case"Type":result="<"+node.name+(node.opts?decorate(generateTypeOpts(node.opts),node.opts):"")+">";break;case"Property":result="<'"+node.name+"'>";break;case"Keyword":result=node.name;break;case"AtKeyword":result="@"+node.name;break;case"Function":result=node.name+"(";break;case"String":case"Token":result=node.value;break;case"Comma":result=",";break;default:throw new Error("Unknown node type `"+node.type+"`")}return decorate(result,node)}function generate$K(node,options){let decorate=noop$1;let forceBraces=false;let compact=false;if(typeof options==="function"){decorate=options}else if(options){forceBraces=Boolean(options.forceBraces);compact=Boolean(options.compact);if(typeof options.decorate==="function"){decorate=options.decorate}}return internalGenerate(node,decorate,forceBraces,compact)}generate$L.generate=generate$K;const createCustomError$1=createCustomError$4;const generate$J=generate$L;const defaultLoc={offset:0,line:1,column:1};function locateMismatch(matchResult,node){const tokens=matchResult.tokens;const longestMatch=matchResult.longestMatch;const mismatchNode=longestMatch<tokens.length?tokens[longestMatch].node||null:null;const badNode=mismatchNode!==node?mismatchNode:null;let mismatchOffset=0;let mismatchLength=0;let entries=0;let css="";let start;let end;for(let i=0;i<tokens.length;i++){const token=tokens[i].value;if(i===longestMatch){mismatchLength=token.length;mismatchOffset=css.length}if(badNode!==null&&tokens[i].node===badNode){if(i<=longestMatch){entries++}else{entries=0}}css+=token}if(longestMatch===tokens.length||entries>1){start=fromLoc(badNode||node,"end")||buildLoc(defaultLoc,css);end=buildLoc(start)}else{start=fromLoc(badNode,"start")||buildLoc(fromLoc(node,"start")||defaultLoc,css.slice(0,mismatchOffset));end=fromLoc(badNode,"end")||buildLoc(start,css.substr(mismatchOffset,mismatchLength))}return{css:css,mismatchOffset:mismatchOffset,mismatchLength:mismatchLength,start:start,end:end}}function fromLoc(node,point){const value=node&&node.loc&&node.loc[point];if(value){return"line"in value?buildLoc(value):value}return null}function buildLoc({offset:offset,line:line,column:column},extra){const loc={offset:offset,line:line,column:column};if(extra){const lines=extra.split(/\n|\r\n?|\f/);loc.offset+=extra.length;loc.line+=lines.length-1;loc.column=lines.length===1?loc.column+extra.length:lines.pop().length+1}return loc}const SyntaxReferenceError=function(type,referenceName){const error=createCustomError$1.createCustomError("SyntaxReferenceError",type+(referenceName?" `"+referenceName+"`":""));error.reference=referenceName;return error};const SyntaxMatchError=function(message,syntax,node,matchResult){const error=createCustomError$1.createCustomError("SyntaxMatchError",message);const{css:css,mismatchOffset:mismatchOffset,mismatchLength:mismatchLength,start:start,end:end}=locateMismatch(matchResult,node);error.rawMessage=message;error.syntax=syntax?generate$J.generate(syntax):"<generic>";error.css=css;error.mismatchOffset=mismatchOffset;error.mismatchLength=mismatchLength;error.message=message+"\n"+" syntax: "+error.syntax+"\n"+" value: "+(css||"<empty string>")+"\n"+" --------"+new Array(error.mismatchOffset+1).join("-")+"^";Object.assign(error,start);error.loc={source:node&&node.loc&&node.loc.source||"<unknown>",start:start,end:end};return error};error$2.SyntaxMatchError=SyntaxMatchError;error$2.SyntaxReferenceError=SyntaxReferenceError;var names$4={};const keywords=new Map;const properties=new Map;const HYPHENMINUS$5=45;const keyword=getKeywordDescriptor;const property=getPropertyDescriptor;const vendorPrefix=getVendorPrefix;function isCustomProperty(str,offset){offset=offset||0;return str.length-offset>=2&&str.charCodeAt(offset)===HYPHENMINUS$5&&str.charCodeAt(offset+1)===HYPHENMINUS$5}function getVendorPrefix(str,offset){offset=offset||0;if(str.length-offset>=3){if(str.charCodeAt(offset)===HYPHENMINUS$5&&str.charCodeAt(offset+1)!==HYPHENMINUS$5){const secondDashIndex=str.indexOf("-",offset+2);if(secondDashIndex!==-1){return str.substring(offset,secondDashIndex+1)}}}return""}function getKeywordDescriptor(keyword){if(keywords.has(keyword)){return keywords.get(keyword)}const name=keyword.toLowerCase();let descriptor=keywords.get(name);if(descriptor===undefined){const custom=isCustomProperty(name,0);const vendor=!custom?getVendorPrefix(name,0):"";descriptor=Object.freeze({basename:name.substr(vendor.length),name:name,prefix:vendor,vendor:vendor,custom:custom})}keywords.set(keyword,descriptor);return descriptor}function getPropertyDescriptor(property){if(properties.has(property)){return properties.get(property)}let name=property;let hack=property[0];if(hack==="/"){hack=property[1]==="/"?"//":"/"}else if(hack!=="_"&&hack!=="*"&&hack!=="$"&&hack!=="#"&&hack!=="+"&&hack!=="&"){hack=""}const custom=isCustomProperty(name,hack.length);if(!custom){name=name.toLowerCase();if(properties.has(name)){const descriptor=properties.get(name);properties.set(property,descriptor);return descriptor}}const vendor=!custom?getVendorPrefix(name,hack.length):"";const prefix=name.substr(0,hack.length+vendor.length);const descriptor=Object.freeze({basename:name.substr(prefix.length),name:name.substr(hack.length),hack:hack,vendor:vendor,prefix:prefix,custom:custom});properties.set(property,descriptor);return descriptor}names$4.isCustomProperty=isCustomProperty;names$4.keyword=keyword;names$4.property=property;names$4.vendorPrefix=vendorPrefix;var genericConst$2={};const cssWideKeywords=["initial","inherit","unset","revert","revert-layer"];genericConst$2.cssWideKeywords=cssWideKeywords;const charCodeDefinitions$8=charCodeDefinitions$c;const types$K=types$R;const utils$g=utils$k;const PLUSSIGN$8=43;const HYPHENMINUS$4=45;const N$3=110;const DISALLOW_SIGN$1=true;const ALLOW_SIGN$1=false;function isDelim$1(token,code){return token!==null&&token.type===types$K.Delim&&token.value.charCodeAt(0)===code}function skipSC(token,offset,getNextToken){while(token!==null&&(token.type===types$K.WhiteSpace||token.type===types$K.Comment)){token=getNextToken(++offset)}return offset}function checkInteger$1(token,valueOffset,disallowSign,offset){if(!token){return 0}const code=token.value.charCodeAt(valueOffset);if(code===PLUSSIGN$8||code===HYPHENMINUS$4){if(disallowSign){return 0}valueOffset++}for(;valueOffset<token.value.length;valueOffset++){if(!charCodeDefinitions$8.isDigit(token.value.charCodeAt(valueOffset))){return 0}}return offset+1}function consumeB$1(token,offset_,getNextToken){let sign=false;let offset=skipSC(token,offset_,getNextToken);token=getNextToken(offset);if(token===null){return offset_}if(token.type!==types$K.Number){if(isDelim$1(token,PLUSSIGN$8)||isDelim$1(token,HYPHENMINUS$4)){sign=true;offset=skipSC(getNextToken(++offset),offset,getNextToken);token=getNextToken(offset);if(token===null||token.type!==types$K.Number){return 0}}else{return offset_}}if(!sign){const code=token.value.charCodeAt(0);if(code!==PLUSSIGN$8&&code!==HYPHENMINUS$4){return 0}}return checkInteger$1(token,sign?0:1,sign,offset)}function anPlusB(token,getNextToken){let offset=0;if(!token){return 0}if(token.type===types$K.Number){return checkInteger$1(token,0,ALLOW_SIGN$1,offset)}else if(token.type===types$K.Ident&&token.value.charCodeAt(0)===HYPHENMINUS$4){if(!utils$g.cmpChar(token.value,1,N$3)){return 0}switch(token.value.length){case 2:return consumeB$1(getNextToken(++offset),offset,getNextToken);case 3:if(token.value.charCodeAt(2)!==HYPHENMINUS$4){return 0}offset=skipSC(getNextToken(++offset),offset,getNextToken);token=getNextToken(offset);return checkInteger$1(token,0,DISALLOW_SIGN$1,offset);default:if(token.value.charCodeAt(2)!==HYPHENMINUS$4){return 0}return checkInteger$1(token,3,DISALLOW_SIGN$1,offset)}}else if(token.type===types$K.Ident||isDelim$1(token,PLUSSIGN$8)&&getNextToken(offset+1).type===types$K.Ident){if(token.type!==types$K.Ident){token=getNextToken(++offset)}if(token===null||!utils$g.cmpChar(token.value,0,N$3)){return 0}switch(token.value.length){case 1:return consumeB$1(getNextToken(++offset),offset,getNextToken);case 2:if(token.value.charCodeAt(1)!==HYPHENMINUS$4){return 0}offset=skipSC(getNextToken(++offset),offset,getNextToken);token=getNextToken(offset);return checkInteger$1(token,0,DISALLOW_SIGN$1,offset);default:if(token.value.charCodeAt(1)!==HYPHENMINUS$4){return 0}return checkInteger$1(token,2,DISALLOW_SIGN$1,offset)}}else if(token.type===types$K.Dimension){let code=token.value.charCodeAt(0);let sign=code===PLUSSIGN$8||code===HYPHENMINUS$4?1:0;let i=sign;for(;i<token.value.length;i++){if(!charCodeDefinitions$8.isDigit(token.value.charCodeAt(i))){break}}if(i===sign){return 0}if(!utils$g.cmpChar(token.value,i,N$3)){return 0}if(i+1===token.value.length){return consumeB$1(getNextToken(++offset),offset,getNextToken)}else{if(token.value.charCodeAt(i+1)!==HYPHENMINUS$4){return 0}if(i+2===token.value.length){offset=skipSC(getNextToken(++offset),offset,getNextToken);token=getNextToken(offset);return checkInteger$1(token,0,DISALLOW_SIGN$1,offset)}else{return checkInteger$1(token,i+2,DISALLOW_SIGN$1,offset)}}}return 0}var genericAnPlusB$1=anPlusB;const charCodeDefinitions$7=charCodeDefinitions$c;const types$J=types$R;const utils$f=utils$k;const PLUSSIGN$7=43;const HYPHENMINUS$3=45;const QUESTIONMARK$2=63;const U$1=117;function isDelim(token,code){return token!==null&&token.type===types$J.Delim&&token.value.charCodeAt(0)===code}function startsWith$1(token,code){return token.value.charCodeAt(0)===code}function hexSequence(token,offset,allowDash){let hexlen=0;for(let pos=offset;pos<token.value.length;pos++){const code=token.value.charCodeAt(pos);if(code===HYPHENMINUS$3&&allowDash&&hexlen!==0){hexSequence(token,offset+hexlen+1,false);return 6}if(!charCodeDefinitions$7.isHexDigit(code)){return 0}if(++hexlen>6){return 0}}return hexlen}function withQuestionMarkSequence(consumed,length,getNextToken){if(!consumed){return 0}while(isDelim(getNextToken(length),QUESTIONMARK$2)){if(++consumed>6){return 0}length++}return length}function urange(token,getNextToken){let length=0;if(token===null||token.type!==types$J.Ident||!utils$f.cmpChar(token.value,0,U$1)){return 0}token=getNextToken(++length);if(token===null){return 0}if(isDelim(token,PLUSSIGN$7)){token=getNextToken(++length);if(token===null){return 0}if(token.type===types$J.Ident){return withQuestionMarkSequence(hexSequence(token,0,true),++length,getNextToken)}if(isDelim(token,QUESTIONMARK$2)){return withQuestionMarkSequence(1,++length,getNextToken)}return 0}if(token.type===types$J.Number){const consumedHexLength=hexSequence(token,1,true);if(consumedHexLength===0){return 0}token=getNextToken(++length);if(token===null){return length}if(token.type===types$J.Dimension||token.type===types$J.Number){if(!startsWith$1(token,HYPHENMINUS$3)||!hexSequence(token,1,false)){return 0}return length+1}return withQuestionMarkSequence(consumedHexLength,length,getNextToken)}if(token.type===types$J.Dimension){return withQuestionMarkSequence(hexSequence(token,1,true),++length,getNextToken)}return 0}var genericUrange$1=urange;const genericConst$1=genericConst$2;const genericAnPlusB=genericAnPlusB$1;const genericUrange=genericUrange$1;const types$I=types$R;const charCodeDefinitions$6=charCodeDefinitions$c;const utils$e=utils$k;const calcFunctionNames=["calc(","-moz-calc(","-webkit-calc("];const balancePair=new Map([[types$I.Function,types$I.RightParenthesis],[types$I.LeftParenthesis,types$I.RightParenthesis],[types$I.LeftSquareBracket,types$I.RightSquareBracket],[types$I.LeftCurlyBracket,types$I.RightCurlyBracket]]);const LENGTH=["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"];const ANGLE=["deg","grad","rad","turn"];const TIME=["s","ms"];const FREQUENCY=["hz","khz"];const RESOLUTION=["dpi","dpcm","dppx","x"];const FLEX=["fr"];const DECIBEL=["db"];const SEMITONES=["st"];function charCodeAt(str,index){return index<str.length?str.charCodeAt(index):0}function eqStr(actual,expected){return utils$e.cmpStr(actual,0,actual.length,expected)}function eqStrAny(actual,expected){for(let i=0;i<expected.length;i++){if(eqStr(actual,expected[i])){return true}}return false}function isPostfixIeHack(str,offset){if(offset!==str.length-2){return false}return charCodeAt(str,offset)===92&&charCodeDefinitions$6.isDigit(charCodeAt(str,offset+1))}function outOfRange(opts,value,numEnd){if(opts&&opts.type==="Range"){const num=Number(numEnd!==undefined&&numEnd!==value.length?value.substr(0,numEnd):value);if(isNaN(num)){return true}if(opts.min!==null&&num<opts.min&&typeof opts.min!=="string"){return true}if(opts.max!==null&&num>opts.max&&typeof opts.max!=="string"){return true}}return false}function consumeFunction(token,getNextToken){let balanceCloseType=0;let balanceStash=[];let length=0;scan:do{switch(token.type){case types$I.RightCurlyBracket:case types$I.RightParenthesis:case types$I.RightSquareBracket:if(token.type!==balanceCloseType){break scan}balanceCloseType=balanceStash.pop();if(balanceStash.length===0){length++;break scan}break;case types$I.Function:case types$I.LeftParenthesis:case types$I.LeftSquareBracket:case types$I.LeftCurlyBracket:balanceStash.push(balanceCloseType);balanceCloseType=balancePair.get(token.type);break}length++}while(token=getNextToken(length));return length}function calc(next){return function(token,getNextToken,opts){if(token===null){return 0}if(token.type===types$I.Function&&eqStrAny(token.value,calcFunctionNames)){return consumeFunction(token,getNextToken)}return next(token,getNextToken,opts)}}function tokenType(expectedTokenType){return function(token){if(token===null||token.type!==expectedTokenType){return 0}return 1}}function customIdent(token){if(token===null||token.type!==types$I.Ident){return 0}const name=token.value.toLowerCase();if(eqStrAny(name,genericConst$1.cssWideKeywords)){return 0}if(eqStr(name,"default")){return 0}return 1}function customPropertyName(token){if(token===null||token.type!==types$I.Ident){return 0}if(charCodeAt(token.value,0)!==45||charCodeAt(token.value,1)!==45){return 0}return 1}function hexColor(token){if(token===null||token.type!==types$I.Hash){return 0}const length=token.value.length;if(length!==4&&length!==5&&length!==7&&length!==9){return 0}for(let i=1;i<length;i++){if(!charCodeDefinitions$6.isHexDigit(charCodeAt(token.value,i))){return 0}}return 1}function idSelector(token){if(token===null||token.type!==types$I.Hash){return 0}if(!charCodeDefinitions$6.isIdentifierStart(charCodeAt(token.value,1),charCodeAt(token.value,2),charCodeAt(token.value,3))){return 0}return 1}function declarationValue(token,getNextToken){if(!token){return 0}let balanceCloseType=0;let balanceStash=[];let length=0;scan:do{switch(token.type){case types$I.BadString:case types$I.BadUrl:break scan;case types$I.RightCurlyBracket:case types$I.RightParenthesis:case types$I.RightSquareBracket:if(token.type!==balanceCloseType){break scan}balanceCloseType=balanceStash.pop();break;case types$I.Semicolon:if(balanceCloseType===0){break scan}break;case types$I.Delim:if(balanceCloseType===0&&token.value==="!"){break scan}break;case types$I.Function:case types$I.LeftParenthesis:case types$I.LeftSquareBracket:case types$I.LeftCurlyBracket:balanceStash.push(balanceCloseType);balanceCloseType=balancePair.get(token.type);break}length++}while(token=getNextToken(length));return length}function anyValue(token,getNextToken){if(!token){return 0}let balanceCloseType=0;let balanceStash=[];let length=0;scan:do{switch(token.type){case types$I.BadString:case types$I.BadUrl:break scan;case types$I.RightCurlyBracket:case types$I.RightParenthesis:case types$I.RightSquareBracket:if(token.type!==balanceCloseType){break scan}balanceCloseType=balanceStash.pop();break;case types$I.Function:case types$I.LeftParenthesis:case types$I.LeftSquareBracket:case types$I.LeftCurlyBracket:balanceStash.push(balanceCloseType);balanceCloseType=balancePair.get(token.type);break}length++}while(token=getNextToken(length));return length}function dimension(type){if(type){type=new Set(type)}return function(token,getNextToken,opts){if(token===null||token.type!==types$I.Dimension){return 0}const numberEnd=utils$e.consumeNumber(token.value,0);if(type!==null){const reverseSolidusOffset=token.value.indexOf("\\",numberEnd);const unit=reverseSolidusOffset===-1||!isPostfixIeHack(token.value,reverseSolidusOffset)?token.value.substr(numberEnd):token.value.substring(numberEnd,reverseSolidusOffset);if(type.has(unit.toLowerCase())===false){return 0}}if(outOfRange(opts,token.value,numberEnd)){return 0}return 1}}function percentage(token,getNextToken,opts){if(token===null||token.type!==types$I.Percentage){return 0}if(outOfRange(opts,token.value,token.value.length-1)){return 0}return 1}function zero(next){if(typeof next!=="function"){next=function(){return 0}}return function(token,getNextToken,opts){if(token!==null&&token.type===types$I.Number){if(Number(token.value)===0){return 1}}return next(token,getNextToken,opts)}}function number(token,getNextToken,opts){if(token===null){return 0}const numberEnd=utils$e.consumeNumber(token.value,0);const isNumber=numberEnd===token.value.length;if(!isNumber&&!isPostfixIeHack(token.value,numberEnd)){return 0}if(outOfRange(opts,token.value,numberEnd)){return 0}return 1}function integer(token,getNextToken,opts){if(token===null||token.type!==types$I.Number){return 0}let i=charCodeAt(token.value,0)===43||charCodeAt(token.value,0)===45?1:0;for(;i<token.value.length;i++){if(!charCodeDefinitions$6.isDigit(charCodeAt(token.value,i))){return 0}}if(outOfRange(opts,token.value,i)){return 0}return 1}const genericSyntaxes={"ident-token":tokenType(types$I.Ident),"function-token":tokenType(types$I.Function),"at-keyword-token":tokenType(types$I.AtKeyword),"hash-token":tokenType(types$I.Hash),"string-token":tokenType(types$I.String),"bad-string-token":tokenType(types$I.BadString),"url-token":tokenType(types$I.Url),"bad-url-token":tokenType(types$I.BadUrl),"delim-token":tokenType(types$I.Delim),"number-token":tokenType(types$I.Number),"percentage-token":tokenType(types$I.Percentage),"dimension-token":tokenType(types$I.Dimension),"whitespace-token":tokenType(types$I.WhiteSpace),"CDO-token":tokenType(types$I.CDO),"CDC-token":tokenType(types$I.CDC),"colon-token":tokenType(types$I.Colon),"semicolon-token":tokenType(types$I.Semicolon),"comma-token":tokenType(types$I.Comma),"[-token":tokenType(types$I.LeftSquareBracket),"]-token":tokenType(types$I.RightSquareBracket),"(-token":tokenType(types$I.LeftParenthesis),")-token":tokenType(types$I.RightParenthesis),"{-token":tokenType(types$I.LeftCurlyBracket),"}-token":tokenType(types$I.RightCurlyBracket),string:tokenType(types$I.String),ident:tokenType(types$I.Ident),"custom-ident":customIdent,"custom-property-name":customPropertyName,"hex-color":hexColor,"id-selector":idSelector,"an-plus-b":genericAnPlusB,urange:genericUrange,"declaration-value":declarationValue,"any-value":anyValue,dimension:calc(dimension(null)),angle:calc(dimension(ANGLE)),decibel:calc(dimension(DECIBEL)),frequency:calc(dimension(FREQUENCY)),flex:calc(dimension(FLEX)),length:calc(zero(dimension(LENGTH))),resolution:calc(dimension(RESOLUTION)),semitones:calc(dimension(SEMITONES)),time:calc(dimension(TIME)),percentage:calc(percentage),zero:zero(),number:calc(number),integer:calc(integer)};var generic$1=genericSyntaxes;const index$9=tokenizer$2;const astToTokens={decorator(handlers){const tokens=[];let curNode=null;return{...handlers,node(node){const tmp=curNode;curNode=node;handlers.node.call(this,node);curNode=tmp},emit(value,type,auto){tokens.push({type:type,value:value,node:auto?null:curNode})},result(){return tokens}}}};function stringToTokens(str){const tokens=[];index$9.tokenize(str,((type,start,end)=>tokens.push({type:type,value:str.slice(start,end),node:null})));return tokens}function prepareTokens$1(value,syntax){if(typeof value==="string"){return stringToTokens(value)}return syntax.generate(value,astToTokens)}var prepareTokens_1=prepareTokens$1;var matchGraph$2={};var parse$L={};var tokenizer$1={};var _SyntaxError={};const createCustomError=createCustomError$4;function SyntaxError$3(message,input,offset){return Object.assign(createCustomError.createCustomError("SyntaxError",message),{input:input,offset:offset,rawMessage:message,message:message+"\n"+" "+input+"\n"+"--"+new Array((offset||input.length)+1).join("-")+"^"})}_SyntaxError.SyntaxError=SyntaxError$3;const SyntaxError$2=_SyntaxError;const TAB$1=9;const N$2=10;const F$1=12;const R$1=13;const SPACE$3=32;class Tokenizer{constructor(str){this.str=str;this.pos=0}charCodeAt(pos){return pos<this.str.length?this.str.charCodeAt(pos):0}charCode(){return this.charCodeAt(this.pos)}nextCharCode(){return this.charCodeAt(this.pos+1)}nextNonWsCode(pos){return this.charCodeAt(this.findWsEnd(pos))}findWsEnd(pos){for(;pos<this.str.length;pos++){const code=this.str.charCodeAt(pos);if(code!==R$1&&code!==N$2&&code!==F$1&&code!==SPACE$3&&code!==TAB$1){break}}return pos}substringToPos(end){return this.str.substring(this.pos,this.pos=end)}eat(code){if(this.charCode()!==code){this.error("Expect `"+String.fromCharCode(code)+"`")}this.pos++}peek(){return this.pos<this.str.length?this.str.charAt(this.pos++):""}error(message){throw new SyntaxError$2.SyntaxError(message,this.str,this.pos)}}tokenizer$1.Tokenizer=Tokenizer;const tokenizer=tokenizer$1;const TAB=9;const N$1=10;const F=12;const R=13;const SPACE$2=32;const EXCLAMATIONMARK$2=33;const NUMBERSIGN$3=35;const AMPERSAND$1=38;const APOSTROPHE$2=39;const LEFTPARENTHESIS$2=40;const RIGHTPARENTHESIS$2=41;const ASTERISK$6=42;const PLUSSIGN$6=43;const COMMA=44;const HYPERMINUS=45;const LESSTHANSIGN=60;const GREATERTHANSIGN$2=62;const QUESTIONMARK$1=63;const COMMERCIALAT=64;const LEFTSQUAREBRACKET=91;const RIGHTSQUAREBRACKET=93;const LEFTCURLYBRACKET=123;const VERTICALLINE$3=124;const RIGHTCURLYBRACKET=125;const INFINITY=8734;const NAME_CHAR=new Uint8Array(128).map(((_,idx)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(idx))?1:0));const COMBINATOR_PRECEDENCE={" ":1,"&&":2,"||":3,"|":4};function scanSpaces(tokenizer){return tokenizer.substringToPos(tokenizer.findWsEnd(tokenizer.pos))}function scanWord(tokenizer){let end=tokenizer.pos;for(;end<tokenizer.str.length;end++){const code=tokenizer.str.charCodeAt(end);if(code>=128||NAME_CHAR[code]===0){break}}if(tokenizer.pos===end){tokenizer.error("Expect a keyword")}return tokenizer.substringToPos(end)}function scanNumber(tokenizer){let end=tokenizer.pos;for(;end<tokenizer.str.length;end++){const code=tokenizer.str.charCodeAt(end);if(code<48||code>57){break}}if(tokenizer.pos===end){tokenizer.error("Expect a number")}return tokenizer.substringToPos(end)}function scanString(tokenizer){const end=tokenizer.str.indexOf("'",tokenizer.pos+1);if(end===-1){tokenizer.pos=tokenizer.str.length;tokenizer.error("Expect an apostrophe")}return tokenizer.substringToPos(end+1)}function readMultiplierRange(tokenizer){let min=null;let max=null;tokenizer.eat(LEFTCURLYBRACKET);min=scanNumber(tokenizer);if(tokenizer.charCode()===COMMA){tokenizer.pos++;if(tokenizer.charCode()!==RIGHTCURLYBRACKET){max=scanNumber(tokenizer)}}else{max=min}tokenizer.eat(RIGHTCURLYBRACKET);return{min:Number(min),max:max?Number(max):0}}function readMultiplier(tokenizer){let range=null;let comma=false;switch(tokenizer.charCode()){case ASTERISK$6:tokenizer.pos++;range={min:0,max:0};break;case PLUSSIGN$6:tokenizer.pos++;range={min:1,max:0};break;case QUESTIONMARK$1:tokenizer.pos++;range={min:0,max:1};break;case NUMBERSIGN$3:tokenizer.pos++;comma=true;if(tokenizer.charCode()===LEFTCURLYBRACKET){range=readMultiplierRange(tokenizer)}else if(tokenizer.charCode()===QUESTIONMARK$1){tokenizer.pos++;range={min:0,max:0}}else{range={min:1,max:0}}break;case LEFTCURLYBRACKET:range=readMultiplierRange(tokenizer);break;default:return null}return{type:"Multiplier",comma:comma,min:range.min,max:range.max,term:null}}function maybeMultiplied(tokenizer,node){const multiplier=readMultiplier(tokenizer);if(multiplier!==null){multiplier.term=node;if(tokenizer.charCode()===NUMBERSIGN$3&&tokenizer.charCodeAt(tokenizer.pos-1)===PLUSSIGN$6){return maybeMultiplied(tokenizer,multiplier)}return multiplier}return node}function maybeToken(tokenizer){const ch=tokenizer.peek();if(ch===""){return null}return{type:"Token",value:ch}}function readProperty$1(tokenizer){let name;tokenizer.eat(LESSTHANSIGN);tokenizer.eat(APOSTROPHE$2);name=scanWord(tokenizer);tokenizer.eat(APOSTROPHE$2);tokenizer.eat(GREATERTHANSIGN$2);return maybeMultiplied(tokenizer,{type:"Property",name:name})}function readTypeRange(tokenizer){let min=null;let max=null;let sign=1;tokenizer.eat(LEFTSQUAREBRACKET);if(tokenizer.charCode()===HYPERMINUS){tokenizer.peek();sign=-1}if(sign==-1&&tokenizer.charCode()===INFINITY){tokenizer.peek()}else{min=sign*Number(scanNumber(tokenizer));if(NAME_CHAR[tokenizer.charCode()]!==0){min+=scanWord(tokenizer)}}scanSpaces(tokenizer);tokenizer.eat(COMMA);scanSpaces(tokenizer);if(tokenizer.charCode()===INFINITY){tokenizer.peek()}else{sign=1;if(tokenizer.charCode()===HYPERMINUS){tokenizer.peek();sign=-1}max=sign*Number(scanNumber(tokenizer));if(NAME_CHAR[tokenizer.charCode()]!==0){max+=scanWord(tokenizer)}}tokenizer.eat(RIGHTSQUAREBRACKET);return{type:"Range",min:min,max:max}}function readType(tokenizer){let name;let opts=null;tokenizer.eat(LESSTHANSIGN);name=scanWord(tokenizer);if(tokenizer.charCode()===LEFTPARENTHESIS$2&&tokenizer.nextCharCode()===RIGHTPARENTHESIS$2){tokenizer.pos+=2;name+="()"}if(tokenizer.charCodeAt(tokenizer.findWsEnd(tokenizer.pos))===LEFTSQUAREBRACKET){scanSpaces(tokenizer);opts=readTypeRange(tokenizer)}tokenizer.eat(GREATERTHANSIGN$2);return maybeMultiplied(tokenizer,{type:"Type",name:name,opts:opts})}function readKeywordOrFunction(tokenizer){const name=scanWord(tokenizer);if(tokenizer.charCode()===LEFTPARENTHESIS$2){tokenizer.pos++;return{type:"Function",name:name}}return maybeMultiplied(tokenizer,{type:"Keyword",name:name})}function regroupTerms(terms,combinators){function createGroup(terms,combinator){return{type:"Group",terms:terms,combinator:combinator,disallowEmpty:false,explicit:false}}let combinator;combinators=Object.keys(combinators).sort(((a,b)=>COMBINATOR_PRECEDENCE[a]-COMBINATOR_PRECEDENCE[b]));while(combinators.length>0){combinator=combinators.shift();let i=0;let subgroupStart=0;for(;i<terms.length;i++){const term=terms[i];if(term.type==="Combinator"){if(term.value===combinator){if(subgroupStart===-1){subgroupStart=i-1}terms.splice(i,1);i--}else{if(subgroupStart!==-1&&i-subgroupStart>1){terms.splice(subgroupStart,i-subgroupStart,createGroup(terms.slice(subgroupStart,i),combinator));i=subgroupStart+1}subgroupStart=-1}}}if(subgroupStart!==-1&&combinators.length){terms.splice(subgroupStart,i-subgroupStart,createGroup(terms.slice(subgroupStart,i),combinator))}}return combinator}function readImplicitGroup(tokenizer){const terms=[];const combinators={};let token;let prevToken=null;let prevTokenPos=tokenizer.pos;while(token=peek(tokenizer)){if(token.type!=="Spaces"){if(token.type==="Combinator"){if(prevToken===null||prevToken.type==="Combinator"){tokenizer.pos=prevTokenPos;tokenizer.error("Unexpected combinator")}combinators[token.value]=true}else if(prevToken!==null&&prevToken.type!=="Combinator"){combinators[" "]=true;terms.push({type:"Combinator",value:" "})}terms.push(token);prevToken=token;prevTokenPos=tokenizer.pos}}if(prevToken!==null&&prevToken.type==="Combinator"){tokenizer.pos-=prevTokenPos;tokenizer.error("Unexpected combinator")}return{type:"Group",terms:terms,combinator:regroupTerms(terms,combinators)||" ",disallowEmpty:false,explicit:false}}function readGroup(tokenizer){let result;tokenizer.eat(LEFTSQUAREBRACKET);result=readImplicitGroup(tokenizer);tokenizer.eat(RIGHTSQUAREBRACKET);result.explicit=true;if(tokenizer.charCode()===EXCLAMATIONMARK$2){tokenizer.pos++;result.disallowEmpty=true}return result}function peek(tokenizer){let code=tokenizer.charCode();if(code<128&&NAME_CHAR[code]===1){return readKeywordOrFunction(tokenizer)}switch(code){case RIGHTSQUAREBRACKET:break;case LEFTSQUAREBRACKET:return maybeMultiplied(tokenizer,readGroup(tokenizer));case LESSTHANSIGN:return tokenizer.nextCharCode()===APOSTROPHE$2?readProperty$1(tokenizer):readType(tokenizer);case VERTICALLINE$3:return{type:"Combinator",value:tokenizer.substringToPos(tokenizer.pos+(tokenizer.nextCharCode()===VERTICALLINE$3?2:1))};case AMPERSAND$1:tokenizer.pos++;tokenizer.eat(AMPERSAND$1);return{type:"Combinator",value:"&&"};case COMMA:tokenizer.pos++;return{type:"Comma"};case APOSTROPHE$2:return maybeMultiplied(tokenizer,{type:"String",value:scanString(tokenizer)});case SPACE$2:case TAB:case N$1:case R:case F:return{type:"Spaces",value:scanSpaces(tokenizer)};case COMMERCIALAT:code=tokenizer.nextCharCode();if(code<128&&NAME_CHAR[code]===1){tokenizer.pos++;return{type:"AtKeyword",name:scanWord(tokenizer)}}return maybeToken(tokenizer);case ASTERISK$6:case PLUSSIGN$6:case QUESTIONMARK$1:case NUMBERSIGN$3:case EXCLAMATIONMARK$2:break;case LEFTCURLYBRACKET:code=tokenizer.nextCharCode();if(code<48||code>57){return maybeToken(tokenizer)}break;default:return maybeToken(tokenizer)}}function parse$K(source){const tokenizer$1=new tokenizer.Tokenizer(source);const result=readImplicitGroup(tokenizer$1);if(tokenizer$1.pos!==source.length){tokenizer$1.error("Unexpected input")}if(result.terms.length===1&&result.terms[0].type==="Group"){return result.terms[0]}return result}parse$L.parse=parse$K;const parse$J=parse$L;const MATCH={type:"Match"};const MISMATCH={type:"Mismatch"};const DISALLOW_EMPTY={type:"DisallowEmpty"};const LEFTPARENTHESIS$1=40;const RIGHTPARENTHESIS$1=41;function createCondition(match,thenBranch,elseBranch){if(thenBranch===MATCH&&elseBranch===MISMATCH){return match}if(match===MATCH&&thenBranch===MATCH&&elseBranch===MATCH){return match}if(match.type==="If"&&match.else===MISMATCH&&thenBranch===MATCH){thenBranch=match.then;match=match.match}return{type:"If",match:match,then:thenBranch,else:elseBranch}}function isFunctionType(name){return name.length>2&&name.charCodeAt(name.length-2)===LEFTPARENTHESIS$1&&name.charCodeAt(name.length-1)===RIGHTPARENTHESIS$1}function isEnumCapatible(term){return term.type==="Keyword"||term.type==="AtKeyword"||term.type==="Function"||term.type==="Type"&&isFunctionType(term.name)}function buildGroupMatchGraph(combinator,terms,atLeastOneTermMatched){switch(combinator){case" ":{let result=MATCH;for(let i=terms.length-1;i>=0;i--){const term=terms[i];result=createCondition(term,result,MISMATCH)}return result}case"|":{let result=MISMATCH;let map=null;for(let i=terms.length-1;i>=0;i--){let term=terms[i];if(isEnumCapatible(term)){if(map===null&&i>0&&isEnumCapatible(terms[i-1])){map=Object.create(null);result=createCondition({type:"Enum",map:map},MATCH,result)}if(map!==null){const key=(isFunctionType(term.name)?term.name.slice(0,-1):term.name).toLowerCase();if(key in map===false){map[key]=term;continue}}}map=null;result=createCondition(term,MATCH,result)}return result}case"&&":{if(terms.length>5){return{type:"MatchOnce",terms:terms,all:true}}let result=MISMATCH;for(let i=terms.length-1;i>=0;i--){const term=terms[i];let thenClause;if(terms.length>1){thenClause=buildGroupMatchGraph(combinator,terms.filter((function(newGroupTerm){return newGroupTerm!==term})),false)}else{thenClause=MATCH}result=createCondition(term,thenClause,result)}return result}case"||":{if(terms.length>5){return{type:"MatchOnce",terms:terms,all:false}}let result=atLeastOneTermMatched?MATCH:MISMATCH;for(let i=terms.length-1;i>=0;i--){const term=terms[i];let thenClause;if(terms.length>1){thenClause=buildGroupMatchGraph(combinator,terms.filter((function(newGroupTerm){return newGroupTerm!==term})),true)}else{thenClause=MATCH}result=createCondition(term,thenClause,result)}return result}}}function buildMultiplierMatchGraph(node){let result=MATCH;let matchTerm=buildMatchGraphInternal(node.term);if(node.max===0){matchTerm=createCondition(matchTerm,DISALLOW_EMPTY,MISMATCH);result=createCondition(matchTerm,null,MISMATCH);result.then=createCondition(MATCH,MATCH,result);if(node.comma){result.then.else=createCondition({type:"Comma",syntax:node},result,MISMATCH)}}else{for(let i=node.min||1;i<=node.max;i++){if(node.comma&&result!==MATCH){result=createCondition({type:"Comma",syntax:node},result,MISMATCH)}result=createCondition(matchTerm,createCondition(MATCH,MATCH,result),MISMATCH)}}if(node.min===0){result=createCondition(MATCH,MATCH,result)}else{for(let i=0;i<node.min-1;i++){if(node.comma&&result!==MATCH){result=createCondition({type:"Comma",syntax:node},result,MISMATCH)}result=createCondition(matchTerm,result,MISMATCH)}}return result}function buildMatchGraphInternal(node){if(typeof node==="function"){return{type:"Generic",fn:node}}switch(node.type){case"Group":{let result=buildGroupMatchGraph(node.combinator,node.terms.map(buildMatchGraphInternal),false);if(node.disallowEmpty){result=createCondition(result,DISALLOW_EMPTY,MISMATCH)}return result}case"Multiplier":return buildMultiplierMatchGraph(node);case"Type":case"Property":return{type:node.type,name:node.name,syntax:node};case"Keyword":return{type:node.type,name:node.name.toLowerCase(),syntax:node};case"AtKeyword":return{type:node.type,name:"@"+node.name.toLowerCase(),syntax:node};case"Function":return{type:node.type,name:node.name.toLowerCase()+"(",syntax:node};case"String":if(node.value.length===3){return{type:"Token",value:node.value.charAt(1),syntax:node}}return{type:node.type,value:node.value.substr(1,node.value.length-2).replace(/\\'/g,"'"),syntax:node};case"Token":return{type:node.type,value:node.value,syntax:node};case"Comma":return{type:node.type,syntax:node};default:throw new Error("Unknown node type:",node.type)}}function buildMatchGraph(syntaxTree,ref){if(typeof syntaxTree==="string"){syntaxTree=parse$J.parse(syntaxTree)}return{type:"MatchGraph",match:buildMatchGraphInternal(syntaxTree),syntax:ref||null,source:syntaxTree}}matchGraph$2.DISALLOW_EMPTY=DISALLOW_EMPTY;matchGraph$2.MATCH=MATCH;matchGraph$2.MISMATCH=MISMATCH;matchGraph$2.buildMatchGraph=buildMatchGraph;var match$1={};const matchGraph$1=matchGraph$2;const types$H=types$R;const{hasOwnProperty:hasOwnProperty$7}=Object.prototype;const STUB=0;const TOKEN=1;const OPEN_SYNTAX=2;const CLOSE_SYNTAX=3;const EXIT_REASON_MATCH="Match";const EXIT_REASON_MISMATCH="Mismatch";const EXIT_REASON_ITERATION_LIMIT="Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)";const ITERATION_LIMIT=15e3;function reverseList(list){let prev=null;let next=null;let item=list;while(item!==null){next=item.prev;item.prev=prev;prev=item;item=next}return prev}function areStringsEqualCaseInsensitive(testStr,referenceStr){if(testStr.length!==referenceStr.length){return false}for(let i=0;i<testStr.length;i++){const referenceCode=referenceStr.charCodeAt(i);let testCode=testStr.charCodeAt(i);if(testCode>=65&&testCode<=90){testCode=testCode|32}if(testCode!==referenceCode){return false}}return true}function isContextEdgeDelim(token){if(token.type!==types$H.Delim){return false}return token.value!=="?"}function isCommaContextStart(token){if(token===null){return true}return token.type===types$H.Comma||token.type===types$H.Function||token.type===types$H.LeftParenthesis||token.type===types$H.LeftSquareBracket||token.type===types$H.LeftCurlyBracket||isContextEdgeDelim(token)}function isCommaContextEnd(token){if(token===null){return true}return token.type===types$H.RightParenthesis||token.type===types$H.RightSquareBracket||token.type===types$H.RightCurlyBracket||token.type===types$H.Delim&&token.value==="/"}function internalMatch(tokens,state,syntaxes){function moveToNextToken(){do{tokenIndex++;token=tokenIndex<tokens.length?tokens[tokenIndex]:null}while(token!==null&&(token.type===types$H.WhiteSpace||token.type===types$H.Comment))}function getNextToken(offset){const nextIndex=tokenIndex+offset;return nextIndex<tokens.length?tokens[nextIndex]:null}function stateSnapshotFromSyntax(nextState,prev){return{nextState:nextState,matchStack:matchStack,syntaxStack:syntaxStack,thenStack:thenStack,tokenIndex:tokenIndex,prev:prev}}function pushThenStack(nextState){thenStack={nextState:nextState,matchStack:matchStack,syntaxStack:syntaxStack,prev:thenStack}}function pushElseStack(nextState){elseStack=stateSnapshotFromSyntax(nextState,elseStack)}function addTokenToMatch(){matchStack={type:TOKEN,syntax:state.syntax,token:token,prev:matchStack};moveToNextToken();syntaxStash=null;if(tokenIndex>longestMatch){longestMatch=tokenIndex}}function openSyntax(){syntaxStack={syntax:state.syntax,opts:state.syntax.opts||syntaxStack!==null&&syntaxStack.opts||null,prev:syntaxStack};matchStack={type:OPEN_SYNTAX,syntax:state.syntax,token:matchStack.token,prev:matchStack}}function closeSyntax(){if(matchStack.type===OPEN_SYNTAX){matchStack=matchStack.prev}else{matchStack={type:CLOSE_SYNTAX,syntax:syntaxStack.syntax,token:matchStack.token,prev:matchStack}}syntaxStack=syntaxStack.prev}let syntaxStack=null;let thenStack=null;let elseStack=null;let syntaxStash=null;let iterationCount=0;let exitReason=null;let token=null;let tokenIndex=-1;let longestMatch=0;let matchStack={type:STUB,syntax:null,token:null,prev:null};moveToNextToken();while(exitReason===null&&++iterationCount<ITERATION_LIMIT){switch(state.type){case"Match":if(thenStack===null){if(token!==null){if(tokenIndex!==tokens.length-1||token.value!=="\\0"&&token.value!=="\\9"){state=matchGraph$1.MISMATCH;break}}exitReason=EXIT_REASON_MATCH;break}state=thenStack.nextState;if(state===matchGraph$1.DISALLOW_EMPTY){if(thenStack.matchStack===matchStack){state=matchGraph$1.MISMATCH;break}else{state=matchGraph$1.MATCH}}while(thenStack.syntaxStack!==syntaxStack){closeSyntax()}thenStack=thenStack.prev;break;case"Mismatch":if(syntaxStash!==null&&syntaxStash!==false){if(elseStack===null||tokenIndex>elseStack.tokenIndex){elseStack=syntaxStash;syntaxStash=false}}else if(elseStack===null){exitReason=EXIT_REASON_MISMATCH;break}state=elseStack.nextState;thenStack=elseStack.thenStack;syntaxStack=elseStack.syntaxStack;matchStack=elseStack.matchStack;tokenIndex=elseStack.tokenIndex;token=tokenIndex<tokens.length?tokens[tokenIndex]:null;elseStack=elseStack.prev;break;case"MatchGraph":state=state.match;break;case"If":if(state.else!==matchGraph$1.MISMATCH){pushElseStack(state.else)}if(state.then!==matchGraph$1.MATCH){pushThenStack(state.then)}state=state.match;break;case"MatchOnce":state={type:"MatchOnceBuffer",syntax:state,index:0,mask:0};break;case"MatchOnceBuffer":{const terms=state.syntax.terms;if(state.index===terms.length){if(state.mask===0||state.syntax.all){state=matchGraph$1.MISMATCH;break}state=matchGraph$1.MATCH;break}if(state.mask===(1<<terms.length)-1){state=matchGraph$1.MATCH;break}for(;state.index<terms.length;state.index++){const matchFlag=1<<state.index;if((state.mask&matchFlag)===0){pushElseStack(state);pushThenStack({type:"AddMatchOnce",syntax:state.syntax,mask:state.mask|matchFlag});state=terms[state.index++];break}}break}case"AddMatchOnce":state={type:"MatchOnceBuffer",syntax:state.syntax,index:0,mask:state.mask};break;case"Enum":if(token!==null){let name=token.value.toLowerCase();if(name.indexOf("\\")!==-1){name=name.replace(/\\[09].*$/,"")}if(hasOwnProperty$7.call(state.map,name)){state=state.map[name];break}}state=matchGraph$1.MISMATCH;break;case"Generic":{const opts=syntaxStack!==null?syntaxStack.opts:null;const lastTokenIndex=tokenIndex+Math.floor(state.fn(token,getNextToken,opts));if(!isNaN(lastTokenIndex)&&lastTokenIndex>tokenIndex){while(tokenIndex<lastTokenIndex){addTokenToMatch()}state=matchGraph$1.MATCH}else{state=matchGraph$1.MISMATCH}break}case"Type":case"Property":{const syntaxDict=state.type==="Type"?"types":"properties";const dictSyntax=hasOwnProperty$7.call(syntaxes,syntaxDict)?syntaxes[syntaxDict][state.name]:null;if(!dictSyntax||!dictSyntax.match){throw new Error("Bad syntax reference: "+(state.type==="Type"?"<"+state.name+">":"<'"+state.name+"'>"))}if(syntaxStash!==false&&token!==null&&state.type==="Type"){const lowPriorityMatching=state.name==="custom-ident"&&token.type===types$H.Ident||state.name==="length"&&token.value==="0";if(lowPriorityMatching){if(syntaxStash===null){syntaxStash=stateSnapshotFromSyntax(state,elseStack)}state=matchGraph$1.MISMATCH;break}}openSyntax();state=dictSyntax.match;break}case"Keyword":{const name=state.name;if(token!==null){let keywordName=token.value;if(keywordName.indexOf("\\")!==-1){keywordName=keywordName.replace(/\\[09].*$/,"")}if(areStringsEqualCaseInsensitive(keywordName,name)){addTokenToMatch();state=matchGraph$1.MATCH;break}}state=matchGraph$1.MISMATCH;break}case"AtKeyword":case"Function":if(token!==null&&areStringsEqualCaseInsensitive(token.value,state.name)){addTokenToMatch();state=matchGraph$1.MATCH;break}state=matchGraph$1.MISMATCH;break;case"Token":if(token!==null&&token.value===state.value){addTokenToMatch();state=matchGraph$1.MATCH;break}state=matchGraph$1.MISMATCH;break;case"Comma":if(token!==null&&token.type===types$H.Comma){if(isCommaContextStart(matchStack.token)){state=matchGraph$1.MISMATCH}else{addTokenToMatch();state=isCommaContextEnd(token)?matchGraph$1.MISMATCH:matchGraph$1.MATCH}}else{state=isCommaContextStart(matchStack.token)||isCommaContextEnd(token)?matchGraph$1.MATCH:matchGraph$1.MISMATCH}break;case"String":let string="";let lastTokenIndex=tokenIndex;for(;lastTokenIndex<tokens.length&&string.length<state.value.length;lastTokenIndex++){string+=tokens[lastTokenIndex].value}if(areStringsEqualCaseInsensitive(string,state.value)){while(tokenIndex<lastTokenIndex){addTokenToMatch()}state=matchGraph$1.MATCH}else{state=matchGraph$1.MISMATCH}break;default:throw new Error("Unknown node type: "+state.type)}}switch(exitReason){case null:console.warn("[csstree-match] BREAK after "+ITERATION_LIMIT+" iterations");exitReason=EXIT_REASON_ITERATION_LIMIT;matchStack=null;break;case EXIT_REASON_MATCH:while(syntaxStack!==null){closeSyntax()}break;default:matchStack=null}return{tokens:tokens,reason:exitReason,iterations:iterationCount,match:matchStack,longestMatch:longestMatch}}function matchAsList(tokens,matchGraph,syntaxes){const matchResult=internalMatch(tokens,matchGraph,syntaxes||{});if(matchResult.match!==null){let item=reverseList(matchResult.match).prev;matchResult.match=[];while(item!==null){switch(item.type){case OPEN_SYNTAX:case CLOSE_SYNTAX:matchResult.match.push({type:item.type,syntax:item.syntax});break;default:matchResult.match.push({token:item.token.value,node:item.token.node});break}item=item.prev}}return matchResult}function matchAsTree(tokens,matchGraph,syntaxes){const matchResult=internalMatch(tokens,matchGraph,syntaxes||{});if(matchResult.match===null){return matchResult}let item=matchResult.match;let host=matchResult.match={syntax:matchGraph.syntax||null,match:[]};const hostStack=[host];item=reverseList(item).prev;while(item!==null){switch(item.type){case OPEN_SYNTAX:host.match.push(host={syntax:item.syntax,match:[]});hostStack.push(host);break;case CLOSE_SYNTAX:hostStack.pop();host=hostStack[hostStack.length-1];break;default:host.match.push({syntax:item.syntax||null,token:item.token.value,node:item.token.node})}item=item.prev}return matchResult}match$1.matchAsList=matchAsList;match$1.matchAsTree=matchAsTree;var trace$1={};function getTrace(node){function shouldPutToTrace(syntax){if(syntax===null){return false}return syntax.type==="Type"||syntax.type==="Property"||syntax.type==="Keyword"}function hasMatch(matchNode){if(Array.isArray(matchNode.match)){for(let i=0;i<matchNode.match.length;i++){if(hasMatch(matchNode.match[i])){if(shouldPutToTrace(matchNode.syntax)){result.unshift(matchNode.syntax)}return true}}}else if(matchNode.node===node){result=shouldPutToTrace(matchNode.syntax)?[matchNode.syntax]:[];return true}return false}let result=null;if(this.matched!==null){hasMatch(this.matched)}return result}function isType(node,type){return testNode(this,node,(match=>match.type==="Type"&&match.name===type))}function isProperty(node,property){return testNode(this,node,(match=>match.type==="Property"&&match.name===property))}function isKeyword(node){return testNode(this,node,(match=>match.type==="Keyword"))}function testNode(match,node,fn){const trace=getTrace.call(match,node);if(trace===null){return false}return trace.some(fn)}trace$1.getTrace=getTrace;trace$1.isKeyword=isKeyword;trace$1.isProperty=isProperty;trace$1.isType=isType;var search$1={};const List$3=List$7;function getFirstMatchNode(matchNode){if("node"in matchNode){return matchNode.node}return getFirstMatchNode(matchNode.match[0])}function getLastMatchNode(matchNode){if("node"in matchNode){return matchNode.node}return getLastMatchNode(matchNode.match[matchNode.match.length-1])}function matchFragments(lexer,ast,match,type,name){function findFragments(matchNode){if(matchNode.syntax!==null&&matchNode.syntax.type===type&&matchNode.syntax.name===name){const start=getFirstMatchNode(matchNode);const end=getLastMatchNode(matchNode);lexer.syntax.walk(ast,(function(node,item,list){if(node===start){const nodes=new List$3.List;do{nodes.appendData(item.data);if(item.data===end){break}item=item.next}while(item!==null);fragments.push({parent:list,nodes:nodes})}}))}if(Array.isArray(matchNode.match)){matchNode.match.forEach(findFragments)}}const fragments=[];if(match.matched!==null){findFragments(match.matched)}return fragments}search$1.matchFragments=matchFragments;var structure$F={};const List$2=List$7;const{hasOwnProperty:hasOwnProperty$6}=Object.prototype;function isValidNumber(value){return typeof value==="number"&&isFinite(value)&&Math.floor(value)===value&&value>=0}function isValidLocation(loc){return Boolean(loc)&&isValidNumber(loc.offset)&&isValidNumber(loc.line)&&isValidNumber(loc.column)}function createNodeStructureChecker(type,fields){return function checkNode(node,warn){if(!node||node.constructor!==Object){return warn(node,"Type of node should be an Object")}for(let key in node){let valid=true;if(hasOwnProperty$6.call(node,key)===false){continue}if(key==="type"){if(node.type!==type){warn(node,"Wrong node type `"+node.type+"`, expected `"+type+"`")}}else if(key==="loc"){if(node.loc===null){continue}else if(node.loc&&node.loc.constructor===Object){if(typeof node.loc.source!=="string"){key+=".source"}else if(!isValidLocation(node.loc.start)){key+=".start"}else if(!isValidLocation(node.loc.end)){key+=".end"}else{continue}}valid=false}else if(fields.hasOwnProperty(key)){valid=false;for(let i=0;!valid&&i<fields[key].length;i++){const fieldType=fields[key][i];switch(fieldType){case String:valid=typeof node[key]==="string";break;case Boolean:valid=typeof node[key]==="boolean";break;case null:valid=node[key]===null;break;default:if(typeof fieldType==="string"){valid=node[key]&&node[key].type===fieldType}else if(Array.isArray(fieldType)){valid=node[key]instanceof List$2.List}}}}else{warn(node,"Unknown field `"+key+"` for "+type+" node type")}if(!valid){warn(node,"Bad value for `"+type+"."+key+"`")}}for(const key in fields){if(hasOwnProperty$6.call(fields,key)&&hasOwnProperty$6.call(node,key)===false){warn(node,"Field `"+type+"."+key+"` is missed")}}}}function processStructure(name,nodeType){const structure=nodeType.structure;const fields={type:String,loc:true};const docs={type:'"'+name+'"'};for(const key in structure){if(hasOwnProperty$6.call(structure,key)===false){continue}const docsTypes=[];const fieldTypes=fields[key]=Array.isArray(structure[key])?structure[key].slice():[structure[key]];for(let i=0;i<fieldTypes.length;i++){const fieldType=fieldTypes[i];if(fieldType===String||fieldType===Boolean){docsTypes.push(fieldType.name)}else if(fieldType===null){docsTypes.push("null")}else if(typeof fieldType==="string"){docsTypes.push("<"+fieldType+">")}else if(Array.isArray(fieldType)){docsTypes.push("List")}else{throw new Error("Wrong value `"+fieldType+"` in `"+name+"."+key+"` structure definition")}}docs[key]=docsTypes.join(" | ")}return{docs:docs,check:createNodeStructureChecker(name,fields)}}function getStructureFromConfig(config){const structure={};if(config.node){for(const name in config.node){if(hasOwnProperty$6.call(config.node,name)){const nodeType=config.node[name];if(nodeType.structure){structure[name]=processStructure(name,nodeType)}else{throw new Error("Missed `structure` field in `"+name+"` node type definition")}}}}return structure}structure$F.getStructureFromConfig=getStructureFromConfig;var walk$5={};const noop=function(){};function ensureFunction(value){return typeof value==="function"?value:noop}function walk$4(node,options,context){function walk(node){enter.call(context,node);switch(node.type){case"Group":node.terms.forEach(walk);break;case"Multiplier":walk(node.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+node.type)}leave.call(context,node)}let enter=noop;let leave=noop;if(typeof options==="function"){enter=options}else if(options){enter=ensureFunction(options.enter);leave=ensureFunction(options.leave)}if(enter===noop&&leave===noop){throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function")}walk(node)}walk$5.walk=walk$4;const error$1=error$2;const names$3=names$4;const genericConst=genericConst$2;const generic=generic$1;const prepareTokens=prepareTokens_1;const matchGraph=matchGraph$2;const match=match$1;const trace=trace$1;const search=search$1;const structure$E=structure$F;const parse$I=parse$L;const generate$I=generate$L;const walk$3=walk$5;const cssWideKeywordsSyntax=matchGraph.buildMatchGraph(genericConst.cssWideKeywords.join(" | "));function dumpMapSyntax(map,compact,syntaxAsAst){const result={};for(const name in map){if(map[name].syntax){result[name]=syntaxAsAst?map[name].syntax:generate$I.generate(map[name].syntax,{compact:compact})}}return result}function dumpAtruleMapSyntax(map,compact,syntaxAsAst){const result={};for(const[name,atrule]of Object.entries(map)){result[name]={prelude:atrule.prelude&&(syntaxAsAst?atrule.prelude.syntax:generate$I.generate(atrule.prelude.syntax,{compact:compact})),descriptors:atrule.descriptors&&dumpMapSyntax(atrule.descriptors,compact,syntaxAsAst)}}return result}function valueHasVar(tokens){for(let i=0;i<tokens.length;i++){if(tokens[i].value.toLowerCase()==="var("){return true}}return false}function buildMatchResult(matched,error,iterations){return{matched:matched,iterations:iterations,error:error,...trace}}function matchSyntax(lexer,syntax,value,useCssWideKeywords){const tokens=prepareTokens(value,lexer.syntax);let result;if(valueHasVar(tokens)){return buildMatchResult(null,new Error("Matching for a tree with var() is not supported"))}if(useCssWideKeywords){result=match.matchAsTree(tokens,lexer.cssWideKeywordsSyntax,lexer)}if(!useCssWideKeywords||!result.match){result=match.matchAsTree(tokens,syntax.match,lexer);if(!result.match){return buildMatchResult(null,new error$1.SyntaxMatchError(result.reason,syntax.syntax,value,result),result.iterations)}}return buildMatchResult(result.match,null,result.iterations)}class Lexer$2{constructor(config,syntax,structure$1){this.cssWideKeywordsSyntax=cssWideKeywordsSyntax;this.syntax=syntax;this.generic=false;this.atrules=Object.create(null);this.properties=Object.create(null);this.types=Object.create(null);this.structure=structure$1||structure$E.getStructureFromConfig(config);if(config){if(config.types){for(const name in config.types){this.addType_(name,config.types[name])}}if(config.generic){this.generic=true;for(const name in generic){this.addType_(name,generic[name])}}if(config.atrules){for(const name in config.atrules){this.addAtrule_(name,config.atrules[name])}}if(config.properties){for(const name in config.properties){this.addProperty_(name,config.properties[name])}}}}checkStructure(ast){function collectWarning(node,message){warns.push({node:node,message:message})}const structure=this.structure;const warns=[];this.syntax.walk(ast,(function(node){if(structure.hasOwnProperty(node.type)){structure[node.type].check(node,collectWarning)}else{collectWarning(node,"Unknown node type `"+node.type+"`")}}));return warns.length?warns:false}createDescriptor(syntax,type,name,parent=null){const ref={type:type,name:name};const descriptor={type:type,name:name,parent:parent,serializable:typeof syntax==="string"||syntax&&typeof syntax.type==="string",syntax:null,match:null};if(typeof syntax==="function"){descriptor.match=matchGraph.buildMatchGraph(syntax,ref)}else{if(typeof syntax==="string"){Object.defineProperty(descriptor,"syntax",{get(){Object.defineProperty(descriptor,"syntax",{value:parse$I.parse(syntax)});return descriptor.syntax}})}else{descriptor.syntax=syntax}Object.defineProperty(descriptor,"match",{get(){Object.defineProperty(descriptor,"match",{value:matchGraph.buildMatchGraph(descriptor.syntax,ref)});return descriptor.match}})}return descriptor}addAtrule_(name,syntax){if(!syntax){return}this.atrules[name]={type:"Atrule",name:name,prelude:syntax.prelude?this.createDescriptor(syntax.prelude,"AtrulePrelude",name):null,descriptors:syntax.descriptors?Object.keys(syntax.descriptors).reduce(((map,descName)=>{map[descName]=this.createDescriptor(syntax.descriptors[descName],"AtruleDescriptor",descName,name);return map}),Object.create(null)):null}}addProperty_(name,syntax){if(!syntax){return}this.properties[name]=this.createDescriptor(syntax,"Property",name)}addType_(name,syntax){if(!syntax){return}this.types[name]=this.createDescriptor(syntax,"Type",name)}checkAtruleName(atruleName){if(!this.getAtrule(atruleName)){return new error$1.SyntaxReferenceError("Unknown at-rule","@"+atruleName)}}checkAtrulePrelude(atruleName,prelude){const error=this.checkAtruleName(atruleName);if(error){return error}const atrule=this.getAtrule(atruleName);if(!atrule.prelude&&prelude){return new SyntaxError("At-rule `@"+atruleName+"` should not contain a prelude")}if(atrule.prelude&&!prelude){if(!matchSyntax(this,atrule.prelude,"",false).matched){return new SyntaxError("At-rule `@"+atruleName+"` should contain a prelude")}}}checkAtruleDescriptorName(atruleName,descriptorName){const error$1$1=this.checkAtruleName(atruleName);if(error$1$1){return error$1$1}const atrule=this.getAtrule(atruleName);const descriptor=names$3.keyword(descriptorName);if(!atrule.descriptors){return new SyntaxError("At-rule `@"+atruleName+"` has no known descriptors")}if(!atrule.descriptors[descriptor.name]&&!atrule.descriptors[descriptor.basename]){return new error$1.SyntaxReferenceError("Unknown at-rule descriptor",descriptorName)}}checkPropertyName(propertyName){if(!this.getProperty(propertyName)){return new error$1.SyntaxReferenceError("Unknown property",propertyName)}}matchAtrulePrelude(atruleName,prelude){const error=this.checkAtrulePrelude(atruleName,prelude);if(error){return buildMatchResult(null,error)}const atrule=this.getAtrule(atruleName);if(!atrule.prelude){return buildMatchResult(null,null)}return matchSyntax(this,atrule.prelude,prelude||"",false)}matchAtruleDescriptor(atruleName,descriptorName,value){const error=this.checkAtruleDescriptorName(atruleName,descriptorName);if(error){return buildMatchResult(null,error)}const atrule=this.getAtrule(atruleName);const descriptor=names$3.keyword(descriptorName);return matchSyntax(this,atrule.descriptors[descriptor.name]||atrule.descriptors[descriptor.basename],value,false)}matchDeclaration(node){if(node.type!=="Declaration"){return buildMatchResult(null,new Error("Not a Declaration node"))}return this.matchProperty(node.property,node.value)}matchProperty(propertyName,value){if(names$3.property(propertyName).custom){return buildMatchResult(null,new Error("Lexer matching doesn't applicable for custom properties"))}const error=this.checkPropertyName(propertyName);if(error){return buildMatchResult(null,error)}return matchSyntax(this,this.getProperty(propertyName),value,true)}matchType(typeName,value){const typeSyntax=this.getType(typeName);if(!typeSyntax){return buildMatchResult(null,new error$1.SyntaxReferenceError("Unknown type",typeName))}return matchSyntax(this,typeSyntax,value,false)}match(syntax,value){if(typeof syntax!=="string"&&(!syntax||!syntax.type)){return buildMatchResult(null,new error$1.SyntaxReferenceError("Bad syntax"))}if(typeof syntax==="string"||!syntax.match){syntax=this.createDescriptor(syntax,"Type","anonymous")}return matchSyntax(this,syntax,value,false)}findValueFragments(propertyName,value,type,name){return search.matchFragments(this,value,this.matchProperty(propertyName,value),type,name)}findDeclarationValueFragments(declaration,type,name){return search.matchFragments(this,declaration.value,this.matchDeclaration(declaration),type,name)}findAllFragments(ast,type,name){const result=[];this.syntax.walk(ast,{visit:"Declaration",enter:declaration=>{result.push.apply(result,this.findDeclarationValueFragments(declaration,type,name))}});return result}getAtrule(atruleName,fallbackBasename=true){const atrule=names$3.keyword(atruleName);const atruleEntry=atrule.vendor&&fallbackBasename?this.atrules[atrule.name]||this.atrules[atrule.basename]:this.atrules[atrule.name];return atruleEntry||null}getAtrulePrelude(atruleName,fallbackBasename=true){const atrule=this.getAtrule(atruleName,fallbackBasename);return atrule&&atrule.prelude||null}getAtruleDescriptor(atruleName,name){return this.atrules.hasOwnProperty(atruleName)&&this.atrules.declarators?this.atrules[atruleName].declarators[name]||null:null}getProperty(propertyName,fallbackBasename=true){const property=names$3.property(propertyName);const propertyEntry=property.vendor&&fallbackBasename?this.properties[property.name]||this.properties[property.basename]:this.properties[property.name];return propertyEntry||null}getType(name){return hasOwnProperty.call(this.types,name)?this.types[name]:null}validate(){function validate(syntax,name,broken,descriptor){if(broken.has(name)){return broken.get(name)}broken.set(name,false);if(descriptor.syntax!==null){walk$3.walk(descriptor.syntax,(function(node){if(node.type!=="Type"&&node.type!=="Property"){return}const map=node.type==="Type"?syntax.types:syntax.properties;const brokenMap=node.type==="Type"?brokenTypes:brokenProperties;if(!hasOwnProperty.call(map,node.name)||validate(syntax,node.name,brokenMap,map[node.name])){broken.set(name,true)}}),this)}}let brokenTypes=new Map;let brokenProperties=new Map;for(const key in this.types){validate(this,key,brokenTypes,this.types[key])}for(const key in this.properties){validate(this,key,brokenProperties,this.properties[key])}brokenTypes=[...brokenTypes.keys()].filter((name=>brokenTypes.get(name)));brokenProperties=[...brokenProperties.keys()].filter((name=>brokenProperties.get(name)));if(brokenTypes.length||brokenProperties.length){return{types:brokenTypes,properties:brokenProperties}}return null}dump(syntaxAsAst,pretty){return{generic:this.generic,types:dumpMapSyntax(this.types,!pretty,syntaxAsAst),properties:dumpMapSyntax(this.properties,!pretty,syntaxAsAst),atrules:dumpAtruleMapSyntax(this.atrules,!pretty,syntaxAsAst)}}toString(){return JSON.stringify(this.dump())}}Lexer$3.Lexer=Lexer$2;const{hasOwnProperty:hasOwnProperty$5}=Object.prototype;const shape={generic:true,types:appendOrAssign,atrules:{prelude:appendOrAssignOrNull,descriptors:appendOrAssignOrNull},properties:appendOrAssign,parseContext:assign,scope:deepAssign,atrule:["parse"],pseudo:["parse"],node:["name","structure","parse","generate","walkContext"]};function isObject(value){return value&&value.constructor===Object}function copy(value){return isObject(value)?{...value}:value}function assign(dest,src){return Object.assign(dest,src)}function deepAssign(dest,src){for(const key in src){if(hasOwnProperty$5.call(src,key)){if(isObject(dest[key])){deepAssign(dest[key],src[key])}else{dest[key]=copy(src[key])}}}return dest}function append(a,b){if(typeof b==="string"&&/^\s*\|/.test(b)){return typeof a==="string"?a+b:b.replace(/^\s*\|\s*/,"")}return b||null}function appendOrAssign(a,b){if(typeof b==="string"){return append(a,b)}const result={...a};for(let key in b){if(hasOwnProperty$5.call(b,key)){result[key]=append(hasOwnProperty$5.call(a,key)?a[key]:undefined,b[key])}}return result}function appendOrAssignOrNull(a,b){const result=appendOrAssign(a,b);return!isObject(result)||Object.keys(result).length?result:null}function mix$1(dest,src,shape){for(const key in shape){if(hasOwnProperty$5.call(shape,key)===false){continue}if(shape[key]===true){if(hasOwnProperty$5.call(src,key)){dest[key]=copy(src[key])}}else if(shape[key]){if(typeof shape[key]==="function"){const fn=shape[key];dest[key]=fn({},dest[key]);dest[key]=fn(dest[key]||{},src[key])}else if(isObject(shape[key])){const result={};for(let name in dest[key]){result[name]=mix$1({},dest[key][name],shape[key])}for(let name in src[key]){result[name]=mix$1(result[name]||{},src[key][name],shape[key])}dest[key]=result}else if(Array.isArray(shape[key])){const res={};const innerShape=shape[key].reduce((function(s,k){s[k]=true;return s}),{});for(const[name,value]of Object.entries(dest[key]||{})){res[name]={};if(value){mix$1(res[name],value,innerShape)}}for(const name in src[key]){if(hasOwnProperty$5.call(src[key],name)){if(!res[name]){res[name]={}}if(src[key]&&src[key][name]){mix$1(res[name],src[key][name],innerShape)}}}dest[key]=res}}}return dest}const mix$1$1=(dest,src)=>mix$1(dest,src,shape);var mix_1=mix$1$1;const index$8=tokenizer$2;const create$2=create$7;const create$2$1=create$6;const create$3=create$5;const create$1$1=create$4;const Lexer$1=Lexer$3;const mix=mix_1;function createSyntax(config){const parse=create$2.createParser(config);const walk=create$1$1.createWalker(config);const generate=create$2$1.createGenerator(config);const{fromPlainObject:fromPlainObject,toPlainObject:toPlainObject}=create$3.createConvertor(walk);const syntax={lexer:null,createLexer:config=>new Lexer$1.Lexer(config,syntax,syntax.lexer.structure),tokenize:index$8.tokenize,parse:parse,generate:generate,walk:walk,find:walk.find,findLast:walk.findLast,findAll:walk.findAll,fromPlainObject:fromPlainObject,toPlainObject:toPlainObject,fork(extension){const base=mix({},config);return createSyntax(typeof extension==="function"?extension(base,Object.assign):mix(base,extension))}};syntax.lexer=new Lexer$1.Lexer({generic:true,types:config.types,atrules:config.atrules,properties:config.properties,node:config.node},syntax);return syntax}const createSyntax$1=config=>createSyntax(mix({},config));var create_1=createSyntax$1;var data$1={generic:true,types:{"absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","alpha-value":"<number>|<percentage>","angle-percentage":"<angle>|<percentage>","angular-color-hint":"<angle-percentage>","angular-color-stop":"<color>&&<color-stop-angle>?","angular-color-stop-list":"[<angular-color-stop> [, <angular-color-hint>]?]# , <angular-color-stop>","animateable-feature":"scroll-position|contents|<custom-ident>",attachment:"scroll|fixed|local","attr()":"attr( <attr-name> <type-or-unit>? [, <attr-fallback>]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' <wq-name> ']'|'[' <wq-name> <attr-matcher> [<string-token>|<ident-token>] <attr-modifier>? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [<line-names>? <fixed-size>]+ <line-names>? )","auto-track-list":"[<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>? <auto-repeat> [<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>?","baseline-position":"[first|last]? baseline","basic-shape":"<inset()>|<circle()>|<ellipse()>|<polygon()>|<path()>","bg-image":"none|<image>","bg-layer":"<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","bg-position":"[[left|center|right|top|bottom|<length-percentage>]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]|[center|[left|right] <length-percentage>?]&&[center|[top|bottom] <length-percentage>?]]","bg-size":"[<length-percentage>|auto]{1,2}|cover|contain","blur()":"blur( <length> )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( <number-percentage> )","calc()":"calc( <calc-sum> )","calc-sum":"<calc-product> [['+'|'-'] <calc-product>]*","calc-product":"<calc-value> ['*' <calc-value>|'/' <number>]*","calc-value":"<number>|<dimension>|<percentage>|( <calc-sum> )","cf-final-image":"<image>|<color>","cf-mixing-image":"<percentage>?&&<image>","circle()":"circle( [<shape-radius>]? [at <position>]? )","clamp()":"clamp( <calc-sum>#{3} )","class-selector":"'.' <ident-token>","clip-source":"<url>",color:"<rgb()>|<rgba()>|<hsl()>|<hsla()>|<hwb()>|<lab()>|<lch()>|<hex-color>|<named-color>|currentcolor|<deprecated-system-color>","color-stop":"<color-stop-length>|<color-stop-angle>","color-stop-angle":"<angle-percentage>{1,2}","color-stop-length":"<length-percentage>{1,2}","color-stop-list":"[<linear-color-stop> [, <linear-color-hint>]?]# , <linear-color-stop>",combinator:"'>'|'+'|'~'|['||']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[<type-selector>? <subclass-selector>* [<pseudo-element-selector> <pseudo-class-selector>*]*]!","compound-selector-list":"<compound-selector>#","complex-selector":"<compound-selector> [<combinator>? <compound-selector>]*","complex-selector-list":"<complex-selector>#","conic-gradient()":"conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[<string>|contents|<image>|<counter>|<quote>|<target>|<leader()>|<attr()>]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"<image>","contrast()":"contrast( [<number-percentage>] )",counter:"<counter()>|<counters()>","counter()":"counter( <counter-name> , <counter-style>? )","counter-name":"<custom-ident>","counter-style":"<counter-style-name>|symbols( )","counter-style-name":"<custom-ident>","counters()":"counters( <counter-name> , <string> , <counter-style>? )","cross-fade()":"cross-fade( <cf-mixing-image> , <cf-final-image>? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( <number [0,1]> , <number> , <number [0,1]> , <number> )","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"<display-outside>?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( <length>{2,3} <color>? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( <custom-ident> , [first|start|last|first-except]? )|element( <id-selector> )","ellipse()":"ellipse( [<shape-radius>{2}]? [at <position>]? )","ending-shape":"circle|ellipse","env()":"env( <custom-ident> , <declaration-value>? )","explicit-track-list":"[<line-names>? <track-size>]+ <line-names>?","family-name":"<string>|<custom-ident>+","feature-tag-value":"<string> [<integer>|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":"<feature-type> '{' <feature-value-declaration-list> '}'","feature-value-block-list":"<feature-value-block>+","feature-value-declaration":"<custom-ident> : <integer>+ ;","feature-value-declaration-list":"<feature-value-declaration>","feature-value-name":"<custom-ident>","fill-rule":"nonzero|evenodd","filter-function":"<blur()>|<brightness()>|<contrast()>|<drop-shadow()>|<grayscale()>|<hue-rotate()>|<invert()>|<opacity()>|<saturate()>|<sepia()>","filter-function-list":"[<filter-function>|<url>]+","final-bg-layer":"<'background-color'>||<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","fit-content()":"fit-content( [<length>|<percentage>] )","fixed-breadth":"<length-percentage>","fixed-repeat":"repeat( [<integer [1,∞]>] , [<line-names>? <fixed-size>]+ <line-names>? )","fixed-size":"<fixed-breadth>|minmax( <fixed-breadth> , <track-breadth> )|minmax( <inflexible-breadth> , <fixed-breadth> )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|<percentage>","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|<number [1,1000]>","frequency-percentage":"<frequency>|<percentage>","general-enclosed":"[<function-token> <any-value> )]|( <ident> <any-value> )","generic-family":"serif|sans-serif|cursive|fantasy|monospace|-apple-system","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"<shape-box>|fill-box|stroke-box|view-box",gradient:"<linear-gradient()>|<repeating-linear-gradient()>|<radial-gradient()>|<repeating-radial-gradient()>|<conic-gradient()>|<repeating-conic-gradient()>|<-legacy-gradient>","grayscale()":"grayscale( <number-percentage> )","grid-line":"auto|<custom-ident>|[<integer>&&<custom-ident>?]|[span&&[<integer>||<custom-ident>]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsl( <hue> , <percentage> , <percentage> , <alpha-value>? )","hsla()":"hsla( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsla( <hue> , <percentage> , <percentage> , <alpha-value>? )",hue:"<number>|<angle>","hue-rotate()":"hue-rotate( <angle> )","hwb()":"hwb( [<hue>|none] [<percentage>|none] [<percentage>|none] [/ [<alpha-value>|none]]? )",image:"<url>|<image()>|<image-set()>|<element()>|<paint()>|<cross-fade()>|<gradient>","image()":"image( <image-tags>? [<image-src>? , <color>?]! )","image-set()":"image-set( <image-set-option># )","image-set-option":"[<image>|<string>] [<resolution>||type( <string> )]","image-src":"<url>|<string>","image-tags":"ltr|rtl","inflexible-breadth":"<length>|<percentage>|min-content|max-content|auto","inset()":"inset( <length-percentage>{1,4} [round <'border-radius'>]? )","invert()":"invert( <number-percentage> )","keyframes-name":"<custom-ident>|<string>","keyframe-block":"<keyframe-selector># { <declaration-list> }","keyframe-block-list":"<keyframe-block>+","keyframe-selector":"from|to|<percentage>","layer()":"layer( <layer-name> )","layer-name":"<ident> ['.' <ident>]*","leader()":"leader( <leader-type> )","leader-type":"dotted|solid|space|<string>","length-percentage":"<length>|<percentage>","line-names":"'[' <custom-ident>* ']'","line-name-list":"[<line-names>|<name-repeat>]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"<length>|thin|medium|thick","linear-color-hint":"<length-percentage>","linear-color-stop":"<color> <color-stop-length>?","linear-gradient()":"linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","mask-layer":"<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||<geometry-box>||[<geometry-box>|no-clip]||<compositing-operator>||<masking-mode>","mask-position":"[<length-percentage>|left|center|right] [<length-percentage>|top|center|bottom]?","mask-reference":"none|<image>|<mask-source>","mask-source":"<url>","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( <number>#{6} )","matrix3d()":"matrix3d( <number>#{16} )","max()":"max( <calc-sum># )","media-and":"<media-in-parens> [and <media-in-parens>]+","media-condition":"<media-not>|<media-and>|<media-or>|<media-in-parens>","media-condition-without-or":"<media-not>|<media-and>|<media-in-parens>","media-feature":"( [<mf-plain>|<mf-boolean>|<mf-range>] )","media-in-parens":"( <media-condition> )|<media-feature>|<general-enclosed>","media-not":"not <media-in-parens>","media-or":"<media-in-parens> [or <media-in-parens>]+","media-query":"<media-condition>|[not|only]? <media-type> [and <media-condition-without-or>]?","media-query-list":"<media-query>#","media-type":"<ident>","mf-boolean":"<mf-name>","mf-name":"<ident>","mf-plain":"<mf-name> : <mf-value>","mf-range":"<mf-name> ['<'|'>']? '='? <mf-value>|<mf-value> ['<'|'>']? '='? <mf-name>|<mf-value> '<' '='? <mf-name> '<' '='? <mf-value>|<mf-value> '>' '='? <mf-name> '>' '='? <mf-value>","mf-value":"<number>|<dimension>|<ident>|<ratio>","min()":"min( <calc-sum># )","minmax()":"minmax( [<length>|<percentage>|min-content|max-content|auto] , [<length>|<percentage>|<flex>|min-content|max-content|auto] )","name-repeat":"repeat( [<integer [1,∞]>|auto-fill] , <line-names>+ )","named-color":"transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>","namespace-prefix":"<ident>","ns-prefix":"[<ident-token>|'*']? '|'","number-percentage":"<number>|<percentage>","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"<an-plus-b>|even|odd","opacity()":"opacity( [<number-percentage>] )","overflow-position":"unsafe|safe","outline-radius":"<length>|<percentage>","page-body":"<declaration>? [; <page-body>]?|<page-margin-box> <page-body>","page-margin-box":"<page-margin-box-type> '{' <declaration-list> '}'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector-list":"[<page-selector>#]?","page-selector":"<pseudo-page>+|<ident> <pseudo-page>*","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger","path()":"path( [<fill-rule> ,]? <string> )","paint()":"paint( <ident> , <declaration-value>? )","perspective()":"perspective( <length> )","polygon()":"polygon( <fill-rule>? , [<length-percentage> <length-percentage>]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]?|[[left|right] <length-percentage>]&&[[top|bottom] <length-percentage>]]","pseudo-class-selector":"':' <ident-token>|':' <function-token> <any-value> ')'","pseudo-element-selector":"':' <pseudo-class-selector>","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )","relative-selector":"<combinator>? <complex-selector>","relative-selector-list":"<relative-selector>#","relative-size":"larger|smaller","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-conic-gradient()":"repeating-conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","repeating-linear-gradient()":"repeating-linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","repeating-radial-gradient()":"repeating-radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )","rgb()":"rgb( <percentage>{3} [/ <alpha-value>]? )|rgb( <number>{3} [/ <alpha-value>]? )|rgb( <percentage>#{3} , <alpha-value>? )|rgb( <number>#{3} , <alpha-value>? )","rgba()":"rgba( <percentage>{3} [/ <alpha-value>]? )|rgba( <number>{3} [/ <alpha-value>]? )|rgba( <percentage>#{3} , <alpha-value>? )|rgba( <number>#{3} , <alpha-value>? )","rotate()":"rotate( [<angle>|<zero>] )","rotate3d()":"rotate3d( <number> , <number> , <number> , [<angle>|<zero>] )","rotateX()":"rotateX( [<angle>|<zero>] )","rotateY()":"rotateY( [<angle>|<zero>] )","rotateZ()":"rotateZ( [<angle>|<zero>] )","saturate()":"saturate( <number-percentage> )","scale()":"scale( <number> , <number>? )","scale3d()":"scale3d( <number> , <number> , <number> )","scaleX()":"scaleX( <number> )","scaleY()":"scaleY( <number> )","scaleZ()":"scaleZ( <number> )","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"<length-percentage>|closest-side|farthest-side","skew()":"skew( [<angle>|<zero>] , [<angle>|<zero>]? )","skewX()":"skewX( [<angle>|<zero>] )","skewY()":"skewY( [<angle>|<zero>] )","sepia()":"sepia( <number-percentage> )",shadow:"inset?&&<length>{2,4}&&<color>?","shadow-t":"[<length>{2,3}&&<color>?]",shape:"rect( <top> , <right> , <bottom> , <left> )|rect( <top> <right> <bottom> <left> )","shape-box":"<box>|margin-box","side-or-corner":"[left|right]||[top|bottom]","single-animation":"<time>||<easing-function>||<time>||<single-animation-iteration-count>||<single-animation-direction>||<single-animation-fill-mode>||<single-animation-play-state>||[none|<keyframes-name>]","single-animation-direction":"normal|reverse|alternate|alternate-reverse","single-animation-fill-mode":"none|forwards|backwards|both","single-animation-iteration-count":"infinite|<number>","single-animation-play-state":"running|paused","single-animation-timeline":"auto|none|<timeline-name>","single-transition":"[none|<single-transition-property>]||<time>||<easing-function>||<time>","single-transition-property":"all|<custom-ident>",size:"closest-side|farthest-side|closest-corner|farthest-corner|<length>|<length-percentage>{2}","step-position":"jump-start|jump-end|jump-none|jump-both|start|end","step-timing-function":"step-start|step-end|steps( <integer> [, <step-position>]? )","subclass-selector":"<id-selector>|<class-selector>|<attribute-selector>|<pseudo-class-selector>","supports-condition":"not <supports-in-parens>|<supports-in-parens> [and <supports-in-parens>]*|<supports-in-parens> [or <supports-in-parens>]*","supports-in-parens":"( <supports-condition> )|<supports-feature>|<general-enclosed>","supports-feature":"<supports-decl>|<supports-selector-fn>","supports-decl":"( <declaration> )","supports-selector-fn":"selector( <complex-selector> )",symbol:"<string>|<image>|<custom-ident>",target:"<target-counter()>|<target-counters()>|<target-text()>","target-counter()":"target-counter( [<string>|<url>] , <custom-ident> , <counter-style>? )","target-counters()":"target-counters( [<string>|<url>] , <custom-ident> , <string> , <counter-style>? )","target-text()":"target-text( [<string>|<url>] , [content|before|after|first-letter]? )","time-percentage":"<time>|<percentage>","timeline-name":"<custom-ident>|<string>","easing-function":"linear|<cubic-bezier-timing-function>|<step-timing-function>","track-breadth":"<length-percentage>|<flex>|min-content|max-content|auto","track-list":"[<line-names>? [<track-size>|<track-repeat>]]+ <line-names>?","track-repeat":"repeat( [<integer [1,∞]>] , [<line-names>? <track-size>]+ <line-names>? )","track-size":"<track-breadth>|minmax( <inflexible-breadth> , <track-breadth> )|fit-content( [<length>|<percentage>] )","transform-function":"<matrix()>|<translate()>|<translateX()>|<translateY()>|<scale()>|<scaleX()>|<scaleY()>|<rotate()>|<skew()>|<skewX()>|<skewY()>|<matrix3d()>|<translate3d()>|<translateZ()>|<scale3d()>|<scaleZ()>|<rotate3d()>|<rotateX()>|<rotateY()>|<rotateZ()>|<perspective()>","transform-list":"<transform-function>+","translate()":"translate( <length-percentage> , <length-percentage>? )","translate3d()":"translate3d( <length-percentage> , <length-percentage> , <length> )","translateX()":"translateX( <length-percentage> )","translateY()":"translateY( <length-percentage> )","translateZ()":"translateZ( <length> )","type-or-unit":"string|color|url|integer|number|length|angle|time|frequency|cap|ch|em|ex|ic|lh|rlh|rem|vb|vi|vw|vh|vmin|vmax|mm|Q|cm|in|pt|pc|px|deg|grad|rad|turn|ms|s|Hz|kHz|%","type-selector":"<wq-name>|<ns-prefix>? '*'","var()":"var( <custom-property-name> , <declaration-value>? )","viewport-length":"auto|<length-percentage>","visual-box":"content-box|padding-box|border-box","wq-name":"<ns-prefix>? <ident-token>","-legacy-gradient":"<-webkit-gradient()>|<-legacy-linear-gradient>|<-legacy-repeating-linear-gradient>|<-legacy-radial-gradient>|<-legacy-repeating-radial-gradient>","-legacy-linear-gradient":"-moz-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-repeating-linear-gradient":"-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-linear-gradient-arguments":"[<angle>|<side-or-corner>]? , <color-stop-list>","-legacy-radial-gradient":"-moz-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-repeating-radial-gradient":"-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-radial-gradient-arguments":"[<position> ,]? [[[<-legacy-radial-gradient-shape>||<-legacy-radial-gradient-size>]|[<length>|<percentage>]{2}] ,]? <color-stop-list>","-legacy-radial-gradient-size":"closest-side|closest-corner|farthest-side|farthest-corner|contain|cover","-legacy-radial-gradient-shape":"circle|ellipse","-non-standard-font":"-apple-system-body|-apple-system-headline|-apple-system-subheadline|-apple-system-caption1|-apple-system-caption2|-apple-system-footnote|-apple-system-short-body|-apple-system-short-headline|-apple-system-short-subheadline|-apple-system-short-caption1|-apple-system-short-footnote|-apple-system-tall-body","-non-standard-color":"-moz-ButtonDefault|-moz-ButtonHoverFace|-moz-ButtonHoverText|-moz-CellHighlight|-moz-CellHighlightText|-moz-Combobox|-moz-ComboboxText|-moz-Dialog|-moz-DialogText|-moz-dragtargetzone|-moz-EvenTreeRow|-moz-Field|-moz-FieldText|-moz-html-CellHighlight|-moz-html-CellHighlightText|-moz-mac-accentdarkestshadow|-moz-mac-accentdarkshadow|-moz-mac-accentface|-moz-mac-accentlightesthighlight|-moz-mac-accentlightshadow|-moz-mac-accentregularhighlight|-moz-mac-accentregularshadow|-moz-mac-chrome-active|-moz-mac-chrome-inactive|-moz-mac-focusring|-moz-mac-menuselect|-moz-mac-menushadow|-moz-mac-menutextselect|-moz-MenuHover|-moz-MenuHoverText|-moz-MenuBarText|-moz-MenuBarHoverText|-moz-nativehyperlinktext|-moz-OddTreeRow|-moz-win-communicationstext|-moz-win-mediatext|-moz-activehyperlinktext|-moz-default-background-color|-moz-default-color|-moz-hyperlinktext|-moz-visitedhyperlinktext|-webkit-activelink|-webkit-focus-ring-color|-webkit-link|-webkit-text","-non-standard-image-rendering":"optimize-contrast|-moz-crisp-edges|-o-crisp-edges|-webkit-optimize-contrast","-non-standard-overflow":"-moz-scrollbars-none|-moz-scrollbars-horizontal|-moz-scrollbars-vertical|-moz-hidden-unscrollable","-non-standard-width":"fill-available|min-intrinsic|intrinsic|-moz-available|-moz-fit-content|-moz-min-content|-moz-max-content|-webkit-min-content|-webkit-max-content","-webkit-gradient()":"-webkit-gradient( <-webkit-gradient-type> , <-webkit-gradient-point> [, <-webkit-gradient-point>|, <-webkit-gradient-radius> , <-webkit-gradient-point>] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )","-webkit-gradient-color-stop":"from( <color> )|color-stop( [<number-zero-one>|<percentage>] , <color> )|to( <color> )","-webkit-gradient-point":"[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]","-webkit-gradient-radius":"<length>|<percentage>","-webkit-gradient-type":"linear|radial","-webkit-mask-box-repeat":"repeat|stretch|round","-webkit-mask-clip-style":"border|border-box|padding|padding-box|content|content-box|text","-ms-filter-function-list":"<-ms-filter-function>+","-ms-filter-function":"<-ms-filter-function-progid>|<-ms-filter-function-legacy>","-ms-filter-function-progid":"'progid:' [<ident-token> '.']* [<ident-token>|<function-token> <any-value>? )]","-ms-filter-function-legacy":"<ident-token>|<function-token> <any-value>? )","-ms-filter":"<string>",age:"child|young|old","attr-name":"<wq-name>","attr-fallback":"<any-value>","bg-clip":"<box>|border|text","border-radius":"<length-percentage>{1,2}",bottom:"<length>|auto","generic-voice":"[<age>? <gender> <integer>?]",gender:"male|female|neutral","lab()":"lab( [<percentage>|<number>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )","lch()":"lch( [<percentage>|<number>|none] [<percentage>|<number>|none] [<hue>|none] [/ [<alpha-value>|none]]? )",left:"<length>|auto","mask-image":"<mask-reference>#",paint:"none|<color>|<url> [none|<color>]?|context-fill|context-stroke",ratio:"<number [0,∞]> [/ <number [0,∞]>]?","reversed-counter-name":"reversed( <counter-name> )",right:"<length>|auto","svg-length":"<percentage>|<length>|<number>","svg-writing-mode":"lr-tb|rl-tb|tb-rl|lr|rl|tb",top:"<length>|auto","track-group":"'(' [<string>* <track-minmax> <string>*]+ ')' ['[' <positive-integer> ']']?|<track-minmax>","track-list-v0":"[<string>* <track-group> <string>*]+|none","track-minmax":"minmax( <track-breadth> , <track-breadth> )|auto|<track-breadth>|fit-content",x:"<number>",y:"<number>",declaration:"<ident-token> : <declaration-value>? ['!' important]?","declaration-list":"[<declaration>? ';']* <declaration>?",url:"url( <string> <url-modifier>* )|<url-token>","url-modifier":"<ident>|<function-token> <any-value> )","number-zero-one":"<number [0,1]>","number-one-or-greater":"<number [1,∞]>","positive-integer":"<integer [0,∞]>","-non-standard-display":"-ms-inline-flexbox|-ms-grid|-ms-inline-grid|-webkit-flex|-webkit-inline-flex|-webkit-box|-webkit-inline-box|-moz-inline-stack|-moz-box|-moz-inline-box"},properties:{"--*":"<declaration-value>","-ms-accelerator":"false|true","-ms-block-progression":"tb|rl|bt|lr","-ms-content-zoom-chaining":"none|chained","-ms-content-zooming":"none|zoom","-ms-content-zoom-limit":"<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>","-ms-content-zoom-limit-max":"<percentage>","-ms-content-zoom-limit-min":"<percentage>","-ms-content-zoom-snap":"<'-ms-content-zoom-snap-type'>||<'-ms-content-zoom-snap-points'>","-ms-content-zoom-snap-points":"snapInterval( <percentage> , <percentage> )|snapList( <percentage># )","-ms-content-zoom-snap-type":"none|proximity|mandatory","-ms-filter":"<string>","-ms-flow-from":"[none|<custom-ident>]#","-ms-flow-into":"[none|<custom-ident>]#","-ms-grid-columns":"none|<track-list>|<auto-track-list>","-ms-grid-rows":"none|<track-list>|<auto-track-list>","-ms-high-contrast-adjust":"auto|none","-ms-hyphenate-limit-chars":"auto|<integer>{1,3}","-ms-hyphenate-limit-lines":"no-limit|<integer>","-ms-hyphenate-limit-zone":"<percentage>|<length>","-ms-ime-align":"auto|after","-ms-overflow-style":"auto|none|scrollbar|-ms-autohiding-scrollbar","-ms-scrollbar-3dlight-color":"<color>","-ms-scrollbar-arrow-color":"<color>","-ms-scrollbar-base-color":"<color>","-ms-scrollbar-darkshadow-color":"<color>","-ms-scrollbar-face-color":"<color>","-ms-scrollbar-highlight-color":"<color>","-ms-scrollbar-shadow-color":"<color>","-ms-scrollbar-track-color":"<color>","-ms-scroll-chaining":"chained|none","-ms-scroll-limit":"<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>","-ms-scroll-limit-x-max":"auto|<length>","-ms-scroll-limit-x-min":"<length>","-ms-scroll-limit-y-max":"auto|<length>","-ms-scroll-limit-y-min":"<length>","-ms-scroll-rails":"none|railed","-ms-scroll-snap-points-x":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-points-y":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-type":"none|proximity|mandatory","-ms-scroll-snap-x":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>","-ms-scroll-snap-y":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>","-ms-scroll-translation":"none|vertical-to-horizontal","-ms-text-autospace":"none|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space","-ms-touch-select":"grippers|none","-ms-user-select":"none|element|text","-ms-wrap-flow":"auto|both|start|end|maximum|clear","-ms-wrap-margin":"<length>","-ms-wrap-through":"wrap|none","-moz-appearance":"none|button|button-arrow-down|button-arrow-next|button-arrow-previous|button-arrow-up|button-bevel|button-focus|caret|checkbox|checkbox-container|checkbox-label|checkmenuitem|dualbutton|groupbox|listbox|listitem|menuarrow|menubar|menucheckbox|menuimage|menuitem|menuitemtext|menulist|menulist-button|menulist-text|menulist-textfield|menupopup|menuradio|menuseparator|meterbar|meterchunk|progressbar|progressbar-vertical|progresschunk|progresschunk-vertical|radio|radio-container|radio-label|radiomenuitem|range|range-thumb|resizer|resizerpanel|scale-horizontal|scalethumbend|scalethumb-horizontal|scalethumbstart|scalethumbtick|scalethumb-vertical|scale-vertical|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|separator|sheet|spinner|spinner-downbutton|spinner-textfield|spinner-upbutton|splitter|statusbar|statusbarpanel|tab|tabpanel|tabpanels|tab-scroll-arrow-back|tab-scroll-arrow-forward|textfield|textfield-multiline|toolbar|toolbarbutton|toolbarbutton-dropdown|toolbargripper|toolbox|tooltip|treeheader|treeheadercell|treeheadersortarrow|treeitem|treeline|treetwisty|treetwistyopen|treeview|-moz-mac-unified-toolbar|-moz-win-borderless-glass|-moz-win-browsertabbar-toolbox|-moz-win-communicationstext|-moz-win-communications-toolbox|-moz-win-exclude-glass|-moz-win-glass|-moz-win-mediatext|-moz-win-media-toolbox|-moz-window-button-box|-moz-window-button-box-maximized|-moz-window-button-close|-moz-window-button-maximize|-moz-window-button-minimize|-moz-window-button-restore|-moz-window-frame-bottom|-moz-window-frame-left|-moz-window-frame-right|-moz-window-titlebar|-moz-window-titlebar-maximized","-moz-binding":"<url>|none","-moz-border-bottom-colors":"<color>+|none","-moz-border-left-colors":"<color>+|none","-moz-border-right-colors":"<color>+|none","-moz-border-top-colors":"<color>+|none","-moz-context-properties":"none|[fill|fill-opacity|stroke|stroke-opacity]#","-moz-float-edge":"border-box|content-box|margin-box|padding-box","-moz-force-broken-image-icon":"0|1","-moz-image-region":"<shape>|auto","-moz-orient":"inline|block|horizontal|vertical","-moz-outline-radius":"<outline-radius>{1,4} [/ <outline-radius>{1,4}]?","-moz-outline-radius-bottomleft":"<outline-radius>","-moz-outline-radius-bottomright":"<outline-radius>","-moz-outline-radius-topleft":"<outline-radius>","-moz-outline-radius-topright":"<outline-radius>","-moz-stack-sizing":"ignore|stretch-to-fit","-moz-text-blink":"none|blink","-moz-user-focus":"ignore|normal|select-after|select-before|select-menu|select-same|select-all|none","-moz-user-input":"auto|none|enabled|disabled","-moz-user-modify":"read-only|read-write|write-only","-moz-window-dragging":"drag|no-drag","-moz-window-shadow":"default|menu|tooltip|sheet|none","-webkit-appearance":"none|button|button-bevel|caps-lock-indicator|caret|checkbox|default-button|inner-spin-button|listbox|listitem|media-controls-background|media-controls-fullscreen-background|media-current-time-display|media-enter-fullscreen-button|media-exit-fullscreen-button|media-fullscreen-button|media-mute-button|media-overlay-play-button|media-play-button|media-seek-back-button|media-seek-forward-button|media-slider|media-sliderthumb|media-time-remaining-display|media-toggle-closed-captions-button|media-volume-slider|media-volume-slider-container|media-volume-sliderthumb|menulist|menulist-button|menulist-text|menulist-textfield|meter|progress-bar|progress-bar-value|push-button|radio|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbargripper-horizontal|scrollbargripper-vertical|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|searchfield-cancel-button|searchfield-decoration|searchfield-results-button|searchfield-results-decoration|slider-horizontal|slider-vertical|sliderthumb-horizontal|sliderthumb-vertical|square-button|textarea|textfield|-apple-pay-button","-webkit-border-before":"<'border-width'>||<'border-style'>||<color>","-webkit-border-before-color":"<color>","-webkit-border-before-style":"<'border-style'>","-webkit-border-before-width":"<'border-width'>","-webkit-box-reflect":"[above|below|right|left]? <length>? <image>?","-webkit-line-clamp":"none|<integer>","-webkit-mask":"[<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||[<box>|border|padding|content|text]||[<box>|border|padding|content]]#","-webkit-mask-attachment":"<attachment>#","-webkit-mask-clip":"[<box>|border|padding|content|text]#","-webkit-mask-composite":"<composite-style>#","-webkit-mask-image":"<mask-reference>#","-webkit-mask-origin":"[<box>|border|padding|content]#","-webkit-mask-position":"<position>#","-webkit-mask-position-x":"[<length-percentage>|left|center|right]#","-webkit-mask-position-y":"[<length-percentage>|top|center|bottom]#","-webkit-mask-repeat":"<repeat-style>#","-webkit-mask-repeat-x":"repeat|no-repeat|space|round","-webkit-mask-repeat-y":"repeat|no-repeat|space|round","-webkit-mask-size":"<bg-size>#","-webkit-overflow-scrolling":"auto|touch","-webkit-tap-highlight-color":"<color>","-webkit-text-fill-color":"<color>","-webkit-text-stroke":"<length>||<color>","-webkit-text-stroke-color":"<color>","-webkit-text-stroke-width":"<length>","-webkit-touch-callout":"default|none","-webkit-user-modify":"read-only|read-write|read-write-plaintext-only","accent-color":"auto|<color>","align-content":"normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>","align-items":"normal|stretch|<baseline-position>|[<overflow-position>? <self-position>]","align-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? <self-position>","align-tracks":"[normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>]#",all:"initial|inherit|unset|revert|revert-layer",animation:"<single-animation>#","animation-delay":"<time>#","animation-direction":"<single-animation-direction>#","animation-duration":"<time>#","animation-fill-mode":"<single-animation-fill-mode>#","animation-iteration-count":"<single-animation-iteration-count>#","animation-name":"[none|<keyframes-name>]#","animation-play-state":"<single-animation-play-state>#","animation-timing-function":"<easing-function>#","animation-timeline":"<single-animation-timeline>#",appearance:"none|auto|textfield|menulist-button|<compat-auto>","aspect-ratio":"auto|<ratio>",azimuth:"<angle>|[[left-side|far-left|left|center-left|center|center-right|right|far-right|right-side]||behind]|leftwards|rightwards","backdrop-filter":"none|<filter-function-list>","backface-visibility":"visible|hidden",background:"[<bg-layer> ,]* <final-bg-layer>","background-attachment":"<attachment>#","background-blend-mode":"<blend-mode>#","background-clip":"<bg-clip>#","background-color":"<color>","background-image":"<bg-image>#","background-origin":"<box>#","background-position":"<bg-position>#","background-position-x":"[center|[[left|right|x-start|x-end]? <length-percentage>?]!]#","background-position-y":"[center|[[top|bottom|y-start|y-end]? <length-percentage>?]!]#","background-repeat":"<repeat-style>#","background-size":"<bg-size>#","block-overflow":"clip|ellipsis|<string>","block-size":"<'width'>",border:"<line-width>||<line-style>||<color>","border-block":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-color":"<'border-top-color'>{1,2}","border-block-style":"<'border-top-style'>","border-block-width":"<'border-top-width'>","border-block-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-end-color":"<'border-top-color'>","border-block-end-style":"<'border-top-style'>","border-block-end-width":"<'border-top-width'>","border-block-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-start-color":"<'border-top-color'>","border-block-start-style":"<'border-top-style'>","border-block-start-width":"<'border-top-width'>","border-bottom":"<line-width>||<line-style>||<color>","border-bottom-color":"<'border-top-color'>","border-bottom-left-radius":"<length-percentage>{1,2}","border-bottom-right-radius":"<length-percentage>{1,2}","border-bottom-style":"<line-style>","border-bottom-width":"<line-width>","border-collapse":"collapse|separate","border-color":"<color>{1,4}","border-end-end-radius":"<length-percentage>{1,2}","border-end-start-radius":"<length-percentage>{1,2}","border-image":"<'border-image-source'>||<'border-image-slice'> [/ <'border-image-width'>|/ <'border-image-width'>? / <'border-image-outset'>]?||<'border-image-repeat'>","border-image-outset":"[<length>|<number>]{1,4}","border-image-repeat":"[stretch|repeat|round|space]{1,2}","border-image-slice":"<number-percentage>{1,4}&&fill?","border-image-source":"none|<image>","border-image-width":"[<length-percentage>|<number>|auto]{1,4}","border-inline":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-color":"<'border-top-color'>{1,2}","border-inline-style":"<'border-top-style'>","border-inline-width":"<'border-top-width'>","border-inline-end-color":"<'border-top-color'>","border-inline-end-style":"<'border-top-style'>","border-inline-end-width":"<'border-top-width'>","border-inline-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-start-color":"<'border-top-color'>","border-inline-start-style":"<'border-top-style'>","border-inline-start-width":"<'border-top-width'>","border-left":"<line-width>||<line-style>||<color>","border-left-color":"<color>","border-left-style":"<line-style>","border-left-width":"<line-width>","border-radius":"<length-percentage>{1,4} [/ <length-percentage>{1,4}]?","border-right":"<line-width>||<line-style>||<color>","border-right-color":"<color>","border-right-style":"<line-style>","border-right-width":"<line-width>","border-spacing":"<length> <length>?","border-start-end-radius":"<length-percentage>{1,2}","border-start-start-radius":"<length-percentage>{1,2}","border-style":"<line-style>{1,4}","border-top":"<line-width>||<line-style>||<color>","border-top-color":"<color>","border-top-left-radius":"<length-percentage>{1,2}","border-top-right-radius":"<length-percentage>{1,2}","border-top-style":"<line-style>","border-top-width":"<line-width>","border-width":"<line-width>{1,4}",bottom:"<length>|<percentage>|auto","box-align":"start|center|end|baseline|stretch","box-decoration-break":"slice|clone","box-direction":"normal|reverse|inherit","box-flex":"<number>","box-flex-group":"<integer>","box-lines":"single|multiple","box-ordinal-group":"<integer>","box-orient":"horizontal|vertical|inline-axis|block-axis|inherit","box-pack":"start|center|end|justify","box-shadow":"none|<shadow>#","box-sizing":"content-box|border-box","break-after":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-before":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-inside":"auto|avoid|avoid-page|avoid-column|avoid-region","caption-side":"top|bottom|block-start|block-end|inline-start|inline-end","caret-color":"auto|<color>",clear:"none|left|right|both|inline-start|inline-end",clip:"<shape>|auto","clip-path":"<clip-source>|[<basic-shape>||<geometry-box>]|none",color:"<color>","print-color-adjust":"economy|exact","color-scheme":"normal|[light|dark|<custom-ident>]+&&only?","column-count":"<integer>|auto","column-fill":"auto|balance|balance-all","column-gap":"normal|<length-percentage>","column-rule":"<'column-rule-width'>||<'column-rule-style'>||<'column-rule-color'>","column-rule-color":"<color>","column-rule-style":"<'border-style'>","column-rule-width":"<'border-width'>","column-span":"none|all","column-width":"<length>|auto",columns:"<'column-width'>||<'column-count'>",contain:"none|strict|content|[size||layout||style||paint]",content:"normal|none|[<content-replacement>|<content-list>] [/ [<string>|<counter>]+]?","content-visibility":"visible|auto|hidden","counter-increment":"[<counter-name> <integer>?]+|none","counter-reset":"[<counter-name> <integer>?|<reversed-counter-name> <integer>?]+|none","counter-set":"[<counter-name> <integer>?]+|none",cursor:"[[<url> [<x> <y>]? ,]* [auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing|hand|-webkit-grab|-webkit-grabbing|-webkit-zoom-in|-webkit-zoom-out|-moz-grab|-moz-grabbing|-moz-zoom-in|-moz-zoom-out]]",direction:"ltr|rtl",display:"[<display-outside>||<display-inside>]|<display-listitem>|<display-internal>|<display-box>|<display-legacy>|<-non-standard-display>","empty-cells":"show|hide",filter:"none|<filter-function-list>|<-ms-filter-function-list>",flex:"none|[<'flex-grow'> <'flex-shrink'>?||<'flex-basis'>]","flex-basis":"content|<'width'>","flex-direction":"row|row-reverse|column|column-reverse","flex-flow":"<'flex-direction'>||<'flex-wrap'>","flex-grow":"<number>","flex-shrink":"<number>","flex-wrap":"nowrap|wrap|wrap-reverse",float:"left|right|none|inline-start|inline-end",font:"[[<'font-style'>||<font-variant-css21>||<'font-weight'>||<'font-stretch'>]? <'font-size'> [/ <'line-height'>]? <'font-family'>]|caption|icon|menu|message-box|small-caption|status-bar","font-family":"[<family-name>|<generic-family>]#","font-feature-settings":"normal|<feature-tag-value>#","font-kerning":"auto|normal|none","font-language-override":"normal|<string>","font-optical-sizing":"auto|none","font-variation-settings":"normal|[<string> <number>]#","font-size":"<absolute-size>|<relative-size>|<length-percentage>","font-size-adjust":"none|[ex-height|cap-height|ch-width|ic-width|ic-height]? [from-font|<number>]","font-smooth":"auto|never|always|<absolute-size>|<length>","font-stretch":"<font-stretch-absolute>","font-style":"normal|italic|oblique <angle>?","font-synthesis":"none|[weight||style||small-caps]","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-alternates":"normal|[stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )]","font-variant-caps":"normal|small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","font-variant-east-asian":"normal|[<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-ligatures":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>]","font-variant-numeric":"normal|[<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero]","font-variant-position":"normal|sub|super","font-weight":"<font-weight-absolute>|bolder|lighter","forced-color-adjust":"auto|none",gap:"<'row-gap'> <'column-gap'>?",grid:"<'grid-template'>|<'grid-template-rows'> / [auto-flow&&dense?] <'grid-auto-columns'>?|[auto-flow&&dense?] <'grid-auto-rows'>? / <'grid-template-columns'>","grid-area":"<grid-line> [/ <grid-line>]{0,3}","grid-auto-columns":"<track-size>+","grid-auto-flow":"[row|column]||dense","grid-auto-rows":"<track-size>+","grid-column":"<grid-line> [/ <grid-line>]?","grid-column-end":"<grid-line>","grid-column-gap":"<length-percentage>","grid-column-start":"<grid-line>","grid-gap":"<'grid-row-gap'> <'grid-column-gap'>?","grid-row":"<grid-line> [/ <grid-line>]?","grid-row-end":"<grid-line>","grid-row-gap":"<length-percentage>","grid-row-start":"<grid-line>","grid-template":"none|[<'grid-template-rows'> / <'grid-template-columns'>]|[<line-names>? <string> <track-size>? <line-names>?]+ [/ <explicit-track-list>]?","grid-template-areas":"none|<string>+","grid-template-columns":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","grid-template-rows":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","hanging-punctuation":"none|[first||[force-end|allow-end]||last]",height:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","hyphenate-character":"auto|<string>",hyphens:"none|manual|auto","image-orientation":"from-image|<angle>|[<angle>? flip]","image-rendering":"auto|crisp-edges|pixelated|optimizeSpeed|optimizeQuality|<-non-standard-image-rendering>","image-resolution":"[from-image||<resolution>]&&snap?","ime-mode":"auto|normal|active|inactive|disabled","initial-letter":"normal|[<number> <integer>?]","initial-letter-align":"[auto|alphabetic|hanging|ideographic]","inline-size":"<'width'>","input-security":"auto|none",inset:"<'top'>{1,4}","inset-block":"<'top'>{1,2}","inset-block-end":"<'top'>","inset-block-start":"<'top'>","inset-inline":"<'top'>{1,2}","inset-inline-end":"<'top'>","inset-inline-start":"<'top'>",isolation:"auto|isolate","justify-content":"normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]","justify-items":"normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|legacy|legacy&&[left|right|center]","justify-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]","justify-tracks":"[normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]]#",left:"<length>|<percentage>|auto","letter-spacing":"normal|<length-percentage>","line-break":"auto|loose|normal|strict|anywhere","line-clamp":"none|<integer>","line-height":"normal|<number>|<length>|<percentage>","line-height-step":"<length>","list-style":"<'list-style-type'>||<'list-style-position'>||<'list-style-image'>","list-style-image":"<image>|none","list-style-position":"inside|outside","list-style-type":"<counter-style>|<string>|none",margin:"[<length>|<percentage>|auto]{1,4}","margin-block":"<'margin-left'>{1,2}","margin-block-end":"<'margin-left'>","margin-block-start":"<'margin-left'>","margin-bottom":"<length>|<percentage>|auto","margin-inline":"<'margin-left'>{1,2}","margin-inline-end":"<'margin-left'>","margin-inline-start":"<'margin-left'>","margin-left":"<length>|<percentage>|auto","margin-right":"<length>|<percentage>|auto","margin-top":"<length>|<percentage>|auto","margin-trim":"none|in-flow|all",mask:"<mask-layer>#","mask-border":"<'mask-border-source'>||<'mask-border-slice'> [/ <'mask-border-width'>? [/ <'mask-border-outset'>]?]?||<'mask-border-repeat'>||<'mask-border-mode'>","mask-border-mode":"luminance|alpha","mask-border-outset":"[<length>|<number>]{1,4}","mask-border-repeat":"[stretch|repeat|round|space]{1,2}","mask-border-slice":"<number-percentage>{1,4} fill?","mask-border-source":"none|<image>","mask-border-width":"[<length-percentage>|<number>|auto]{1,4}","mask-clip":"[<geometry-box>|no-clip]#","mask-composite":"<compositing-operator>#","mask-image":"<mask-reference>#","mask-mode":"<masking-mode>#","mask-origin":"<geometry-box>#","mask-position":"<position>#","mask-repeat":"<repeat-style>#","mask-size":"<bg-size>#","mask-type":"luminance|alpha","masonry-auto-flow":"[pack|next]||[definite-first|ordered]","math-style":"normal|compact","max-block-size":"<'max-width'>","max-height":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","max-inline-size":"<'max-width'>","max-lines":"none|<integer>","max-width":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","min-block-size":"<'min-width'>","min-height":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","min-inline-size":"<'min-width'>","min-width":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","mix-blend-mode":"<blend-mode>|plus-lighter","object-fit":"fill|contain|cover|none|scale-down","object-position":"<position>",offset:"[<'offset-position'>? [<'offset-path'> [<'offset-distance'>||<'offset-rotate'>]?]?]! [/ <'offset-anchor'>]?","offset-anchor":"auto|<position>","offset-distance":"<length-percentage>","offset-path":"none|ray( [<angle>&&<size>&&contain?] )|<path()>|<url>|[<basic-shape>||<geometry-box>]","offset-position":"auto|<position>","offset-rotate":"[auto|reverse]||<angle>",opacity:"<alpha-value>",order:"<integer>",orphans:"<integer>",outline:"[<'outline-color'>||<'outline-style'>||<'outline-width'>]","outline-color":"<color>|invert","outline-offset":"<length>","outline-style":"auto|<'border-style'>","outline-width":"<line-width>",overflow:"[visible|hidden|clip|scroll|auto]{1,2}|<-non-standard-overflow>","overflow-anchor":"auto|none","overflow-block":"visible|hidden|clip|scroll|auto","overflow-clip-box":"padding-box|content-box","overflow-clip-margin":"<visual-box>||<length [0,∞]>","overflow-inline":"visible|hidden|clip|scroll|auto","overflow-wrap":"normal|break-word|anywhere","overflow-x":"visible|hidden|clip|scroll|auto","overflow-y":"visible|hidden|clip|scroll|auto","overscroll-behavior":"[contain|none|auto]{1,2}","overscroll-behavior-block":"contain|none|auto","overscroll-behavior-inline":"contain|none|auto","overscroll-behavior-x":"contain|none|auto","overscroll-behavior-y":"contain|none|auto",padding:"[<length>|<percentage>]{1,4}","padding-block":"<'padding-left'>{1,2}","padding-block-end":"<'padding-left'>","padding-block-start":"<'padding-left'>","padding-bottom":"<length>|<percentage>","padding-inline":"<'padding-left'>{1,2}","padding-inline-end":"<'padding-left'>","padding-inline-start":"<'padding-left'>","padding-left":"<length>|<percentage>","padding-right":"<length>|<percentage>","padding-top":"<length>|<percentage>","page-break-after":"auto|always|avoid|left|right|recto|verso","page-break-before":"auto|always|avoid|left|right|recto|verso","page-break-inside":"auto|avoid","paint-order":"normal|[fill||stroke||markers]",perspective:"none|<length>","perspective-origin":"<position>","place-content":"<'align-content'> <'justify-content'>?","place-items":"<'align-items'> <'justify-items'>?","place-self":"<'align-self'> <'justify-self'>?","pointer-events":"auto|none|visiblePainted|visibleFill|visibleStroke|visible|painted|fill|stroke|all|inherit",position:"static|relative|absolute|sticky|fixed|-webkit-sticky",quotes:"none|auto|[<string> <string>]+",resize:"none|both|horizontal|vertical|block|inline",right:"<length>|<percentage>|auto",rotate:"none|<angle>|[x|y|z|<number>{3}]&&<angle>","row-gap":"normal|<length-percentage>","ruby-align":"start|center|space-between|space-around","ruby-merge":"separate|collapse|auto","ruby-position":"[alternate||[over|under]]|inter-character",scale:"none|<number>{1,3}","scrollbar-color":"auto|<color>{2}","scrollbar-gutter":"auto|stable&&both-edges?","scrollbar-width":"auto|thin|none","scroll-behavior":"auto|smooth","scroll-margin":"<length>{1,4}","scroll-margin-block":"<length>{1,2}","scroll-margin-block-start":"<length>","scroll-margin-block-end":"<length>","scroll-margin-bottom":"<length>","scroll-margin-inline":"<length>{1,2}","scroll-margin-inline-start":"<length>","scroll-margin-inline-end":"<length>","scroll-margin-left":"<length>","scroll-margin-right":"<length>","scroll-margin-top":"<length>","scroll-padding":"[auto|<length-percentage>]{1,4}","scroll-padding-block":"[auto|<length-percentage>]{1,2}","scroll-padding-block-start":"auto|<length-percentage>","scroll-padding-block-end":"auto|<length-percentage>","scroll-padding-bottom":"auto|<length-percentage>","scroll-padding-inline":"[auto|<length-percentage>]{1,2}","scroll-padding-inline-start":"auto|<length-percentage>","scroll-padding-inline-end":"auto|<length-percentage>","scroll-padding-left":"auto|<length-percentage>","scroll-padding-right":"auto|<length-percentage>","scroll-padding-top":"auto|<length-percentage>","scroll-snap-align":"[none|start|end|center]{1,2}","scroll-snap-coordinate":"none|<position>#","scroll-snap-destination":"<position>","scroll-snap-points-x":"none|repeat( <length-percentage> )","scroll-snap-points-y":"none|repeat( <length-percentage> )","scroll-snap-stop":"normal|always","scroll-snap-type":"none|[x|y|block|inline|both] [mandatory|proximity]?","scroll-snap-type-x":"none|mandatory|proximity","scroll-snap-type-y":"none|mandatory|proximity","shape-image-threshold":"<alpha-value>","shape-margin":"<length-percentage>","shape-outside":"none|[<shape-box>||<basic-shape>]|<image>","tab-size":"<integer>|<length>","table-layout":"auto|fixed","text-align":"start|end|left|right|center|justify|match-parent","text-align-last":"auto|start|end|left|right|center|justify","text-combine-upright":"none|all|[digits <integer>?]","text-decoration":"<'text-decoration-line'>||<'text-decoration-style'>||<'text-decoration-color'>||<'text-decoration-thickness'>","text-decoration-color":"<color>","text-decoration-line":"none|[underline||overline||line-through||blink]|spelling-error|grammar-error","text-decoration-skip":"none|[objects||[spaces|[leading-spaces||trailing-spaces]]||edges||box-decoration]","text-decoration-skip-ink":"auto|all|none","text-decoration-style":"solid|double|dotted|dashed|wavy","text-decoration-thickness":"auto|from-font|<length>|<percentage>","text-emphasis":"<'text-emphasis-style'>||<'text-emphasis-color'>","text-emphasis-color":"<color>","text-emphasis-position":"[over|under]&&[right|left]","text-emphasis-style":"none|[[filled|open]||[dot|circle|double-circle|triangle|sesame]]|<string>","text-indent":"<length-percentage>&&hanging?&&each-line?","text-justify":"auto|inter-character|inter-word|none","text-orientation":"mixed|upright|sideways","text-overflow":"[clip|ellipsis|<string>]{1,2}","text-rendering":"auto|optimizeSpeed|optimizeLegibility|geometricPrecision","text-shadow":"none|<shadow-t>#","text-size-adjust":"none|auto|<percentage>","text-transform":"none|capitalize|uppercase|lowercase|full-width|full-size-kana","text-underline-offset":"auto|<length>|<percentage>","text-underline-position":"auto|from-font|[under||[left|right]]",top:"<length>|<percentage>|auto","touch-action":"auto|none|[[pan-x|pan-left|pan-right]||[pan-y|pan-up|pan-down]||pinch-zoom]|manipulation",transform:"none|<transform-list>","transform-box":"content-box|border-box|fill-box|stroke-box|view-box","transform-origin":"[<length-percentage>|left|center|right|top|bottom]|[[<length-percentage>|left|center|right]&&[<length-percentage>|top|center|bottom]] <length>?","transform-style":"flat|preserve-3d",transition:"<single-transition>#","transition-delay":"<time>#","transition-duration":"<time>#","transition-property":"none|<single-transition-property>#","transition-timing-function":"<easing-function>#",translate:"none|<length-percentage> [<length-percentage> <length>?]?","unicode-bidi":"normal|embed|isolate|bidi-override|isolate-override|plaintext|-moz-isolate|-moz-isolate-override|-moz-plaintext|-webkit-isolate|-webkit-isolate-override|-webkit-plaintext","user-select":"auto|text|none|contain|all","vertical-align":"baseline|sub|super|text-top|text-bottom|middle|top|bottom|<percentage>|<length>",visibility:"visible|hidden|collapse","white-space":"normal|pre|nowrap|pre-wrap|pre-line|break-spaces",widows:"<integer>",width:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|fill|stretch|intrinsic|-moz-max-content|-webkit-max-content|-moz-fit-content|-webkit-fit-content","will-change":"auto|<animateable-feature>#","word-break":"normal|break-all|keep-all|break-word","word-spacing":"normal|<length>","word-wrap":"normal|break-word","writing-mode":"horizontal-tb|vertical-rl|vertical-lr|sideways-rl|sideways-lr|<svg-writing-mode>","z-index":"auto|<integer>",zoom:"normal|reset|<number>|<percentage>","-moz-background-clip":"padding|border","-moz-border-radius-bottomleft":"<'border-bottom-left-radius'>","-moz-border-radius-bottomright":"<'border-bottom-right-radius'>","-moz-border-radius-topleft":"<'border-top-left-radius'>","-moz-border-radius-topright":"<'border-bottom-right-radius'>","-moz-control-character-visibility":"visible|hidden","-moz-osx-font-smoothing":"auto|grayscale","-moz-user-select":"none|text|all|-moz-none","-ms-flex-align":"start|end|center|baseline|stretch","-ms-flex-item-align":"auto|start|end|center|baseline|stretch","-ms-flex-line-pack":"start|end|center|justify|distribute|stretch","-ms-flex-negative":"<'flex-shrink'>","-ms-flex-pack":"start|end|center|justify|distribute","-ms-flex-order":"<integer>","-ms-flex-positive":"<'flex-grow'>","-ms-flex-preferred-size":"<'flex-basis'>","-ms-interpolation-mode":"nearest-neighbor|bicubic","-ms-grid-column-align":"start|end|center|stretch","-ms-grid-row-align":"start|end|center|stretch","-ms-hyphenate-limit-last":"none|always|column|page|spread","-webkit-background-clip":"[<box>|border|padding|content|text]#","-webkit-column-break-after":"always|auto|avoid","-webkit-column-break-before":"always|auto|avoid","-webkit-column-break-inside":"always|auto|avoid","-webkit-font-smoothing":"auto|none|antialiased|subpixel-antialiased","-webkit-mask-box-image":"[<url>|<gradient>|none] [<length-percentage>{4} <-webkit-mask-box-repeat>{2}]?","-webkit-print-color-adjust":"economy|exact","-webkit-text-security":"none|circle|disc|square","-webkit-user-drag":"none|element|auto","-webkit-user-select":"auto|none|text|all","alignment-baseline":"auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical","baseline-shift":"baseline|sub|super|<svg-length>",behavior:"<url>+","clip-rule":"nonzero|evenodd",cue:"<'cue-before'> <'cue-after'>?","cue-after":"<url> <decibel>?|none","cue-before":"<url> <decibel>?|none","dominant-baseline":"auto|use-script|no-change|reset-size|ideographic|alphabetic|hanging|mathematical|central|middle|text-after-edge|text-before-edge",fill:"<paint>","fill-opacity":"<number-zero-one>","fill-rule":"nonzero|evenodd","glyph-orientation-horizontal":"<angle>","glyph-orientation-vertical":"<angle>",kerning:"auto|<svg-length>",marker:"none|<url>","marker-end":"none|<url>","marker-mid":"none|<url>","marker-start":"none|<url>",pause:"<'pause-before'> <'pause-after'>?","pause-after":"<time>|none|x-weak|weak|medium|strong|x-strong","pause-before":"<time>|none|x-weak|weak|medium|strong|x-strong",rest:"<'rest-before'> <'rest-after'>?","rest-after":"<time>|none|x-weak|weak|medium|strong|x-strong","rest-before":"<time>|none|x-weak|weak|medium|strong|x-strong","shape-rendering":"auto|optimizeSpeed|crispEdges|geometricPrecision",src:"[<url> [format( <string># )]?|local( <family-name> )]#",speak:"auto|none|normal","speak-as":"normal|spell-out||digits||[literal-punctuation|no-punctuation]",stroke:"<paint>","stroke-dasharray":"none|[<svg-length>+]#","stroke-dashoffset":"<svg-length>","stroke-linecap":"butt|round|square","stroke-linejoin":"miter|round|bevel","stroke-miterlimit":"<number-one-or-greater>","stroke-opacity":"<number-zero-one>","stroke-width":"<svg-length>","text-anchor":"start|middle|end","unicode-range":"<urange>#","voice-balance":"<number>|left|center|right|leftwards|rightwards","voice-duration":"auto|<time>","voice-family":"[[<family-name>|<generic-voice>] ,]* [<family-name>|<generic-voice>]|preserve","voice-pitch":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-range":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-rate":"[normal|x-slow|slow|medium|fast|x-fast]||<percentage>","voice-stress":"normal|strong|moderate|none|reduced","voice-volume":"silent|[[x-soft|soft|medium|loud|x-loud]||<decibel>]"},atrules:{charset:{prelude:"<string>",descriptors:null},"counter-style":{prelude:"<counter-style-name>",descriptors:{"additive-symbols":"[<integer>&&<symbol>]#",fallback:"<counter-style-name>",negative:"<symbol> <symbol>?",pad:"<integer>&&<symbol>",prefix:"<symbol>",range:"[[<integer>|infinite]{2}]#|auto","speak-as":"auto|bullets|numbers|words|spell-out|<counter-style-name>",suffix:"<symbol>",symbols:"<symbol>+",system:"cyclic|numeric|alphabetic|symbolic|additive|[fixed <integer>?]|[extends <counter-style-name>]"}},document:{prelude:"[<url>|url-prefix( <string> )|domain( <string> )|media-document( <string> )|regexp( <string> )]#",descriptors:null},"font-face":{prelude:null,descriptors:{"ascent-override":"normal|<percentage>","descent-override":"normal|<percentage>","font-display":"[auto|block|swap|fallback|optional]","font-family":"<family-name>","font-feature-settings":"normal|<feature-tag-value>#","font-variation-settings":"normal|[<string> <number>]#","font-stretch":"<font-stretch-absolute>{1,2}","font-style":"normal|italic|oblique <angle>{0,2}","font-weight":"<font-weight-absolute>{1,2}","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","line-gap-override":"normal|<percentage>","size-adjust":"<percentage>",src:"[<url> [format( <string># )]?|local( <family-name> )]#","unicode-range":"<urange>#"}},"font-feature-values":{prelude:"<family-name>#",descriptors:null},import:{prelude:"[<string>|<url>] [layer|layer( <layer-name> )]? [supports( [<supports-condition>|<declaration>] )]? <media-query-list>?",descriptors:null},keyframes:{prelude:"<keyframes-name>",descriptors:null},layer:{prelude:"[<layer-name>#|<layer-name>?]",descriptors:null},media:{prelude:"<media-query-list>",descriptors:null},namespace:{prelude:"<namespace-prefix>? [<string>|<url>]",descriptors:null},page:{prelude:"<page-selector-list>",descriptors:{bleed:"auto|<length>",marks:"none|[crop||cross]",size:"<length>{1,2}|auto|[<page-size>||[portrait|landscape]]"}},property:{prelude:"<custom-property-name>",descriptors:{syntax:"<string>",inherits:"true|false","initial-value":"<string>"}},"scroll-timeline":{prelude:"<timeline-name>",descriptors:null},supports:{prelude:"<supports-condition>",descriptors:null},viewport:{prelude:null,descriptors:{height:"<viewport-length>{1,2}","max-height":"<viewport-length>","max-width":"<viewport-length>","max-zoom":"auto|<number>|<percentage>","min-height":"<viewport-length>","min-width":"<viewport-length>","min-zoom":"auto|<number>|<percentage>",orientation:"auto|portrait|landscape","user-zoom":"zoom|fixed","viewport-fit":"auto|contain|cover",width:"<viewport-length>{1,2}",zoom:"auto|<number>|<percentage>"}}}};var node={};var AnPlusB$2={};const types$G=types$R;const charCodeDefinitions$5=charCodeDefinitions$c;const PLUSSIGN$5=43;const HYPHENMINUS$2=45;const N=110;const DISALLOW_SIGN=true;const ALLOW_SIGN=false;function checkInteger(offset,disallowSign){let pos=this.tokenStart+offset;const code=this.charCodeAt(pos);if(code===PLUSSIGN$5||code===HYPHENMINUS$2){if(disallowSign){this.error("Number sign is not allowed")}pos++}for(;pos<this.tokenEnd;pos++){if(!charCodeDefinitions$5.isDigit(this.charCodeAt(pos))){this.error("Integer is expected",pos)}}}function checkTokenIsInteger(disallowSign){return checkInteger.call(this,0,disallowSign)}function expectCharCode(offset,code){if(!this.cmpChar(this.tokenStart+offset,code)){let msg="";switch(code){case N:msg="N is expected";break;case HYPHENMINUS$2:msg="HyphenMinus is expected";break}this.error(msg,this.tokenStart+offset)}}function consumeB(){let offset=0;let sign=0;let type=this.tokenType;while(type===types$G.WhiteSpace||type===types$G.Comment){type=this.lookupType(++offset)}if(type!==types$G.Number){if(this.isDelim(PLUSSIGN$5,offset)||this.isDelim(HYPHENMINUS$2,offset)){sign=this.isDelim(PLUSSIGN$5,offset)?PLUSSIGN$5:HYPHENMINUS$2;do{type=this.lookupType(++offset)}while(type===types$G.WhiteSpace||type===types$G.Comment);if(type!==types$G.Number){this.skip(offset);checkTokenIsInteger.call(this,DISALLOW_SIGN)}}else{return null}}if(offset>0){this.skip(offset)}if(sign===0){type=this.charCodeAt(this.tokenStart);if(type!==PLUSSIGN$5&&type!==HYPHENMINUS$2){this.error("Number sign is expected")}}checkTokenIsInteger.call(this,sign!==0);return sign===HYPHENMINUS$2?"-"+this.consume(types$G.Number):this.consume(types$G.Number)}const name$D="AnPlusB";const structure$D={a:[String,null],b:[String,null]};function parse$H(){const start=this.tokenStart;let a=null;let b=null;if(this.tokenType===types$G.Number){checkTokenIsInteger.call(this,ALLOW_SIGN);b=this.consume(types$G.Number)}else if(this.tokenType===types$G.Ident&&this.cmpChar(this.tokenStart,HYPHENMINUS$2)){a="-1";expectCharCode.call(this,1,N);switch(this.tokenEnd-this.tokenStart){case 2:this.next();b=consumeB.call(this);break;case 3:expectCharCode.call(this,2,HYPHENMINUS$2);this.next();this.skipSC();checkTokenIsInteger.call(this,DISALLOW_SIGN);b="-"+this.consume(types$G.Number);break;default:expectCharCode.call(this,2,HYPHENMINUS$2);checkInteger.call(this,3,DISALLOW_SIGN);this.next();b=this.substrToCursor(start+2)}}else if(this.tokenType===types$G.Ident||this.isDelim(PLUSSIGN$5)&&this.lookupType(1)===types$G.Ident){let sign=0;a="1";if(this.isDelim(PLUSSIGN$5)){sign=1;this.next()}expectCharCode.call(this,0,N);switch(this.tokenEnd-this.tokenStart){case 1:this.next();b=consumeB.call(this);break;case 2:expectCharCode.call(this,1,HYPHENMINUS$2);this.next();this.skipSC();checkTokenIsInteger.call(this,DISALLOW_SIGN);b="-"+this.consume(types$G.Number);break;default:expectCharCode.call(this,1,HYPHENMINUS$2);checkInteger.call(this,2,DISALLOW_SIGN);this.next();b=this.substrToCursor(start+sign+1)}}else if(this.tokenType===types$G.Dimension){const code=this.charCodeAt(this.tokenStart);const sign=code===PLUSSIGN$5||code===HYPHENMINUS$2;let i=this.tokenStart+sign;for(;i<this.tokenEnd;i++){if(!charCodeDefinitions$5.isDigit(this.charCodeAt(i))){break}}if(i===this.tokenStart+sign){this.error("Integer is expected",this.tokenStart+sign)}expectCharCode.call(this,i-this.tokenStart,N);a=this.substring(start,i);if(i+1===this.tokenEnd){this.next();b=consumeB.call(this)}else{expectCharCode.call(this,i-this.tokenStart+1,HYPHENMINUS$2);if(i+2===this.tokenEnd){this.next();this.skipSC();checkTokenIsInteger.call(this,DISALLOW_SIGN);b="-"+this.consume(types$G.Number)}else{checkInteger.call(this,i-this.tokenStart+2,DISALLOW_SIGN);this.next();b=this.substrToCursor(i+1)}}}else{this.error()}if(a!==null&&a.charCodeAt(0)===PLUSSIGN$5){a=a.substr(1)}if(b!==null&&b.charCodeAt(0)===PLUSSIGN$5){b=b.substr(1)}return{type:"AnPlusB",loc:this.getLocation(start,this.tokenStart),a:a,b:b}}function generate$H(node){if(node.a){const a=node.a==="+1"&&"n"||node.a==="1"&&"n"||node.a==="-1"&&"-n"||node.a+"n";if(node.b){const b=node.b[0]==="-"||node.b[0]==="+"?node.b:"+"+node.b;this.tokenize(a+b)}else{this.tokenize(a)}}else{this.tokenize(node.b)}}AnPlusB$2.generate=generate$H;AnPlusB$2.name=name$D;AnPlusB$2.parse=parse$H;AnPlusB$2.structure=structure$D;var Atrule$6={};const types$F=types$R;function consumeRaw$5(startToken){return this.Raw(startToken,this.consumeUntilLeftCurlyBracketOrSemicolon,true)}function isDeclarationBlockAtrule(){for(let offset=1,type;type=this.lookupType(offset);offset++){if(type===types$F.RightCurlyBracket){return true}if(type===types$F.LeftCurlyBracket||type===types$F.AtKeyword){return false}}return false}const name$C="Atrule";const walkContext$9="atrule";const structure$C={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function parse$G(){const start=this.tokenStart;let name;let nameLowerCase;let prelude=null;let block=null;this.eat(types$F.AtKeyword);name=this.substrToCursor(start+1);nameLowerCase=name.toLowerCase();this.skipSC();if(this.eof===false&&this.tokenType!==types$F.LeftCurlyBracket&&this.tokenType!==types$F.Semicolon){if(this.parseAtrulePrelude){prelude=this.parseWithFallback(this.AtrulePrelude.bind(this,name),consumeRaw$5)}else{prelude=consumeRaw$5.call(this,this.tokenIndex)}this.skipSC()}switch(this.tokenType){case types$F.Semicolon:this.next();break;case types$F.LeftCurlyBracket:if(hasOwnProperty.call(this.atrule,nameLowerCase)&&typeof this.atrule[nameLowerCase].block==="function"){block=this.atrule[nameLowerCase].block.call(this)}else{block=this.Block(isDeclarationBlockAtrule.call(this))}break}return{type:"Atrule",loc:this.getLocation(start,this.tokenStart),name:name,prelude:prelude,block:block}}function generate$G(node){this.token(types$F.AtKeyword,"@"+node.name);if(node.prelude!==null){this.node(node.prelude)}if(node.block){this.node(node.block)}else{this.token(types$F.Semicolon,";")}}Atrule$6.generate=generate$G;Atrule$6.name=name$C;Atrule$6.parse=parse$G;Atrule$6.structure=structure$C;Atrule$6.walkContext=walkContext$9;var AtrulePrelude$2={};const types$E=types$R;const name$B="AtrulePrelude";const walkContext$8="atrulePrelude";const structure$B={children:[[]]};function parse$F(name){let children=null;if(name!==null){name=name.toLowerCase()}this.skipSC();if(hasOwnProperty.call(this.atrule,name)&&typeof this.atrule[name].prelude==="function"){children=this.atrule[name].prelude.call(this)}else{children=this.readSequence(this.scope.AtrulePrelude)}this.skipSC();if(this.eof!==true&&this.tokenType!==types$E.LeftCurlyBracket&&this.tokenType!==types$E.Semicolon){this.error("Semicolon or block is expected")}return{type:"AtrulePrelude",loc:this.getLocationFromList(children),children:children}}function generate$F(node){this.children(node)}AtrulePrelude$2.generate=generate$F;AtrulePrelude$2.name=name$B;AtrulePrelude$2.parse=parse$F;AtrulePrelude$2.structure=structure$B;AtrulePrelude$2.walkContext=walkContext$8;var AttributeSelector$4={};const types$D=types$R;const DOLLARSIGN$1=36;const ASTERISK$5=42;const EQUALSSIGN=61;const CIRCUMFLEXACCENT=94;const VERTICALLINE$2=124;const TILDE$2=126;function getAttributeName(){if(this.eof){this.error("Unexpected end of input")}const start=this.tokenStart;let expectIdent=false;if(this.isDelim(ASTERISK$5)){expectIdent=true;this.next()}else if(!this.isDelim(VERTICALLINE$2)){this.eat(types$D.Ident)}if(this.isDelim(VERTICALLINE$2)){if(this.charCodeAt(this.tokenStart+1)!==EQUALSSIGN){this.next();this.eat(types$D.Ident)}else if(expectIdent){this.error("Identifier is expected",this.tokenEnd)}}else if(expectIdent){this.error("Vertical line is expected")}return{type:"Identifier",loc:this.getLocation(start,this.tokenStart),name:this.substrToCursor(start)}}function getOperator(){const start=this.tokenStart;const code=this.charCodeAt(start);if(code!==EQUALSSIGN&&code!==TILDE$2&&code!==CIRCUMFLEXACCENT&&code!==DOLLARSIGN$1&&code!==ASTERISK$5&&code!==VERTICALLINE$2){this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected")}this.next();if(code!==EQUALSSIGN){if(!this.isDelim(EQUALSSIGN)){this.error("Equal sign is expected")}this.next()}return this.substrToCursor(start)}const name$A="AttributeSelector";const structure$A={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function parse$E(){const start=this.tokenStart;let name;let matcher=null;let value=null;let flags=null;this.eat(types$D.LeftSquareBracket);this.skipSC();name=getAttributeName.call(this);this.skipSC();if(this.tokenType!==types$D.RightSquareBracket){if(this.tokenType!==types$D.Ident){matcher=getOperator.call(this);this.skipSC();value=this.tokenType===types$D.String?this.String():this.Identifier();this.skipSC()}if(this.tokenType===types$D.Ident){flags=this.consume(types$D.Ident);this.skipSC()}}this.eat(types$D.RightSquareBracket);return{type:"AttributeSelector",loc:this.getLocation(start,this.tokenStart),name:name,matcher:matcher,value:value,flags:flags}}function generate$E(node){this.token(types$D.Delim,"[");this.node(node.name);if(node.matcher!==null){this.tokenize(node.matcher);this.node(node.value)}if(node.flags!==null){this.token(types$D.Ident,node.flags)}this.token(types$D.Delim,"]")}AttributeSelector$4.generate=generate$E;AttributeSelector$4.name=name$A;AttributeSelector$4.parse=parse$E;AttributeSelector$4.structure=structure$A;var Block$2={};const types$C=types$R;function consumeRaw$4(startToken){return this.Raw(startToken,null,true)}function consumeRule(){return this.parseWithFallback(this.Rule,consumeRaw$4)}function consumeRawDeclaration(startToken){return this.Raw(startToken,this.consumeUntilSemicolonIncluded,true)}function consumeDeclaration(){if(this.tokenType===types$C.Semicolon){return consumeRawDeclaration.call(this,this.tokenIndex)}const node=this.parseWithFallback(this.Declaration,consumeRawDeclaration);if(this.tokenType===types$C.Semicolon){this.next()}return node}const name$z="Block";const walkContext$7="block";const structure$z={children:[["Atrule","Rule","Declaration"]]};function parse$D(isDeclaration){const consumer=isDeclaration?consumeDeclaration:consumeRule;const start=this.tokenStart;let children=this.createList();this.eat(types$C.LeftCurlyBracket);scan:while(!this.eof){switch(this.tokenType){case types$C.RightCurlyBracket:break scan;case types$C.WhiteSpace:case types$C.Comment:this.next();break;case types$C.AtKeyword:children.push(this.parseWithFallback(this.Atrule,consumeRaw$4));break;default:children.push(consumer.call(this))}}if(!this.eof){this.eat(types$C.RightCurlyBracket)}return{type:"Block",loc:this.getLocation(start,this.tokenStart),children:children}}function generate$D(node){this.token(types$C.LeftCurlyBracket,"{");this.children(node,(prev=>{if(prev.type==="Declaration"){this.token(types$C.Semicolon,";")}}));this.token(types$C.RightCurlyBracket,"}")}Block$2.generate=generate$D;Block$2.name=name$z;Block$2.parse=parse$D;Block$2.structure=structure$z;Block$2.walkContext=walkContext$7;var Brackets$2={};const types$B=types$R;const name$y="Brackets";const structure$y={children:[[]]};function parse$C(readSequence,recognizer){const start=this.tokenStart;let children=null;this.eat(types$B.LeftSquareBracket);children=readSequence.call(this,recognizer);if(!this.eof){this.eat(types$B.RightSquareBracket)}return{type:"Brackets",loc:this.getLocation(start,this.tokenStart),children:children}}function generate$C(node){this.token(types$B.Delim,"[");this.children(node);this.token(types$B.Delim,"]")}Brackets$2.generate=generate$C;Brackets$2.name=name$y;Brackets$2.parse=parse$C;Brackets$2.structure=structure$y;var CDC$2={};const types$A=types$R;const name$x="CDC";const structure$x=[];function parse$B(){const start=this.tokenStart;this.eat(types$A.CDC);return{type:"CDC",loc:this.getLocation(start,this.tokenStart)}}function generate$B(){this.token(types$A.CDC,"--\x3e")}CDC$2.generate=generate$B;CDC$2.name=name$x;CDC$2.parse=parse$B;CDC$2.structure=structure$x;var CDO$2={};const types$z=types$R;const name$w="CDO";const structure$w=[];function parse$A(){const start=this.tokenStart;this.eat(types$z.CDO);return{type:"CDO",loc:this.getLocation(start,this.tokenStart)}}function generate$A(){this.token(types$z.CDO,"\x3c!--")}CDO$2.generate=generate$A;CDO$2.name=name$w;CDO$2.parse=parse$A;CDO$2.structure=structure$w;var ClassSelector$2={};const types$y=types$R;const FULLSTOP$2=46;const name$v="ClassSelector";const structure$v={name:String};function parse$z(){this.eatDelim(FULLSTOP$2);return{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(types$y.Ident)}}function generate$z(node){this.token(types$y.Delim,".");this.token(types$y.Ident,node.name)}ClassSelector$2.generate=generate$z;ClassSelector$2.name=name$v;ClassSelector$2.parse=parse$z;ClassSelector$2.structure=structure$v;var Combinator$2={};const types$x=types$R;const PLUSSIGN$4=43;const SOLIDUS$5=47;const GREATERTHANSIGN$1=62;const TILDE$1=126;const name$u="Combinator";const structure$u={name:String};function parse$y(){const start=this.tokenStart;let name;switch(this.tokenType){case types$x.WhiteSpace:name=" ";break;case types$x.Delim:switch(this.charCodeAt(this.tokenStart)){case GREATERTHANSIGN$1:case PLUSSIGN$4:case TILDE$1:this.next();break;case SOLIDUS$5:this.next();this.eatIdent("deep");this.eatDelim(SOLIDUS$5);break;default:this.error("Combinator is expected")}name=this.substrToCursor(start);break}return{type:"Combinator",loc:this.getLocation(start,this.tokenStart),name:name}}function generate$y(node){this.tokenize(node.name)}Combinator$2.generate=generate$y;Combinator$2.name=name$u;Combinator$2.parse=parse$y;Combinator$2.structure=structure$u;var Comment$4={};const types$w=types$R;const ASTERISK$4=42;const SOLIDUS$4=47;const name$t="Comment";const structure$t={value:String};function parse$x(){const start=this.tokenStart;let end=this.tokenEnd;this.eat(types$w.Comment);if(end-start+2>=2&&this.charCodeAt(end-2)===ASTERISK$4&&this.charCodeAt(end-1)===SOLIDUS$4){end-=2}return{type:"Comment",loc:this.getLocation(start,this.tokenStart),value:this.substring(start+2,end)}}function generate$x(node){this.token(types$w.Comment,"/*"+node.value+"*/")}Comment$4.generate=generate$x;Comment$4.name=name$t;Comment$4.parse=parse$x;Comment$4.structure=structure$t;var Declaration$4={};const names$2=names$4;const types$v=types$R;const EXCLAMATIONMARK$1=33;const NUMBERSIGN$2=35;const DOLLARSIGN=36;const AMPERSAND=38;const ASTERISK$3=42;const PLUSSIGN$3=43;const SOLIDUS$3=47;function consumeValueRaw(startToken){return this.Raw(startToken,this.consumeUntilExclamationMarkOrSemicolon,true)}function consumeCustomPropertyRaw(startToken){return this.Raw(startToken,this.consumeUntilExclamationMarkOrSemicolon,false)}function consumeValue(){const startValueToken=this.tokenIndex;const value=this.Value();if(value.type!=="Raw"&&this.eof===false&&this.tokenType!==types$v.Semicolon&&this.isDelim(EXCLAMATIONMARK$1)===false&&this.isBalanceEdge(startValueToken)===false){this.error()}return value}const name$s="Declaration";const walkContext$6="declaration";const structure$s={important:[Boolean,String],property:String,value:["Value","Raw"]};function parse$w(){const start=this.tokenStart;const startToken=this.tokenIndex;const property=readProperty.call(this);const customProperty=names$2.isCustomProperty(property);const parseValue=customProperty?this.parseCustomProperty:this.parseValue;const consumeRaw=customProperty?consumeCustomPropertyRaw:consumeValueRaw;let important=false;let value;this.skipSC();this.eat(types$v.Colon);const valueStart=this.tokenIndex;if(!customProperty){this.skipSC()}if(parseValue){value=this.parseWithFallback(consumeValue,consumeRaw)}else{value=consumeRaw.call(this,this.tokenIndex)}if(customProperty&&value.type==="Value"&&value.children.isEmpty){for(let offset=valueStart-this.tokenIndex;offset<=0;offset++){if(this.lookupType(offset)===types$v.WhiteSpace){value.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}}if(this.isDelim(EXCLAMATIONMARK$1)){important=getImportant.call(this);this.skipSC()}if(this.eof===false&&this.tokenType!==types$v.Semicolon&&this.isBalanceEdge(startToken)===false){this.error()}return{type:"Declaration",loc:this.getLocation(start,this.tokenStart),important:important,property:property,value:value}}function generate$w(node){this.token(types$v.Ident,node.property);this.token(types$v.Colon,":");this.node(node.value);if(node.important){this.token(types$v.Delim,"!");this.token(types$v.Ident,node.important===true?"important":node.important)}}function readProperty(){const start=this.tokenStart;if(this.tokenType===types$v.Delim){switch(this.charCodeAt(this.tokenStart)){case ASTERISK$3:case DOLLARSIGN:case PLUSSIGN$3:case NUMBERSIGN$2:case AMPERSAND:this.next();break;case SOLIDUS$3:this.next();if(this.isDelim(SOLIDUS$3)){this.next()}break}}if(this.tokenType===types$v.Hash){this.eat(types$v.Hash)}else{this.eat(types$v.Ident)}return this.substrToCursor(start)}function getImportant(){this.eat(types$v.Delim);this.skipSC();const important=this.consume(types$v.Ident);return important==="important"?true:important}Declaration$4.generate=generate$w;Declaration$4.name=name$s;Declaration$4.parse=parse$w;Declaration$4.structure=structure$s;Declaration$4.walkContext=walkContext$6;var DeclarationList$2={};const types$u=types$R;function consumeRaw$3(startToken){return this.Raw(startToken,this.consumeUntilSemicolonIncluded,true)}const name$r="DeclarationList";const structure$r={children:[["Declaration"]]};function parse$v(){const children=this.createList();while(!this.eof){switch(this.tokenType){case types$u.WhiteSpace:case types$u.Comment:case types$u.Semicolon:this.next();break;default:children.push(this.parseWithFallback(this.Declaration,consumeRaw$3))}}return{type:"DeclarationList",loc:this.getLocationFromList(children),children:children}}function generate$v(node){this.children(node,(prev=>{if(prev.type==="Declaration"){this.token(types$u.Semicolon,";")}}))}DeclarationList$2.generate=generate$v;DeclarationList$2.name=name$r;DeclarationList$2.parse=parse$v;DeclarationList$2.structure=structure$r;var Dimension$4={};const types$t=types$R;const name$q="Dimension";const structure$q={value:String,unit:String};function parse$u(){const start=this.tokenStart;const value=this.consumeNumber(types$t.Dimension);return{type:"Dimension",loc:this.getLocation(start,this.tokenStart),value:value,unit:this.substring(start+value.length,this.tokenStart)}}function generate$u(node){this.token(types$t.Dimension,node.value+node.unit)}Dimension$4.generate=generate$u;Dimension$4.name=name$q;Dimension$4.parse=parse$u;Dimension$4.structure=structure$q;var _Function={};const types$s=types$R;const name$p="Function";const walkContext$5="function";const structure$p={name:String,children:[[]]};function parse$t(readSequence,recognizer){const start=this.tokenStart;const name=this.consumeFunctionName();const nameLowerCase=name.toLowerCase();let children;children=recognizer.hasOwnProperty(nameLowerCase)?recognizer[nameLowerCase].call(this,recognizer):readSequence.call(this,recognizer);if(!this.eof){this.eat(types$s.RightParenthesis)}return{type:"Function",loc:this.getLocation(start,this.tokenStart),name:name,children:children}}function generate$t(node){this.token(types$s.Function,node.name+"(");this.children(node);this.token(types$s.RightParenthesis,")")}_Function.generate=generate$t;_Function.name=name$p;_Function.parse=parse$t;_Function.structure=structure$p;_Function.walkContext=walkContext$5;var Hash$2={};const types$r=types$R;const xxx="XXX";const name$o="Hash";const structure$o={value:String};function parse$s(){const start=this.tokenStart;this.eat(types$r.Hash);return{type:"Hash",loc:this.getLocation(start,this.tokenStart),value:this.substrToCursor(start+1)}}function generate$s(node){this.token(types$r.Hash,"#"+node.value)}Hash$2.generate=generate$s;Hash$2.name=name$o;Hash$2.parse=parse$s;Hash$2.structure=structure$o;Hash$2.xxx=xxx;var Identifier$2={};const types$q=types$R;const name$n="Identifier";const structure$n={name:String};function parse$r(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(types$q.Ident)}}function generate$r(node){this.token(types$q.Ident,node.name)}Identifier$2.generate=generate$r;Identifier$2.name=name$n;Identifier$2.parse=parse$r;Identifier$2.structure=structure$n;var IdSelector$2={};const types$p=types$R;const name$m="IdSelector";const structure$m={name:String};function parse$q(){const start=this.tokenStart;this.eat(types$p.Hash);return{type:"IdSelector",loc:this.getLocation(start,this.tokenStart),name:this.substrToCursor(start+1)}}function generate$q(node){this.token(types$p.Delim,"#"+node.name)}IdSelector$2.generate=generate$q;IdSelector$2.name=name$m;IdSelector$2.parse=parse$q;IdSelector$2.structure=structure$m;var MediaFeature$2={};const types$o=types$R;const name$l="MediaFeature";const structure$l={name:String,value:["Identifier","Number","Dimension","Ratio",null]};function parse$p(){const start=this.tokenStart;let name;let value=null;this.eat(types$o.LeftParenthesis);this.skipSC();name=this.consume(types$o.Ident);this.skipSC();if(this.tokenType!==types$o.RightParenthesis){this.eat(types$o.Colon);this.skipSC();switch(this.tokenType){case types$o.Number:if(this.lookupNonWSType(1)===types$o.Delim){value=this.Ratio()}else{value=this.Number()}break;case types$o.Dimension:value=this.Dimension();break;case types$o.Ident:value=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}this.eat(types$o.RightParenthesis);return{type:"MediaFeature",loc:this.getLocation(start,this.tokenStart),name:name,value:value}}function generate$p(node){this.token(types$o.LeftParenthesis,"(");this.token(types$o.Ident,node.name);if(node.value!==null){this.token(types$o.Colon,":");this.node(node.value)}this.token(types$o.RightParenthesis,")")}MediaFeature$2.generate=generate$p;MediaFeature$2.name=name$l;MediaFeature$2.parse=parse$p;MediaFeature$2.structure=structure$l;var MediaQuery$2={};const types$n=types$R;const name$k="MediaQuery";const structure$k={children:[["Identifier","MediaFeature","WhiteSpace"]]};function parse$o(){const children=this.createList();let child=null;this.skipSC();scan:while(!this.eof){switch(this.tokenType){case types$n.Comment:case types$n.WhiteSpace:this.next();continue;case types$n.Ident:child=this.Identifier();break;case types$n.LeftParenthesis:child=this.MediaFeature();break;default:break scan}children.push(child)}if(child===null){this.error("Identifier or parenthesis is expected")}return{type:"MediaQuery",loc:this.getLocationFromList(children),children:children}}function generate$o(node){this.children(node)}MediaQuery$2.generate=generate$o;MediaQuery$2.name=name$k;MediaQuery$2.parse=parse$o;MediaQuery$2.structure=structure$k;var MediaQueryList$2={};const types$m=types$R;const name$j="MediaQueryList";const structure$j={children:[["MediaQuery"]]};function parse$n(){const children=this.createList();this.skipSC();while(!this.eof){children.push(this.MediaQuery());if(this.tokenType!==types$m.Comma){break}this.next()}return{type:"MediaQueryList",loc:this.getLocationFromList(children),children:children}}function generate$n(node){this.children(node,(()=>this.token(types$m.Comma,",")))}MediaQueryList$2.generate=generate$n;MediaQueryList$2.name=name$j;MediaQueryList$2.parse=parse$n;MediaQueryList$2.structure=structure$j;var Nth$2={};const types$l=types$R;const name$i="Nth";const structure$i={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function parse$m(){this.skipSC();const start=this.tokenStart;let end=start;let selector=null;let nth;if(this.lookupValue(0,"odd")||this.lookupValue(0,"even")){nth=this.Identifier()}else{nth=this.AnPlusB()}end=this.tokenStart;this.skipSC();if(this.lookupValue(0,"of")){this.next();selector=this.SelectorList();end=this.tokenStart}return{type:"Nth",loc:this.getLocation(start,end),nth:nth,selector:selector}}function generate$m(node){this.node(node.nth);if(node.selector!==null){this.token(types$l.Ident,"of");this.node(node.selector)}}Nth$2.generate=generate$m;Nth$2.name=name$i;Nth$2.parse=parse$m;Nth$2.structure=structure$i;var _Number$5={};const types$k=types$R;const name$h="Number";const structure$h={value:String};function parse$l(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(types$k.Number)}}function generate$l(node){this.token(types$k.Number,node.value)}_Number$5.generate=generate$l;_Number$5.name=name$h;_Number$5.parse=parse$l;_Number$5.structure=structure$h;var Operator$2={};const name$g="Operator";const structure$g={value:String};function parse$k(){const start=this.tokenStart;this.next();return{type:"Operator",loc:this.getLocation(start,this.tokenStart),value:this.substrToCursor(start)}}function generate$k(node){this.tokenize(node.value)}Operator$2.generate=generate$k;Operator$2.name=name$g;Operator$2.parse=parse$k;Operator$2.structure=structure$g;var Parentheses$2={};const types$j=types$R;const name$f="Parentheses";const structure$f={children:[[]]};function parse$j(readSequence,recognizer){const start=this.tokenStart;let children=null;this.eat(types$j.LeftParenthesis);children=readSequence.call(this,recognizer);if(!this.eof){this.eat(types$j.RightParenthesis)}return{type:"Parentheses",loc:this.getLocation(start,this.tokenStart),children:children}}function generate$j(node){this.token(types$j.LeftParenthesis,"(");this.children(node);this.token(types$j.RightParenthesis,")")}Parentheses$2.generate=generate$j;Parentheses$2.name=name$f;Parentheses$2.parse=parse$j;Parentheses$2.structure=structure$f;var Percentage$4={};const types$i=types$R;const name$e="Percentage";const structure$e={value:String};function parse$i(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(types$i.Percentage)}}function generate$i(node){this.token(types$i.Percentage,node.value+"%")}Percentage$4.generate=generate$i;Percentage$4.name=name$e;Percentage$4.parse=parse$i;Percentage$4.structure=structure$e;var PseudoClassSelector$2={};const types$h=types$R;const name$d="PseudoClassSelector";const walkContext$4="function";const structure$d={name:String,children:[["Raw"],null]};function parse$h(){const start=this.tokenStart;let children=null;let name;let nameLowerCase;this.eat(types$h.Colon);if(this.tokenType===types$h.Function){name=this.consumeFunctionName();nameLowerCase=name.toLowerCase();if(hasOwnProperty.call(this.pseudo,nameLowerCase)){this.skipSC();children=this.pseudo[nameLowerCase].call(this);this.skipSC()}else{children=this.createList();children.push(this.Raw(this.tokenIndex,null,false))}this.eat(types$h.RightParenthesis)}else{name=this.consume(types$h.Ident)}return{type:"PseudoClassSelector",loc:this.getLocation(start,this.tokenStart),name:name,children:children}}function generate$h(node){this.token(types$h.Colon,":");if(node.children===null){this.token(types$h.Ident,node.name)}else{this.token(types$h.Function,node.name+"(");this.children(node);this.token(types$h.RightParenthesis,")")}}PseudoClassSelector$2.generate=generate$h;PseudoClassSelector$2.name=name$d;PseudoClassSelector$2.parse=parse$h;PseudoClassSelector$2.structure=structure$d;PseudoClassSelector$2.walkContext=walkContext$4;var PseudoElementSelector$2={};const types$g=types$R;const name$c="PseudoElementSelector";const walkContext$3="function";const structure$c={name:String,children:[["Raw"],null]};function parse$g(){const start=this.tokenStart;let children=null;let name;let nameLowerCase;this.eat(types$g.Colon);this.eat(types$g.Colon);if(this.tokenType===types$g.Function){name=this.consumeFunctionName();nameLowerCase=name.toLowerCase();if(hasOwnProperty.call(this.pseudo,nameLowerCase)){this.skipSC();children=this.pseudo[nameLowerCase].call(this);this.skipSC()}else{children=this.createList();children.push(this.Raw(this.tokenIndex,null,false))}this.eat(types$g.RightParenthesis)}else{name=this.consume(types$g.Ident)}return{type:"PseudoElementSelector",loc:this.getLocation(start,this.tokenStart),name:name,children:children}}function generate$g(node){this.token(types$g.Colon,":");this.token(types$g.Colon,":");if(node.children===null){this.token(types$g.Ident,node.name)}else{this.token(types$g.Function,node.name+"(");this.children(node);this.token(types$g.RightParenthesis,")")}}PseudoElementSelector$2.generate=generate$g;PseudoElementSelector$2.name=name$c;PseudoElementSelector$2.parse=parse$g;PseudoElementSelector$2.structure=structure$c;PseudoElementSelector$2.walkContext=walkContext$3;var Ratio$2={};const types$f=types$R;const charCodeDefinitions$4=charCodeDefinitions$c;const SOLIDUS$2=47;const FULLSTOP$1=46;function consumeNumber(){this.skipSC();const value=this.consume(types$f.Number);for(let i=0;i<value.length;i++){const code=value.charCodeAt(i);if(!charCodeDefinitions$4.isDigit(code)&&code!==FULLSTOP$1){this.error("Unsigned number is expected",this.tokenStart-value.length+i)}}if(Number(value)===0){this.error("Zero number is not allowed",this.tokenStart-value.length)}return value}const name$b="Ratio";const structure$b={left:String,right:String};function parse$f(){const start=this.tokenStart;const left=consumeNumber.call(this);let right;this.skipSC();this.eatDelim(SOLIDUS$2);right=consumeNumber.call(this);return{type:"Ratio",loc:this.getLocation(start,this.tokenStart),left:left,right:right}}function generate$f(node){this.token(types$f.Number,node.left);this.token(types$f.Delim,"/");this.token(types$f.Number,node.right)}Ratio$2.generate=generate$f;Ratio$2.name=name$b;Ratio$2.parse=parse$f;Ratio$2.structure=structure$b;var Raw$4={};const types$e=types$R;function getOffsetExcludeWS(){if(this.tokenIndex>0){if(this.lookupType(-1)===types$e.WhiteSpace){return this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset}}return this.tokenStart}const name$a="Raw";const structure$a={value:String};function parse$e(startToken,consumeUntil,excludeWhiteSpace){const startOffset=this.getTokenStart(startToken);let endOffset;this.skipUntilBalanced(startToken,consumeUntil||this.consumeUntilBalanceEnd);if(excludeWhiteSpace&&this.tokenStart>startOffset){endOffset=getOffsetExcludeWS.call(this)}else{endOffset=this.tokenStart}return{type:"Raw",loc:this.getLocation(startOffset,endOffset),value:this.substring(startOffset,endOffset)}}function generate$e(node){this.tokenize(node.value)}Raw$4.generate=generate$e;Raw$4.name=name$a;Raw$4.parse=parse$e;Raw$4.structure=structure$a;var Rule$4={};const types$d=types$R;function consumeRaw$2(startToken){return this.Raw(startToken,this.consumeUntilLeftCurlyBracket,true)}function consumePrelude(){const prelude=this.SelectorList();if(prelude.type!=="Raw"&&this.eof===false&&this.tokenType!==types$d.LeftCurlyBracket){this.error()}return prelude}const name$9="Rule";const walkContext$2="rule";const structure$9={prelude:["SelectorList","Raw"],block:["Block"]};function parse$d(){const startToken=this.tokenIndex;const startOffset=this.tokenStart;let prelude;let block;if(this.parseRulePrelude){prelude=this.parseWithFallback(consumePrelude,consumeRaw$2)}else{prelude=consumeRaw$2.call(this,startToken)}block=this.Block(true);return{type:"Rule",loc:this.getLocation(startOffset,this.tokenStart),prelude:prelude,block:block}}function generate$d(node){this.node(node.prelude);this.node(node.block)}Rule$4.generate=generate$d;Rule$4.name=name$9;Rule$4.parse=parse$d;Rule$4.structure=structure$9;Rule$4.walkContext=walkContext$2;var Selector$3={};const name$8="Selector";const structure$8={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};function parse$c(){const children=this.readSequence(this.scope.Selector);if(this.getFirstListNode(children)===null){this.error("Selector is expected")}return{type:"Selector",loc:this.getLocationFromList(children),children:children}}function generate$c(node){this.children(node)}Selector$3.generate=generate$c;Selector$3.name=name$8;Selector$3.parse=parse$c;Selector$3.structure=structure$8;var SelectorList$2={};const types$c=types$R;const name$7="SelectorList";const walkContext$1="selector";const structure$7={children:[["Selector","Raw"]]};function parse$b(){const children=this.createList();while(!this.eof){children.push(this.Selector());if(this.tokenType===types$c.Comma){this.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(children),children:children}}function generate$b(node){this.children(node,(()=>this.token(types$c.Comma,",")))}SelectorList$2.generate=generate$b;SelectorList$2.name=name$7;SelectorList$2.parse=parse$b;SelectorList$2.structure=structure$7;SelectorList$2.walkContext=walkContext$1;var _String={};var string$3={};const charCodeDefinitions$3=charCodeDefinitions$c;const utils$d=utils$k;const REVERSE_SOLIDUS$2=92;const QUOTATION_MARK$1=34;const APOSTROPHE$1=39;function decode$2(str){const len=str.length;const firstChar=str.charCodeAt(0);const start=firstChar===QUOTATION_MARK$1||firstChar===APOSTROPHE$1?1:0;const end=start===1&&len>1&&str.charCodeAt(len-1)===firstChar?len-2:len-1;let decoded="";for(let i=start;i<=end;i++){let code=str.charCodeAt(i);if(code===REVERSE_SOLIDUS$2){if(i===end){if(i!==len-1){decoded=str.substr(i+1)}break}code=str.charCodeAt(++i);if(charCodeDefinitions$3.isValidEscape(REVERSE_SOLIDUS$2,code)){const escapeStart=i-1;const escapeEnd=utils$d.consumeEscaped(str,escapeStart);i=escapeEnd-1;decoded+=utils$d.decodeEscaped(str.substring(escapeStart+1,escapeEnd))}else{if(code===13&&str.charCodeAt(i+1)===10){i++}}}else{decoded+=str[i]}}return decoded}function encode$2(str,apostrophe){const quote=apostrophe?"'":'"';const quoteCode=apostrophe?APOSTROPHE$1:QUOTATION_MARK$1;let encoded="";let wsBeforeHexIsNeeded=false;for(let i=0;i<str.length;i++){const code=str.charCodeAt(i);if(code===0){encoded+="�";continue}if(code<=31||code===127){encoded+="\\"+code.toString(16);wsBeforeHexIsNeeded=true;continue}if(code===quoteCode||code===REVERSE_SOLIDUS$2){encoded+="\\"+str.charAt(i);wsBeforeHexIsNeeded=false}else{if(wsBeforeHexIsNeeded&&(charCodeDefinitions$3.isHexDigit(code)||charCodeDefinitions$3.isWhiteSpace(code))){encoded+=" "}encoded+=str.charAt(i);wsBeforeHexIsNeeded=false}}return quote+encoded+quote}string$3.decode=decode$2;string$3.encode=encode$2;const string$2=string$3;const types$b=types$R;const name$6="String";const structure$6={value:String};function parse$a(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:string$2.decode(this.consume(types$b.String))}}function generate$a(node){this.token(types$b.String,string$2.encode(node.value))}_String.generate=generate$a;_String.name=name$6;_String.parse=parse$a;_String.structure=structure$6;var StyleSheet$2={};const types$a=types$R;const EXCLAMATIONMARK=33;function consumeRaw$1(startToken){return this.Raw(startToken,null,false)}const name$5="StyleSheet";const walkContext="stylesheet";const structure$5={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function parse$9(){const start=this.tokenStart;const children=this.createList();let child;while(!this.eof){switch(this.tokenType){case types$a.WhiteSpace:this.next();continue;case types$a.Comment:if(this.charCodeAt(this.tokenStart+2)!==EXCLAMATIONMARK){this.next();continue}child=this.Comment();break;case types$a.CDO:child=this.CDO();break;case types$a.CDC:child=this.CDC();break;case types$a.AtKeyword:child=this.parseWithFallback(this.Atrule,consumeRaw$1);break;default:child=this.parseWithFallback(this.Rule,consumeRaw$1)}children.push(child)}return{type:"StyleSheet",loc:this.getLocation(start,this.tokenStart),children:children}}function generate$9(node){this.children(node)}StyleSheet$2.generate=generate$9;StyleSheet$2.name=name$5;StyleSheet$2.parse=parse$9;StyleSheet$2.structure=structure$5;StyleSheet$2.walkContext=walkContext;var TypeSelector$4={};const types$9=types$R;const ASTERISK$2=42;const VERTICALLINE$1=124;function eatIdentifierOrAsterisk(){if(this.tokenType!==types$9.Ident&&this.isDelim(ASTERISK$2)===false){this.error("Identifier or asterisk is expected")}this.next()}const name$4="TypeSelector";const structure$4={name:String};function parse$8(){const start=this.tokenStart;if(this.isDelim(VERTICALLINE$1)){this.next();eatIdentifierOrAsterisk.call(this)}else{eatIdentifierOrAsterisk.call(this);if(this.isDelim(VERTICALLINE$1)){this.next();eatIdentifierOrAsterisk.call(this)}}return{type:"TypeSelector",loc:this.getLocation(start,this.tokenStart),name:this.substrToCursor(start)}}function generate$8(node){this.tokenize(node.name)}TypeSelector$4.generate=generate$8;TypeSelector$4.name=name$4;TypeSelector$4.parse=parse$8;TypeSelector$4.structure=structure$4;var UnicodeRange$2={};const types$8=types$R;const charCodeDefinitions$2=charCodeDefinitions$c;const PLUSSIGN$2=43;const HYPHENMINUS$1=45;const QUESTIONMARK=63;function eatHexSequence(offset,allowDash){let len=0;for(let pos=this.tokenStart+offset;pos<this.tokenEnd;pos++){const code=this.charCodeAt(pos);if(code===HYPHENMINUS$1&&allowDash&&len!==0){eatHexSequence.call(this,offset+len+1,false);return-1}if(!charCodeDefinitions$2.isHexDigit(code)){this.error(allowDash&&len!==0?"Hyphen minus"+(len<6?" or hex digit":"")+" is expected":len<6?"Hex digit is expected":"Unexpected input",pos)}if(++len>6){this.error("Too many hex digits",pos)}}this.next();return len}function eatQuestionMarkSequence(max){let count=0;while(this.isDelim(QUESTIONMARK)){if(++count>max){this.error("Too many question marks")}this.next()}}function startsWith(code){if(this.charCodeAt(this.tokenStart)!==code){this.error((code===PLUSSIGN$2?"Plus sign":"Hyphen minus")+" is expected")}}function scanUnicodeRange(){let hexLength=0;switch(this.tokenType){case types$8.Number:hexLength=eatHexSequence.call(this,1,true);if(this.isDelim(QUESTIONMARK)){eatQuestionMarkSequence.call(this,6-hexLength);break}if(this.tokenType===types$8.Dimension||this.tokenType===types$8.Number){startsWith.call(this,HYPHENMINUS$1);eatHexSequence.call(this,1,false);break}break;case types$8.Dimension:hexLength=eatHexSequence.call(this,1,true);if(hexLength>0){eatQuestionMarkSequence.call(this,6-hexLength)}break;default:this.eatDelim(PLUSSIGN$2);if(this.tokenType===types$8.Ident){hexLength=eatHexSequence.call(this,0,true);if(hexLength>0){eatQuestionMarkSequence.call(this,6-hexLength)}break}if(this.isDelim(QUESTIONMARK)){this.next();eatQuestionMarkSequence.call(this,5);break}this.error("Hex digit or question mark is expected")}}const name$3="UnicodeRange";const structure$3={value:String};function parse$7(){const start=this.tokenStart;this.eatIdent("u");scanUnicodeRange.call(this);return{type:"UnicodeRange",loc:this.getLocation(start,this.tokenStart),value:this.substrToCursor(start)}}function generate$7(node){this.tokenize(node.value)}UnicodeRange$2.generate=generate$7;UnicodeRange$2.name=name$3;UnicodeRange$2.parse=parse$7;UnicodeRange$2.structure=structure$3;var Url$4={};var url$2={};const charCodeDefinitions$1=charCodeDefinitions$c;const utils$c=utils$k;const SPACE$1=32;const REVERSE_SOLIDUS$1=92;const QUOTATION_MARK=34;const APOSTROPHE=39;const LEFTPARENTHESIS=40;const RIGHTPARENTHESIS=41;function decode$1(str){const len=str.length;let start=4;let end=str.charCodeAt(len-1)===RIGHTPARENTHESIS?len-2:len-1;let decoded="";while(start<end&&charCodeDefinitions$1.isWhiteSpace(str.charCodeAt(start))){start++}while(start<end&&charCodeDefinitions$1.isWhiteSpace(str.charCodeAt(end))){end--}for(let i=start;i<=end;i++){let code=str.charCodeAt(i);if(code===REVERSE_SOLIDUS$1){if(i===end){if(i!==len-1){decoded=str.substr(i+1)}break}code=str.charCodeAt(++i);if(charCodeDefinitions$1.isValidEscape(REVERSE_SOLIDUS$1,code)){const escapeStart=i-1;const escapeEnd=utils$c.consumeEscaped(str,escapeStart);i=escapeEnd-1;decoded+=utils$c.decodeEscaped(str.substring(escapeStart+1,escapeEnd))}else{if(code===13&&str.charCodeAt(i+1)===10){i++}}}else{decoded+=str[i]}}return decoded}function encode$1(str){let encoded="";let wsBeforeHexIsNeeded=false;for(let i=0;i<str.length;i++){const code=str.charCodeAt(i);if(code===0){encoded+="�";continue}if(code<=31||code===127){encoded+="\\"+code.toString(16);wsBeforeHexIsNeeded=true;continue}if(code===SPACE$1||code===REVERSE_SOLIDUS$1||code===QUOTATION_MARK||code===APOSTROPHE||code===LEFTPARENTHESIS||code===RIGHTPARENTHESIS){encoded+="\\"+str.charAt(i);wsBeforeHexIsNeeded=false}else{if(wsBeforeHexIsNeeded&&charCodeDefinitions$1.isHexDigit(code)){encoded+=" "}encoded+=str.charAt(i);wsBeforeHexIsNeeded=false}}return"url("+encoded+")"}url$2.decode=decode$1;url$2.encode=encode$1;const url$1=url$2;const string$1=string$3;const types$7=types$R;const name$2="Url";const structure$2={value:String};function parse$6(){const start=this.tokenStart;let value;switch(this.tokenType){case types$7.Url:value=url$1.decode(this.consume(types$7.Url));break;case types$7.Function:if(!this.cmpStr(this.tokenStart,this.tokenEnd,"url(")){this.error("Function name must be `url`")}this.eat(types$7.Function);this.skipSC();value=string$1.decode(this.consume(types$7.String));this.skipSC();if(!this.eof){this.eat(types$7.RightParenthesis)}break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(start,this.tokenStart),value:value}}function generate$6(node){this.token(types$7.Url,url$1.encode(node.value))}Url$4.generate=generate$6;Url$4.name=name$2;Url$4.parse=parse$6;Url$4.structure=structure$2;var Value$4={};const name$1="Value";const structure$1={children:[[]]};function parse$5(){const start=this.tokenStart;const children=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(start,this.tokenStart),children:children}}function generate$5(node){this.children(node)}Value$4.generate=generate$5;Value$4.name=name$1;Value$4.parse=parse$5;Value$4.structure=structure$1;var WhiteSpace$4={};const types$6=types$R;const SPACE=Object.freeze({type:"WhiteSpace",loc:null,value:" "});const name="WhiteSpace";const structure={value:String};function parse$4(){this.eat(types$6.WhiteSpace);return SPACE}function generate$4(node){this.token(types$6.WhiteSpace,node.value)}WhiteSpace$4.generate=generate$4;WhiteSpace$4.name=name;WhiteSpace$4.parse=parse$4;WhiteSpace$4.structure=structure;const AnPlusB$1=AnPlusB$2;const Atrule$5=Atrule$6;const AtrulePrelude$1=AtrulePrelude$2;const AttributeSelector$3=AttributeSelector$4;const Block$1=Block$2;const Brackets$1=Brackets$2;const CDC$1=CDC$2;const CDO$1=CDO$2;const ClassSelector$1=ClassSelector$2;const Combinator$1=Combinator$2;const Comment$3=Comment$4;const Declaration$3=Declaration$4;const DeclarationList$1=DeclarationList$2;const Dimension$3=Dimension$4;const Function$1=_Function;const Hash$1=Hash$2;const Identifier$1=Identifier$2;const IdSelector$1=IdSelector$2;const MediaFeature$1=MediaFeature$2;const MediaQuery$1=MediaQuery$2;const MediaQueryList$1=MediaQueryList$2;const Nth$1=Nth$2;const Number$1$1=_Number$5;const Operator$1=Operator$2;const Parentheses$1=Parentheses$2;const Percentage$3=Percentage$4;const PseudoClassSelector$1=PseudoClassSelector$2;const PseudoElementSelector$1=PseudoElementSelector$2;const Ratio$1=Ratio$2;const Raw$3=Raw$4;const Rule$3=Rule$4;const Selector$2=Selector$3;const SelectorList$1=SelectorList$2;const String$1$1=_String;const StyleSheet$1=StyleSheet$2;const TypeSelector$3=TypeSelector$4;const UnicodeRange$1=UnicodeRange$2;const Url$3=Url$4;const Value$3=Value$4;const WhiteSpace$3=WhiteSpace$4;node.AnPlusB=AnPlusB$1;node.Atrule=Atrule$5;node.AtrulePrelude=AtrulePrelude$1;node.AttributeSelector=AttributeSelector$3;node.Block=Block$1;node.Brackets=Brackets$1;node.CDC=CDC$1;node.CDO=CDO$1;node.ClassSelector=ClassSelector$1;node.Combinator=Combinator$1;node.Comment=Comment$3;node.Declaration=Declaration$3;node.DeclarationList=DeclarationList$1;node.Dimension=Dimension$3;node.Function=Function$1;node.Hash=Hash$1;node.Identifier=Identifier$1;node.IdSelector=IdSelector$1;node.MediaFeature=MediaFeature$1;node.MediaQuery=MediaQuery$1;node.MediaQueryList=MediaQueryList$1;node.Nth=Nth$1;node.Number=Number$1$1;node.Operator=Operator$1;node.Parentheses=Parentheses$1;node.Percentage=Percentage$3;node.PseudoClassSelector=PseudoClassSelector$1;node.PseudoElementSelector=PseudoElementSelector$1;node.Ratio=Ratio$1;node.Raw=Raw$3;node.Rule=Rule$3;node.Selector=Selector$2;node.SelectorList=SelectorList$1;node.String=String$1$1;node.StyleSheet=StyleSheet$1;node.TypeSelector=TypeSelector$3;node.UnicodeRange=UnicodeRange$1;node.Url=Url$3;node.Value=Value$3;node.WhiteSpace=WhiteSpace$3;const data=data$1;const index$7=node;const lexerConfig={generic:true,...data,node:index$7};var lexer$3=lexerConfig;var scope={};const types$5=types$R;const NUMBERSIGN$1=35;const ASTERISK$1=42;const PLUSSIGN$1=43;const HYPHENMINUS=45;const SOLIDUS$1=47;const U=117;function defaultRecognizer(context){switch(this.tokenType){case types$5.Hash:return this.Hash();case types$5.Comma:return this.Operator();case types$5.LeftParenthesis:return this.Parentheses(this.readSequence,context.recognizer);case types$5.LeftSquareBracket:return this.Brackets(this.readSequence,context.recognizer);case types$5.String:return this.String();case types$5.Dimension:return this.Dimension();case types$5.Percentage:return this.Percentage();case types$5.Number:return this.Number();case types$5.Function:return this.cmpStr(this.tokenStart,this.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,context.recognizer);case types$5.Url:return this.Url();case types$5.Ident:if(this.cmpChar(this.tokenStart,U)&&this.cmpChar(this.tokenStart+1,PLUSSIGN$1)){return this.UnicodeRange()}else{return this.Identifier()}case types$5.Delim:{const code=this.charCodeAt(this.tokenStart);if(code===SOLIDUS$1||code===ASTERISK$1||code===PLUSSIGN$1||code===HYPHENMINUS){return this.Operator()}if(code===NUMBERSIGN$1){this.error("Hex or identifier is expected",this.tokenStart+1)}break}}}var _default$2=defaultRecognizer;const _default$1=_default$2;const atrulePrelude$1={getNode:_default$1};var atrulePrelude_1=atrulePrelude$1;const types$4=types$R;const NUMBERSIGN=35;const ASTERISK=42;const PLUSSIGN=43;const SOLIDUS=47;const FULLSTOP=46;const GREATERTHANSIGN=62;const VERTICALLINE=124;const TILDE=126;function onWhiteSpace(next,children){if(children.last!==null&&children.last.type!=="Combinator"&&next!==null&&next.type!=="Combinator"){children.push({type:"Combinator",loc:null,name:" "})}}function getNode(){switch(this.tokenType){case types$4.LeftSquareBracket:return this.AttributeSelector();case types$4.Hash:return this.IdSelector();case types$4.Colon:if(this.lookupType(1)===types$4.Colon){return this.PseudoElementSelector()}else{return this.PseudoClassSelector()}case types$4.Ident:return this.TypeSelector();case types$4.Number:case types$4.Percentage:return this.Percentage();case types$4.Dimension:if(this.charCodeAt(this.tokenStart)===FULLSTOP){this.error("Identifier is expected",this.tokenStart+1)}break;case types$4.Delim:{const code=this.charCodeAt(this.tokenStart);switch(code){case PLUSSIGN:case GREATERTHANSIGN:case TILDE:case SOLIDUS:return this.Combinator();case FULLSTOP:return this.ClassSelector();case ASTERISK:case VERTICALLINE:return this.TypeSelector();case NUMBERSIGN:return this.IdSelector()}break}}}const Selector$1={onWhiteSpace:onWhiteSpace,getNode:getNode};var selector$2=Selector$1;function expressionFn(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,false))}var expression$1=expressionFn;const types$3=types$R;function varFn(){const children=this.createList();this.skipSC();children.push(this.Identifier());this.skipSC();if(this.tokenType===types$3.Comma){children.push(this.Operator());const startIndex=this.tokenIndex;const value=this.parseCustomProperty?this.Value(null):this.Raw(this.tokenIndex,this.consumeUntilExclamationMarkOrSemicolon,false);if(value.type==="Value"&&value.children.isEmpty){for(let offset=startIndex-this.tokenIndex;offset<=0;offset++){if(this.lookupType(offset)===types$3.WhiteSpace){value.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}}children.push(value)}return children}var _var$1=varFn;const _default=_default$2;const expression=expression$1;const _var=_var$1;function isPlusMinusOperator(node){return node!==null&&node.type==="Operator"&&(node.value[node.value.length-1]==="-"||node.value[node.value.length-1]==="+")}const value$1={getNode:_default,onWhiteSpace(next,children){if(isPlusMinusOperator(next)){next.value=" "+next.value}if(isPlusMinusOperator(children.last)){children.last.value+=" "}},expression:expression,var:_var};var value_1=value$1;const atrulePrelude=atrulePrelude_1;const selector$1=selector$2;const value=value_1;scope.AtrulePrelude=atrulePrelude;scope.Selector=selector$1;scope.Value=value;const fontFace$1={parse:{prelude:null,block(){return this.Block(true)}}};var fontFace_1=fontFace$1;const types$2=types$R;const importAtrule={parse:{prelude(){const children=this.createList();this.skipSC();switch(this.tokenType){case types$2.String:children.push(this.String());break;case types$2.Url:case types$2.Function:children.push(this.Url());break;default:this.error("String or url() is expected")}if(this.lookupNonWSType(0)===types$2.Ident||this.lookupNonWSType(0)===types$2.LeftParenthesis){children.push(this.MediaQueryList())}return children},block:null}};var _import$1=importAtrule;const media$1={parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(){return this.Block(false)}}};var media_1=media$1;const page$1={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(true)}}};var page_1=page$1;const types$1=types$R;function consumeRaw(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,false))}function parentheses(){this.skipSC();if(this.tokenType===types$1.Ident&&this.lookupNonWSType(1)===types$1.Colon){return this.createSingleNodeList(this.Declaration())}return readSequence.call(this)}function readSequence(){const children=this.createList();let child;this.skipSC();scan:while(!this.eof){switch(this.tokenType){case types$1.Comment:case types$1.WhiteSpace:this.next();continue;case types$1.Function:child=this.Function(consumeRaw,this.scope.AtrulePrelude);break;case types$1.Ident:child=this.Identifier();break;case types$1.LeftParenthesis:child=this.Parentheses(parentheses,this.scope.AtrulePrelude);break;default:break scan}children.push(child)}return children}const supports$1={parse:{prelude(){const children=readSequence.call(this);if(this.getFirstListNode(children)===null){this.error("Condition is expected")}return children},block(){return this.Block(false)}}};var supports_1=supports$1;const fontFace=fontFace_1;const _import=_import$1;const media=media_1;const page=page_1;const supports=supports_1;const atrule={"font-face":fontFace,import:_import,media:media,page:page,supports:supports};var atrule_1=atrule;const selectorList={parse(){return this.createSingleNodeList(this.SelectorList())}};const selector={parse(){return this.createSingleNodeList(this.Selector())}};const identList={parse(){return this.createSingleNodeList(this.Identifier())}};const nth={parse(){return this.createSingleNodeList(this.Nth())}};const pseudo={dir:identList,has:selectorList,lang:identList,matches:selectorList,is:selectorList,"-moz-any":selectorList,"-webkit-any":selectorList,where:selectorList,not:selectorList,"nth-child":nth,"nth-last-child":nth,"nth-last-of-type":nth,"nth-of-type":nth,slotted:selector};var pseudo_1=pseudo;var indexParse$1={};const AnPlusB=AnPlusB$2;const Atrule$4=Atrule$6;const AtrulePrelude=AtrulePrelude$2;const AttributeSelector$2=AttributeSelector$4;const Block=Block$2;const Brackets=Brackets$2;const CDC=CDC$2;const CDO=CDO$2;const ClassSelector=ClassSelector$2;const Combinator=Combinator$2;const Comment$2=Comment$4;const Declaration$2=Declaration$4;const DeclarationList=DeclarationList$2;const Dimension$2=Dimension$4;const Function=_Function;const Hash=Hash$2;const Identifier=Identifier$2;const IdSelector=IdSelector$2;const MediaFeature=MediaFeature$2;const MediaQuery=MediaQuery$2;const MediaQueryList=MediaQueryList$2;const Nth=Nth$2;const Number$2=_Number$5;const Operator=Operator$2;const Parentheses=Parentheses$2;const Percentage$2=Percentage$4;const PseudoClassSelector=PseudoClassSelector$2;const PseudoElementSelector=PseudoElementSelector$2;const Ratio=Ratio$2;const Raw$2=Raw$4;const Rule$2=Rule$4;const Selector=Selector$3;const SelectorList=SelectorList$2;const String$1=_String;const StyleSheet=StyleSheet$2;const TypeSelector$2=TypeSelector$4;const UnicodeRange=UnicodeRange$2;const Url$2=Url$4;const Value$2=Value$4;const WhiteSpace$2=WhiteSpace$4;indexParse$1.AnPlusB=AnPlusB.parse;indexParse$1.Atrule=Atrule$4.parse;indexParse$1.AtrulePrelude=AtrulePrelude.parse;indexParse$1.AttributeSelector=AttributeSelector$2.parse;indexParse$1.Block=Block.parse;indexParse$1.Brackets=Brackets.parse;indexParse$1.CDC=CDC.parse;indexParse$1.CDO=CDO.parse;indexParse$1.ClassSelector=ClassSelector.parse;indexParse$1.Combinator=Combinator.parse;indexParse$1.Comment=Comment$2.parse;indexParse$1.Declaration=Declaration$2.parse;indexParse$1.DeclarationList=DeclarationList.parse;indexParse$1.Dimension=Dimension$2.parse;indexParse$1.Function=Function.parse;indexParse$1.Hash=Hash.parse;indexParse$1.Identifier=Identifier.parse;indexParse$1.IdSelector=IdSelector.parse;indexParse$1.MediaFeature=MediaFeature.parse;indexParse$1.MediaQuery=MediaQuery.parse;indexParse$1.MediaQueryList=MediaQueryList.parse;indexParse$1.Nth=Nth.parse;indexParse$1.Number=Number$2.parse;indexParse$1.Operator=Operator.parse;indexParse$1.Parentheses=Parentheses.parse;indexParse$1.Percentage=Percentage$2.parse;indexParse$1.PseudoClassSelector=PseudoClassSelector.parse;indexParse$1.PseudoElementSelector=PseudoElementSelector.parse;indexParse$1.Ratio=Ratio.parse;indexParse$1.Raw=Raw$2.parse;indexParse$1.Rule=Rule$2.parse;indexParse$1.Selector=Selector.parse;indexParse$1.SelectorList=SelectorList.parse;indexParse$1.String=String$1.parse;indexParse$1.StyleSheet=StyleSheet.parse;indexParse$1.TypeSelector=TypeSelector$2.parse;indexParse$1.UnicodeRange=UnicodeRange.parse;indexParse$1.Url=Url$2.parse;indexParse$1.Value=Value$2.parse;indexParse$1.WhiteSpace=WhiteSpace$2.parse;const index$6=scope;const index$1$2=atrule_1;const index$2$1=pseudo_1;const indexParse=indexParse$1;const config$1={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude(options){return this.AtrulePrelude(options.atrule?String(options.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",rule:"Rule",selectorList:"SelectorList",selector:"Selector",block(){return this.Block(true)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},scope:index$6,atrule:index$1$2,pseudo:index$2$1,node:indexParse};var parser$1=config$1;const index$5=node;const config={node:index$5};var walker$1=config;const create$1=create_1;const lexer$2=lexer$3;const parser=parser$1;const walker=walker$1;const syntax$1=create$1({...lexer$2,...parser,...walker});var syntax_1=syntax$1;var version$2="2.2.1";var definitionSyntax={};const SyntaxError$1=_SyntaxError;const generate$3=generate$L;const parse$3=parse$L;const walk$2=walk$5;definitionSyntax.SyntaxError=SyntaxError$1.SyntaxError;definitionSyntax.generate=generate$3.generate;definitionSyntax.parse=parse$3.parse;definitionSyntax.walk=walk$2.walk;var clone$2={};const List$1=List$7;function clone$1(node){const result={};for(const key in node){let value=node[key];if(value){if(Array.isArray(value)||value instanceof List$1.List){value=value.map(clone$1)}else if(value.constructor===Object){value=clone$1(value)}}result[key]=value}return result}clone$2.clone=clone$1;var ident$1={};const charCodeDefinitions=charCodeDefinitions$c;const utils$b=utils$k;const REVERSE_SOLIDUS=92;function decode(str){const end=str.length-1;let decoded="";for(let i=0;i<str.length;i++){let code=str.charCodeAt(i);if(code===REVERSE_SOLIDUS){if(i===end){break}code=str.charCodeAt(++i);if(charCodeDefinitions.isValidEscape(REVERSE_SOLIDUS,code)){const escapeStart=i-1;const escapeEnd=utils$b.consumeEscaped(str,escapeStart);i=escapeEnd-1;decoded+=utils$b.decodeEscaped(str.substring(escapeStart+1,escapeEnd))}else{if(code===13&&str.charCodeAt(i+1)===10){i++}}}else{decoded+=str[i]}}return decoded}function encode(str){let encoded="";if(str.length===1&&str.charCodeAt(0)===45){return"\\-"}for(let i=0;i<str.length;i++){const code=str.charCodeAt(i);if(code===0){encoded+="�";continue}if(code<=31||code===127||code>=48&&code<=57&&(i===0||i===1&&str.charCodeAt(0)===45)){encoded+="\\"+code.toString(16)+" ";continue}if(charCodeDefinitions.isName(code)){encoded+=str.charAt(i)}else{encoded+="\\"+str.charAt(i)}}return encoded}ident$1.decode=decode;ident$1.encode=encode;const index$1$1=syntax_1;const version$1=version$2;const create=create_1;const List=List$7;const Lexer=Lexer$3;const index$4=definitionSyntax;const clone=clone$2;const names$1=names$4;const ident=ident$1;const string=string$3;const url=url$2;const types=types$R;const names=names$8;const TokenStream=TokenStream$4;const{tokenize:tokenize$1,parse:parse$2,generate:generate$2,lexer:lexer$1,createLexer:createLexer,walk:walk$1,find:find$1,findLast:findLast$1,findAll:findAll$1,toPlainObject:toPlainObject$1,fromPlainObject:fromPlainObject$1,fork:fork}=index$1$1;cjs.version=version$1.version;cjs.createSyntax=create;cjs.List=List.List;cjs.Lexer=Lexer.Lexer;cjs.definitionSyntax=index$4;cjs.clone=clone.clone;cjs.isCustomProperty=names$1.isCustomProperty;cjs.keyword=names$1.keyword;cjs.property=names$1.property;cjs.vendorPrefix=names$1.vendorPrefix;cjs.ident=ident;cjs.string=string;cjs.url=url;cjs.tokenTypes=types;cjs.tokenNames=names;cjs.TokenStream=TokenStream.TokenStream;cjs.createLexer=createLexer;cjs.find=find$1;cjs.findAll=findAll$1;cjs.findLast=findLast$1;cjs.fork=fork;cjs.fromPlainObject=fromPlainObject$1;cjs.generate=generate$2;cjs.lexer=lexer$1;cjs.parse=parse$2;cjs.toPlainObject=toPlainObject$1;cjs.tokenize=tokenize$1;cjs.walk=walk$1;var usage$1={};const{hasOwnProperty:hasOwnProperty$4}=Object.prototype;function buildMap(list,caseInsensitive){const map=Object.create(null);if(!Array.isArray(list)){return null}for(let name of list){if(caseInsensitive){name=name.toLowerCase()}map[name]=true}return map}function buildList(data){if(!data){return null}const tags=buildMap(data.tags,true);const ids=buildMap(data.ids);const classes=buildMap(data.classes);if(tags===null&&ids===null&&classes===null){return null}return{tags:tags,ids:ids,classes:classes}}function buildIndex(data){let scopes=false;if(data.scopes&&Array.isArray(data.scopes)){scopes=Object.create(null);for(let i=0;i<data.scopes.length;i++){const list=data.scopes[i];if(!list||!Array.isArray(list)){throw new Error("Wrong usage format")}for(const name of list){if(hasOwnProperty$4.call(scopes,name)){throw new Error(`Class can't be used for several scopes: ${name}`)}scopes[name]=i+1}}}return{whitelist:buildList(data),blacklist:buildList(data.blacklist),scopes:scopes}}usage$1.buildIndex=buildIndex;var utils$a={};function hasNoChildren(node){return!node||!node.children||node.children.isEmpty}function isNodeChildrenList(node,list){return node!==null&&node.children===list}utils$a.hasNoChildren=hasNoChildren;utils$a.isNodeChildrenList=isNodeChildrenList;const cssTree$m=cjs;const utils$9=utils$a;function cleanAtrule(node,item,list){if(node.block){if(this.stylesheet!==null){this.stylesheet.firstAtrulesAllowed=false}if(utils$9.hasNoChildren(node.block)){list.remove(item);return}}switch(node.name){case"charset":if(utils$9.hasNoChildren(node.prelude)){list.remove(item);return}if(item.prev){list.remove(item);return}break;case"import":if(this.stylesheet===null||!this.stylesheet.firstAtrulesAllowed){list.remove(item);return}list.prevUntil(item.prev,(function(rule){if(rule.type==="Atrule"){if(rule.name==="import"||rule.name==="charset"){return}}this.root.firstAtrulesAllowed=false;list.remove(item);return true}),this);break;default:{const name=cssTree$m.keyword(node.name).basename;if(name==="keyframes"||name==="media"||name==="supports"){if(utils$9.hasNoChildren(node.prelude)||utils$9.hasNoChildren(node.block)){list.remove(item)}}}}}var Atrule$3=cleanAtrule;function cleanComment(data,item,list){list.remove(item)}var Comment$1=cleanComment;const cssTree$l=cjs;function cleanDeclartion(node,item,list){if(node.value.children&&node.value.children.isEmpty){list.remove(item);return}if(cssTree$l.property(node.property).custom){if(/\S/.test(node.value.value)){node.value.value=node.value.value.trim()}}}var Declaration$1=cleanDeclartion;const utils$8=utils$a;function cleanRaw(node,item,list){if(utils$8.isNodeChildrenList(this.stylesheet,list)||utils$8.isNodeChildrenList(this.block,list)){list.remove(item)}}var Raw$1=cleanRaw;const cssTree$k=cjs;const utils$7=utils$a;const{hasOwnProperty:hasOwnProperty$3}=Object.prototype;const skipUsageFilteringAtrule=new Set(["keyframes"]);function cleanUnused(selectorList,usageData){selectorList.children.forEach(((selector,item,list)=>{let shouldRemove=false;cssTree$k.walk(selector,(function(node){if(this.selector===null||this.selector===selectorList){switch(node.type){case"SelectorList":if(this.function===null||this.function.name.toLowerCase()!=="not"){if(cleanUnused(node,usageData)){shouldRemove=true}}break;case"ClassSelector":if(usageData.whitelist!==null&&usageData.whitelist.classes!==null&&!hasOwnProperty$3.call(usageData.whitelist.classes,node.name)){shouldRemove=true}if(usageData.blacklist!==null&&usageData.blacklist.classes!==null&&hasOwnProperty$3.call(usageData.blacklist.classes,node.name)){shouldRemove=true}break;case"IdSelector":if(usageData.whitelist!==null&&usageData.whitelist.ids!==null&&!hasOwnProperty$3.call(usageData.whitelist.ids,node.name)){shouldRemove=true}if(usageData.blacklist!==null&&usageData.blacklist.ids!==null&&hasOwnProperty$3.call(usageData.blacklist.ids,node.name)){shouldRemove=true}break;case"TypeSelector":if(node.name.charAt(node.name.length-1)!=="*"){if(usageData.whitelist!==null&&usageData.whitelist.tags!==null&&!hasOwnProperty$3.call(usageData.whitelist.tags,node.name.toLowerCase())){shouldRemove=true}if(usageData.blacklist!==null&&usageData.blacklist.tags!==null&&hasOwnProperty$3.call(usageData.blacklist.tags,node.name.toLowerCase())){shouldRemove=true}}break}}}));if(shouldRemove){list.remove(item)}}));return selectorList.children.isEmpty}function cleanRule(node,item,list,options){if(utils$7.hasNoChildren(node.prelude)||utils$7.hasNoChildren(node.block)){list.remove(item);return}if(this.atrule&&skipUsageFilteringAtrule.has(cssTree$k.keyword(this.atrule.name).basename)){return}const{usage:usage}=options;if(usage&&(usage.whitelist!==null||usage.blacklist!==null)){cleanUnused(node.prelude,usage);if(utils$7.hasNoChildren(node.prelude)){list.remove(item);return}}}var Rule$1=cleanRule;function cleanTypeSelector(node,item,list){const name=item.data.name;if(name!=="*"){return}const nextType=item.next&&item.next.data.type;if(nextType==="IdSelector"||nextType==="ClassSelector"||nextType==="AttributeSelector"||nextType==="PseudoClassSelector"||nextType==="PseudoElementSelector"){list.remove(item)}}var TypeSelector$1=cleanTypeSelector;function cleanWhitespace(node,item,list){list.remove(item)}var WhiteSpace$1=cleanWhitespace;const cssTree$j=cjs;const Atrule$2=Atrule$3;const Comment=Comment$1;const Declaration=Declaration$1;const Raw=Raw$1;const Rule=Rule$1;const TypeSelector=TypeSelector$1;const WhiteSpace=WhiteSpace$1;const handlers$2={Atrule:Atrule$2,Comment:Comment,Declaration:Declaration,Raw:Raw,Rule:Rule,TypeSelector:TypeSelector,WhiteSpace:WhiteSpace};function clean(ast,options){cssTree$j.walk(ast,{leave(node,item,list){if(handlers$2.hasOwnProperty(node.type)){handlers$2[node.type].call(this,node,item,list,options)}}})}var clean_1=clean;function compressKeyframes(node){node.block.children.forEach((rule=>{rule.prelude.children.forEach((simpleselector=>{simpleselector.children.forEach(((data,item)=>{if(data.type==="Percentage"&&data.value==="100"){item.data={type:"TypeSelector",loc:data.loc,name:"to"}}else if(data.type==="TypeSelector"&&data.name==="from"){item.data={type:"Percentage",loc:data.loc,value:"0"}}}))}))}))}var keyframes$1=compressKeyframes;const cssTree$i=cjs;const keyframes=keyframes$1;function Atrule$1(node){if(cssTree$i.keyword(node.name).basename==="keyframes"){keyframes(node)}}var Atrule_1=Atrule$1;const blockUnquoteRx=/^(-?\d|--)|[\u0000-\u002c\u002e\u002f\u003A-\u0040\u005B-\u005E\u0060\u007B-\u009f]/;function canUnquote(value){if(value===""||value==="-"){return false}return!blockUnquoteRx.test(value)}function AttributeSelector$1(node){const attrValue=node.value;if(!attrValue||attrValue.type!=="String"){return}if(canUnquote(attrValue.value)){node.value={type:"Identifier",loc:attrValue.loc,name:attrValue.value}}}var AttributeSelector_1=AttributeSelector$1;function compressFont(node){const list=node.children;list.forEachRight((function(node,item){if(node.type==="Identifier"){if(node.name==="bold"){item.data={type:"Number",loc:node.loc,value:"700"}}else if(node.name==="normal"){const prev=item.prev;if(prev&&prev.data.type==="Operator"&&prev.data.value==="/"){this.remove(prev)}this.remove(item)}}}));if(list.isEmpty){list.insert(list.createItem({type:"Identifier",name:"normal"}))}}var font$1=compressFont;function compressFontWeight(node){const value=node.children.head.data;if(value.type==="Identifier"){switch(value.name){case"normal":node.children.head.data={type:"Number",loc:value.loc,value:"400"};break;case"bold":node.children.head.data={type:"Number",loc:value.loc,value:"700"};break}}}var fontWeight$1=compressFontWeight;const cssTree$h=cjs;function compressBackground(node){function flush(){if(!buffer.length){buffer.unshift({type:"Number",loc:null,value:"0"},{type:"Number",loc:null,value:"0"})}newValue.push.apply(newValue,buffer);buffer=[]}let newValue=[];let buffer=[];node.children.forEach((node=>{if(node.type==="Operator"&&node.value===","){flush();newValue.push(node);return}if(node.type==="Identifier"){if(node.name==="transparent"||node.name==="none"||node.name==="repeat"||node.name==="scroll"){return}}buffer.push(node)}));flush();node.children=(new cssTree$h.List).fromArray(newValue)}var background$1=compressBackground;function compressBorder(node){node.children.forEach(((node,item,list)=>{if(node.type==="Identifier"&&node.name.toLowerCase()==="none"){if(list.head===list.tail){item.data={type:"Number",loc:node.loc,value:"0"}}else{list.remove(item)}}}))}var border$1=compressBorder;const cssTree$g=cjs;const font=font$1;const fontWeight=fontWeight$1;const background=background$1;const border=border$1;const handlers$1={font:font,"font-weight":fontWeight,background:background,border:border,outline:border};function compressValue(node){if(!this.declaration){return}const property=cssTree$g.property(this.declaration.property);if(handlers$1.hasOwnProperty(property.basename)){handlers$1[property.basename](node)}}var Value$1=compressValue;var _Number$4={};const OMIT_PLUSSIGN=/^(?:\+|(-))?0*(\d*)(?:\.0*|(\.\d*?)0*)?$/;const KEEP_PLUSSIGN=/^([\+\-])?0*(\d*)(?:\.0*|(\.\d*?)0*)?$/;const unsafeToRemovePlusSignAfter=new Set(["Dimension","Hash","Identifier","Number","Raw","UnicodeRange"]);function packNumber(value,item){const regexp=item&&item.prev!==null&&unsafeToRemovePlusSignAfter.has(item.prev.data.type)?KEEP_PLUSSIGN:OMIT_PLUSSIGN;value=String(value).replace(regexp,"$1$2$3");if(value===""||value==="-"){value="0"}return value}function Number$1(node){node.value=packNumber(node.value)}_Number$4.Number=Number$1;_Number$4.packNumber=packNumber;const _Number$3=_Number$4;const MATH_FUNCTIONS=new Set(["calc","min","max","clamp"]);const LENGTH_UNIT=new Set(["px","mm","cm","in","pt","pc","em","ex","ch","rem","vh","vw","vmin","vmax","vm"]);function compressDimension(node,item){const value=_Number$3.packNumber(node.value);node.value=value;if(value==="0"&&this.declaration!==null&&this.atrulePrelude===null){const unit=node.unit.toLowerCase();if(!LENGTH_UNIT.has(unit)){return}if(this.declaration.property==="-ms-flex"||this.declaration.property==="flex"){return}if(this.function&&MATH_FUNCTIONS.has(this.function.name)){return}item.data={type:"Number",loc:node.loc,value:value}}}var Dimension$1=compressDimension;const cssTree$f=cjs;const _Number$2=_Number$4;const blacklist=new Set(["width","min-width","max-width","height","min-height","max-height","flex","-ms-flex"]);function compressPercentage(node,item){node.value=_Number$2.packNumber(node.value);if(node.value==="0"&&this.declaration&&!blacklist.has(this.declaration.property)){item.data={type:"Number",loc:node.loc,value:node.value};if(!cssTree$f.lexer.matchDeclaration(this.declaration).isType(item.data,"length")){item.data=node}}}var Percentage$1=compressPercentage;function Url$1(node){node.value=node.value.replace(/\\/g,"/")}var Url_1=Url$1;var color$1={};const cssTree$e=cjs;const _Number$1=_Number$4;const NAME_TO_HEX={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgrey:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};const HEX_TO_NAME={8e5:"maroon",800080:"purple",808e3:"olive",808080:"gray","00ffff":"cyan",f0ffff:"azure",f5f5dc:"beige",ffe4c4:"bisque","000000":"black","0000ff":"blue",a52a2a:"brown",ff7f50:"coral",ffd700:"gold","008000":"green","4b0082":"indigo",fffff0:"ivory",f0e68c:"khaki","00ff00":"lime",faf0e6:"linen","000080":"navy",ffa500:"orange",da70d6:"orchid",cd853f:"peru",ffc0cb:"pink",dda0dd:"plum",f00:"red",ff0000:"red",fa8072:"salmon",a0522d:"sienna",c0c0c0:"silver",fffafa:"snow",d2b48c:"tan","008080":"teal",ff6347:"tomato",ee82ee:"violet",f5deb3:"wheat",ffffff:"white",ffff00:"yellow"};function hueToRgb(p,q,t){if(t<0){t+=1}if(t>1){t-=1}if(t<1/6){return p+(q-p)*6*t}if(t<1/2){return q}if(t<2/3){return p+(q-p)*(2/3-t)*6}return p}function hslToRgb(h,s,l,a){let r;let g;let b;if(s===0){r=g=b=l}else{const q=l<.5?l*(1+s):l+s-l*s;const p=2*l-q;r=hueToRgb(p,q,h+1/3);g=hueToRgb(p,q,h);b=hueToRgb(p,q,h-1/3)}return[Math.round(r*255),Math.round(g*255),Math.round(b*255),a]}function toHex(value){value=value.toString(16);return value.length===1?"0"+value:value}function parseFunctionArgs(functionArgs,count,rgb){let cursor=functionArgs.head;let args=[];let wasValue=false;while(cursor!==null){const{type:type,value:value}=cursor.data;switch(type){case"Number":case"Percentage":if(wasValue){return}wasValue=true;args.push({type:type,value:Number(value)});break;case"Operator":if(value===","){if(!wasValue){return}wasValue=false}else if(wasValue||value!=="+"){return}break;default:return}cursor=cursor.next}if(args.length!==count){return}if(args.length===4){if(args[3].type!=="Number"){return}args[3].type="Alpha"}if(rgb){if(args[0].type!==args[1].type||args[0].type!==args[2].type){return}}else{if(args[0].type!=="Number"||args[1].type!=="Percentage"||args[2].type!=="Percentage"){return}args[0].type="Angle"}return args.map((function(arg){let value=Math.max(0,arg.value);switch(arg.type){case"Number":value=Math.min(value,255);break;case"Percentage":value=Math.min(value,100)/100;if(!rgb){return value}value=255*value;break;case"Angle":return(value%360+360)%360/360;case"Alpha":return Math.min(value,1)}return Math.round(value)}))}function compressFunction(node,item){let functionName=node.name;let args;if(functionName==="rgba"||functionName==="hsla"){args=parseFunctionArgs(node.children,4,functionName==="rgba");if(!args){return}if(functionName==="hsla"){args=hslToRgb(...args);node.name="rgba"}if(args[3]===0){const scopeFunctionName=this.function&&this.function.name;if(args[0]===0&&args[1]===0&&args[2]===0||!/^(?:to|from|color-stop)$|gradient$/i.test(scopeFunctionName)){item.data={type:"Identifier",loc:node.loc,name:"transparent"};return}}if(args[3]!==1){node.children.forEach(((node,item,list)=>{if(node.type==="Operator"){if(node.value!==","){list.remove(item)}return}item.data={type:"Number",loc:node.loc,value:_Number$1.packNumber(args.shift())}}));return}functionName="rgb"}if(functionName==="hsl"){args=args||parseFunctionArgs(node.children,3,false);if(!args){return}args=hslToRgb(...args);functionName="rgb"}if(functionName==="rgb"){args=args||parseFunctionArgs(node.children,3,true);if(!args){return}item.data={type:"Hash",loc:node.loc,value:toHex(args[0])+toHex(args[1])+toHex(args[2])};compressHex(item.data,item)}}function compressIdent(node,item){if(this.declaration===null){return}let color=node.name.toLowerCase();if(NAME_TO_HEX.hasOwnProperty(color)&&cssTree$e.lexer.matchDeclaration(this.declaration).isType(node,"color")){const hex=NAME_TO_HEX[color];if(hex.length+1<=color.length){item.data={type:"Hash",loc:node.loc,value:hex}}else{if(color==="grey"){color="gray"}node.name=color}}}function compressHex(node,item){let color=node.value.toLowerCase();if(color.length===6&&color[0]===color[1]&&color[2]===color[3]&&color[4]===color[5]){color=color[0]+color[2]+color[4]}if(HEX_TO_NAME[color]){item.data={type:"Identifier",loc:node.loc,name:HEX_TO_NAME[color]}}else{node.value=color}}color$1.compressFunction=compressFunction;color$1.compressHex=compressHex;color$1.compressIdent=compressIdent;const cssTree$d=cjs;const Atrule=Atrule_1;const AttributeSelector=AttributeSelector_1;const Value=Value$1;const Dimension=Dimension$1;const Percentage=Percentage$1;const _Number=_Number$4;const Url=Url_1;const color=color$1;const handlers={Atrule:Atrule,AttributeSelector:AttributeSelector,Value:Value,Dimension:Dimension,Percentage:Percentage,Number:_Number.Number,Url:Url,Hash:color.compressHex,Identifier:color.compressIdent,Function:color.compressFunction};function replace(ast){cssTree$d.walk(ast,{leave(node,item,list){if(handlers.hasOwnProperty(node.type)){handlers[node.type].call(this,node,item,list)}}})}var replace_1=replace;const cssTree$c=cjs;class Index{constructor(){this.map=new Map}resolve(str){let index=this.map.get(str);if(index===undefined){index=this.map.size+1;this.map.set(str,index)}return index}}function createDeclarationIndexer$1(){const ids=new Index;return function markDeclaration(node){const id=cssTree$c.generate(node);node.id=ids.resolve(id);node.length=id.length;node.fingerprint=null;return node}}var createDeclarationIndexer_1=createDeclarationIndexer$1;const cssTree$b=cjs;function ensureSelectorList(node){if(node.type==="Raw"){return cssTree$b.parse(node.value,{context:"selectorList"})}return node}function maxSpecificity(a,b){for(let i=0;i<3;i++){if(a[i]!==b[i]){return a[i]>b[i]?a:b}}return a}function maxSelectorListSpecificity(selectorList){return ensureSelectorList(selectorList).children.reduce(((result,node)=>maxSpecificity(specificity$4(node),result)),[0,0,0])}function specificity$4(simpleSelector){let A=0;let B=0;let C=0;simpleSelector.children.forEach((node=>{switch(node.type){case"IdSelector":A++;break;case"ClassSelector":case"AttributeSelector":B++;break;case"PseudoClassSelector":switch(node.name.toLowerCase()){case"not":case"has":case"is":case"matches":case"-webkit-any":case"-moz-any":{const[a,b,c]=maxSelectorListSpecificity(node.children.first);A+=a;B+=b;C+=c;break}case"nth-child":case"nth-last-child":{const arg=node.children.first;if(arg.type==="Nth"&&arg.selector){const[a,b,c]=maxSelectorListSpecificity(arg.selector);A+=a;B+=b+1;C+=c}else{B++}break}case"where":break;case"before":case"after":case"first-line":case"first-letter":C++;break;default:B++}break;case"TypeSelector":if(!node.name.endsWith("*")){C++}break;case"PseudoElementSelector":C++;break}}));return[A,B,C]}var specificity_1=specificity$4;const cssTree$a=cjs;const specificity$3=specificity_1;const nonFreezePseudoElements=new Set(["first-letter","first-line","after","before"]);const nonFreezePseudoClasses=new Set(["link","visited","hover","active","first-letter","first-line","after","before"]);function processSelector$2(node,usageData){const pseudos=new Set;node.prelude.children.forEach((function(simpleSelector){let tagName="*";let scope=0;simpleSelector.children.forEach((function(node){switch(node.type){case"ClassSelector":if(usageData&&usageData.scopes){const classScope=usageData.scopes[node.name]||0;if(scope!==0&&classScope!==scope){throw new Error("Selector can't has classes from different scopes: "+cssTree$a.generate(simpleSelector))}scope=classScope}break;case"PseudoClassSelector":{const name=node.name.toLowerCase();if(!nonFreezePseudoClasses.has(name)){pseudos.add(`:${name}`)}break}case"PseudoElementSelector":{const name=node.name.toLowerCase();if(!nonFreezePseudoElements.has(name)){pseudos.add(`::${name}`)}break}case"TypeSelector":tagName=node.name.toLowerCase();break;case"AttributeSelector":if(node.flags){pseudos.add(`[${node.flags.toLowerCase()}]`)}break;case"Combinator":tagName="*";break}}));simpleSelector.compareMarker=specificity$3(simpleSelector).toString();simpleSelector.id=null;simpleSelector.id=cssTree$a.generate(simpleSelector);if(scope){simpleSelector.compareMarker+=":"+scope}if(tagName!=="*"){simpleSelector.compareMarker+=","+tagName}}));node.pseudoSignature=pseudos.size>0?[...pseudos].sort().join(","):false}var processSelector_1=processSelector$2;const cssTree$9=cjs;const createDeclarationIndexer=createDeclarationIndexer_1;const processSelector$1=processSelector_1;function prepare(ast,options){const markDeclaration=createDeclarationIndexer();cssTree$9.walk(ast,{visit:"Rule",enter(node){node.block.children.forEach(markDeclaration);processSelector$1(node,options.usage)}});cssTree$9.walk(ast,{visit:"Atrule",enter(node){if(node.prelude){node.prelude.id=null;node.prelude.id=cssTree$9.generate(node.prelude)}if(cssTree$9.keyword(node.name).basename==="keyframes"){node.block.avoidRulesMerge=true;node.block.children.forEach((function(rule){rule.prelude.children.forEach((function(simpleselector){simpleselector.compareMarker=simpleselector.id}))}))}}});return{declaration:markDeclaration}}var prepare_1=prepare;const cssTree$8=cjs;const{hasOwnProperty:hasOwnProperty$2}=Object.prototype;function addRuleToMap(map,item,list,single){const node=item.data;const name=cssTree$8.keyword(node.name).basename;const id=node.name.toLowerCase()+"/"+(node.prelude?node.prelude.id:null);if(!hasOwnProperty$2.call(map,name)){map[name]=Object.create(null)}if(single){delete map[name][id]}if(!hasOwnProperty$2.call(map[name],id)){map[name][id]=new cssTree$8.List}map[name][id].append(list.remove(item))}function relocateAtrules(ast,options){const collected=Object.create(null);let topInjectPoint=null;ast.children.forEach((function(node,item,list){if(node.type==="Atrule"){const name=cssTree$8.keyword(node.name).basename;switch(name){case"keyframes":addRuleToMap(collected,item,list,true);return;case"media":if(options.forceMediaMerge){addRuleToMap(collected,item,list,false);return}break}if(topInjectPoint===null&&name!=="charset"&&name!=="import"){topInjectPoint=item}}else{if(topInjectPoint===null){topInjectPoint=item}}}));for(const atrule in collected){for(const id in collected[atrule]){ast.children.insertList(collected[atrule][id],atrule==="media"?null:topInjectPoint)}}}function isMediaRule(node){return node.type==="Atrule"&&node.name==="media"}function processAtrule(node,item,list){if(!isMediaRule(node)){return}const prev=item.prev&&item.prev.data;if(!prev||!isMediaRule(prev)){return}if(node.prelude&&prev.prelude&&node.prelude.id===prev.prelude.id){prev.block.children.appendList(node.block.children);list.remove(item)}}function rejoinAtrule(ast,options){relocateAtrules(ast,options);cssTree$8.walk(ast,{visit:"Atrule",reverse:true,enter:processAtrule})}var _1MergeAtrule$1=rejoinAtrule;var utils$6={};const{hasOwnProperty:hasOwnProperty$1}=Object.prototype;function isEqualSelectors(a,b){let cursor1=a.head;let cursor2=b.head;while(cursor1!==null&&cursor2!==null&&cursor1.data.id===cursor2.data.id){cursor1=cursor1.next;cursor2=cursor2.next}return cursor1===null&&cursor2===null}function isEqualDeclarations(a,b){let cursor1=a.head;let cursor2=b.head;while(cursor1!==null&&cursor2!==null&&cursor1.data.id===cursor2.data.id){cursor1=cursor1.next;cursor2=cursor2.next}return cursor1===null&&cursor2===null}function compareDeclarations(declarations1,declarations2){const result={eq:[],ne1:[],ne2:[],ne2overrided:[]};const fingerprints=Object.create(null);const declarations2hash=Object.create(null);for(let cursor=declarations2.head;cursor;cursor=cursor.next){declarations2hash[cursor.data.id]=true}for(let cursor=declarations1.head;cursor;cursor=cursor.next){const data=cursor.data;if(data.fingerprint){fingerprints[data.fingerprint]=data.important}if(declarations2hash[data.id]){declarations2hash[data.id]=false;result.eq.push(data)}else{result.ne1.push(data)}}for(let cursor=declarations2.head;cursor;cursor=cursor.next){const data=cursor.data;if(declarations2hash[data.id]){if(!hasOwnProperty$1.call(fingerprints,data.fingerprint)||!fingerprints[data.fingerprint]&&data.important){result.ne2.push(data)}result.ne2overrided.push(data)}}return result}function addSelectors(dest,source){source.forEach((sourceData=>{const newStr=sourceData.id;let cursor=dest.head;while(cursor){const nextStr=cursor.data.id;if(nextStr===newStr){return}if(nextStr>newStr){break}cursor=cursor.next}dest.insert(dest.createItem(sourceData),cursor)}));return dest}function hasSimilarSelectors(selectors1,selectors2){let cursor1=selectors1.head;while(cursor1!==null){let cursor2=selectors2.head;while(cursor2!==null){if(cursor1.data.compareMarker===cursor2.data.compareMarker){return true}cursor2=cursor2.next}cursor1=cursor1.next}return false}function unsafeToSkipNode(node){switch(node.type){case"Rule":return hasSimilarSelectors(node.prelude.children,this);case"Atrule":if(node.block){return node.block.children.some(unsafeToSkipNode,this)}break;case"Declaration":return false}return true}utils$6.addSelectors=addSelectors;utils$6.compareDeclarations=compareDeclarations;utils$6.hasSimilarSelectors=hasSimilarSelectors;utils$6.isEqualDeclarations=isEqualDeclarations;utils$6.isEqualSelectors=isEqualSelectors;utils$6.unsafeToSkipNode=unsafeToSkipNode;const cssTree$7=cjs;const utils$5=utils$6;function processRule$5(node,item,list){const selectors=node.prelude.children;const declarations=node.block.children;list.prevUntil(item.prev,(function(prev){if(prev.type!=="Rule"){return utils$5.unsafeToSkipNode.call(selectors,prev)}const prevSelectors=prev.prelude.children;const prevDeclarations=prev.block.children;if(node.pseudoSignature===prev.pseudoSignature){if(utils$5.isEqualSelectors(prevSelectors,selectors)){prevDeclarations.appendList(declarations);list.remove(item);return true}if(utils$5.isEqualDeclarations(declarations,prevDeclarations)){utils$5.addSelectors(prevSelectors,selectors);list.remove(item);return true}}return utils$5.hasSimilarSelectors(selectors,prevSelectors)}))}function initialMergeRule(ast){cssTree$7.walk(ast,{visit:"Rule",enter:processRule$5})}var _2InitialMergeRuleset$1=initialMergeRule;const cssTree$6=cjs;function processRule$4(node,item,list){const selectors=node.prelude.children;while(selectors.head!==selectors.tail){const newSelectors=new cssTree$6.List;newSelectors.insert(selectors.remove(selectors.head));list.insert(list.createItem({type:"Rule",loc:node.loc,prelude:{type:"SelectorList",loc:node.prelude.loc,children:newSelectors},block:{type:"Block",loc:node.block.loc,children:node.block.children.copy()},pseudoSignature:node.pseudoSignature}),item)}}function disjoinRule(ast){cssTree$6.walk(ast,{visit:"Rule",reverse:true,enter:processRule$4})}var _3DisjoinRuleset$1=disjoinRule;const cssTree$5=cjs;const REPLACE=1;const REMOVE=2;const TOP=0;const RIGHT=1;const BOTTOM=2;const LEFT=3;const SIDES=["top","right","bottom","left"];const SIDE={"margin-top":"top","margin-right":"right","margin-bottom":"bottom","margin-left":"left","padding-top":"top","padding-right":"right","padding-bottom":"bottom","padding-left":"left","border-top-color":"top","border-right-color":"right","border-bottom-color":"bottom","border-left-color":"left","border-top-width":"top","border-right-width":"right","border-bottom-width":"bottom","border-left-width":"left","border-top-style":"top","border-right-style":"right","border-bottom-style":"bottom","border-left-style":"left"};const MAIN_PROPERTY={margin:"margin","margin-top":"margin","margin-right":"margin","margin-bottom":"margin","margin-left":"margin",padding:"padding","padding-top":"padding","padding-right":"padding","padding-bottom":"padding","padding-left":"padding","border-color":"border-color","border-top-color":"border-color","border-right-color":"border-color","border-bottom-color":"border-color","border-left-color":"border-color","border-width":"border-width","border-top-width":"border-width","border-right-width":"border-width","border-bottom-width":"border-width","border-left-width":"border-width","border-style":"border-style","border-top-style":"border-style","border-right-style":"border-style","border-bottom-style":"border-style","border-left-style":"border-style"};class TRBL{constructor(name){this.name=name;this.loc=null;this.iehack=undefined;this.sides={top:null,right:null,bottom:null,left:null}}getValueSequence(declaration,count){const values=[];let iehack="";const hasBadValues=declaration.value.type!=="Value"||declaration.value.children.some((function(child){let special=false;switch(child.type){case"Identifier":switch(child.name){case"\\0":case"\\9":iehack=child.name;return;case"inherit":case"initial":case"unset":case"revert":special=child.name;break}break;case"Dimension":switch(child.unit){case"rem":case"vw":case"vh":case"vmin":case"vmax":case"vm":special=child.unit;break}break;case"Hash":case"Number":case"Percentage":break;case"Function":if(child.name==="var"){return true}special=child.name;break;default:return true}values.push({node:child,special:special,important:declaration.important})}));if(hasBadValues||values.length>count){return false}if(typeof this.iehack==="string"&&this.iehack!==iehack){return false}this.iehack=iehack;return values}canOverride(side,value){const currentValue=this.sides[side];return!currentValue||value.important&&!currentValue.important}add(name,declaration){function attemptToAdd(){const sides=this.sides;const side=SIDE[name];if(side){if(side in sides===false){return false}const values=this.getValueSequence(declaration,1);if(!values||!values.length){return false}for(const key in sides){if(sides[key]!==null&&sides[key].special!==values[0].special){return false}}if(!this.canOverride(side,values[0])){return true}sides[side]=values[0];return true}else if(name===this.name){const values=this.getValueSequence(declaration,4);if(!values||!values.length){return false}switch(values.length){case 1:values[RIGHT]=values[TOP];values[BOTTOM]=values[TOP];values[LEFT]=values[TOP];break;case 2:values[BOTTOM]=values[TOP];values[LEFT]=values[RIGHT];break;case 3:values[LEFT]=values[RIGHT];break}for(let i=0;i<4;i++){for(const key in sides){if(sides[key]!==null&&sides[key].special!==values[i].special){return false}}}for(let i=0;i<4;i++){if(this.canOverride(SIDES[i],values[i])){sides[SIDES[i]]=values[i]}}return true}}if(!attemptToAdd.call(this)){return false}if(!this.loc){this.loc=declaration.loc}return true}isOkToMinimize(){const top=this.sides.top;const right=this.sides.right;const bottom=this.sides.bottom;const left=this.sides.left;if(top&&right&&bottom&&left){const important=top.important+right.important+bottom.important+left.important;return important===0||important===4}return false}getValue(){const result=new cssTree$5.List;const sides=this.sides;const values=[sides.top,sides.right,sides.bottom,sides.left];const stringValues=[cssTree$5.generate(sides.top.node),cssTree$5.generate(sides.right.node),cssTree$5.generate(sides.bottom.node),cssTree$5.generate(sides.left.node)];if(stringValues[LEFT]===stringValues[RIGHT]){values.pop();if(stringValues[BOTTOM]===stringValues[TOP]){values.pop();if(stringValues[RIGHT]===stringValues[TOP]){values.pop()}}}for(let i=0;i<values.length;i++){result.appendData(values[i].node)}if(this.iehack){result.appendData({type:"Identifier",loc:null,name:this.iehack})}return{type:"Value",loc:null,children:result}}getDeclaration(){return{type:"Declaration",loc:this.loc,important:this.sides.top.important,property:this.name,value:this.getValue()}}}function processRule$3(rule,shorts,shortDeclarations,lastShortSelector){const declarations=rule.block.children;const selector=rule.prelude.children.first.id;rule.block.children.forEachRight((function(declaration,item){const property=declaration.property;if(!MAIN_PROPERTY.hasOwnProperty(property)){return}const key=MAIN_PROPERTY[property];let shorthand;let operation;if(!lastShortSelector||selector===lastShortSelector){if(key in shorts){operation=REMOVE;shorthand=shorts[key]}}if(!shorthand||!shorthand.add(property,declaration)){operation=REPLACE;shorthand=new TRBL(key);if(!shorthand.add(property,declaration)){lastShortSelector=null;return}}shorts[key]=shorthand;shortDeclarations.push({operation:operation,block:declarations,item:item,shorthand:shorthand});lastShortSelector=selector}));return lastShortSelector}function processShorthands(shortDeclarations,markDeclaration){shortDeclarations.forEach((function(item){const shorthand=item.shorthand;if(!shorthand.isOkToMinimize()){return}if(item.operation===REPLACE){item.item.data=markDeclaration(shorthand.getDeclaration())}else{item.block.remove(item.item)}}))}function restructBlock$1(ast,indexer){const stylesheetMap={};const shortDeclarations=[];cssTree$5.walk(ast,{visit:"Rule",reverse:true,enter(node){const stylesheet=this.block||this.stylesheet;const ruleId=(node.pseudoSignature||"")+"|"+node.prelude.children.first.id;let ruleMap;let shorts;if(!stylesheetMap.hasOwnProperty(stylesheet.id)){ruleMap={lastShortSelector:null};stylesheetMap[stylesheet.id]=ruleMap}else{ruleMap=stylesheetMap[stylesheet.id]}if(ruleMap.hasOwnProperty(ruleId)){shorts=ruleMap[ruleId]}else{shorts={};ruleMap[ruleId]=shorts}ruleMap.lastShortSelector=processRule$3.call(this,node,shorts,shortDeclarations,ruleMap.lastShortSelector)}});processShorthands(shortDeclarations,indexer.declaration)}var _4RestructShorthand$1=restructBlock$1;const cssTree$4=cjs;let fingerprintId=1;const dontRestructure=new Set(["src"]);const DONT_MIX_VALUE={display:/table|ruby|flex|-(flex)?box$|grid|contents|run-in/i,"text-align":/^(start|end|match-parent|justify-all)$/i};const SAFE_VALUES={cursor:["auto","crosshair","default","move","text","wait","help","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","pointer","progress","not-allowed","no-drop","vertical-text","all-scroll","col-resize","row-resize"],overflow:["hidden","visible","scroll","auto"],position:["static","relative","absolute","fixed"]};const NEEDLESS_TABLE={"border-width":["border"],"border-style":["border"],"border-color":["border"],"border-top":["border"],"border-right":["border"],"border-bottom":["border"],"border-left":["border"],"border-top-width":["border-top","border-width","border"],"border-right-width":["border-right","border-width","border"],"border-bottom-width":["border-bottom","border-width","border"],"border-left-width":["border-left","border-width","border"],"border-top-style":["border-top","border-style","border"],"border-right-style":["border-right","border-style","border"],"border-bottom-style":["border-bottom","border-style","border"],"border-left-style":["border-left","border-style","border"],"border-top-color":["border-top","border-color","border"],"border-right-color":["border-right","border-color","border"],"border-bottom-color":["border-bottom","border-color","border"],"border-left-color":["border-left","border-color","border"],"margin-top":["margin"],"margin-right":["margin"],"margin-bottom":["margin"],"margin-left":["margin"],"padding-top":["padding"],"padding-right":["padding"],"padding-bottom":["padding"],"padding-left":["padding"],"font-style":["font"],"font-variant":["font"],"font-weight":["font"],"font-size":["font"],"font-family":["font"],"list-style-type":["list-style"],"list-style-position":["list-style"],"list-style-image":["list-style"]};function getPropertyFingerprint(propertyName,declaration,fingerprints){const realName=cssTree$4.property(propertyName).basename;if(realName==="background"){return propertyName+":"+cssTree$4.generate(declaration.value)}const declarationId=declaration.id;let fingerprint=fingerprints[declarationId];if(!fingerprint){switch(declaration.value.type){case"Value":const special={};let vendorId="";let iehack="";let raw=false;declaration.value.children.forEach((function walk(node){switch(node.type){case"Value":case"Brackets":case"Parentheses":node.children.forEach(walk);break;case"Raw":raw=true;break;case"Identifier":{const{name:name}=node;if(!vendorId){vendorId=cssTree$4.keyword(name).vendor}if(/\\[09]/.test(name)){iehack=RegExp.lastMatch}if(SAFE_VALUES.hasOwnProperty(realName)){if(SAFE_VALUES[realName].indexOf(name)===-1){special[name]=true}}else if(DONT_MIX_VALUE.hasOwnProperty(realName)){if(DONT_MIX_VALUE[realName].test(name)){special[name]=true}}break}case"Function":{let{name:name}=node;if(!vendorId){vendorId=cssTree$4.keyword(name).vendor}if(name==="rect"){const hasComma=node.children.some((node=>node.type==="Operator"&&node.value===","));if(!hasComma){name="rect-backward"}}special[name+"()"]=true;node.children.forEach(walk);break}case"Dimension":{const{unit:unit}=node;if(/\\[09]/.test(unit)){iehack=RegExp.lastMatch}switch(unit){case"rem":case"vw":case"vh":case"vmin":case"vmax":case"vm":special[unit]=true;break}break}}}));fingerprint=raw?"!"+fingerprintId++:"!"+Object.keys(special).sort()+"|"+iehack+vendorId;break;case"Raw":fingerprint="!"+declaration.value.value;break;default:fingerprint=cssTree$4.generate(declaration.value)}fingerprints[declarationId]=fingerprint}return propertyName+fingerprint}function needless(props,declaration,fingerprints){const property=cssTree$4.property(declaration.property);if(NEEDLESS_TABLE.hasOwnProperty(property.basename)){const table=NEEDLESS_TABLE[property.basename];for(const entry of table){const ppre=getPropertyFingerprint(property.prefix+entry,declaration,fingerprints);const prev=props.hasOwnProperty(ppre)?props[ppre]:null;if(prev&&(!declaration.important||prev.item.data.important)){return prev}}}}function processRule$2(rule,item,list,props,fingerprints){const declarations=rule.block.children;declarations.forEachRight((function(declaration,declarationItem){const{property:property}=declaration;const fingerprint=getPropertyFingerprint(property,declaration,fingerprints);const prev=props[fingerprint];if(prev&&!dontRestructure.has(property)){if(declaration.important&&!prev.item.data.important){props[fingerprint]={block:declarations,item:declarationItem};prev.block.remove(prev.item)}else{declarations.remove(declarationItem)}}else{const prev=needless(props,declaration,fingerprints);if(prev){declarations.remove(declarationItem)}else{declaration.fingerprint=fingerprint;props[fingerprint]={block:declarations,item:declarationItem}}}}));if(declarations.isEmpty){list.remove(item)}}function restructBlock(ast){const stylesheetMap={};const fingerprints=Object.create(null);cssTree$4.walk(ast,{visit:"Rule",reverse:true,enter(node,item,list){const stylesheet=this.block||this.stylesheet;const ruleId=(node.pseudoSignature||"")+"|"+node.prelude.children.first.id;let ruleMap;let props;if(!stylesheetMap.hasOwnProperty(stylesheet.id)){ruleMap={};stylesheetMap[stylesheet.id]=ruleMap}else{ruleMap=stylesheetMap[stylesheet.id]}if(ruleMap.hasOwnProperty(ruleId)){props=ruleMap[ruleId]}else{props={};ruleMap[ruleId]=props}processRule$2.call(this,node,item,list,props,fingerprints)}})}var _6RestructBlock$1=restructBlock;const cssTree$3=cjs;const utils$4=utils$6;function processRule$1(node,item,list){const selectors=node.prelude.children;const declarations=node.block.children;const nodeCompareMarker=selectors.first.compareMarker;const skippedCompareMarkers={};list.nextUntil(item.next,(function(next,nextItem){if(next.type!=="Rule"){return utils$4.unsafeToSkipNode.call(selectors,next)}if(node.pseudoSignature!==next.pseudoSignature){return true}const nextFirstSelector=next.prelude.children.head;const nextDeclarations=next.block.children;const nextCompareMarker=nextFirstSelector.data.compareMarker;if(nextCompareMarker in skippedCompareMarkers){return true}if(selectors.head===selectors.tail){if(selectors.first.id===nextFirstSelector.data.id){declarations.appendList(nextDeclarations);list.remove(nextItem);return}}if(utils$4.isEqualDeclarations(declarations,nextDeclarations)){const nextStr=nextFirstSelector.data.id;selectors.some(((data,item)=>{const curStr=data.id;if(nextStr<curStr){selectors.insert(nextFirstSelector,item);return true}if(!item.next){selectors.insert(nextFirstSelector);return true}}));list.remove(nextItem);return}if(nextCompareMarker===nodeCompareMarker){return true}skippedCompareMarkers[nextCompareMarker]=true}))}function mergeRule(ast){cssTree$3.walk(ast,{visit:"Rule",enter:processRule$1})}var _7MergeRuleset$1=mergeRule;const cssTree$2=cjs;const utils$3=utils$6;function calcSelectorLength(list){return list.reduce(((res,data)=>res+data.id.length+1),0)-1}function calcDeclarationsLength(tokens){let length=0;for(const token of tokens){length+=token.length}return length+tokens.length-1}function processRule(node,item,list){const avoidRulesMerge=this.block!==null?this.block.avoidRulesMerge:false;const selectors=node.prelude.children;const block=node.block;const disallowDownMarkers=Object.create(null);let allowMergeUp=true;let allowMergeDown=true;list.prevUntil(item.prev,(function(prev,prevItem){const prevBlock=prev.block;const prevType=prev.type;if(prevType!=="Rule"){const unsafe=utils$3.unsafeToSkipNode.call(selectors,prev);if(!unsafe&&prevType==="Atrule"&&prevBlock){cssTree$2.walk(prevBlock,{visit:"Rule",enter(node){node.prelude.children.forEach((data=>{disallowDownMarkers[data.compareMarker]=true}))}})}return unsafe}if(node.pseudoSignature!==prev.pseudoSignature){return true}const prevSelectors=prev.prelude.children;allowMergeDown=!prevSelectors.some((selector=>selector.compareMarker in disallowDownMarkers));if(!allowMergeDown&&!allowMergeUp){return true}if(allowMergeUp&&utils$3.isEqualSelectors(prevSelectors,selectors)){prevBlock.children.appendList(block.children);list.remove(item);return true}const diff=utils$3.compareDeclarations(block.children,prevBlock.children);if(diff.eq.length){if(!diff.ne1.length&&!diff.ne2.length){if(allowMergeDown){utils$3.addSelectors(selectors,prevSelectors);list.remove(prevItem)}return true}else if(!avoidRulesMerge){if(diff.ne1.length&&!diff.ne2.length){const selectorLength=calcSelectorLength(selectors);const blockLength=calcDeclarationsLength(diff.eq);if(allowMergeUp&&selectorLength<blockLength){utils$3.addSelectors(prevSelectors,selectors);block.children.fromArray(diff.ne1)}}else if(!diff.ne1.length&&diff.ne2.length){const selectorLength=calcSelectorLength(prevSelectors);const blockLength=calcDeclarationsLength(diff.eq);if(allowMergeDown&&selectorLength<blockLength){utils$3.addSelectors(selectors,prevSelectors);prevBlock.children.fromArray(diff.ne2)}}else{const newSelector={type:"SelectorList",loc:null,children:utils$3.addSelectors(prevSelectors.copy(),selectors)};const newBlockLength=calcSelectorLength(newSelector.children)+2;const blockLength=calcDeclarationsLength(diff.eq);if(blockLength>=newBlockLength){const newItem=list.createItem({type:"Rule",loc:null,prelude:newSelector,block:{type:"Block",loc:null,children:(new cssTree$2.List).fromArray(diff.eq)},pseudoSignature:node.pseudoSignature});block.children.fromArray(diff.ne1);prevBlock.children.fromArray(diff.ne2overrided);if(allowMergeUp){list.insert(newItem,prevItem)}else{list.insert(newItem,item)}return true}}}}if(allowMergeUp){allowMergeUp=!prevSelectors.some((prevSelector=>selectors.some((selector=>selector.compareMarker===prevSelector.compareMarker))))}prevSelectors.forEach((data=>{disallowDownMarkers[data.compareMarker]=true}))}))}function restructRule(ast){cssTree$2.walk(ast,{visit:"Rule",reverse:true,enter:processRule})}var _8RestructRuleset$1=restructRule;const index$3=prepare_1;const _1MergeAtrule=_1MergeAtrule$1;const _2InitialMergeRuleset=_2InitialMergeRuleset$1;const _3DisjoinRuleset=_3DisjoinRuleset$1;const _4RestructShorthand=_4RestructShorthand$1;const _6RestructBlock=_6RestructBlock$1;const _7MergeRuleset=_7MergeRuleset$1;const _8RestructRuleset=_8RestructRuleset$1;function restructure(ast,options){const indexer=index$3(ast,options);options.logger("prepare",ast);_1MergeAtrule(ast,options);options.logger("mergeAtrule",ast);_2InitialMergeRuleset(ast);options.logger("initialMergeRuleset",ast);_3DisjoinRuleset(ast);options.logger("disjoinRuleset",ast);_4RestructShorthand(ast,indexer);options.logger("restructShorthand",ast);_6RestructBlock(ast);options.logger("restructBlock",ast);_7MergeRuleset(ast);options.logger("mergeRuleset",ast);_8RestructRuleset(ast);options.logger("restructRuleset",ast)}var restructure_1=restructure;const cssTree$1=cjs;const usage=usage$1;const index=clean_1;const index$1=replace_1;const index$2=restructure_1;function readChunk(input,specialComments){const children=new cssTree$1.List;let nonSpaceTokenInBuffer=false;let protectedComment;input.nextUntil(input.head,((node,item,list)=>{if(node.type==="Comment"){if(!specialComments||node.value.charAt(0)!=="!"){list.remove(item);return}if(nonSpaceTokenInBuffer||protectedComment){return true}list.remove(item);protectedComment=node;return}if(node.type!=="WhiteSpace"){nonSpaceTokenInBuffer=true}children.insert(list.remove(item))}));return{comment:protectedComment,stylesheet:{type:"StyleSheet",loc:null,children:children}}}function compressChunk(ast,firstAtrulesAllowed,num,options){options.logger(`Compress block #${num}`,null,true);let seed=1;if(ast.type==="StyleSheet"){ast.firstAtrulesAllowed=firstAtrulesAllowed;ast.id=seed++}cssTree$1.walk(ast,{visit:"Atrule",enter(node){if(node.block!==null){node.block.id=seed++}}});options.logger("init",ast);index(ast,options);options.logger("clean",ast);index$1(ast);options.logger("replace",ast);if(options.restructuring){index$2(ast,options)}return ast}function getCommentsOption(options){let comments="comments"in options?options.comments:"exclamation";if(typeof comments==="boolean"){comments=comments?"exclamation":false}else if(comments!=="exclamation"&&comments!=="first-exclamation"){comments=false}return comments}function getRestructureOption(options){if("restructure"in options){return options.restructure}return"restructuring"in options?options.restructuring:true}function wrapBlock(block){return(new cssTree$1.List).appendData({type:"Rule",loc:null,prelude:{type:"SelectorList",loc:null,children:(new cssTree$1.List).appendData({type:"Selector",loc:null,children:(new cssTree$1.List).appendData({type:"TypeSelector",loc:null,name:"x"})})},block:block})}function compress$2(ast,options){ast=ast||{type:"StyleSheet",loc:null,children:new cssTree$1.List};options=options||{};const compressOptions={logger:typeof options.logger==="function"?options.logger:function(){},restructuring:getRestructureOption(options),forceMediaMerge:Boolean(options.forceMediaMerge),usage:options.usage?usage.buildIndex(options.usage):false};const output=new cssTree$1.List;let specialComments=getCommentsOption(options);let firstAtrulesAllowed=true;let input;let chunk;let chunkNum=1;let chunkChildren;if(options.clone){ast=cssTree$1.clone(ast)}if(ast.type==="StyleSheet"){input=ast.children;ast.children=output}else{input=wrapBlock(ast)}do{chunk=readChunk(input,Boolean(specialComments));compressChunk(chunk.stylesheet,firstAtrulesAllowed,chunkNum++,compressOptions);chunkChildren=chunk.stylesheet.children;if(chunk.comment){if(!output.isEmpty){output.insert(cssTree$1.List.createItem({type:"Raw",value:"\n"}))}output.insert(cssTree$1.List.createItem(chunk.comment));if(!chunkChildren.isEmpty){output.insert(cssTree$1.List.createItem({type:"Raw",value:"\n"}))}}if(firstAtrulesAllowed&&!chunkChildren.isEmpty){const lastRule=chunkChildren.last;if(lastRule.type!=="Atrule"||lastRule.name!=="import"&&lastRule.name!=="charset"){firstAtrulesAllowed=false}}if(specialComments!=="exclamation"){specialComments=false}output.appendList(chunkChildren)}while(!input.isEmpty);return{ast:ast}}var compress_1=compress$2;const cssTree=cjs;const compress$1=compress_1;const specificity$2=specificity_1;function encodeString(value){const stringApostrophe=cssTree.string.encode(value,true);const stringQuote=cssTree.string.encode(value);return stringApostrophe.length<stringQuote.length?stringApostrophe:stringQuote}const{lexer:lexer,tokenize:tokenize,parse:parse$1,generate:generate$1,walk:walk,find:find,findLast:findLast,findAll:findAll,fromPlainObject:fromPlainObject,toPlainObject:toPlainObject}=cssTree.fork({node:{String:{generate(node){this.token(cssTree.tokenTypes.String,encodeString(node.value))}},Url:{generate(node){const encodedUrl=cssTree.url.encode(node.value);const string=encodeString(node.value);this.token(cssTree.tokenTypes.Url,encodedUrl.length<=string.length+5?encodedUrl:"url("+string+")")}}}});syntax$2.compress=compress$1;syntax$2.specificity=specificity$2;syntax$2.find=find;syntax$2.findAll=findAll;syntax$2.findLast=findLast;syntax$2.fromPlainObject=fromPlainObject;syntax$2.generate=generate$1;syntax$2.lexer=lexer;syntax$2.parse=parse$1;syntax$2.toPlainObject=toPlainObject;syntax$2.tokenize=tokenize;syntax$2.walk=walk;var utils$2={};const processSelector=processSelector_1;const utils$1=utils$6;utils$2.processSelector=processSelector;utils$2.addSelectors=utils$1.addSelectors;utils$2.compareDeclarations=utils$1.compareDeclarations;utils$2.hasSimilarSelectors=utils$1.hasSimilarSelectors;utils$2.isEqualDeclarations=utils$1.isEqualDeclarations;utils$2.isEqualSelectors=utils$1.isEqualSelectors;utils$2.unsafeToSkipNode=utils$1.unsafeToSkipNode;const version=version$3;const syntax=syntax$2;const utils=utils$2;const{parse:parse,generate:generate,compress:compress}=syntax;function debugOutput(name,options,startTime,data){if(options.debug){console.error(`## ${name} done in %d ms\n`,Date.now()-startTime)}return data}function createDefaultLogger(level){let lastDebug;return function logger(title,ast){let line=title;if(ast){line=`[${((Date.now()-lastDebug)/1e3).toFixed(3)}s] ${line}`}if(level>1&&ast){let css=generate(ast);if(level===2&&css.length>256){css=css.substr(0,256)+"..."}line+=`\n ${css}\n`}console.error(line);lastDebug=Date.now()}}function buildCompressOptions(options){options={...options};if(typeof options.logger!=="function"&&options.debug){options.logger=createDefaultLogger(options.debug)}return options}function runHandler(ast,options,handlers){if(!Array.isArray(handlers)){handlers=[handlers]}handlers.forEach((fn=>fn(ast,options)))}function minify(context,source,options){options=options||{};const filename=options.filename||"<unknown>";let result;const ast=debugOutput("parsing",options,Date.now(),parse(source,{context:context,filename:filename,positions:Boolean(options.sourceMap)}));if(options.beforeCompress){debugOutput("beforeCompress",options,Date.now(),runHandler(ast,options,options.beforeCompress))}const compressResult=debugOutput("compress",options,Date.now(),compress(ast,buildCompressOptions(options)));if(options.afterCompress){debugOutput("afterCompress",options,Date.now(),runHandler(compressResult,options,options.afterCompress))}if(options.sourceMap){result=debugOutput("generate(sourceMap: true)",options,Date.now(),(()=>{const tmp=generate(compressResult.ast,{sourceMap:true});tmp.map._file=filename;tmp.map.setSourceContent(filename,source);return tmp})())}else{result=debugOutput("generate",options,Date.now(),{css:generate(compressResult.ast),map:null})}return result}function minifyStylesheet(source,options){return minify("stylesheet",source,options)}function minifyBlock(source,options){return minify("declarationList",source,options)}cjs$1.version=version.version;cjs$1.syntax=syntax;cjs$1.utils=utils;cjs$1.minify=minifyStylesheet;cjs$1.minifyBlock=minifyBlock;var style={};const csstree$3=cjs$2;const csswhat=require$$1;const{syntax:{specificity:specificity$1}}=cjs$1;const{visit:visit$5,matches:matches}=xast;const{attrsGroups:attrsGroups$7,inheritableAttrs:inheritableAttrs$3,presentationNonInheritableGroupAttrs:presentationNonInheritableGroupAttrs$2}=_collections;const csstreeWalkSkip=csstree$3.walk.skip;const parseRule=(ruleNode,dynamic)=>{const declarations=[];ruleNode.block.children.forEach((cssNode=>{if(cssNode.type==="Declaration"){declarations.push({name:cssNode.property,value:csstree$3.generate(cssNode.value),important:cssNode.important===true})}}));const rules=[];csstree$3.walk(ruleNode.prelude,(node=>{if(node.type==="Selector"){const newNode=csstree$3.clone(node);let hasPseudoClasses=false;csstree$3.walk(newNode,((pseudoClassNode,item,list)=>{if(pseudoClassNode.type==="PseudoClassSelector"){hasPseudoClasses=true;list.remove(item)}}));rules.push({specificity:specificity$1(node),dynamic:hasPseudoClasses||dynamic,selector:csstree$3.generate(newNode),declarations:declarations})}}));return rules};const parseStylesheet=(css,dynamic)=>{const rules=[];const ast=csstree$3.parse(css,{parseValue:false,parseAtrulePrelude:false});csstree$3.walk(ast,(cssNode=>{if(cssNode.type==="Rule"){rules.push(...parseRule(cssNode,dynamic||false));return csstreeWalkSkip}if(cssNode.type==="Atrule"){if(cssNode.name==="keyframes"||cssNode.name==="-webkit-keyframes"){return csstreeWalkSkip}csstree$3.walk(cssNode,(ruleNode=>{if(ruleNode.type==="Rule"){rules.push(...parseRule(ruleNode,dynamic||true));return csstreeWalkSkip}}));return csstreeWalkSkip}}));return rules};const parseStyleDeclarations=css=>{const declarations=[];const ast=csstree$3.parse(css,{context:"declarationList",parseValue:false});csstree$3.walk(ast,(cssNode=>{if(cssNode.type==="Declaration"){declarations.push({name:cssNode.property,value:csstree$3.generate(cssNode.value),important:cssNode.important===true})}}));return declarations};const computeOwnStyle=(stylesheet,node)=>{const computedStyle={};const importantStyles=new Map;for(const[name,value]of Object.entries(node.attributes)){if(attrsGroups$7.presentation.has(name)){computedStyle[name]={type:"static",inherited:false,value:value};importantStyles.set(name,false)}}for(const{selector:selector,declarations:declarations,dynamic:dynamic}of stylesheet.rules){if(matches(node,selector)){for(const{name:name,value:value,important:important}of declarations){const computed=computedStyle[name];if(computed&&computed.type==="dynamic"){continue}if(dynamic){computedStyle[name]={type:"dynamic",inherited:false};continue}if(computed==null||important===true||importantStyles.get(name)===false){computedStyle[name]={type:"static",inherited:false,value:value};importantStyles.set(name,important)}}}}const styleDeclarations=node.attributes.style==null?[]:parseStyleDeclarations(node.attributes.style);for(const{name:name,value:value,important:important}of styleDeclarations){const computed=computedStyle[name];if(computed&&computed.type==="dynamic"){continue}if(computed==null||important===true||importantStyles.get(name)===false){computedStyle[name]={type:"static",inherited:false,value:value};importantStyles.set(name,important)}}return computedStyle};const compareSpecificity$1=(a,b)=>{for(let i=0;i<4;i+=1){if(a[i]<b[i]){return-1}else if(a[i]>b[i]){return 1}}return 0};style.compareSpecificity=compareSpecificity$1;const collectStylesheet$8=root=>{const rules=[];const parents=new Map;visit$5(root,{element:{enter:(node,parentNode)=>{parents.set(node,parentNode);if(node.name!=="style"){return}if(node.attributes.type==null||node.attributes.type===""||node.attributes.type==="text/css"){const dynamic=node.attributes.media!=null&&node.attributes.media!=="all";for(const child of node.children){if(child.type==="text"||child.type==="cdata"){rules.push(...parseStylesheet(child.value,dynamic))}}}}}});rules.sort(((a,b)=>compareSpecificity$1(a.specificity,b.specificity)));return{rules:rules,parents:parents}};style.collectStylesheet=collectStylesheet$8;const computeStyle$7=(stylesheet,node)=>{const{parents:parents}=stylesheet;const computedStyles=computeOwnStyle(stylesheet,node);let parent=parents.get(node);while(parent!=null&&parent.type!=="root"){const inheritedStyles=computeOwnStyle(stylesheet,parent);for(const[name,computed]of Object.entries(inheritedStyles)){if(computedStyles[name]==null&&inheritableAttrs$3.has(name)&&!presentationNonInheritableGroupAttrs$2.has(name)){computedStyles[name]={...computed,inherited:true}}}parent=parents.get(parent)}return computedStyles};style.computeStyle=computeStyle$7;const includesAttrSelector$1=(selector,name,value=null,traversed=false)=>{const selectors=typeof selector==="string"?csswhat.parse(selector):csswhat.parse(csstree$3.generate(selector.data));for(const subselector of selectors){const hasAttrSelector=subselector.some(((segment,index)=>{if(traversed){if(index===subselector.length-1){return false}const isNextTraversal=csswhat.isTraversal(subselector[index+1]);if(!isNextTraversal){return false}}if(segment.type!=="attribute"||segment.name!==name){return false}return value==null?true:segment.value===value}));if(hasAttrSelector){return true}}return false};style.includesAttrSelector=includesAttrSelector$1;const csstree$2=cjs$2;const{syntax:{specificity:specificity}}=cjs$1;const{visitSkip:visitSkip$5,querySelectorAll:querySelectorAll$3,detachNodeFromParent:detachNodeFromParent$h}=xast;const{compareSpecificity:compareSpecificity,includesAttrSelector:includesAttrSelector}=style;const{attrsGroups:attrsGroups$6,pseudoClasses:pseudoClasses}=_collections;inlineStyles$1.name="inlineStyles";inlineStyles$1.description="inline styles (additional options)";const preservedPseudos=[...pseudoClasses.functional,...pseudoClasses.treeStructural];inlineStyles$1.fn=(root,params)=>{const{onlyMatchedOnce:onlyMatchedOnce=true,removeMatchedSelectors:removeMatchedSelectors=true,useMqs:useMqs=["","screen"],usePseudos:usePseudos=[""]}=params;const styles=[];let selectors=[];return{element:{enter:(node,parentNode)=>{if(node.name==="foreignObject"){return visitSkip$5}if(node.name!=="style"||node.children.length===0){return}if(node.attributes.type!=null&&node.attributes.type!==""&&node.attributes.type!=="text/css"){return}const cssText=node.children.filter((child=>child.type==="text"||child.type==="cdata")).map((child=>child.value)).join("");let cssAst=null;try{cssAst=csstree$2.parse(cssText,{parseValue:false,parseCustomProperty:false})}catch{return}if(cssAst.type==="StyleSheet"){styles.push({node:node,parentNode:parentNode,cssAst:cssAst})}csstree$2.walk(cssAst,{visit:"Rule",enter(node){const atrule=this.atrule;let mediaQuery="";if(atrule!=null){mediaQuery=atrule.name;if(atrule.prelude!=null){mediaQuery+=` ${csstree$2.generate(atrule.prelude)}`}}if(!useMqs.includes(mediaQuery)){return}if(node.prelude.type==="SelectorList"){node.prelude.children.forEach(((childNode,item)=>{if(childNode.type==="Selector"){const pseudos=[];childNode.children.forEach(((grandchildNode,grandchildItem,grandchildList)=>{const isPseudo=grandchildNode.type==="PseudoClassSelector"||grandchildNode.type==="PseudoElementSelector";if(isPseudo&&!preservedPseudos.includes(grandchildNode.name)){pseudos.push({item:grandchildItem,list:grandchildList})}}));const pseudoSelectors=csstree$2.generate({type:"Selector",children:(new csstree$2.List).fromArray(pseudos.map((pseudo=>pseudo.item.data)))});if(usePseudos.includes(pseudoSelectors)){for(const pseudo of pseudos){pseudo.list.remove(pseudo.item)}}selectors.push({node:childNode,rule:node,item:item})}}))}}})}},root:{exit:()=>{if(styles.length===0){return}const sortedSelectors=selectors.slice().sort(((a,b)=>{const aSpecificity=specificity(a.item.data);const bSpecificity=specificity(b.item.data);return compareSpecificity(aSpecificity,bSpecificity)})).reverse();for(const selector of sortedSelectors){const selectorText=csstree$2.generate(selector.item.data);const matchedElements=[];try{for(const node of querySelectorAll$3(root,selectorText)){if(node.type==="element"){matchedElements.push(node)}}}catch(selectError){continue}if(matchedElements.length===0){continue}if(onlyMatchedOnce&&matchedElements.length>1){continue}for(const selectedEl of matchedElements){const styleDeclarationList=csstree$2.parse(selectedEl.attributes.style??"",{context:"declarationList",parseValue:false});if(styleDeclarationList.type!=="DeclarationList"){continue}const styleDeclarationItems=new Map;let firstListItem;csstree$2.walk(styleDeclarationList,{visit:"Declaration",enter(node,item){if(firstListItem==null){firstListItem=item}styleDeclarationItems.set(node.property.toLowerCase(),item)}});csstree$2.walk(selector.rule,{visit:"Declaration",enter(ruleDeclaration){const property=ruleDeclaration.property;if(attrsGroups$6.presentation.has(property)&&!selectors.some((selector=>includesAttrSelector(selector.item,property)))){delete selectedEl.attributes[property]}const matchedItem=styleDeclarationItems.get(property);const ruleDeclarationItem=styleDeclarationList.children.createItem(ruleDeclaration);if(matchedItem==null){styleDeclarationList.children.insert(ruleDeclarationItem,firstListItem)}else if(matchedItem.data.important!==true&&ruleDeclaration.important===true){styleDeclarationList.children.replace(matchedItem,ruleDeclarationItem);styleDeclarationItems.set(property,ruleDeclarationItem)}}});const newStyles=csstree$2.generate(styleDeclarationList);if(newStyles.length!==0){selectedEl.attributes.style=newStyles}}if(removeMatchedSelectors&&matchedElements.length!==0&&selector.rule.prelude.type==="SelectorList"){selector.rule.prelude.children.remove(selector.item)}selector.matchedElements=matchedElements}if(!removeMatchedSelectors){return}for(const selector of sortedSelectors){if(selector.matchedElements==null){continue}if(onlyMatchedOnce&&selector.matchedElements.length>1){continue}for(const selectedEl of selector.matchedElements){const classList=new Set(selectedEl.attributes.class==null?null:selectedEl.attributes.class.split(" "));for(const child of selector.node.children){if(child.type==="ClassSelector"&&!selectors.some((selector=>includesAttrSelector(selector.item,"class",child.name,true)))){classList.delete(child.name)}}if(classList.size===0){delete selectedEl.attributes.class}else{selectedEl.attributes.class=Array.from(classList).join(" ")}const firstSubSelector=selector.node.children.first;if(firstSubSelector?.type==="IdSelector"&&selectedEl.attributes.id===firstSubSelector.name&&!selectors.some((selector=>includesAttrSelector(selector.item,"id",firstSubSelector.name,true)))){delete selectedEl.attributes.id}}}for(const style of styles){csstree$2.walk(style.cssAst,{visit:"Rule",enter:function(node,item,list){if(node.type==="Rule"&&node.prelude.type==="SelectorList"&&node.prelude.children.isEmpty){list.remove(item)}}});if(style.cssAst.children.isEmpty){detachNodeFromParent$h(style.node,style.parentNode)}else{const firstChild=style.node.children[0];if(firstChild.type==="text"||firstChild.type==="cdata"){firstChild.value=csstree$2.generate(style.cssAst)}}}}}}};var minifyStyles$1={};var tools={};const{attrsGroups:attrsGroups$5,referencesProps:referencesProps$3}=_collections;const regReferencesUrl=/\burl\((["'])?#(.+?)\1\)/g;const regReferencesHref=/^#(.+?)$/;const regReferencesBegin=/(\w+)\.[a-zA-Z]/;tools.encodeSVGDatauri=(str,type)=>{var prefix="data:image/svg+xml";if(!type||type==="base64"){prefix+=";base64,";str=prefix+Buffer.from(str).toString("base64")}else if(type==="enc"){str=prefix+","+encodeURIComponent(str)}else if(type==="unenc"){str=prefix+","+str}return str};tools.decodeSVGDatauri=str=>{var regexp=/data:image\/svg\+xml(;charset=[^;,]*)?(;base64)?,(.*)/;var match=regexp.exec(str);if(!match)return str;var data=match[3];if(match[2]){str=Buffer.from(data,"base64").toString("utf8")}else if(data.charAt(0)==="%"){str=decodeURIComponent(data)}else if(data.charAt(0)==="<"){str=data}return str};tools.cleanupOutData=(data,params,command)=>{let str="";let delimiter;let prev;data.forEach(((item,i)=>{delimiter=" ";if(i==0)delimiter="";if(params.noSpaceAfterFlags&&(command=="A"||command=="a")){var pos=i%7;if(pos==4||pos==5)delimiter=""}const itemStr=params.leadingZero?removeLeadingZero$4(item):item.toString();if(params.negativeExtraSpace&&delimiter!=""&&(item<0||itemStr.charAt(0)==="."&&prev%1!==0)){delimiter=""}prev=item;str+=delimiter+itemStr}));return str};const removeLeadingZero$4=value=>{const strValue=value.toString();if(0<value&&value<1&&strValue.startsWith("0")){return strValue.slice(1)}if(-1<value&&value<0&&strValue[1]==="0"){return strValue[0]+strValue.slice(2)}return strValue};tools.removeLeadingZero=removeLeadingZero$4;const hasScripts$4=node=>{if(node.name==="script"&&node.children.length!==0){return true}if(node.name==="a"){const hasJsLinks=Object.entries(node.attributes).some((([attrKey,attrValue])=>(attrKey==="href"||attrKey.endsWith(":href"))&&attrValue!=null&&attrValue.trimStart().startsWith("javascript:")));if(hasJsLinks){return true}}const eventAttrs=[...attrsGroups$5.animationEvent,...attrsGroups$5.documentEvent,...attrsGroups$5.documentElementEvent,...attrsGroups$5.globalEvent,...attrsGroups$5.graphicalEvent];return eventAttrs.some((attr=>node.attributes[attr]!=null))};tools.hasScripts=hasScripts$4;const includesUrlReference$2=body=>new RegExp(regReferencesUrl).test(body);tools.includesUrlReference=includesUrlReference$2;const findReferences$2=(attribute,value)=>{const results=[];if(referencesProps$3.has(attribute)){const matches=value.matchAll(regReferencesUrl);for(const match of matches){results.push(match[2])}}if(attribute==="href"||attribute.endsWith(":href")){const match=regReferencesHref.exec(value);if(match!=null){results.push(match[1])}}if(attribute==="begin"){const match=regReferencesBegin.exec(value);if(match!=null){results.push(match[1])}}return results.map((body=>decodeURI(body)))};tools.findReferences=findReferences$2;const toFixed$4=(num,precision)=>{const pow=10**precision;return Math.round(num*pow)/pow};tools.toFixed=toFixed$4;const csso=cjs$1;const{detachNodeFromParent:detachNodeFromParent$g}=xast;const{hasScripts:hasScripts$3}=tools;minifyStyles$1.name="minifyStyles";minifyStyles$1.description="minifies styles and removes unused styles";minifyStyles$1.fn=(_root,{usage:usage,...params})=>{const styleElements=new Map;const elementsWithStyleAttributes=[];const tagsUsage=new Set;const idsUsage=new Set;const classesUsage=new Set;let enableTagsUsage=true;let enableIdsUsage=true;let enableClassesUsage=true;let forceUsageDeoptimized=false;if(typeof usage==="boolean"){enableTagsUsage=usage;enableIdsUsage=usage;enableClassesUsage=usage}else if(usage){enableTagsUsage=usage.tags==null?true:usage.tags;enableIdsUsage=usage.ids==null?true:usage.ids;enableClassesUsage=usage.classes==null?true:usage.classes;forceUsageDeoptimized=usage.force==null?false:usage.force}let deoptimized=false;return{element:{enter:(node,parentNode)=>{if(hasScripts$3(node)){deoptimized=true}tagsUsage.add(node.name);if(node.attributes.id!=null){idsUsage.add(node.attributes.id)}if(node.attributes.class!=null){for(const className of node.attributes.class.split(/\s+/)){classesUsage.add(className)}}if(node.name==="style"&&node.children.length!==0){styleElements.set(node,parentNode)}else if(node.attributes.style!=null){elementsWithStyleAttributes.push(node)}}},root:{exit:()=>{const cssoUsage={};if(!deoptimized||forceUsageDeoptimized){if(enableTagsUsage){cssoUsage.tags=Array.from(tagsUsage)}if(enableIdsUsage){cssoUsage.ids=Array.from(idsUsage)}if(enableClassesUsage){cssoUsage.classes=Array.from(classesUsage)}}for(const[styleNode,styleNodeParent]of styleElements.entries()){if(styleNode.children[0].type==="text"||styleNode.children[0].type==="cdata"){const cssText=styleNode.children[0].value;const minified=csso.minify(cssText,{...params,usage:cssoUsage}).css;if(minified.length===0){detachNodeFromParent$g(styleNode,styleNodeParent);continue}if(cssText.indexOf(">")>=0||cssText.indexOf("<")>=0){styleNode.children[0].type="cdata";styleNode.children[0].value=minified}else{styleNode.children[0].type="text";styleNode.children[0].value=minified}}}for(const node of elementsWithStyleAttributes){const elemStyle=node.attributes.style;node.attributes.style=csso.minifyBlock(elemStyle,{...params}).css}}}}};var cleanupIds$1={};const{visitSkip:visitSkip$4}=xast;const{hasScripts:hasScripts$2,findReferences:findReferences$1}=tools;cleanupIds$1.name="cleanupIds";cleanupIds$1.description="removes unused IDs and minifies used";const generateIdChars=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];const maxIdIndex=generateIdChars.length-1;const hasStringPrefix=(string,prefixes)=>{for(const prefix of prefixes){if(string.startsWith(prefix)){return true}}return false};const generateId=currentId=>{if(currentId==null){return[0]}currentId[currentId.length-1]+=1;for(let i=currentId.length-1;i>0;i--){if(currentId[i]>maxIdIndex){currentId[i]=0;if(currentId[i-1]!==undefined){currentId[i-1]++}}}if(currentId[0]>maxIdIndex){currentId[0]=0;currentId.unshift(0)}return currentId};const getIdString=arr=>arr.map((i=>generateIdChars[i])).join("");cleanupIds$1.fn=(_root,params)=>{const{remove:remove=true,minify:minify=true,preserve:preserve=[],preservePrefixes:preservePrefixes=[],force:force=false}=params;const preserveIds=new Set(Array.isArray(preserve)?preserve:preserve?[preserve]:[]);const preserveIdPrefixes=Array.isArray(preservePrefixes)?preservePrefixes:preservePrefixes?[preservePrefixes]:[];const nodeById=new Map;const referencesById=new Map;let deoptimized=false;return{element:{enter:node=>{if(!force){if(node.name==="style"&&node.children.length!==0||hasScripts$2(node)){deoptimized=true;return}if(node.name==="svg"){let hasDefsOnly=true;for(const child of node.children){if(child.type!=="element"||child.name!=="defs"){hasDefsOnly=false;break}}if(hasDefsOnly){return visitSkip$4}}}for(const[name,value]of Object.entries(node.attributes)){if(name==="id"){const id=value;if(nodeById.has(id)){delete node.attributes.id}else{nodeById.set(id,node)}}else{const ids=findReferences$1(name,value);for(const id of ids){let refs=referencesById.get(id);if(refs==null){refs=[];referencesById.set(id,refs)}refs.push({element:node,name:name})}}}}},root:{exit:()=>{if(deoptimized){return}const isIdPreserved=id=>preserveIds.has(id)||hasStringPrefix(id,preserveIdPrefixes);let currentId=null;for(const[id,refs]of referencesById){const node=nodeById.get(id);if(node!=null){if(minify&&isIdPreserved(id)===false){let currentIdString=null;do{currentId=generateId(currentId);currentIdString=getIdString(currentId)}while(isIdPreserved(currentIdString)||referencesById.has(currentIdString)&&nodeById.get(currentIdString)==null);node.attributes.id=currentIdString;for(const{element:element,name:name}of refs){const value=element.attributes[name];if(value.includes("#")){element.attributes[name]=value.replace(`#${encodeURI(id)}`,`#${currentIdString}`)}else{element.attributes[name]=value.replace(`${id}.`,`${currentIdString}.`)}}}nodeById.delete(id)}}if(remove){for(const[id,node]of nodeById){if(isIdPreserved(id)===false){delete node.attributes.id}}}}}}};var removeUselessDefs$1={};const{detachNodeFromParent:detachNodeFromParent$f}=xast;const{elemsGroups:elemsGroups$5}=_collections;removeUselessDefs$1.name="removeUselessDefs";removeUselessDefs$1.description="removes elements in <defs> without id";removeUselessDefs$1.fn=()=>({element:{enter:(node,parentNode)=>{if(node.name==="defs"){const usefulNodes=[];collectUsefulNodes(node,usefulNodes);if(usefulNodes.length===0){detachNodeFromParent$f(node,parentNode)}for(const usefulNode of usefulNodes){Object.defineProperty(usefulNode,"parentNode",{writable:true,value:node})}node.children=usefulNodes}else if(elemsGroups$5.nonRendering.has(node.name)&&node.attributes.id==null){detachNodeFromParent$f(node,parentNode)}}}});const collectUsefulNodes=(node,usefulNodes)=>{for(const child of node.children){if(child.type==="element"){if(child.attributes.id!=null||child.name==="style"){usefulNodes.push(child)}else{collectUsefulNodes(child,usefulNodes)}}}};var cleanupNumericValues$1={};const{removeLeadingZero:removeLeadingZero$3}=tools;cleanupNumericValues$1.name="cleanupNumericValues";cleanupNumericValues$1.description="rounds numeric values to the fixed precision, removes default ‘px’ units";const regNumericValues$3=/^([-+]?\d*\.?\d+([eE][-+]?\d+)?)(px|pt|pc|mm|cm|m|in|ft|em|ex|%)?$/;const absoluteLengths$1={cm:96/2.54,mm:96/25.4,in:96,pt:4/3,pc:16,px:1};cleanupNumericValues$1.fn=(_root,params)=>{const{floatPrecision:floatPrecision=3,leadingZero:leadingZero=true,defaultPx:defaultPx=true,convertToPx:convertToPx=true}=params;return{element:{enter:node=>{if(node.attributes.viewBox!=null){const nums=node.attributes.viewBox.split(/\s,?\s*|,\s*/g);node.attributes.viewBox=nums.map((value=>{const num=Number(value);return Number.isNaN(num)?value:Number(num.toFixed(floatPrecision))})).join(" ")}for(const[name,value]of Object.entries(node.attributes)){if(name==="version"){continue}const match=value.match(regNumericValues$3);if(match){let num=Number(Number(match[1]).toFixed(floatPrecision));let matchedUnit=match[3]||"";let units=matchedUnit;if(convertToPx&&units!==""&&units in absoluteLengths$1){const pxNum=Number((absoluteLengths$1[units]*Number(match[1])).toFixed(floatPrecision));if(pxNum.toString().length<match[0].length){num=pxNum;units="px"}}let str;if(leadingZero){str=removeLeadingZero$3(num)}else{str=num.toString()}if(defaultPx&&units==="px"){units=""}node.attributes[name]=str+units}}}}}};var convertColors$1={};const collections=_collections;convertColors$1.name="convertColors";convertColors$1.description="converts colors: rgb() to #rrggbb and #rrggbb to #rgb";const rNumber="([+-]?(?:\\d*\\.\\d+|\\d+\\.?)%?)";const rComma="\\s*,\\s*";const regRGB=new RegExp("^rgb\\(\\s*"+rNumber+rComma+rNumber+rComma+rNumber+"\\s*\\)$");const regHEX=/^#(([a-fA-F0-9])\2){3}$/;const convertRgbToHex=([r,g,b])=>{const hexNumber=(256+r<<8|g)<<8|b;return"#"+hexNumber.toString(16).slice(1).toUpperCase()};convertColors$1.fn=(_root,params)=>{const{currentColor:currentColor=false,names2hex:names2hex=true,rgb2hex:rgb2hex=true,shorthex:shorthex=true,shortname:shortname=true}=params;return{element:{enter:node=>{for(const[name,value]of Object.entries(node.attributes)){if(collections.colorsProps.has(name)){let val=value;if(currentColor){let matched;if(typeof currentColor==="string"){matched=val===currentColor}else if(currentColor instanceof RegExp){matched=currentColor.exec(val)!=null}else{matched=val!=="none"}if(matched){val="currentColor"}}if(names2hex){const colorName=val.toLowerCase();if(collections.colorsNames[colorName]!=null){val=collections.colorsNames[colorName]}}if(rgb2hex){let match=val.match(regRGB);if(match!=null){let nums=match.slice(1,4).map((m=>{let n;if(m.indexOf("%")>-1){n=Math.round(parseFloat(m)*2.55)}else{n=Number(m)}return Math.max(0,Math.min(n,255))}));val=convertRgbToHex(nums)}}if(shorthex){let match=val.match(regHEX);if(match!=null){val="#"+match[0][1]+match[0][3]+match[0][5]}}if(shortname){const colorName=val.toLowerCase();if(collections.colorsShortNames[colorName]!=null){val=collections.colorsShortNames[colorName]}}node.attributes[name]=val}}}}}};var removeUnknownsAndDefaults$1={};const{visitSkip:visitSkip$3,detachNodeFromParent:detachNodeFromParent$e}=xast;const{collectStylesheet:collectStylesheet$7,computeStyle:computeStyle$6}=style;const{elems:elems$1,attrsGroups:attrsGroups$4,elemsGroups:elemsGroups$4,attrsGroupsDefaults:attrsGroupsDefaults$2,presentationNonInheritableGroupAttrs:presentationNonInheritableGroupAttrs$1}=_collections;removeUnknownsAndDefaults$1.name="removeUnknownsAndDefaults";removeUnknownsAndDefaults$1.description="removes unknown elements content and attributes, removes attrs with default values";const allowedChildrenPerElement=new Map;const allowedAttributesPerElement=new Map;const attributesDefaultsPerElement=new Map;for(const[name,config]of Object.entries(elems$1)){const allowedChildren=new Set;if(config.content){for(const elementName of config.content){allowedChildren.add(elementName)}}if(config.contentGroups){for(const contentGroupName of config.contentGroups){const elemsGroup=elemsGroups$4[contentGroupName];if(elemsGroup){for(const elementName of elemsGroup){allowedChildren.add(elementName)}}}}const allowedAttributes=new Set;if(config.attrs){for(const attrName of config.attrs){allowedAttributes.add(attrName)}}const attributesDefaults=new Map;if(config.defaults){for(const[attrName,defaultValue]of Object.entries(config.defaults)){attributesDefaults.set(attrName,defaultValue)}}for(const attrsGroupName of config.attrsGroups){const attrsGroup=attrsGroups$4[attrsGroupName];if(attrsGroup){for(const attrName of attrsGroup){allowedAttributes.add(attrName)}}const groupDefaults=attrsGroupsDefaults$2[attrsGroupName];if(groupDefaults){for(const[attrName,defaultValue]of Object.entries(groupDefaults)){attributesDefaults.set(attrName,defaultValue)}}}allowedChildrenPerElement.set(name,allowedChildren);allowedAttributesPerElement.set(name,allowedAttributes);attributesDefaultsPerElement.set(name,attributesDefaults)}removeUnknownsAndDefaults$1.fn=(root,params)=>{const{unknownContent:unknownContent=true,unknownAttrs:unknownAttrs=true,defaultAttrs:defaultAttrs=true,defaultMarkupDeclarations:defaultMarkupDeclarations=true,uselessOverrides:uselessOverrides=true,keepDataAttrs:keepDataAttrs=true,keepAriaAttrs:keepAriaAttrs=true,keepRoleAttr:keepRoleAttr=false}=params;const stylesheet=collectStylesheet$7(root);return{instruction:{enter:node=>{if(defaultMarkupDeclarations){node.value=node.value.replace(/\s*standalone\s*=\s*(["'])no\1/,"")}}},element:{enter:(node,parentNode)=>{if(node.name.includes(":")){return}if(node.name==="foreignObject"){return visitSkip$3}if(unknownContent&&parentNode.type==="element"){const allowedChildren=allowedChildrenPerElement.get(parentNode.name);if(allowedChildren==null||allowedChildren.size===0){if(allowedChildrenPerElement.get(node.name)==null){detachNodeFromParent$e(node,parentNode);return}}else{if(allowedChildren.has(node.name)===false){detachNodeFromParent$e(node,parentNode);return}}}const allowedAttributes=allowedAttributesPerElement.get(node.name);const attributesDefaults=attributesDefaultsPerElement.get(node.name);const computedParentStyle=parentNode.type==="element"?computeStyle$6(stylesheet,parentNode):null;for(const[name,value]of Object.entries(node.attributes)){if(keepDataAttrs&&name.startsWith("data-")){continue}if(keepAriaAttrs&&name.startsWith("aria-")){continue}if(keepRoleAttr&&name==="role"){continue}if(name==="xmlns"){continue}if(name.includes(":")){const[prefix]=name.split(":");if(prefix!=="xml"&&prefix!=="xlink"){continue}}if(unknownAttrs&&allowedAttributes&&allowedAttributes.has(name)===false){delete node.attributes[name]}if(defaultAttrs&&node.attributes.id==null&&attributesDefaults&&attributesDefaults.get(name)===value){if(computedParentStyle?.[name]==null){delete node.attributes[name]}}if(uselessOverrides&&node.attributes.id==null){const style=computedParentStyle?.[name];if(presentationNonInheritableGroupAttrs$1.has(name)===false&&style!=null&&style.type==="static"&&style.value===value){delete node.attributes[name]}}}}}}};var removeNonInheritableGroupAttrs$1={};const{inheritableAttrs:inheritableAttrs$2,attrsGroups:attrsGroups$3,presentationNonInheritableGroupAttrs:presentationNonInheritableGroupAttrs}=_collections;removeNonInheritableGroupAttrs$1.name="removeNonInheritableGroupAttrs";removeNonInheritableGroupAttrs$1.description="removes non-inheritable group’s presentational attributes";removeNonInheritableGroupAttrs$1.fn=()=>({element:{enter:node=>{if(node.name==="g"){for(const name of Object.keys(node.attributes)){if(attrsGroups$3.presentation.has(name)&&!inheritableAttrs$2.has(name)&&!presentationNonInheritableGroupAttrs.has(name)){delete node.attributes[name]}}}}}});var removeUselessStrokeAndFill$1={};const{visit:visit$4,visitSkip:visitSkip$2,detachNodeFromParent:detachNodeFromParent$d}=xast;const{collectStylesheet:collectStylesheet$6,computeStyle:computeStyle$5}=style;const{hasScripts:hasScripts$1}=tools;const{elemsGroups:elemsGroups$3}=_collections;removeUselessStrokeAndFill$1.name="removeUselessStrokeAndFill";removeUselessStrokeAndFill$1.description="removes useless stroke and fill attributes";removeUselessStrokeAndFill$1.fn=(root,params)=>{const{stroke:removeStroke=true,fill:removeFill=true,removeNone:removeNone=false}=params;let hasStyleOrScript=false;visit$4(root,{element:{enter:node=>{if(node.name==="style"||hasScripts$1(node)){hasStyleOrScript=true}}}});if(hasStyleOrScript){return null}const stylesheet=collectStylesheet$6(root);return{element:{enter:(node,parentNode)=>{if(node.attributes.id!=null){return visitSkip$2}if(!elemsGroups$3.shape.has(node.name)){return}const computedStyle=computeStyle$5(stylesheet,node);const stroke=computedStyle.stroke;const strokeOpacity=computedStyle["stroke-opacity"];const strokeWidth=computedStyle["stroke-width"];const markerEnd=computedStyle["marker-end"];const fill=computedStyle.fill;const fillOpacity=computedStyle["fill-opacity"];const computedParentStyle=parentNode.type==="element"?computeStyle$5(stylesheet,parentNode):null;const parentStroke=computedParentStyle==null?null:computedParentStyle.stroke;if(removeStroke){if(stroke==null||stroke.type==="static"&&stroke.value=="none"||strokeOpacity!=null&&strokeOpacity.type==="static"&&strokeOpacity.value==="0"||strokeWidth!=null&&strokeWidth.type==="static"&&strokeWidth.value==="0"){if(strokeWidth!=null&&strokeWidth.type==="static"&&strokeWidth.value==="0"||markerEnd==null){for(const name of Object.keys(node.attributes)){if(name.startsWith("stroke")){delete node.attributes[name]}}if(parentStroke!=null&&parentStroke.type==="static"&&parentStroke.value!=="none"){node.attributes.stroke="none"}}}}if(removeFill){if(fill!=null&&fill.type==="static"&&fill.value==="none"||fillOpacity!=null&&fillOpacity.type==="static"&&fillOpacity.value==="0"){for(const name of Object.keys(node.attributes)){if(name.startsWith("fill-")){delete node.attributes[name]}}if(fill==null||fill.type==="static"&&fill.value!=="none"){node.attributes.fill="none"}}}if(removeNone){if((stroke==null||node.attributes.stroke==="none")&&(fill!=null&&fill.type==="static"&&fill.value==="none"||node.attributes.fill==="none")){detachNodeFromParent$d(node,parentNode)}}}}}};var removeViewBox$1={};removeViewBox$1.name="removeViewBox";removeViewBox$1.description="removes viewBox attribute when possible";const viewBoxElems=new Set(["pattern","svg","symbol"]);removeViewBox$1.fn=()=>({element:{enter:(node,parentNode)=>{if(viewBoxElems.has(node.name)&&node.attributes.viewBox!=null&&node.attributes.width!=null&&node.attributes.height!=null){if(node.name==="svg"&&parentNode.type!=="root"){return}const nums=node.attributes.viewBox.split(/[ ,]+/g);if(nums[0]==="0"&&nums[1]==="0"&&node.attributes.width.replace(/px$/,"")===nums[2]&&node.attributes.height.replace(/px$/,"")===nums[3]){delete node.attributes.viewBox}}}}});var cleanupEnableBackground$1={};const csstree$1=cjs$2;const{visit:visit$3}=xast;cleanupEnableBackground$1.name="cleanupEnableBackground";cleanupEnableBackground$1.description="remove or cleanup enable-background attribute when possible";const regEnableBackground=/^new\s0\s0\s([-+]?\d*\.?\d+([eE][-+]?\d+)?)\s([-+]?\d*\.?\d+([eE][-+]?\d+)?)$/;cleanupEnableBackground$1.fn=root=>{let hasFilter=false;visit$3(root,{element:{enter:node=>{if(node.name==="filter"){hasFilter=true}}}});return{element:{enter:node=>{let newStyle=null;let enableBackgroundDeclaration=null;if(node.attributes.style!=null){newStyle=csstree$1.parse(node.attributes.style,{context:"declarationList"});if(newStyle.type==="DeclarationList"){const enableBackgroundDeclarations=[];csstree$1.walk(newStyle,((node,nodeItem)=>{if(node.type==="Declaration"&&node.property==="enable-background"){enableBackgroundDeclarations.push(nodeItem);enableBackgroundDeclaration=nodeItem}}));for(let i=0;i<enableBackgroundDeclarations.length-1;i++){newStyle.children.remove(enableBackgroundDeclarations[i])}}}if(!hasFilter){delete node.attributes["enable-background"];if(newStyle?.type==="DeclarationList"){if(enableBackgroundDeclaration){newStyle.children.remove(enableBackgroundDeclaration)}if(newStyle.children.isEmpty){delete node.attributes.style}else{node.attributes.style=csstree$1.generate(newStyle)}}return}const hasDimensions=node.attributes.width!=null&&node.attributes.height!=null;if((node.name==="svg"||node.name==="mask"||node.name==="pattern")&&hasDimensions){const attrValue=node.attributes["enable-background"];const attrCleaned=cleanupValue(attrValue,node.name,node.attributes.width,node.attributes.height);if(attrCleaned){node.attributes["enable-background"]=attrCleaned}else{delete node.attributes["enable-background"]}if(newStyle?.type==="DeclarationList"&&enableBackgroundDeclaration){const styleValue=csstree$1.generate(enableBackgroundDeclaration.data.value);const styleCleaned=cleanupValue(styleValue,node.name,node.attributes.width,node.attributes.height);if(styleCleaned){enableBackgroundDeclaration.data.value={type:"Raw",value:styleCleaned}}else{newStyle.children.remove(enableBackgroundDeclaration)}}}if(newStyle?.type==="DeclarationList"){if(newStyle.children.isEmpty){delete node.attributes.style}else{node.attributes.style=csstree$1.generate(newStyle)}}}}}};const cleanupValue=(value,nodeName,width,height)=>{const match=regEnableBackground.exec(value);if(match!=null&&width===match[1]&&height===match[3]){return nodeName==="svg"?undefined:"new"}return value};var removeHiddenElems$1={};var path={};const{removeLeadingZero:removeLeadingZero$2,toFixed:toFixed$3}=tools;const argsCountPerCommand={M:2,m:2,Z:0,z:0,L:2,l:2,H:1,h:1,V:1,v:1,C:6,c:6,S:4,s:4,Q:4,q:4,T:2,t:2,A:7,a:7};const isCommand=c=>c in argsCountPerCommand;const isWsp=c=>{const codePoint=c.codePointAt(0);return codePoint===32||codePoint===9||codePoint===13||codePoint===10};const isDigit=c=>{const codePoint=c.codePointAt(0);if(codePoint==null){return false}return 48<=codePoint&&codePoint<=57};const readNumber=(string,cursor)=>{let i=cursor;let value="";let state="none";for(;i<string.length;i+=1){const c=string[i];if(c==="+"||c==="-"){if(state==="none"){state="sign";value+=c;continue}if(state==="e"){state="exponent_sign";value+=c;continue}}if(isDigit(c)){if(state==="none"||state==="sign"||state==="whole"){state="whole";value+=c;continue}if(state==="decimal_point"||state==="decimal"){state="decimal";value+=c;continue}if(state==="e"||state==="exponent_sign"||state==="exponent"){state="exponent";value+=c;continue}}if(c==="."){if(state==="none"||state==="sign"||state==="whole"){state="decimal_point";value+=c;continue}}if(c==="E"||c=="e"){if(state==="whole"||state==="decimal_point"||state==="decimal"){state="e";value+=c;continue}}break}const number=Number.parseFloat(value);if(Number.isNaN(number)){return[cursor,null]}else{return[i-1,number]}};const parsePathData$3=string=>{const pathData=[];let command=null;let args=[];let argsCount=0;let canHaveComma=false;let hadComma=false;for(let i=0;i<string.length;i+=1){const c=string.charAt(i);if(isWsp(c)){continue}if(canHaveComma&&c===","){if(hadComma){break}hadComma=true;continue}if(isCommand(c)){if(hadComma){return pathData}if(command==null){if(c!=="M"&&c!=="m"){return pathData}}else{if(args.length!==0){return pathData}}command=c;args=[];argsCount=argsCountPerCommand[command];canHaveComma=false;if(argsCount===0){pathData.push({command:command,args:args})}continue}if(command==null){return pathData}let newCursor=i;let number=null;if(command==="A"||command==="a"){const position=args.length;if(position===0||position===1){if(c!=="+"&&c!=="-"){[newCursor,number]=readNumber(string,i)}}if(position===2||position===5||position===6){[newCursor,number]=readNumber(string,i)}if(position===3||position===4){if(c==="0"){number=0}if(c==="1"){number=1}}}else{[newCursor,number]=readNumber(string,i)}if(number==null){return pathData}args.push(number);canHaveComma=true;hadComma=false;i=newCursor;if(args.length===argsCount){pathData.push({command:command,args:args});if(command==="M"){command="L"}if(command==="m"){command="l"}args=[]}}return pathData};path.parsePathData=parsePathData$3;const roundAndStringify=(number,precision)=>{if(precision!=null){number=toFixed$3(number,precision)}return{roundedStr:removeLeadingZero$2(number),rounded:number}};const stringifyArgs=(command,args,precision,disableSpaceAfterFlags)=>{let result="";let previous;for(let i=0;i<args.length;i++){const{roundedStr:roundedStr,rounded:rounded}=roundAndStringify(args[i],precision);if(disableSpaceAfterFlags&&(command==="A"||command==="a")&&(i%7===4||i%7===5)){result+=roundedStr}else if(i===0||rounded<0){result+=roundedStr}else if(!Number.isInteger(previous)&&rounded!=0&&rounded<1&&rounded>-1){result+=roundedStr}else{result+=` ${roundedStr}`}previous=rounded}return result};const stringifyPathData$2=({pathData:pathData,precision:precision,disableSpaceAfterFlags:disableSpaceAfterFlags})=>{if(pathData.length===1){const{command:command,args:args}=pathData[0];return command+stringifyArgs(command,args,precision,disableSpaceAfterFlags)}let result="";let prev={...pathData[0]};if(pathData[1].command==="L"){prev.command="M"}else if(pathData[1].command==="l"){prev.command="m"}for(let i=1;i<pathData.length;i++){const{command:command,args:args}=pathData[i];if(prev.command===command&&prev.command!=="M"&&prev.command!=="m"||prev.command==="M"&&command==="L"||prev.command==="m"&&command==="l"){prev.args=[...prev.args,...args];if(i===pathData.length-1){result+=prev.command+stringifyArgs(prev.command,prev.args,precision,disableSpaceAfterFlags)}}else{result+=prev.command+stringifyArgs(prev.command,prev.args,precision,disableSpaceAfterFlags);if(i===pathData.length-1){result+=command+stringifyArgs(command,args,precision,disableSpaceAfterFlags)}else{prev={command:command,args:args}}}}return result};path.stringifyPathData=stringifyPathData$2;const{elemsGroups:elemsGroups$2}=_collections;const{visit:visit$2,visitSkip:visitSkip$1,querySelector:querySelector$1,detachNodeFromParent:detachNodeFromParent$c}=xast;const{collectStylesheet:collectStylesheet$5,computeStyle:computeStyle$4}=style;const{parsePathData:parsePathData$2}=path;const{hasScripts:hasScripts,findReferences:findReferences}=tools;const nonRendering=elemsGroups$2.nonRendering;removeHiddenElems$1.name="removeHiddenElems";removeHiddenElems$1.description="removes hidden elements (zero sized, with absent attributes)";removeHiddenElems$1.fn=(root,params)=>{const{isHidden:isHidden=true,displayNone:displayNone=true,opacity0:opacity0=true,circleR0:circleR0=true,ellipseRX0:ellipseRX0=true,ellipseRY0:ellipseRY0=true,rectWidth0:rectWidth0=true,rectHeight0:rectHeight0=true,patternWidth0:patternWidth0=true,patternHeight0:patternHeight0=true,imageWidth0:imageWidth0=true,imageHeight0:imageHeight0=true,pathEmptyD:pathEmptyD=true,polylineEmptyPoints:polylineEmptyPoints=true,polygonEmptyPoints:polygonEmptyPoints=true}=params;const stylesheet=collectStylesheet$5(root);const nonRenderedNodes=new Map;const removedDefIds=new Set;const allDefs=new Map;const allReferences=new Set;const referencesById=new Map;let deoptimized=false;function removeElement(node,parentNode){if(node.type==="element"&&node.attributes.id!=null&&parentNode.type==="element"&&parentNode.name==="defs"){removedDefIds.add(node.attributes.id)}detachNodeFromParent$c(node,parentNode)}visit$2(root,{element:{enter:(node,parentNode)=>{if(nonRendering.has(node.name)){if(node.attributes.id==null){detachNodeFromParent$c(node,parentNode);return visitSkip$1}nonRenderedNodes.set(node,parentNode);return visitSkip$1}const computedStyle=computeStyle$4(stylesheet,node);if(opacity0&&computedStyle.opacity&&computedStyle.opacity.type==="static"&&computedStyle.opacity.value==="0"){removeElement(node,parentNode)}}}});return{element:{enter:(node,parentNode)=>{if(node.name==="style"&&node.children.length!==0||hasScripts(node)){deoptimized=true;return}if(node.name==="defs"){allDefs.set(node,parentNode)}if(node.name==="use"){for(const attr of Object.keys(node.attributes)){if(attr!=="href"&&!attr.endsWith(":href"))continue;const value=node.attributes[attr];const id=value.slice(1);let refs=referencesById.get(id);if(!refs){refs=[];referencesById.set(id,refs)}refs.push({node:node,parentNode:parentNode})}}const computedStyle=computeStyle$4(stylesheet,node);if(isHidden&&computedStyle.visibility&&computedStyle.visibility.type==="static"&&computedStyle.visibility.value==="hidden"&&querySelector$1(node,"[visibility=visible]")==null){removeElement(node,parentNode);return}if(displayNone&&computedStyle.display&&computedStyle.display.type==="static"&&computedStyle.display.value==="none"&&node.name!=="marker"){removeElement(node,parentNode);return}if(circleR0&&node.name==="circle"&&node.children.length===0&&node.attributes.r==="0"){removeElement(node,parentNode);return}if(ellipseRX0&&node.name==="ellipse"&&node.children.length===0&&node.attributes.rx==="0"){removeElement(node,parentNode);return}if(ellipseRY0&&node.name==="ellipse"&&node.children.length===0&&node.attributes.ry==="0"){removeElement(node,parentNode);return}if(rectWidth0&&node.name==="rect"&&node.children.length===0&&node.attributes.width==="0"){removeElement(node,parentNode);return}if(rectHeight0&&rectWidth0&&node.name==="rect"&&node.children.length===0&&node.attributes.height==="0"){removeElement(node,parentNode);return}if(patternWidth0&&node.name==="pattern"&&node.attributes.width==="0"){removeElement(node,parentNode);return}if(patternHeight0&&node.name==="pattern"&&node.attributes.height==="0"){removeElement(node,parentNode);return}if(imageWidth0&&node.name==="image"&&node.attributes.width==="0"){removeElement(node,parentNode);return}if(imageHeight0&&node.name==="image"&&node.attributes.height==="0"){removeElement(node,parentNode);return}if(pathEmptyD&&node.name==="path"){if(node.attributes.d==null){removeElement(node,parentNode);return}const pathData=parsePathData$2(node.attributes.d);if(pathData.length===0){removeElement(node,parentNode);return}if(pathData.length===1&&computedStyle["marker-start"]==null&&computedStyle["marker-end"]==null){removeElement(node,parentNode);return}}if(polylineEmptyPoints&&node.name==="polyline"&&node.attributes.points==null){removeElement(node,parentNode);return}if(polygonEmptyPoints&&node.name==="polygon"&&node.attributes.points==null){removeElement(node,parentNode);return}for(const[name,value]of Object.entries(node.attributes)){const ids=findReferences(name,value);for(const id of ids){allReferences.add(id)}}}},root:{exit:()=>{for(const id of removedDefIds){const refs=referencesById.get(id);if(refs){for(const{node:node,parentNode:parentNode}of refs){detachNodeFromParent$c(node,parentNode)}}}if(!deoptimized){for(const[nonRenderedNode,nonRenderedParent]of nonRenderedNodes.entries()){const id=nonRenderedNode.attributes.id;if(!allReferences.has(id)){detachNodeFromParent$c(nonRenderedNode,nonRenderedParent)}}}for(const[node,parentNode]of allDefs.entries()){if(node.children.length===0){detachNodeFromParent$c(node,parentNode)}}}}}};var removeEmptyText$1={};const{detachNodeFromParent:detachNodeFromParent$b}=xast;removeEmptyText$1.name="removeEmptyText";removeEmptyText$1.description="removes empty <text> elements";removeEmptyText$1.fn=(root,params)=>{const{text:text=true,tspan:tspan=true,tref:tref=true}=params;return{element:{enter:(node,parentNode)=>{if(text&&node.name==="text"&&node.children.length===0){detachNodeFromParent$b(node,parentNode)}if(tspan&&node.name==="tspan"&&node.children.length===0){detachNodeFromParent$b(node,parentNode)}if(tref&&node.name==="tref"&&node.attributes["xlink:href"]==null){detachNodeFromParent$b(node,parentNode)}}}}};var convertShapeToPath$1={};const{stringifyPathData:stringifyPathData$1}=path;const{detachNodeFromParent:detachNodeFromParent$a}=xast;convertShapeToPath$1.name="convertShapeToPath";convertShapeToPath$1.description="converts basic shapes to more compact path form";const regNumber=/[-+]?(?:\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?/g;convertShapeToPath$1.fn=(root,params)=>{const{convertArcs:convertArcs=false,floatPrecision:precision}=params;return{element:{enter:(node,parentNode)=>{if(node.name==="rect"&&node.attributes.width!=null&&node.attributes.height!=null&&node.attributes.rx==null&&node.attributes.ry==null){const x=Number(node.attributes.x||"0");const y=Number(node.attributes.y||"0");const width=Number(node.attributes.width);const height=Number(node.attributes.height);if(Number.isNaN(x-y+width-height))return;const pathData=[{command:"M",args:[x,y]},{command:"H",args:[x+width]},{command:"V",args:[y+height]},{command:"H",args:[x]},{command:"z",args:[]}];node.name="path";node.attributes.d=stringifyPathData$1({pathData:pathData,precision:precision});delete node.attributes.x;delete node.attributes.y;delete node.attributes.width;delete node.attributes.height}if(node.name==="line"){const x1=Number(node.attributes.x1||"0");const y1=Number(node.attributes.y1||"0");const x2=Number(node.attributes.x2||"0");const y2=Number(node.attributes.y2||"0");if(Number.isNaN(x1-y1+x2-y2))return;const pathData=[{command:"M",args:[x1,y1]},{command:"L",args:[x2,y2]}];node.name="path";node.attributes.d=stringifyPathData$1({pathData:pathData,precision:precision});delete node.attributes.x1;delete node.attributes.y1;delete node.attributes.x2;delete node.attributes.y2}if((node.name==="polyline"||node.name==="polygon")&&node.attributes.points!=null){const coords=(node.attributes.points.match(regNumber)||[]).map(Number);if(coords.length<4){detachNodeFromParent$a(node,parentNode);return}const pathData=[];for(let i=0;i<coords.length;i+=2){pathData.push({command:i===0?"M":"L",args:coords.slice(i,i+2)})}if(node.name==="polygon"){pathData.push({command:"z",args:[]})}node.name="path";node.attributes.d=stringifyPathData$1({pathData:pathData,precision:precision});delete node.attributes.points}if(node.name==="circle"&&convertArcs){const cx=Number(node.attributes.cx||"0");const cy=Number(node.attributes.cy||"0");const r=Number(node.attributes.r||"0");if(Number.isNaN(cx-cy+r)){return}const pathData=[{command:"M",args:[cx,cy-r]},{command:"A",args:[r,r,0,1,0,cx,cy+r]},{command:"A",args:[r,r,0,1,0,cx,cy-r]},{command:"z",args:[]}];node.name="path";node.attributes.d=stringifyPathData$1({pathData:pathData,precision:precision});delete node.attributes.cx;delete node.attributes.cy;delete node.attributes.r}if(node.name==="ellipse"&&convertArcs){const ecx=Number(node.attributes.cx||"0");const ecy=Number(node.attributes.cy||"0");const rx=Number(node.attributes.rx||"0");const ry=Number(node.attributes.ry||"0");if(Number.isNaN(ecx-ecy+rx-ry)){return}const pathData=[{command:"M",args:[ecx,ecy-ry]},{command:"A",args:[rx,ry,0,1,0,ecx,ecy+ry]},{command:"A",args:[rx,ry,0,1,0,ecx,ecy-ry]},{command:"z",args:[]}];node.name="path";node.attributes.d=stringifyPathData$1({pathData:pathData,precision:precision});delete node.attributes.cx;delete node.attributes.cy;delete node.attributes.rx;delete node.attributes.ry}}}}};var convertEllipseToCircle$1={};convertEllipseToCircle$1.name="convertEllipseToCircle";convertEllipseToCircle$1.description="converts non-eccentric <ellipse>s to <circle>s";convertEllipseToCircle$1.fn=()=>({element:{enter:node=>{if(node.name==="ellipse"){const rx=node.attributes.rx||"0";const ry=node.attributes.ry||"0";if(rx===ry||rx==="auto"||ry==="auto"){node.name="circle";const radius=rx==="auto"?ry:rx;delete node.attributes.rx;delete node.attributes.ry;node.attributes.r=radius}}}}});var moveElemsAttrsToGroup$1={};const{visit:visit$1}=xast;const{inheritableAttrs:inheritableAttrs$1,pathElems:pathElems$2}=_collections;moveElemsAttrsToGroup$1.name="moveElemsAttrsToGroup";moveElemsAttrsToGroup$1.description="Move common attributes of group children to the group";moveElemsAttrsToGroup$1.fn=root=>{let deoptimizedWithStyles=false;visit$1(root,{element:{enter:node=>{if(node.name==="style"){deoptimizedWithStyles=true}}}});return{element:{exit:node=>{if(node.name!=="g"||node.children.length<=1){return}if(deoptimizedWithStyles){return}const commonAttributes=new Map;let initial=true;let everyChildIsPath=true;for(const child of node.children){if(child.type==="element"){if(!pathElems$2.has(child.name)){everyChildIsPath=false}if(initial){initial=false;for(const[name,value]of Object.entries(child.attributes)){if(inheritableAttrs$1.has(name)){commonAttributes.set(name,value)}}}else{for(const[name,value]of commonAttributes){if(child.attributes[name]!==value){commonAttributes.delete(name)}}}}}if(node.attributes["clip-path"]!=null||node.attributes.mask!=null){commonAttributes.delete("transform")}if(everyChildIsPath){commonAttributes.delete("transform")}for(const[name,value]of commonAttributes){if(name==="transform"){if(node.attributes.transform!=null){node.attributes.transform=`${node.attributes.transform} ${value}`}else{node.attributes.transform=value}}else{node.attributes[name]=value}}for(const child of node.children){if(child.type==="element"){for(const[name]of commonAttributes){delete child.attributes[name]}}}}}}};var moveGroupAttrsToElems$1={};const{pathElems:pathElems$1,referencesProps:referencesProps$2}=_collections;const{includesUrlReference:includesUrlReference$1}=tools;moveGroupAttrsToElems$1.name="moveGroupAttrsToElems";moveGroupAttrsToElems$1.description="moves some group attributes to the content elements";const pathElemsWithGroupsAndText=[...pathElems$1,"g","text"];moveGroupAttrsToElems$1.fn=()=>({element:{enter:node=>{if(node.name==="g"&&node.children.length!==0&&node.attributes.transform!=null&&Object.entries(node.attributes).some((([name,value])=>referencesProps$2.has(name)&&includesUrlReference$1(value)))===false&&node.children.every((child=>child.type==="element"&&pathElemsWithGroupsAndText.includes(child.name)&&child.attributes.id==null))){for(const child of node.children){const value=node.attributes.transform;if(child.type==="element"){if(child.attributes.transform!=null){child.attributes.transform=`${value} ${child.attributes.transform}`}else{child.attributes.transform=value}}}delete node.attributes.transform}}}});var collapseGroups$1={};const{inheritableAttrs:inheritableAttrs,elemsGroups:elemsGroups$1}=_collections;collapseGroups$1.name="collapseGroups";collapseGroups$1.description="collapses useless groups";const hasAnimatedAttr=(node,name)=>{if(node.type==="element"){if(elemsGroups$1.animation.has(node.name)&&node.attributes.attributeName===name){return true}for(const child of node.children){if(hasAnimatedAttr(child,name)){return true}}}return false};collapseGroups$1.fn=()=>({element:{exit:(node,parentNode)=>{if(parentNode.type==="root"||parentNode.name==="switch"){return}if(node.name!=="g"||node.children.length===0){return}if(Object.keys(node.attributes).length!==0&&node.children.length===1){const firstChild=node.children[0];if(firstChild.type==="element"&&firstChild.attributes.id==null&&node.attributes.filter==null&&(node.attributes.class==null||firstChild.attributes.class==null)&&(node.attributes["clip-path"]==null&&node.attributes.mask==null||firstChild.name==="g"&&node.attributes.transform==null&&firstChild.attributes.transform==null)){for(const[name,value]of Object.entries(node.attributes)){if(hasAnimatedAttr(firstChild,name)){return}if(firstChild.attributes[name]==null){firstChild.attributes[name]=value}else if(name==="transform"){firstChild.attributes[name]=value+" "+firstChild.attributes[name]}else if(firstChild.attributes[name]==="inherit"){firstChild.attributes[name]=value}else if(inheritableAttrs.has(name)===false&&firstChild.attributes[name]!==value){return}delete node.attributes[name]}}}if(Object.keys(node.attributes).length===0){for(const child of node.children){if(child.type==="element"&&elemsGroups$1.animation.has(child.name)){return}}const index=parentNode.children.indexOf(node);parentNode.children.splice(index,1,...node.children);for(const child of node.children){Object.defineProperty(child,"parentNode",{writable:true,value:parentNode})}}}}});var convertPathData$1={};var _path={};const{parsePathData:parsePathData$1,stringifyPathData:stringifyPathData}=path;var prevCtrlPoint;const path2js$3=path=>{if(path.pathJS)return path.pathJS;const pathData=[];const newPathData=parsePathData$1(path.attributes.d);for(const{command:command,args:args}of newPathData){pathData.push({command:command,args:args})}if(pathData.length&&pathData[0].command=="m"){pathData[0].command="M"}path.pathJS=pathData;return pathData};_path.path2js=path2js$3;const convertRelativeToAbsolute=data=>{const newData=[];let start=[0,0];let cursor=[0,0];for(let{command:command,args:args}of data){args=args.slice();if(command==="m"){args[0]+=cursor[0];args[1]+=cursor[1];command="M"}if(command==="M"){cursor[0]=args[0];cursor[1]=args[1];start[0]=cursor[0];start[1]=cursor[1]}if(command==="h"){args[0]+=cursor[0];command="H"}if(command==="H"){cursor[0]=args[0]}if(command==="v"){args[0]+=cursor[1];command="V"}if(command==="V"){cursor[1]=args[0]}if(command==="l"){args[0]+=cursor[0];args[1]+=cursor[1];command="L"}if(command==="L"){cursor[0]=args[0];cursor[1]=args[1]}if(command==="c"){args[0]+=cursor[0];args[1]+=cursor[1];args[2]+=cursor[0];args[3]+=cursor[1];args[4]+=cursor[0];args[5]+=cursor[1];command="C"}if(command==="C"){cursor[0]=args[4];cursor[1]=args[5]}if(command==="s"){args[0]+=cursor[0];args[1]+=cursor[1];args[2]+=cursor[0];args[3]+=cursor[1];command="S"}if(command==="S"){cursor[0]=args[2];cursor[1]=args[3]}if(command==="q"){args[0]+=cursor[0];args[1]+=cursor[1];args[2]+=cursor[0];args[3]+=cursor[1];command="Q"}if(command==="Q"){cursor[0]=args[2];cursor[1]=args[3]}if(command==="t"){args[0]+=cursor[0];args[1]+=cursor[1];command="T"}if(command==="T"){cursor[0]=args[0];cursor[1]=args[1]}if(command==="a"){args[5]+=cursor[0];args[6]+=cursor[1];command="A"}if(command==="A"){cursor[0]=args[5];cursor[1]=args[6]}if(command==="z"||command==="Z"){cursor[0]=start[0];cursor[1]=start[1];command="z"}newData.push({command:command,args:args})}return newData};_path.js2path=function(path,data,params){path.pathJS=data;const pathData=[];for(const item of data){if(pathData.length!==0&&(item.command==="M"||item.command==="m")){const last=pathData[pathData.length-1];if(last.command==="M"||last.command==="m"){pathData.pop()}}pathData.push({command:item.command,args:item.args})}path.attributes.d=stringifyPathData({pathData:pathData,precision:params.floatPrecision,disableSpaceAfterFlags:params.noSpaceAfterFlags})};function set(dest,source){dest[0]=source[source.length-2];dest[1]=source[source.length-1];return dest}_path.intersects=function(path1,path2){const points1=gatherPoints(convertRelativeToAbsolute(path1));const points2=gatherPoints(convertRelativeToAbsolute(path2));if(points1.maxX<=points2.minX||points2.maxX<=points1.minX||points1.maxY<=points2.minY||points2.maxY<=points1.minY||points1.list.every((set1=>points2.list.every((set2=>set1.list[set1.maxX][0]<=set2.list[set2.minX][0]||set2.list[set2.maxX][0]<=set1.list[set1.minX][0]||set1.list[set1.maxY][1]<=set2.list[set2.minY][1]||set2.list[set2.maxY][1]<=set1.list[set1.minY][1])))))return false;const hullNest1=points1.list.map(convexHull);const hullNest2=points2.list.map(convexHull);return hullNest1.some((function(hull1){if(hull1.list.length<3)return false;return hullNest2.some((function(hull2){if(hull2.list.length<3)return false;var simplex=[getSupport(hull1,hull2,[1,0])],direction=minus(simplex[0]);var iterations=1e4;while(true){if(iterations--==0){console.error("Error: infinite loop while processing mergePaths plugin.");return true}simplex.push(getSupport(hull1,hull2,direction));if(dot(direction,simplex[simplex.length-1])<=0)return false;if(processSimplex(simplex,direction))return true}}))}));function getSupport(a,b,direction){return sub(supportPoint(a,direction),supportPoint(b,minus(direction)))}function supportPoint(polygon,direction){var index=direction[1]>=0?direction[0]<0?polygon.maxY:polygon.maxX:direction[0]<0?polygon.minX:polygon.minY,max=-Infinity,value;while((value=dot(polygon.list[index],direction))>max){max=value;index=++index%polygon.list.length}return polygon.list[(index||polygon.list.length)-1]}};function processSimplex(simplex,direction){if(simplex.length==2){let a=simplex[1],b=simplex[0],AO=minus(simplex[1]),AB=sub(b,a);if(dot(AO,AB)>0){set(direction,orth(AB,a))}else{set(direction,AO);simplex.shift()}}else{let a=simplex[2],b=simplex[1],c=simplex[0],AB=sub(b,a),AC=sub(c,a),AO=minus(a),ACB=orth(AB,AC),ABC=orth(AC,AB);if(dot(ACB,AO)>0){if(dot(AB,AO)>0){set(direction,ACB);simplex.shift()}else{set(direction,AO);simplex.splice(0,2)}}else if(dot(ABC,AO)>0){if(dot(AC,AO)>0){set(direction,ABC);simplex.splice(1,1)}else{set(direction,AO);simplex.splice(0,2)}}else return true}return false}function minus(v){return[-v[0],-v[1]]}function sub(v1,v2){return[v1[0]-v2[0],v1[1]-v2[1]]}function dot(v1,v2){return v1[0]*v2[0]+v1[1]*v2[1]}function orth(v,from){var o=[-v[1],v[0]];return dot(o,minus(from))<0?minus(o):o}function gatherPoints(pathData){const points={list:[],minX:0,minY:0,maxX:0,maxY:0};const addPoint=(path,point)=>{if(!path.list.length||point[1]>path.list[path.maxY][1]){path.maxY=path.list.length;points.maxY=points.list.length?Math.max(point[1],points.maxY):point[1]}if(!path.list.length||point[0]>path.list[path.maxX][0]){path.maxX=path.list.length;points.maxX=points.list.length?Math.max(point[0],points.maxX):point[0]}if(!path.list.length||point[1]<path.list[path.minY][1]){path.minY=path.list.length;points.minY=points.list.length?Math.min(point[1],points.minY):point[1]}if(!path.list.length||point[0]<path.list[path.minX][0]){path.minX=path.list.length;points.minX=points.list.length?Math.min(point[0],points.minX):point[0]}path.list.push(point)};for(let i=0;i<pathData.length;i+=1){const pathDataItem=pathData[i];let subPath=points.list.length===0?{list:[],minX:0,minY:0,maxX:0,maxY:0}:points.list[points.list.length-1];let prev=i===0?null:pathData[i-1];let basePoint=subPath.list.length===0?null:subPath.list[subPath.list.length-1];let data=pathDataItem.args;let ctrlPoint=basePoint;const toAbsolute=(n,i)=>n+(basePoint==null?0:basePoint[i%2]);switch(pathDataItem.command){case"M":subPath={list:[],minX:0,minY:0,maxX:0,maxY:0};points.list.push(subPath);break;case"H":if(basePoint!=null){addPoint(subPath,[data[0],basePoint[1]])}break;case"V":if(basePoint!=null){addPoint(subPath,[basePoint[0],data[0]])}break;case"Q":addPoint(subPath,data.slice(0,2));prevCtrlPoint=[data[2]-data[0],data[3]-data[1]];break;case"T":if(basePoint!=null&&prev!=null&&(prev.command=="Q"||prev.command=="T")){ctrlPoint=[basePoint[0]+prevCtrlPoint[0],basePoint[1]+prevCtrlPoint[1]];addPoint(subPath,ctrlPoint);prevCtrlPoint=[data[0]-ctrlPoint[0],data[1]-ctrlPoint[1]]}break;case"C":if(basePoint!=null){addPoint(subPath,[.5*(basePoint[0]+data[0]),.5*(basePoint[1]+data[1])])}addPoint(subPath,[.5*(data[0]+data[2]),.5*(data[1]+data[3])]);addPoint(subPath,[.5*(data[2]+data[4]),.5*(data[3]+data[5])]);prevCtrlPoint=[data[4]-data[2],data[5]-data[3]];break;case"S":if(basePoint!=null&&prev!=null&&(prev.command=="C"||prev.command=="S")){addPoint(subPath,[basePoint[0]+.5*prevCtrlPoint[0],basePoint[1]+.5*prevCtrlPoint[1]]);ctrlPoint=[basePoint[0]+prevCtrlPoint[0],basePoint[1]+prevCtrlPoint[1]]}if(ctrlPoint!=null){addPoint(subPath,[.5*(ctrlPoint[0]+data[0]),.5*(ctrlPoint[1]+data[1])])}addPoint(subPath,[.5*(data[0]+data[2]),.5*(data[1]+data[3])]);prevCtrlPoint=[data[2]-data[0],data[3]-data[1]];break;case"A":if(basePoint!=null){var curves=a2c.apply(0,basePoint.concat(data));for(var cData;(cData=curves.splice(0,6).map(toAbsolute)).length;){if(basePoint!=null){addPoint(subPath,[.5*(basePoint[0]+cData[0]),.5*(basePoint[1]+cData[1])])}addPoint(subPath,[.5*(cData[0]+cData[2]),.5*(cData[1]+cData[3])]);addPoint(subPath,[.5*(cData[2]+cData[4]),.5*(cData[3]+cData[5])]);if(curves.length)addPoint(subPath,basePoint=cData.slice(-2))}}break}if(data.length>=2)addPoint(subPath,data.slice(-2))}return points}function convexHull(points){points.list.sort((function(a,b){return a[0]==b[0]?a[1]-b[1]:a[0]-b[0]}));var lower=[],minY=0,bottom=0;for(let i=0;i<points.list.length;i++){while(lower.length>=2&&cross(lower[lower.length-2],lower[lower.length-1],points.list[i])<=0){lower.pop()}if(points.list[i][1]<points.list[minY][1]){minY=i;bottom=lower.length}lower.push(points.list[i])}var upper=[],maxY=points.list.length-1,top=0;for(let i=points.list.length;i--;){while(upper.length>=2&&cross(upper[upper.length-2],upper[upper.length-1],points.list[i])<=0){upper.pop()}if(points.list[i][1]>points.list[maxY][1]){maxY=i;top=upper.length}upper.push(points.list[i])}upper.pop();lower.pop();const hullList=lower.concat(upper);const hull={list:hullList,minX:0,maxX:lower.length,minY:bottom,maxY:(lower.length+top)%hullList.length};return hull}function cross(o,a,b){return(a[0]-o[0])*(b[1]-o[1])-(a[1]-o[1])*(b[0]-o[0])}const a2c=(x1,y1,rx,ry,angle,large_arc_flag,sweep_flag,x2,y2,recursive)=>{const _120=Math.PI*120/180;const rad=Math.PI/180*(+angle||0);let res=[];const rotateX=(x,y,rad)=>x*Math.cos(rad)-y*Math.sin(rad);const rotateY=(x,y,rad)=>x*Math.sin(rad)+y*Math.cos(rad);if(!recursive){x1=rotateX(x1,y1,-rad);y1=rotateY(x1,y1,-rad);x2=rotateX(x2,y2,-rad);y2=rotateY(x2,y2,-rad);var x=(x1-x2)/2,y=(y1-y2)/2;var h=x*x/(rx*rx)+y*y/(ry*ry);if(h>1){h=Math.sqrt(h);rx=h*rx;ry=h*ry}var rx2=rx*rx;var ry2=ry*ry;var k=(large_arc_flag==sweep_flag?-1:1)*Math.sqrt(Math.abs((rx2*ry2-rx2*y*y-ry2*x*x)/(rx2*y*y+ry2*x*x)));var cx=k*rx*y/ry+(x1+x2)/2;var cy=k*-ry*x/rx+(y1+y2)/2;var f1=Math.asin(Number(((y1-cy)/ry).toFixed(9)));var f2=Math.asin(Number(((y2-cy)/ry).toFixed(9)));f1=x1<cx?Math.PI-f1:f1;f2=x2<cx?Math.PI-f2:f2;f1<0&&(f1=Math.PI*2+f1);f2<0&&(f2=Math.PI*2+f2);if(sweep_flag&&f1>f2){f1=f1-Math.PI*2}if(!sweep_flag&&f2>f1){f2=f2-Math.PI*2}}else{f1=recursive[0];f2=recursive[1];cx=recursive[2];cy=recursive[3]}var df=f2-f1;if(Math.abs(df)>_120){var f2old=f2,x2old=x2,y2old=y2;f2=f1+_120*(sweep_flag&&f2>f1?1:-1);x2=cx+rx*Math.cos(f2);y2=cy+ry*Math.sin(f2);res=a2c(x2,y2,rx,ry,angle,0,sweep_flag,x2old,y2old,[f2,f2old,cx,cy])}df=f2-f1;var c1=Math.cos(f1),s1=Math.sin(f1),c2=Math.cos(f2),s2=Math.sin(f2),t=Math.tan(df/4),hx=4/3*rx*t,hy=4/3*ry*t,m=[-hx*s1,hy*c1,x2+hx*s2-x1,y2-hy*c2-y1,x2-x1,y2-y1];if(recursive){return m.concat(res)}else{res=m.concat(res);var newres=[];for(var i=0,n=res.length;i<n;i++){newres[i]=i%2?rotateY(res[i-1],res[i],rad):rotateX(res[i],res[i+1],rad)}return newres}};var applyTransforms$2={};var _transforms={};const{toFixed:toFixed$2}=tools;const transformTypes=new Set(["matrix","rotate","scale","skewX","skewY","translate"]);const regTransformSplit=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/;const regNumericValues$2=/[-+]?(?:\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?/g;_transforms.transform2js=transformString=>{const transforms=[];let currentTransform=null;for(const item of transformString.split(regTransformSplit)){if(!item){continue}if(transformTypes.has(item)){currentTransform={name:item,data:[]};transforms.push(currentTransform)}else{let num;while(num=regNumericValues$2.exec(item)){num=Number(num);if(currentTransform!=null){currentTransform.data.push(num)}}}}return currentTransform==null||currentTransform.data.length==0?[]:transforms};_transforms.transformsMultiply=transforms=>{const matrixData=transforms.map((transform=>{if(transform.name==="matrix"){return transform.data}return transformToMatrix(transform)}));const matrixTransform={name:"matrix",data:matrixData.length>0?matrixData.reduce(multiplyTransformMatrices):[]};return matrixTransform};const mth={rad:deg=>deg*Math.PI/180,deg:rad=>rad*180/Math.PI,cos:deg=>Math.cos(mth.rad(deg)),acos:(val,floatPrecision)=>toFixed$2(mth.deg(Math.acos(val)),floatPrecision),sin:deg=>Math.sin(mth.rad(deg)),asin:(val,floatPrecision)=>toFixed$2(mth.deg(Math.asin(val)),floatPrecision),tan:deg=>Math.tan(mth.rad(deg)),atan:(val,floatPrecision)=>toFixed$2(mth.deg(Math.atan(val)),floatPrecision)};_transforms.matrixToTransform=(transform,params)=>{const floatPrecision=params.floatPrecision;const data=transform.data;const transforms=[];if(data[4]||data[5]){transforms.push({name:"translate",data:data.slice(4,data[5]?6:5)})}let sx=toFixed$2(Math.hypot(data[0],data[1]),params.transformPrecision);let sy=toFixed$2((data[0]*data[3]-data[1]*data[2])/sx,params.transformPrecision);const colsSum=data[0]*data[2]+data[1]*data[3];const rowsSum=data[0]*data[1]+data[2]*data[3];const scaleBefore=rowsSum!==0||sx===sy;if(!data[1]&&data[2]){transforms.push({name:"skewX",data:[mth.atan(data[2]/sy,floatPrecision)]})}else if(data[1]&&!data[2]){transforms.push({name:"skewY",data:[mth.atan(data[1]/data[0],floatPrecision)]});sx=data[0];sy=data[3]}else if(!colsSum||sx===1&&sy===1||!scaleBefore){if(!scaleBefore){sx=Math.hypot(data[0],data[2]);sy=Math.hypot(data[1],data[3]);if(toFixed$2(data[0],params.transformPrecision)<0){sx=-sx}if(data[3]<0||Math.sign(data[1])===Math.sign(data[2])&&toFixed$2(data[3],params.transformPrecision)===0){sy=-sy}transforms.push({name:"scale",data:[sx,sy]})}const angle=Math.min(Math.max(-1,data[0]/sx),1);const rotate=[mth.acos(angle,floatPrecision)*((scaleBefore?1:sy)*data[1]<0?-1:1)];if(rotate[0]){transforms.push({name:"rotate",data:rotate})}if(rowsSum&&colsSum)transforms.push({name:"skewX",data:[mth.atan(colsSum/(sx*sx),floatPrecision)]});if(rotate[0]&&(data[4]||data[5])){transforms.shift();const oneOverCos=1-data[0]/sx;const sin=data[1]/(scaleBefore?sx:sy);const x=data[4]*(scaleBefore?1:sy);const y=data[5]*(scaleBefore?1:sx);const denom=(oneOverCos**2+sin**2)*(scaleBefore?1:sx*sy);rotate.push((oneOverCos*x-sin*y)/denom,(oneOverCos*y+sin*x)/denom)}}else if(data[1]||data[2]){return[transform]}if(scaleBefore&&(sx!=1||sy!=1)||!transforms.length){transforms.push({name:"scale",data:sx==sy?[sx]:[sx,sy]})}return transforms};const transformToMatrix=transform=>{if(transform.name==="matrix"){return transform.data}switch(transform.name){case"translate":return[1,0,0,1,transform.data[0],transform.data[1]||0];case"scale":return[transform.data[0],0,0,transform.data[1]||transform.data[0],0,0];case"rotate":var cos=mth.cos(transform.data[0]),sin=mth.sin(transform.data[0]),cx=transform.data[1]||0,cy=transform.data[2]||0;return[cos,sin,-sin,cos,(1-cos)*cx+sin*cy,(1-cos)*cy-sin*cx];case"skewX":return[1,0,mth.tan(transform.data[0]),1,0,0];case"skewY":return[1,mth.tan(transform.data[0]),0,1,0,0];default:throw Error(`Unknown transform ${transform.name}`)}};_transforms.transformArc=(cursor,arc,transform)=>{const x=arc[5]-cursor[0];const y=arc[6]-cursor[1];let a=arc[0];let b=arc[1];const rot=arc[2]*Math.PI/180;const cos=Math.cos(rot);const sin=Math.sin(rot);if(a>0&&b>0){let h=Math.pow(x*cos+y*sin,2)/(4*a*a)+Math.pow(y*cos-x*sin,2)/(4*b*b);if(h>1){h=Math.sqrt(h);a*=h;b*=h}}const ellipse=[a*cos,a*sin,-b*sin,b*cos,0,0];const m=multiplyTransformMatrices(transform,ellipse);const lastCol=m[2]*m[2]+m[3]*m[3];const squareSum=m[0]*m[0]+m[1]*m[1]+lastCol;const root=Math.hypot(m[0]-m[3],m[1]+m[2])*Math.hypot(m[0]+m[3],m[1]-m[2]);if(!root){arc[0]=arc[1]=Math.sqrt(squareSum/2);arc[2]=0}else{const majorAxisSqr=(squareSum+root)/2;const minorAxisSqr=(squareSum-root)/2;const major=Math.abs(majorAxisSqr-lastCol)>1e-6;const sub=(major?majorAxisSqr:minorAxisSqr)-lastCol;const rowsSum=m[0]*m[2]+m[1]*m[3];const term1=m[0]*sub+m[2]*rowsSum;const term2=m[1]*sub+m[3]*rowsSum;arc[0]=Math.sqrt(majorAxisSqr);arc[1]=Math.sqrt(minorAxisSqr);arc[2]=((major?term2<0:term1>0)?-1:1)*Math.acos((major?term1:term2)/Math.hypot(term1,term2))*180/Math.PI}if(transform[0]<0!==transform[3]<0){arc[4]=1-arc[4]}return arc};const multiplyTransformMatrices=(a,b)=>[a[0]*b[0]+a[2]*b[1],a[1]*b[0]+a[3]*b[1],a[0]*b[2]+a[2]*b[3],a[1]*b[2]+a[3]*b[3],a[0]*b[4]+a[2]*b[5]+a[4],a[1]*b[4]+a[3]*b[5]+a[5]];const{collectStylesheet:collectStylesheet$4,computeStyle:computeStyle$3}=style;const{transformsMultiply:transformsMultiply$1,transform2js:transform2js$1,transformArc:transformArc}=_transforms;const{path2js:path2js$2}=_path;const{removeLeadingZero:removeLeadingZero$1,includesUrlReference:includesUrlReference}=tools;const{referencesProps:referencesProps$1,attrsGroupsDefaults:attrsGroupsDefaults$1}=_collections;const regNumericValues$1=/[-+]?(\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?/g;const applyTransforms$1=(root,params)=>{const stylesheet=collectStylesheet$4(root);return{element:{enter:node=>{if(node.attributes.d==null){return}if(node.attributes.id!=null){return}if(node.attributes.transform==null||node.attributes.transform===""||node.attributes.style!=null||Object.entries(node.attributes).some((([name,value])=>referencesProps$1.has(name)&&includesUrlReference(value)))){return}const computedStyle=computeStyle$3(stylesheet,node);const transformStyle=computedStyle.transform;if(transformStyle.type==="static"&&transformStyle.value!==node.attributes.transform){return}const matrix=transformsMultiply$1(transform2js$1(node.attributes.transform));const stroke=computedStyle.stroke?.type==="static"?computedStyle.stroke.value:null;const strokeWidth=computedStyle["stroke-width"]?.type==="static"?computedStyle["stroke-width"].value:null;const transformPrecision=params.transformPrecision;if(computedStyle.stroke?.type==="dynamic"||computedStyle["stroke-width"]?.type==="dynamic"){return}const scale=Number(Math.sqrt(matrix.data[0]*matrix.data[0]+matrix.data[1]*matrix.data[1]).toFixed(transformPrecision));if(stroke&&stroke!="none"){if(!params.applyTransformsStroked){return}if((matrix.data[0]!==matrix.data[3]||matrix.data[1]!==-matrix.data[2])&&(matrix.data[0]!==-matrix.data[3]||matrix.data[1]!==matrix.data[2])){return}if(scale!==1){if(node.attributes["vector-effect"]!=="non-scaling-stroke"){node.attributes["stroke-width"]=(strokeWidth||attrsGroupsDefaults$1.presentation["stroke-width"]).trim().replace(regNumericValues$1,(num=>removeLeadingZero$1(Number(num)*scale)));if(node.attributes["stroke-dashoffset"]!=null){node.attributes["stroke-dashoffset"]=node.attributes["stroke-dashoffset"].trim().replace(regNumericValues$1,(num=>removeLeadingZero$1(Number(num)*scale)))}if(node.attributes["stroke-dasharray"]!=null){node.attributes["stroke-dasharray"]=node.attributes["stroke-dasharray"].trim().replace(regNumericValues$1,(num=>removeLeadingZero$1(Number(num)*scale)))}}}}const pathData=path2js$2(node);applyMatrixToPathData(pathData,matrix.data);delete node.attributes.transform}}}};applyTransforms$2.applyTransforms=applyTransforms$1;const transformAbsolutePoint=(matrix,x,y)=>{const newX=matrix[0]*x+matrix[2]*y+matrix[4];const newY=matrix[1]*x+matrix[3]*y+matrix[5];return[newX,newY]};const transformRelativePoint=(matrix,x,y)=>{const newX=matrix[0]*x+matrix[2]*y;const newY=matrix[1]*x+matrix[3]*y;return[newX,newY]};const applyMatrixToPathData=(pathData,matrix)=>{const start=[0,0];const cursor=[0,0];for(const pathItem of pathData){let{command:command,args:args}=pathItem;if(command==="M"){cursor[0]=args[0];cursor[1]=args[1];start[0]=cursor[0];start[1]=cursor[1];const[x,y]=transformAbsolutePoint(matrix,args[0],args[1]);args[0]=x;args[1]=y}if(command==="m"){cursor[0]+=args[0];cursor[1]+=args[1];start[0]=cursor[0];start[1]=cursor[1];const[x,y]=transformRelativePoint(matrix,args[0],args[1]);args[0]=x;args[1]=y}if(command==="H"){command="L";args=[args[0],cursor[1]]}if(command==="h"){command="l";args=[args[0],0]}if(command==="V"){command="L";args=[cursor[0],args[0]]}if(command==="v"){command="l";args=[0,args[0]]}if(command==="L"){cursor[0]=args[0];cursor[1]=args[1];const[x,y]=transformAbsolutePoint(matrix,args[0],args[1]);args[0]=x;args[1]=y}if(command==="l"){cursor[0]+=args[0];cursor[1]+=args[1];const[x,y]=transformRelativePoint(matrix,args[0],args[1]);args[0]=x;args[1]=y}if(command==="C"){cursor[0]=args[4];cursor[1]=args[5];const[x1,y1]=transformAbsolutePoint(matrix,args[0],args[1]);const[x2,y2]=transformAbsolutePoint(matrix,args[2],args[3]);const[x,y]=transformAbsolutePoint(matrix,args[4],args[5]);args[0]=x1;args[1]=y1;args[2]=x2;args[3]=y2;args[4]=x;args[5]=y}if(command==="c"){cursor[0]+=args[4];cursor[1]+=args[5];const[x1,y1]=transformRelativePoint(matrix,args[0],args[1]);const[x2,y2]=transformRelativePoint(matrix,args[2],args[3]);const[x,y]=transformRelativePoint(matrix,args[4],args[5]);args[0]=x1;args[1]=y1;args[2]=x2;args[3]=y2;args[4]=x;args[5]=y}if(command==="S"){cursor[0]=args[2];cursor[1]=args[3];const[x2,y2]=transformAbsolutePoint(matrix,args[0],args[1]);const[x,y]=transformAbsolutePoint(matrix,args[2],args[3]);args[0]=x2;args[1]=y2;args[2]=x;args[3]=y}if(command==="s"){cursor[0]+=args[2];cursor[1]+=args[3];const[x2,y2]=transformRelativePoint(matrix,args[0],args[1]);const[x,y]=transformRelativePoint(matrix,args[2],args[3]);args[0]=x2;args[1]=y2;args[2]=x;args[3]=y}if(command==="Q"){cursor[0]=args[2];cursor[1]=args[3];const[x1,y1]=transformAbsolutePoint(matrix,args[0],args[1]);const[x,y]=transformAbsolutePoint(matrix,args[2],args[3]);args[0]=x1;args[1]=y1;args[2]=x;args[3]=y}if(command==="q"){cursor[0]+=args[2];cursor[1]+=args[3];const[x1,y1]=transformRelativePoint(matrix,args[0],args[1]);const[x,y]=transformRelativePoint(matrix,args[2],args[3]);args[0]=x1;args[1]=y1;args[2]=x;args[3]=y}if(command==="T"){cursor[0]=args[0];cursor[1]=args[1];const[x,y]=transformAbsolutePoint(matrix,args[0],args[1]);args[0]=x;args[1]=y}if(command==="t"){cursor[0]+=args[0];cursor[1]+=args[1];const[x,y]=transformRelativePoint(matrix,args[0],args[1]);args[0]=x;args[1]=y}if(command==="A"){transformArc(cursor,args,matrix);cursor[0]=args[5];cursor[1]=args[6];if(Math.abs(args[2])>80){const a=args[0];const rotation=args[2];args[0]=args[1];args[1]=a;args[2]=rotation+(rotation>0?-90:90)}const[x,y]=transformAbsolutePoint(matrix,args[5],args[6]);args[5]=x;args[6]=y}if(command==="a"){transformArc([0,0],args,matrix);cursor[0]+=args[5];cursor[1]+=args[6];if(Math.abs(args[2])>80){const a=args[0];const rotation=args[2];args[0]=args[1];args[1]=a;args[2]=rotation+(rotation>0?-90:90)}const[x,y]=transformRelativePoint(matrix,args[5],args[6]);args[5]=x;args[6]=y}if(command==="z"||command==="Z"){cursor[0]=start[0];cursor[1]=start[1]}pathItem.command=command;pathItem.args=args}};const{collectStylesheet:collectStylesheet$3,computeStyle:computeStyle$2}=style;const{visit:visit}=xast;const{pathElems:pathElems}=_collections;const{path2js:path2js$1,js2path:js2path$1}=_path;const{applyTransforms:applyTransforms}=applyTransforms$2;const{cleanupOutData:cleanupOutData$1,toFixed:toFixed$1}=tools;convertPathData$1.name="convertPathData";convertPathData$1.description="optimizes path data: writes in shorter form, applies transformations";let roundData;let precision;let error;let arcThreshold;let arcTolerance;convertPathData$1.fn=(root,params)=>{const{applyTransforms:_applyTransforms=true,applyTransformsStroked:applyTransformsStroked=true,makeArcs:makeArcs={threshold:2.5,tolerance:.5},straightCurves:straightCurves=true,convertToQ:convertToQ=true,lineShorthands:lineShorthands=true,convertToZ:convertToZ=true,curveSmoothShorthands:curveSmoothShorthands=true,floatPrecision:floatPrecision=3,transformPrecision:transformPrecision=5,smartArcRounding:smartArcRounding=true,removeUseless:removeUseless=true,collapseRepeated:collapseRepeated=true,utilizeAbsolute:utilizeAbsolute=true,leadingZero:leadingZero=true,negativeExtraSpace:negativeExtraSpace=true,noSpaceAfterFlags:noSpaceAfterFlags=false,forceAbsolutePath:forceAbsolutePath=false}=params;const newParams={applyTransforms:_applyTransforms,applyTransformsStroked:applyTransformsStroked,makeArcs:makeArcs,straightCurves:straightCurves,convertToQ:convertToQ,lineShorthands:lineShorthands,convertToZ:convertToZ,curveSmoothShorthands:curveSmoothShorthands,floatPrecision:floatPrecision,transformPrecision:transformPrecision,smartArcRounding:smartArcRounding,removeUseless:removeUseless,collapseRepeated:collapseRepeated,utilizeAbsolute:utilizeAbsolute,leadingZero:leadingZero,negativeExtraSpace:negativeExtraSpace,noSpaceAfterFlags:noSpaceAfterFlags,forceAbsolutePath:forceAbsolutePath};if(_applyTransforms){visit(root,applyTransforms(root,{transformPrecision:transformPrecision,applyTransformsStroked:applyTransformsStroked}))}const stylesheet=collectStylesheet$3(root);return{element:{enter:node=>{if(pathElems.has(node.name)&&node.attributes.d!=null){const computedStyle=computeStyle$2(stylesheet,node);precision=floatPrecision;error=precision!==false?+Math.pow(.1,precision).toFixed(precision):.01;roundData=precision&&precision>0&&precision<20?strongRound:round$1;if(makeArcs){arcThreshold=makeArcs.threshold;arcTolerance=makeArcs.tolerance}const hasMarkerMid=computedStyle["marker-mid"]!=null;const maybeHasStroke=computedStyle.stroke&&(computedStyle.stroke.type==="dynamic"||computedStyle.stroke.value!=="none");const maybeHasLinecap=computedStyle["stroke-linecap"]&&(computedStyle["stroke-linecap"].type==="dynamic"||computedStyle["stroke-linecap"].value!=="butt");const maybeHasStrokeAndLinecap=maybeHasStroke&&maybeHasLinecap;const isSafeToUseZ=maybeHasStroke?computedStyle["stroke-linecap"]?.type==="static"&&computedStyle["stroke-linecap"].value==="round"&&computedStyle["stroke-linejoin"]?.type==="static"&&computedStyle["stroke-linejoin"].value==="round":true;var data=path2js$1(node);if(data.length){convertToRelative(data);data=filters(data,newParams,{isSafeToUseZ:isSafeToUseZ,maybeHasStrokeAndLinecap:maybeHasStrokeAndLinecap,hasMarkerMid:hasMarkerMid});if(utilizeAbsolute){data=convertToMixed(data,newParams)}js2path$1(node,data,newParams)}}}}}};const convertToRelative=pathData=>{let start=[0,0];let cursor=[0,0];let prevCoords=[0,0];for(let i=0;i<pathData.length;i+=1){const pathItem=pathData[i];let{command:command,args:args}=pathItem;if(command==="m"){cursor[0]+=args[0];cursor[1]+=args[1];start[0]=cursor[0];start[1]=cursor[1]}if(command==="M"){if(i!==0){command="m"}args[0]-=cursor[0];args[1]-=cursor[1];cursor[0]+=args[0];cursor[1]+=args[1];start[0]=cursor[0];start[1]=cursor[1]}if(command==="l"){cursor[0]+=args[0];cursor[1]+=args[1]}if(command==="L"){command="l";args[0]-=cursor[0];args[1]-=cursor[1];cursor[0]+=args[0];cursor[1]+=args[1]}if(command==="h"){cursor[0]+=args[0]}if(command==="H"){command="h";args[0]-=cursor[0];cursor[0]+=args[0]}if(command==="v"){cursor[1]+=args[0]}if(command==="V"){command="v";args[0]-=cursor[1];cursor[1]+=args[0]}if(command==="c"){cursor[0]+=args[4];cursor[1]+=args[5]}if(command==="C"){command="c";args[0]-=cursor[0];args[1]-=cursor[1];args[2]-=cursor[0];args[3]-=cursor[1];args[4]-=cursor[0];args[5]-=cursor[1];cursor[0]+=args[4];cursor[1]+=args[5]}if(command==="s"){cursor[0]+=args[2];cursor[1]+=args[3]}if(command==="S"){command="s";args[0]-=cursor[0];args[1]-=cursor[1];args[2]-=cursor[0];args[3]-=cursor[1];cursor[0]+=args[2];cursor[1]+=args[3]}if(command==="q"){cursor[0]+=args[2];cursor[1]+=args[3]}if(command==="Q"){command="q";args[0]-=cursor[0];args[1]-=cursor[1];args[2]-=cursor[0];args[3]-=cursor[1];cursor[0]+=args[2];cursor[1]+=args[3]}if(command==="t"){cursor[0]+=args[0];cursor[1]+=args[1]}if(command==="T"){command="t";args[0]-=cursor[0];args[1]-=cursor[1];cursor[0]+=args[0];cursor[1]+=args[1]}if(command==="a"){cursor[0]+=args[5];cursor[1]+=args[6]}if(command==="A"){command="a";args[5]-=cursor[0];args[6]-=cursor[1];cursor[0]+=args[5];cursor[1]+=args[6]}if(command==="Z"||command==="z"){cursor[0]=start[0];cursor[1]=start[1]}pathItem.command=command;pathItem.args=args;pathItem.base=prevCoords;pathItem.coords=[cursor[0],cursor[1]];prevCoords=pathItem.coords}return pathData};function filters(path,params,{isSafeToUseZ:isSafeToUseZ,maybeHasStrokeAndLinecap:maybeHasStrokeAndLinecap,hasMarkerMid:hasMarkerMid}){const stringify=data2Path.bind(null,params);const relSubpoint=[0,0];const pathBase=[0,0];let prev={};let prevQControlPoint;path=path.filter((function(item,index,path){const qControlPoint=prevQControlPoint;prevQControlPoint=undefined;let command=item.command;let data=item.args;let next=path[index+1];if(command!=="Z"&&command!=="z"){var sdata=data,circle;if(command==="s"){sdata=[0,0].concat(data);const pdata=prev.args;const n=pdata.length;sdata[0]=pdata[n-2]-pdata[n-4];sdata[1]=pdata[n-1]-pdata[n-3]}if(params.makeArcs&&(command=="c"||command=="s")&&isConvex(sdata)&&(circle=findCircle(sdata))){var r=roundData([circle.radius])[0],angle=findArcAngle(sdata,circle),sweep=sdata[5]*sdata[0]-sdata[4]*sdata[1]>0?1:0,arc={command:"a",args:[r,r,0,0,sweep,sdata[4],sdata[5]],coords:item.coords.slice(),base:item.base},output=[arc],relCenter=[circle.center[0]-sdata[4],circle.center[1]-sdata[5]],relCircle={center:relCenter,radius:circle.radius},arcCurves=[item],hasPrev=0,suffix="",nextLonghand;if(prev.command=="c"&&isConvex(prev.args)&&isArcPrev(prev.args,circle)||prev.command=="a"&&prev.sdata&&isArcPrev(prev.sdata,circle)){arcCurves.unshift(prev);arc.base=prev.base;arc.args[5]=arc.coords[0]-arc.base[0];arc.args[6]=arc.coords[1]-arc.base[1];var prevData=prev.command=="a"?prev.sdata:prev.args;var prevAngle=findArcAngle(prevData,{center:[prevData[4]+circle.center[0],prevData[5]+circle.center[1]],radius:circle.radius});angle+=prevAngle;if(angle>Math.PI)arc.args[3]=1;hasPrev=1}for(var j=index;(next=path[++j])&&(next.command==="c"||next.command==="s");){var nextData=next.args;if(next.command=="s"){nextLonghand=makeLonghand({command:"s",args:next.args.slice()},path[j-1].args);nextData=nextLonghand.args;nextLonghand.args=nextData.slice(0,2);suffix=stringify([nextLonghand])}if(isConvex(nextData)&&isArc(nextData,relCircle)){angle+=findArcAngle(nextData,relCircle);if(angle-2*Math.PI>.001)break;if(angle>Math.PI)arc.args[3]=1;arcCurves.push(next);if(2*Math.PI-angle>.001){arc.coords=next.coords;arc.args[5]=arc.coords[0]-arc.base[0];arc.args[6]=arc.coords[1]-arc.base[1]}else{arc.args[5]=2*(relCircle.center[0]-nextData[4]);arc.args[6]=2*(relCircle.center[1]-nextData[5]);arc.coords=[arc.base[0]+arc.args[5],arc.base[1]+arc.args[6]];arc={command:"a",args:[r,r,0,0,sweep,next.coords[0]-arc.coords[0],next.coords[1]-arc.coords[1]],coords:next.coords,base:arc.coords};output.push(arc);j++;break}relCenter[0]-=nextData[4];relCenter[1]-=nextData[5]}else break}if((stringify(output)+suffix).length<stringify(arcCurves).length){if(path[j]&&path[j].command=="s"){makeLonghand(path[j],path[j-1].args)}if(hasPrev){var prevArc=output.shift();roundData(prevArc.args);relSubpoint[0]+=prevArc.args[5]-prev.args[prev.args.length-2];relSubpoint[1]+=prevArc.args[6]-prev.args[prev.args.length-1];prev.command="a";prev.args=prevArc.args;item.base=prev.coords=prevArc.coords}arc=output.shift();if(arcCurves.length==1){item.sdata=sdata.slice()}else if(arcCurves.length-1-hasPrev>0){path.splice(index+1,arcCurves.length-1-hasPrev,...output)}if(!arc)return false;command="a";data=arc.args;item.coords=arc.coords}}if(precision!==false){if(command==="m"||command==="l"||command==="t"||command==="q"||command==="s"||command==="c"){for(var i=data.length;i--;){data[i]+=item.base[i%2]-relSubpoint[i%2]}}else if(command=="h"){data[0]+=item.base[0]-relSubpoint[0]}else if(command=="v"){data[0]+=item.base[1]-relSubpoint[1]}else if(command=="a"){data[5]+=item.base[0]-relSubpoint[0];data[6]+=item.base[1]-relSubpoint[1]}roundData(data);if(command=="h")relSubpoint[0]+=data[0];else if(command=="v")relSubpoint[1]+=data[0];else{relSubpoint[0]+=data[data.length-2];relSubpoint[1]+=data[data.length-1]}roundData(relSubpoint);if(command==="M"||command==="m"){pathBase[0]=relSubpoint[0];pathBase[1]=relSubpoint[1]}}const sagitta=command==="a"?calculateSagitta(data):undefined;if(params.smartArcRounding&&sagitta!==undefined&&precision){for(let precisionNew=precision;precisionNew>=0;precisionNew--){const radius=toFixed$1(data[0],precisionNew);const sagittaNew=calculateSagitta([radius,radius,...data.slice(2)]);if(Math.abs(sagitta-sagittaNew)<error){data[0]=radius;data[1]=radius}else{break}}}if(params.straightCurves){if(command==="c"&&isCurveStraightLine(data)||command==="s"&&isCurveStraightLine(sdata)){if(next&&next.command=="s")makeLonghand(next,data);command="l";data=data.slice(-2)}else if(command==="q"&&isCurveStraightLine(data)){if(next&&next.command=="t")makeLonghand(next,data);command="l";data=data.slice(-2)}else if(command==="t"&&prev.command!=="q"&&prev.command!=="t"){command="l";data=data.slice(-2)}else if(command==="a"&&(data[0]===0||data[1]===0||sagitta!==undefined&&sagitta<error)){command="l";data=data.slice(-2)}}if(params.convertToQ&&command=="c"){const x1=.75*(item.base[0]+data[0])-.25*item.base[0];const x2=.75*(item.base[0]+data[2])-.25*(item.base[0]+data[4]);if(Math.abs(x1-x2)<error*2){const y1=.75*(item.base[1]+data[1])-.25*item.base[1];const y2=.75*(item.base[1]+data[3])-.25*(item.base[1]+data[5]);if(Math.abs(y1-y2)<error*2){const newData=data.slice();newData.splice(0,4,x1+x2-item.base[0],y1+y2-item.base[1]);roundData(newData);const originalLength=cleanupOutData$1(data,params).length,newLength=cleanupOutData$1(newData,params).length;if(newLength<originalLength){command="q";data=newData;if(next&&next.command=="s")makeLonghand(next,data)}}}}if(params.lineShorthands&&command==="l"){if(data[1]===0){command="h";data.pop()}else if(data[0]===0){command="v";data.shift()}}if(params.collapseRepeated&&hasMarkerMid===false&&(command==="m"||command==="h"||command==="v")&&prev.command&&command==prev.command.toLowerCase()&&(command!="h"&&command!="v"||prev.args[0]>=0==data[0]>=0)){prev.args[0]+=data[0];if(command!="h"&&command!="v"){prev.args[1]+=data[1]}prev.coords=item.coords;path[index]=prev;return false}if(params.curveSmoothShorthands&&prev.command){if(command==="c"){if(prev.command==="c"&&Math.abs(data[0]- -(prev.args[2]-prev.args[4]))<error&&Math.abs(data[1]- -(prev.args[3]-prev.args[5]))<error){command="s";data=data.slice(2)}else if(prev.command==="s"&&Math.abs(data[0]- -(prev.args[0]-prev.args[2]))<error&&Math.abs(data[1]- -(prev.args[1]-prev.args[3]))<error){command="s";data=data.slice(2)}else if(prev.command!=="c"&&prev.command!=="s"&&Math.abs(data[0])<error&&Math.abs(data[1])<error){command="s";data=data.slice(2)}}else if(command==="q"){if(prev.command==="q"&&Math.abs(data[0]-(prev.args[2]-prev.args[0]))<error&&Math.abs(data[1]-(prev.args[3]-prev.args[1]))<error){command="t";data=data.slice(2)}else if(prev.command==="t"){const predictedControlPoint=reflectPoint(qControlPoint,item.base);const realControlPoint=[data[0]+item.base[0],data[1]+item.base[1]];if(Math.abs(predictedControlPoint[0]-realControlPoint[0])<error&&Math.abs(predictedControlPoint[1]-realControlPoint[1])<error){command="t";data=data.slice(2)}}}}if(params.removeUseless&&!maybeHasStrokeAndLinecap){if((command==="l"||command==="h"||command==="v"||command==="q"||command==="t"||command==="c"||command==="s")&&data.every((function(i){return i===0}))){path[index]=prev;return false}if(command==="a"&&data[5]===0&&data[6]===0){path[index]=prev;return false}}if(params.convertToZ&&(isSafeToUseZ||next?.command==="Z"||next?.command==="z")&&(command==="l"||command==="h"||command==="v")){if(Math.abs(pathBase[0]-item.coords[0])<error&&Math.abs(pathBase[1]-item.coords[1])<error){command="z";data=[]}}item.command=command;item.args=data}else{relSubpoint[0]=pathBase[0];relSubpoint[1]=pathBase[1];if(prev.command==="Z"||prev.command==="z")return false}if((command==="Z"||command==="z")&&params.removeUseless&&isSafeToUseZ&&Math.abs(item.base[0]-item.coords[0])<error/10&&Math.abs(item.base[1]-item.coords[1])<error/10)return false;if(command==="q"){prevQControlPoint=[data[0]+item.base[0],data[1]+item.base[1]]}else if(command==="t"){if(qControlPoint){prevQControlPoint=reflectPoint(qControlPoint,item.base)}else{prevQControlPoint=item.coords}}prev=item;return true}));return path}function convertToMixed(path,params){var prev=path[0];path=path.filter((function(item,index){if(index==0)return true;if(item.command==="Z"||item.command==="z"){prev=item;return true}var command=item.command,data=item.args,adata=data.slice(),rdata=data.slice();if(command==="m"||command==="l"||command==="t"||command==="q"||command==="s"||command==="c"){for(var i=adata.length;i--;){adata[i]+=item.base[i%2]}}else if(command=="h"){adata[0]+=item.base[0]}else if(command=="v"){adata[0]+=item.base[1]}else if(command=="a"){adata[5]+=item.base[0];adata[6]+=item.base[1]}roundData(adata);roundData(rdata);var absoluteDataStr=cleanupOutData$1(adata,params),relativeDataStr=cleanupOutData$1(rdata,params);if(params.forceAbsolutePath||absoluteDataStr.length<relativeDataStr.length&&!(params.negativeExtraSpace&&command==prev.command&&prev.command.charCodeAt(0)>96&&absoluteDataStr.length==relativeDataStr.length-1&&(data[0]<0||Math.floor(data[0])===0&&!Number.isInteger(data[0])&&prev.args[prev.args.length-1]%1))){item.command=command.toUpperCase();item.args=adata}prev=item;return true}));return path}function isConvex(data){var center=getIntersection([0,0,data[2],data[3],data[0],data[1],data[4],data[5]]);return center!=null&&data[2]<center[0]==center[0]<0&&data[3]<center[1]==center[1]<0&&data[4]<center[0]==center[0]<data[0]&&data[5]<center[1]==center[1]<data[1]}function getIntersection(coords){var a1=coords[1]-coords[3],b1=coords[2]-coords[0],c1=coords[0]*coords[3]-coords[2]*coords[1],a2=coords[5]-coords[7],b2=coords[6]-coords[4],c2=coords[4]*coords[7]-coords[5]*coords[6],denom=a1*b2-a2*b1;if(!denom)return;var cross=[(b1*c2-b2*c1)/denom,(a1*c2-a2*c1)/-denom];if(!isNaN(cross[0])&&!isNaN(cross[1])&&isFinite(cross[0])&&isFinite(cross[1])){return cross}}function strongRound(data){const precisionNum=precision||0;for(let i=data.length;i-- >0;){const fixed=toFixed$1(data[i],precisionNum);if(fixed!==data[i]){const rounded=toFixed$1(data[i],precisionNum-1);data[i]=toFixed$1(Math.abs(rounded-data[i]),precisionNum+1)>=error?fixed:rounded}}return data}function round$1(data){for(var i=data.length;i-- >0;){data[i]=Math.round(data[i])}return data}function isCurveStraightLine(data){var i=data.length-2,a=-data[i+1],b=data[i],d=1/(a*a+b*b);if(i<=1||!isFinite(d))return false;while((i-=2)>=0){if(Math.sqrt(Math.pow(a*data[i]+b*data[i+1],2)*d)>error)return false}return true}function calculateSagitta(data){if(data[3]===1)return undefined;const[rx,ry]=data;if(Math.abs(rx-ry)>error)return undefined;const chord=Math.sqrt(data[5]**2+data[6]**2);if(chord>rx*2)return undefined;return rx-Math.sqrt(rx**2-.25*chord**2)}function makeLonghand(item,data){switch(item.command){case"s":item.command="c";break;case"t":item.command="q";break}item.args.unshift(data[data.length-2]-data[data.length-4],data[data.length-1]-data[data.length-3]);return item}function getDistance(point1,point2){return Math.sqrt((point1[0]-point2[0])**2+(point1[1]-point2[1])**2)}function reflectPoint(controlPoint,base){return[2*base[0]-controlPoint[0],2*base[1]-controlPoint[1]]}function getCubicBezierPoint(curve,t){var sqrT=t*t,cubT=sqrT*t,mt=1-t,sqrMt=mt*mt;return[3*sqrMt*t*curve[0]+3*mt*sqrT*curve[2]+cubT*curve[4],3*sqrMt*t*curve[1]+3*mt*sqrT*curve[3]+cubT*curve[5]]}function findCircle(curve){var midPoint=getCubicBezierPoint(curve,1/2),m1=[midPoint[0]/2,midPoint[1]/2],m2=[(midPoint[0]+curve[4])/2,(midPoint[1]+curve[5])/2],center=getIntersection([m1[0],m1[1],m1[0]+m1[1],m1[1]-m1[0],m2[0],m2[1],m2[0]+(m2[1]-midPoint[1]),m2[1]-(m2[0]-midPoint[0])]),radius=center&&getDistance([0,0],center),tolerance=Math.min(arcThreshold*error,arcTolerance*radius/100);if(center&&radius<1e15&&[1/4,3/4].every((function(point){return Math.abs(getDistance(getCubicBezierPoint(curve,point),center)-radius)<=tolerance})))return{center:center,radius:radius}}function isArc(curve,circle){var tolerance=Math.min(arcThreshold*error,arcTolerance*circle.radius/100);return[0,1/4,1/2,3/4,1].every((function(point){return Math.abs(getDistance(getCubicBezierPoint(curve,point),circle.center)-circle.radius)<=tolerance}))}function isArcPrev(curve,circle){return isArc(curve,{center:[circle.center[0]+curve[4],circle.center[1]+curve[5]],radius:circle.radius})}function findArcAngle(curve,relCircle){var x1=-relCircle.center[0],y1=-relCircle.center[1],x2=curve[4]-relCircle.center[0],y2=curve[5]-relCircle.center[1];return Math.acos((x1*x2+y1*y2)/Math.sqrt((x1*x1+y1*y1)*(x2*x2+y2*y2)))}function data2Path(params,pathData){return pathData.reduce((function(pathString,item){var strData="";if(item.args){strData=cleanupOutData$1(roundData(item.args.slice()),params)}return pathString+item.command+strData}),"")}var convertTransform$2={};const{cleanupOutData:cleanupOutData,toFixed:toFixed}=tools;const{transform2js:transform2js,transformsMultiply:transformsMultiply,matrixToTransform:matrixToTransform}=_transforms;convertTransform$2.name="convertTransform";convertTransform$2.description="collapses multiple transformations and optimizes it";convertTransform$2.fn=(_root,params)=>{const{convertToShorts:convertToShorts=true,degPrecision:degPrecision,floatPrecision:floatPrecision=3,transformPrecision:transformPrecision=5,matrixToTransform:matrixToTransform=true,shortTranslate:shortTranslate=true,shortScale:shortScale=true,shortRotate:shortRotate=true,removeUseless:removeUseless=true,collapseIntoOne:collapseIntoOne=true,leadingZero:leadingZero=true,negativeExtraSpace:negativeExtraSpace=false}=params;const newParams={convertToShorts:convertToShorts,degPrecision:degPrecision,floatPrecision:floatPrecision,transformPrecision:transformPrecision,matrixToTransform:matrixToTransform,shortTranslate:shortTranslate,shortScale:shortScale,shortRotate:shortRotate,removeUseless:removeUseless,collapseIntoOne:collapseIntoOne,leadingZero:leadingZero,negativeExtraSpace:negativeExtraSpace};return{element:{enter:node=>{if(node.attributes.transform!=null){convertTransform$1(node,"transform",newParams)}if(node.attributes.gradientTransform!=null){convertTransform$1(node,"gradientTransform",newParams)}if(node.attributes.patternTransform!=null){convertTransform$1(node,"patternTransform",newParams)}}}}};const convertTransform$1=(item,attrName,params)=>{let data=transform2js(item.attributes[attrName]);params=definePrecision(data,params);if(params.collapseIntoOne&&data.length>1){data=[transformsMultiply(data)]}if(params.convertToShorts){data=convertToShorts(data,params)}else{data.forEach((item=>roundTransform(item,params)))}if(params.removeUseless){data=removeUseless(data)}if(data.length){item.attributes[attrName]=js2transform(data,params)}else{delete item.attributes[attrName]}};const definePrecision=(data,{...newParams})=>{const matrixData=[];for(const item of data){if(item.name=="matrix"){matrixData.push(...item.data.slice(0,4))}}let numberOfDigits=newParams.transformPrecision;if(matrixData.length){newParams.transformPrecision=Math.min(newParams.transformPrecision,Math.max.apply(Math,matrixData.map(floatDigits))||newParams.transformPrecision);numberOfDigits=Math.max.apply(Math,matrixData.map((n=>n.toString().replace(/\D+/g,"").length)))}if(newParams.degPrecision==null){newParams.degPrecision=Math.max(0,Math.min(newParams.floatPrecision,numberOfDigits-2))}return newParams};const degRound=(data,params)=>{if(params.degPrecision!=null&&params.degPrecision>=1&&params.floatPrecision<20){return smartRound(params.degPrecision,data)}else{return round(data)}};const floatRound=(data,params)=>{if(params.floatPrecision>=1&&params.floatPrecision<20){return smartRound(params.floatPrecision,data)}else{return round(data)}};const transformRound=(data,params)=>{if(params.transformPrecision>=1&&params.floatPrecision<20){return smartRound(params.transformPrecision,data)}else{return round(data)}};const floatDigits=n=>{const str=n.toString();return str.slice(str.indexOf(".")).length-1};const convertToShorts=(transforms,params)=>{for(var i=0;i<transforms.length;i++){let transform=transforms[i];if(params.matrixToTransform&&transform.name==="matrix"){var decomposed=matrixToTransform(transform,params);if(js2transform(decomposed,params).length<=js2transform([transform],params).length){transforms.splice(i,1,...decomposed)}transform=transforms[i]}roundTransform(transform,params);if(params.shortTranslate&&transform.name==="translate"&&transform.data.length===2&&!transform.data[1]){transform.data.pop()}if(params.shortScale&&transform.name==="scale"&&transform.data.length===2&&transform.data[0]===transform.data[1]){transform.data.pop()}if(params.shortRotate&&transforms[i-2]?.name==="translate"&&transforms[i-1].name==="rotate"&&transforms[i].name==="translate"&&transforms[i-2].data[0]===-transforms[i].data[0]&&transforms[i-2].data[1]===-transforms[i].data[1]){transforms.splice(i-2,3,{name:"rotate",data:[transforms[i-1].data[0],transforms[i-2].data[0],transforms[i-2].data[1]]});i-=2}}return transforms};const removeUseless=transforms=>transforms.filter((transform=>{if(["translate","rotate","skewX","skewY"].indexOf(transform.name)>-1&&(transform.data.length==1||transform.name=="rotate")&&!transform.data[0]||transform.name=="translate"&&!transform.data[0]&&!transform.data[1]||transform.name=="scale"&&transform.data[0]==1&&(transform.data.length<2||transform.data[1]==1)||transform.name=="matrix"&&transform.data[0]==1&&transform.data[3]==1&&!(transform.data[1]||transform.data[2]||transform.data[4]||transform.data[5])){return false}return true}));const js2transform=(transformJS,params)=>{const transformString=transformJS.map((transform=>{roundTransform(transform,params);return`${transform.name}(${cleanupOutData(transform.data,params)})`})).join("");return transformString};const roundTransform=(transform,params)=>{switch(transform.name){case"translate":transform.data=floatRound(transform.data,params);break;case"rotate":transform.data=[...degRound(transform.data.slice(0,1),params),...floatRound(transform.data.slice(1),params)];break;case"skewX":case"skewY":transform.data=degRound(transform.data,params);break;case"scale":transform.data=transformRound(transform.data,params);break;case"matrix":transform.data=[...transformRound(transform.data.slice(0,4),params),...floatRound(transform.data.slice(4),params)];break}return transform};const round=data=>data.map(Math.round);const smartRound=(precision,data)=>{for(var i=data.length,tolerance=+Math.pow(.1,precision).toFixed(precision);i--;){if(toFixed(data[i],precision)!==data[i]){var rounded=+data[i].toFixed(precision-1);data[i]=+Math.abs(rounded-data[i]).toFixed(precision+1)>=tolerance?+data[i].toFixed(precision):rounded}}return data};var removeEmptyAttrs$1={};const{attrsGroups:attrsGroups$2}=_collections;removeEmptyAttrs$1.name="removeEmptyAttrs";removeEmptyAttrs$1.description="removes empty attributes";removeEmptyAttrs$1.fn=()=>({element:{enter:node=>{for(const[name,value]of Object.entries(node.attributes)){if(value===""&&!attrsGroups$2.conditionalProcessing.has(name)){delete node.attributes[name]}}}}});var removeEmptyContainers$1={};const{detachNodeFromParent:detachNodeFromParent$9}=xast;const{elemsGroups:elemsGroups}=_collections;removeEmptyContainers$1.name="removeEmptyContainers";removeEmptyContainers$1.description="removes empty container elements";removeEmptyContainers$1.fn=()=>({element:{exit:(node,parentNode)=>{if(node.name==="svg"||!elemsGroups.container.has(node.name)||node.children.length!==0){return}if(node.name==="pattern"&&Object.keys(node.attributes).length!==0){return}if(node.name==="g"&&node.attributes.filter!=null){return}if(node.name==="mask"&&node.attributes.id!=null){return}if(parentNode.type==="element"&&parentNode.name==="switch"){return}detachNodeFromParent$9(node,parentNode)}}});var mergePaths$1={};const{collectStylesheet:collectStylesheet$2,computeStyle:computeStyle$1}=style;const{path2js:path2js,js2path:js2path,intersects:intersects$1}=_path;mergePaths$1.name="mergePaths";mergePaths$1.description="merges multiple paths in one if possible";mergePaths$1.fn=(root,params)=>{const{force:force=false,floatPrecision:floatPrecision,noSpaceAfterFlags:noSpaceAfterFlags=false}=params;const stylesheet=collectStylesheet$2(root);return{element:{enter:node=>{if(node.children.length<=1){return}const elementsToRemove=[];let prevChild=node.children[0];let prevPathData=null;const updatePreviousPath=(child,pathData)=>{js2path(child,pathData,{floatPrecision:floatPrecision,noSpaceAfterFlags:noSpaceAfterFlags});prevPathData=null};for(let i=1;i<node.children.length;i++){const child=node.children[i];if(prevChild.type!=="element"||prevChild.name!=="path"||prevChild.children.length!==0||prevChild.attributes.d==null){if(prevPathData&&prevChild.type==="element"){updatePreviousPath(prevChild,prevPathData)}prevChild=child;continue}if(child.type!=="element"||child.name!=="path"||child.children.length!==0||child.attributes.d==null){if(prevPathData){updatePreviousPath(prevChild,prevPathData)}prevChild=child;continue}const computedStyle=computeStyle$1(stylesheet,child);if(computedStyle["marker-start"]||computedStyle["marker-mid"]||computedStyle["marker-end"]){if(prevPathData){updatePreviousPath(prevChild,prevPathData)}prevChild=child;continue}const childAttrs=Object.keys(child.attributes);if(childAttrs.length!==Object.keys(prevChild.attributes).length){if(prevPathData){updatePreviousPath(prevChild,prevPathData)}prevChild=child;continue}const areAttrsEqual=childAttrs.some((attr=>attr!=="d"&&prevChild.type==="element"&&prevChild.attributes[attr]!==child.attributes[attr]));if(areAttrsEqual){if(prevPathData){updatePreviousPath(prevChild,prevPathData)}prevChild=child;continue}const hasPrevPath=prevPathData!=null;const currentPathData=path2js(child);prevPathData=prevPathData??path2js(prevChild);if(force||!intersects$1(prevPathData,currentPathData)){prevPathData.push(...currentPathData);elementsToRemove.push(child);continue}if(hasPrevPath){updatePreviousPath(prevChild,prevPathData)}prevChild=child;prevPathData=null}if(prevPathData&&prevChild.type==="element"){updatePreviousPath(prevChild,prevPathData)}node.children=node.children.filter((child=>!elementsToRemove.includes(child)))}}}};var removeUnusedNS$1={};removeUnusedNS$1.name="removeUnusedNS";removeUnusedNS$1.description="removes unused namespaces declaration";removeUnusedNS$1.fn=()=>{const unusedNamespaces=new Set;return{element:{enter:(node,parentNode)=>{if(node.name==="svg"&&parentNode.type==="root"){for(const name of Object.keys(node.attributes)){if(name.startsWith("xmlns:")){const local=name.slice("xmlns:".length);unusedNamespaces.add(local)}}}if(unusedNamespaces.size!==0){if(node.name.includes(":")){const[ns]=node.name.split(":");if(unusedNamespaces.has(ns)){unusedNamespaces.delete(ns)}}for(const name of Object.keys(node.attributes)){if(name.includes(":")){const[ns]=name.split(":");unusedNamespaces.delete(ns)}}}},exit:(node,parentNode)=>{if(node.name==="svg"&&parentNode.type==="root"){for(const name of unusedNamespaces){delete node.attributes[`xmlns:${name}`]}}}}}};var sortAttrs$1={};sortAttrs$1.name="sortAttrs";sortAttrs$1.description="Sort element attributes for better compression";sortAttrs$1.fn=(_root,params)=>{const{order:order=["id","width","height","x","x1","x2","y","y1","y2","cx","cy","r","fill","stroke","marker","d","points"],xmlnsOrder:xmlnsOrder="front"}=params;const getNsPriority=name=>{if(xmlnsOrder==="front"){if(name==="xmlns"){return 3}if(name.startsWith("xmlns:")){return 2}}if(name.includes(":")){return 1}return 0};const compareAttrs=([aName],[bName])=>{const aPriority=getNsPriority(aName);const bPriority=getNsPriority(bName);const priorityNs=bPriority-aPriority;if(priorityNs!==0){return priorityNs}const[aPart]=aName.split("-");const[bPart]=bName.split("-");if(aPart!==bPart){const aInOrderFlag=order.includes(aPart)?1:0;const bInOrderFlag=order.includes(bPart)?1:0;if(aInOrderFlag===1&&bInOrderFlag===1){return order.indexOf(aPart)-order.indexOf(bPart)}const priorityOrder=bInOrderFlag-aInOrderFlag;if(priorityOrder!==0){return priorityOrder}}return aName<bName?-1:1};return{element:{enter:node=>{const attrs=Object.entries(node.attributes);attrs.sort(compareAttrs);const sortedAttributes={};for(const[name,value]of attrs){sortedAttributes[name]=value}node.attributes=sortedAttributes}}}};var sortDefsChildren$1={};sortDefsChildren$1.name="sortDefsChildren";sortDefsChildren$1.description="Sorts children of <defs> to improve compression";sortDefsChildren$1.fn=()=>({element:{enter:node=>{if(node.name==="defs"){const frequencies=new Map;for(const child of node.children){if(child.type==="element"){const frequency=frequencies.get(child.name);if(frequency==null){frequencies.set(child.name,1)}else{frequencies.set(child.name,frequency+1)}}}node.children.sort(((a,b)=>{if(a.type!=="element"||b.type!=="element"){return 0}const aFrequency=frequencies.get(a.name);const bFrequency=frequencies.get(b.name);if(aFrequency!=null&&bFrequency!=null){const frequencyComparison=bFrequency-aFrequency;if(frequencyComparison!==0){return frequencyComparison}}const lengthComparison=b.name.length-a.name.length;if(lengthComparison!==0){return lengthComparison}if(a.name!==b.name){return a.name>b.name?-1:1}return 0}))}}}});var removeTitle$1={};const{detachNodeFromParent:detachNodeFromParent$8}=xast;removeTitle$1.name="removeTitle";removeTitle$1.description="removes <title>";removeTitle$1.fn=()=>({element:{enter:(node,parentNode)=>{if(node.name==="title"){detachNodeFromParent$8(node,parentNode)}}}});var removeDesc$1={};const{detachNodeFromParent:detachNodeFromParent$7}=xast;removeDesc$1.name="removeDesc";removeDesc$1.description="removes <desc>";const standardDescs=/^(Created with|Created using)/;removeDesc$1.fn=(root,params)=>{const{removeAny:removeAny=false}=params;return{element:{enter:(node,parentNode)=>{if(node.name==="desc"){if(removeAny||node.children.length===0||node.children[0].type==="text"&&standardDescs.test(node.children[0].value)){detachNodeFromParent$7(node,parentNode)}}}}}};const{createPreset:createPreset}=plugins;const removeDoctype=removeDoctype$1;const removeXMLProcInst=removeXMLProcInst$1;const removeComments=removeComments$1;const removeMetadata=removeMetadata$1;const removeEditorsNSData=removeEditorsNSData$1;const cleanupAttrs=cleanupAttrs$1;const mergeStyles=mergeStyles$1;const inlineStyles=inlineStyles$1;const minifyStyles=minifyStyles$1;const cleanupIds=cleanupIds$1;const removeUselessDefs=removeUselessDefs$1;const cleanupNumericValues=cleanupNumericValues$1;const convertColors=convertColors$1;const removeUnknownsAndDefaults=removeUnknownsAndDefaults$1;const removeNonInheritableGroupAttrs=removeNonInheritableGroupAttrs$1;const removeUselessStrokeAndFill=removeUselessStrokeAndFill$1;const removeViewBox=removeViewBox$1;const cleanupEnableBackground=cleanupEnableBackground$1;const removeHiddenElems=removeHiddenElems$1;const removeEmptyText=removeEmptyText$1;const convertShapeToPath=convertShapeToPath$1;const convertEllipseToCircle=convertEllipseToCircle$1;const moveElemsAttrsToGroup=moveElemsAttrsToGroup$1;const moveGroupAttrsToElems=moveGroupAttrsToElems$1;const collapseGroups=collapseGroups$1;const convertPathData=convertPathData$1;const convertTransform=convertTransform$2;const removeEmptyAttrs=removeEmptyAttrs$1;const removeEmptyContainers=removeEmptyContainers$1;const mergePaths=mergePaths$1;const removeUnusedNS=removeUnusedNS$1;const sortAttrs=sortAttrs$1;const sortDefsChildren=sortDefsChildren$1;const removeTitle=removeTitle$1;const removeDesc=removeDesc$1;const presetDefault=createPreset({name:"preset-default",plugins:[removeDoctype,removeXMLProcInst,removeComments,removeMetadata,removeEditorsNSData,cleanupAttrs,mergeStyles,inlineStyles,minifyStyles,cleanupIds,removeUselessDefs,cleanupNumericValues,convertColors,removeUnknownsAndDefaults,removeNonInheritableGroupAttrs,removeUselessStrokeAndFill,removeViewBox,cleanupEnableBackground,removeHiddenElems,removeEmptyText,convertShapeToPath,convertEllipseToCircle,moveElemsAttrsToGroup,moveGroupAttrsToElems,collapseGroups,convertPathData,convertTransform,removeEmptyAttrs,removeEmptyContainers,mergePaths,removeUnusedNS,sortAttrs,sortDefsChildren,removeTitle,removeDesc]});var presetDefault_1=presetDefault;var addAttributesToSVGElement={};addAttributesToSVGElement.name="addAttributesToSVGElement";addAttributesToSVGElement.description="adds attributes to an outer <svg> element";var ENOCLS$1=`Error in plugin "addAttributesToSVGElement": absent parameters.\nIt should have a list of "attributes" or one "attribute".\nConfig example:\n\nplugins: [\n {\n name: 'addAttributesToSVGElement',\n params: {\n attribute: "mySvg"\n }\n }\n]\n\nplugins: [\n {\n name: 'addAttributesToSVGElement',\n params: {\n attributes: ["mySvg", "size-big"]\n }\n }\n]\n\nplugins: [\n {\n name: 'addAttributesToSVGElement',\n params: {\n attributes: [\n {\n focusable: false\n },\n {\n 'data-image': icon\n }\n ]\n }\n }\n]\n`;addAttributesToSVGElement.fn=(root,params)=>{if(!Array.isArray(params.attributes)&&!params.attribute){console.error(ENOCLS$1);return null}const attributes=params.attributes||[params.attribute];return{element:{enter:(node,parentNode)=>{if(node.name==="svg"&&parentNode.type==="root"){for(const attribute of attributes){if(typeof attribute==="string"){if(node.attributes[attribute]==null){node.attributes[attribute]=undefined}}if(typeof attribute==="object"){for(const key of Object.keys(attribute)){if(node.attributes[key]==null){node.attributes[key]=attribute[key]}}}}}}}}};var addClassesToSVGElement={};addClassesToSVGElement.name="addClassesToSVGElement";addClassesToSVGElement.description="adds classnames to an outer <svg> element";var ENOCLS=`Error in plugin "addClassesToSVGElement": absent parameters.\nIt should have a list of classes in "classNames" or one "className".\nConfig example:\n\nplugins: [\n {\n name: "addClassesToSVGElement",\n params: {\n className: "mySvg"\n }\n }\n]\n\nplugins: [\n {\n name: "addClassesToSVGElement",\n params: {\n classNames: ["mySvg", "size-big"]\n }\n }\n]\n`;addClassesToSVGElement.fn=(root,params)=>{if(!(Array.isArray(params.classNames)&&params.classNames.some(String))&&!params.className){console.error(ENOCLS);return null}const classNames=params.classNames||[params.className];return{element:{enter:(node,parentNode)=>{if(node.name==="svg"&&parentNode.type==="root"){const classList=new Set(node.attributes.class==null?null:node.attributes.class.split(" "));for(const className of classNames){if(className!=null){classList.add(className)}}node.attributes.class=Array.from(classList).join(" ")}}}}};var cleanupListOfValues={};const{removeLeadingZero:removeLeadingZero}=tools;cleanupListOfValues.name="cleanupListOfValues";cleanupListOfValues.description="rounds list of values to the fixed precision";const regNumericValues=/^([-+]?\d*\.?\d+([eE][-+]?\d+)?)(px|pt|pc|mm|cm|m|in|ft|em|ex|%)?$/;const regSeparator=/\s+,?\s*|,\s*/;const absoluteLengths={cm:96/2.54,mm:96/25.4,in:96,pt:4/3,pc:16,px:1};cleanupListOfValues.fn=(_root,params)=>{const{floatPrecision:floatPrecision=3,leadingZero:leadingZero=true,defaultPx:defaultPx=true,convertToPx:convertToPx=true}=params;const roundValues=lists=>{const roundedList=[];for(const elem of lists.split(regSeparator)){const match=elem.match(regNumericValues);const matchNew=elem.match(/new/);if(match){let num=Number(Number(match[1]).toFixed(floatPrecision));let matchedUnit=match[3]||"";let units=matchedUnit;if(convertToPx&&units&&units in absoluteLengths){const pxNum=Number((absoluteLengths[units]*Number(match[1])).toFixed(floatPrecision));if(pxNum.toString().length<match[0].length){num=pxNum;units="px"}}let str;if(leadingZero){str=removeLeadingZero(num)}else{str=num.toString()}if(defaultPx&&units==="px"){units=""}roundedList.push(str+units)}else if(matchNew){roundedList.push("new")}else if(elem){roundedList.push(elem)}}return roundedList.join(" ")};return{element:{enter:node=>{if(node.attributes.points!=null){node.attributes.points=roundValues(node.attributes.points)}if(node.attributes["enable-background"]!=null){node.attributes["enable-background"]=roundValues(node.attributes["enable-background"])}if(node.attributes.viewBox!=null){node.attributes.viewBox=roundValues(node.attributes.viewBox)}if(node.attributes["stroke-dasharray"]!=null){node.attributes["stroke-dasharray"]=roundValues(node.attributes["stroke-dasharray"])}if(node.attributes.dx!=null){node.attributes.dx=roundValues(node.attributes.dx)}if(node.attributes.dy!=null){node.attributes.dy=roundValues(node.attributes.dy)}if(node.attributes.x!=null){node.attributes.x=roundValues(node.attributes.x)}if(node.attributes.y!=null){node.attributes.y=roundValues(node.attributes.y)}}}}};var convertOneStopGradients={};const{attrsGroupsDefaults:attrsGroupsDefaults,colorsProps:colorsProps}=_collections;const{detachNodeFromParent:detachNodeFromParent$6,querySelectorAll:querySelectorAll$2,querySelector:querySelector}=xast;const{computeStyle:computeStyle,collectStylesheet:collectStylesheet$1}=style;convertOneStopGradients.name="convertOneStopGradients";convertOneStopGradients.description="converts one-stop (single color) gradients to a plain color";convertOneStopGradients.fn=root=>{const stylesheet=collectStylesheet$1(root);const effectedDefs=new Set;const allDefs=new Map;const gradientsToDetach=new Map;let xlinkHrefCount=0;return{element:{enter:(node,parentNode)=>{if(node.attributes["xlink:href"]!=null){xlinkHrefCount++}if(node.name==="defs"){allDefs.set(node,parentNode);return}if(node.name!=="linearGradient"&&node.name!=="radialGradient"){return}const stops=node.children.filter((child=>child.type==="element"&&child.name==="stop"));const href=node.attributes["xlink:href"]||node.attributes["href"];let effectiveNode=stops.length===0&&href!=null&&href.startsWith("#")?querySelector(root,href):node;if(effectiveNode==null||effectiveNode.type!=="element"){gradientsToDetach.set(node,parentNode);return}const effectiveStops=effectiveNode.children.filter((child=>child.type==="element"&&child.name==="stop"));if(effectiveStops.length!==1||effectiveStops[0].type!=="element"){return}if(parentNode.type==="element"&&parentNode.name==="defs"){effectedDefs.add(parentNode)}gradientsToDetach.set(node,parentNode);let color;const style=computeStyle(stylesheet,effectiveStops[0])["stop-color"];if(style!=null&&style.type==="static"){color=style.value}const selectorVal=`url(#${node.attributes.id})`;const selector=[...colorsProps].map((attr=>`[${attr}="${selectorVal}"]`)).join(",");const elements=querySelectorAll$2(root,selector);for(const element of elements){if(element.type!=="element"){continue}for(const attr of colorsProps){if(element.attributes[attr]!==selectorVal){continue}if(color!=null){element.attributes[attr]=color}else{delete element.attributes[attr]}}}const styledElements=querySelectorAll$2(root,`[style*=${selectorVal}]`);for(const element of styledElements){if(element.type!=="element"){continue}element.attributes.style=element.attributes.style.replace(selectorVal,color||attrsGroupsDefaults.presentation["stop-color"])}},exit:node=>{if(node.name==="svg"){for(const[gradient,parent]of gradientsToDetach.entries()){if(gradient.attributes["xlink:href"]!=null){xlinkHrefCount--}detachNodeFromParent$6(gradient,parent)}if(xlinkHrefCount===0){delete node.attributes["xmlns:xlink"]}for(const[defs,parent]of allDefs.entries()){if(effectedDefs.has(defs)&&defs.children.length===0){detachNodeFromParent$6(defs,parent)}}}}}}};var convertStyleToAttrs={};const{attrsGroups:attrsGroups$1}=_collections;convertStyleToAttrs.name="convertStyleToAttrs";convertStyleToAttrs.description="converts style to attributes";const g=(...args)=>"(?:"+args.join("|")+")";const stylingProps=attrsGroups$1.presentation;const rEscape="\\\\(?:[0-9a-f]{1,6}\\s?|\\r\\n|.)";const rAttr="\\s*("+g("[^:;\\\\]",rEscape)+"*?)\\s*";const rSingleQuotes="'(?:[^'\\n\\r\\\\]|"+rEscape+")*?(?:'|$)";const rQuotes='"(?:[^"\\n\\r\\\\]|'+rEscape+')*?(?:"|$)';const rQuotedString=new RegExp("^"+g(rSingleQuotes,rQuotes)+"$");const rParenthesis="\\("+g("[^'\"()\\\\]+",rEscape,rSingleQuotes,rQuotes)+"*?"+"\\)";const rValue="\\s*("+g("[^!'\"();\\\\]+?",rEscape,rSingleQuotes,rQuotes,rParenthesis,"[^;]*?")+"*?"+")";const rDeclEnd="\\s*(?:;\\s*|$)";const rImportant="(\\s*!important(?![-(\\w]))?";const regDeclarationBlock=new RegExp(rAttr+":"+rValue+rImportant+rDeclEnd,"ig");const regStripComments=new RegExp(g(rEscape,rSingleQuotes,rQuotes,"/\\*[^]*?\\*/"),"ig");convertStyleToAttrs.fn=(_root,params)=>{const{keepImportant:keepImportant=false}=params;return{element:{enter:node=>{if(node.attributes.style!=null){let styles=[];const newAttributes={};const styleValue=node.attributes.style.replace(regStripComments,(match=>match[0]=="/"?"":match[0]=="\\"&&/[-g-z]/i.test(match[1])?match[1]:match));regDeclarationBlock.lastIndex=0;for(var rule;rule=regDeclarationBlock.exec(styleValue);){if(!keepImportant||!rule[3]){styles.push([rule[1],rule[2]])}}if(styles.length){styles=styles.filter((function(style){if(style[0]){var prop=style[0].toLowerCase(),val=style[1];if(rQuotedString.test(val)){val=val.slice(1,-1)}if(stylingProps.has(prop)){newAttributes[prop]=val;return false}}return true}));Object.assign(node.attributes,newAttributes);if(styles.length){node.attributes.style=styles.map((declaration=>declaration.join(":"))).join(";")}else{delete node.attributes.style}}}}}}};var prefixIds={};const csstree=cjs$2;const{referencesProps:referencesProps}=_collections;prefixIds.name="prefixIds";prefixIds.description="prefix IDs";const getBasename=path=>{const matched=/[/\\]?([^/\\]+)$/.exec(path);if(matched){return matched[1]}return""};const escapeIdentifierName=str=>str.replace(/[. ]/g,"_");const unquote=string=>{if(string.startsWith('"')&&string.endsWith('"')||string.startsWith("'")&&string.endsWith("'")){return string.slice(1,-1)}return string};const prefixId=(prefixGenerator,body)=>{const prefix=prefixGenerator(body);if(body.startsWith(prefix)){return body}return prefix+body};const prefixReference=(prefixGenerator,reference)=>{if(reference.startsWith("#")){return"#"+prefixId(prefixGenerator,reference.slice(1))}return null};const generatePrefix=(body,node,info,prefixGenerator,delim,history)=>{if(typeof prefixGenerator==="function"){let prefix=history.get(body);if(prefix!=null){return prefix}prefix=prefixGenerator(node,info)+delim;history.set(body,prefix);return prefix}if(typeof prefixGenerator==="string"){return prefixGenerator+delim}if(prefixGenerator===false){return""}if(info.path!=null&&info.path.length>0){return escapeIdentifierName(getBasename(info.path))+delim}return"prefix"+delim};prefixIds.fn=(_root,params,info)=>{const{delim:delim="__",prefix:prefix,prefixIds:prefixIds=true,prefixClassNames:prefixClassNames=true}=params;const prefixMap=new Map;return{element:{enter:node=>{const prefixGenerator=id=>generatePrefix(id,node,info,prefix,delim,prefixMap);if(node.name==="style"){if(node.children.length===0){return}for(const child of node.children){if(child.type!=="text"&&child.type!=="cdata"){continue}const cssText=child.value;let cssAst=null;try{cssAst=csstree.parse(cssText,{parseValue:true,parseCustomProperty:false})}catch{return}csstree.walk(cssAst,(node=>{if(prefixIds&&node.type==="IdSelector"||prefixClassNames&&node.type==="ClassSelector"){node.name=prefixId(prefixGenerator,node.name);return}if(node.type==="Url"&&node.value.length>0){const prefixed=prefixReference(prefixGenerator,unquote(node.value));if(prefixed!=null){node.value=prefixed}}}));child.value=csstree.generate(cssAst);return}}if(prefixIds&&node.attributes.id!=null&&node.attributes.id.length!==0){node.attributes.id=prefixId(prefixGenerator,node.attributes.id)}if(prefixClassNames&&node.attributes.class!=null&&node.attributes.class.length!==0){node.attributes.class=node.attributes.class.split(/\s+/).map((name=>prefixId(prefixGenerator,name))).join(" ")}for(const name of["href","xlink:href"]){if(node.attributes[name]!=null&&node.attributes[name].length!==0){const prefixed=prefixReference(prefixGenerator,node.attributes[name]);if(prefixed!=null){node.attributes[name]=prefixed}}}for(const name of referencesProps){if(node.attributes[name]!=null&&node.attributes[name].length!==0){node.attributes[name]=node.attributes[name].replace(/\burl\((["'])?(#.+?)\1\)/gi,((match,_,url)=>{const prefixed=prefixReference(prefixGenerator,url);if(prefixed==null){return match}return`url(${prefixed})`}))}}for(const name of["begin","end"]){if(node.attributes[name]!=null&&node.attributes[name].length!==0){const parts=node.attributes[name].split(/\s*;\s+/).map((val=>{if(val.endsWith(".end")||val.endsWith(".start")){const[id,postfix]=val.split(".");return`${prefixId(prefixGenerator,id)}.${postfix}`}return val}));node.attributes[name]=parts.join("; ")}}}}}};var removeAttributesBySelector={};const{querySelectorAll:querySelectorAll$1}=xast;removeAttributesBySelector.name="removeAttributesBySelector";removeAttributesBySelector.description="removes attributes of elements that match a css selector";removeAttributesBySelector.fn=(root,params)=>{const selectors=Array.isArray(params.selectors)?params.selectors:[params];for(const{selector:selector,attributes:attributes}of selectors){const nodes=querySelectorAll$1(root,selector);for(const node of nodes){if(node.type==="element"){if(Array.isArray(attributes)){for(const name of attributes){delete node.attributes[name]}}else{delete node.attributes[attributes]}}}}return{}};var removeAttrs={};removeAttrs.name="removeAttrs";removeAttrs.description="removes specified attributes";const DEFAULT_SEPARATOR=":";const ENOATTRS=`Warning: The plugin "removeAttrs" requires the "attrs" parameter.\nIt should have a pattern to remove, otherwise the plugin is a noop.\nConfig example:\n\nplugins: [\n {\n name: "removeAttrs",\n params: {\n attrs: "(fill|stroke)"\n }\n }\n]\n`;removeAttrs.fn=(root,params)=>{if(typeof params.attrs=="undefined"){console.warn(ENOATTRS);return null}const elemSeparator=typeof params.elemSeparator=="string"?params.elemSeparator:DEFAULT_SEPARATOR;const preserveCurrentColor=typeof params.preserveCurrentColor=="boolean"?params.preserveCurrentColor:false;const attrs=Array.isArray(params.attrs)?params.attrs:[params.attrs];return{element:{enter:node=>{for(let pattern of attrs){if(!pattern.includes(elemSeparator)){pattern=[".*",pattern,".*"].join(elemSeparator)}else if(pattern.split(elemSeparator).length<3){pattern=[pattern,".*"].join(elemSeparator)}const list=pattern.split(elemSeparator).map((value=>{if(value==="*"){value=".*"}return new RegExp(["^",value,"$"].join(""),"i")}));if(list[0].test(node.name)){for(const[name,value]of Object.entries(node.attributes)){const isFillCurrentColor=preserveCurrentColor&&name=="fill"&&value=="currentColor";const isStrokeCurrentColor=preserveCurrentColor&&name=="stroke"&&value=="currentColor";if(!isFillCurrentColor&&!isStrokeCurrentColor&&list[1].test(name)&&list[2].test(value)){delete node.attributes[name]}}}}}}}};var removeDimensions={};removeDimensions.name="removeDimensions";removeDimensions.description="removes width and height in presence of viewBox (opposite to removeViewBox, disable it first)";removeDimensions.fn=()=>({element:{enter:node=>{if(node.name==="svg"){if(node.attributes.viewBox!=null){delete node.attributes.width;delete node.attributes.height}else if(node.attributes.width!=null&&node.attributes.height!=null&&Number.isNaN(Number(node.attributes.width))===false&&Number.isNaN(Number(node.attributes.height))===false){const width=Number(node.attributes.width);const height=Number(node.attributes.height);node.attributes.viewBox=`0 0 ${width} ${height}`;delete node.attributes.width;delete node.attributes.height}}}}});var removeElementsByAttr={};const{detachNodeFromParent:detachNodeFromParent$5}=xast;removeElementsByAttr.name="removeElementsByAttr";removeElementsByAttr.description="removes arbitrary elements by ID or className (disabled by default)";removeElementsByAttr.fn=(root,params)=>{const ids=params.id==null?[]:Array.isArray(params.id)?params.id:[params.id];const classes=params.class==null?[]:Array.isArray(params.class)?params.class:[params.class];return{element:{enter:(node,parentNode)=>{if(node.attributes.id!=null&&ids.length!==0){if(ids.includes(node.attributes.id)){detachNodeFromParent$5(node,parentNode)}}if(node.attributes.class&&classes.length!==0){const classList=node.attributes.class.split(" ");for(const item of classes){if(classList.includes(item)){detachNodeFromParent$5(node,parentNode);break}}}}}}};var removeOffCanvasPaths={};const{visitSkip:visitSkip,detachNodeFromParent:detachNodeFromParent$4}=xast;const{parsePathData:parsePathData}=path;const{intersects:intersects}=_path;removeOffCanvasPaths.name="removeOffCanvasPaths";removeOffCanvasPaths.description="removes elements that are drawn outside of the viewbox (disabled by default)";removeOffCanvasPaths.fn=()=>{let viewBoxData=null;return{element:{enter:(node,parentNode)=>{if(node.name==="svg"&&parentNode.type==="root"){let viewBox="";if(node.attributes.viewBox!=null){viewBox=node.attributes.viewBox}else if(node.attributes.height!=null&&node.attributes.width!=null){viewBox=`0 0 ${node.attributes.width} ${node.attributes.height}`}viewBox=viewBox.replace(/[,+]|px/g," ").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"");const m=/^(-?\d*\.?\d+) (-?\d*\.?\d+) (\d*\.?\d+) (\d*\.?\d+)$/.exec(viewBox);if(m==null){return}const left=Number.parseFloat(m[1]);const top=Number.parseFloat(m[2]);const width=Number.parseFloat(m[3]);const height=Number.parseFloat(m[4]);viewBoxData={left:left,top:top,right:left+width,bottom:top+height,width:width,height:height}}if(node.attributes.transform!=null){return visitSkip}if(node.name==="path"&&node.attributes.d!=null&&viewBoxData!=null){const pathData=parsePathData(node.attributes.d);let visible=false;for(const pathDataItem of pathData){if(pathDataItem.command==="M"){const[x,y]=pathDataItem.args;if(x>=viewBoxData.left&&x<=viewBoxData.right&&y>=viewBoxData.top&&y<=viewBoxData.bottom){visible=true}}}if(visible){return}if(pathData.length===2){pathData.push({command:"z",args:[]})}const{left:left,top:top,width:width,height:height}=viewBoxData;const viewBoxPathData=[{command:"M",args:[left,top]},{command:"h",args:[width]},{command:"v",args:[height]},{command:"H",args:[left]},{command:"z",args:[]}];if(intersects(viewBoxPathData,pathData)===false){detachNodeFromParent$4(node,parentNode)}}}}}};var removeRasterImages={};const{detachNodeFromParent:detachNodeFromParent$3}=xast;removeRasterImages.name="removeRasterImages";removeRasterImages.description="removes raster images (disabled by default)";removeRasterImages.fn=()=>({element:{enter:(node,parentNode)=>{if(node.name==="image"&&node.attributes["xlink:href"]!=null&&/(\.|image\/)(jpe?g|png|gif)/.test(node.attributes["xlink:href"])){detachNodeFromParent$3(node,parentNode)}}}});var removeScriptElement={};const{detachNodeFromParent:detachNodeFromParent$2}=xast;const{attrsGroups:attrsGroups}=_collections;removeScriptElement.name="removeScriptElement";removeScriptElement.description="removes scripts (disabled by default)";const eventAttrs=[...attrsGroups.animationEvent,...attrsGroups.documentEvent,...attrsGroups.documentElementEvent,...attrsGroups.globalEvent,...attrsGroups.graphicalEvent];removeScriptElement.fn=()=>({element:{enter:(node,parentNode)=>{if(node.name==="script"){detachNodeFromParent$2(node,parentNode);return}for(const attr of eventAttrs){if(node.attributes[attr]!=null){delete node.attributes[attr]}}},exit:(node,parentNode)=>{if(node.name!=="a"){return}for(const attr of Object.keys(node.attributes)){if(attr==="href"||attr.endsWith(":href")){if(node.attributes[attr]==null||!node.attributes[attr].trimStart().startsWith("javascript:")){continue}const index=parentNode.children.indexOf(node);parentNode.children.splice(index,1,...node.children);for(const child of node.children){Object.defineProperty(child,"parentNode",{writable:true,value:parentNode})}}}}}});var removeStyleElement={};const{detachNodeFromParent:detachNodeFromParent$1}=xast;removeStyleElement.name="removeStyleElement";removeStyleElement.description="removes <style> element (disabled by default)";removeStyleElement.fn=()=>({element:{enter:(node,parentNode)=>{if(node.name==="style"){detachNodeFromParent$1(node,parentNode)}}}});var removeXlink={};const{elems:elems}=_collections;removeXlink.name="removeXlink";removeXlink.description="remove xlink namespace and replaces attributes with the SVG 2 equivalent where applicable";const XLINK_NAMESPACE="http://www.w3.org/1999/xlink";const SHOW_TO_TARGET={new:"_blank",replace:"_self"};const LEGACY_ELEMENTS=new Set(["cursor","filter","font-face-uri","glyphRef","tref"]);const findPrefixedAttrs=(node,prefixes,attr)=>prefixes.map((prefix=>`${prefix}:${attr}`)).filter((attr=>node.attributes[attr]!=null));removeXlink.fn=(_,params)=>{const{includeLegacy:includeLegacy}=params;const xlinkPrefixes=[];const overriddenPrefixes=[];const usedInLegacyElement=[];return{element:{enter:node=>{for(const[key,value]of Object.entries(node.attributes)){if(key.startsWith("xmlns:")){const prefix=key.split(":",2)[1];if(value===XLINK_NAMESPACE){xlinkPrefixes.push(prefix);continue}if(xlinkPrefixes.includes(prefix)){overriddenPrefixes.push(prefix)}}}if(overriddenPrefixes.some((prefix=>xlinkPrefixes.includes(prefix)))){return}const showAttrs=findPrefixedAttrs(node,xlinkPrefixes,"show");let showHandled=node.attributes.target!=null;for(let i=showAttrs.length-1;i>=0;i--){const attr=showAttrs[i];const value=node.attributes[attr];const mapping=SHOW_TO_TARGET[value];if(showHandled||mapping==null){delete node.attributes[attr];continue}if(mapping!==elems[node.name]?.defaults?.target){node.attributes.target=mapping}delete node.attributes[attr];showHandled=true}const titleAttrs=findPrefixedAttrs(node,xlinkPrefixes,"title");for(let i=titleAttrs.length-1;i>=0;i--){const attr=titleAttrs[i];const value=node.attributes[attr];const hasTitle=node.children.filter((child=>child.type==="element"&&child.name==="title"));if(hasTitle.length>0){delete node.attributes[attr];continue}const titleTag={type:"element",name:"title",attributes:{},children:[{type:"text",value:value}]};Object.defineProperty(titleTag,"parentNode",{writable:true,value:node});node.children.unshift(titleTag);delete node.attributes[attr]}const hrefAttrs=findPrefixedAttrs(node,xlinkPrefixes,"href");if(hrefAttrs.length>0&&LEGACY_ELEMENTS.has(node.name)&&!includeLegacy){hrefAttrs.map((attr=>attr.split(":",1)[0])).forEach((prefix=>usedInLegacyElement.push(prefix)));return}for(let i=hrefAttrs.length-1;i>=0;i--){const attr=hrefAttrs[i];const value=node.attributes[attr];if(node.attributes.href!=null){delete node.attributes[attr];continue}node.attributes.href=value;delete node.attributes[attr]}},exit:node=>{for(const[key,value]of Object.entries(node.attributes)){const[prefix,attr]=key.split(":",2);if(xlinkPrefixes.includes(prefix)&&!overriddenPrefixes.includes(prefix)&&!usedInLegacyElement.includes(prefix)&&!includeLegacy){delete node.attributes[key];continue}if(key.startsWith("xmlns:")&&!usedInLegacyElement.includes(attr)){if(value===XLINK_NAMESPACE){const index=xlinkPrefixes.indexOf(attr);xlinkPrefixes.splice(index,1);delete node.attributes[key];continue}if(overriddenPrefixes.includes(prefix)){const index=overriddenPrefixes.indexOf(attr);overriddenPrefixes.splice(index,1)}}}}}}};var removeXMLNS={};removeXMLNS.name="removeXMLNS";removeXMLNS.description="removes xmlns attribute (for inline svg, disabled by default)";removeXMLNS.fn=()=>({element:{enter:node=>{if(node.name==="svg"){delete node.attributes.xmlns}}}});var reusePaths={};const{collectStylesheet:collectStylesheet}=style;const{detachNodeFromParent:detachNodeFromParent,querySelectorAll:querySelectorAll}=xast;reusePaths.name="reusePaths";reusePaths.description="Finds <path> elements with the same d, fill, and "+"stroke, and converts them to <use> elements "+"referencing a single <path> def.";reusePaths.fn=root=>{const stylesheet=collectStylesheet(root);const paths=new Map;let svgDefs;const hrefs=new Set;return{element:{enter:(node,parentNode)=>{if(node.name==="path"&&node.attributes.d!=null){const d=node.attributes.d;const fill=node.attributes.fill||"";const stroke=node.attributes.stroke||"";const key=d+";s:"+stroke+";f:"+fill;let list=paths.get(key);if(list==null){list=[];paths.set(key,list)}list.push(node)}if(svgDefs==null&&node.name==="defs"&&parentNode.type==="element"&&parentNode.name==="svg"){svgDefs=node}if(node.name==="use"){for(const name of["href","xlink:href"]){const href=node.attributes[name];if(href!=null&&href.startsWith("#")&&href.length>1){hrefs.add(href.slice(1))}}}},exit:(node,parentNode)=>{if(node.name==="svg"&&parentNode.type==="root"){let defsTag=svgDefs;if(defsTag==null){defsTag={type:"element",name:"defs",attributes:{},children:[]};Object.defineProperty(defsTag,"parentNode",{writable:true,value:node})}let index=0;for(const list of paths.values()){if(list.length>1){const reusablePath={type:"element",name:"path",attributes:{},children:[]};for(const attr of["fill","stroke","d"]){if(list[0].attributes[attr]!=null){reusablePath.attributes[attr]=list[0].attributes[attr]}}const originalId=list[0].attributes.id;if(originalId==null||hrefs.has(originalId)||stylesheet.rules.some((rule=>rule.selector===`#${originalId}`))){reusablePath.attributes.id="reuse-"+index++}else{reusablePath.attributes.id=originalId;delete list[0].attributes.id}Object.defineProperty(reusablePath,"parentNode",{writable:true,value:defsTag});defsTag.children.push(reusablePath);for(const pathNode of list){delete pathNode.attributes.d;delete pathNode.attributes.stroke;delete pathNode.attributes.fill;if(defsTag.children.includes(pathNode)&&pathNode.children.length===0){if(Object.keys(pathNode.attributes).length===0){detachNodeFromParent(pathNode,defsTag);continue}if(Object.keys(pathNode.attributes).length===1&&pathNode.attributes.id!=null){detachNodeFromParent(pathNode,defsTag);const selector=`[xlink\\:href=#${pathNode.attributes.id}], [href=#${pathNode.attributes.id}]`;for(const child of querySelectorAll(node,selector)){if(child.type!=="element"){continue}for(const name of["href","xlink:href"]){if(child.attributes[name]!=null){child.attributes[name]="#"+reusablePath.attributes.id}}}continue}}pathNode.name="use";pathNode.attributes["xlink:href"]="#"+reusablePath.attributes.id}}}if(defsTag.children.length!==0){if(node.attributes["xmlns:xlink"]==null){node.attributes["xmlns:xlink"]="http://www.w3.org/1999/xlink"}if(svgDefs==null){node.children.unshift(defsTag)}}}}}}};builtin$1.builtin=[presetDefault_1,addAttributesToSVGElement,addClassesToSVGElement,cleanupAttrs$1,cleanupEnableBackground$1,cleanupIds$1,cleanupListOfValues,cleanupNumericValues$1,collapseGroups$1,convertColors$1,convertEllipseToCircle$1,convertOneStopGradients,convertPathData$1,convertShapeToPath$1,convertStyleToAttrs,convertTransform$2,mergeStyles$1,inlineStyles$1,mergePaths$1,minifyStyles$1,moveElemsAttrsToGroup$1,moveGroupAttrsToElems$1,prefixIds,removeAttributesBySelector,removeAttrs,removeComments$1,removeDesc$1,removeDimensions,removeDoctype$1,removeEditorsNSData$1,removeElementsByAttr,removeEmptyAttrs$1,removeEmptyContainers$1,removeEmptyText$1,removeHiddenElems$1,removeMetadata$1,removeNonInheritableGroupAttrs$1,removeOffCanvasPaths,removeRasterImages,removeScriptElement,removeStyleElement,removeTitle$1,removeUnknownsAndDefaults$1,removeUnusedNS$1,removeUselessDefs$1,removeUselessStrokeAndFill$1,removeViewBox$1,removeXlink,removeXMLNS,removeXMLProcInst$1,reusePaths,sortAttrs$1,sortDefsChildren$1];const{parseSvg:parseSvg}=parser$4;const{stringifySvg:stringifySvg}=stringifier;const{builtin:builtin}=builtin$1;const{invokePlugins:invokePlugins}=plugins;const{encodeSVGDatauri:encodeSVGDatauri}=tools;const pluginsMap={};for(const plugin of builtin){pluginsMap[plugin.name]=plugin}const resolvePluginConfig=plugin=>{if(typeof plugin==="string"){const builtinPlugin=pluginsMap[plugin];if(builtinPlugin==null){throw Error(`Unknown builtin plugin "${plugin}" specified.`)}return{name:plugin,params:{},fn:builtinPlugin.fn}}if(typeof plugin==="object"&&plugin!=null){if(plugin.name==null){throw Error(`Plugin name should be specified`)}let fn=plugin.fn;if(fn==null){const builtinPlugin=pluginsMap[plugin.name];if(builtinPlugin==null){throw Error(`Unknown builtin plugin "${plugin.name}" specified.`)}fn=builtinPlugin.fn}return{name:plugin.name,params:plugin.params,fn:fn}}return null};const optimize=(input,config)=>{if(config==null){config={}}if(typeof config!=="object"){throw Error("Config should be an object")}const maxPassCount=config.multipass?10:1;let prevResultSize=Number.POSITIVE_INFINITY;let output="";const info={};if(config.path!=null){info.path=config.path}for(let i=0;i<maxPassCount;i+=1){info.multipassCount=i;const ast=parseSvg(input,config.path);const plugins=config.plugins||["preset-default"];if(!Array.isArray(plugins)){throw Error("malformed config, `plugins` property must be an array.\nSee more info here: https://github.com/svg/svgo#configuration")}const resolvedPlugins=plugins.filter((plugin=>plugin!=null)).map(resolvePluginConfig);if(resolvedPlugins.length<plugins.length){console.warn("Warning: plugins list includes null or undefined elements, these will be ignored.")}const globalOverrides={};if(config.floatPrecision!=null){globalOverrides.floatPrecision=config.floatPrecision}invokePlugins(ast,info,resolvedPlugins,null,globalOverrides);output=stringifySvg(ast,config.js2svg);if(output.length<prevResultSize){input=output;prevResultSize=output.length}else{break}}if(config.datauri){output=encodeSVGDatauri(output,config.datauri)}return{data:output}};var optimize_1=svgo.optimize=optimize;export{svgo as default,optimize_1 as optimize};
diff --git a/node_modules/svgo/lib/builtin.js b/node_modules/svgo/lib/builtin.js
deleted file mode 100644
index 28a380ec..00000000
--- a/node_modules/svgo/lib/builtin.js
+++ /dev/null
@@ -1,57 +0,0 @@
-'use strict';
-
-exports.builtin = [
- require('../plugins/preset-default.js'),
- require('../plugins/addAttributesToSVGElement.js'),
- require('../plugins/addClassesToSVGElement.js'),
- require('../plugins/cleanupAttrs.js'),
- require('../plugins/cleanupEnableBackground.js'),
- require('../plugins/cleanupIds.js'),
- require('../plugins/cleanupListOfValues.js'),
- require('../plugins/cleanupNumericValues.js'),
- require('../plugins/collapseGroups.js'),
- require('../plugins/convertColors.js'),
- require('../plugins/convertEllipseToCircle.js'),
- require('../plugins/convertOneStopGradients.js'),
- require('../plugins/convertPathData.js'),
- require('../plugins/convertShapeToPath.js'),
- require('../plugins/convertStyleToAttrs.js'),
- require('../plugins/convertTransform.js'),
- require('../plugins/mergeStyles.js'),
- require('../plugins/inlineStyles.js'),
- require('../plugins/mergePaths.js'),
- require('../plugins/minifyStyles.js'),
- require('../plugins/moveElemsAttrsToGroup.js'),
- require('../plugins/moveGroupAttrsToElems.js'),
- require('../plugins/prefixIds.js'),
- require('../plugins/removeAttributesBySelector.js'),
- require('../plugins/removeAttrs.js'),
- require('../plugins/removeComments.js'),
- require('../plugins/removeDesc.js'),
- require('../plugins/removeDimensions.js'),
- require('../plugins/removeDoctype.js'),
- require('../plugins/removeEditorsNSData.js'),
- require('../plugins/removeElementsByAttr.js'),
- require('../plugins/removeEmptyAttrs.js'),
- require('../plugins/removeEmptyContainers.js'),
- require('../plugins/removeEmptyText.js'),
- require('../plugins/removeHiddenElems.js'),
- require('../plugins/removeMetadata.js'),
- require('../plugins/removeNonInheritableGroupAttrs.js'),
- require('../plugins/removeOffCanvasPaths.js'),
- require('../plugins/removeRasterImages.js'),
- require('../plugins/removeScriptElement.js'),
- require('../plugins/removeStyleElement.js'),
- require('../plugins/removeTitle.js'),
- require('../plugins/removeUnknownsAndDefaults.js'),
- require('../plugins/removeUnusedNS.js'),
- require('../plugins/removeUselessDefs.js'),
- require('../plugins/removeUselessStrokeAndFill.js'),
- require('../plugins/removeViewBox.js'),
- require('../plugins/removeXlink.js'),
- require('../plugins/removeXMLNS.js'),
- require('../plugins/removeXMLProcInst.js'),
- require('../plugins/reusePaths.js'),
- require('../plugins/sortAttrs.js'),
- require('../plugins/sortDefsChildren.js'),
-];
diff --git a/node_modules/svgo/lib/parser.js b/node_modules/svgo/lib/parser.js
deleted file mode 100644
index 4637acf1..00000000
--- a/node_modules/svgo/lib/parser.js
+++ /dev/null
@@ -1,262 +0,0 @@
-'use strict';
-
-/**
- * @typedef {import('./types').XastNode} XastNode
- * @typedef {import('./types').XastInstruction} XastInstruction
- * @typedef {import('./types').XastDoctype} XastDoctype
- * @typedef {import('./types').XastComment} XastComment
- * @typedef {import('./types').XastRoot} XastRoot
- * @typedef {import('./types').XastElement} XastElement
- * @typedef {import('./types').XastCdata} XastCdata
- * @typedef {import('./types').XastText} XastText
- * @typedef {import('./types').XastParent} XastParent
- * @typedef {import('./types').XastChild} XastChild
- */
-
-// @ts-ignore sax will be replaced with something else later
-const SAX = require('@trysound/sax');
-const { textElems } = require('../plugins/_collections');
-
-class SvgoParserError extends Error {
- /**
- * @param message {string}
- * @param line {number}
- * @param column {number}
- * @param source {string}
- * @param file {void | string}
- */
- constructor(message, line, column, source, file) {
- super(message);
- this.name = 'SvgoParserError';
- this.message = `${file || '<input>'}:${line}:${column}: ${message}`;
- this.reason = message;
- this.line = line;
- this.column = column;
- this.source = source;
- if (Error.captureStackTrace) {
- Error.captureStackTrace(this, SvgoParserError);
- }
- }
- toString() {
- const lines = this.source.split(/\r?\n/);
- const startLine = Math.max(this.line - 3, 0);
- const endLine = Math.min(this.line + 2, lines.length);
- const lineNumberWidth = String(endLine).length;
- const startColumn = Math.max(this.column - 54, 0);
- const endColumn = Math.max(this.column + 20, 80);
- const code = lines
- .slice(startLine, endLine)
- .map((line, index) => {
- const lineSlice = line.slice(startColumn, endColumn);
- let ellipsisPrefix = '';
- let ellipsisSuffix = '';
- if (startColumn !== 0) {
- ellipsisPrefix = startColumn > line.length - 1 ? ' ' : '…';
- }
- if (endColumn < line.length - 1) {
- ellipsisSuffix = '…';
- }
- const number = startLine + 1 + index;
- const gutter = ` ${number.toString().padStart(lineNumberWidth)} | `;
- if (number === this.line) {
- const gutterSpacing = gutter.replace(/[^|]/g, ' ');
- const lineSpacing = (
- ellipsisPrefix + line.slice(startColumn, this.column - 1)
- ).replace(/[^\t]/g, ' ');
- const spacing = gutterSpacing + lineSpacing;
- return `>${gutter}${ellipsisPrefix}${lineSlice}${ellipsisSuffix}\n ${spacing}^`;
- }
- return ` ${gutter}${ellipsisPrefix}${lineSlice}${ellipsisSuffix}`;
- })
- .join('\n');
- return `${this.name}: ${this.message}\n\n${code}\n`;
- }
-}
-
-const entityDeclaration = /<!ENTITY\s+(\S+)\s+(?:'([^']+)'|"([^"]+)")\s*>/g;
-
-const config = {
- strict: true,
- trim: false,
- normalize: false,
- lowercase: true,
- xmlns: true,
- position: true,
-};
-
-/**
- * Convert SVG (XML) string to SVG-as-JS object.
- *
- * @type {(data: string, from?: string) => XastRoot}
- */
-const parseSvg = (data, from) => {
- const sax = SAX.parser(config.strict, config);
- /**
- * @type {XastRoot}
- */
- const root = { type: 'root', children: [] };
- /**
- * @type {XastParent}
- */
- let current = root;
- /**
- * @type {XastParent[]}
- */
- const stack = [root];
-
- /**
- * @type {(node: XastChild) => void}
- */
- const pushToContent = (node) => {
- // TODO remove legacy parentNode in v4
- Object.defineProperty(node, 'parentNode', {
- writable: true,
- value: current,
- });
- current.children.push(node);
- };
-
- /**
- * @type {(doctype: string) => void}
- */
- sax.ondoctype = (doctype) => {
- /**
- * @type {XastDoctype}
- */
- const node = {
- type: 'doctype',
- // TODO parse doctype for name, public and system to match xast
- name: 'svg',
- data: {
- doctype,
- },
- };
- pushToContent(node);
- const subsetStart = doctype.indexOf('[');
- if (subsetStart >= 0) {
- entityDeclaration.lastIndex = subsetStart;
- let entityMatch = entityDeclaration.exec(data);
- while (entityMatch != null) {
- sax.ENTITIES[entityMatch[1]] = entityMatch[2] || entityMatch[3];
- entityMatch = entityDeclaration.exec(data);
- }
- }
- };
-
- /**
- * @type {(data: { name: string, body: string }) => void}
- */
- sax.onprocessinginstruction = (data) => {
- /**
- * @type {XastInstruction}
- */
- const node = {
- type: 'instruction',
- name: data.name,
- value: data.body,
- };
- pushToContent(node);
- };
-
- /**
- * @type {(comment: string) => void}
- */
- sax.oncomment = (comment) => {
- /**
- * @type {XastComment}
- */
- const node = {
- type: 'comment',
- value: comment.trim(),
- };
- pushToContent(node);
- };
-
- /**
- * @type {(cdata: string) => void}
- */
- sax.oncdata = (cdata) => {
- /**
- * @type {XastCdata}
- */
- const node = {
- type: 'cdata',
- value: cdata,
- };
- pushToContent(node);
- };
-
- /**
- * @type {(data: { name: string, attributes: Record<string, { value: string }>}) => void}
- */
- sax.onopentag = (data) => {
- /**
- * @type {XastElement}
- */
- let element = {
- type: 'element',
- name: data.name,
- attributes: {},
- children: [],
- };
- for (const [name, attr] of Object.entries(data.attributes)) {
- element.attributes[name] = attr.value;
- }
- pushToContent(element);
- current = element;
- stack.push(element);
- };
-
- /**
- * @type {(text: string) => void}
- */
- sax.ontext = (text) => {
- if (current.type === 'element') {
- // prevent trimming of meaningful whitespace inside textual tags
- if (textElems.has(current.name)) {
- /**
- * @type {XastText}
- */
- const node = {
- type: 'text',
- value: text,
- };
- pushToContent(node);
- } else if (/\S/.test(text)) {
- /**
- * @type {XastText}
- */
- const node = {
- type: 'text',
- value: text.trim(),
- };
- pushToContent(node);
- }
- }
- };
-
- sax.onclosetag = () => {
- stack.pop();
- current = stack[stack.length - 1];
- };
-
- /**
- * @type {(e: any) => void}
- */
- sax.onerror = (e) => {
- const error = new SvgoParserError(
- e.reason,
- e.line + 1,
- e.column,
- data,
- from,
- );
- if (e.message.indexOf('Unexpected end') === -1) {
- throw error;
- }
- };
-
- sax.write(data).close();
- return root;
-};
-exports.parseSvg = parseSvg;
diff --git a/node_modules/svgo/lib/path.js b/node_modules/svgo/lib/path.js
deleted file mode 100644
index 814ee2e3..00000000
--- a/node_modules/svgo/lib/path.js
+++ /dev/null
@@ -1,380 +0,0 @@
-'use strict';
-
-const { removeLeadingZero, toFixed } = require('./svgo/tools');
-
-/**
- * @typedef {import('./types').PathDataItem} PathDataItem
- * @typedef {import('./types').PathDataCommand} PathDataCommand
- */
-
-// Based on https://www.w3.org/TR/SVG11/paths.html#PathDataBNF
-
-const argsCountPerCommand = {
- M: 2,
- m: 2,
- Z: 0,
- z: 0,
- L: 2,
- l: 2,
- H: 1,
- h: 1,
- V: 1,
- v: 1,
- C: 6,
- c: 6,
- S: 4,
- s: 4,
- Q: 4,
- q: 4,
- T: 2,
- t: 2,
- A: 7,
- a: 7,
-};
-
-/**
- * @type {(c: string) => c is PathDataCommand}
- */
-const isCommand = (c) => {
- return c in argsCountPerCommand;
-};
-
-/**
- * @type {(c: string) => boolean}
- */
-const isWsp = (c) => {
- const codePoint = c.codePointAt(0);
- return (
- codePoint === 0x20 ||
- codePoint === 0x9 ||
- codePoint === 0xd ||
- codePoint === 0xa
- );
-};
-
-/**
- * @type {(c: string) => boolean}
- */
-const isDigit = (c) => {
- const codePoint = c.codePointAt(0);
- if (codePoint == null) {
- return false;
- }
- return 48 <= codePoint && codePoint <= 57;
-};
-
-/**
- * @typedef {'none' | 'sign' | 'whole' | 'decimal_point' | 'decimal' | 'e' | 'exponent_sign' | 'exponent'} ReadNumberState
- */
-
-/**
- * @type {(string: string, cursor: number) => [number, ?number]}
- */
-const readNumber = (string, cursor) => {
- let i = cursor;
- let value = '';
- let state = /** @type {ReadNumberState} */ ('none');
- for (; i < string.length; i += 1) {
- const c = string[i];
- if (c === '+' || c === '-') {
- if (state === 'none') {
- state = 'sign';
- value += c;
- continue;
- }
- if (state === 'e') {
- state = 'exponent_sign';
- value += c;
- continue;
- }
- }
- if (isDigit(c)) {
- if (state === 'none' || state === 'sign' || state === 'whole') {
- state = 'whole';
- value += c;
- continue;
- }
- if (state === 'decimal_point' || state === 'decimal') {
- state = 'decimal';
- value += c;
- continue;
- }
- if (state === 'e' || state === 'exponent_sign' || state === 'exponent') {
- state = 'exponent';
- value += c;
- continue;
- }
- }
- if (c === '.') {
- if (state === 'none' || state === 'sign' || state === 'whole') {
- state = 'decimal_point';
- value += c;
- continue;
- }
- }
- if (c === 'E' || c == 'e') {
- if (
- state === 'whole' ||
- state === 'decimal_point' ||
- state === 'decimal'
- ) {
- state = 'e';
- value += c;
- continue;
- }
- }
- break;
- }
- const number = Number.parseFloat(value);
- if (Number.isNaN(number)) {
- return [cursor, null];
- } else {
- // step back to delegate iteration to parent loop
- return [i - 1, number];
- }
-};
-
-/**
- * @type {(string: string) => PathDataItem[]}
- */
-const parsePathData = (string) => {
- /**
- * @type {PathDataItem[]}
- */
- const pathData = [];
- /**
- * @type {?PathDataCommand}
- */
- let command = null;
- let args = /** @type {number[]} */ ([]);
- let argsCount = 0;
- let canHaveComma = false;
- let hadComma = false;
- for (let i = 0; i < string.length; i += 1) {
- const c = string.charAt(i);
- if (isWsp(c)) {
- continue;
- }
- // allow comma only between arguments
- if (canHaveComma && c === ',') {
- if (hadComma) {
- break;
- }
- hadComma = true;
- continue;
- }
- if (isCommand(c)) {
- if (hadComma) {
- return pathData;
- }
- if (command == null) {
- // moveto should be leading command
- if (c !== 'M' && c !== 'm') {
- return pathData;
- }
- } else {
- // stop if previous command arguments are not flushed
- if (args.length !== 0) {
- return pathData;
- }
- }
- command = c;
- args = [];
- argsCount = argsCountPerCommand[command];
- canHaveComma = false;
- // flush command without arguments
- if (argsCount === 0) {
- pathData.push({ command, args });
- }
- continue;
- }
- // avoid parsing arguments if no command detected
- if (command == null) {
- return pathData;
- }
- // read next argument
- let newCursor = i;
- let number = null;
- if (command === 'A' || command === 'a') {
- const position = args.length;
- if (position === 0 || position === 1) {
- // allow only positive number without sign as first two arguments
- if (c !== '+' && c !== '-') {
- [newCursor, number] = readNumber(string, i);
- }
- }
- if (position === 2 || position === 5 || position === 6) {
- [newCursor, number] = readNumber(string, i);
- }
- if (position === 3 || position === 4) {
- // read flags
- if (c === '0') {
- number = 0;
- }
- if (c === '1') {
- number = 1;
- }
- }
- } else {
- [newCursor, number] = readNumber(string, i);
- }
- if (number == null) {
- return pathData;
- }
- args.push(number);
- canHaveComma = true;
- hadComma = false;
- i = newCursor;
- // flush arguments when necessary count is reached
- if (args.length === argsCount) {
- pathData.push({ command, args });
- // subsequent moveto coordinates are treated as implicit lineto commands
- if (command === 'M') {
- command = 'L';
- }
- if (command === 'm') {
- command = 'l';
- }
- args = [];
- }
- }
- return pathData;
-};
-exports.parsePathData = parsePathData;
-
-/**
- * @type {(number: number, precision?: number) => {
- * roundedStr: string,
- * rounded: number
- * }}
- */
-const roundAndStringify = (number, precision) => {
- if (precision != null) {
- number = toFixed(number, precision);
- }
-
- return {
- roundedStr: removeLeadingZero(number),
- rounded: number,
- };
-};
-
-/**
- * Elliptical arc large-arc and sweep flags are rendered with spaces
- * because many non-browser environments are not able to parse such paths
- *
- * @type {(
- * command: string,
- * args: number[],
- * precision?: number,
- * disableSpaceAfterFlags?: boolean
- * ) => string}
- */
-const stringifyArgs = (command, args, precision, disableSpaceAfterFlags) => {
- let result = '';
- let previous;
-
- for (let i = 0; i < args.length; i++) {
- const { roundedStr, rounded } = roundAndStringify(args[i], precision);
- if (
- disableSpaceAfterFlags &&
- (command === 'A' || command === 'a') &&
- // consider combined arcs
- (i % 7 === 4 || i % 7 === 5)
- ) {
- result += roundedStr;
- } else if (i === 0 || rounded < 0) {
- // avoid space before first and negative numbers
- result += roundedStr;
- } else if (
- !Number.isInteger(previous) &&
- rounded != 0 &&
- rounded < 1 &&
- rounded > -1
- ) {
- // remove space before decimal with zero whole
- // only when previous number is also decimal
- result += roundedStr;
- } else {
- result += ` ${roundedStr}`;
- }
- previous = rounded;
- }
-
- return result;
-};
-
-/**
- * @typedef {{
- * pathData: PathDataItem[];
- * precision?: number;
- * disableSpaceAfterFlags?: boolean;
- * }} StringifyPathDataOptions
- */
-
-/**
- * @param {StringifyPathDataOptions} options
- * @returns {string}
- */
-const stringifyPathData = ({ pathData, precision, disableSpaceAfterFlags }) => {
- if (pathData.length === 1) {
- const { command, args } = pathData[0];
- return (
- command + stringifyArgs(command, args, precision, disableSpaceAfterFlags)
- );
- }
-
- let result = '';
- let prev = { ...pathData[0] };
-
- // match leading moveto with following lineto
- if (pathData[1].command === 'L') {
- prev.command = 'M';
- } else if (pathData[1].command === 'l') {
- prev.command = 'm';
- }
-
- for (let i = 1; i < pathData.length; i++) {
- const { command, args } = pathData[i];
- if (
- (prev.command === command &&
- prev.command !== 'M' &&
- prev.command !== 'm') ||
- // combine matching moveto and lineto sequences
- (prev.command === 'M' && command === 'L') ||
- (prev.command === 'm' && command === 'l')
- ) {
- prev.args = [...prev.args, ...args];
- if (i === pathData.length - 1) {
- result +=
- prev.command +
- stringifyArgs(
- prev.command,
- prev.args,
- precision,
- disableSpaceAfterFlags,
- );
- }
- } else {
- result +=
- prev.command +
- stringifyArgs(
- prev.command,
- prev.args,
- precision,
- disableSpaceAfterFlags,
- );
-
- if (i === pathData.length - 1) {
- result +=
- command +
- stringifyArgs(command, args, precision, disableSpaceAfterFlags);
- } else {
- prev = { command, args };
- }
- }
- }
-
- return result;
-};
-exports.stringifyPathData = stringifyPathData;
diff --git a/node_modules/svgo/lib/stringifier.js b/node_modules/svgo/lib/stringifier.js
deleted file mode 100644
index 1a710869..00000000
--- a/node_modules/svgo/lib/stringifier.js
+++ /dev/null
@@ -1,295 +0,0 @@
-'use strict';
-
-/**
- * @typedef {import('./types').XastParent} XastParent
- * @typedef {import('./types').XastRoot} XastRoot
- * @typedef {import('./types').XastElement} XastElement
- * @typedef {import('./types').XastInstruction} XastInstruction
- * @typedef {import('./types').XastDoctype} XastDoctype
- * @typedef {import('./types').XastText} XastText
- * @typedef {import('./types').XastCdata} XastCdata
- * @typedef {import('./types').XastComment} XastComment
- * @typedef {import('./types').StringifyOptions} StringifyOptions
- */
-
-const { textElems } = require('../plugins/_collections');
-
-/**
- * @typedef {{
- * indent: string,
- * textContext: ?XastElement,
- * indentLevel: number,
- * }} State
- */
-
-/**
- * @typedef {Required<StringifyOptions>} Options
- */
-
-/**
- * @type {(char: string) => string}
- */
-const encodeEntity = (char) => {
- return entities[char];
-};
-
-/** @type {Options} */
-const defaults = {
- doctypeStart: '<!DOCTYPE',
- doctypeEnd: '>',
- procInstStart: '<?',
- procInstEnd: '?>',
- tagOpenStart: '<',
- tagOpenEnd: '>',
- tagCloseStart: '</',
- tagCloseEnd: '>',
- tagShortStart: '<',
- tagShortEnd: '/>',
- attrStart: '="',
- attrEnd: '"',
- commentStart: '<!--',
- commentEnd: '-->',
- cdataStart: '<![CDATA[',
- cdataEnd: ']]>',
- textStart: '',
- textEnd: '',
- indent: 4,
- regEntities: /[&'"<>]/g,
- regValEntities: /[&"<>]/g,
- encodeEntity,
- pretty: false,
- useShortTags: true,
- eol: 'lf',
- finalNewline: false,
-};
-
-/** @type {Record<string, string>} */
-const entities = {
- '&': '&amp;',
- "'": '&apos;',
- '"': '&quot;',
- '>': '&gt;',
- '<': '&lt;',
-};
-
-/**
- * convert XAST to SVG string
- *
- * @type {(data: XastRoot, config: StringifyOptions) => string}
- */
-const stringifySvg = (data, userOptions = {}) => {
- /**
- * @type {Options}
- */
- const config = { ...defaults, ...userOptions };
- const indent = config.indent;
- let newIndent = ' ';
- if (typeof indent === 'number' && Number.isNaN(indent) === false) {
- newIndent = indent < 0 ? '\t' : ' '.repeat(indent);
- } else if (typeof indent === 'string') {
- newIndent = indent;
- }
- /**
- * @type {State}
- */
- const state = {
- indent: newIndent,
- textContext: null,
- indentLevel: 0,
- };
- const eol = config.eol === 'crlf' ? '\r\n' : '\n';
- if (config.pretty) {
- config.doctypeEnd += eol;
- config.procInstEnd += eol;
- config.commentEnd += eol;
- config.cdataEnd += eol;
- config.tagShortEnd += eol;
- config.tagOpenEnd += eol;
- config.tagCloseEnd += eol;
- config.textEnd += eol;
- }
- let svg = stringifyNode(data, config, state);
- if (config.finalNewline && svg.length > 0 && !svg.endsWith('\n')) {
- svg += eol;
- }
- return svg;
-};
-exports.stringifySvg = stringifySvg;
-
-/**
- * @type {(node: XastParent, config: Options, state: State) => string}
- */
-const stringifyNode = (data, config, state) => {
- let svg = '';
- state.indentLevel += 1;
- for (const item of data.children) {
- if (item.type === 'element') {
- svg += stringifyElement(item, config, state);
- }
- if (item.type === 'text') {
- svg += stringifyText(item, config, state);
- }
- if (item.type === 'doctype') {
- svg += stringifyDoctype(item, config);
- }
- if (item.type === 'instruction') {
- svg += stringifyInstruction(item, config);
- }
- if (item.type === 'comment') {
- svg += stringifyComment(item, config);
- }
- if (item.type === 'cdata') {
- svg += stringifyCdata(item, config, state);
- }
- }
- state.indentLevel -= 1;
- return svg;
-};
-
-/**
- * create indent string in accordance with the current node level.
- *
- * @type {(config: Options, state: State) => string}
- */
-const createIndent = (config, state) => {
- let indent = '';
- if (config.pretty && state.textContext == null) {
- indent = state.indent.repeat(state.indentLevel - 1);
- }
- return indent;
-};
-
-/**
- * @type {(node: XastDoctype, config: Options) => string}
- */
-const stringifyDoctype = (node, config) => {
- return config.doctypeStart + node.data.doctype + config.doctypeEnd;
-};
-
-/**
- * @type {(node: XastInstruction, config: Options) => string}
- */
-const stringifyInstruction = (node, config) => {
- return (
- config.procInstStart + node.name + ' ' + node.value + config.procInstEnd
- );
-};
-
-/**
- * @type {(node: XastComment, config: Options) => string}
- */
-const stringifyComment = (node, config) => {
- return config.commentStart + node.value + config.commentEnd;
-};
-
-/**
- * @type {(node: XastCdata, config: Options, state: State) => string}
- */
-const stringifyCdata = (node, config, state) => {
- return (
- createIndent(config, state) +
- config.cdataStart +
- node.value +
- config.cdataEnd
- );
-};
-
-/**
- * @type {(node: XastElement, config: Options, state: State) => string}
- */
-const stringifyElement = (node, config, state) => {
- // empty element and short tag
- if (node.children.length === 0) {
- if (config.useShortTags) {
- return (
- createIndent(config, state) +
- config.tagShortStart +
- node.name +
- stringifyAttributes(node, config) +
- config.tagShortEnd
- );
- } else {
- return (
- createIndent(config, state) +
- config.tagShortStart +
- node.name +
- stringifyAttributes(node, config) +
- config.tagOpenEnd +
- config.tagCloseStart +
- node.name +
- config.tagCloseEnd
- );
- }
- // non-empty element
- } else {
- let tagOpenStart = config.tagOpenStart;
- let tagOpenEnd = config.tagOpenEnd;
- let tagCloseStart = config.tagCloseStart;
- let tagCloseEnd = config.tagCloseEnd;
- let openIndent = createIndent(config, state);
- let closeIndent = createIndent(config, state);
-
- if (state.textContext) {
- tagOpenStart = defaults.tagOpenStart;
- tagOpenEnd = defaults.tagOpenEnd;
- tagCloseStart = defaults.tagCloseStart;
- tagCloseEnd = defaults.tagCloseEnd;
- openIndent = '';
- } else if (textElems.has(node.name)) {
- tagOpenEnd = defaults.tagOpenEnd;
- tagCloseStart = defaults.tagCloseStart;
- closeIndent = '';
- state.textContext = node;
- }
-
- const children = stringifyNode(node, config, state);
-
- if (state.textContext === node) {
- state.textContext = null;
- }
-
- return (
- openIndent +
- tagOpenStart +
- node.name +
- stringifyAttributes(node, config) +
- tagOpenEnd +
- children +
- closeIndent +
- tagCloseStart +
- node.name +
- tagCloseEnd
- );
- }
-};
-
-/**
- * @type {(node: XastElement, config: Options) => string}
- */
-const stringifyAttributes = (node, config) => {
- let attrs = '';
- for (const [name, value] of Object.entries(node.attributes)) {
- // TODO remove attributes without values support in v3
- if (value !== undefined) {
- const encodedValue = value
- .toString()
- .replace(config.regValEntities, config.encodeEntity);
- attrs += ' ' + name + config.attrStart + encodedValue + config.attrEnd;
- } else {
- attrs += ' ' + name;
- }
- }
- return attrs;
-};
-
-/**
- * @type {(node: XastText, config: Options, state: State) => string}
- */
-const stringifyText = (node, config, state) => {
- return (
- createIndent(config, state) +
- config.textStart +
- node.value.replace(config.regEntities, config.encodeEntity) +
- (state.textContext ? '' : config.textEnd)
- );
-};
diff --git a/node_modules/svgo/lib/style.js b/node_modules/svgo/lib/style.js
deleted file mode 100644
index 0e62afb9..00000000
--- a/node_modules/svgo/lib/style.js
+++ /dev/null
@@ -1,336 +0,0 @@
-'use strict';
-
-/**
- * @typedef {import('css-tree').Rule} CsstreeRule
- * @typedef {import('./types').Specificity} Specificity
- * @typedef {import('./types').Stylesheet} Stylesheet
- * @typedef {import('./types').StylesheetRule} StylesheetRule
- * @typedef {import('./types').StylesheetDeclaration} StylesheetDeclaration
- * @typedef {import('./types').ComputedStyles} ComputedStyles
- * @typedef {import('./types').XastRoot} XastRoot
- * @typedef {import('./types').XastElement} XastElement
- * @typedef {import('./types').XastParent} XastParent
- * @typedef {import('./types').XastChild} XastChild
- */
-
-const csstree = require('css-tree');
-const csswhat = require('css-what');
-const {
- syntax: { specificity },
-} = require('csso');
-const { visit, matches } = require('./xast.js');
-const {
- attrsGroups,
- inheritableAttrs,
- presentationNonInheritableGroupAttrs,
-} = require('../plugins/_collections.js');
-
-// @ts-ignore not defined in @types/csstree
-const csstreeWalkSkip = csstree.walk.skip;
-
-/**
- * @type {(ruleNode: CsstreeRule, dynamic: boolean) => StylesheetRule[]}
- */
-const parseRule = (ruleNode, dynamic) => {
- /**
- * @type {StylesheetDeclaration[]}
- */
- const declarations = [];
- // collect declarations
- ruleNode.block.children.forEach((cssNode) => {
- if (cssNode.type === 'Declaration') {
- declarations.push({
- name: cssNode.property,
- value: csstree.generate(cssNode.value),
- important: cssNode.important === true,
- });
- }
- });
-
- /** @type {StylesheetRule[]} */
- const rules = [];
- csstree.walk(ruleNode.prelude, (node) => {
- if (node.type === 'Selector') {
- const newNode = csstree.clone(node);
- let hasPseudoClasses = false;
- csstree.walk(newNode, (pseudoClassNode, item, list) => {
- if (pseudoClassNode.type === 'PseudoClassSelector') {
- hasPseudoClasses = true;
- list.remove(item);
- }
- });
- rules.push({
- specificity: specificity(node),
- dynamic: hasPseudoClasses || dynamic,
- // compute specificity from original node to consider pseudo classes
- selector: csstree.generate(newNode),
- declarations,
- });
- }
- });
-
- return rules;
-};
-
-/**
- * @type {(css: string, dynamic: boolean) => StylesheetRule[]}
- */
-const parseStylesheet = (css, dynamic) => {
- /** @type {StylesheetRule[]} */
- const rules = [];
- const ast = csstree.parse(css, {
- parseValue: false,
- parseAtrulePrelude: false,
- });
- csstree.walk(ast, (cssNode) => {
- if (cssNode.type === 'Rule') {
- rules.push(...parseRule(cssNode, dynamic || false));
- return csstreeWalkSkip;
- }
- if (cssNode.type === 'Atrule') {
- if (
- cssNode.name === 'keyframes' ||
- cssNode.name === '-webkit-keyframes'
- ) {
- return csstreeWalkSkip;
- }
- csstree.walk(cssNode, (ruleNode) => {
- if (ruleNode.type === 'Rule') {
- rules.push(...parseRule(ruleNode, dynamic || true));
- return csstreeWalkSkip;
- }
- });
- return csstreeWalkSkip;
- }
- });
- return rules;
-};
-
-/**
- * @type {(css: string) => StylesheetDeclaration[]}
- */
-const parseStyleDeclarations = (css) => {
- /** @type {StylesheetDeclaration[]} */
- const declarations = [];
- const ast = csstree.parse(css, {
- context: 'declarationList',
- parseValue: false,
- });
- csstree.walk(ast, (cssNode) => {
- if (cssNode.type === 'Declaration') {
- declarations.push({
- name: cssNode.property,
- value: csstree.generate(cssNode.value),
- important: cssNode.important === true,
- });
- }
- });
- return declarations;
-};
-
-/**
- * @param {Stylesheet} stylesheet
- * @param {XastElement} node
- * @returns {ComputedStyles}
- */
-const computeOwnStyle = (stylesheet, node) => {
- /** @type {ComputedStyles} */
- const computedStyle = {};
- const importantStyles = new Map();
-
- // collect attributes
- for (const [name, value] of Object.entries(node.attributes)) {
- if (attrsGroups.presentation.has(name)) {
- computedStyle[name] = { type: 'static', inherited: false, value };
- importantStyles.set(name, false);
- }
- }
-
- // collect matching rules
- for (const { selector, declarations, dynamic } of stylesheet.rules) {
- if (matches(node, selector)) {
- for (const { name, value, important } of declarations) {
- const computed = computedStyle[name];
- if (computed && computed.type === 'dynamic') {
- continue;
- }
- if (dynamic) {
- computedStyle[name] = { type: 'dynamic', inherited: false };
- continue;
- }
- if (
- computed == null ||
- important === true ||
- importantStyles.get(name) === false
- ) {
- computedStyle[name] = { type: 'static', inherited: false, value };
- importantStyles.set(name, important);
- }
- }
- }
- }
-
- // collect inline styles
- const styleDeclarations =
- node.attributes.style == null
- ? []
- : parseStyleDeclarations(node.attributes.style);
- for (const { name, value, important } of styleDeclarations) {
- const computed = computedStyle[name];
- if (computed && computed.type === 'dynamic') {
- continue;
- }
- if (
- computed == null ||
- important === true ||
- importantStyles.get(name) === false
- ) {
- computedStyle[name] = { type: 'static', inherited: false, value };
- importantStyles.set(name, important);
- }
- }
-
- return computedStyle;
-};
-
-/**
- * Compares selector specificities.
- * Derived from https://github.com/keeganstreet/specificity/blob/8757133ddd2ed0163f120900047ff0f92760b536/specificity.js#L207
- *
- * @param {Specificity} a
- * @param {Specificity} b
- * @returns {number}
- */
-const compareSpecificity = (a, b) => {
- for (let i = 0; i < 4; i += 1) {
- if (a[i] < b[i]) {
- return -1;
- } else if (a[i] > b[i]) {
- return 1;
- }
- }
-
- return 0;
-};
-exports.compareSpecificity = compareSpecificity;
-
-/**
- * @type {(root: XastRoot) => Stylesheet}
- */
-const collectStylesheet = (root) => {
- /** @type {StylesheetRule[]} */
- const rules = [];
- /** @type {Map<XastElement, XastParent>} */
- const parents = new Map();
-
- visit(root, {
- element: {
- enter: (node, parentNode) => {
- parents.set(node, parentNode);
-
- if (node.name !== 'style') {
- return;
- }
-
- if (
- node.attributes.type == null ||
- node.attributes.type === '' ||
- node.attributes.type === 'text/css'
- ) {
- const dynamic =
- node.attributes.media != null && node.attributes.media !== 'all';
-
- for (const child of node.children) {
- if (child.type === 'text' || child.type === 'cdata') {
- rules.push(...parseStylesheet(child.value, dynamic));
- }
- }
- }
- },
- },
- });
- // sort by selectors specificity
- rules.sort((a, b) => compareSpecificity(a.specificity, b.specificity));
- return { rules, parents };
-};
-exports.collectStylesheet = collectStylesheet;
-
-/**
- * @param {Stylesheet} stylesheet
- * @param {XastElement} node
- * @returns {ComputedStyles}
- */
-const computeStyle = (stylesheet, node) => {
- const { parents } = stylesheet;
- const computedStyles = computeOwnStyle(stylesheet, node);
- let parent = parents.get(node);
- while (parent != null && parent.type !== 'root') {
- const inheritedStyles = computeOwnStyle(stylesheet, parent);
- for (const [name, computed] of Object.entries(inheritedStyles)) {
- if (
- computedStyles[name] == null &&
- inheritableAttrs.has(name) &&
- !presentationNonInheritableGroupAttrs.has(name)
- ) {
- computedStyles[name] = { ...computed, inherited: true };
- }
- }
- parent = parents.get(parent);
- }
- return computedStyles;
-};
-exports.computeStyle = computeStyle;
-
-/**
- * Determines if the CSS selector includes or traverses the given attribute.
- *
- * Classes and IDs are generated as attribute selectors, so you can check for
- * if a `.class` or `#id` is included by passing `name=class` or `name=id`
- * respectively.
- *
- * @param {csstree.ListItem<csstree.CssNode>|string} selector
- * @param {string} name
- * @param {?string} value
- * @param {boolean} traversed
- * @returns {boolean}
- */
-const includesAttrSelector = (
- selector,
- name,
- value = null,
- traversed = false,
-) => {
- const selectors =
- typeof selector === 'string'
- ? csswhat.parse(selector)
- : csswhat.parse(csstree.generate(selector.data));
-
- for (const subselector of selectors) {
- const hasAttrSelector = subselector.some((segment, index) => {
- if (traversed) {
- if (index === subselector.length - 1) {
- return false;
- }
-
- const isNextTraversal = csswhat.isTraversal(subselector[index + 1]);
-
- if (!isNextTraversal) {
- return false;
- }
- }
-
- if (segment.type !== 'attribute' || segment.name !== name) {
- return false;
- }
-
- return value == null ? true : segment.value === value;
- });
-
- if (hasAttrSelector) {
- return true;
- }
- }
-
- return false;
-};
-exports.includesAttrSelector = includesAttrSelector;
diff --git a/node_modules/svgo/lib/svgo-node.js b/node_modules/svgo/lib/svgo-node.js
deleted file mode 100644
index fc3ba8ab..00000000
--- a/node_modules/svgo/lib/svgo-node.js
+++ /dev/null
@@ -1,85 +0,0 @@
-'use strict';
-
-const os = require('os');
-const fs = require('fs');
-const { pathToFileURL } = require('url');
-const path = require('path');
-const { optimize: optimizeAgnostic } = require('./svgo.js');
-
-const importConfig = async (configFile) => {
- let config;
- // at the moment dynamic import may randomly fail with segfault
- // to workaround this for some users .cjs extension is loaded
- // exclusively with require
- if (configFile.endsWith('.cjs')) {
- config = require(configFile);
- } else {
- // dynamic import expects file url instead of path and may fail
- // when windows path is provided
- const { default: imported } = await import(pathToFileURL(configFile));
- config = imported;
- }
- if (config == null || typeof config !== 'object' || Array.isArray(config)) {
- throw Error(`Invalid config file "${configFile}"`);
- }
- return config;
-};
-
-const isFile = async (file) => {
- try {
- const stats = await fs.promises.stat(file);
- return stats.isFile();
- } catch {
- return false;
- }
-};
-
-const loadConfig = async (configFile, cwd = process.cwd()) => {
- if (configFile != null) {
- if (path.isAbsolute(configFile)) {
- return await importConfig(configFile);
- } else {
- return await importConfig(path.join(cwd, configFile));
- }
- }
- let dir = cwd;
- // eslint-disable-next-line no-constant-condition
- while (true) {
- const js = path.join(dir, 'svgo.config.js');
- if (await isFile(js)) {
- return await importConfig(js);
- }
- const mjs = path.join(dir, 'svgo.config.mjs');
- if (await isFile(mjs)) {
- return await importConfig(mjs);
- }
- const cjs = path.join(dir, 'svgo.config.cjs');
- if (await isFile(cjs)) {
- return await importConfig(cjs);
- }
- const parent = path.dirname(dir);
- if (dir === parent) {
- return null;
- }
- dir = parent;
- }
-};
-exports.loadConfig = loadConfig;
-
-const optimize = (input, config) => {
- if (config == null) {
- config = {};
- }
- if (typeof config !== 'object') {
- throw Error('Config should be an object');
- }
- return optimizeAgnostic(input, {
- ...config,
- js2svg: {
- // platform specific default for end of line
- eol: os.EOL === '\r\n' ? 'crlf' : 'lf',
- ...config.js2svg,
- },
- });
-};
-exports.optimize = optimize;
diff --git a/node_modules/svgo/lib/svgo.d.ts b/node_modules/svgo/lib/svgo.d.ts
deleted file mode 100644
index d4e9e3c2..00000000
--- a/node_modules/svgo/lib/svgo.d.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-import type { StringifyOptions, DataUri, Plugin as PluginFn } from './types';
-import type {
- BuiltinsWithOptionalParams,
- BuiltinsWithRequiredParams,
-} from '../plugins/plugins-types';
-
-type CustomPlugin = {
- name: string;
- fn: PluginFn<void>;
-};
-
-type PluginConfig =
- | keyof BuiltinsWithOptionalParams
- | {
- [Name in keyof BuiltinsWithOptionalParams]: {
- name: Name;
- params?: BuiltinsWithOptionalParams[Name];
- };
- }[keyof BuiltinsWithOptionalParams]
- | {
- [Name in keyof BuiltinsWithRequiredParams]: {
- name: Name;
- params: BuiltinsWithRequiredParams[Name];
- };
- }[keyof BuiltinsWithRequiredParams]
- | CustomPlugin;
-
-export type Config = {
- /** Can be used by plugins, for example prefixids */
- path?: string;
- /** Pass over SVGs multiple times to ensure all optimizations are applied. */
- multipass?: boolean;
- /** Precision of floating point numbers. Will be passed to each plugin that supports this param. */
- floatPrecision?: number;
- /**
- * Plugins configuration
- * ['preset-default'] is default
- * Can also specify any builtin plugin
- * ['sortAttrs', { name: 'prefixIds', params: { prefix: 'my-prefix' } }]
- * Or custom
- * [{ name: 'myPlugin', fn: () => ({}) }]
- */
- plugins?: PluginConfig[];
- /** Options for rendering optimized SVG from AST. */
- js2svg?: StringifyOptions;
- /** Output as Data URI string. */
- datauri?: DataUri;
-};
-
-type Output = {
- data: string;
-};
-
-/** The core of SVGO */
-export declare function optimize(input: string, config?: Config): Output;
-
-/**
- * If you write a tool on top of svgo you might need a way to load svgo config.
- *
- * You can also specify relative or absolute path and customize current working directory.
- */
-export declare function loadConfig(
- configFile: string,
- cwd?: string,
-): Promise<Config>;
-export declare function loadConfig(
- configFile?: null,
- cwd?: string,
-): Promise<Config | null>;
diff --git a/node_modules/svgo/lib/svgo.js b/node_modules/svgo/lib/svgo.js
deleted file mode 100644
index acb1f72e..00000000
--- a/node_modules/svgo/lib/svgo.js
+++ /dev/null
@@ -1,102 +0,0 @@
-'use strict';
-
-const { parseSvg } = require('./parser.js');
-const { stringifySvg } = require('./stringifier.js');
-const { builtin } = require('./builtin.js');
-const { invokePlugins } = require('./svgo/plugins.js');
-const { encodeSVGDatauri } = require('./svgo/tools.js');
-
-const pluginsMap = {};
-for (const plugin of builtin) {
- pluginsMap[plugin.name] = plugin;
-}
-
-const resolvePluginConfig = (plugin) => {
- if (typeof plugin === 'string') {
- // resolve builtin plugin specified as string
- const builtinPlugin = pluginsMap[plugin];
- if (builtinPlugin == null) {
- throw Error(`Unknown builtin plugin "${plugin}" specified.`);
- }
- return {
- name: plugin,
- params: {},
- fn: builtinPlugin.fn,
- };
- }
- if (typeof plugin === 'object' && plugin != null) {
- if (plugin.name == null) {
- throw Error(`Plugin name should be specified`);
- }
- // use custom plugin implementation
- let fn = plugin.fn;
- if (fn == null) {
- // resolve builtin plugin implementation
- const builtinPlugin = pluginsMap[plugin.name];
- if (builtinPlugin == null) {
- throw Error(`Unknown builtin plugin "${plugin.name}" specified.`);
- }
- fn = builtinPlugin.fn;
- }
- return {
- name: plugin.name,
- params: plugin.params,
- fn,
- };
- }
- return null;
-};
-
-const optimize = (input, config) => {
- if (config == null) {
- config = {};
- }
- if (typeof config !== 'object') {
- throw Error('Config should be an object');
- }
- const maxPassCount = config.multipass ? 10 : 1;
- let prevResultSize = Number.POSITIVE_INFINITY;
- let output = '';
- const info = {};
- if (config.path != null) {
- info.path = config.path;
- }
- for (let i = 0; i < maxPassCount; i += 1) {
- info.multipassCount = i;
- const ast = parseSvg(input, config.path);
- const plugins = config.plugins || ['preset-default'];
- if (!Array.isArray(plugins)) {
- throw Error(
- 'malformed config, `plugins` property must be an array.\nSee more info here: https://github.com/svg/svgo#configuration',
- );
- }
- const resolvedPlugins = plugins
- .filter((plugin) => plugin != null)
- .map(resolvePluginConfig);
-
- if (resolvedPlugins.length < plugins.length) {
- console.warn(
- 'Warning: plugins list includes null or undefined elements, these will be ignored.',
- );
- }
- const globalOverrides = {};
- if (config.floatPrecision != null) {
- globalOverrides.floatPrecision = config.floatPrecision;
- }
- invokePlugins(ast, info, resolvedPlugins, null, globalOverrides);
- output = stringifySvg(ast, config.js2svg);
- if (output.length < prevResultSize) {
- input = output;
- prevResultSize = output.length;
- } else {
- break;
- }
- }
- if (config.datauri) {
- output = encodeSVGDatauri(output, config.datauri);
- }
- return {
- data: output,
- };
-};
-exports.optimize = optimize;
diff --git a/node_modules/svgo/lib/svgo/coa.js b/node_modules/svgo/lib/svgo/coa.js
deleted file mode 100644
index 8e638d06..00000000
--- a/node_modules/svgo/lib/svgo/coa.js
+++ /dev/null
@@ -1,528 +0,0 @@
-'use strict';
-
-const fs = require('fs');
-const path = require('path');
-const colors = require('picocolors');
-const { loadConfig, optimize } = require('../svgo-node.js');
-const { builtin } = require('../builtin.js');
-const PKG = require('../../package.json');
-const { encodeSVGDatauri, decodeSVGDatauri } = require('./tools.js');
-
-const regSVGFile = /\.svg$/i;
-
-/**
- * Synchronously check if path is a directory. Tolerant to errors like ENOENT.
- *
- * @param {string} path
- */
-function checkIsDir(path) {
- try {
- return fs.lstatSync(path).isDirectory();
- } catch (e) {
- return false;
- }
-}
-
-module.exports = function makeProgram(program) {
- program
- .name(PKG.name)
- .description(PKG.description, {
- INPUT: 'Alias to --input',
- })
- .version(PKG.version, '-v, --version')
- .arguments('[INPUT...]')
- .option('-i, --input <INPUT...>', 'Input files, "-" for STDIN')
- .option('-s, --string <STRING>', 'Input SVG data string')
- .option(
- '-f, --folder <FOLDER>',
- 'Input folder, optimize and rewrite all *.svg files',
- )
- .option(
- '-o, --output <OUTPUT...>',
- 'Output file or folder (by default the same as the input), "-" for STDOUT',
- )
- .option(
- '-p, --precision <INTEGER>',
- 'Set number of digits in the fractional part, overrides plugins params',
- )
- .option('--config <CONFIG>', 'Custom config file, only .js is supported')
- .option(
- '--datauri <FORMAT>',
- 'Output as Data URI string (base64), URI encoded (enc) or unencoded (unenc)',
- )
- .option(
- '--multipass',
- 'Pass over SVGs multiple times to ensure all optimizations are applied',
- )
- .option('--pretty', 'Make SVG pretty printed')
- .option('--indent <INTEGER>', 'Indent number when pretty printing SVGs')
- .option(
- '--eol <EOL>',
- 'Line break to use when outputting SVG: lf, crlf. If unspecified, uses platform default.',
- )
- .option('--final-newline', 'Ensure SVG ends with a line break')
- .option(
- '-r, --recursive',
- "Use with '--folder'. Optimizes *.svg files in folders recursively.",
- )
- .option(
- '--exclude <PATTERN...>',
- "Use with '--folder'. Exclude files matching regular expression pattern.",
- )
- .option(
- '-q, --quiet',
- 'Only output error messages, not regular status messages',
- )
- .option('--show-plugins', 'Show available plugins and exit')
- // used by picocolors internally
- .option('--no-color', 'Output plain text without color')
- .action(action);
-};
-
-async function action(args, opts, command) {
- var input = opts.input || args;
- var output = opts.output;
- var config = {};
-
- if (opts.precision != null) {
- const number = Number.parseInt(opts.precision, 10);
- if (Number.isNaN(number)) {
- console.error(
- "error: option '-p, --precision' argument must be an integer number",
- );
- process.exit(1);
- } else {
- opts.precision = number;
- }
- }
-
- if (opts.datauri != null) {
- if (
- opts.datauri !== 'base64' &&
- opts.datauri !== 'enc' &&
- opts.datauri !== 'unenc'
- ) {
- console.error(
- "error: option '--datauri' must have one of the following values: 'base64', 'enc' or 'unenc'",
- );
- process.exit(1);
- }
- }
-
- if (opts.indent != null) {
- const number = Number.parseInt(opts.indent, 10);
- if (Number.isNaN(number)) {
- console.error(
- "error: option '--indent' argument must be an integer number",
- );
- process.exit(1);
- } else {
- opts.indent = number;
- }
- }
-
- if (opts.eol != null && opts.eol !== 'lf' && opts.eol !== 'crlf') {
- console.error(
- "error: option '--eol' must have one of the following values: 'lf' or 'crlf'",
- );
- process.exit(1);
- }
-
- // --show-plugins
- if (opts.showPlugins) {
- showAvailablePlugins();
- return;
- }
-
- // w/o anything
- if (
- (input.length === 0 || input[0] === '-') &&
- !opts.string &&
- !opts.stdin &&
- !opts.folder &&
- process.stdin.isTTY === true
- ) {
- return command.help();
- }
-
- if (
- typeof process == 'object' &&
- process.versions &&
- process.versions.node &&
- PKG &&
- PKG.engines.node
- ) {
- var nodeVersion = String(PKG.engines.node).match(/\d*(\.\d+)*/)[0];
- if (parseFloat(process.versions.node) < parseFloat(nodeVersion)) {
- throw Error(
- `${PKG.name} requires Node.js version ${nodeVersion} or higher.`,
- );
- }
- }
-
- // --config
- const loadedConfig = await loadConfig(opts.config);
- if (loadedConfig != null) {
- config = loadedConfig;
- }
-
- // --quiet
- if (opts.quiet) {
- config.quiet = opts.quiet;
- }
-
- // --recursive
- if (opts.recursive) {
- config.recursive = opts.recursive;
- }
-
- // --exclude
- config.exclude = opts.exclude
- ? opts.exclude.map((pattern) => RegExp(pattern))
- : [];
-
- // --precision
- if (opts.precision != null) {
- var precision = Math.min(Math.max(0, opts.precision), 20);
- config.floatPrecision = precision;
- }
-
- // --multipass
- if (opts.multipass) {
- config.multipass = true;
- }
-
- // --pretty
- if (opts.pretty) {
- config.js2svg = config.js2svg || {};
- config.js2svg.pretty = true;
- if (opts.indent != null) {
- config.js2svg.indent = opts.indent;
- }
- }
-
- // --eol
- if (opts.eol) {
- config.js2svg = config.js2svg || {};
- config.js2svg.eol = opts.eol;
- }
-
- // --final-newline
- if (opts.finalNewline) {
- config.js2svg = config.js2svg || {};
- config.js2svg.finalNewline = true;
- }
-
- // --output
- if (output) {
- if (input.length && input[0] != '-') {
- if (output.length == 1 && checkIsDir(output[0])) {
- var dir = output[0];
- for (var i = 0; i < input.length; i++) {
- output[i] = checkIsDir(input[i])
- ? input[i]
- : path.resolve(dir, path.basename(input[i]));
- }
- } else if (output.length < input.length) {
- output = output.concat(input.slice(output.length));
- }
- }
- } else if (input.length) {
- output = input;
- } else if (opts.string) {
- output = '-';
- }
-
- if (opts.datauri) {
- config.datauri = opts.datauri;
- }
-
- // --folder
- if (opts.folder) {
- var ouputFolder = (output && output[0]) || opts.folder;
- await optimizeFolder(config, opts.folder, ouputFolder);
- }
-
- // --input
- if (input.length !== 0) {
- // STDIN
- if (input[0] === '-') {
- return new Promise((resolve, reject) => {
- var data = '',
- file = output[0];
-
- process.stdin
- .on('data', (chunk) => (data += chunk))
- .once('end', () =>
- processSVGData(config, null, data, file).then(resolve, reject),
- );
- });
- // file
- } else {
- await Promise.all(
- input.map((file, n) => optimizeFile(config, file, output[n])),
- );
- }
-
- // --string
- } else if (opts.string) {
- var data = decodeSVGDatauri(opts.string);
-
- return processSVGData(config, null, data, output[0]);
- }
-}
-
-/**
- * Optimize SVG files in a directory.
- *
- * @param {Object} config options
- * @param {string} dir input directory
- * @param {string} output output directory
- * @return {Promise}
- */
-function optimizeFolder(config, dir, output) {
- if (!config.quiet) {
- console.log(`Processing directory '${dir}':\n`);
- }
- return fs.promises
- .readdir(dir)
- .then((files) => processDirectory(config, dir, files, output));
-}
-
-/**
- * Process given files, take only SVG.
- *
- * @param {Object} config options
- * @param {string} dir input directory
- * @param {Array} files list of file names in the directory
- * @param {string} output output directory
- * @return {Promise}
- */
-function processDirectory(config, dir, files, output) {
- // take only *.svg files, recursively if necessary
- var svgFilesDescriptions = getFilesDescriptions(config, dir, files, output);
-
- return svgFilesDescriptions.length
- ? Promise.all(
- svgFilesDescriptions.map((fileDescription) =>
- optimizeFile(
- config,
- fileDescription.inputPath,
- fileDescription.outputPath,
- ),
- ),
- )
- : Promise.reject(
- new Error(`No SVG files have been found in '${dir}' directory.`),
- );
-}
-
-/**
- * Get SVG files descriptions.
- *
- * @param {Object} config options
- * @param {string} dir input directory
- * @param {Array} files list of file names in the directory
- * @param {string} output output directory
- * @return {Array}
- */
-function getFilesDescriptions(config, dir, files, output) {
- const filesInThisFolder = files
- .filter(
- (name) =>
- regSVGFile.test(name) &&
- !config.exclude.some((regExclude) => regExclude.test(name)),
- )
- .map((name) => ({
- inputPath: path.resolve(dir, name),
- outputPath: path.resolve(output, name),
- }));
-
- return config.recursive
- ? [].concat(
- filesInThisFolder,
- files
- .filter((name) => checkIsDir(path.resolve(dir, name)))
- .map((subFolderName) => {
- const subFolderPath = path.resolve(dir, subFolderName);
- const subFolderFiles = fs.readdirSync(subFolderPath);
- const subFolderOutput = path.resolve(output, subFolderName);
- return getFilesDescriptions(
- config,
- subFolderPath,
- subFolderFiles,
- subFolderOutput,
- );
- })
- .reduce((a, b) => [].concat(a, b), []),
- )
- : filesInThisFolder;
-}
-
-/**
- * Read SVG file and pass to processing.
- *
- * @param {Object} config options
- * @param {string} file
- * @param {string} output
- * @return {Promise}
- */
-function optimizeFile(config, file, output) {
- return fs.promises.readFile(file, 'utf8').then(
- (data) => processSVGData(config, { path: file }, data, output, file),
- (error) => checkOptimizeFileError(config, file, output, error),
- );
-}
-
-/**
- * Optimize SVG data.
- *
- * @param {Object} config options
- * @param {string} data SVG content to optimize
- * @param {string} output where to write optimized file
- * @param {string} [input] input file name (being used if output is a directory)
- * @return {Promise}
- */
-function processSVGData(config, info, data, output, input) {
- var startTime = Date.now(),
- prevFileSize = Buffer.byteLength(data, 'utf8');
-
- let result;
- try {
- result = optimize(data, { ...config, ...info });
- } catch (error) {
- if (error.name === 'SvgoParserError') {
- console.error(colors.red(error.toString()));
- process.exit(1);
- } else {
- throw error;
- }
- }
- if (config.datauri) {
- result.data = encodeSVGDatauri(result.data, config.datauri);
- }
- var resultFileSize = Buffer.byteLength(result.data, 'utf8'),
- processingTime = Date.now() - startTime;
-
- return writeOutput(input, output, result.data).then(
- function () {
- if (!config.quiet && output != '-') {
- if (input) {
- console.log(`\n${path.basename(input)}:`);
- }
- printTimeInfo(processingTime);
- printProfitInfo(prevFileSize, resultFileSize);
- }
- },
- (error) =>
- Promise.reject(
- new Error(
- error.code === 'ENOTDIR'
- ? `Error: output '${output}' is not a directory.`
- : error,
- ),
- ),
- );
-}
-
-/**
- * Write result of an optimization.
- *
- * @param {string} input
- * @param {string} output output file name. '-' for stdout
- * @param {string} data data to write
- * @return {Promise}
- */
-function writeOutput(input, output, data) {
- if (output == '-') {
- process.stdout.write(data);
- return Promise.resolve();
- }
-
- fs.mkdirSync(path.dirname(output), { recursive: true });
-
- return fs.promises
- .writeFile(output, data, 'utf8')
- .catch((error) => checkWriteFileError(input, output, data, error));
-}
-
-/**
- * Write time taken to optimize.
- *
- * @param {number} time time in milliseconds.
- */
-function printTimeInfo(time) {
- console.log(`Done in ${time} ms!`);
-}
-
-/**
- * Write optimizing stats in a human-readable format.
- *
- * @param {number} inBytes size before optimization.
- * @param {number} outBytes size after optimization.
- */
-function printProfitInfo(inBytes, outBytes) {
- const profitPercent = 100 - (outBytes * 100) / inBytes;
- /** @type {[string, Function]} */
- const ui = profitPercent < 0 ? ['+', colors.red] : ['-', colors.green];
-
- console.log(
- Math.round((inBytes / 1024) * 1000) / 1000 + ' KiB',
- ui[0],
- ui[1](Math.abs(Math.round(profitPercent * 10) / 10) + '%'),
- '=',
- Math.round((outBytes / 1024) * 1000) / 1000 + ' KiB',
- );
-}
-
-/**
- * Check for errors, if it's a dir optimize the dir.
- *
- * @param {Object} config
- * @param {string} input
- * @param {string} output
- * @param {Error} error
- * @return {Promise}
- */
-function checkOptimizeFileError(config, input, output, error) {
- if (error.code == 'EISDIR') {
- return optimizeFolder(config, input, output);
- } else if (error.code == 'ENOENT') {
- return Promise.reject(
- new Error(`Error: no such file or directory '${error.path}'.`),
- );
- }
- return Promise.reject(error);
-}
-
-/**
- * Check for saving file error. If the output is a dir, then write file there.
- *
- * @param {string} input
- * @param {string} output
- * @param {string} data
- * @param {Error} error
- * @return {Promise}
- */
-function checkWriteFileError(input, output, data, error) {
- if (error.code == 'EISDIR' && input) {
- return fs.promises.writeFile(
- path.resolve(output, path.basename(input)),
- data,
- 'utf8',
- );
- } else {
- return Promise.reject(error);
- }
-}
-
-/** Show list of available plugins with short description. */
-function showAvailablePlugins() {
- const list = builtin
- .sort((a, b) => a.name.localeCompare(b.name))
- .map((plugin) => ` [ ${colors.green(plugin.name)} ] ${plugin.description}`)
- .join('\n');
- console.log('Currently available plugins:\n' + list);
-}
-
-module.exports.checkIsDir = checkIsDir;
diff --git a/node_modules/svgo/lib/svgo/css-select-adapter.d.ts b/node_modules/svgo/lib/svgo/css-select-adapter.d.ts
deleted file mode 100644
index a11ba35f..00000000
--- a/node_modules/svgo/lib/svgo/css-select-adapter.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-declare let obj: any;
-export = obj;
diff --git a/node_modules/svgo/lib/svgo/css-select-adapter.js b/node_modules/svgo/lib/svgo/css-select-adapter.js
deleted file mode 100644
index e9f1024a..00000000
--- a/node_modules/svgo/lib/svgo/css-select-adapter.js
+++ /dev/null
@@ -1,120 +0,0 @@
-'use strict';
-
-const isTag = (node) => {
- return node.type === 'element';
-};
-
-const existsOne = (test, elems) => {
- return elems.some((elem) => {
- if (isTag(elem)) {
- return test(elem) || existsOne(test, getChildren(elem));
- } else {
- return false;
- }
- });
-};
-
-const getAttributeValue = (elem, name) => {
- return elem.attributes[name];
-};
-
-const getChildren = (node) => {
- return node.children || [];
-};
-
-const getName = (elemAst) => {
- return elemAst.name;
-};
-
-const getParent = (node) => {
- return node.parentNode || null;
-};
-
-const getSiblings = (elem) => {
- var parent = getParent(elem);
- return parent ? getChildren(parent) : [];
-};
-
-const getText = (node) => {
- if (node.children[0].type === 'text' && node.children[0].type === 'cdata') {
- return node.children[0].value;
- }
- return '';
-};
-
-const hasAttrib = (elem, name) => {
- return elem.attributes[name] !== undefined;
-};
-
-const removeSubsets = (nodes) => {
- let idx = nodes.length;
- let node;
- let ancestor;
- let replace;
- // Check if each node (or one of its ancestors) is already contained in the
- // array.
- while (--idx > -1) {
- node = ancestor = nodes[idx];
- // Temporarily remove the node under consideration
- nodes[idx] = null;
- replace = true;
- while (ancestor) {
- if (nodes.includes(ancestor)) {
- replace = false;
- nodes.splice(idx, 1);
- break;
- }
- ancestor = getParent(ancestor);
- }
- // If the node has been found to be unique, re-insert it.
- if (replace) {
- nodes[idx] = node;
- }
- }
- return nodes;
-};
-
-const findAll = (test, elems) => {
- const result = [];
- for (const elem of elems) {
- if (isTag(elem)) {
- if (test(elem)) {
- result.push(elem);
- }
- result.push(...findAll(test, getChildren(elem)));
- }
- }
- return result;
-};
-
-const findOne = (test, elems) => {
- for (const elem of elems) {
- if (isTag(elem)) {
- if (test(elem)) {
- return elem;
- }
- const result = findOne(test, getChildren(elem));
- if (result) {
- return result;
- }
- }
- }
- return null;
-};
-
-const svgoCssSelectAdapter = {
- isTag,
- existsOne,
- getAttributeValue,
- getChildren,
- getName,
- getParent,
- getSiblings,
- getText,
- hasAttrib,
- removeSubsets,
- findAll,
- findOne,
-};
-
-module.exports = svgoCssSelectAdapter;
diff --git a/node_modules/svgo/lib/svgo/plugins.js b/node_modules/svgo/lib/svgo/plugins.js
deleted file mode 100644
index 10e93e9c..00000000
--- a/node_modules/svgo/lib/svgo/plugins.js
+++ /dev/null
@@ -1,61 +0,0 @@
-'use strict';
-
-const { visit } = require('../xast.js');
-
-/**
- * Plugins engine.
- *
- * @module plugins
- *
- * @param {Object} ast input ast
- * @param {Object} info extra information
- * @param {Array} plugins plugins object from config
- * @return {Object} output ast
- */
-const invokePlugins = (ast, info, plugins, overrides, globalOverrides) => {
- for (const plugin of plugins) {
- const override = overrides?.[plugin.name];
- if (override === false) {
- continue;
- }
- const params = { ...plugin.params, ...globalOverrides, ...override };
-
- const visitor = plugin.fn(ast, params, info);
- if (visitor != null) {
- visit(ast, visitor);
- }
- }
-};
-exports.invokePlugins = invokePlugins;
-
-const createPreset = ({ name, plugins }) => {
- return {
- name,
- fn: (ast, params, info) => {
- const { floatPrecision, overrides } = params;
- const globalOverrides = {};
- if (floatPrecision != null) {
- globalOverrides.floatPrecision = floatPrecision;
- }
- if (overrides) {
- const pluginNames = plugins.map(({ name }) => name);
- for (const pluginName of Object.keys(overrides)) {
- if (!pluginNames.includes(pluginName)) {
- console.warn(
- `You are trying to configure ${pluginName} which is not part of ${name}.\n` +
- `Try to put it before or after, for example\n\n` +
- `plugins: [\n` +
- ` {\n` +
- ` name: '${name}',\n` +
- ` },\n` +
- ` '${pluginName}'\n` +
- `]\n`,
- );
- }
- }
- }
- invokePlugins(ast, info, plugins, overrides, globalOverrides);
- },
- };
-};
-exports.createPreset = createPreset;
diff --git a/node_modules/svgo/lib/svgo/tools.js b/node_modules/svgo/lib/svgo/tools.js
deleted file mode 100644
index 2d5269ec..00000000
--- a/node_modules/svgo/lib/svgo/tools.js
+++ /dev/null
@@ -1,245 +0,0 @@
-'use strict';
-
-/**
- * @typedef {import('../../lib/types').XastElement} XastElement
- * @typedef {import('../types').PathDataCommand} PathDataCommand
- * @typedef {import('../types').DataUri} DataUri
- */
-
-const { attrsGroups, referencesProps } = require('../../plugins/_collections');
-
-const regReferencesUrl = /\burl\((["'])?#(.+?)\1\)/g;
-const regReferencesHref = /^#(.+?)$/;
-const regReferencesBegin = /(\w+)\.[a-zA-Z]/;
-
-/**
- * Encode plain SVG data string into Data URI string.
- *
- * @type {(str: string, type?: DataUri) => string}
- */
-exports.encodeSVGDatauri = (str, type) => {
- var prefix = 'data:image/svg+xml';
- if (!type || type === 'base64') {
- // base64
- prefix += ';base64,';
- str = prefix + Buffer.from(str).toString('base64');
- } else if (type === 'enc') {
- // URI encoded
- str = prefix + ',' + encodeURIComponent(str);
- } else if (type === 'unenc') {
- // unencoded
- str = prefix + ',' + str;
- }
- return str;
-};
-
-/**
- * Decode SVG Data URI string into plain SVG string.
- *
- * @type {(str: string) => string}
- */
-exports.decodeSVGDatauri = (str) => {
- var regexp = /data:image\/svg\+xml(;charset=[^;,]*)?(;base64)?,(.*)/;
- var match = regexp.exec(str);
-
- // plain string
- if (!match) return str;
-
- var data = match[3];
-
- if (match[2]) {
- // base64
- str = Buffer.from(data, 'base64').toString('utf8');
- } else if (data.charAt(0) === '%') {
- // URI encoded
- str = decodeURIComponent(data);
- } else if (data.charAt(0) === '<') {
- // unencoded
- str = data;
- }
- return str;
-};
-
-/**
- * @typedef {{
- * noSpaceAfterFlags?: boolean,
- * leadingZero?: boolean,
- * negativeExtraSpace?: boolean
- * }} CleanupOutDataParams
- */
-
-/**
- * Convert a row of numbers to an optimized string view.
- *
- * @example
- * [0, -1, .5, .5] → "0-1 .5.5"
- *
- * @type {(data: number[], params: CleanupOutDataParams, command?: PathDataCommand) => string}
- */
-exports.cleanupOutData = (data, params, command) => {
- let str = '';
- let delimiter;
- /**
- * @type {number}
- */
- let prev;
-
- data.forEach((item, i) => {
- // space delimiter by default
- delimiter = ' ';
-
- // no extra space in front of first number
- if (i == 0) delimiter = '';
-
- // no extra space after 'arcto' command flags(large-arc and sweep flags)
- // a20 60 45 0 1 30 20 → a20 60 45 0130 20
- if (params.noSpaceAfterFlags && (command == 'A' || command == 'a')) {
- var pos = i % 7;
- if (pos == 4 || pos == 5) delimiter = '';
- }
-
- // remove floating-point numbers leading zeros
- // 0.5 → .5
- // -0.5 → -.5
- const itemStr = params.leadingZero
- ? removeLeadingZero(item)
- : item.toString();
-
- // no extra space in front of negative number or
- // in front of a floating number if a previous number is floating too
- if (
- params.negativeExtraSpace &&
- delimiter != '' &&
- (item < 0 || (itemStr.charAt(0) === '.' && prev % 1 !== 0))
- ) {
- delimiter = '';
- }
- // save prev item value
- prev = item;
- str += delimiter + itemStr;
- });
- return str;
-};
-
-/**
- * Remove floating-point numbers leading zero.
- *
- * @param {number} value
- * @returns {string}
- * @example
- * 0.5 → .5
- * -0.5 → -.5
- */
-const removeLeadingZero = (value) => {
- const strValue = value.toString();
-
- if (0 < value && value < 1 && strValue.startsWith('0')) {
- return strValue.slice(1);
- }
-
- if (-1 < value && value < 0 && strValue[1] === '0') {
- return strValue[0] + strValue.slice(2);
- }
-
- return strValue;
-};
-exports.removeLeadingZero = removeLeadingZero;
-
-/**
- * If the current node contains any scripts. This does not check parents or
- * children of the node, only the properties and attributes of the node itself.
- *
- * @param {XastElement} node Current node to check against.
- * @returns {boolean} If the current node contains scripts.
- */
-const hasScripts = (node) => {
- if (node.name === 'script' && node.children.length !== 0) {
- return true;
- }
-
- if (node.name === 'a') {
- const hasJsLinks = Object.entries(node.attributes).some(
- ([attrKey, attrValue]) =>
- (attrKey === 'href' || attrKey.endsWith(':href')) &&
- attrValue != null &&
- attrValue.trimStart().startsWith('javascript:'),
- );
-
- if (hasJsLinks) {
- return true;
- }
- }
-
- const eventAttrs = [
- ...attrsGroups.animationEvent,
- ...attrsGroups.documentEvent,
- ...attrsGroups.documentElementEvent,
- ...attrsGroups.globalEvent,
- ...attrsGroups.graphicalEvent,
- ];
-
- return eventAttrs.some((attr) => node.attributes[attr] != null);
-};
-exports.hasScripts = hasScripts;
-
-/**
- * For example, a string that contains one or more of following would match and
- * return true:
- *
- * * `url(#gradient001)`
- * * `url('#gradient001')`
- *
- * @param {string} body
- * @returns {boolean} If the given string includes a URL reference.
- */
-const includesUrlReference = (body) => {
- return new RegExp(regReferencesUrl).test(body);
-};
-exports.includesUrlReference = includesUrlReference;
-
-/**
- * @param {string} attribute
- * @param {string} value
- * @returns {string[]}
- */
-const findReferences = (attribute, value) => {
- const results = [];
-
- if (referencesProps.has(attribute)) {
- const matches = value.matchAll(regReferencesUrl);
- for (const match of matches) {
- results.push(match[2]);
- }
- }
-
- if (attribute === 'href' || attribute.endsWith(':href')) {
- const match = regReferencesHref.exec(value);
- if (match != null) {
- results.push(match[1]);
- }
- }
-
- if (attribute === 'begin') {
- const match = regReferencesBegin.exec(value);
- if (match != null) {
- results.push(match[1]);
- }
- }
-
- return results.map((body) => decodeURI(body));
-};
-exports.findReferences = findReferences;
-
-/**
- * Does the same as {@link Number.toFixed} but without casting
- * the return value to a string.
- *
- * @param {number} num
- * @param {number} precision
- * @returns {number}
- */
-const toFixed = (num, precision) => {
- const pow = 10 ** precision;
- return Math.round(num * pow) / pow;
-};
-exports.toFixed = toFixed;
diff --git a/node_modules/svgo/lib/types.d.ts b/node_modules/svgo/lib/types.d.ts
deleted file mode 100644
index f61d9f18..00000000
--- a/node_modules/svgo/lib/types.d.ts
+++ /dev/null
@@ -1,174 +0,0 @@
-export type XastDoctype = {
- type: 'doctype';
- name: string;
- data: {
- doctype: string;
- };
-};
-
-export type XastInstruction = {
- type: 'instruction';
- name: string;
- value: string;
-};
-
-export type XastComment = {
- type: 'comment';
- value: string;
-};
-
-export type XastCdata = {
- type: 'cdata';
- value: string;
-};
-
-export type XastText = {
- type: 'text';
- value: string;
-};
-
-export type XastElement = {
- type: 'element';
- name: string;
- attributes: Record<string, string>;
- children: XastChild[];
-};
-
-export type XastChild =
- | XastDoctype
- | XastInstruction
- | XastComment
- | XastCdata
- | XastText
- | XastElement;
-
-export type XastRoot = {
- type: 'root';
- children: XastChild[];
-};
-
-export type XastParent = XastRoot | XastElement;
-
-export type XastNode = XastRoot | XastChild;
-
-export type StringifyOptions = {
- doctypeStart?: string;
- doctypeEnd?: string;
- procInstStart?: string;
- procInstEnd?: string;
- tagOpenStart?: string;
- tagOpenEnd?: string;
- tagCloseStart?: string;
- tagCloseEnd?: string;
- tagShortStart?: string;
- tagShortEnd?: string;
- attrStart?: string;
- attrEnd?: string;
- commentStart?: string;
- commentEnd?: string;
- cdataStart?: string;
- cdataEnd?: string;
- textStart?: string;
- textEnd?: string;
- indent?: number | string;
- regEntities?: RegExp;
- regValEntities?: RegExp;
- encodeEntity?: (char: string) => string;
- pretty?: boolean;
- useShortTags?: boolean;
- eol?: 'lf' | 'crlf';
- finalNewline?: boolean;
-};
-
-type VisitorNode<Node> = {
- enter?: (node: Node, parentNode: XastParent) => void | symbol;
- exit?: (node: Node, parentNode: XastParent) => void;
-};
-
-type VisitorRoot = {
- enter?: (node: XastRoot, parentNode: null) => void;
- exit?: (node: XastRoot, parentNode: null) => void;
-};
-
-export type Visitor = {
- doctype?: VisitorNode<XastDoctype>;
- instruction?: VisitorNode<XastInstruction>;
- comment?: VisitorNode<XastComment>;
- cdata?: VisitorNode<XastCdata>;
- text?: VisitorNode<XastText>;
- element?: VisitorNode<XastElement>;
- root?: VisitorRoot;
-};
-
-export type PluginInfo = {
- path?: string;
- multipassCount: number;
-};
-
-export type Plugin<Params> = (
- root: XastRoot,
- params: Params,
- info: PluginInfo,
-) => null | Visitor;
-
-export type Specificity = [number, number, number];
-
-export type StylesheetDeclaration = {
- name: string;
- value: string;
- important: boolean;
-};
-
-export type StylesheetRule = {
- dynamic: boolean;
- selector: string;
- specificity: Specificity;
- declarations: StylesheetDeclaration[];
-};
-
-export type Stylesheet = {
- rules: StylesheetRule[];
- parents: Map<XastElement, XastParent>;
-};
-
-type StaticStyle = {
- type: 'static';
- inherited: boolean;
- value: string;
-};
-
-type DynamicStyle = {
- type: 'dynamic';
- inherited: boolean;
-};
-
-export type ComputedStyles = Record<string, StaticStyle | DynamicStyle>;
-
-export type PathDataCommand =
- | 'M'
- | 'm'
- | 'Z'
- | 'z'
- | 'L'
- | 'l'
- | 'H'
- | 'h'
- | 'V'
- | 'v'
- | 'C'
- | 'c'
- | 'S'
- | 's'
- | 'Q'
- | 'q'
- | 'T'
- | 't'
- | 'A'
- | 'a';
-
-export type PathDataItem = {
- command: PathDataCommand;
- args: number[];
-};
-
-export type DataUri = 'base64' | 'enc' | 'unenc';
diff --git a/node_modules/svgo/lib/xast.js b/node_modules/svgo/lib/xast.js
deleted file mode 100644
index 9dca9646..00000000
--- a/node_modules/svgo/lib/xast.js
+++ /dev/null
@@ -1,87 +0,0 @@
-'use strict';
-
-/**
- * @typedef {import('./types').XastNode} XastNode
- * @typedef {import('./types').XastChild} XastChild
- * @typedef {import('./types').XastParent} XastParent
- * @typedef {import('./types').Visitor} Visitor
- */
-
-const { selectAll, selectOne, is } = require('css-select');
-const xastAdaptor = require('./svgo/css-select-adapter.js');
-
-const cssSelectOptions = {
- xmlMode: true,
- adapter: xastAdaptor,
-};
-
-/**
- * @type {(node: XastNode, selector: string) => XastChild[]}
- */
-const querySelectorAll = (node, selector) => {
- return selectAll(selector, node, cssSelectOptions);
-};
-exports.querySelectorAll = querySelectorAll;
-
-/**
- * @type {(node: XastNode, selector: string) => ?XastChild}
- */
-const querySelector = (node, selector) => {
- return selectOne(selector, node, cssSelectOptions);
-};
-exports.querySelector = querySelector;
-
-/**
- * @type {(node: XastChild, selector: string) => boolean}
- */
-const matches = (node, selector) => {
- return is(node, selector, cssSelectOptions);
-};
-exports.matches = matches;
-
-const visitSkip = Symbol();
-exports.visitSkip = visitSkip;
-
-/**
- * @type {(node: XastNode, visitor: Visitor, parentNode?: any) => void}
- */
-const visit = (node, visitor, parentNode) => {
- const callbacks = visitor[node.type];
- if (callbacks && callbacks.enter) {
- // @ts-ignore hard to infer
- const symbol = callbacks.enter(node, parentNode);
- if (symbol === visitSkip) {
- return;
- }
- }
- // visit root children
- if (node.type === 'root') {
- // copy children array to not loose cursor when children is spliced
- for (const child of node.children) {
- visit(child, visitor, node);
- }
- }
- // visit element children if still attached to parent
- if (node.type === 'element') {
- if (parentNode.children.includes(node)) {
- for (const child of node.children) {
- visit(child, visitor, node);
- }
- }
- }
- if (callbacks && callbacks.exit) {
- // @ts-ignore hard to infer
- callbacks.exit(node, parentNode);
- }
-};
-exports.visit = visit;
-
-/**
- * @param {XastChild} node
- * @param {XastParent} parentNode
- */
-const detachNodeFromParent = (node, parentNode) => {
- // avoid splice to not break for loops
- parentNode.children = parentNode.children.filter((child) => child !== node);
-};
-exports.detachNodeFromParent = detachNodeFromParent;
diff --git a/node_modules/svgo/node_modules/commander/CHANGELOG.md b/node_modules/svgo/node_modules/commander/CHANGELOG.md
deleted file mode 100644
index 0b55881b..00000000
--- a/node_modules/svgo/node_modules/commander/CHANGELOG.md
+++ /dev/null
@@ -1,440 +0,0 @@
-# Changelog
-
-All notable changes to this project will be documented in this file.
-
-The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
-and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). (Format adopted after v3.0.0.)
-
-<!-- markdownlint-disable MD024 -->
-<!-- markdownlint-disable MD004 -->
-
-## [7.2.0] (2021-03-26)
-
-### Added
-
-- TypeScript typing for `parent` property on `Command` ([#1475])
-- TypeScript typing for `.attributeName()` on `Option` ([#1483])
-- support information in package ([#1477])
-
-### Changed
-
-- improvements to error messages, README, and tests
-- update dependencies
-
-## [7.1.0] (2021-02-15)
-
-### Added
-
-- support for named imports from ECMAScript modules ([#1440])
-- add `.cjs` to list of expected script file extensions ([#1449])
-- allow using option choices and variadic together ([#1454])
-
-### Fixed
-
-- replace use of deprecated `process.mainModule` ([#1448])
-- regression for legacy `command('*')` and call when command line includes options ([#1464])
-- regression for `on('command:*', ...)` and call when command line includes unknown options ([#1464])
-- display best error for combination of unknown command and unknown option (i.e. unknown command) ([#1464])
-
-### Changed
-
-- make TypeScript typings tests stricter ([#1453])
-- improvements to README and tests
-
-## [7.0.0] (2021-01-15)
-
-### Added
-
-- `.enablePositionalOptions()` to let program and subcommand reuse same option ([#1427])
-- `.passThroughOptions()` to pass options through to other programs without needing `--` ([#1427])
-- `.allowExcessArguments(false)` to show an error message if there are too many command-arguments on command line for the action handler ([#1409])
-- `.configureOutput()` to modify use of stdout and stderr or customise display of errors ([#1387])
-- use `.addHelpText()` to add text before or after the built-in help, for just current command or also for all subcommands ([#1296])
-- enhance Option class ([#1331])
- - allow hiding options from help
- - allow restricting option arguments to a list of choices
- - allow setting how default value is shown in help
-- `.createOption()` to support subclassing of automatically created options (like `.createCommand()`) ([#1380])
-- refactor the code generating the help into a separate public Help class ([#1365])
- - support sorting subcommands and options in help
- - support specifying wrap width (columns)
- - allow subclassing Help class
- - allow configuring Help class without subclassing
-
-### Changed
-
-- *Breaking:* options are stored safely by default, not as properties on the command ([#1409])
- - this especially affects accessing options on program, use `program.opts()`
- - revert behaviour with `.storeOptionsAsProperties()`
-- *Breaking:* action handlers are passed options and command separately ([#1409])
-- deprecated callback parameter to `.help()` and `.outputHelp()` (removed from README) ([#1296])
-- *Breaking:* errors now displayed using `process.stderr.write()` instead of `console.error()`
-- deprecate `.on('--help')` (removed from README) ([#1296])
-- initialise the command description to empty string (previously undefined) ([#1365])
-- document and annotate deprecated routines ([#1349])
-
-### Fixed
-
-- wrapping bugs in help ([#1365])
- - first line of command description was wrapping two characters early
- - pad width calculation was not including help option and help command
- - pad width calculation was including hidden options and commands
-- improve backwards compatibility for custom command event listeners ([#1403])
-
-### Deleted
-
-- *Breaking:* `.passCommandToAction()` ([#1409])
- - no longer needed as action handler is passed options and command
-- *Breaking:* "extra arguments" parameter to action handler ([#1409])
- - if being used to detect excess arguments, there is now an error available by setting `.allowExcessArguments(false)`
-
-### Migration Tips
-
-The biggest change is the parsed option values. Previously the options were stored by default as properties on the command object, and now the options are stored separately.
-
-If you wish to restore the old behaviour and get running quickly you can call `.storeOptionsAsProperties()`.
-To allow you to move to the new code patterns incrementally, the action handler will be passed the command _twice_,
-to match the new "options" and "command" parameters (see below).
-
-**program options**
-
-Use the `.opts()` method to access the options. This is available on any command but is used most with the program.
-
-```js
-program.option('-d, --debug');
-program.parse();
-// Old code before Commander 7
-if (program.debug) console.log(`Program name is ${program.name()}`);
-```
-
-```js
-// New code
-const options = program.opts();
-if (options.debug) console.log(`Program name is ${program.name()}`);
-```
-
-**action handler**
-
-The action handler gets passed a parameter for each command-argument you declared. Previously by default the next parameter was the command object with the options as properties. Now the next two parameters are instead the options and the command. If you
-only accessed the options there may be no code changes required.
-
-```js
-program
- .command('compress <filename>')
- .option('-t, --trace')
- // Old code before Commander 7
- .action((filename, cmd)) => {
- if (cmd.trace) console.log(`Command name is ${cmd.name()}`);
- });
-```
-
-```js
- // New code
- .action((filename, options, command)) => {
- if (options.trace) console.log(`Command name is ${command.name()}`);
- });
-```
-
-If you already set `.storeOptionsAsProperties(false)` you may still need to adjust your code.
-
-```js
-program
- .command('compress <filename>')
- .storeOptionsAsProperties(false)
- .option('-t, --trace')
- // Old code before Commander 7
- .action((filename, command)) => {
- if (command.opts().trace) console.log(`Command name is ${command.name()}`);
- });
-```
-
-```js
- // New code
- .action((filename, options, command)) => {
- if (command.opts().trace) console.log(`Command name is ${command.name()}`);
- });
-```
-
-## [7.0.0-2] (2020-12-14)
-
-(Released in 7.0.0)
-
-## [7.0.0-1] (2020-11-21)
-
-(Released in 7.0.0)
-
-## [7.0.0-0] (2020-10-25)
-
-(Released in 7.0.0)
-
-## [6.2.1] (2020-12-13)
-
-### Fixed
-
-- some tests failed if directory path included a space ([1390])
-
-## [6.2.0] (2020-10-25)
-
-### Added
-
-- added 'tsx' file extension for stand-alone executable subcommands ([#1368])
-- documented second parameter to `.description()` to describe command arguments ([#1353])
-- documentation of special cases with options taking varying numbers of option-arguments ([#1332])
-- documentation for terminology ([#1361])
-
-### Fixed
-
-- add missing TypeScript definition for `.addHelpCommand()' ([#1375])
-- removed blank line after "Arguments:" in help, to match "Options:" and "Commands:" ([#1360])
-
-### Changed
-
-- update dependencies
-
-## [6.1.0] (2020-08-28)
-
-### Added
-
-- include URL to relevant section of README for error for potential conflict between Command properties and option values ([#1306])
-- `.combineFlagAndOptionalValue(false)` to ease upgrade path from older versions of Commander ([#1326])
-- allow disabling the built-in help option using `.helpOption(false)` ([#1325])
-- allow just some arguments in `argumentDescription` to `.description()` ([#1323])
-
-### Changed
-
-- tidy async test and remove lint override ([#1312])
-
-### Fixed
-
-- executable subcommand launching when script path not known ([#1322])
-
-## [6.0.0] (2020-07-21)
-
-### Added
-
-- add support for variadic options ([#1250])
-- allow options to be added with just a short flag ([#1256])
- - *Breaking* the option property has same case as flag. e.g. flag `-n` accessed as `opts().n` (previously uppercase)
-- *Breaking* throw an error if there might be a clash between option name and a Command property, with advice on how to resolve ([#1275])
-
-### Fixed
-
-- Options which contain -no- in the middle of the option flag should not be treated as negatable. ([#1301])
-
-## [6.0.0-0] (2020-06-20)
-
-(Released in 6.0.0)
-
-## [5.1.0] (2020-04-25)
-
-### Added
-
-- support for multiple command aliases, the first of which is shown in the auto-generated help ([#531], [#1236])
-- configuration support in `addCommand()` for `hidden` and `isDefault` ([#1232])
-
-### Fixed
-
-- omit masked help flags from the displayed help ([#645], [#1247])
-- remove old short help flag when change help flags using `helpOption` ([#1248])
-
-### Changed
-
-- remove use of `arguments` to improve auto-generated help in editors ([#1235])
-- rename `.command()` configuration `noHelp` to `hidden` (but not remove old support) ([#1232])
-- improvements to documentation
-- update dependencies
-- update tested versions of node
-- eliminate lint errors in TypeScript ([#1208])
-
-## [5.0.0] (2020-03-14)
-
-### Added
-
-* support for nested commands with action-handlers ([#1] [#764] [#1149])
-* `.addCommand()` for adding a separately configured command ([#764] [#1149])
-* allow a non-executable to be set as the default command ([#742] [#1149])
-* implicit help command when there are subcommands (previously only if executables) ([#1149])
-* customise implicit help command with `.addHelpCommand()` ([#1149])
-* display error message for unknown subcommand, by default ([#432] [#1088] [#1149])
-* display help for missing subcommand, by default ([#1088] [#1149])
-* combined short options as single argument may include boolean flags and value flag and value (e.g. `-a -b -p 80` can be written as `-abp80`) ([#1145])
-* `.parseOption()` includes short flag and long flag expansions ([#1145])
-* `.helpInformation()` returns help text as a string, previously a private routine ([#1169])
-* `.parse()` implicitly uses `process.argv` if arguments not specified ([#1172])
-* optionally specify where `.parse()` arguments "from", if not following node conventions ([#512] [#1172])
-* suggest help option along with unknown command error ([#1179])
-* TypeScript definition for `commands` property of `Command` ([#1184])
-* export `program` property ([#1195])
-* `createCommand` factory method to simplify subclassing ([#1191])
-
-### Fixed
-
-* preserve argument order in subcommands ([#508] [#962] [#1138])
-* do not emit `command:*` for executable subcommands ([#809] [#1149])
-* action handler called whether or not there are non-option arguments ([#1062] [#1149])
-* combining option short flag and value in single argument now works for subcommands ([#1145])
-* only add implicit help command when it will not conflict with other uses of argument ([#1153] [#1149])
-* implicit help command works with command aliases ([#948] [#1149])
-* options are validated whether or not there is an action handler ([#1149])
-
-### Changed
-
-* *Breaking* `.args` contains command arguments with just recognised options removed ([#1032] [#1138])
-* *Breaking* display error if required argument for command is missing ([#995] [#1149])
-* tighten TypeScript definition of custom option processing function passed to `.option()` ([#1119])
-* *Breaking* `.allowUnknownOption()` ([#802] [#1138])
- * unknown options included in arguments passed to command action handler
- * unknown options included in `.args`
-* only recognised option short flags and long flags are expanded (e.g. `-ab` or `--foo=bar`) ([#1145])
-* *Breaking* `.parseOptions()` ([#1138])
- * `args` in returned result renamed `operands` and does not include anything after first unknown option
- * `unknown` in returned result has arguments after first unknown option including operands, not just options and values
-* *Breaking* `.on('command:*', callback)` and other command events passed (changed) results from `.parseOptions`, i.e. operands and unknown ([#1138])
-* refactor Option from prototype to class ([#1133])
-* refactor Command from prototype to class ([#1159])
-* changes to error handling ([#1165])
- * throw for author error, not just display message
- * preflight for variadic error
- * add tips to missing subcommand executable
-* TypeScript fluent return types changed to be more subclass friendly, return `this` rather than `Command` ([#1180])
-* `.parseAsync` returns `Promise<this>` to be consistent with `.parse()` ([#1180])
-* update dependencies
-
-### Removed
-
-* removed EventEmitter from TypeScript definition for Command, eliminating implicit peer dependency on `@types/node` ([#1146])
-* removed private function `normalize` (the functionality has been integrated into `parseOptions`) ([#1145])
-* `parseExpectedArgs` is now private ([#1149])
-
-### Migration Tips
-
-If you use `.on('command:*')` or more complicated tests to detect an unrecognised subcommand, you may be able to delete the code and rely on the default behaviour.
-
-If you use `program.args` or more complicated tests to detect a missing subcommand, you may be able to delete the code and rely on the default behaviour.
-
-If you use `.command('*')` to add a default command, you may be be able to switch to `isDefault:true` with a named command.
-
-If you want to continue combining short options with optional values as though they were boolean flags, set `combineFlagAndOptionalValue(false)`
-to expand `-fb` to `-f -b` rather than `-f b`.
-
-## [5.0.0-4] (2020-03-03)
-
-(Released in 5.0.0)
-
-## [5.0.0-3] (2020-02-20)
-
-(Released in 5.0.0)
-
-## [5.0.0-2] (2020-02-10)
-
-(Released in 5.0.0)
-
-## [5.0.0-1] (2020-02-08)
-
-(Released in 5.0.0)
-
-## [5.0.0-0] (2020-02-02)
-
-(Released in 5.0.0)
-
-## Older versions
-
-* [4.x](./changelogs/CHANGELOG-4.md)
-* [3.x](./changelogs/CHANGELOG-3.md)
-* [2.x](./changelogs/CHANGELOG-2.md)
-* [1.x](./changelogs/CHANGELOG-1.md)
-* [0.x](./changelogs/CHANGELOG-0.md)
-
-[#1]: https://github.com/tj/commander.js/issues/1
-[#432]: https://github.com/tj/commander.js/issues/432
-[#508]: https://github.com/tj/commander.js/issues/508
-[#512]: https://github.com/tj/commander.js/issues/512
-[#531]: https://github.com/tj/commander.js/issues/531
-[#645]: https://github.com/tj/commander.js/issues/645
-[#742]: https://github.com/tj/commander.js/issues/742
-[#764]: https://github.com/tj/commander.js/issues/764
-[#802]: https://github.com/tj/commander.js/issues/802
-[#809]: https://github.com/tj/commander.js/issues/809
-[#948]: https://github.com/tj/commander.js/issues/948
-[#962]: https://github.com/tj/commander.js/issues/962
-[#995]: https://github.com/tj/commander.js/issues/995
-[#1032]: https://github.com/tj/commander.js/issues/1032
-[#1062]: https://github.com/tj/commander.js/pull/1062
-[#1088]: https://github.com/tj/commander.js/issues/1088
-[#1119]: https://github.com/tj/commander.js/pull/1119
-[#1133]: https://github.com/tj/commander.js/pull/1133
-[#1138]: https://github.com/tj/commander.js/pull/1138
-[#1145]: https://github.com/tj/commander.js/pull/1145
-[#1146]: https://github.com/tj/commander.js/pull/1146
-[#1149]: https://github.com/tj/commander.js/pull/1149
-[#1153]: https://github.com/tj/commander.js/issues/1153
-[#1159]: https://github.com/tj/commander.js/pull/1159
-[#1165]: https://github.com/tj/commander.js/pull/1165
-[#1169]: https://github.com/tj/commander.js/pull/1169
-[#1172]: https://github.com/tj/commander.js/pull/1172
-[#1179]: https://github.com/tj/commander.js/pull/1179
-[#1180]: https://github.com/tj/commander.js/pull/1180
-[#1184]: https://github.com/tj/commander.js/pull/1184
-[#1191]: https://github.com/tj/commander.js/pull/1191
-[#1195]: https://github.com/tj/commander.js/pull/1195
-[#1208]: https://github.com/tj/commander.js/pull/1208
-[#1232]: https://github.com/tj/commander.js/pull/1232
-[#1235]: https://github.com/tj/commander.js/pull/1235
-[#1236]: https://github.com/tj/commander.js/pull/1236
-[#1247]: https://github.com/tj/commander.js/pull/1247
-[#1248]: https://github.com/tj/commander.js/pull/1248
-[#1250]: https://github.com/tj/commander.js/pull/1250
-[#1256]: https://github.com/tj/commander.js/pull/1256
-[#1275]: https://github.com/tj/commander.js/pull/1275
-[#1296]: https://github.com/tj/commander.js/pull/1296
-[#1301]: https://github.com/tj/commander.js/issues/1301
-[#1306]: https://github.com/tj/commander.js/pull/1306
-[#1312]: https://github.com/tj/commander.js/pull/1312
-[#1322]: https://github.com/tj/commander.js/pull/1322
-[#1323]: https://github.com/tj/commander.js/pull/1323
-[#1325]: https://github.com/tj/commander.js/pull/1325
-[#1326]: https://github.com/tj/commander.js/pull/1326
-[#1331]: https://github.com/tj/commander.js/pull/1331
-[#1332]: https://github.com/tj/commander.js/pull/1332
-[#1349]: https://github.com/tj/commander.js/pull/1349
-[#1353]: https://github.com/tj/commander.js/pull/1353
-[#1360]: https://github.com/tj/commander.js/pull/1360
-[#1361]: https://github.com/tj/commander.js/pull/1361
-[#1365]: https://github.com/tj/commander.js/pull/1365
-[#1368]: https://github.com/tj/commander.js/pull/1368
-[#1375]: https://github.com/tj/commander.js/pull/1375
-[#1380]: https://github.com/tj/commander.js/pull/1380
-[#1387]: https://github.com/tj/commander.js/pull/1387
-[#1390]: https://github.com/tj/commander.js/pull/1390
-[#1403]: https://github.com/tj/commander.js/pull/1403
-[#1409]: https://github.com/tj/commander.js/pull/1409
-[#1427]: https://github.com/tj/commander.js/pull/1427
-[#1440]: https://github.com/tj/commander.js/pull/1440
-[#1448]: https://github.com/tj/commander.js/pull/1448
-[#1449]: https://github.com/tj/commander.js/pull/1449
-[#1453]: https://github.com/tj/commander.js/pull/1453
-[#1454]: https://github.com/tj/commander.js/pull/1454
-[#1464]: https://github.com/tj/commander.js/pull/1464
-[#1475]: https://github.com/tj/commander.js/pull/1475
-[#1477]: https://github.com/tj/commander.js/pull/1477
-[#1483]: https://github.com/tj/commander.js/pull/1483
-
-[Unreleased]: https://github.com/tj/commander.js/compare/master...develop
-[7.2.0]: https://github.com/tj/commander.js/compare/v7.1.0...v7.2.0
-[7.1.0]: https://github.com/tj/commander.js/compare/v7.0.0...v7.1.0
-[7.0.0]: https://github.com/tj/commander.js/compare/v6.2.1...v7.0.0
-[7.0.0-2]: https://github.com/tj/commander.js/compare/v7.0.0-1...v7.0.0-2
-[7.0.0-1]: https://github.com/tj/commander.js/compare/v7.0.0-0...v7.0.0-1
-[7.0.0-0]: https://github.com/tj/commander.js/compare/v6.2.0...v7.0.0-0
-[6.2.1]: https://github.com/tj/commander.js/compare/v6.2.0..v6.2.1
-[6.2.0]: https://github.com/tj/commander.js/compare/v6.1.0..v6.2.0
-[6.1.0]: https://github.com/tj/commander.js/compare/v6.0.0..v6.1.0
-[6.0.0]: https://github.com/tj/commander.js/compare/v5.1.0..v6.0.0
-[6.0.0-0]: https://github.com/tj/commander.js/compare/v5.1.0..v6.0.0-0
-[5.1.0]: https://github.com/tj/commander.js/compare/v5.0.0..v5.1.0
-[5.0.0]: https://github.com/tj/commander.js/compare/v4.1.1..v5.0.0
-[5.0.0-4]: https://github.com/tj/commander.js/compare/v5.0.0-3..v5.0.0-4
-[5.0.0-3]: https://github.com/tj/commander.js/compare/v5.0.0-2..v5.0.0-3
-[5.0.0-2]: https://github.com/tj/commander.js/compare/v5.0.0-1..v5.0.0-2
-[5.0.0-1]: https://github.com/tj/commander.js/compare/v5.0.0-0..v5.0.0-1
-[5.0.0-0]: https://github.com/tj/commander.js/compare/v4.1.1..v5.0.0-0
diff --git a/node_modules/svgo/node_modules/commander/LICENSE b/node_modules/svgo/node_modules/commander/LICENSE
deleted file mode 100644
index 10f997ab..00000000
--- a/node_modules/svgo/node_modules/commander/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-(The MIT License)
-
-Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/svgo/node_modules/commander/Readme.md b/node_modules/svgo/node_modules/commander/Readme.md
deleted file mode 100644
index d2a88a7b..00000000
--- a/node_modules/svgo/node_modules/commander/Readme.md
+++ /dev/null
@@ -1,917 +0,0 @@
-# Commander.js
-
-[![Build Status](https://github.com/tj/commander.js/workflows/build/badge.svg)](https://github.com/tj/commander.js/actions?query=workflow%3A%22build%22)
-[![NPM Version](http://img.shields.io/npm/v/commander.svg?style=flat)](https://www.npmjs.org/package/commander)
-[![NPM Downloads](https://img.shields.io/npm/dm/commander.svg?style=flat)](https://npmcharts.com/compare/commander?minimal=true)
-[![Install Size](https://packagephobia.now.sh/badge?p=commander)](https://packagephobia.now.sh/result?p=commander)
-
-The complete solution for [node.js](http://nodejs.org) command-line interfaces.
-
-Read this in other languages: English | [简体中文](./Readme_zh-CN.md)
-
-- [Commander.js](#commanderjs)
- - [Installation](#installation)
- - [Declaring _program_ variable](#declaring-program-variable)
- - [Options](#options)
- - [Common option types, boolean and value](#common-option-types-boolean-and-value)
- - [Default option value](#default-option-value)
- - [Other option types, negatable boolean and boolean|value](#other-option-types-negatable-boolean-and-booleanvalue)
- - [Required option](#required-option)
- - [Variadic option](#variadic-option)
- - [Version option](#version-option)
- - [More configuration](#more-configuration)
- - [Custom option processing](#custom-option-processing)
- - [Commands](#commands)
- - [Specify the argument syntax](#specify-the-argument-syntax)
- - [Action handler](#action-handler)
- - [Stand-alone executable (sub)commands](#stand-alone-executable-subcommands)
- - [Automated help](#automated-help)
- - [Custom help](#custom-help)
- - [Display help from code](#display-help-from-code)
- - [.usage and .name](#usage-and-name)
- - [.helpOption(flags, description)](#helpoptionflags-description)
- - [.addHelpCommand()](#addhelpcommand)
- - [More configuration](#more-configuration-1)
- - [Custom event listeners](#custom-event-listeners)
- - [Bits and pieces](#bits-and-pieces)
- - [.parse() and .parseAsync()](#parse-and-parseasync)
- - [Parsing Configuration](#parsing-configuration)
- - [Legacy options as properties](#legacy-options-as-properties)
- - [TypeScript](#typescript)
- - [createCommand()](#createcommand)
- - [Node options such as `--harmony`](#node-options-such-as---harmony)
- - [Debugging stand-alone executable subcommands](#debugging-stand-alone-executable-subcommands)
- - [Override exit and output handling](#override-exit-and-output-handling)
- - [Additional documentation](#additional-documentation)
- - [Examples](#examples)
- - [Support](#support)
- - [Commander for enterprise](#commander-for-enterprise)
-
-For information about terms used in this document see: [terminology](./docs/terminology.md)
-
-## Installation
-
-```bash
-npm install commander
-```
-
-## Declaring _program_ variable
-
-Commander exports a global object which is convenient for quick programs.
-This is used in the examples in this README for brevity.
-
-```js
-const { program } = require('commander');
-program.version('0.0.1');
-```
-
-For larger programs which may use commander in multiple ways, including unit testing, it is better to create a local Command object to use.
-
-```js
-const { Command } = require('commander');
-const program = new Command();
-program.version('0.0.1');
-```
-
-For named imports in ECMAScript modules, import from `commander/esm.mjs`.
-
-```js
-// index.mjs
-import { Command } from 'commander/esm.mjs';
-const program = new Command();
-```
-
-And in TypeScript:
-
-```ts
-// index.ts
-import { Command } from 'commander';
-const program = new Command();
-```
-
-
-## Options
-
-Options are defined with the `.option()` method, also serving as documentation for the options. Each option can have a short flag (single character) and a long name, separated by a comma or space or vertical bar ('|').
-
-The parsed options can be accessed by calling `.opts()` on a `Command` object, and are passed to the action handler. Multi-word options such as "--template-engine" are camel-cased, becoming `program.opts().templateEngine` etc.
-
-Multiple short flags may optionally be combined in a single argument following the dash: boolean flags, followed by a single option taking a value (possibly followed by the value).
-For example `-a -b -p 80` may be written as `-ab -p80` or even `-abp80`.
-
-You can use `--` to indicate the end of the options, and any remaining arguments will be used without being interpreted.
-
-By default options on the command line are not positional, and can be specified before or after other arguments.
-
-### Common option types, boolean and value
-
-The two most used option types are a boolean option, and an option which takes its value
-from the following argument (declared with angle brackets like `--expect <value>`). Both are `undefined` unless specified on command line.
-
-Example file: [options-common.js](./examples/options-common.js)
-
-```js
-program
- .option('-d, --debug', 'output extra debugging')
- .option('-s, --small', 'small pizza size')
- .option('-p, --pizza-type <type>', 'flavour of pizza');
-
-program.parse(process.argv);
-
-const options = program.opts();
-if (options.debug) console.log(options);
-console.log('pizza details:');
-if (options.small) console.log('- small pizza size');
-if (options.pizzaType) console.log(`- ${options.pizzaType}`);
-```
-
-```bash
-$ pizza-options -d
-{ debug: true, small: undefined, pizzaType: undefined }
-pizza details:
-$ pizza-options -p
-error: option '-p, --pizza-type <type>' argument missing
-$ pizza-options -ds -p vegetarian
-{ debug: true, small: true, pizzaType: 'vegetarian' }
-pizza details:
-- small pizza size
-- vegetarian
-$ pizza-options --pizza-type=cheese
-pizza details:
-- cheese
-```
-
-`program.parse(arguments)` processes the arguments, leaving any args not consumed by the program options in the `program.args` array. The parameter is optional and defaults to `process.argv`.
-
-### Default option value
-
-You can specify a default value for an option which takes a value.
-
-Example file: [options-defaults.js](./examples/options-defaults.js)
-
-```js
-program
- .option('-c, --cheese <type>', 'add the specified type of cheese', 'blue');
-
-program.parse();
-
-console.log(`cheese: ${program.opts().cheese}`);
-```
-
-```bash
-$ pizza-options
-cheese: blue
-$ pizza-options --cheese stilton
-cheese: stilton
-```
-
-### Other option types, negatable boolean and boolean|value
-
-You can define a boolean option long name with a leading `no-` to set the option value to false when used.
-Defined alone this also makes the option true by default.
-
-If you define `--foo` first, adding `--no-foo` does not change the default value from what it would
-otherwise be. You can specify a default boolean value for a boolean option and it can be overridden on command line.
-
-Example file: [options-negatable.js](./examples/options-negatable.js)
-
-```js
-program
- .option('--no-sauce', 'Remove sauce')
- .option('--cheese <flavour>', 'cheese flavour', 'mozzarella')
- .option('--no-cheese', 'plain with no cheese')
- .parse();
-
-const options = program.opts();
-const sauceStr = options.sauce ? 'sauce' : 'no sauce';
-const cheeseStr = (options.cheese === false) ? 'no cheese' : `${options.cheese} cheese`;
-console.log(`You ordered a pizza with ${sauceStr} and ${cheeseStr}`);
-```
-
-```bash
-$ pizza-options
-You ordered a pizza with sauce and mozzarella cheese
-$ pizza-options --sauce
-error: unknown option '--sauce'
-$ pizza-options --cheese=blue
-You ordered a pizza with sauce and blue cheese
-$ pizza-options --no-sauce --no-cheese
-You ordered a pizza with no sauce and no cheese
-```
-
-You can specify an option which may be used as a boolean option but may optionally take an option-argument
-(declared with square brackets like `--optional [value]`).
-
-Example file: [options-boolean-or-value.js](./examples/options-boolean-or-value.js)
-
-```js
-program
- .option('-c, --cheese [type]', 'Add cheese with optional type');
-
-program.parse(process.argv);
-
-const options = program.opts();
-if (options.cheese === undefined) console.log('no cheese');
-else if (options.cheese === true) console.log('add cheese');
-else console.log(`add cheese type ${options.cheese}`);
-```
-
-```bash
-$ pizza-options
-no cheese
-$ pizza-options --cheese
-add cheese
-$ pizza-options --cheese mozzarella
-add cheese type mozzarella
-```
-
-For information about possible ambiguous cases, see [options taking varying arguments](./docs/options-taking-varying-arguments.md).
-
-### Required option
-
-You may specify a required (mandatory) option using `.requiredOption`. The option must have a value after parsing, usually specified on the command line, or perhaps from a default value (say from environment). The method is otherwise the same as `.option` in format, taking flags and description, and optional default value or custom processing.
-
-Example file: [options-required.js](./examples/options-required.js)
-
-```js
-program
- .requiredOption('-c, --cheese <type>', 'pizza must have cheese');
-
-program.parse();
-```
-
-```bash
-$ pizza
-error: required option '-c, --cheese <type>' not specified
-```
-
-### Variadic option
-
-You may make an option variadic by appending `...` to the value placeholder when declaring the option. On the command line you
-can then specify multiple option-arguments, and the parsed option value will be an array. The extra arguments
-are read until the first argument starting with a dash. The special argument `--` stops option processing entirely. If a value
-is specified in the same argument as the option then no further values are read.
-
-Example file: [options-variadic.js](./examples/options-variadic.js)
-
-```js
-program
- .option('-n, --number <numbers...>', 'specify numbers')
- .option('-l, --letter [letters...]', 'specify letters');
-
-program.parse();
-
-console.log('Options: ', program.opts());
-console.log('Remaining arguments: ', program.args);
-```
-
-```bash
-$ collect -n 1 2 3 --letter a b c
-Options: { number: [ '1', '2', '3' ], letter: [ 'a', 'b', 'c' ] }
-Remaining arguments: []
-$ collect --letter=A -n80 operand
-Options: { number: [ '80' ], letter: [ 'A' ] }
-Remaining arguments: [ 'operand' ]
-$ collect --letter -n 1 -n 2 3 -- operand
-Options: { number: [ '1', '2', '3' ], letter: true }
-Remaining arguments: [ 'operand' ]
-```
-
-For information about possible ambiguous cases, see [options taking varying arguments](./docs/options-taking-varying-arguments.md).
-
-### Version option
-
-The optional `version` method adds handling for displaying the command version. The default option flags are `-V` and `--version`, and when present the command prints the version number and exits.
-
-```js
-program.version('0.0.1');
-```
-
-```bash
-$ ./examples/pizza -V
-0.0.1
-```
-
-You may change the flags and description by passing additional parameters to the `version` method, using
-the same syntax for flags as the `option` method.
-
-```js
-program.version('0.0.1', '-v, --vers', 'output the current version');
-```
-
-### More configuration
-
-You can add most options using the `.option()` method, but there are some additional features available
-by constructing an `Option` explicitly for less common cases.
-
-Example file: [options-extra.js](./examples/options-extra.js)
-
-```js
-program
- .addOption(new Option('-s, --secret').hideHelp())
- .addOption(new Option('-t, --timeout <delay>', 'timeout in seconds').default(60, 'one minute'))
- .addOption(new Option('-d, --drink <size>', 'drink size').choices(['small', 'medium', 'large']));
-```
-
-```bash
-$ extra --help
-Usage: help [options]
-
-Options:
- -t, --timeout <delay> timeout in seconds (default: one minute)
- -d, --drink <size> drink cup size (choices: "small", "medium", "large")
- -h, --help display help for command
-
-$ extra --drink huge
-error: option '-d, --drink <size>' argument 'huge' is invalid. Allowed choices are small, medium, large.
-```
-
-### Custom option processing
-
-You may specify a function to do custom processing of option-arguments. The callback function receives two parameters,
-the user specified option-argument and the previous value for the option. It returns the new value for the option.
-
-This allows you to coerce the option-argument to the desired type, or accumulate values, or do entirely custom processing.
-
-You can optionally specify the default/starting value for the option after the function parameter.
-
-Example file: [options-custom-processing.js](./examples/options-custom-processing.js)
-
-```js
-function myParseInt(value, dummyPrevious) {
- // parseInt takes a string and a radix
- const parsedValue = parseInt(value, 10);
- if (isNaN(parsedValue)) {
- throw new commander.InvalidOptionArgumentError('Not a number.');
- }
- return parsedValue;
-}
-
-function increaseVerbosity(dummyValue, previous) {
- return previous + 1;
-}
-
-function collect(value, previous) {
- return previous.concat([value]);
-}
-
-function commaSeparatedList(value, dummyPrevious) {
- return value.split(',');
-}
-
-program
- .option('-f, --float <number>', 'float argument', parseFloat)
- .option('-i, --integer <number>', 'integer argument', myParseInt)
- .option('-v, --verbose', 'verbosity that can be increased', increaseVerbosity, 0)
- .option('-c, --collect <value>', 'repeatable value', collect, [])
- .option('-l, --list <items>', 'comma separated list', commaSeparatedList)
-;
-
-program.parse();
-
-const options = program.opts();
-if (options.float !== undefined) console.log(`float: ${options.float}`);
-if (options.integer !== undefined) console.log(`integer: ${options.integer}`);
-if (options.verbose > 0) console.log(`verbosity: ${options.verbose}`);
-if (options.collect.length > 0) console.log(options.collect);
-if (options.list !== undefined) console.log(options.list);
-```
-
-```bash
-$ custom -f 1e2
-float: 100
-$ custom --integer 2
-integer: 2
-$ custom -v -v -v
-verbose: 3
-$ custom -c a -c b -c c
-[ 'a', 'b', 'c' ]
-$ custom --list x,y,z
-[ 'x', 'y', 'z' ]
-```
-
-## Commands
-
-You can specify (sub)commands using `.command()` or `.addCommand()`. There are two ways these can be implemented: using an action handler attached to the command, or as a stand-alone executable file (described in more detail later). The subcommands may be nested ([example](./examples/nestedCommands.js)).
-
-In the first parameter to `.command()` you specify the command name and any command-arguments. The arguments may be `<required>` or `[optional]`, and the last argument may also be `variadic...`.
-
-You can use `.addCommand()` to add an already configured subcommand to the program.
-
-For example:
-
-```js
-// Command implemented using action handler (description is supplied separately to `.command`)
-// Returns new command for configuring.
-program
- .command('clone <source> [destination]')
- .description('clone a repository into a newly created directory')
- .action((source, destination) => {
- console.log('clone command called');
- });
-
-// Command implemented using stand-alone executable file (description is second parameter to `.command`)
-// Returns `this` for adding more commands.
-program
- .command('start <service>', 'start named service')
- .command('stop [service]', 'stop named service, or all if no name supplied');
-
-// Command prepared separately.
-// Returns `this` for adding more commands.
-program
- .addCommand(build.makeBuildCommand());
-```
-
-Configuration options can be passed with the call to `.command()` and `.addCommand()`. Specifying `hidden: true` will
-remove the command from the generated help output. Specifying `isDefault: true` will run the subcommand if no other
-subcommand is specified ([example](./examples/defaultCommand.js)).
-
-### Specify the argument syntax
-
-You use `.arguments` to specify the expected command-arguments for the top-level command, and for subcommands they are usually
-included in the `.command` call. Angled brackets (e.g. `<required>`) indicate required command-arguments.
-Square brackets (e.g. `[optional]`) indicate optional command-arguments.
-You can optionally describe the arguments in the help by supplying a hash as second parameter to `.description()`.
-
-Example file: [arguments.js](./examples/arguments.js)
-
-```js
-program
- .version('0.1.0')
- .arguments('<username> [password]')
- .description('test command', {
- username: 'user to login',
- password: 'password for user, if required'
- })
- .action((username, password) => {
- console.log('username:', username);
- console.log('environment:', password || 'no password given');
- });
-```
-
- The last argument of a command can be variadic, and only the last argument. To make an argument variadic you
- append `...` to the argument name. For example:
-
-```js
-program
- .version('0.1.0')
- .command('rmdir <dirs...>')
- .action(function (dirs) {
- dirs.forEach((dir) => {
- console.log('rmdir %s', dir);
- });
- });
-```
-
-The variadic argument is passed to the action handler as an array.
-
-### Action handler
-
-The action handler gets passed a parameter for each command-argument you declared, and two additional parameters
-which are the parsed options and the command object itself.
-
-Example file: [thank.js](./examples/thank.js)
-
-```js
-program
- .arguments('<name>')
- .option('-t, --title <honorific>', 'title to use before name')
- .option('-d, --debug', 'display some debugging')
- .action((name, options, command) => {
- if (options.debug) {
- console.error('Called %s with options %o', command.name(), options);
- }
- const title = options.title ? `${options.title} ` : '';
- console.log(`Thank-you ${title}${name}`);
- });
-```
-
-You may supply an `async` action handler, in which case you call `.parseAsync` rather than `.parse`.
-
-```js
-async function run() { /* code goes here */ }
-
-async function main() {
- program
- .command('run')
- .action(run);
- await program.parseAsync(process.argv);
-}
-```
-
-A command's options and arguments on the command line are validated when the command is used. Any unknown options or missing arguments will be reported as an error. You can suppress the unknown option checks with `.allowUnknownOption()`. By default it is not an error to
-pass more arguments than declared, but you can make this an error with `.allowExcessArguments(false)`.
-
-### Stand-alone executable (sub)commands
-
-When `.command()` is invoked with a description argument, this tells Commander that you're going to use stand-alone executables for subcommands.
-Commander will search the executables in the directory of the entry script (like `./examples/pm`) with the name `program-subcommand`, like `pm-install`, `pm-search`.
-You can specify a custom name with the `executableFile` configuration option.
-
-You handle the options for an executable (sub)command in the executable, and don't declare them at the top-level.
-
-Example file: [pm](./examples/pm)
-
-```js
-program
- .version('0.1.0')
- .command('install [name]', 'install one or more packages')
- .command('search [query]', 'search with optional query')
- .command('update', 'update installed packages', { executableFile: 'myUpdateSubCommand' })
- .command('list', 'list packages installed', { isDefault: true });
-
-program.parse(process.argv);
-```
-
-If the program is designed to be installed globally, make sure the executables have proper modes, like `755`.
-
-## Automated help
-
-The help information is auto-generated based on the information commander already knows about your program. The default
-help option is `-h,--help`.
-
-Example file: [pizza](./examples/pizza)
-
-```bash
-$ node ./examples/pizza --help
-Usage: pizza [options]
-
-An application for pizza ordering
-
-Options:
- -p, --peppers Add peppers
- -c, --cheese <type> Add the specified type of cheese (default: "marble")
- -C, --no-cheese You do not want any cheese
- -h, --help display help for command
-```
-
-A `help` command is added by default if your command has subcommands. It can be used alone, or with a subcommand name to show
-further help for the subcommand. These are effectively the same if the `shell` program has implicit help:
-
-```bash
-shell help
-shell --help
-
-shell help spawn
-shell spawn --help
-```
-
-### Custom help
-
-You can add extra text to be displayed along with the built-in help.
-
-Example file: [custom-help](./examples/custom-help)
-
-```js
-program
- .option('-f, --foo', 'enable some foo');
-
-program.addHelpText('after', `
-
-Example call:
- $ custom-help --help`);
-```
-
-Yields the following help output:
-
-```Text
-Usage: custom-help [options]
-
-Options:
- -f, --foo enable some foo
- -h, --help display help for command
-
-Example call:
- $ custom-help --help
-```
-
-The positions in order displayed are:
-
-- `beforeAll`: add to the program for a global banner or header
-- `before`: display extra information before built-in help
-- `after`: display extra information after built-in help
-- `afterAll`: add to the program for a global footer (epilog)
-
-The positions "beforeAll" and "afterAll" apply to the command and all its subcommands.
-
-The second parameter can be a string, or a function returning a string. The function is passed a context object for your convenience. The properties are:
-
-- error: a boolean for whether the help is being displayed due to a usage error
-- command: the Command which is displaying the help
-
-### Display help from code
-
-`.help()`: display help information and exit immediately. You can optionally pass `{ error: true }` to display on stderr and exit with an error status.
-
-`.outputHelp()`: output help information without exiting. You can optionally pass `{ error: true }` to display on stderr.
-
-`.helpInformation()`: get the built-in command help information as a string for processing or displaying yourself.
-
-### .usage and .name
-
-These allow you to customise the usage description in the first line of the help. The name is otherwise
-deduced from the (full) program arguments. Given:
-
-```js
-program
- .name("my-command")
- .usage("[global options] command")
-```
-
-The help will start with:
-
-```Text
-Usage: my-command [global options] command
-```
-
-### .helpOption(flags, description)
-
-By default every command has a help option. Override the default help flags and description. Pass false to disable the built-in help option.
-
-```js
-program
- .helpOption('-e, --HELP', 'read more information');
-```
-
-### .addHelpCommand()
-
-A help command is added by default if your command has subcommands. You can explicitly turn on or off the implicit help command with `.addHelpCommand()` and `.addHelpCommand(false)`.
-
-You can both turn on and customise the help command by supplying the name and description:
-
-```js
-program.addHelpCommand('assist [command]', 'show assistance');
-```
-
-### More configuration
-
-The built-in help is formatted using the Help class.
-You can configure the Help behaviour by modifying data properties and methods using `.configureHelp()`, or by subclassing using `.createHelp()` if you prefer.
-
-The data properties are:
-
-- `helpWidth`: specify the wrap width, useful for unit tests
-- `sortSubcommands`: sort the subcommands alphabetically
-- `sortOptions`: sort the options alphabetically
-
-There are methods getting the visible lists of arguments, options, and subcommands. There are methods for formatting the items in the lists, with each item having a _term_ and _description_. Take a look at `.formatHelp()` to see how they are used.
-
-Example file: [configure-help.js](./examples/configure-help.js)
-
-```
-program.configureHelp({
- sortSubcommands: true,
- subcommandTerm: (cmd) => cmd.name() // Just show the name, instead of short usage.
-});
-```
-
-## Custom event listeners
-
-You can execute custom actions by listening to command and option events.
-
-```js
-program.on('option:verbose', function () {
- process.env.VERBOSE = this.opts().verbose;
-});
-
-program.on('command:*', function (operands) {
- console.error(`error: unknown command '${operands[0]}'`);
- const availableCommands = program.commands.map(cmd => cmd.name());
- mySuggestBestMatch(operands[0], availableCommands);
- process.exitCode = 1;
-});
-```
-
-## Bits and pieces
-
-### .parse() and .parseAsync()
-
-The first argument to `.parse` is the array of strings to parse. You may omit the parameter to implicitly use `process.argv`.
-
-If the arguments follow different conventions than node you can pass a `from` option in the second parameter:
-
-- 'node': default, `argv[0]` is the application and `argv[1]` is the script being run, with user parameters after that
-- 'electron': `argv[1]` varies depending on whether the electron application is packaged
-- 'user': all of the arguments from the user
-
-For example:
-
-```js
-program.parse(process.argv); // Explicit, node conventions
-program.parse(); // Implicit, and auto-detect electron
-program.parse(['-f', 'filename'], { from: 'user' });
-```
-
-### Parsing Configuration
-
-If the default parsing does not suit your needs, there are some behaviours to support other usage patterns.
-
-By default program options are recognised before and after subcommands. To only look for program options before subcommands, use `.enablePositionalOptions()`. This lets you use
-an option for a different purpose in subcommands.
-
-Example file: [positional-options.js](./examples/positional-options.js)
-
-With positional options, the `-b` is a program option in the first line and a subcommand option in the second line:
-
-```sh
-program -b subcommand
-program subcommand -b
-```
-
-By default options are recognised before and after command-arguments. To only process options that come
-before the command-arguments, use `.passThroughOptions()`. This lets you pass the arguments and following options through to another program
-without needing to use `--` to end the option processing.
-To use pass through options in a subcommand, the program needs to enable positional options.
-
-Example file: [pass-through-options.js](./examples/pass-through-options.js)
-
-With pass through options, the `--port=80` is a program option in the first line and passed through as a command-argument in the second line:
-
-```sh
-program --port=80 arg
-program arg --port=80
-```
-
-By default the option processing shows an error for an unknown option. To have an unknown option treated as an ordinary command-argument and continue looking for options, use `.allowUnknownOption()`. This lets you mix known and unknown options.
-
-By default the argument processing does not display an error for more command-arguments than expected.
-To display an error for excess arguments, use`.allowExcessArguments(false)`.
-
-### Legacy options as properties
-
-Before Commander 7, the option values were stored as properties on the command.
-This was convenient to code but the downside was possible clashes with
-existing properties of `Command`. You can revert to the old behaviour to run unmodified legacy code by using `.storeOptionsAsProperties()`.
-
-```js
-program
- .storeOptionsAsProperties()
- .option('-d, --debug')
- .action((commandAndOptions) => {
- if (commandAndOptions.debug) {
- console.error(`Called ${commandAndOptions.name()}`);
- }
- });
-```
-
-### TypeScript
-
-If you use `ts-node` and stand-alone executable subcommands written as `.ts` files, you need to call your program through node to get the subcommands called correctly. e.g.
-
-```bash
-node -r ts-node/register pm.ts
-```
-
-### createCommand()
-
-This factory function creates a new command. It is exported and may be used instead of using `new`, like:
-
-```js
-const { createCommand } = require('commander');
-const program = createCommand();
-```
-
-`createCommand` is also a method of the Command object, and creates a new command rather than a subcommand. This gets used internally
-when creating subcommands using `.command()`, and you may override it to
-customise the new subcommand (example file [custom-command-class.js](./examples/custom-command-class.js)).
-
-### Node options such as `--harmony`
-
-You can enable `--harmony` option in two ways:
-
-- Use `#! /usr/bin/env node --harmony` in the subcommands scripts. (Note Windows does not support this pattern.)
-- Use the `--harmony` option when call the command, like `node --harmony examples/pm publish`. The `--harmony` option will be preserved when spawning subcommand process.
-
-### Debugging stand-alone executable subcommands
-
-An executable subcommand is launched as a separate child process.
-
-If you are using the node inspector for [debugging](https://nodejs.org/en/docs/guides/debugging-getting-started/) executable subcommands using `node --inspect` et al,
-the inspector port is incremented by 1 for the spawned subcommand.
-
-If you are using VSCode to debug executable subcommands you need to set the `"autoAttachChildProcesses": true` flag in your launch.json configuration.
-
-### Override exit and output handling
-
-By default Commander calls `process.exit` when it detects errors, or after displaying the help or version. You can override
-this behaviour and optionally supply a callback. The default override throws a `CommanderError`.
-
-The override callback is passed a `CommanderError` with properties `exitCode` number, `code` string, and `message`. The default override behaviour is to throw the error, except for async handling of executable subcommand completion which carries on. The normal display of error messages or version or help
-is not affected by the override which is called after the display.
-
-```js
-program.exitOverride();
-
-try {
- program.parse(process.argv);
-} catch (err) {
- // custom processing...
-}
-```
-
-By default Commander is configured for a command-line application and writes to stdout and stderr.
-You can modify this behaviour for custom applications. In addition, you can modify the display of error messages.
-
-Example file: [configure-output.js](./examples/configure-output.js)
-
-
-```js
-function errorColor(str) {
- // Add ANSI escape codes to display text in red.
- return `\x1b[31m${str}\x1b[0m`;
-}
-
-program
- .configureOutput({
- // Visibly override write routines as example!
- writeOut: (str) => process.stdout.write(`[OUT] ${str}`),
- writeErr: (str) => process.stdout.write(`[ERR] ${str}`),
- // Highlight errors in color.
- outputError: (str, write) => write(errorColor(str))
- });
-```
-
-### Additional documentation
-
-There is more information available about:
-
-- [deprecated](./docs/deprecated.md) features still supported for backwards compatibility
-- [options taking varying arguments](./docs/options-taking-varying-arguments.md)
-
-## Examples
-
-In a single command program, you might not need an action handler.
-
-Example file: [pizza](./examples/pizza)
-
-```js
-const { program } = require('commander');
-
-program
- .description('An application for pizza ordering')
- .option('-p, --peppers', 'Add peppers')
- .option('-c, --cheese <type>', 'Add the specified type of cheese', 'marble')
- .option('-C, --no-cheese', 'You do not want any cheese');
-
-program.parse();
-
-const options = program.opts();
-console.log('you ordered a pizza with:');
-if (options.peppers) console.log(' - peppers');
-const cheese = !options.cheese ? 'no' : options.cheese;
-console.log(' - %s cheese', cheese);
-```
-
-In a multi-command program, you will have action handlers for each command (or stand-alone executables for the commands).
-
-Example file: [deploy](./examples/deploy)
-
-```js
-const { Command } = require('commander');
-const program = new Command();
-
-program
- .version('0.0.1')
- .option('-c, --config <path>', 'set config path', './deploy.conf');
-
-program
- .command('setup [env]')
- .description('run setup commands for all envs')
- .option('-s, --setup_mode <mode>', 'Which setup mode to use', 'normal')
- .action((env, options) => {
- env = env || 'all';
- console.log('read config from %s', program.opts().config);
- console.log('setup for %s env(s) with %s mode', env, options.setup_mode);
- });
-
-program
- .command('exec <script>')
- .alias('ex')
- .description('execute the given remote cmd')
- .option('-e, --exec_mode <mode>', 'Which exec mode to use', 'fast')
- .action((script, options) => {
- console.log('read config from %s', program.opts().config);
- console.log('exec "%s" using %s mode and config %s', script, options.exec_mode, program.opts().config);
- }).addHelpText('after', `
-Examples:
- $ deploy exec sequential
- $ deploy exec async`
- );
-
-program.parse(process.argv);
-```
-
-More samples can be found in the [examples](https://github.com/tj/commander.js/tree/master/examples) directory.
-
-## Support
-
-The current version of Commander is fully supported on Long Term Support versions of node, and requires at least node v10.
-(For older versions of node, use an older version of Commander. Commander version 2.x has the widest support.)
-
-The main forum for free and community support is the project [Issues](https://github.com/tj/commander.js/issues) on GitHub.
-
-### Commander for enterprise
-
-Available as part of the Tidelift Subscription
-
-The maintainers of Commander and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-commander?utm_source=npm-commander&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
diff --git a/node_modules/svgo/node_modules/commander/esm.mjs b/node_modules/svgo/node_modules/commander/esm.mjs
deleted file mode 100644
index 60bf2521..00000000
--- a/node_modules/svgo/node_modules/commander/esm.mjs
+++ /dev/null
@@ -1,4 +0,0 @@
-import commander from './index.js';
-
-// wrapper to provide named exports for ESM.
-export const { program, Option, Command, CommanderError, InvalidOptionArgumentError, Help, createCommand } = commander;
diff --git a/node_modules/svgo/node_modules/commander/index.js b/node_modules/svgo/node_modules/commander/index.js
deleted file mode 100644
index 985a8cfc..00000000
--- a/node_modules/svgo/node_modules/commander/index.js
+++ /dev/null
@@ -1,2217 +0,0 @@
-/**
- * Module dependencies.
- */
-
-const EventEmitter = require('events').EventEmitter;
-const childProcess = require('child_process');
-const path = require('path');
-const fs = require('fs');
-
-// @ts-check
-
-// Although this is a class, methods are static in style to allow override using subclass or just functions.
-class Help {
- constructor() {
- this.helpWidth = undefined;
- this.sortSubcommands = false;
- this.sortOptions = false;
- }
-
- /**
- * Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one.
- *
- * @param {Command} cmd
- * @returns {Command[]}
- */
-
- visibleCommands(cmd) {
- const visibleCommands = cmd.commands.filter(cmd => !cmd._hidden);
- if (cmd._hasImplicitHelpCommand()) {
- // Create a command matching the implicit help command.
- const args = cmd._helpCommandnameAndArgs.split(/ +/);
- const helpCommand = cmd.createCommand(args.shift())
- .helpOption(false);
- helpCommand.description(cmd._helpCommandDescription);
- helpCommand._parseExpectedArgs(args);
- visibleCommands.push(helpCommand);
- }
- if (this.sortSubcommands) {
- visibleCommands.sort((a, b) => {
- return a.name().localeCompare(b.name());
- });
- }
- return visibleCommands;
- }
-
- /**
- * Get an array of the visible options. Includes a placeholder for the implicit help option, if there is one.
- *
- * @param {Command} cmd
- * @returns {Option[]}
- */
-
- visibleOptions(cmd) {
- const visibleOptions = cmd.options.filter((option) => !option.hidden);
- // Implicit help
- const showShortHelpFlag = cmd._hasHelpOption && cmd._helpShortFlag && !cmd._findOption(cmd._helpShortFlag);
- const showLongHelpFlag = cmd._hasHelpOption && !cmd._findOption(cmd._helpLongFlag);
- if (showShortHelpFlag || showLongHelpFlag) {
- let helpOption;
- if (!showShortHelpFlag) {
- helpOption = cmd.createOption(cmd._helpLongFlag, cmd._helpDescription);
- } else if (!showLongHelpFlag) {
- helpOption = cmd.createOption(cmd._helpShortFlag, cmd._helpDescription);
- } else {
- helpOption = cmd.createOption(cmd._helpFlags, cmd._helpDescription);
- }
- visibleOptions.push(helpOption);
- }
- if (this.sortOptions) {
- const getSortKey = (option) => {
- // WYSIWYG for order displayed in help with short before long, no special handling for negated.
- return option.short ? option.short.replace(/^-/, '') : option.long.replace(/^--/, '');
- };
- visibleOptions.sort((a, b) => {
- return getSortKey(a).localeCompare(getSortKey(b));
- });
- }
- return visibleOptions;
- }
-
- /**
- * Get an array of the arguments which have descriptions.
- *
- * @param {Command} cmd
- * @returns {{ term: string, description:string }[]}
- */
-
- visibleArguments(cmd) {
- if (cmd._argsDescription && cmd._args.length) {
- return cmd._args.map((argument) => {
- return { term: argument.name, description: cmd._argsDescription[argument.name] || '' };
- }, 0);
- }
- return [];
- }
-
- /**
- * Get the command term to show in the list of subcommands.
- *
- * @param {Command} cmd
- * @returns {string}
- */
-
- subcommandTerm(cmd) {
- // Legacy. Ignores custom usage string, and nested commands.
- const args = cmd._args.map(arg => humanReadableArgName(arg)).join(' ');
- return cmd._name +
- (cmd._aliases[0] ? '|' + cmd._aliases[0] : '') +
- (cmd.options.length ? ' [options]' : '') + // simplistic check for non-help option
- (args ? ' ' + args : '');
- }
-
- /**
- * Get the option term to show in the list of options.
- *
- * @param {Option} option
- * @returns {string}
- */
-
- optionTerm(option) {
- return option.flags;
- }
-
- /**
- * Get the longest command term length.
- *
- * @param {Command} cmd
- * @param {Help} helper
- * @returns {number}
- */
-
- longestSubcommandTermLength(cmd, helper) {
- return helper.visibleCommands(cmd).reduce((max, command) => {
- return Math.max(max, helper.subcommandTerm(command).length);
- }, 0);
- };
-
- /**
- * Get the longest option term length.
- *
- * @param {Command} cmd
- * @param {Help} helper
- * @returns {number}
- */
-
- longestOptionTermLength(cmd, helper) {
- return helper.visibleOptions(cmd).reduce((max, option) => {
- return Math.max(max, helper.optionTerm(option).length);
- }, 0);
- };
-
- /**
- * Get the longest argument term length.
- *
- * @param {Command} cmd
- * @param {Help} helper
- * @returns {number}
- */
-
- longestArgumentTermLength(cmd, helper) {
- return helper.visibleArguments(cmd).reduce((max, argument) => {
- return Math.max(max, argument.term.length);
- }, 0);
- };
-
- /**
- * Get the command usage to be displayed at the top of the built-in help.
- *
- * @param {Command} cmd
- * @returns {string}
- */
-
- commandUsage(cmd) {
- // Usage
- let cmdName = cmd._name;
- if (cmd._aliases[0]) {
- cmdName = cmdName + '|' + cmd._aliases[0];
- }
- let parentCmdNames = '';
- for (let parentCmd = cmd.parent; parentCmd; parentCmd = parentCmd.parent) {
- parentCmdNames = parentCmd.name() + ' ' + parentCmdNames;
- }
- return parentCmdNames + cmdName + ' ' + cmd.usage();
- }
-
- /**
- * Get the description for the command.
- *
- * @param {Command} cmd
- * @returns {string}
- */
-
- commandDescription(cmd) {
- // @ts-ignore: overloaded return type
- return cmd.description();
- }
-
- /**
- * Get the command description to show in the list of subcommands.
- *
- * @param {Command} cmd
- * @returns {string}
- */
-
- subcommandDescription(cmd) {
- // @ts-ignore: overloaded return type
- return cmd.description();
- }
-
- /**
- * Get the option description to show in the list of options.
- *
- * @param {Option} option
- * @return {string}
- */
-
- optionDescription(option) {
- if (option.negate) {
- return option.description;
- }
- const extraInfo = [];
- if (option.argChoices) {
- extraInfo.push(
- // use stringify to match the display of the default value
- `choices: ${option.argChoices.map((choice) => JSON.stringify(choice)).join(', ')}`);
- }
- if (option.defaultValue !== undefined) {
- extraInfo.push(`default: ${option.defaultValueDescription || JSON.stringify(option.defaultValue)}`);
- }
- if (extraInfo.length > 0) {
- return `${option.description} (${extraInfo.join(', ')})`;
- }
- return option.description;
- };
-
- /**
- * Generate the built-in help text.
- *
- * @param {Command} cmd
- * @param {Help} helper
- * @returns {string}
- */
-
- formatHelp(cmd, helper) {
- const termWidth = helper.padWidth(cmd, helper);
- const helpWidth = helper.helpWidth || 80;
- const itemIndentWidth = 2;
- const itemSeparatorWidth = 2; // between term and description
- function formatItem(term, description) {
- if (description) {
- const fullText = `${term.padEnd(termWidth + itemSeparatorWidth)}${description}`;
- return helper.wrap(fullText, helpWidth - itemIndentWidth, termWidth + itemSeparatorWidth);
- }
- return term;
- };
- function formatList(textArray) {
- return textArray.join('\n').replace(/^/gm, ' '.repeat(itemIndentWidth));
- }
-
- // Usage
- let output = [`Usage: ${helper.commandUsage(cmd)}`, ''];
-
- // Description
- const commandDescription = helper.commandDescription(cmd);
- if (commandDescription.length > 0) {
- output = output.concat([commandDescription, '']);
- }
-
- // Arguments
- const argumentList = helper.visibleArguments(cmd).map((argument) => {
- return formatItem(argument.term, argument.description);
- });
- if (argumentList.length > 0) {
- output = output.concat(['Arguments:', formatList(argumentList), '']);
- }
-
- // Options
- const optionList = helper.visibleOptions(cmd).map((option) => {
- return formatItem(helper.optionTerm(option), helper.optionDescription(option));
- });
- if (optionList.length > 0) {
- output = output.concat(['Options:', formatList(optionList), '']);
- }
-
- // Commands
- const commandList = helper.visibleCommands(cmd).map((cmd) => {
- return formatItem(helper.subcommandTerm(cmd), helper.subcommandDescription(cmd));
- });
- if (commandList.length > 0) {
- output = output.concat(['Commands:', formatList(commandList), '']);
- }
-
- return output.join('\n');
- }
-
- /**
- * Calculate the pad width from the maximum term length.
- *
- * @param {Command} cmd
- * @param {Help} helper
- * @returns {number}
- */
-
- padWidth(cmd, helper) {
- return Math.max(
- helper.longestOptionTermLength(cmd, helper),
- helper.longestSubcommandTermLength(cmd, helper),
- helper.longestArgumentTermLength(cmd, helper)
- );
- };
-
- /**
- * Wrap the given string to width characters per line, with lines after the first indented.
- * Do not wrap if insufficient room for wrapping (minColumnWidth), or string is manually formatted.
- *
- * @param {string} str
- * @param {number} width
- * @param {number} indent
- * @param {number} [minColumnWidth=40]
- * @return {string}
- *
- */
-
- wrap(str, width, indent, minColumnWidth = 40) {
- // Detect manually wrapped and indented strings by searching for line breaks
- // followed by multiple spaces/tabs.
- if (str.match(/[\n]\s+/)) return str;
- // Do not wrap if not enough room for a wrapped column of text (as could end up with a word per line).
- const columnWidth = width - indent;
- if (columnWidth < minColumnWidth) return str;
-
- const leadingStr = str.substr(0, indent);
- const columnText = str.substr(indent);
-
- const indentString = ' '.repeat(indent);
- const regex = new RegExp('.{1,' + (columnWidth - 1) + '}([\\s\u200B]|$)|[^\\s\u200B]+?([\\s\u200B]|$)', 'g');
- const lines = columnText.match(regex) || [];
- return leadingStr + lines.map((line, i) => {
- if (line.slice(-1) === '\n') {
- line = line.slice(0, line.length - 1);
- }
- return ((i > 0) ? indentString : '') + line.trimRight();
- }).join('\n');
- }
-}
-
-class Option {
- /**
- * Initialize a new `Option` with the given `flags` and `description`.
- *
- * @param {string} flags
- * @param {string} [description]
- */
-
- constructor(flags, description) {
- this.flags = flags;
- this.description = description || '';
-
- this.required = flags.includes('<'); // A value must be supplied when the option is specified.
- this.optional = flags.includes('['); // A value is optional when the option is specified.
- // variadic test ignores <value,...> et al which might be used to describe custom splitting of single argument
- this.variadic = /\w\.\.\.[>\]]$/.test(flags); // The option can take multiple values.
- this.mandatory = false; // The option must have a value after parsing, which usually means it must be specified on command line.
- const optionFlags = _parseOptionFlags(flags);
- this.short = optionFlags.shortFlag;
- this.long = optionFlags.longFlag;
- this.negate = false;
- if (this.long) {
- this.negate = this.long.startsWith('--no-');
- }
- this.defaultValue = undefined;
- this.defaultValueDescription = undefined;
- this.parseArg = undefined;
- this.hidden = false;
- this.argChoices = undefined;
- }
-
- /**
- * Set the default value, and optionally supply the description to be displayed in the help.
- *
- * @param {any} value
- * @param {string} [description]
- * @return {Option}
- */
-
- default(value, description) {
- this.defaultValue = value;
- this.defaultValueDescription = description;
- return this;
- };
-
- /**
- * Set the custom handler for processing CLI option arguments into option values.
- *
- * @param {Function} [fn]
- * @return {Option}
- */
-
- argParser(fn) {
- this.parseArg = fn;
- return this;
- };
-
- /**
- * Whether the option is mandatory and must have a value after parsing.
- *
- * @param {boolean} [mandatory=true]
- * @return {Option}
- */
-
- makeOptionMandatory(mandatory = true) {
- this.mandatory = !!mandatory;
- return this;
- };
-
- /**
- * Hide option in help.
- *
- * @param {boolean} [hide=true]
- * @return {Option}
- */
-
- hideHelp(hide = true) {
- this.hidden = !!hide;
- return this;
- };
-
- /**
- * @api private
- */
-
- _concatValue(value, previous) {
- if (previous === this.defaultValue || !Array.isArray(previous)) {
- return [value];
- }
-
- return previous.concat(value);
- }
-
- /**
- * Only allow option value to be one of choices.
- *
- * @param {string[]} values
- * @return {Option}
- */
-
- choices(values) {
- this.argChoices = values;
- this.parseArg = (arg, previous) => {
- if (!values.includes(arg)) {
- throw new InvalidOptionArgumentError(`Allowed choices are ${values.join(', ')}.`);
- }
- if (this.variadic) {
- return this._concatValue(arg, previous);
- }
- return arg;
- };
- return this;
- };
-
- /**
- * Return option name.
- *
- * @return {string}
- */
-
- name() {
- if (this.long) {
- return this.long.replace(/^--/, '');
- }
- return this.short.replace(/^-/, '');
- };
-
- /**
- * Return option name, in a camelcase format that can be used
- * as a object attribute key.
- *
- * @return {string}
- * @api private
- */
-
- attributeName() {
- return camelcase(this.name().replace(/^no-/, ''));
- };
-
- /**
- * Check if `arg` matches the short or long flag.
- *
- * @param {string} arg
- * @return {boolean}
- * @api private
- */
-
- is(arg) {
- return this.short === arg || this.long === arg;
- };
-}
-
-/**
- * CommanderError class
- * @class
- */
-class CommanderError extends Error {
- /**
- * Constructs the CommanderError class
- * @param {number} exitCode suggested exit code which could be used with process.exit
- * @param {string} code an id string representing the error
- * @param {string} message human-readable description of the error
- * @constructor
- */
- constructor(exitCode, code, message) {
- super(message);
- // properly capture stack trace in Node.js
- Error.captureStackTrace(this, this.constructor);
- this.name = this.constructor.name;
- this.code = code;
- this.exitCode = exitCode;
- this.nestedError = undefined;
- }
-}
-
-/**
- * InvalidOptionArgumentError class
- * @class
- */
-class InvalidOptionArgumentError extends CommanderError {
- /**
- * Constructs the InvalidOptionArgumentError class
- * @param {string} [message] explanation of why argument is invalid
- * @constructor
- */
- constructor(message) {
- super(1, 'commander.invalidOptionArgument', message);
- // properly capture stack trace in Node.js
- Error.captureStackTrace(this, this.constructor);
- this.name = this.constructor.name;
- }
-}
-
-class Command extends EventEmitter {
- /**
- * Initialize a new `Command`.
- *
- * @param {string} [name]
- */
-
- constructor(name) {
- super();
- this.commands = [];
- this.options = [];
- this.parent = null;
- this._allowUnknownOption = false;
- this._allowExcessArguments = true;
- this._args = [];
- this.rawArgs = null;
- this._scriptPath = null;
- this._name = name || '';
- this._optionValues = {};
- this._storeOptionsAsProperties = false;
- this._actionResults = [];
- this._actionHandler = null;
- this._executableHandler = false;
- this._executableFile = null; // custom name for executable
- this._defaultCommandName = null;
- this._exitCallback = null;
- this._aliases = [];
- this._combineFlagAndOptionalValue = true;
- this._description = '';
- this._argsDescription = undefined;
- this._enablePositionalOptions = false;
- this._passThroughOptions = false;
-
- // see .configureOutput() for docs
- this._outputConfiguration = {
- writeOut: (str) => process.stdout.write(str),
- writeErr: (str) => process.stderr.write(str),
- getOutHelpWidth: () => process.stdout.isTTY ? process.stdout.columns : undefined,
- getErrHelpWidth: () => process.stderr.isTTY ? process.stderr.columns : undefined,
- outputError: (str, write) => write(str)
- };
-
- this._hidden = false;
- this._hasHelpOption = true;
- this._helpFlags = '-h, --help';
- this._helpDescription = 'display help for command';
- this._helpShortFlag = '-h';
- this._helpLongFlag = '--help';
- this._addImplicitHelpCommand = undefined; // Deliberately undefined, not decided whether true or false
- this._helpCommandName = 'help';
- this._helpCommandnameAndArgs = 'help [command]';
- this._helpCommandDescription = 'display help for command';
- this._helpConfiguration = {};
- }
-
- /**
- * Define a command.
- *
- * There are two styles of command: pay attention to where to put the description.
- *
- * Examples:
- *
- * // Command implemented using action handler (description is supplied separately to `.command`)
- * program
- * .command('clone <source> [destination]')
- * .description('clone a repository into a newly created directory')
- * .action((source, destination) => {
- * console.log('clone command called');
- * });
- *
- * // Command implemented using separate executable file (description is second parameter to `.command`)
- * program
- * .command('start <service>', 'start named service')
- * .command('stop [service]', 'stop named service, or all if no name supplied');
- *
- * @param {string} nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`
- * @param {Object|string} [actionOptsOrExecDesc] - configuration options (for action), or description (for executable)
- * @param {Object} [execOpts] - configuration options (for executable)
- * @return {Command} returns new command for action handler, or `this` for executable command
- */
-
- command(nameAndArgs, actionOptsOrExecDesc, execOpts) {
- let desc = actionOptsOrExecDesc;
- let opts = execOpts;
- if (typeof desc === 'object' && desc !== null) {
- opts = desc;
- desc = null;
- }
- opts = opts || {};
- const args = nameAndArgs.split(/ +/);
- const cmd = this.createCommand(args.shift());
-
- if (desc) {
- cmd.description(desc);
- cmd._executableHandler = true;
- }
- if (opts.isDefault) this._defaultCommandName = cmd._name;
-
- cmd._outputConfiguration = this._outputConfiguration;
-
- cmd._hidden = !!(opts.noHelp || opts.hidden); // noHelp is deprecated old name for hidden
- cmd._hasHelpOption = this._hasHelpOption;
- cmd._helpFlags = this._helpFlags;
- cmd._helpDescription = this._helpDescription;
- cmd._helpShortFlag = this._helpShortFlag;
- cmd._helpLongFlag = this._helpLongFlag;
- cmd._helpCommandName = this._helpCommandName;
- cmd._helpCommandnameAndArgs = this._helpCommandnameAndArgs;
- cmd._helpCommandDescription = this._helpCommandDescription;
- cmd._helpConfiguration = this._helpConfiguration;
- cmd._exitCallback = this._exitCallback;
- cmd._storeOptionsAsProperties = this._storeOptionsAsProperties;
- cmd._combineFlagAndOptionalValue = this._combineFlagAndOptionalValue;
- cmd._allowExcessArguments = this._allowExcessArguments;
- cmd._enablePositionalOptions = this._enablePositionalOptions;
-
- cmd._executableFile = opts.executableFile || null; // Custom name for executable file, set missing to null to match constructor
- this.commands.push(cmd);
- cmd._parseExpectedArgs(args);
- cmd.parent = this;
-
- if (desc) return this;
- return cmd;
- };
-
- /**
- * Factory routine to create a new unattached command.
- *
- * See .command() for creating an attached subcommand, which uses this routine to
- * create the command. You can override createCommand to customise subcommands.
- *
- * @param {string} [name]
- * @return {Command} new command
- */
-
- createCommand(name) {
- return new Command(name);
- };
-
- /**
- * You can customise the help with a subclass of Help by overriding createHelp,
- * or by overriding Help properties using configureHelp().
- *
- * @return {Help}
- */
-
- createHelp() {
- return Object.assign(new Help(), this.configureHelp());
- };
-
- /**
- * You can customise the help by overriding Help properties using configureHelp(),
- * or with a subclass of Help by overriding createHelp().
- *
- * @param {Object} [configuration] - configuration options
- * @return {Command|Object} `this` command for chaining, or stored configuration
- */
-
- configureHelp(configuration) {
- if (configuration === undefined) return this._helpConfiguration;
-
- this._helpConfiguration = configuration;
- return this;
- }
-
- /**
- * The default output goes to stdout and stderr. You can customise this for special
- * applications. You can also customise the display of errors by overriding outputError.
- *
- * The configuration properties are all functions:
- *
- * // functions to change where being written, stdout and stderr
- * writeOut(str)
- * writeErr(str)
- * // matching functions to specify width for wrapping help
- * getOutHelpWidth()
- * getErrHelpWidth()
- * // functions based on what is being written out
- * outputError(str, write) // used for displaying errors, and not used for displaying help
- *
- * @param {Object} [configuration] - configuration options
- * @return {Command|Object} `this` command for chaining, or stored configuration
- */
-
- configureOutput(configuration) {
- if (configuration === undefined) return this._outputConfiguration;
-
- Object.assign(this._outputConfiguration, configuration);
- return this;
- }
-
- /**
- * Add a prepared subcommand.
- *
- * See .command() for creating an attached subcommand which inherits settings from its parent.
- *
- * @param {Command} cmd - new subcommand
- * @param {Object} [opts] - configuration options
- * @return {Command} `this` command for chaining
- */
-
- addCommand(cmd, opts) {
- if (!cmd._name) throw new Error('Command passed to .addCommand() must have a name');
-
- // To keep things simple, block automatic name generation for deeply nested executables.
- // Fail fast and detect when adding rather than later when parsing.
- function checkExplicitNames(commandArray) {
- commandArray.forEach((cmd) => {
- if (cmd._executableHandler && !cmd._executableFile) {
- throw new Error(`Must specify executableFile for deeply nested executable: ${cmd.name()}`);
- }
- checkExplicitNames(cmd.commands);
- });
- }
- checkExplicitNames(cmd.commands);
-
- opts = opts || {};
- if (opts.isDefault) this._defaultCommandName = cmd._name;
- if (opts.noHelp || opts.hidden) cmd._hidden = true; // modifying passed command due to existing implementation
-
- this.commands.push(cmd);
- cmd.parent = this;
- return this;
- };
-
- /**
- * Define argument syntax for the command.
- */
-
- arguments(desc) {
- return this._parseExpectedArgs(desc.split(/ +/));
- };
-
- /**
- * Override default decision whether to add implicit help command.
- *
- * addHelpCommand() // force on
- * addHelpCommand(false); // force off
- * addHelpCommand('help [cmd]', 'display help for [cmd]'); // force on with custom details
- *
- * @return {Command} `this` command for chaining
- */
-
- addHelpCommand(enableOrNameAndArgs, description) {
- if (enableOrNameAndArgs === false) {
- this._addImplicitHelpCommand = false;
- } else {
- this._addImplicitHelpCommand = true;
- if (typeof enableOrNameAndArgs === 'string') {
- this._helpCommandName = enableOrNameAndArgs.split(' ')[0];
- this._helpCommandnameAndArgs = enableOrNameAndArgs;
- }
- this._helpCommandDescription = description || this._helpCommandDescription;
- }
- return this;
- };
-
- /**
- * @return {boolean}
- * @api private
- */
-
- _hasImplicitHelpCommand() {
- if (this._addImplicitHelpCommand === undefined) {
- return this.commands.length && !this._actionHandler && !this._findCommand('help');
- }
- return this._addImplicitHelpCommand;
- };
-
- /**
- * Parse expected `args`.
- *
- * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`.
- *
- * @param {Array} args
- * @return {Command} `this` command for chaining
- * @api private
- */
-
- _parseExpectedArgs(args) {
- if (!args.length) return;
- args.forEach((arg) => {
- const argDetails = {
- required: false,
- name: '',
- variadic: false
- };
-
- switch (arg[0]) {
- case '<':
- argDetails.required = true;
- argDetails.name = arg.slice(1, -1);
- break;
- case '[':
- argDetails.name = arg.slice(1, -1);
- break;
- }
-
- if (argDetails.name.length > 3 && argDetails.name.slice(-3) === '...') {
- argDetails.variadic = true;
- argDetails.name = argDetails.name.slice(0, -3);
- }
- if (argDetails.name) {
- this._args.push(argDetails);
- }
- });
- this._args.forEach((arg, i) => {
- if (arg.variadic && i < this._args.length - 1) {
- throw new Error(`only the last argument can be variadic '${arg.name}'`);
- }
- });
- return this;
- };
-
- /**
- * Register callback to use as replacement for calling process.exit.
- *
- * @param {Function} [fn] optional callback which will be passed a CommanderError, defaults to throwing
- * @return {Command} `this` command for chaining
- */
-
- exitOverride(fn) {
- if (fn) {
- this._exitCallback = fn;
- } else {
- this._exitCallback = (err) => {
- if (err.code !== 'commander.executeSubCommandAsync') {
- throw err;
- } else {
- // Async callback from spawn events, not useful to throw.
- }
- };
- }
- return this;
- };
-
- /**
- * Call process.exit, and _exitCallback if defined.
- *
- * @param {number} exitCode exit code for using with process.exit
- * @param {string} code an id string representing the error
- * @param {string} message human-readable description of the error
- * @return never
- * @api private
- */
-
- _exit(exitCode, code, message) {
- if (this._exitCallback) {
- this._exitCallback(new CommanderError(exitCode, code, message));
- // Expecting this line is not reached.
- }
- process.exit(exitCode);
- };
-
- /**
- * Register callback `fn` for the command.
- *
- * Examples:
- *
- * program
- * .command('help')
- * .description('display verbose help')
- * .action(function() {
- * // output help here
- * });
- *
- * @param {Function} fn
- * @return {Command} `this` command for chaining
- */
-
- action(fn) {
- const listener = (args) => {
- // The .action callback takes an extra parameter which is the command or options.
- const expectedArgsCount = this._args.length;
- const actionArgs = args.slice(0, expectedArgsCount);
- if (this._storeOptionsAsProperties) {
- actionArgs[expectedArgsCount] = this; // backwards compatible "options"
- } else {
- actionArgs[expectedArgsCount] = this.opts();
- }
- actionArgs.push(this);
-
- const actionResult = fn.apply(this, actionArgs);
- // Remember result in case it is async. Assume parseAsync getting called on root.
- let rootCommand = this;
- while (rootCommand.parent) {
- rootCommand = rootCommand.parent;
- }
- rootCommand._actionResults.push(actionResult);
- };
- this._actionHandler = listener;
- return this;
- };
-
- /**
- * Factory routine to create a new unattached option.
- *
- * See .option() for creating an attached option, which uses this routine to
- * create the option. You can override createOption to return a custom option.
- *
- * @param {string} flags
- * @param {string} [description]
- * @return {Option} new option
- */
-
- createOption(flags, description) {
- return new Option(flags, description);
- };
-
- /**
- * Add an option.
- *
- * @param {Option} option
- * @return {Command} `this` command for chaining
- */
- addOption(option) {
- const oname = option.name();
- const name = option.attributeName();
-
- let defaultValue = option.defaultValue;
-
- // preassign default value for --no-*, [optional], <required>, or plain flag if boolean value
- if (option.negate || option.optional || option.required || typeof defaultValue === 'boolean') {
- // when --no-foo we make sure default is true, unless a --foo option is already defined
- if (option.negate) {
- const positiveLongFlag = option.long.replace(/^--no-/, '--');
- defaultValue = this._findOption(positiveLongFlag) ? this._getOptionValue(name) : true;
- }
- // preassign only if we have a default
- if (defaultValue !== undefined) {
- this._setOptionValue(name, defaultValue);
- }
- }
-
- // register the option
- this.options.push(option);
-
- // when it's passed assign the value
- // and conditionally invoke the callback
- this.on('option:' + oname, (val) => {
- const oldValue = this._getOptionValue(name);
-
- // custom processing
- if (val !== null && option.parseArg) {
- try {
- val = option.parseArg(val, oldValue === undefined ? defaultValue : oldValue);
- } catch (err) {
- if (err.code === 'commander.invalidOptionArgument') {
- const message = `error: option '${option.flags}' argument '${val}' is invalid. ${err.message}`;
- this._displayError(err.exitCode, err.code, message);
- }
- throw err;
- }
- } else if (val !== null && option.variadic) {
- val = option._concatValue(val, oldValue);
- }
-
- // unassigned or boolean value
- if (typeof oldValue === 'boolean' || typeof oldValue === 'undefined') {
- // if no value, negate false, and we have a default, then use it!
- if (val == null) {
- this._setOptionValue(name, option.negate
- ? false
- : defaultValue || true);
- } else {
- this._setOptionValue(name, val);
- }
- } else if (val !== null) {
- // reassign
- this._setOptionValue(name, option.negate ? false : val);
- }
- });
-
- return this;
- }
-
- /**
- * Internal implementation shared by .option() and .requiredOption()
- *
- * @api private
- */
- _optionEx(config, flags, description, fn, defaultValue) {
- const option = this.createOption(flags, description);
- option.makeOptionMandatory(!!config.mandatory);
- if (typeof fn === 'function') {
- option.default(defaultValue).argParser(fn);
- } else if (fn instanceof RegExp) {
- // deprecated
- const regex = fn;
- fn = (val, def) => {
- const m = regex.exec(val);
- return m ? m[0] : def;
- };
- option.default(defaultValue).argParser(fn);
- } else {
- option.default(fn);
- }
-
- return this.addOption(option);
- }
-
- /**
- * Define option with `flags`, `description` and optional
- * coercion `fn`.
- *
- * The `flags` string contains the short and/or long flags,
- * separated by comma, a pipe or space. The following are all valid
- * all will output this way when `--help` is used.
- *
- * "-p, --pepper"
- * "-p|--pepper"
- * "-p --pepper"
- *
- * Examples:
- *
- * // simple boolean defaulting to undefined
- * program.option('-p, --pepper', 'add pepper');
- *
- * program.pepper
- * // => undefined
- *
- * --pepper
- * program.pepper
- * // => true
- *
- * // simple boolean defaulting to true (unless non-negated option is also defined)
- * program.option('-C, --no-cheese', 'remove cheese');
- *
- * program.cheese
- * // => true
- *
- * --no-cheese
- * program.cheese
- * // => false
- *
- * // required argument
- * program.option('-C, --chdir <path>', 'change the working directory');
- *
- * --chdir /tmp
- * program.chdir
- * // => "/tmp"
- *
- * // optional argument
- * program.option('-c, --cheese [type]', 'add cheese [marble]');
- *
- * @param {string} flags
- * @param {string} [description]
- * @param {Function|*} [fn] - custom option processing function or default value
- * @param {*} [defaultValue]
- * @return {Command} `this` command for chaining
- */
-
- option(flags, description, fn, defaultValue) {
- return this._optionEx({}, flags, description, fn, defaultValue);
- };
-
- /**
- * Add a required option which must have a value after parsing. This usually means
- * the option must be specified on the command line. (Otherwise the same as .option().)
- *
- * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space.
- *
- * @param {string} flags
- * @param {string} [description]
- * @param {Function|*} [fn] - custom option processing function or default value
- * @param {*} [defaultValue]
- * @return {Command} `this` command for chaining
- */
-
- requiredOption(flags, description, fn, defaultValue) {
- return this._optionEx({ mandatory: true }, flags, description, fn, defaultValue);
- };
-
- /**
- * Alter parsing of short flags with optional values.
- *
- * Examples:
- *
- * // for `.option('-f,--flag [value]'):
- * .combineFlagAndOptionalValue(true) // `-f80` is treated like `--flag=80`, this is the default behaviour
- * .combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b`
- *
- * @param {Boolean} [combine=true] - if `true` or omitted, an optional value can be specified directly after the flag.
- */
- combineFlagAndOptionalValue(combine = true) {
- this._combineFlagAndOptionalValue = !!combine;
- return this;
- };
-
- /**
- * Allow unknown options on the command line.
- *
- * @param {Boolean} [allowUnknown=true] - if `true` or omitted, no error will be thrown
- * for unknown options.
- */
- allowUnknownOption(allowUnknown = true) {
- this._allowUnknownOption = !!allowUnknown;
- return this;
- };
-
- /**
- * Allow excess command-arguments on the command line. Pass false to make excess arguments an error.
- *
- * @param {Boolean} [allowExcess=true] - if `true` or omitted, no error will be thrown
- * for excess arguments.
- */
- allowExcessArguments(allowExcess = true) {
- this._allowExcessArguments = !!allowExcess;
- return this;
- };
-
- /**
- * Enable positional options. Positional means global options are specified before subcommands which lets
- * subcommands reuse the same option names, and also enables subcommands to turn on passThroughOptions.
- * The default behaviour is non-positional and global options may appear anywhere on the command line.
- *
- * @param {Boolean} [positional=true]
- */
- enablePositionalOptions(positional = true) {
- this._enablePositionalOptions = !!positional;
- return this;
- };
-
- /**
- * Pass through options that come after command-arguments rather than treat them as command-options,
- * so actual command-options come before command-arguments. Turning this on for a subcommand requires
- * positional options to have been enabled on the program (parent commands).
- * The default behaviour is non-positional and options may appear before or after command-arguments.
- *
- * @param {Boolean} [passThrough=true]
- * for unknown options.
- */
- passThroughOptions(passThrough = true) {
- this._passThroughOptions = !!passThrough;
- if (!!this.parent && passThrough && !this.parent._enablePositionalOptions) {
- throw new Error('passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)');
- }
- return this;
- };
-
- /**
- * Whether to store option values as properties on command object,
- * or store separately (specify false). In both cases the option values can be accessed using .opts().
- *
- * @param {boolean} [storeAsProperties=true]
- * @return {Command} `this` command for chaining
- */
-
- storeOptionsAsProperties(storeAsProperties = true) {
- this._storeOptionsAsProperties = !!storeAsProperties;
- if (this.options.length) {
- throw new Error('call .storeOptionsAsProperties() before adding options');
- }
- return this;
- };
-
- /**
- * Store option value
- *
- * @param {string} key
- * @param {Object} value
- * @api private
- */
-
- _setOptionValue(key, value) {
- if (this._storeOptionsAsProperties) {
- this[key] = value;
- } else {
- this._optionValues[key] = value;
- }
- };
-
- /**
- * Retrieve option value
- *
- * @param {string} key
- * @return {Object} value
- * @api private
- */
-
- _getOptionValue(key) {
- if (this._storeOptionsAsProperties) {
- return this[key];
- }
- return this._optionValues[key];
- };
-
- /**
- * Parse `argv`, setting options and invoking commands when defined.
- *
- * The default expectation is that the arguments are from node and have the application as argv[0]
- * and the script being run in argv[1], with user parameters after that.
- *
- * Examples:
- *
- * program.parse(process.argv);
- * program.parse(); // implicitly use process.argv and auto-detect node vs electron conventions
- * program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]
- *
- * @param {string[]} [argv] - optional, defaults to process.argv
- * @param {Object} [parseOptions] - optionally specify style of options with from: node/user/electron
- * @param {string} [parseOptions.from] - where the args are from: 'node', 'user', 'electron'
- * @return {Command} `this` command for chaining
- */
-
- parse(argv, parseOptions) {
- if (argv !== undefined && !Array.isArray(argv)) {
- throw new Error('first parameter to parse must be array or undefined');
- }
- parseOptions = parseOptions || {};
-
- // Default to using process.argv
- if (argv === undefined) {
- argv = process.argv;
- // @ts-ignore: unknown property
- if (process.versions && process.versions.electron) {
- parseOptions.from = 'electron';
- }
- }
- this.rawArgs = argv.slice();
-
- // make it a little easier for callers by supporting various argv conventions
- let userArgs;
- switch (parseOptions.from) {
- case undefined:
- case 'node':
- this._scriptPath = argv[1];
- userArgs = argv.slice(2);
- break;
- case 'electron':
- // @ts-ignore: unknown property
- if (process.defaultApp) {
- this._scriptPath = argv[1];
- userArgs = argv.slice(2);
- } else {
- userArgs = argv.slice(1);
- }
- break;
- case 'user':
- userArgs = argv.slice(0);
- break;
- default:
- throw new Error(`unexpected parse option { from: '${parseOptions.from}' }`);
- }
- if (!this._scriptPath && require.main) {
- this._scriptPath = require.main.filename;
- }
-
- // Guess name, used in usage in help.
- this._name = this._name || (this._scriptPath && path.basename(this._scriptPath, path.extname(this._scriptPath)));
-
- // Let's go!
- this._parseCommand([], userArgs);
-
- return this;
- };
-
- /**
- * Parse `argv`, setting options and invoking commands when defined.
- *
- * Use parseAsync instead of parse if any of your action handlers are async. Returns a Promise.
- *
- * The default expectation is that the arguments are from node and have the application as argv[0]
- * and the script being run in argv[1], with user parameters after that.
- *
- * Examples:
- *
- * program.parseAsync(process.argv);
- * program.parseAsync(); // implicitly use process.argv and auto-detect node vs electron conventions
- * program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]
- *
- * @param {string[]} [argv]
- * @param {Object} [parseOptions]
- * @param {string} parseOptions.from - where the args are from: 'node', 'user', 'electron'
- * @return {Promise}
- */
-
- parseAsync(argv, parseOptions) {
- this.parse(argv, parseOptions);
- return Promise.all(this._actionResults).then(() => this);
- };
-
- /**
- * Execute a sub-command executable.
- *
- * @api private
- */
-
- _executeSubCommand(subcommand, args) {
- args = args.slice();
- let launchWithNode = false; // Use node for source targets so do not need to get permissions correct, and on Windows.
- const sourceExt = ['.js', '.ts', '.tsx', '.mjs', '.cjs'];
-
- // Not checking for help first. Unlikely to have mandatory and executable, and can't robustly test for help flags in external command.
- this._checkForMissingMandatoryOptions();
-
- // Want the entry script as the reference for command name and directory for searching for other files.
- let scriptPath = this._scriptPath;
- // Fallback in case not set, due to how Command created or called.
- if (!scriptPath && require.main) {
- scriptPath = require.main.filename;
- }
-
- let baseDir;
- try {
- const resolvedLink = fs.realpathSync(scriptPath);
- baseDir = path.dirname(resolvedLink);
- } catch (e) {
- baseDir = '.'; // dummy, probably not going to find executable!
- }
-
- // name of the subcommand, like `pm-install`
- let bin = path.basename(scriptPath, path.extname(scriptPath)) + '-' + subcommand._name;
- if (subcommand._executableFile) {
- bin = subcommand._executableFile;
- }
-
- const localBin = path.join(baseDir, bin);
- if (fs.existsSync(localBin)) {
- // prefer local `./<bin>` to bin in the $PATH
- bin = localBin;
- } else {
- // Look for source files.
- sourceExt.forEach((ext) => {
- if (fs.existsSync(`${localBin}${ext}`)) {
- bin = `${localBin}${ext}`;
- }
- });
- }
- launchWithNode = sourceExt.includes(path.extname(bin));
-
- let proc;
- if (process.platform !== 'win32') {
- if (launchWithNode) {
- args.unshift(bin);
- // add executable arguments to spawn
- args = incrementNodeInspectorPort(process.execArgv).concat(args);
-
- proc = childProcess.spawn(process.argv[0], args, { stdio: 'inherit' });
- } else {
- proc = childProcess.spawn(bin, args, { stdio: 'inherit' });
- }
- } else {
- args.unshift(bin);
- // add executable arguments to spawn
- args = incrementNodeInspectorPort(process.execArgv).concat(args);
- proc = childProcess.spawn(process.execPath, args, { stdio: 'inherit' });
- }
-
- const signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP'];
- signals.forEach((signal) => {
- // @ts-ignore
- process.on(signal, () => {
- if (proc.killed === false && proc.exitCode === null) {
- proc.kill(signal);
- }
- });
- });
-
- // By default terminate process when spawned process terminates.
- // Suppressing the exit if exitCallback defined is a bit messy and of limited use, but does allow process to stay running!
- const exitCallback = this._exitCallback;
- if (!exitCallback) {
- proc.on('close', process.exit.bind(process));
- } else {
- proc.on('close', () => {
- exitCallback(new CommanderError(process.exitCode || 0, 'commander.executeSubCommandAsync', '(close)'));
- });
- }
- proc.on('error', (err) => {
- // @ts-ignore
- if (err.code === 'ENOENT') {
- const executableMissing = `'${bin}' does not exist
- - if '${subcommand._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
- - if the default executable name is not suitable, use the executableFile option to supply a custom name`;
- throw new Error(executableMissing);
- // @ts-ignore
- } else if (err.code === 'EACCES') {
- throw new Error(`'${bin}' not executable`);
- }
- if (!exitCallback) {
- process.exit(1);
- } else {
- const wrappedError = new CommanderError(1, 'commander.executeSubCommandAsync', '(error)');
- wrappedError.nestedError = err;
- exitCallback(wrappedError);
- }
- });
-
- // Store the reference to the child process
- this.runningCommand = proc;
- };
-
- /**
- * @api private
- */
- _dispatchSubcommand(commandName, operands, unknown) {
- const subCommand = this._findCommand(commandName);
- if (!subCommand) this.help({ error: true });
-
- if (subCommand._executableHandler) {
- this._executeSubCommand(subCommand, operands.concat(unknown));
- } else {
- subCommand._parseCommand(operands, unknown);
- }
- };
-
- /**
- * Process arguments in context of this command.
- *
- * @api private
- */
-
- _parseCommand(operands, unknown) {
- const parsed = this.parseOptions(unknown);
- operands = operands.concat(parsed.operands);
- unknown = parsed.unknown;
- this.args = operands.concat(unknown);
-
- if (operands && this._findCommand(operands[0])) {
- this._dispatchSubcommand(operands[0], operands.slice(1), unknown);
- } else if (this._hasImplicitHelpCommand() && operands[0] === this._helpCommandName) {
- if (operands.length === 1) {
- this.help();
- } else {
- this._dispatchSubcommand(operands[1], [], [this._helpLongFlag]);
- }
- } else if (this._defaultCommandName) {
- outputHelpIfRequested(this, unknown); // Run the help for default command from parent rather than passing to default command
- this._dispatchSubcommand(this._defaultCommandName, operands, unknown);
- } else {
- if (this.commands.length && this.args.length === 0 && !this._actionHandler && !this._defaultCommandName) {
- // probably missing subcommand and no handler, user needs help
- this.help({ error: true });
- }
-
- outputHelpIfRequested(this, parsed.unknown);
- this._checkForMissingMandatoryOptions();
-
- // We do not always call this check to avoid masking a "better" error, like unknown command.
- const checkForUnknownOptions = () => {
- if (parsed.unknown.length > 0) {
- this.unknownOption(parsed.unknown[0]);
- }
- };
-
- const commandEvent = `command:${this.name()}`;
- if (this._actionHandler) {
- checkForUnknownOptions();
- // Check expected arguments and collect variadic together.
- const args = this.args.slice();
- this._args.forEach((arg, i) => {
- if (arg.required && args[i] == null) {
- this.missingArgument(arg.name);
- } else if (arg.variadic) {
- args[i] = args.splice(i);
- args.length = Math.min(i + 1, args.length);
- }
- });
- if (args.length > this._args.length) {
- this._excessArguments(args);
- }
-
- this._actionHandler(args);
- if (this.parent) this.parent.emit(commandEvent, operands, unknown); // legacy
- } else if (this.parent && this.parent.listenerCount(commandEvent)) {
- checkForUnknownOptions();
- this.parent.emit(commandEvent, operands, unknown); // legacy
- } else if (operands.length) {
- if (this._findCommand('*')) { // legacy default command
- this._dispatchSubcommand('*', operands, unknown);
- } else if (this.listenerCount('command:*')) {
- // skip option check, emit event for possible misspelling suggestion
- this.emit('command:*', operands, unknown);
- } else if (this.commands.length) {
- this.unknownCommand();
- } else {
- checkForUnknownOptions();
- }
- } else if (this.commands.length) {
- // This command has subcommands and nothing hooked up at this level, so display help.
- this.help({ error: true });
- } else {
- checkForUnknownOptions();
- // fall through for caller to handle after calling .parse()
- }
- }
- };
-
- /**
- * Find matching command.
- *
- * @api private
- */
- _findCommand(name) {
- if (!name) return undefined;
- return this.commands.find(cmd => cmd._name === name || cmd._aliases.includes(name));
- };
-
- /**
- * Return an option matching `arg` if any.
- *
- * @param {string} arg
- * @return {Option}
- * @api private
- */
-
- _findOption(arg) {
- return this.options.find(option => option.is(arg));
- };
-
- /**
- * Display an error message if a mandatory option does not have a value.
- * Lazy calling after checking for help flags from leaf subcommand.
- *
- * @api private
- */
-
- _checkForMissingMandatoryOptions() {
- // Walk up hierarchy so can call in subcommand after checking for displaying help.
- for (let cmd = this; cmd; cmd = cmd.parent) {
- cmd.options.forEach((anOption) => {
- if (anOption.mandatory && (cmd._getOptionValue(anOption.attributeName()) === undefined)) {
- cmd.missingMandatoryOptionValue(anOption);
- }
- });
- }
- };
-
- /**
- * Parse options from `argv` removing known options,
- * and return argv split into operands and unknown arguments.
- *
- * Examples:
- *
- * argv => operands, unknown
- * --known kkk op => [op], []
- * op --known kkk => [op], []
- * sub --unknown uuu op => [sub], [--unknown uuu op]
- * sub -- --unknown uuu op => [sub --unknown uuu op], []
- *
- * @param {String[]} argv
- * @return {{operands: String[], unknown: String[]}}
- */
-
- parseOptions(argv) {
- const operands = []; // operands, not options or values
- const unknown = []; // first unknown option and remaining unknown args
- let dest = operands;
- const args = argv.slice();
-
- function maybeOption(arg) {
- return arg.length > 1 && arg[0] === '-';
- }
-
- // parse options
- let activeVariadicOption = null;
- while (args.length) {
- const arg = args.shift();
-
- // literal
- if (arg === '--') {
- if (dest === unknown) dest.push(arg);
- dest.push(...args);
- break;
- }
-
- if (activeVariadicOption && !maybeOption(arg)) {
- this.emit(`option:${activeVariadicOption.name()}`, arg);
- continue;
- }
- activeVariadicOption = null;
-
- if (maybeOption(arg)) {
- const option = this._findOption(arg);
- // recognised option, call listener to assign value with possible custom processing
- if (option) {
- if (option.required) {
- const value = args.shift();
- if (value === undefined) this.optionMissingArgument(option);
- this.emit(`option:${option.name()}`, value);
- } else if (option.optional) {
- let value = null;
- // historical behaviour is optional value is following arg unless an option
- if (args.length > 0 && !maybeOption(args[0])) {
- value = args.shift();
- }
- this.emit(`option:${option.name()}`, value);
- } else { // boolean flag
- this.emit(`option:${option.name()}`);
- }
- activeVariadicOption = option.variadic ? option : null;
- continue;
- }
- }
-
- // Look for combo options following single dash, eat first one if known.
- if (arg.length > 2 && arg[0] === '-' && arg[1] !== '-') {
- const option = this._findOption(`-${arg[1]}`);
- if (option) {
- if (option.required || (option.optional && this._combineFlagAndOptionalValue)) {
- // option with value following in same argument
- this.emit(`option:${option.name()}`, arg.slice(2));
- } else {
- // boolean option, emit and put back remainder of arg for further processing
- this.emit(`option:${option.name()}`);
- args.unshift(`-${arg.slice(2)}`);
- }
- continue;
- }
- }
-
- // Look for known long flag with value, like --foo=bar
- if (/^--[^=]+=/.test(arg)) {
- const index = arg.indexOf('=');
- const option = this._findOption(arg.slice(0, index));
- if (option && (option.required || option.optional)) {
- this.emit(`option:${option.name()}`, arg.slice(index + 1));
- continue;
- }
- }
-
- // Not a recognised option by this command.
- // Might be a command-argument, or subcommand option, or unknown option, or help command or option.
-
- // An unknown option means further arguments also classified as unknown so can be reprocessed by subcommands.
- if (maybeOption(arg)) {
- dest = unknown;
- }
-
- // If using positionalOptions, stop processing our options at subcommand.
- if ((this._enablePositionalOptions || this._passThroughOptions) && operands.length === 0 && unknown.length === 0) {
- if (this._findCommand(arg)) {
- operands.push(arg);
- if (args.length > 0) unknown.push(...args);
- break;
- } else if (arg === this._helpCommandName && this._hasImplicitHelpCommand()) {
- operands.push(arg);
- if (args.length > 0) operands.push(...args);
- break;
- } else if (this._defaultCommandName) {
- unknown.push(arg);
- if (args.length > 0) unknown.push(...args);
- break;
- }
- }
-
- // If using passThroughOptions, stop processing options at first command-argument.
- if (this._passThroughOptions) {
- dest.push(arg);
- if (args.length > 0) dest.push(...args);
- break;
- }
-
- // add arg
- dest.push(arg);
- }
-
- return { operands, unknown };
- };
-
- /**
- * Return an object containing options as key-value pairs
- *
- * @return {Object}
- */
- opts() {
- if (this._storeOptionsAsProperties) {
- // Preserve original behaviour so backwards compatible when still using properties
- const result = {};
- const len = this.options.length;
-
- for (let i = 0; i < len; i++) {
- const key = this.options[i].attributeName();
- result[key] = key === this._versionOptionName ? this._version : this[key];
- }
- return result;
- }
-
- return this._optionValues;
- };
-
- /**
- * Internal bottleneck for handling of parsing errors.
- *
- * @api private
- */
- _displayError(exitCode, code, message) {
- this._outputConfiguration.outputError(`${message}\n`, this._outputConfiguration.writeErr);
- this._exit(exitCode, code, message);
- }
-
- /**
- * Argument `name` is missing.
- *
- * @param {string} name
- * @api private
- */
-
- missingArgument(name) {
- const message = `error: missing required argument '${name}'`;
- this._displayError(1, 'commander.missingArgument', message);
- };
-
- /**
- * `Option` is missing an argument.
- *
- * @param {Option} option
- * @api private
- */
-
- optionMissingArgument(option) {
- const message = `error: option '${option.flags}' argument missing`;
- this._displayError(1, 'commander.optionMissingArgument', message);
- };
-
- /**
- * `Option` does not have a value, and is a mandatory option.
- *
- * @param {Option} option
- * @api private
- */
-
- missingMandatoryOptionValue(option) {
- const message = `error: required option '${option.flags}' not specified`;
- this._displayError(1, 'commander.missingMandatoryOptionValue', message);
- };
-
- /**
- * Unknown option `flag`.
- *
- * @param {string} flag
- * @api private
- */
-
- unknownOption(flag) {
- if (this._allowUnknownOption) return;
- const message = `error: unknown option '${flag}'`;
- this._displayError(1, 'commander.unknownOption', message);
- };
-
- /**
- * Excess arguments, more than expected.
- *
- * @param {string[]} receivedArgs
- * @api private
- */
-
- _excessArguments(receivedArgs) {
- if (this._allowExcessArguments) return;
-
- const expected = this._args.length;
- const s = (expected === 1) ? '' : 's';
- const forSubcommand = this.parent ? ` for '${this.name()}'` : '';
- const message = `error: too many arguments${forSubcommand}. Expected ${expected} argument${s} but got ${receivedArgs.length}.`;
- this._displayError(1, 'commander.excessArguments', message);
- };
-
- /**
- * Unknown command.
- *
- * @api private
- */
-
- unknownCommand() {
- const partCommands = [this.name()];
- for (let parentCmd = this.parent; parentCmd; parentCmd = parentCmd.parent) {
- partCommands.unshift(parentCmd.name());
- }
- const fullCommand = partCommands.join(' ');
- const message = `error: unknown command '${this.args[0]}'.` +
- (this._hasHelpOption ? ` See '${fullCommand} ${this._helpLongFlag}'.` : '');
- this._displayError(1, 'commander.unknownCommand', message);
- };
-
- /**
- * Set the program version to `str`.
- *
- * This method auto-registers the "-V, --version" flag
- * which will print the version number when passed.
- *
- * You can optionally supply the flags and description to override the defaults.
- *
- * @param {string} str
- * @param {string} [flags]
- * @param {string} [description]
- * @return {this | string} `this` command for chaining, or version string if no arguments
- */
-
- version(str, flags, description) {
- if (str === undefined) return this._version;
- this._version = str;
- flags = flags || '-V, --version';
- description = description || 'output the version number';
- const versionOption = this.createOption(flags, description);
- this._versionOptionName = versionOption.attributeName();
- this.options.push(versionOption);
- this.on('option:' + versionOption.name(), () => {
- this._outputConfiguration.writeOut(`${str}\n`);
- this._exit(0, 'commander.version', str);
- });
- return this;
- };
-
- /**
- * Set the description to `str`.
- *
- * @param {string} [str]
- * @param {Object} [argsDescription]
- * @return {string|Command}
- */
- description(str, argsDescription) {
- if (str === undefined && argsDescription === undefined) return this._description;
- this._description = str;
- this._argsDescription = argsDescription;
- return this;
- };
-
- /**
- * Set an alias for the command.
- *
- * You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help.
- *
- * @param {string} [alias]
- * @return {string|Command}
- */
-
- alias(alias) {
- if (alias === undefined) return this._aliases[0]; // just return first, for backwards compatibility
-
- let command = this;
- if (this.commands.length !== 0 && this.commands[this.commands.length - 1]._executableHandler) {
- // assume adding alias for last added executable subcommand, rather than this
- command = this.commands[this.commands.length - 1];
- }
-
- if (alias === command._name) throw new Error('Command alias can\'t be the same as its name');
-
- command._aliases.push(alias);
- return this;
- };
-
- /**
- * Set aliases for the command.
- *
- * Only the first alias is shown in the auto-generated help.
- *
- * @param {string[]} [aliases]
- * @return {string[]|Command}
- */
-
- aliases(aliases) {
- // Getter for the array of aliases is the main reason for having aliases() in addition to alias().
- if (aliases === undefined) return this._aliases;
-
- aliases.forEach((alias) => this.alias(alias));
- return this;
- };
-
- /**
- * Set / get the command usage `str`.
- *
- * @param {string} [str]
- * @return {String|Command}
- */
-
- usage(str) {
- if (str === undefined) {
- if (this._usage) return this._usage;
-
- const args = this._args.map((arg) => {
- return humanReadableArgName(arg);
- });
- return [].concat(
- (this.options.length || this._hasHelpOption ? '[options]' : []),
- (this.commands.length ? '[command]' : []),
- (this._args.length ? args : [])
- ).join(' ');
- }
-
- this._usage = str;
- return this;
- };
-
- /**
- * Get or set the name of the command
- *
- * @param {string} [str]
- * @return {string|Command}
- */
-
- name(str) {
- if (str === undefined) return this._name;
- this._name = str;
- return this;
- };
-
- /**
- * Return program help documentation.
- *
- * @param {{ error: boolean }} [contextOptions] - pass {error:true} to wrap for stderr instead of stdout
- * @return {string}
- */
-
- helpInformation(contextOptions) {
- const helper = this.createHelp();
- if (helper.helpWidth === undefined) {
- helper.helpWidth = (contextOptions && contextOptions.error) ? this._outputConfiguration.getErrHelpWidth() : this._outputConfiguration.getOutHelpWidth();
- }
- return helper.formatHelp(this, helper);
- };
-
- /**
- * @api private
- */
-
- _getHelpContext(contextOptions) {
- contextOptions = contextOptions || {};
- const context = { error: !!contextOptions.error };
- let write;
- if (context.error) {
- write = (arg) => this._outputConfiguration.writeErr(arg);
- } else {
- write = (arg) => this._outputConfiguration.writeOut(arg);
- }
- context.write = contextOptions.write || write;
- context.command = this;
- return context;
- }
-
- /**
- * Output help information for this command.
- *
- * Outputs built-in help, and custom text added using `.addHelpText()`.
- *
- * @param {{ error: boolean } | Function} [contextOptions] - pass {error:true} to write to stderr instead of stdout
- */
-
- outputHelp(contextOptions) {
- let deprecatedCallback;
- if (typeof contextOptions === 'function') {
- deprecatedCallback = contextOptions;
- contextOptions = undefined;
- }
- const context = this._getHelpContext(contextOptions);
-
- const groupListeners = [];
- let command = this;
- while (command) {
- groupListeners.push(command); // ordered from current command to root
- command = command.parent;
- }
-
- groupListeners.slice().reverse().forEach(command => command.emit('beforeAllHelp', context));
- this.emit('beforeHelp', context);
-
- let helpInformation = this.helpInformation(context);
- if (deprecatedCallback) {
- helpInformation = deprecatedCallback(helpInformation);
- if (typeof helpInformation !== 'string' && !Buffer.isBuffer(helpInformation)) {
- throw new Error('outputHelp callback must return a string or a Buffer');
- }
- }
- context.write(helpInformation);
-
- this.emit(this._helpLongFlag); // deprecated
- this.emit('afterHelp', context);
- groupListeners.forEach(command => command.emit('afterAllHelp', context));
- };
-
- /**
- * You can pass in flags and a description to override the help
- * flags and help description for your command. Pass in false to
- * disable the built-in help option.
- *
- * @param {string | boolean} [flags]
- * @param {string} [description]
- * @return {Command} `this` command for chaining
- */
-
- helpOption(flags, description) {
- if (typeof flags === 'boolean') {
- this._hasHelpOption = flags;
- return this;
- }
- this._helpFlags = flags || this._helpFlags;
- this._helpDescription = description || this._helpDescription;
-
- const helpFlags = _parseOptionFlags(this._helpFlags);
- this._helpShortFlag = helpFlags.shortFlag;
- this._helpLongFlag = helpFlags.longFlag;
-
- return this;
- };
-
- /**
- * Output help information and exit.
- *
- * Outputs built-in help, and custom text added using `.addHelpText()`.
- *
- * @param {{ error: boolean }} [contextOptions] - pass {error:true} to write to stderr instead of stdout
- */
-
- help(contextOptions) {
- this.outputHelp(contextOptions);
- let exitCode = process.exitCode || 0;
- if (exitCode === 0 && contextOptions && typeof contextOptions !== 'function' && contextOptions.error) {
- exitCode = 1;
- }
- // message: do not have all displayed text available so only passing placeholder.
- this._exit(exitCode, 'commander.help', '(outputHelp)');
- };
-
- /**
- * Add additional text to be displayed with the built-in help.
- *
- * Position is 'before' or 'after' to affect just this command,
- * and 'beforeAll' or 'afterAll' to affect this command and all its subcommands.
- *
- * @param {string} position - before or after built-in help
- * @param {string | Function} text - string to add, or a function returning a string
- * @return {Command} `this` command for chaining
- */
- addHelpText(position, text) {
- const allowedValues = ['beforeAll', 'before', 'after', 'afterAll'];
- if (!allowedValues.includes(position)) {
- throw new Error(`Unexpected value for position to addHelpText.
-Expecting one of '${allowedValues.join("', '")}'`);
- }
- const helpEvent = `${position}Help`;
- this.on(helpEvent, (context) => {
- let helpStr;
- if (typeof text === 'function') {
- helpStr = text({ error: context.error, command: context.command });
- } else {
- helpStr = text;
- }
- // Ignore falsy value when nothing to output.
- if (helpStr) {
- context.write(`${helpStr}\n`);
- }
- });
- return this;
- }
-};
-
-/**
- * Expose the root command.
- */
-
-exports = module.exports = new Command();
-exports.program = exports; // More explicit access to global command.
-
-/**
- * Expose classes
- */
-
-exports.Command = Command;
-exports.Option = Option;
-exports.CommanderError = CommanderError;
-exports.InvalidOptionArgumentError = InvalidOptionArgumentError;
-exports.Help = Help;
-
-/**
- * Camel-case the given `flag`
- *
- * @param {string} flag
- * @return {string}
- * @api private
- */
-
-function camelcase(flag) {
- return flag.split('-').reduce((str, word) => {
- return str + word[0].toUpperCase() + word.slice(1);
- });
-}
-
-/**
- * Output help information if help flags specified
- *
- * @param {Command} cmd - command to output help for
- * @param {Array} args - array of options to search for help flags
- * @api private
- */
-
-function outputHelpIfRequested(cmd, args) {
- const helpOption = cmd._hasHelpOption && args.find(arg => arg === cmd._helpLongFlag || arg === cmd._helpShortFlag);
- if (helpOption) {
- cmd.outputHelp();
- // (Do not have all displayed text available so only passing placeholder.)
- cmd._exit(0, 'commander.helpDisplayed', '(outputHelp)');
- }
-}
-
-/**
- * Takes an argument and returns its human readable equivalent for help usage.
- *
- * @param {Object} arg
- * @return {string}
- * @api private
- */
-
-function humanReadableArgName(arg) {
- const nameOutput = arg.name + (arg.variadic === true ? '...' : '');
-
- return arg.required
- ? '<' + nameOutput + '>'
- : '[' + nameOutput + ']';
-}
-
-/**
- * Parse the short and long flag out of something like '-m,--mixed <value>'
- *
- * @api private
- */
-
-function _parseOptionFlags(flags) {
- let shortFlag;
- let longFlag;
- // Use original very loose parsing to maintain backwards compatibility for now,
- // which allowed for example unintended `-sw, --short-word` [sic].
- const flagParts = flags.split(/[ |,]+/);
- if (flagParts.length > 1 && !/^[[<]/.test(flagParts[1])) shortFlag = flagParts.shift();
- longFlag = flagParts.shift();
- // Add support for lone short flag without significantly changing parsing!
- if (!shortFlag && /^-[^-]$/.test(longFlag)) {
- shortFlag = longFlag;
- longFlag = undefined;
- }
- return { shortFlag, longFlag };
-}
-
-/**
- * Scan arguments and increment port number for inspect calls (to avoid conflicts when spawning new command).
- *
- * @param {string[]} args - array of arguments from node.execArgv
- * @returns {string[]}
- * @api private
- */
-
-function incrementNodeInspectorPort(args) {
- // Testing for these options:
- // --inspect[=[host:]port]
- // --inspect-brk[=[host:]port]
- // --inspect-port=[host:]port
- return args.map((arg) => {
- if (!arg.startsWith('--inspect')) {
- return arg;
- }
- let debugOption;
- let debugHost = '127.0.0.1';
- let debugPort = '9229';
- let match;
- if ((match = arg.match(/^(--inspect(-brk)?)$/)) !== null) {
- // e.g. --inspect
- debugOption = match[1];
- } else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null) {
- debugOption = match[1];
- if (/^\d+$/.test(match[3])) {
- // e.g. --inspect=1234
- debugPort = match[3];
- } else {
- // e.g. --inspect=localhost
- debugHost = match[3];
- }
- } else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/)) !== null) {
- // e.g. --inspect=localhost:1234
- debugOption = match[1];
- debugHost = match[3];
- debugPort = match[4];
- }
-
- if (debugOption && debugPort !== '0') {
- return `${debugOption}=${debugHost}:${parseInt(debugPort) + 1}`;
- }
- return arg;
- });
-}
diff --git a/node_modules/svgo/node_modules/commander/package-support.json b/node_modules/svgo/node_modules/commander/package-support.json
deleted file mode 100644
index 4eabb970..00000000
--- a/node_modules/svgo/node_modules/commander/package-support.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "versions": [
- {
- "version": "*",
- "target": {
- "node": "supported"
- },
- "response": {
- "type": "time-permitting"
- },
- "backing": {
- "npm-funding": true
- }
- }
- ]
-}
diff --git a/node_modules/svgo/node_modules/commander/package.json b/node_modules/svgo/node_modules/commander/package.json
deleted file mode 100644
index ca153e59..00000000
--- a/node_modules/svgo/node_modules/commander/package.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
- "name": "commander",
- "version": "7.2.0",
- "description": "the complete solution for node.js command-line programs",
- "keywords": [
- "commander",
- "command",
- "option",
- "parser",
- "cli",
- "argument",
- "args",
- "argv"
- ],
- "author": "TJ Holowaychuk <tj@vision-media.ca>",
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "https://github.com/tj/commander.js.git"
- },
- "scripts": {
- "lint": "eslint index.js esm.mjs \"tests/**/*.js\"",
- "typescript-lint": "eslint typings/*.ts tests/*.ts",
- "test": "jest && npm run test-typings",
- "test-esm": "node --experimental-modules ./tests/esm-imports-test.mjs",
- "test-typings": "tsd",
- "typescript-checkJS": "tsc --allowJS --checkJS index.js --noEmit",
- "test-all": "npm run test && npm run lint && npm run typescript-lint && npm run typescript-checkJS && npm run test-esm"
- },
- "main": "./index.js",
- "files": [
- "index.js",
- "esm.mjs",
- "typings/index.d.ts",
- "package-support.json"
- ],
- "type": "commonjs",
- "dependencies": {},
- "devDependencies": {
- "@types/jest": "^26.0.20",
- "@types/node": "^14.14.20",
- "@typescript-eslint/eslint-plugin": "^4.12.0",
- "@typescript-eslint/parser": "^4.12.0",
- "eslint": "^7.17.0",
- "eslint-config-standard": "^16.0.2",
- "eslint-plugin-jest": "^24.1.3",
- "jest": "^26.6.3",
- "standard": "^16.0.3",
- "ts-jest": "^26.5.1",
- "tsd": "^0.14.0",
- "typescript": "^4.1.2"
- },
- "types": "typings/index.d.ts",
- "jest": {
- "testEnvironment": "node",
- "collectCoverage": true,
- "transform": {
- "^.+\\.tsx?$": "ts-jest"
- },
- "testPathIgnorePatterns": [
- "/node_modules/"
- ]
- },
- "engines": {
- "node": ">= 10"
- },
- "support": true
-}
diff --git a/node_modules/svgo/node_modules/commander/typings/index.d.ts b/node_modules/svgo/node_modules/commander/typings/index.d.ts
deleted file mode 100644
index ee40d899..00000000
--- a/node_modules/svgo/node_modules/commander/typings/index.d.ts
+++ /dev/null
@@ -1,627 +0,0 @@
-// Type definitions for commander
-// Original definitions by: Alan Agius <https://github.com/alan-agius4>, Marcelo Dezem <https://github.com/mdezem>, vvakame <https://github.com/vvakame>, Jules Randolph <https://github.com/sveinburne>
-
-// Using method rather than property for method-signature-style, to document method overloads separately. Allow either.
-/* eslint-disable @typescript-eslint/method-signature-style */
-/* eslint-disable @typescript-eslint/no-explicit-any */
-
-declare namespace commander {
-
- interface CommanderError extends Error {
- code: string;
- exitCode: number;
- message: string;
- nestedError?: string;
- }
- type CommanderErrorConstructor = new (exitCode: number, code: string, message: string) => CommanderError;
-
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
- interface InvalidOptionArgumentError extends CommanderError {
- }
- type InvalidOptionArgumentErrorConstructor = new (message: string) => InvalidOptionArgumentError;
-
- interface Option {
- flags: string;
- description: string;
-
- required: boolean; // A value must be supplied when the option is specified.
- optional: boolean; // A value is optional when the option is specified.
- variadic: boolean;
- mandatory: boolean; // The option must have a value after parsing, which usually means it must be specified on command line.
- optionFlags: string;
- short?: string;
- long?: string;
- negate: boolean;
- defaultValue?: any;
- defaultValueDescription?: string;
- parseArg?: <T>(value: string, previous: T) => T;
- hidden: boolean;
- argChoices?: string[];
-
- /**
- * Set the default value, and optionally supply the description to be displayed in the help.
- */
- default(value: any, description?: string): this;
-
- /**
- * Calculate the full description, including defaultValue etc.
- */
- fullDescription(): string;
-
- /**
- * Set the custom handler for processing CLI option arguments into option values.
- */
- argParser<T>(fn: (value: string, previous: T) => T): this;
-
- /**
- * Whether the option is mandatory and must have a value after parsing.
- */
- makeOptionMandatory(mandatory?: boolean): this;
-
- /**
- * Hide option in help.
- */
- hideHelp(hide?: boolean): this;
-
- /**
- * Validation of option argument failed.
- * Intended for use from custom argument processing functions.
- */
- argumentRejected(messsage: string): never;
-
- /**
- * Only allow option value to be one of choices.
- */
- choices(values: string[]): this;
-
- /**
- * Return option name.
- */
- name(): string;
-
- /**
- * Return option name, in a camelcase format that can be used
- * as a object attribute key.
- */
- attributeName(): string;
- }
- type OptionConstructor = new (flags: string, description?: string) => Option;
-
- interface Help {
- /** output helpWidth, long lines are wrapped to fit */
- helpWidth?: number;
- sortSubcommands: boolean;
- sortOptions: boolean;
-
- /** Get the command term to show in the list of subcommands. */
- subcommandTerm(cmd: Command): string;
- /** Get the command description to show in the list of subcommands. */
- subcommandDescription(cmd: Command): string;
- /** Get the option term to show in the list of options. */
- optionTerm(option: Option): string;
- /** Get the option description to show in the list of options. */
- optionDescription(option: Option): string;
-
- /** Get the command usage to be displayed at the top of the built-in help. */
- commandUsage(cmd: Command): string;
- /** Get the description for the command. */
- commandDescription(cmd: Command): string;
-
- /** Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one. */
- visibleCommands(cmd: Command): Command[];
- /** Get an array of the visible options. Includes a placeholder for the implicit help option, if there is one. */
- visibleOptions(cmd: Command): Option[];
- /** Get an array of the arguments which have descriptions. */
- visibleArguments(cmd: Command): Array<{ term: string; description: string}>;
-
- /** Get the longest command term length. */
- longestSubcommandTermLength(cmd: Command, helper: Help): number;
- /** Get the longest option term length. */
- longestOptionTermLength(cmd: Command, helper: Help): number;
- /** Get the longest argument term length. */
- longestArgumentTermLength(cmd: Command, helper: Help): number;
- /** Calculate the pad width from the maximum term length. */
- padWidth(cmd: Command, helper: Help): number;
-
- /**
- * Wrap the given string to width characters per line, with lines after the first indented.
- * Do not wrap if insufficient room for wrapping (minColumnWidth), or string is manually formatted.
- */
- wrap(str: string, width: number, indent: number, minColumnWidth?: number): string;
-
- /** Generate the built-in help text. */
- formatHelp(cmd: Command, helper: Help): string;
- }
- type HelpConstructor = new () => Help;
- type HelpConfiguration = Partial<Help>;
-
- interface ParseOptions {
- from: 'node' | 'electron' | 'user';
- }
- interface HelpContext { // optional parameter for .help() and .outputHelp()
- error: boolean;
- }
- interface AddHelpTextContext { // passed to text function used with .addHelpText()
- error: boolean;
- command: Command;
- }
- interface OutputConfiguration {
- writeOut?(str: string): void;
- writeErr?(str: string): void;
- getOutHelpWidth?(): number;
- getErrHelpWidth?(): number;
- outputError?(str: string, write: (str: string) => void): void;
-
- }
-
- type AddHelpTextPosition = 'beforeAll' | 'before' | 'after' | 'afterAll';
-
- interface OptionValues {
- [key: string]: any;
- }
-
- interface Command {
- args: string[];
- commands: Command[];
- parent: Command | null;
-
- /**
- * Set the program version to `str`.
- *
- * This method auto-registers the "-V, --version" flag
- * which will print the version number when passed.
- *
- * You can optionally supply the flags and description to override the defaults.
- */
- version(str: string, flags?: string, description?: string): this;
-
- /**
- * Define a command, implemented using an action handler.
- *
- * @remarks
- * The command description is supplied using `.description`, not as a parameter to `.command`.
- *
- * @example
- * ```ts
- * program
- * .command('clone <source> [destination]')
- * .description('clone a repository into a newly created directory')
- * .action((source, destination) => {
- * console.log('clone command called');
- * });
- * ```
- *
- * @param nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`
- * @param opts - configuration options
- * @returns new command
- */
- command(nameAndArgs: string, opts?: CommandOptions): ReturnType<this['createCommand']>;
- /**
- * Define a command, implemented in a separate executable file.
- *
- * @remarks
- * The command description is supplied as the second parameter to `.command`.
- *
- * @example
- * ```ts
- * program
- * .command('start <service>', 'start named service')
- * .command('stop [service]', 'stop named service, or all if no name supplied');
- * ```
- *
- * @param nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`
- * @param description - description of executable command
- * @param opts - configuration options
- * @returns `this` command for chaining
- */
- command(nameAndArgs: string, description: string, opts?: commander.ExecutableCommandOptions): this;
-
- /**
- * Factory routine to create a new unattached command.
- *
- * See .command() for creating an attached subcommand, which uses this routine to
- * create the command. You can override createCommand to customise subcommands.
- */
- createCommand(name?: string): Command;
-
- /**
- * Add a prepared subcommand.
- *
- * See .command() for creating an attached subcommand which inherits settings from its parent.
- *
- * @returns `this` command for chaining
- */
- addCommand(cmd: Command, opts?: CommandOptions): this;
-
- /**
- * Define argument syntax for command.
- *
- * @returns `this` command for chaining
- */
- arguments(desc: string): this;
-
- /**
- * Override default decision whether to add implicit help command.
- *
- * addHelpCommand() // force on
- * addHelpCommand(false); // force off
- * addHelpCommand('help [cmd]', 'display help for [cmd]'); // force on with custom details
- *
- * @returns `this` command for chaining
- */
- addHelpCommand(enableOrNameAndArgs?: string | boolean, description?: string): this;
-
- /**
- * Register callback to use as replacement for calling process.exit.
- */
- exitOverride(callback?: (err: CommanderError) => never|void): this;
-
- /**
- * You can customise the help with a subclass of Help by overriding createHelp,
- * or by overriding Help properties using configureHelp().
- */
- createHelp(): Help;
-
- /**
- * You can customise the help by overriding Help properties using configureHelp(),
- * or with a subclass of Help by overriding createHelp().
- */
- configureHelp(configuration: HelpConfiguration): this;
- /** Get configuration */
- configureHelp(): HelpConfiguration;
-
- /**
- * The default output goes to stdout and stderr. You can customise this for special
- * applications. You can also customise the display of errors by overriding outputError.
- *
- * The configuration properties are all functions:
- *
- * // functions to change where being written, stdout and stderr
- * writeOut(str)
- * writeErr(str)
- * // matching functions to specify width for wrapping help
- * getOutHelpWidth()
- * getErrHelpWidth()
- * // functions based on what is being written out
- * outputError(str, write) // used for displaying errors, and not used for displaying help
- */
- configureOutput(configuration: OutputConfiguration): this;
- /** Get configuration */
- configureOutput(): OutputConfiguration;
-
- /**
- * Register callback `fn` for the command.
- *
- * @example
- * program
- * .command('help')
- * .description('display verbose help')
- * .action(function() {
- * // output help here
- * });
- *
- * @returns `this` command for chaining
- */
- action(fn: (...args: any[]) => void | Promise<void>): this;
-
- /**
- * Define option with `flags`, `description` and optional
- * coercion `fn`.
- *
- * The `flags` string contains the short and/or long flags,
- * separated by comma, a pipe or space. The following are all valid
- * all will output this way when `--help` is used.
- *
- * "-p, --pepper"
- * "-p|--pepper"
- * "-p --pepper"
- *
- * @example
- * // simple boolean defaulting to false
- * program.option('-p, --pepper', 'add pepper');
- *
- * --pepper
- * program.pepper
- * // => Boolean
- *
- * // simple boolean defaulting to true
- * program.option('-C, --no-cheese', 'remove cheese');
- *
- * program.cheese
- * // => true
- *
- * --no-cheese
- * program.cheese
- * // => false
- *
- * // required argument
- * program.option('-C, --chdir <path>', 'change the working directory');
- *
- * --chdir /tmp
- * program.chdir
- * // => "/tmp"
- *
- * // optional argument
- * program.option('-c, --cheese [type]', 'add cheese [marble]');
- *
- * @returns `this` command for chaining
- */
- option(flags: string, description?: string, defaultValue?: string | boolean): this;
- option<T>(flags: string, description: string, fn: (value: string, previous: T) => T, defaultValue?: T): this;
- /** @deprecated since v7, instead use choices or a custom function */
- option(flags: string, description: string, regexp: RegExp, defaultValue?: string | boolean): this;
-
- /**
- * Define a required option, which must have a value after parsing. This usually means
- * the option must be specified on the command line. (Otherwise the same as .option().)
- *
- * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space.
- */
- requiredOption(flags: string, description?: string, defaultValue?: string | boolean): this;
- requiredOption<T>(flags: string, description: string, fn: (value: string, previous: T) => T, defaultValue?: T): this;
- /** @deprecated since v7, instead use choices or a custom function */
- requiredOption(flags: string, description: string, regexp: RegExp, defaultValue?: string | boolean): this;
-
- /**
- * Factory routine to create a new unattached option.
- *
- * See .option() for creating an attached option, which uses this routine to
- * create the option. You can override createOption to return a custom option.
- */
-
- createOption(flags: string, description?: string): Option;
-
- /**
- * Add a prepared Option.
- *
- * See .option() and .requiredOption() for creating and attaching an option in a single call.
- */
- addOption(option: Option): this;
-
- /**
- * Whether to store option values as properties on command object,
- * or store separately (specify false). In both cases the option values can be accessed using .opts().
- *
- * @returns `this` command for chaining
- */
- storeOptionsAsProperties(): this & OptionValues;
- storeOptionsAsProperties(storeAsProperties: true): this & OptionValues;
- storeOptionsAsProperties(storeAsProperties?: boolean): this;
-
- /**
- * Alter parsing of short flags with optional values.
- *
- * @example
- * // for `.option('-f,--flag [value]'):
- * .combineFlagAndOptionalValue(true) // `-f80` is treated like `--flag=80`, this is the default behaviour
- * .combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b`
- *
- * @returns `this` command for chaining
- */
- combineFlagAndOptionalValue(combine?: boolean): this;
-
- /**
- * Allow unknown options on the command line.
- *
- * @returns `this` command for chaining
- */
- allowUnknownOption(allowUnknown?: boolean): this;
-
- /**
- * Allow excess command-arguments on the command line. Pass false to make excess arguments an error.
- *
- * @returns `this` command for chaining
- */
- allowExcessArguments(allowExcess?: boolean): this;
-
- /**
- * Enable positional options. Positional means global options are specified before subcommands which lets
- * subcommands reuse the same option names, and also enables subcommands to turn on passThroughOptions.
- *
- * The default behaviour is non-positional and global options may appear anywhere on the command line.
- *
- * @returns `this` command for chaining
- */
- enablePositionalOptions(positional?: boolean): this;
-
- /**
- * Pass through options that come after command-arguments rather than treat them as command-options,
- * so actual command-options come before command-arguments. Turning this on for a subcommand requires
- * positional options to have been enabled on the program (parent commands).
- *
- * The default behaviour is non-positional and options may appear before or after command-arguments.
- *
- * @returns `this` command for chaining
- */
- passThroughOptions(passThrough?: boolean): this;
-
- /**
- * Parse `argv`, setting options and invoking commands when defined.
- *
- * The default expectation is that the arguments are from node and have the application as argv[0]
- * and the script being run in argv[1], with user parameters after that.
- *
- * Examples:
- *
- * program.parse(process.argv);
- * program.parse(); // implicitly use process.argv and auto-detect node vs electron conventions
- * program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]
- *
- * @returns `this` command for chaining
- */
- parse(argv?: string[], options?: ParseOptions): this;
-
- /**
- * Parse `argv`, setting options and invoking commands when defined.
- *
- * Use parseAsync instead of parse if any of your action handlers are async. Returns a Promise.
- *
- * The default expectation is that the arguments are from node and have the application as argv[0]
- * and the script being run in argv[1], with user parameters after that.
- *
- * Examples:
- *
- * program.parseAsync(process.argv);
- * program.parseAsync(); // implicitly use process.argv and auto-detect node vs electron conventions
- * program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]
- *
- * @returns Promise
- */
- parseAsync(argv?: string[], options?: ParseOptions): Promise<this>;
-
- /**
- * Parse options from `argv` removing known options,
- * and return argv split into operands and unknown arguments.
- *
- * @example
- * argv => operands, unknown
- * --known kkk op => [op], []
- * op --known kkk => [op], []
- * sub --unknown uuu op => [sub], [--unknown uuu op]
- * sub -- --unknown uuu op => [sub --unknown uuu op], []
- */
- parseOptions(argv: string[]): commander.ParseOptionsResult;
-
- /**
- * Return an object containing options as key-value pairs
- */
- opts(): OptionValues;
-
- /**
- * Set the description.
- *
- * @returns `this` command for chaining
- */
- description(str: string, argsDescription?: {[argName: string]: string}): this;
- /**
- * Get the description.
- */
- description(): string;
-
- /**
- * Set an alias for the command.
- *
- * You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help.
- *
- * @returns `this` command for chaining
- */
- alias(alias: string): this;
- /**
- * Get alias for the command.
- */
- alias(): string;
-
- /**
- * Set aliases for the command.
- *
- * Only the first alias is shown in the auto-generated help.
- *
- * @returns `this` command for chaining
- */
- aliases(aliases: string[]): this;
- /**
- * Get aliases for the command.
- */
- aliases(): string[];
-
- /**
- * Set the command usage.
- *
- * @returns `this` command for chaining
- */
- usage(str: string): this;
- /**
- * Get the command usage.
- */
- usage(): string;
-
- /**
- * Set the name of the command.
- *
- * @returns `this` command for chaining
- */
- name(str: string): this;
- /**
- * Get the name of the command.
- */
- name(): string;
-
- /**
- * Output help information for this command.
- *
- * Outputs built-in help, and custom text added using `.addHelpText()`.
- *
- */
- outputHelp(context?: HelpContext): void;
- /** @deprecated since v7 */
- outputHelp(cb?: (str: string) => string): void;
-
- /**
- * Return command help documentation.
- */
- helpInformation(context?: HelpContext): string;
-
- /**
- * You can pass in flags and a description to override the help
- * flags and help description for your command. Pass in false
- * to disable the built-in help option.
- */
- helpOption(flags?: string | boolean, description?: string): this;
-
- /**
- * Output help information and exit.
- *
- * Outputs built-in help, and custom text added using `.addHelpText()`.
- */
- help(context?: HelpContext): never;
- /** @deprecated since v7 */
- help(cb?: (str: string) => string): never;
-
- /**
- * Add additional text to be displayed with the built-in help.
- *
- * Position is 'before' or 'after' to affect just this command,
- * and 'beforeAll' or 'afterAll' to affect this command and all its subcommands.
- */
- addHelpText(position: AddHelpTextPosition, text: string): this;
- addHelpText(position: AddHelpTextPosition, text: (context: AddHelpTextContext) => string | undefined): this;
-
- /**
- * Add a listener (callback) for when events occur. (Implemented using EventEmitter.)
- */
- on(event: string | symbol, listener: (...args: any[]) => void): this;
- }
- type CommandConstructor = new (name?: string) => Command;
-
- interface CommandOptions {
- hidden?: boolean;
- isDefault?: boolean;
- /** @deprecated since v7, replaced by hidden */
- noHelp?: boolean;
- }
- interface ExecutableCommandOptions extends CommandOptions {
- executableFile?: string;
- }
-
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
- interface ParseOptionsResult {
- operands: string[];
- unknown: string[];
- }
-
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
- interface CommanderStatic extends Command {
- program: Command;
- Command: CommandConstructor;
- Option: OptionConstructor;
- CommanderError: CommanderErrorConstructor;
- InvalidOptionArgumentError: InvalidOptionArgumentErrorConstructor;
- Help: HelpConstructor;
- }
-
-}
-
-// Declaring namespace AND global
-// eslint-disable-next-line @typescript-eslint/no-redeclare
-declare const commander: commander.CommanderStatic;
-export = commander;
diff --git a/node_modules/svgo/package.json b/node_modules/svgo/package.json
deleted file mode 100644
index 847d260e..00000000
--- a/node_modules/svgo/package.json
+++ /dev/null
@@ -1,108 +0,0 @@
-{
- "packageManager": "yarn@2.4.3",
- "name": "svgo",
- "version": "3.3.2",
- "description": "Nodejs-based tool for optimizing SVG vector graphics files",
- "license": "MIT",
- "keywords": [
- "svgo",
- "svg",
- "optimize",
- "minify"
- ],
- "homepage": "https://svgo.dev",
- "bugs": {
- "url": "https://github.com/svg/svgo/issues"
- },
- "author": {
- "name": "Kir Belevich",
- "email": "kir@belevi.ch",
- "url": "https://github.com/deepsweet"
- },
- "contributors": [
- {
- "name": "Sergey Belov",
- "email": "peimei@ya.ru",
- "url": "https://github.com/arikon"
- },
- {
- "name": "Lev Solntsev",
- "email": "lev.sun@ya.ru",
- "url": "https://github.com/GreLI"
- },
- {
- "name": "Bogdan Chadkin",
- "email": "trysound@yandex.ru",
- "url": "https://github.com/TrySound"
- },
- {
- "name": "Seth Falco",
- "email": "seth@falco.fun",
- "url": "https://falco.fun/"
- }
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/svg/svgo.git"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/svgo"
- },
- "main": "./lib/svgo-node.js",
- "bin": "./bin/svgo",
- "types": "./lib/svgo.d.ts",
- "files": [
- "bin",
- "lib",
- "plugins",
- "dist",
- "!**/*.test.js"
- ],
- "engines": {
- "node": ">=14.0.0"
- },
- "scripts": {
- "test": "NODE_OPTIONS=--experimental-vm-modules jest --maxWorkers=4 --coverage",
- "lint": "eslint --ignore-path .gitignore . && prettier --check . --ignore-path .gitignore",
- "fix": "eslint --ignore-path .gitignore --fix . && prettier --write . --ignore-path .gitignore",
- "typecheck": "tsc",
- "test-browser": "rollup -c && node ./test/browser.js",
- "test-regression": "node ./test/regression-extract.js && NO_DIFF=1 node ./test/regression.js",
- "prepublishOnly": "rm -rf dist && rollup -c",
- "qa": "yarn lint && yarn typecheck && yarn test && yarn test-browser && yarn test-regression"
- },
- "jest": {
- "coveragePathIgnorePatterns": [
- "fixtures"
- ]
- },
- "dependencies": {
- "@trysound/sax": "0.2.0",
- "commander": "^7.2.0",
- "css-select": "^5.1.0",
- "css-tree": "^2.3.1",
- "css-what": "^6.1.0",
- "csso": "^5.0.5",
- "picocolors": "^1.0.0"
- },
- "devDependencies": {
- "@rollup/plugin-commonjs": "^22.0.2",
- "@rollup/plugin-node-resolve": "^14.1.0",
- "@types/css-tree": "^2.3.4",
- "@types/csso": "^5.0.4",
- "@types/jest": "^29.5.5",
- "del": "^6.0.0",
- "eslint": "^8.55.0",
- "jest": "^29.5.5",
- "node-fetch": "^2.7.0",
- "pixelmatch": "^5.3.0",
- "playwright": "^1.40.1",
- "pngjs": "^7.0.0",
- "prettier": "^3.1.1",
- "rollup": "^2.79.1",
- "rollup-plugin-terser": "^7.0.2",
- "tar-stream": "^3.1.6",
- "typescript": "^5.3.3"
- }
-} \ No newline at end of file
diff --git a/node_modules/svgo/plugins/_collections.js b/node_modules/svgo/plugins/_collections.js
deleted file mode 100644
index 6f11b136..00000000
--- a/node_modules/svgo/plugins/_collections.js
+++ /dev/null
@@ -1,2339 +0,0 @@
-'use strict';
-
-// https://www.w3.org/TR/SVG11/intro.html#Definitions
-
-/**
- * @type {Record<string, Set<string>>}
- */
-exports.elemsGroups = {
- animation: new Set([
- 'animate',
- 'animateColor',
- 'animateMotion',
- 'animateTransform',
- 'set',
- ]),
- descriptive: new Set(['desc', 'metadata', 'title']),
- shape: new Set([
- 'circle',
- 'ellipse',
- 'line',
- 'path',
- 'polygon',
- 'polyline',
- 'rect',
- ]),
- structural: new Set(['defs', 'g', 'svg', 'symbol', 'use']),
- paintServer: new Set([
- 'hatch',
- 'linearGradient',
- 'meshGradient',
- 'pattern',
- 'radialGradient',
- 'solidColor',
- ]),
- nonRendering: new Set([
- 'clipPath',
- 'filter',
- 'linearGradient',
- 'marker',
- 'mask',
- 'pattern',
- 'radialGradient',
- 'solidColor',
- 'symbol',
- ]),
- container: new Set([
- 'a',
- 'defs',
- 'foreignObject',
- 'g',
- 'marker',
- 'mask',
- 'missing-glyph',
- 'pattern',
- 'svg',
- 'switch',
- 'symbol',
- ]),
- textContent: new Set([
- 'altGlyph',
- 'altGlyphDef',
- 'altGlyphItem',
- 'glyph',
- 'glyphRef',
- 'text',
- 'textPath',
- 'tref',
- 'tspan',
- ]),
- textContentChild: new Set(['altGlyph', 'textPath', 'tref', 'tspan']),
- lightSource: new Set([
- 'feDiffuseLighting',
- 'feDistantLight',
- 'fePointLight',
- 'feSpecularLighting',
- 'feSpotLight',
- ]),
- filterPrimitive: new Set([
- 'feBlend',
- 'feColorMatrix',
- 'feComponentTransfer',
- 'feComposite',
- 'feConvolveMatrix',
- 'feDiffuseLighting',
- 'feDisplacementMap',
- 'feDropShadow',
- 'feFlood',
- 'feFuncA',
- 'feFuncB',
- 'feFuncG',
- 'feFuncR',
- 'feGaussianBlur',
- 'feImage',
- 'feMerge',
- 'feMergeNode',
- 'feMorphology',
- 'feOffset',
- 'feSpecularLighting',
- 'feTile',
- 'feTurbulence',
- ]),
-};
-
-/**
- * Elements where adding or removing whitespace may effect rendering, metadata,
- * or semantic meaning.
- *
- * @see https://developer.mozilla.org/docs/Web/HTML/Element/pre
- */
-exports.textElems = new Set([
- ...exports.elemsGroups.textContent,
- 'pre',
- 'title',
-]);
-
-exports.pathElems = new Set(['glyph', 'missing-glyph', 'path']);
-
-/**
- * @type {Record<string, Set<string>>}
- * @see https://www.w3.org/TR/SVG11/intro.html#Definitions
- */
-exports.attrsGroups = {
- animationAddition: new Set(['additive', 'accumulate']),
- animationAttributeTarget: new Set(['attributeType', 'attributeName']),
- animationEvent: new Set(['onbegin', 'onend', 'onrepeat', 'onload']),
- animationTiming: new Set([
- 'begin',
- 'dur',
- 'end',
- 'fill',
- 'max',
- 'min',
- 'repeatCount',
- 'repeatDur',
- 'restart',
- ]),
- animationValue: new Set([
- 'by',
- 'calcMode',
- 'from',
- 'keySplines',
- 'keyTimes',
- 'to',
- 'values',
- ]),
- conditionalProcessing: new Set([
- 'requiredExtensions',
- 'requiredFeatures',
- 'systemLanguage',
- ]),
- core: new Set(['id', 'tabindex', 'xml:base', 'xml:lang', 'xml:space']),
- graphicalEvent: new Set([
- 'onactivate',
- 'onclick',
- 'onfocusin',
- 'onfocusout',
- 'onload',
- 'onmousedown',
- 'onmousemove',
- 'onmouseout',
- 'onmouseover',
- 'onmouseup',
- ]),
- presentation: new Set([
- 'alignment-baseline',
- 'baseline-shift',
- 'clip-path',
- 'clip-rule',
- 'clip',
- 'color-interpolation-filters',
- 'color-interpolation',
- 'color-profile',
- 'color-rendering',
- 'color',
- 'cursor',
- 'direction',
- 'display',
- 'dominant-baseline',
- 'enable-background',
- 'fill-opacity',
- 'fill-rule',
- 'fill',
- 'filter',
- 'flood-color',
- 'flood-opacity',
- 'font-family',
- 'font-size-adjust',
- 'font-size',
- 'font-stretch',
- 'font-style',
- 'font-variant',
- 'font-weight',
- 'glyph-orientation-horizontal',
- 'glyph-orientation-vertical',
- 'image-rendering',
- 'letter-spacing',
- 'lighting-color',
- 'marker-end',
- 'marker-mid',
- 'marker-start',
- 'mask',
- 'opacity',
- 'overflow',
- 'paint-order',
- 'pointer-events',
- 'shape-rendering',
- 'stop-color',
- 'stop-opacity',
- 'stroke-dasharray',
- 'stroke-dashoffset',
- 'stroke-linecap',
- 'stroke-linejoin',
- 'stroke-miterlimit',
- 'stroke-opacity',
- 'stroke-width',
- 'stroke',
- 'text-anchor',
- 'text-decoration',
- 'text-overflow',
- 'text-rendering',
- 'transform-origin',
- 'transform',
- 'unicode-bidi',
- 'vector-effect',
- 'visibility',
- 'word-spacing',
- 'writing-mode',
- ]),
- xlink: new Set([
- 'xlink:actuate',
- 'xlink:arcrole',
- 'xlink:href',
- 'xlink:role',
- 'xlink:show',
- 'xlink:title',
- 'xlink:type',
- ]),
- documentEvent: new Set([
- 'onabort',
- 'onerror',
- 'onresize',
- 'onscroll',
- 'onunload',
- 'onzoom',
- ]),
- documentElementEvent: new Set(['oncopy', 'oncut', 'onpaste']),
- globalEvent: new Set([
- 'oncancel',
- 'oncanplay',
- 'oncanplaythrough',
- 'onchange',
- 'onclick',
- 'onclose',
- 'oncuechange',
- 'ondblclick',
- 'ondrag',
- 'ondragend',
- 'ondragenter',
- 'ondragleave',
- 'ondragover',
- 'ondragstart',
- 'ondrop',
- 'ondurationchange',
- 'onemptied',
- 'onended',
- 'onerror',
- 'onfocus',
- 'oninput',
- 'oninvalid',
- 'onkeydown',
- 'onkeypress',
- 'onkeyup',
- 'onload',
- 'onloadeddata',
- 'onloadedmetadata',
- 'onloadstart',
- 'onmousedown',
- 'onmouseenter',
- 'onmouseleave',
- 'onmousemove',
- 'onmouseout',
- 'onmouseover',
- 'onmouseup',
- 'onmousewheel',
- 'onpause',
- 'onplay',
- 'onplaying',
- 'onprogress',
- 'onratechange',
- 'onreset',
- 'onresize',
- 'onscroll',
- 'onseeked',
- 'onseeking',
- 'onselect',
- 'onshow',
- 'onstalled',
- 'onsubmit',
- 'onsuspend',
- 'ontimeupdate',
- 'ontoggle',
- 'onvolumechange',
- 'onwaiting',
- ]),
- filterPrimitive: new Set(['x', 'y', 'width', 'height', 'result']),
- transferFunction: new Set([
- 'amplitude',
- 'exponent',
- 'intercept',
- 'offset',
- 'slope',
- 'tableValues',
- 'type',
- ]),
-};
-
-/**
- * @type {Record<string, Record<string, string>>}
- */
-exports.attrsGroupsDefaults = {
- core: { 'xml:space': 'default' },
- presentation: {
- clip: 'auto',
- 'clip-path': 'none',
- 'clip-rule': 'nonzero',
- mask: 'none',
- opacity: '1',
- 'stop-color': '#000',
- 'stop-opacity': '1',
- 'fill-opacity': '1',
- 'fill-rule': 'nonzero',
- fill: '#000',
- stroke: 'none',
- 'stroke-width': '1',
- 'stroke-linecap': 'butt',
- 'stroke-linejoin': 'miter',
- 'stroke-miterlimit': '4',
- 'stroke-dasharray': 'none',
- 'stroke-dashoffset': '0',
- 'stroke-opacity': '1',
- 'paint-order': 'normal',
- 'vector-effect': 'none',
- display: 'inline',
- visibility: 'visible',
- 'marker-start': 'none',
- 'marker-mid': 'none',
- 'marker-end': 'none',
- 'color-interpolation': 'sRGB',
- 'color-interpolation-filters': 'linearRGB',
- 'color-rendering': 'auto',
- 'shape-rendering': 'auto',
- 'text-rendering': 'auto',
- 'image-rendering': 'auto',
- 'font-style': 'normal',
- 'font-variant': 'normal',
- 'font-weight': 'normal',
- 'font-stretch': 'normal',
- 'font-size': 'medium',
- 'font-size-adjust': 'none',
- kerning: 'auto',
- 'letter-spacing': 'normal',
- 'word-spacing': 'normal',
- 'text-decoration': 'none',
- 'text-anchor': 'start',
- 'text-overflow': 'clip',
- 'writing-mode': 'lr-tb',
- 'glyph-orientation-vertical': 'auto',
- 'glyph-orientation-horizontal': '0deg',
- direction: 'ltr',
- 'unicode-bidi': 'normal',
- 'dominant-baseline': 'auto',
- 'alignment-baseline': 'baseline',
- 'baseline-shift': 'baseline',
- },
- transferFunction: {
- slope: '1',
- intercept: '0',
- amplitude: '1',
- exponent: '1',
- offset: '0',
- },
-};
-
-/**
- * @type {Record<string, {
- * attrsGroups: Set<string>,
- * attrs?: Set<string>,
- * defaults?: Record<string, string>,
- * contentGroups?: Set<string>,
- * content?: Set<string>,
- * }>}
- * @see https://www.w3.org/TR/SVG11/eltindex.html
- */
-exports.elems = {
- a: {
- attrsGroups: new Set([
- 'conditionalProcessing',
- 'core',
- 'graphicalEvent',
- 'presentation',
- 'xlink',
- ]),
- attrs: new Set([
- 'class',
- 'externalResourcesRequired',
- 'style',
- 'target',
- 'transform',
- ]),
- defaults: {
- target: '_self',
- },
- contentGroups: new Set([
- 'animation',
- 'descriptive',
- 'paintServer',
- 'shape',
- 'structural',
- ]),
- content: new Set([
- 'a',
- 'altGlyphDef',
- 'clipPath',
- 'color-profile',
- 'cursor',
- 'filter',
- 'font-face',
- 'font',
- 'foreignObject',
- 'image',
- 'marker',
- 'mask',
- 'pattern',
- 'script',
- 'style',
- 'switch',
- 'text',
- 'view',
- // not spec compliant
- 'tspan',
- ]),
- },
- altGlyph: {
- attrsGroups: new Set([
- 'conditionalProcessing',
- 'core',
- 'graphicalEvent',
- 'presentation',
- 'xlink',
- ]),
- attrs: new Set([
- 'class',
- 'dx',
- 'dy',
- 'externalResourcesRequired',
- 'format',
- 'glyphRef',
- 'rotate',
- 'style',
- 'x',
- 'y',
- ]),
- },
- altGlyphDef: {
- attrsGroups: new Set(['core']),
- content: new Set(['glyphRef']),
- },
- altGlyphItem: {
- attrsGroups: new Set(['core']),
- content: new Set(['glyphRef', 'altGlyphItem']),
- },
- animate: {
- attrsGroups: new Set([
- 'animationAddition',
- 'animationAttributeTarget',
- 'animationEvent',
- 'animationTiming',
- 'animationValue',
- 'conditionalProcessing',
- 'core',
- 'presentation',
- 'xlink',
- ]),
- attrs: new Set(['externalResourcesRequired']),
- contentGroups: new Set(['descriptive']),
- },
- animateColor: {
- attrsGroups: new Set([
- 'animationAddition',
- 'animationAttributeTarget',
- 'animationEvent',
- 'animationTiming',
- 'animationValue',
- 'conditionalProcessing',
- 'core',
- 'presentation',
- 'xlink',
- ]),
- attrs: new Set(['externalResourcesRequired']),
- contentGroups: new Set(['descriptive']),
- },
- animateMotion: {
- attrsGroups: new Set([
- 'animationAddition',
- 'animationEvent',
- 'animationTiming',
- 'animationValue',
- 'conditionalProcessing',
- 'core',
- 'xlink',
- ]),
- attrs: new Set([
- 'externalResourcesRequired',
- 'keyPoints',
- 'origin',
- 'path',
- 'rotate',
- ]),
- defaults: {
- rotate: '0',
- },
- contentGroups: new Set(['descriptive']),
- content: new Set(['mpath']),
- },
- animateTransform: {
- attrsGroups: new Set([
- 'animationAddition',
- 'animationAttributeTarget',
- 'animationEvent',
- 'animationTiming',
- 'animationValue',
- 'conditionalProcessing',
- 'core',
- 'xlink',
- ]),
- attrs: new Set(['externalResourcesRequired', 'type']),
- contentGroups: new Set(['descriptive']),
- },
- circle: {
- attrsGroups: new Set([
- 'conditionalProcessing',
- 'core',
- 'graphicalEvent',
- 'presentation',
- ]),
- attrs: new Set([
- 'class',
- 'cx',
- 'cy',
- 'externalResourcesRequired',
- 'r',
- 'style',
- 'transform',
- ]),
- defaults: {
- cx: '0',
- cy: '0',
- },
- contentGroups: new Set(['animation', 'descriptive']),
- },
- clipPath: {
- attrsGroups: new Set(['conditionalProcessing', 'core', 'presentation']),
- attrs: new Set([
- 'class',
- 'clipPathUnits',
- 'externalResourcesRequired',
- 'style',
- 'transform',
- ]),
- defaults: {
- clipPathUnits: 'userSpaceOnUse',
- },
- contentGroups: new Set(['animation', 'descriptive', 'shape']),
- content: new Set(['text', 'use']),
- },
- 'color-profile': {
- attrsGroups: new Set(['core', 'xlink']),
- attrs: new Set(['local', 'name', 'rendering-intent']),
- defaults: {
- name: 'sRGB',
- 'rendering-intent': 'auto',
- },
- contentGroups: new Set(['descriptive']),
- },
- cursor: {
- attrsGroups: new Set(['core', 'conditionalProcessing', 'xlink']),
- attrs: new Set(['externalResourcesRequired', 'x', 'y']),
- defaults: {
- x: '0',
- y: '0',
- },
- contentGroups: new Set(['descriptive']),
- },
- defs: {
- attrsGroups: new Set([
- 'conditionalProcessing',
- 'core',
- 'graphicalEvent',
- 'presentation',
- ]),
- attrs: new Set([
- 'class',
- 'externalResourcesRequired',
- 'style',
- 'transform',
- ]),
- contentGroups: new Set([
- 'animation',
- 'descriptive',
- 'paintServer',
- 'shape',
- 'structural',
- ]),
- content: new Set([
- 'a',
- 'altGlyphDef',
- 'clipPath',
- 'color-profile',
- 'cursor',
- 'filter',
- 'font-face',
- 'font',
- 'foreignObject',
- 'image',
- 'marker',
- 'mask',
- 'pattern',
- 'script',
- 'style',
- 'switch',
- 'text',
- 'view',
- ]),
- },
- desc: {
- attrsGroups: new Set(['core']),
- attrs: new Set(['class', 'style']),
- },
- ellipse: {
- attrsGroups: new Set([
- 'conditionalProcessing',
- 'core',
- 'graphicalEvent',
- 'presentation',
- ]),
- attrs: new Set([
- 'class',
- 'cx',
- 'cy',
- 'externalResourcesRequired',
- 'rx',
- 'ry',
- 'style',
- 'transform',
- ]),
- defaults: {
- cx: '0',
- cy: '0',
- },
- contentGroups: new Set(['animation', 'descriptive']),
- },
- feBlend: {
- attrsGroups: new Set(['core', 'presentation', 'filterPrimitive']),
- attrs: new Set([
- 'class',
- 'style',
- // TODO: in - 'If no value is provided and this is the first filter primitive,
- // then this filter primitive will use SourceGraphic as its input'
- 'in',
- 'in2',
- 'mode',
- ]),
- defaults: {
- mode: 'normal',
- },
- content: new Set(['animate', 'set']),
- },
- feColorMatrix: {
- attrsGroups: new Set(['core', 'presentation', 'filterPrimitive']),
- attrs: new Set(['class', 'style', 'in', 'type', 'values']),
- defaults: {
- type: 'matrix',
- },
- content: new Set(['animate', 'set']),
- },
- feComponentTransfer: {
- attrsGroups: new Set(['core', 'presentation', 'filterPrimitive']),
- attrs: new Set(['class', 'style', 'in']),
- content: new Set(['feFuncA', 'feFuncB', 'feFuncG', 'feFuncR']),
- },
- feComposite: {
- attrsGroups: new Set(['core', 'presentation', 'filterPrimitive']),
- attrs: new Set([
- 'class',
- 'in',
- 'in2',
- 'k1',
- 'k2',
- 'k3',
- 'k4',
- 'operator',
- 'style',
- ]),
- defaults: {
- operator: 'over',
- k1: '0',
- k2: '0',
- k3: '0',
- k4: '0',
- },
- content: new Set(['animate', 'set']),
- },
- feConvolveMatrix: {
- attrsGroups: new Set(['core', 'presentation', 'filterPrimitive']),
- attrs: new Set([
- 'class',
- 'in',
- 'kernelMatrix',
- 'order',
- 'style',
- // TODO: divisor - 'The default value is the sum of all values in kernelMatrix,
- // with the exception that if the sum is zero, then the divisor is set to 1'
- 'bias',
- 'divisor',
- // TODO: targetX - 'By default, the convolution matrix is centered in X over each
- // pixel of the input image (i.e., targetX = floor ( orderX / 2 ))'
- 'edgeMode',
- 'targetX',
- 'targetY',
- // TODO: kernelUnitLength - 'The first number is the <dx> value. The second number
- // is the <dy> value. If the <dy> value is not specified, it defaults to the same value as <dx>'
- 'kernelUnitLength',
- 'preserveAlpha',
- ]),
- defaults: {
- order: '3',
- bias: '0',
- edgeMode: 'duplicate',
- preserveAlpha: 'false',
- },
- content: new Set(['animate', 'set']),
- },
- feDiffuseLighting: {
- attrsGroups: new Set(['core', 'presentation', 'filterPrimitive']),
- attrs: new Set([
- 'class',
- 'diffuseConstant',
- 'in',
- 'kernelUnitLength',
- 'style',
- 'surfaceScale',
- ]),
- defaults: {
- surfaceScale: '1',
- diffuseConstant: '1',
- },
- contentGroups: new Set(['descriptive']),
- content: new Set([
- // TODO: 'exactly one light source element, in any order'
- 'feDistantLight',
- 'fePointLight',
- 'feSpotLight',
- ]),
- },
- feDisplacementMap: {
- attrsGroups: new Set(['core', 'presentation', 'filterPrimitive']),
- attrs: new Set([
- 'class',
- 'in',
- 'in2',
- 'scale',
- 'style',
- 'xChannelSelector',
- 'yChannelSelector',
- ]),
- defaults: {
- scale: '0',
- xChannelSelector: 'A',
- yChannelSelector: 'A',
- },
- content: new Set(['animate', 'set']),
- },
- feDistantLight: {
- attrsGroups: new Set(['core']),
- attrs: new Set(['azimuth', 'elevation']),
- defaults: {
- azimuth: '0',
- elevation: '0',
- },
- content: new Set(['animate', 'set']),
- },
- feFlood: {
- attrsGroups: new Set(['core', 'presentation', 'filterPrimitive']),
- attrs: new Set(['class', 'style']),
- content: new Set(['animate', 'animateColor', 'set']),
- },
- feFuncA: {
- attrsGroups: new Set(['core', 'transferFunction']),
- content: new Set(['set', 'animate']),
- },
- feFuncB: {
- attrsGroups: new Set(['core', 'transferFunction']),
- content: new Set(['set', 'animate']),
- },
- feFuncG: {
- attrsGroups: new Set(['core', 'transferFunction']),
- content: new Set(['set', 'animate']),
- },
- feFuncR: {
- attrsGroups: new Set(['core', 'transferFunction']),
- content: new Set(['set', 'animate']),
- },
- feGaussianBlur: {
- attrsGroups: new Set(['core', 'presentation', 'filterPrimitive']),
- attrs: new Set(['class', 'style', 'in', 'stdDeviation']),
- defaults: {
- stdDeviation: '0',
- },
- content: new Set(['set', 'animate']),
- },
- feImage: {
- attrsGroups: new Set(['core', 'presentation', 'filterPrimitive', 'xlink']),
- attrs: new Set([
- 'class',
- 'externalResourcesRequired',
- 'href',
- 'preserveAspectRatio',
- 'style',
- 'xlink:href',
- ]),
- defaults: {
- preserveAspectRatio: 'xMidYMid meet',
- },
- content: new Set(['animate', 'animateTransform', 'set']),
- },
- feMerge: {
- attrsGroups: new Set(['core', 'presentation', 'filterPrimitive']),
- attrs: new Set(['class', 'style']),
- content: new Set(['feMergeNode']),
- },
- feMergeNode: {
- attrsGroups: new Set(['core']),
- attrs: new Set(['in']),
- content: new Set(['animate', 'set']),
- },
- feMorphology: {
- attrsGroups: new Set(['core', 'presentation', 'filterPrimitive']),
- attrs: new Set(['class', 'style', 'in', 'operator', 'radius']),
- defaults: {
- operator: 'erode',
- radius: '0',
- },
- content: new Set(['animate', 'set']),
- },
- feOffset: {
- attrsGroups: new Set(['core', 'presentation', 'filterPrimitive']),
- attrs: new Set(['class', 'style', 'in', 'dx', 'dy']),
- defaults: {
- dx: '0',
- dy: '0',
- },
- content: new Set(['animate', 'set']),
- },
- fePointLight: {
- attrsGroups: new Set(['core']),
- attrs: new Set(['x', 'y', 'z']),
- defaults: {
- x: '0',
- y: '0',
- z: '0',
- },
- content: new Set(['animate', 'set']),
- },
- feSpecularLighting: {
- attrsGroups: new Set(['core', 'presentation', 'filterPrimitive']),
- attrs: new Set([
- 'class',
- 'in',
- 'kernelUnitLength',
- 'specularConstant',
- 'specularExponent',
- 'style',
- 'surfaceScale',
- ]),
- defaults: {
- surfaceScale: '1',
- specularConstant: '1',
- specularExponent: '1',
- },
- contentGroups: new Set([
- 'descriptive',
- // TODO: exactly one 'light source element'
- 'lightSource',
- ]),
- },
- feSpotLight: {
- attrsGroups: new Set(['core']),
- attrs: new Set([
- 'limitingConeAngle',
- 'pointsAtX',
- 'pointsAtY',
- 'pointsAtZ',
- 'specularExponent',
- 'x',
- 'y',
- 'z',
- ]),
- defaults: {
- x: '0',
- y: '0',
- z: '0',
- pointsAtX: '0',
- pointsAtY: '0',
- pointsAtZ: '0',
- specularExponent: '1',
- },
- content: new Set(['animate', 'set']),
- },
- feTile: {
- attrsGroups: new Set(['core', 'presentation', 'filterPrimitive']),
- attrs: new Set(['class', 'style', 'in']),
- content: new Set(['animate', 'set']),
- },
- feTurbulence: {
- attrsGroups: new Set(['core', 'presentation', 'filterPrimitive']),
- attrs: new Set([
- 'baseFrequency',
- 'class',
- 'numOctaves',
- 'seed',
- 'stitchTiles',
- 'style',
- 'type',
- ]),
- defaults: {
- baseFrequency: '0',
- numOctaves: '1',
- seed: '0',
- stitchTiles: 'noStitch',
- type: 'turbulence',
- },
- content: new Set(['animate', 'set']),
- },
- filter: {
- attrsGroups: new Set(['core', 'presentation', 'xlink']),
- attrs: new Set([
- 'class',
- 'externalResourcesRequired',
- 'filterRes',
- 'filterUnits',
- 'height',
- 'href',
- 'primitiveUnits',
- 'style',
- 'width',
- 'x',
- 'xlink:href',
- 'y',
- ]),
- defaults: {
- primitiveUnits: 'userSpaceOnUse',
- x: '-10%',
- y: '-10%',
- width: '120%',
- height: '120%',
- },
- contentGroups: new Set(['descriptive', 'filterPrimitive']),
- content: new Set(['animate', 'set']),
- },
- font: {
- attrsGroups: new Set(['core', 'presentation']),
- attrs: new Set([
- 'class',
- 'externalResourcesRequired',
- 'horiz-adv-x',
- 'horiz-origin-x',
- 'horiz-origin-y',
- 'style',
- 'vert-adv-y',
- 'vert-origin-x',
- 'vert-origin-y',
- ]),
- defaults: {
- 'horiz-origin-x': '0',
- 'horiz-origin-y': '0',
- },
- contentGroups: new Set(['descriptive']),
- content: new Set(['font-face', 'glyph', 'hkern', 'missing-glyph', 'vkern']),
- },
- 'font-face': {
- attrsGroups: new Set(['core']),
- attrs: new Set([
- 'font-family',
- 'font-style',
- 'font-variant',
- 'font-weight',
- 'font-stretch',
- 'font-size',
- 'unicode-range',
- 'units-per-em',
- 'panose-1',
- 'stemv',
- 'stemh',
- 'slope',
- 'cap-height',
- 'x-height',
- 'accent-height',
- 'ascent',
- 'descent',
- 'widths',
- 'bbox',
- 'ideographic',
- 'alphabetic',
- 'mathematical',
- 'hanging',
- 'v-ideographic',
- 'v-alphabetic',
- 'v-mathematical',
- 'v-hanging',
- 'underline-position',
- 'underline-thickness',
- 'strikethrough-position',
- 'strikethrough-thickness',
- 'overline-position',
- 'overline-thickness',
- ]),
- defaults: {
- 'font-style': 'all',
- 'font-variant': 'normal',
- 'font-weight': 'all',
- 'font-stretch': 'normal',
- 'unicode-range': 'U+0-10FFFF',
- 'units-per-em': '1000',
- 'panose-1': '0 0 0 0 0 0 0 0 0 0',
- slope: '0',
- },
- contentGroups: new Set(['descriptive']),
- content: new Set([
- // TODO: "at most one 'font-face-src' element"
- 'font-face-src',
- ]),
- },
- // TODO: empty content
- 'font-face-format': {
- attrsGroups: new Set(['core']),
- attrs: new Set(['string']),
- },
- 'font-face-name': {
- attrsGroups: new Set(['core']),
- attrs: new Set(['name']),
- },
- 'font-face-src': {
- attrsGroups: new Set(['core']),
- content: new Set(['font-face-name', 'font-face-uri']),
- },
- 'font-face-uri': {
- attrsGroups: new Set(['core', 'xlink']),
- attrs: new Set(['href', 'xlink:href']),
- content: new Set(['font-face-format']),
- },
- foreignObject: {
- attrsGroups: new Set([
- 'conditionalProcessing',
- 'core',
- 'graphicalEvent',
- 'presentation',
- ]),
- attrs: new Set([
- 'class',
- 'externalResourcesRequired',
- 'height',
- 'style',
- 'transform',
- 'width',
- 'x',
- 'y',
- ]),
- defaults: {
- x: '0',
- y: '0',
- },
- },
- g: {
- attrsGroups: new Set([
- 'conditionalProcessing',
- 'core',
- 'graphicalEvent',
- 'presentation',
- ]),
- attrs: new Set([
- 'class',
- 'externalResourcesRequired',
- 'style',
- 'transform',
- ]),
- contentGroups: new Set([
- 'animation',
- 'descriptive',
- 'paintServer',
- 'shape',
- 'structural',
- ]),
- content: new Set([
- 'a',
- 'altGlyphDef',
- 'clipPath',
- 'color-profile',
- 'cursor',
- 'filter',
- 'font-face',
- 'font',
- 'foreignObject',
- 'image',
- 'marker',
- 'mask',
- 'pattern',
- 'script',
- 'style',
- 'switch',
- 'text',
- 'view',
- ]),
- },
- glyph: {
- attrsGroups: new Set(['core', 'presentation']),
- attrs: new Set([
- 'arabic-form',
- 'class',
- 'd',
- 'glyph-name',
- 'horiz-adv-x',
- 'lang',
- 'orientation',
- 'style',
- 'unicode',
- 'vert-adv-y',
- 'vert-origin-x',
- 'vert-origin-y',
- ]),
- defaults: {
- 'arabic-form': 'initial',
- },
- contentGroups: new Set([
- 'animation',
- 'descriptive',
- 'paintServer',
- 'shape',
- 'structural',
- ]),
- content: new Set([
- 'a',
- 'altGlyphDef',
- 'clipPath',
- 'color-profile',
- 'cursor',
- 'filter',
- 'font-face',
- 'font',
- 'foreignObject',
- 'image',
- 'marker',
- 'mask',
- 'pattern',
- 'script',
- 'style',
- 'switch',
- 'text',
- 'view',
- ]),
- },
- glyphRef: {
- attrsGroups: new Set(['core', 'presentation']),
- attrs: new Set([
- 'class',
- 'd',
- 'horiz-adv-x',
- 'style',
- 'vert-adv-y',
- 'vert-origin-x',
- 'vert-origin-y',
- ]),
- contentGroups: new Set([
- 'animation',
- 'descriptive',
- 'paintServer',
- 'shape',
- 'structural',
- ]),
- content: new Set([
- 'a',
- 'altGlyphDef',
- 'clipPath',
- 'color-profile',
- 'cursor',
- 'filter',
- 'font-face',
- 'font',
- 'foreignObject',
- 'image',
- 'marker',
- 'mask',
- 'pattern',
- 'script',
- 'style',
- 'switch',
- 'text',
- 'view',
- ]),
- },
- hatch: {
- attrsGroups: new Set(['core', 'presentation', 'xlink']),
- attrs: new Set([
- 'class',
- 'hatchContentUnits',
- 'hatchUnits',
- 'pitch',
- 'rotate',
- 'style',
- 'transform',
- 'x',
- 'y',
- ]),
- defaults: {
- hatchUnits: 'objectBoundingBox',
- hatchContentUnits: 'userSpaceOnUse',
- x: '0',
- y: '0',
- pitch: '0',
- rotate: '0',
- },
- contentGroups: new Set(['animation', 'descriptive']),
- content: new Set(['hatchPath']),
- },
- hatchPath: {
- attrsGroups: new Set(['core', 'presentation', 'xlink']),
- attrs: new Set(['class', 'style', 'd', 'offset']),
- defaults: {
- offset: '0',
- },
- contentGroups: new Set(['animation', 'descriptive']),
- },
- hkern: {
- attrsGroups: new Set(['core']),
- attrs: new Set(['u1', 'g1', 'u2', 'g2', 'k']),
- },
- image: {
- attrsGroups: new Set([
- 'conditionalProcessing',
- 'core',
- 'graphicalEvent',
- 'presentation',
- 'xlink',
- ]),
- attrs: new Set([
- 'class',
- 'externalResourcesRequired',
- 'height',
- 'href',
- 'preserveAspectRatio',
- 'style',
- 'transform',
- 'width',
- 'x',
- 'xlink:href',
- 'y',
- ]),
- defaults: {
- x: '0',
- y: '0',
- preserveAspectRatio: 'xMidYMid meet',
- },
- contentGroups: new Set(['animation', 'descriptive']),
- },
- line: {
- attrsGroups: new Set([
- 'conditionalProcessing',
- 'core',
- 'graphicalEvent',
- 'presentation',
- ]),
- attrs: new Set([
- 'class',
- 'externalResourcesRequired',
- 'style',
- 'transform',
- 'x1',
- 'x2',
- 'y1',
- 'y2',
- ]),
- defaults: {
- x1: '0',
- y1: '0',
- x2: '0',
- y2: '0',
- },
- contentGroups: new Set(['animation', 'descriptive']),
- },
- linearGradient: {
- attrsGroups: new Set(['core', 'presentation', 'xlink']),
- attrs: new Set([
- 'class',
- 'externalResourcesRequired',
- 'gradientTransform',
- 'gradientUnits',
- 'href',
- 'spreadMethod',
- 'style',
- 'x1',
- 'x2',
- 'xlink:href',
- 'y1',
- 'y2',
- ]),
- defaults: {
- x1: '0',
- y1: '0',
- x2: '100%',
- y2: '0',
- spreadMethod: 'pad',
- },
- contentGroups: new Set(['descriptive']),
- content: new Set(['animate', 'animateTransform', 'set', 'stop']),
- },
- marker: {
- attrsGroups: new Set(['core', 'presentation']),
- attrs: new Set([
- 'class',
- 'externalResourcesRequired',
- 'markerHeight',
- 'markerUnits',
- 'markerWidth',
- 'orient',
- 'preserveAspectRatio',
- 'refX',
- 'refY',
- 'style',
- 'viewBox',
- ]),
- defaults: {
- markerUnits: 'strokeWidth',
- refX: '0',
- refY: '0',
- markerWidth: '3',
- markerHeight: '3',
- },
- contentGroups: new Set([
- 'animation',
- 'descriptive',
- 'paintServer',
- 'shape',
- 'structural',
- ]),
- content: new Set([
- 'a',
- 'altGlyphDef',
- 'clipPath',
- 'color-profile',
- 'cursor',
- 'filter',
- 'font-face',
- 'font',
- 'foreignObject',
- 'image',
- 'marker',
- 'mask',
- 'pattern',
- 'script',
- 'style',
- 'switch',
- 'text',
- 'view',
- ]),
- },
- mask: {
- attrsGroups: new Set(['conditionalProcessing', 'core', 'presentation']),
- attrs: new Set([
- 'class',
- 'externalResourcesRequired',
- 'height',
- 'mask-type',
- 'maskContentUnits',
- 'maskUnits',
- 'style',
- 'width',
- 'x',
- 'y',
- ]),
- defaults: {
- maskUnits: 'objectBoundingBox',
- maskContentUnits: 'userSpaceOnUse',
- x: '-10%',
- y: '-10%',
- width: '120%',
- height: '120%',
- },
- contentGroups: new Set([
- 'animation',
- 'descriptive',
- 'paintServer',
- 'shape',
- 'structural',
- ]),
- content: new Set([
- 'a',
- 'altGlyphDef',
- 'clipPath',
- 'color-profile',
- 'cursor',
- 'filter',
- 'font-face',
- 'font',
- 'foreignObject',
- 'image',
- 'marker',
- 'mask',
- 'pattern',
- 'script',
- 'style',
- 'switch',
- 'text',
- 'view',
- ]),
- },
- metadata: {
- attrsGroups: new Set(['core']),
- },
- 'missing-glyph': {
- attrsGroups: new Set(['core', 'presentation']),
- attrs: new Set([
- 'class',
- 'd',
- 'horiz-adv-x',
- 'style',
- 'vert-adv-y',
- 'vert-origin-x',
- 'vert-origin-y',
- ]),
- contentGroups: new Set([
- 'animation',
- 'descriptive',
- 'paintServer',
- 'shape',
- 'structural',
- ]),
- content: new Set([
- 'a',
- 'altGlyphDef',
- 'clipPath',
- 'color-profile',
- 'cursor',
- 'filter',
- 'font-face',
- 'font',
- 'foreignObject',
- 'image',
- 'marker',
- 'mask',
- 'pattern',
- 'script',
- 'style',
- 'switch',
- 'text',
- 'view',
- ]),
- },
- mpath: {
- attrsGroups: new Set(['core', 'xlink']),
- attrs: new Set(['externalResourcesRequired', 'href', 'xlink:href']),
- contentGroups: new Set(['descriptive']),
- },
- path: {
- attrsGroups: new Set([
- 'conditionalProcessing',
- 'core',
- 'graphicalEvent',
- 'presentation',
- ]),
- attrs: new Set([
- 'class',
- 'd',
- 'externalResourcesRequired',
- 'pathLength',
- 'style',
- 'transform',
- ]),
- contentGroups: new Set(['animation', 'descriptive']),
- },
- pattern: {
- attrsGroups: new Set([
- 'conditionalProcessing',
- 'core',
- 'presentation',
- 'xlink',
- ]),
- attrs: new Set([
- 'class',
- 'externalResourcesRequired',
- 'height',
- 'href',
- 'patternContentUnits',
- 'patternTransform',
- 'patternUnits',
- 'preserveAspectRatio',
- 'style',
- 'viewBox',
- 'width',
- 'x',
- 'xlink:href',
- 'y',
- ]),
- defaults: {
- patternUnits: 'objectBoundingBox',
- patternContentUnits: 'userSpaceOnUse',
- x: '0',
- y: '0',
- width: '0',
- height: '0',
- preserveAspectRatio: 'xMidYMid meet',
- },
- contentGroups: new Set([
- 'animation',
- 'descriptive',
- 'paintServer',
- 'shape',
- 'structural',
- ]),
- content: new Set([
- 'a',
- 'altGlyphDef',
- 'clipPath',
- 'color-profile',
- 'cursor',
- 'filter',
- 'font-face',
- 'font',
- 'foreignObject',
- 'image',
- 'marker',
- 'mask',
- 'pattern',
- 'script',
- 'style',
- 'switch',
- 'text',
- 'view',
- ]),
- },
- polygon: {
- attrsGroups: new Set([
- 'conditionalProcessing',
- 'core',
- 'graphicalEvent',
- 'presentation',
- ]),
- attrs: new Set([
- 'class',
- 'externalResourcesRequired',
- 'points',
- 'style',
- 'transform',
- ]),
- contentGroups: new Set(['animation', 'descriptive']),
- },
- polyline: {
- attrsGroups: new Set([
- 'conditionalProcessing',
- 'core',
- 'graphicalEvent',
- 'presentation',
- ]),
- attrs: new Set([
- 'class',
- 'externalResourcesRequired',
- 'points',
- 'style',
- 'transform',
- ]),
- contentGroups: new Set(['animation', 'descriptive']),
- },
- radialGradient: {
- attrsGroups: new Set(['core', 'presentation', 'xlink']),
- attrs: new Set([
- 'class',
- 'cx',
- 'cy',
- 'externalResourcesRequired',
- 'fr',
- 'fx',
- 'fy',
- 'gradientTransform',
- 'gradientUnits',
- 'href',
- 'r',
- 'spreadMethod',
- 'style',
- 'xlink:href',
- ]),
- defaults: {
- gradientUnits: 'objectBoundingBox',
- cx: '50%',
- cy: '50%',
- r: '50%',
- },
- contentGroups: new Set(['descriptive']),
- content: new Set(['animate', 'animateTransform', 'set', 'stop']),
- },
- meshGradient: {
- attrsGroups: new Set(['core', 'presentation', 'xlink']),
- attrs: new Set(['class', 'style', 'x', 'y', 'gradientUnits', 'transform']),
- contentGroups: new Set(['descriptive', 'paintServer', 'animation']),
- content: new Set(['meshRow']),
- },
- meshRow: {
- attrsGroups: new Set(['core', 'presentation']),
- attrs: new Set(['class', 'style']),
- contentGroups: new Set(['descriptive']),
- content: new Set(['meshPatch']),
- },
- meshPatch: {
- attrsGroups: new Set(['core', 'presentation']),
- attrs: new Set(['class', 'style']),
- contentGroups: new Set(['descriptive']),
- content: new Set(['stop']),
- },
- rect: {
- attrsGroups: new Set([
- 'conditionalProcessing',
- 'core',
- 'graphicalEvent',
- 'presentation',
- ]),
- attrs: new Set([
- 'class',
- 'externalResourcesRequired',
- 'height',
- 'rx',
- 'ry',
- 'style',
- 'transform',
- 'width',
- 'x',
- 'y',
- ]),
- defaults: {
- x: '0',
- y: '0',
- },
- contentGroups: new Set(['animation', 'descriptive']),
- },
- script: {
- attrsGroups: new Set(['core', 'xlink']),
- attrs: new Set(['externalResourcesRequired', 'type', 'href', 'xlink:href']),
- },
- set: {
- attrsGroups: new Set([
- 'animation',
- 'animationAttributeTarget',
- 'animationTiming',
- 'conditionalProcessing',
- 'core',
- 'xlink',
- ]),
- attrs: new Set(['externalResourcesRequired', 'to']),
- contentGroups: new Set(['descriptive']),
- },
- solidColor: {
- attrsGroups: new Set(['core', 'presentation']),
- attrs: new Set(['class', 'style']),
- contentGroups: new Set(['paintServer']),
- },
- stop: {
- attrsGroups: new Set(['core', 'presentation']),
- attrs: new Set(['class', 'style', 'offset', 'path']),
- content: new Set(['animate', 'animateColor', 'set']),
- },
- style: {
- attrsGroups: new Set(['core']),
- attrs: new Set(['type', 'media', 'title']),
- defaults: {
- type: 'text/css',
- },
- },
- svg: {
- attrsGroups: new Set([
- 'conditionalProcessing',
- 'core',
- 'documentEvent',
- 'graphicalEvent',
- 'presentation',
- ]),
- attrs: new Set([
- 'baseProfile',
- 'class',
- 'contentScriptType',
- 'contentStyleType',
- 'height',
- 'preserveAspectRatio',
- 'style',
- 'version',
- 'viewBox',
- 'width',
- 'x',
- 'y',
- 'zoomAndPan',
- ]),
- defaults: {
- x: '0',
- y: '0',
- width: '100%',
- height: '100%',
- preserveAspectRatio: 'xMidYMid meet',
- zoomAndPan: 'magnify',
- version: '1.1',
- baseProfile: 'none',
- contentScriptType: 'application/ecmascript',
- contentStyleType: 'text/css',
- },
- contentGroups: new Set([
- 'animation',
- 'descriptive',
- 'paintServer',
- 'shape',
- 'structural',
- ]),
- content: new Set([
- 'a',
- 'altGlyphDef',
- 'clipPath',
- 'color-profile',
- 'cursor',
- 'filter',
- 'font-face',
- 'font',
- 'foreignObject',
- 'image',
- 'marker',
- 'mask',
- 'pattern',
- 'script',
- 'style',
- 'switch',
- 'text',
- 'view',
- ]),
- },
- switch: {
- attrsGroups: new Set([
- 'conditionalProcessing',
- 'core',
- 'graphicalEvent',
- 'presentation',
- ]),
- attrs: new Set([
- 'class',
- 'externalResourcesRequired',
- 'style',
- 'transform',
- ]),
- contentGroups: new Set(['animation', 'descriptive', 'shape']),
- content: new Set([
- 'a',
- 'foreignObject',
- 'g',
- 'image',
- 'svg',
- 'switch',
- 'text',
- 'use',
- ]),
- },
- symbol: {
- attrsGroups: new Set(['core', 'graphicalEvent', 'presentation']),
- attrs: new Set([
- 'class',
- 'externalResourcesRequired',
- 'preserveAspectRatio',
- 'refX',
- 'refY',
- 'style',
- 'viewBox',
- ]),
- defaults: {
- refX: '0',
- refY: '0',
- },
- contentGroups: new Set([
- 'animation',
- 'descriptive',
- 'paintServer',
- 'shape',
- 'structural',
- ]),
- content: new Set([
- 'a',
- 'altGlyphDef',
- 'clipPath',
- 'color-profile',
- 'cursor',
- 'filter',
- 'font-face',
- 'font',
- 'foreignObject',
- 'image',
- 'marker',
- 'mask',
- 'pattern',
- 'script',
- 'style',
- 'switch',
- 'text',
- 'view',
- ]),
- },
- text: {
- attrsGroups: new Set([
- 'conditionalProcessing',
- 'core',
- 'graphicalEvent',
- 'presentation',
- ]),
- attrs: new Set([
- 'class',
- 'dx',
- 'dy',
- 'externalResourcesRequired',
- 'lengthAdjust',
- 'rotate',
- 'style',
- 'textLength',
- 'transform',
- 'x',
- 'y',
- ]),
- defaults: {
- x: '0',
- y: '0',
- lengthAdjust: 'spacing',
- },
- contentGroups: new Set(['animation', 'descriptive', 'textContentChild']),
- content: new Set(['a']),
- },
- textPath: {
- attrsGroups: new Set([
- 'conditionalProcessing',
- 'core',
- 'graphicalEvent',
- 'presentation',
- 'xlink',
- ]),
- attrs: new Set([
- 'class',
- 'd',
- 'externalResourcesRequired',
- 'href',
- 'method',
- 'spacing',
- 'startOffset',
- 'style',
- 'xlink:href',
- ]),
- defaults: {
- startOffset: '0',
- method: 'align',
- spacing: 'exact',
- },
- contentGroups: new Set(['descriptive']),
- content: new Set([
- 'a',
- 'altGlyph',
- 'animate',
- 'animateColor',
- 'set',
- 'tref',
- 'tspan',
- ]),
- },
- title: {
- attrsGroups: new Set(['core']),
- attrs: new Set(['class', 'style']),
- },
- tref: {
- attrsGroups: new Set([
- 'conditionalProcessing',
- 'core',
- 'graphicalEvent',
- 'presentation',
- 'xlink',
- ]),
- attrs: new Set([
- 'class',
- 'externalResourcesRequired',
- 'href',
- 'style',
- 'xlink:href',
- ]),
- contentGroups: new Set(['descriptive']),
- content: new Set(['animate', 'animateColor', 'set']),
- },
- tspan: {
- attrsGroups: new Set([
- 'conditionalProcessing',
- 'core',
- 'graphicalEvent',
- 'presentation',
- ]),
- attrs: new Set([
- 'class',
- 'dx',
- 'dy',
- 'externalResourcesRequired',
- 'lengthAdjust',
- 'rotate',
- 'style',
- 'textLength',
- 'x',
- 'y',
- ]),
- contentGroups: new Set(['descriptive']),
- content: new Set([
- 'a',
- 'altGlyph',
- 'animate',
- 'animateColor',
- 'set',
- 'tref',
- 'tspan',
- ]),
- },
- use: {
- attrsGroups: new Set([
- 'conditionalProcessing',
- 'core',
- 'graphicalEvent',
- 'presentation',
- 'xlink',
- ]),
- attrs: new Set([
- 'class',
- 'externalResourcesRequired',
- 'height',
- 'href',
- 'style',
- 'transform',
- 'width',
- 'x',
- 'xlink:href',
- 'y',
- ]),
- defaults: {
- x: '0',
- y: '0',
- },
- contentGroups: new Set(['animation', 'descriptive']),
- },
- view: {
- attrsGroups: new Set(['core']),
- attrs: new Set([
- 'externalResourcesRequired',
- 'preserveAspectRatio',
- 'viewBox',
- 'viewTarget',
- 'zoomAndPan',
- ]),
- contentGroups: new Set(['descriptive']),
- },
- vkern: {
- attrsGroups: new Set(['core']),
- attrs: new Set(['u1', 'g1', 'u2', 'g2', 'k']),
- },
-};
-
-// https://wiki.inkscape.org/wiki/index.php/Inkscape-specific_XML_attributes
-exports.editorNamespaces = new Set([
- 'http://creativecommons.org/ns#',
- 'http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd',
- 'http://ns.adobe.com/AdobeIllustrator/10.0/',
- 'http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/',
- 'http://ns.adobe.com/Extensibility/1.0/',
- 'http://ns.adobe.com/Flows/1.0/',
- 'http://ns.adobe.com/GenericCustomNamespace/1.0/',
- 'http://ns.adobe.com/Graphs/1.0/',
- 'http://ns.adobe.com/ImageReplacement/1.0/',
- 'http://ns.adobe.com/SaveForWeb/1.0/',
- 'http://ns.adobe.com/Variables/1.0/',
- 'http://ns.adobe.com/XPath/1.0/',
- 'http://purl.org/dc/elements/1.1/',
- 'http://schemas.microsoft.com/visio/2003/SVGExtensions/',
- 'http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd',
- 'http://taptrix.com/vectorillustrator/svg_extensions',
- 'http://www.bohemiancoding.com/sketch/ns',
- 'http://www.figma.com/figma/ns',
- 'http://www.inkscape.org/namespaces/inkscape',
- 'http://www.serif.com/',
- 'http://www.vector.evaxdesign.sk',
- 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
-]);
-
-/**
- * @see https://www.w3.org/TR/SVG11/linking.html#processingIRI
- */
-exports.referencesProps = new Set([
- 'clip-path',
- 'color-profile',
- 'fill',
- 'filter',
- 'marker-end',
- 'marker-mid',
- 'marker-start',
- 'mask',
- 'stroke',
- 'style',
-]);
-
-/**
- * @see https://www.w3.org/TR/SVG11/propidx.html
- */
-exports.inheritableAttrs = new Set([
- 'clip-rule',
- 'color-interpolation-filters',
- 'color-interpolation',
- 'color-profile',
- 'color-rendering',
- 'color',
- 'cursor',
- 'direction',
- 'dominant-baseline',
- 'fill-opacity',
- 'fill-rule',
- 'fill',
- 'font-family',
- 'font-size-adjust',
- 'font-size',
- 'font-stretch',
- 'font-style',
- 'font-variant',
- 'font-weight',
- 'font',
- 'glyph-orientation-horizontal',
- 'glyph-orientation-vertical',
- 'image-rendering',
- 'letter-spacing',
- 'marker-end',
- 'marker-mid',
- 'marker-start',
- 'marker',
- 'paint-order',
- 'pointer-events',
- 'shape-rendering',
- 'stroke-dasharray',
- 'stroke-dashoffset',
- 'stroke-linecap',
- 'stroke-linejoin',
- 'stroke-miterlimit',
- 'stroke-opacity',
- 'stroke-width',
- 'stroke',
- 'text-anchor',
- 'text-rendering',
- 'transform',
- 'visibility',
- 'word-spacing',
- 'writing-mode',
-]);
-
-exports.presentationNonInheritableGroupAttrs = new Set([
- 'clip-path',
- 'display',
- 'filter',
- 'mask',
- 'opacity',
- 'text-decoration',
- 'transform',
- 'unicode-bidi',
-]);
-
-/**
- * https://www.w3.org/TR/SVG11/single-page.html#types-ColorKeywords
- *
- * @type {Record<string, string>}
- */
-exports.colorsNames = {
- aliceblue: '#f0f8ff',
- antiquewhite: '#faebd7',
- aqua: '#0ff',
- aquamarine: '#7fffd4',
- azure: '#f0ffff',
- beige: '#f5f5dc',
- bisque: '#ffe4c4',
- black: '#000',
- blanchedalmond: '#ffebcd',
- blue: '#00f',
- blueviolet: '#8a2be2',
- brown: '#a52a2a',
- burlywood: '#deb887',
- cadetblue: '#5f9ea0',
- chartreuse: '#7fff00',
- chocolate: '#d2691e',
- coral: '#ff7f50',
- cornflowerblue: '#6495ed',
- cornsilk: '#fff8dc',
- crimson: '#dc143c',
- cyan: '#0ff',
- darkblue: '#00008b',
- darkcyan: '#008b8b',
- darkgoldenrod: '#b8860b',
- darkgray: '#a9a9a9',
- darkgreen: '#006400',
- darkgrey: '#a9a9a9',
- darkkhaki: '#bdb76b',
- darkmagenta: '#8b008b',
- darkolivegreen: '#556b2f',
- darkorange: '#ff8c00',
- darkorchid: '#9932cc',
- darkred: '#8b0000',
- darksalmon: '#e9967a',
- darkseagreen: '#8fbc8f',
- darkslateblue: '#483d8b',
- darkslategray: '#2f4f4f',
- darkslategrey: '#2f4f4f',
- darkturquoise: '#00ced1',
- darkviolet: '#9400d3',
- deeppink: '#ff1493',
- deepskyblue: '#00bfff',
- dimgray: '#696969',
- dimgrey: '#696969',
- dodgerblue: '#1e90ff',
- firebrick: '#b22222',
- floralwhite: '#fffaf0',
- forestgreen: '#228b22',
- fuchsia: '#f0f',
- gainsboro: '#dcdcdc',
- ghostwhite: '#f8f8ff',
- gold: '#ffd700',
- goldenrod: '#daa520',
- gray: '#808080',
- green: '#008000',
- greenyellow: '#adff2f',
- grey: '#808080',
- honeydew: '#f0fff0',
- hotpink: '#ff69b4',
- indianred: '#cd5c5c',
- indigo: '#4b0082',
- ivory: '#fffff0',
- khaki: '#f0e68c',
- lavender: '#e6e6fa',
- lavenderblush: '#fff0f5',
- lawngreen: '#7cfc00',
- lemonchiffon: '#fffacd',
- lightblue: '#add8e6',
- lightcoral: '#f08080',
- lightcyan: '#e0ffff',
- lightgoldenrodyellow: '#fafad2',
- lightgray: '#d3d3d3',
- lightgreen: '#90ee90',
- lightgrey: '#d3d3d3',
- lightpink: '#ffb6c1',
- lightsalmon: '#ffa07a',
- lightseagreen: '#20b2aa',
- lightskyblue: '#87cefa',
- lightslategray: '#789',
- lightslategrey: '#789',
- lightsteelblue: '#b0c4de',
- lightyellow: '#ffffe0',
- lime: '#0f0',
- limegreen: '#32cd32',
- linen: '#faf0e6',
- magenta: '#f0f',
- maroon: '#800000',
- mediumaquamarine: '#66cdaa',
- mediumblue: '#0000cd',
- mediumorchid: '#ba55d3',
- mediumpurple: '#9370db',
- mediumseagreen: '#3cb371',
- mediumslateblue: '#7b68ee',
- mediumspringgreen: '#00fa9a',
- mediumturquoise: '#48d1cc',
- mediumvioletred: '#c71585',
- midnightblue: '#191970',
- mintcream: '#f5fffa',
- mistyrose: '#ffe4e1',
- moccasin: '#ffe4b5',
- navajowhite: '#ffdead',
- navy: '#000080',
- oldlace: '#fdf5e6',
- olive: '#808000',
- olivedrab: '#6b8e23',
- orange: '#ffa500',
- orangered: '#ff4500',
- orchid: '#da70d6',
- palegoldenrod: '#eee8aa',
- palegreen: '#98fb98',
- paleturquoise: '#afeeee',
- palevioletred: '#db7093',
- papayawhip: '#ffefd5',
- peachpuff: '#ffdab9',
- peru: '#cd853f',
- pink: '#ffc0cb',
- plum: '#dda0dd',
- powderblue: '#b0e0e6',
- purple: '#800080',
- rebeccapurple: '#639',
- red: '#f00',
- rosybrown: '#bc8f8f',
- royalblue: '#4169e1',
- saddlebrown: '#8b4513',
- salmon: '#fa8072',
- sandybrown: '#f4a460',
- seagreen: '#2e8b57',
- seashell: '#fff5ee',
- sienna: '#a0522d',
- silver: '#c0c0c0',
- skyblue: '#87ceeb',
- slateblue: '#6a5acd',
- slategray: '#708090',
- slategrey: '#708090',
- snow: '#fffafa',
- springgreen: '#00ff7f',
- steelblue: '#4682b4',
- tan: '#d2b48c',
- teal: '#008080',
- thistle: '#d8bfd8',
- tomato: '#ff6347',
- turquoise: '#40e0d0',
- violet: '#ee82ee',
- wheat: '#f5deb3',
- white: '#fff',
- whitesmoke: '#f5f5f5',
- yellow: '#ff0',
- yellowgreen: '#9acd32',
-};
-
-/**
- * @type {Record<string, string>}
- */
-exports.colorsShortNames = {
- '#f0ffff': 'azure',
- '#f5f5dc': 'beige',
- '#ffe4c4': 'bisque',
- '#a52a2a': 'brown',
- '#ff7f50': 'coral',
- '#ffd700': 'gold',
- '#808080': 'gray',
- '#008000': 'green',
- '#4b0082': 'indigo',
- '#fffff0': 'ivory',
- '#f0e68c': 'khaki',
- '#faf0e6': 'linen',
- '#800000': 'maroon',
- '#000080': 'navy',
- '#808000': 'olive',
- '#ffa500': 'orange',
- '#da70d6': 'orchid',
- '#cd853f': 'peru',
- '#ffc0cb': 'pink',
- '#dda0dd': 'plum',
- '#800080': 'purple',
- '#f00': 'red',
- '#ff0000': 'red',
- '#fa8072': 'salmon',
- '#a0522d': 'sienna',
- '#c0c0c0': 'silver',
- '#fffafa': 'snow',
- '#d2b48c': 'tan',
- '#008080': 'teal',
- '#ff6347': 'tomato',
- '#ee82ee': 'violet',
- '#f5deb3': 'wheat',
-};
-
-/**
- * @see https://www.w3.org/TR/SVG11/single-page.html#types-DataTypeColor
- */
-exports.colorsProps = new Set([
- 'color',
- 'fill',
- 'flood-color',
- 'lighting-color',
- 'stop-color',
- 'stroke',
-]);
-
-/** @see https://developer.mozilla.org/docs/Web/CSS/Pseudo-classes */
-exports.pseudoClasses = {
- displayState: new Set(['fullscreen', 'modal', 'picture-in-picture']),
- input: new Set([
- 'autofill',
- 'blank',
- 'checked',
- 'default',
- 'disabled',
- 'enabled',
- 'in-range',
- 'indetermined',
- 'invalid',
- 'optional',
- 'out-of-range',
- 'placeholder-shown',
- 'read-only',
- 'read-write',
- 'required',
- 'user-invalid',
- 'valid',
- ]),
- linguistic: new Set(['dir', 'lang']),
- location: new Set([
- 'any-link',
- 'link',
- 'local-link',
- 'scope',
- 'target-within',
- 'target',
- 'visited',
- ]),
- resourceState: new Set(['playing', 'paused']),
- timeDimensional: new Set(['current', 'past', 'future']),
- treeStructural: new Set([
- 'empty',
- 'first-child',
- 'first-of-type',
- 'last-child',
- 'last-of-type',
- 'nth-child',
- 'nth-last-child',
- 'nth-last-of-type',
- 'nth-of-type',
- 'only-child',
- 'only-of-type',
- 'root',
- ]),
- userAction: new Set([
- 'active',
- 'focus-visible',
- 'focus-within',
- 'focus',
- 'hover',
- ]),
- functional: new Set(['is', 'not', 'where', 'has']),
-};
diff --git a/node_modules/svgo/plugins/_path.js b/node_modules/svgo/plugins/_path.js
deleted file mode 100644
index 7c3a28b9..00000000
--- a/node_modules/svgo/plugins/_path.js
+++ /dev/null
@@ -1,815 +0,0 @@
-'use strict';
-
-/**
- * @typedef {import('../lib/types').XastElement} XastElement
- * @typedef {import('../lib/types').PathDataItem} PathDataItem
- */
-
-const { parsePathData, stringifyPathData } = require('../lib/path.js');
-
-/**
- * @type {[number, number]}
- */
-var prevCtrlPoint;
-
-/**
- * Convert path string to JS representation.
- *
- * @type {(path: XastElement) => PathDataItem[]}
- */
-const path2js = (path) => {
- // @ts-ignore legacy
- if (path.pathJS) return path.pathJS;
- /**
- * @type {PathDataItem[]}
- */
- const pathData = []; // JS representation of the path data
- const newPathData = parsePathData(path.attributes.d);
- for (const { command, args } of newPathData) {
- pathData.push({ command, args });
- }
- // First moveto is actually absolute. Subsequent coordinates were separated above.
- if (pathData.length && pathData[0].command == 'm') {
- pathData[0].command = 'M';
- }
- // @ts-ignore legacy
- path.pathJS = pathData;
- return pathData;
-};
-exports.path2js = path2js;
-
-/**
- * Convert relative Path data to absolute.
- *
- * @type {(data: PathDataItem[]) => PathDataItem[]}
- *
- */
-const convertRelativeToAbsolute = (data) => {
- /**
- * @type {PathDataItem[]}
- */
- const newData = [];
- let start = [0, 0];
- let cursor = [0, 0];
-
- for (let { command, args } of data) {
- args = args.slice();
-
- // moveto (x y)
- if (command === 'm') {
- args[0] += cursor[0];
- args[1] += cursor[1];
- command = 'M';
- }
- if (command === 'M') {
- cursor[0] = args[0];
- cursor[1] = args[1];
- start[0] = cursor[0];
- start[1] = cursor[1];
- }
-
- // horizontal lineto (x)
- if (command === 'h') {
- args[0] += cursor[0];
- command = 'H';
- }
- if (command === 'H') {
- cursor[0] = args[0];
- }
-
- // vertical lineto (y)
- if (command === 'v') {
- args[0] += cursor[1];
- command = 'V';
- }
- if (command === 'V') {
- cursor[1] = args[0];
- }
-
- // lineto (x y)
- if (command === 'l') {
- args[0] += cursor[0];
- args[1] += cursor[1];
- command = 'L';
- }
- if (command === 'L') {
- cursor[0] = args[0];
- cursor[1] = args[1];
- }
-
- // curveto (x1 y1 x2 y2 x y)
- if (command === 'c') {
- args[0] += cursor[0];
- args[1] += cursor[1];
- args[2] += cursor[0];
- args[3] += cursor[1];
- args[4] += cursor[0];
- args[5] += cursor[1];
- command = 'C';
- }
- if (command === 'C') {
- cursor[0] = args[4];
- cursor[1] = args[5];
- }
-
- // smooth curveto (x2 y2 x y)
- if (command === 's') {
- args[0] += cursor[0];
- args[1] += cursor[1];
- args[2] += cursor[0];
- args[3] += cursor[1];
- command = 'S';
- }
- if (command === 'S') {
- cursor[0] = args[2];
- cursor[1] = args[3];
- }
-
- // quadratic Bézier curveto (x1 y1 x y)
- if (command === 'q') {
- args[0] += cursor[0];
- args[1] += cursor[1];
- args[2] += cursor[0];
- args[3] += cursor[1];
- command = 'Q';
- }
- if (command === 'Q') {
- cursor[0] = args[2];
- cursor[1] = args[3];
- }
-
- // smooth quadratic Bézier curveto (x y)
- if (command === 't') {
- args[0] += cursor[0];
- args[1] += cursor[1];
- command = 'T';
- }
- if (command === 'T') {
- cursor[0] = args[0];
- cursor[1] = args[1];
- }
-
- // elliptical arc (rx ry x-axis-rotation large-arc-flag sweep-flag x y)
- if (command === 'a') {
- args[5] += cursor[0];
- args[6] += cursor[1];
- command = 'A';
- }
- if (command === 'A') {
- cursor[0] = args[5];
- cursor[1] = args[6];
- }
-
- // closepath
- if (command === 'z' || command === 'Z') {
- cursor[0] = start[0];
- cursor[1] = start[1];
- command = 'z';
- }
-
- newData.push({ command, args });
- }
- return newData;
-};
-
-/**
- * @typedef {{ floatPrecision?: number, noSpaceAfterFlags?: boolean }} Js2PathParams
- */
-
-/**
- * Convert path array to string.
- *
- * @type {(path: XastElement, data: PathDataItem[], params: Js2PathParams) => void}
- */
-exports.js2path = function (path, data, params) {
- // @ts-ignore legacy
- path.pathJS = data;
-
- const pathData = [];
- for (const item of data) {
- // remove moveto commands which are followed by moveto commands
- if (
- pathData.length !== 0 &&
- (item.command === 'M' || item.command === 'm')
- ) {
- const last = pathData[pathData.length - 1];
- if (last.command === 'M' || last.command === 'm') {
- pathData.pop();
- }
- }
- pathData.push({
- command: item.command,
- args: item.args,
- });
- }
-
- path.attributes.d = stringifyPathData({
- pathData,
- precision: params.floatPrecision,
- disableSpaceAfterFlags: params.noSpaceAfterFlags,
- });
-};
-
-/**
- * @type {(dest: number[], source: number[]) => number[]}
- */
-function set(dest, source) {
- dest[0] = source[source.length - 2];
- dest[1] = source[source.length - 1];
- return dest;
-}
-
-/**
- * Checks if two paths have an intersection by checking convex hulls
- * collision using Gilbert-Johnson-Keerthi distance algorithm
- * https://web.archive.org/web/20180822200027/http://entropyinteractive.com/2011/04/gjk-algorithm/
- *
- * @type {(path1: PathDataItem[], path2: PathDataItem[]) => boolean}
- */
-exports.intersects = function (path1, path2) {
- // Collect points of every subpath.
- const points1 = gatherPoints(convertRelativeToAbsolute(path1));
- const points2 = gatherPoints(convertRelativeToAbsolute(path2));
-
- // Axis-aligned bounding box check.
- if (
- points1.maxX <= points2.minX ||
- points2.maxX <= points1.minX ||
- points1.maxY <= points2.minY ||
- points2.maxY <= points1.minY ||
- points1.list.every((set1) => {
- return points2.list.every((set2) => {
- return (
- set1.list[set1.maxX][0] <= set2.list[set2.minX][0] ||
- set2.list[set2.maxX][0] <= set1.list[set1.minX][0] ||
- set1.list[set1.maxY][1] <= set2.list[set2.minY][1] ||
- set2.list[set2.maxY][1] <= set1.list[set1.minY][1]
- );
- });
- })
- )
- return false;
-
- // Get a convex hull from points of each subpath. Has the most complexity O(n·log n).
- const hullNest1 = points1.list.map(convexHull);
- const hullNest2 = points2.list.map(convexHull);
-
- // Check intersection of every subpath of the first path with every subpath of the second.
- return hullNest1.some(function (hull1) {
- if (hull1.list.length < 3) return false;
-
- return hullNest2.some(function (hull2) {
- if (hull2.list.length < 3) return false;
-
- var simplex = [getSupport(hull1, hull2, [1, 0])], // create the initial simplex
- direction = minus(simplex[0]); // set the direction to point towards the origin
-
- var iterations = 1e4; // infinite loop protection, 10 000 iterations is more than enough
- // eslint-disable-next-line no-constant-condition
- while (true) {
- if (iterations-- == 0) {
- console.error(
- 'Error: infinite loop while processing mergePaths plugin.',
- );
- return true; // true is the safe value that means “do nothing with paths”
- }
- // add a new point
- simplex.push(getSupport(hull1, hull2, direction));
- // see if the new point was on the correct side of the origin
- if (dot(direction, simplex[simplex.length - 1]) <= 0) return false;
- // process the simplex
- if (processSimplex(simplex, direction)) return true;
- }
- });
- });
-
- /**
- * @type {(a: Point, b: Point, direction: number[]) => number[]}
- */
- function getSupport(a, b, direction) {
- return sub(supportPoint(a, direction), supportPoint(b, minus(direction)));
- }
-
- // Computes farthest polygon point in particular direction.
- // Thanks to knowledge of min/max x and y coordinates we can choose a quadrant to search in.
- // Since we're working on convex hull, the dot product is increasing until we find the farthest point.
- /**
- * @type {(polygon: Point, direction: number[]) => number[]}
- */
- function supportPoint(polygon, direction) {
- var index =
- direction[1] >= 0
- ? direction[0] < 0
- ? polygon.maxY
- : polygon.maxX
- : direction[0] < 0
- ? polygon.minX
- : polygon.minY,
- max = -Infinity,
- value;
- while ((value = dot(polygon.list[index], direction)) > max) {
- max = value;
- index = ++index % polygon.list.length;
- }
- return polygon.list[(index || polygon.list.length) - 1];
- }
-};
-
-/**
- * @type {(simplex: number[][], direction: number[]) => boolean}
- */
-function processSimplex(simplex, direction) {
- // we only need to handle to 1-simplex and 2-simplex
- if (simplex.length == 2) {
- // 1-simplex
- let a = simplex[1],
- b = simplex[0],
- AO = minus(simplex[1]),
- AB = sub(b, a);
- // AO is in the same direction as AB
- if (dot(AO, AB) > 0) {
- // get the vector perpendicular to AB facing O
- set(direction, orth(AB, a));
- } else {
- set(direction, AO);
- // only A remains in the simplex
- simplex.shift();
- }
- } else {
- // 2-simplex
- let a = simplex[2], // [a, b, c] = simplex
- b = simplex[1],
- c = simplex[0],
- AB = sub(b, a),
- AC = sub(c, a),
- AO = minus(a),
- ACB = orth(AB, AC), // the vector perpendicular to AB facing away from C
- ABC = orth(AC, AB); // the vector perpendicular to AC facing away from B
-
- if (dot(ACB, AO) > 0) {
- if (dot(AB, AO) > 0) {
- // region 4
- set(direction, ACB);
- simplex.shift(); // simplex = [b, a]
- } else {
- // region 5
- set(direction, AO);
- simplex.splice(0, 2); // simplex = [a]
- }
- } else if (dot(ABC, AO) > 0) {
- if (dot(AC, AO) > 0) {
- // region 6
- set(direction, ABC);
- simplex.splice(1, 1); // simplex = [c, a]
- } else {
- // region 5 (again)
- set(direction, AO);
- simplex.splice(0, 2); // simplex = [a]
- }
- } // region 7
- else return true;
- }
- return false;
-}
-
-/**
- * @type {(v: number[]) => number[]}
- */
-function minus(v) {
- return [-v[0], -v[1]];
-}
-
-/**
- * @type {(v1: number[], v2: number[]) => number[]}
- */
-function sub(v1, v2) {
- return [v1[0] - v2[0], v1[1] - v2[1]];
-}
-
-/**
- * @type {(v1: number[], v2: number[]) => number}
- */
-function dot(v1, v2) {
- return v1[0] * v2[0] + v1[1] * v2[1];
-}
-
-/**
- * @type {(v1: number[], v2: number[]) => number[]}
- */
-function orth(v, from) {
- var o = [-v[1], v[0]];
- return dot(o, minus(from)) < 0 ? minus(o) : o;
-}
-
-/**
- * @typedef {{
- * list: number[][],
- * minX: number,
- * minY: number,
- * maxX: number,
- * maxY: number
- * }} Point
- */
-
-/**
- * @typedef {{
- * list: Point[],
- * minX: number,
- * minY: number,
- * maxX: number,
- * maxY: number
- * }} Points
- */
-
-/**
- * @type {(pathData: PathDataItem[]) => Points}
- */
-function gatherPoints(pathData) {
- /**
- * @type {Points}
- */
- const points = { list: [], minX: 0, minY: 0, maxX: 0, maxY: 0 };
-
- // Writes data about the extreme points on each axle
- /**
- * @type {(path: Point, point: number[]) => void}
- */
- const addPoint = (path, point) => {
- if (!path.list.length || point[1] > path.list[path.maxY][1]) {
- path.maxY = path.list.length;
- points.maxY = points.list.length
- ? Math.max(point[1], points.maxY)
- : point[1];
- }
- if (!path.list.length || point[0] > path.list[path.maxX][0]) {
- path.maxX = path.list.length;
- points.maxX = points.list.length
- ? Math.max(point[0], points.maxX)
- : point[0];
- }
- if (!path.list.length || point[1] < path.list[path.minY][1]) {
- path.minY = path.list.length;
- points.minY = points.list.length
- ? Math.min(point[1], points.minY)
- : point[1];
- }
- if (!path.list.length || point[0] < path.list[path.minX][0]) {
- path.minX = path.list.length;
- points.minX = points.list.length
- ? Math.min(point[0], points.minX)
- : point[0];
- }
- path.list.push(point);
- };
-
- for (let i = 0; i < pathData.length; i += 1) {
- const pathDataItem = pathData[i];
- let subPath =
- points.list.length === 0
- ? { list: [], minX: 0, minY: 0, maxX: 0, maxY: 0 }
- : points.list[points.list.length - 1];
- let prev = i === 0 ? null : pathData[i - 1];
- let basePoint =
- subPath.list.length === 0 ? null : subPath.list[subPath.list.length - 1];
- let data = pathDataItem.args;
- let ctrlPoint = basePoint;
-
- /**
- * @type {(n: number, i: number) => number}
- * TODO fix null hack
- */
- const toAbsolute = (n, i) => n + (basePoint == null ? 0 : basePoint[i % 2]);
-
- switch (pathDataItem.command) {
- case 'M':
- subPath = { list: [], minX: 0, minY: 0, maxX: 0, maxY: 0 };
- points.list.push(subPath);
- break;
-
- case 'H':
- if (basePoint != null) {
- addPoint(subPath, [data[0], basePoint[1]]);
- }
- break;
-
- case 'V':
- if (basePoint != null) {
- addPoint(subPath, [basePoint[0], data[0]]);
- }
- break;
-
- case 'Q':
- addPoint(subPath, data.slice(0, 2));
- prevCtrlPoint = [data[2] - data[0], data[3] - data[1]]; // Save control point for shorthand
- break;
-
- case 'T':
- if (
- basePoint != null &&
- prev != null &&
- (prev.command == 'Q' || prev.command == 'T')
- ) {
- ctrlPoint = [
- basePoint[0] + prevCtrlPoint[0],
- basePoint[1] + prevCtrlPoint[1],
- ];
- addPoint(subPath, ctrlPoint);
- prevCtrlPoint = [data[0] - ctrlPoint[0], data[1] - ctrlPoint[1]];
- }
- break;
-
- case 'C':
- if (basePoint != null) {
- // Approximate quibic Bezier curve with middle points between control points
- addPoint(subPath, [
- 0.5 * (basePoint[0] + data[0]),
- 0.5 * (basePoint[1] + data[1]),
- ]);
- }
- addPoint(subPath, [
- 0.5 * (data[0] + data[2]),
- 0.5 * (data[1] + data[3]),
- ]);
- addPoint(subPath, [
- 0.5 * (data[2] + data[4]),
- 0.5 * (data[3] + data[5]),
- ]);
- prevCtrlPoint = [data[4] - data[2], data[5] - data[3]]; // Save control point for shorthand
- break;
-
- case 'S':
- if (
- basePoint != null &&
- prev != null &&
- (prev.command == 'C' || prev.command == 'S')
- ) {
- addPoint(subPath, [
- basePoint[0] + 0.5 * prevCtrlPoint[0],
- basePoint[1] + 0.5 * prevCtrlPoint[1],
- ]);
- ctrlPoint = [
- basePoint[0] + prevCtrlPoint[0],
- basePoint[1] + prevCtrlPoint[1],
- ];
- }
- if (ctrlPoint != null) {
- addPoint(subPath, [
- 0.5 * (ctrlPoint[0] + data[0]),
- 0.5 * (ctrlPoint[1] + data[1]),
- ]);
- }
- addPoint(subPath, [
- 0.5 * (data[0] + data[2]),
- 0.5 * (data[1] + data[3]),
- ]);
- prevCtrlPoint = [data[2] - data[0], data[3] - data[1]];
- break;
-
- case 'A':
- if (basePoint != null) {
- // Convert the arc to bezier curves and use the same approximation
- // @ts-ignore no idea what's going on here
- var curves = a2c.apply(0, basePoint.concat(data));
- for (
- var cData;
- (cData = curves.splice(0, 6).map(toAbsolute)).length;
-
- ) {
- if (basePoint != null) {
- addPoint(subPath, [
- 0.5 * (basePoint[0] + cData[0]),
- 0.5 * (basePoint[1] + cData[1]),
- ]);
- }
- addPoint(subPath, [
- 0.5 * (cData[0] + cData[2]),
- 0.5 * (cData[1] + cData[3]),
- ]);
- addPoint(subPath, [
- 0.5 * (cData[2] + cData[4]),
- 0.5 * (cData[3] + cData[5]),
- ]);
- if (curves.length) addPoint(subPath, (basePoint = cData.slice(-2)));
- }
- }
- break;
- }
-
- // Save final command coordinates
- if (data.length >= 2) addPoint(subPath, data.slice(-2));
- }
-
- return points;
-}
-
-/**
- * Forms a convex hull from set of points of every subpath using monotone chain convex hull algorithm.
- * https://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain
- *
- * @type {(points: Point) => Point}
- */
-function convexHull(points) {
- points.list.sort(function (a, b) {
- return a[0] == b[0] ? a[1] - b[1] : a[0] - b[0];
- });
-
- var lower = [],
- minY = 0,
- bottom = 0;
- for (let i = 0; i < points.list.length; i++) {
- while (
- lower.length >= 2 &&
- cross(lower[lower.length - 2], lower[lower.length - 1], points.list[i]) <=
- 0
- ) {
- lower.pop();
- }
- if (points.list[i][1] < points.list[minY][1]) {
- minY = i;
- bottom = lower.length;
- }
- lower.push(points.list[i]);
- }
-
- var upper = [],
- maxY = points.list.length - 1,
- top = 0;
- for (let i = points.list.length; i--; ) {
- while (
- upper.length >= 2 &&
- cross(upper[upper.length - 2], upper[upper.length - 1], points.list[i]) <=
- 0
- ) {
- upper.pop();
- }
- if (points.list[i][1] > points.list[maxY][1]) {
- maxY = i;
- top = upper.length;
- }
- upper.push(points.list[i]);
- }
-
- // last points are equal to starting points of the other part
- upper.pop();
- lower.pop();
-
- const hullList = lower.concat(upper);
-
- /**
- * @type {Point}
- */
- const hull = {
- list: hullList,
- minX: 0, // by sorting
- maxX: lower.length,
- minY: bottom,
- maxY: (lower.length + top) % hullList.length,
- };
-
- return hull;
-}
-
-/**
- * @type {(o: number[], a: number[], b: number[]) => number}
- */
-function cross(o, a, b) {
- return (a[0] - o[0]) * (b[1] - o[1]) - (a[1] - o[1]) * (b[0] - o[0]);
-}
-
-/**
- * Based on code from Snap.svg (Apache 2 license). http://snapsvg.io/
- * Thanks to Dmitry Baranovskiy for his great work!
- *
- * @type {(
- * x1: number,
- * y1: number,
- * rx: number,
- * ry: number,
- * angle: number,
- * large_arc_flag: number,
- * sweep_flag: number,
- * x2: number,
- * y2: number,
- * recursive: number[]
- * ) => number[]}
- */
-const a2c = (
- x1,
- y1,
- rx,
- ry,
- angle,
- large_arc_flag,
- sweep_flag,
- x2,
- y2,
- recursive,
-) => {
- // for more information of where this Math came from visit:
- // https://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
- const _120 = (Math.PI * 120) / 180;
- const rad = (Math.PI / 180) * (+angle || 0);
- /**
- * @type {number[]}
- */
- let res = [];
- /**
- * @type {(x: number, y: number, rad: number) => number}
- */
- const rotateX = (x, y, rad) => {
- return x * Math.cos(rad) - y * Math.sin(rad);
- };
- /**
- * @type {(x: number, y: number, rad: number) => number}
- */
- const rotateY = (x, y, rad) => {
- return x * Math.sin(rad) + y * Math.cos(rad);
- };
- if (!recursive) {
- x1 = rotateX(x1, y1, -rad);
- y1 = rotateY(x1, y1, -rad);
- x2 = rotateX(x2, y2, -rad);
- y2 = rotateY(x2, y2, -rad);
- var x = (x1 - x2) / 2,
- y = (y1 - y2) / 2;
- var h = (x * x) / (rx * rx) + (y * y) / (ry * ry);
- if (h > 1) {
- h = Math.sqrt(h);
- rx = h * rx;
- ry = h * ry;
- }
- var rx2 = rx * rx;
- var ry2 = ry * ry;
- var k =
- (large_arc_flag == sweep_flag ? -1 : 1) *
- Math.sqrt(
- Math.abs(
- (rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x),
- ),
- );
- var cx = (k * rx * y) / ry + (x1 + x2) / 2;
- var cy = (k * -ry * x) / rx + (y1 + y2) / 2;
- var f1 = Math.asin(Number(((y1 - cy) / ry).toFixed(9)));
- var f2 = Math.asin(Number(((y2 - cy) / ry).toFixed(9)));
-
- f1 = x1 < cx ? Math.PI - f1 : f1;
- f2 = x2 < cx ? Math.PI - f2 : f2;
- f1 < 0 && (f1 = Math.PI * 2 + f1);
- f2 < 0 && (f2 = Math.PI * 2 + f2);
- if (sweep_flag && f1 > f2) {
- f1 = f1 - Math.PI * 2;
- }
- if (!sweep_flag && f2 > f1) {
- f2 = f2 - Math.PI * 2;
- }
- } else {
- f1 = recursive[0];
- f2 = recursive[1];
- cx = recursive[2];
- cy = recursive[3];
- }
- var df = f2 - f1;
- if (Math.abs(df) > _120) {
- var f2old = f2,
- x2old = x2,
- y2old = y2;
- f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1);
- x2 = cx + rx * Math.cos(f2);
- y2 = cy + ry * Math.sin(f2);
- res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [
- f2,
- f2old,
- cx,
- cy,
- ]);
- }
- df = f2 - f1;
- var c1 = Math.cos(f1),
- s1 = Math.sin(f1),
- c2 = Math.cos(f2),
- s2 = Math.sin(f2),
- t = Math.tan(df / 4),
- hx = (4 / 3) * rx * t,
- hy = (4 / 3) * ry * t,
- m = [
- -hx * s1,
- hy * c1,
- x2 + hx * s2 - x1,
- y2 - hy * c2 - y1,
- x2 - x1,
- y2 - y1,
- ];
- if (recursive) {
- return m.concat(res);
- } else {
- res = m.concat(res);
- var newres = [];
- for (var i = 0, n = res.length; i < n; i++) {
- newres[i] =
- i % 2
- ? rotateY(res[i - 1], res[i], rad)
- : rotateX(res[i], res[i + 1], rad);
- }
- return newres;
- }
-};
diff --git a/node_modules/svgo/plugins/_transforms.js b/node_modules/svgo/plugins/_transforms.js
deleted file mode 100644
index 1ab6d648..00000000
--- a/node_modules/svgo/plugins/_transforms.js
+++ /dev/null
@@ -1,410 +0,0 @@
-'use strict';
-
-const { toFixed } = require('../lib/svgo/tools');
-
-/**
- * @typedef {{ name: string, data: number[] }} TransformItem
- * @typedef {{
- * convertToShorts: boolean,
- * floatPrecision: number,
- * transformPrecision: number,
- * matrixToTransform: boolean,
- * shortTranslate: boolean,
- * shortScale: boolean,
- * shortRotate: boolean,
- * removeUseless: boolean,
- * collapseIntoOne: boolean,
- * leadingZero: boolean,
- * negativeExtraSpace: boolean,
- * }} TransformParams
- */
-
-const transformTypes = new Set([
- 'matrix',
- 'rotate',
- 'scale',
- 'skewX',
- 'skewY',
- 'translate',
-]);
-
-const regTransformSplit =
- /\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/;
-const regNumericValues = /[-+]?(?:\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?/g;
-
-/**
- * Convert transform string to JS representation.
- *
- * @param {string} transformString
- * @returns {TransformItem[]} Object representation of transform, or an empty array if it was malformed.
- */
-exports.transform2js = (transformString) => {
- /** @type {TransformItem[]} */
- const transforms = [];
- /** @type {?TransformItem} */
- let currentTransform = null;
-
- // split value into ['', 'translate', '10 50', '', 'scale', '2', '', 'rotate', '-45', '']
- for (const item of transformString.split(regTransformSplit)) {
- if (!item) {
- continue;
- }
-
- if (transformTypes.has(item)) {
- currentTransform = { name: item, data: [] };
- transforms.push(currentTransform);
- } else {
- let num;
- // then split it into [10, 50] and collect as context.data
- while ((num = regNumericValues.exec(item))) {
- num = Number(num);
- if (currentTransform != null) {
- currentTransform.data.push(num);
- }
- }
- }
- }
-
- return currentTransform == null || currentTransform.data.length == 0
- ? []
- : transforms;
-};
-
-/**
- * Multiply transforms into one.
- *
- * @param {TransformItem[]} transforms
- * @returns {TransformItem}
- */
-exports.transformsMultiply = (transforms) => {
- const matrixData = transforms.map((transform) => {
- if (transform.name === 'matrix') {
- return transform.data;
- }
- return transformToMatrix(transform);
- });
-
- const matrixTransform = {
- name: 'matrix',
- data:
- matrixData.length > 0 ? matrixData.reduce(multiplyTransformMatrices) : [],
- };
-
- return matrixTransform;
-};
-
-/**
- * Math utilities in radians.
- */
-const mth = {
- /**
- * @param {number} deg
- * @returns {number}
- */
- rad: (deg) => {
- return (deg * Math.PI) / 180;
- },
-
- /**
- * @param {number} rad
- * @returns {number}
- */
- deg: (rad) => {
- return (rad * 180) / Math.PI;
- },
-
- /**
- * @param {number} deg
- * @returns {number}
- */
- cos: (deg) => {
- return Math.cos(mth.rad(deg));
- },
-
- /**
- * @param {number} val
- * @param {number} floatPrecision
- * @returns {number}
- */
- acos: (val, floatPrecision) => {
- return toFixed(mth.deg(Math.acos(val)), floatPrecision);
- },
-
- /**
- * @param {number} deg
- * @returns {number}
- */
- sin: (deg) => {
- return Math.sin(mth.rad(deg));
- },
-
- /**
- * @param {number} val
- * @param {number} floatPrecision
- * @returns {number}
- */
- asin: (val, floatPrecision) => {
- return toFixed(mth.deg(Math.asin(val)), floatPrecision);
- },
-
- /**
- * @param {number} deg
- * @returns {number}
- */
- tan: (deg) => {
- return Math.tan(mth.rad(deg));
- },
-
- /**
- * @param {number} val
- * @param {number} floatPrecision
- * @returns {number}
- */
- atan: (val, floatPrecision) => {
- return toFixed(mth.deg(Math.atan(val)), floatPrecision);
- },
-};
-
-/**
- * Decompose matrix into simple transforms.
- *
- * @param {TransformItem} transform
- * @param {TransformParams} params
- * @returns {TransformItem[]}
- * @see https://frederic-wang.fr/decomposition-of-2d-transform-matrices.html
- */
-exports.matrixToTransform = (transform, params) => {
- const floatPrecision = params.floatPrecision;
- const data = transform.data;
- const transforms = [];
-
- // [..., ..., ..., ..., tx, ty] → translate(tx, ty)
- if (data[4] || data[5]) {
- transforms.push({
- name: 'translate',
- data: data.slice(4, data[5] ? 6 : 5),
- });
- }
-
- let sx = toFixed(Math.hypot(data[0], data[1]), params.transformPrecision);
- let sy = toFixed(
- (data[0] * data[3] - data[1] * data[2]) / sx,
- params.transformPrecision,
- );
- const colsSum = data[0] * data[2] + data[1] * data[3];
- const rowsSum = data[0] * data[1] + data[2] * data[3];
- const scaleBefore = rowsSum !== 0 || sx === sy;
-
- // [sx, 0, tan(a)·sy, sy, 0, 0] → skewX(a)·scale(sx, sy)
- if (!data[1] && data[2]) {
- transforms.push({
- name: 'skewX',
- data: [mth.atan(data[2] / sy, floatPrecision)],
- });
-
- // [sx, sx·tan(a), 0, sy, 0, 0] → skewY(a)·scale(sx, sy)
- } else if (data[1] && !data[2]) {
- transforms.push({
- name: 'skewY',
- data: [mth.atan(data[1] / data[0], floatPrecision)],
- });
- sx = data[0];
- sy = data[3];
-
- // [sx·cos(a), sx·sin(a), sy·-sin(a), sy·cos(a), x, y] → rotate(a[, cx, cy])·(scale or skewX) or
- // [sx·cos(a), sy·sin(a), sx·-sin(a), sy·cos(a), x, y] → scale(sx, sy)·rotate(a[, cx, cy]) (if !scaleBefore)
- } else if (!colsSum || (sx === 1 && sy === 1) || !scaleBefore) {
- if (!scaleBefore) {
- sx = Math.hypot(data[0], data[2]);
- sy = Math.hypot(data[1], data[3]);
-
- if (toFixed(data[0], params.transformPrecision) < 0) {
- sx = -sx;
- }
-
- if (
- data[3] < 0 ||
- (Math.sign(data[1]) === Math.sign(data[2]) &&
- toFixed(data[3], params.transformPrecision) === 0)
- ) {
- sy = -sy;
- }
-
- transforms.push({ name: 'scale', data: [sx, sy] });
- }
- const angle = Math.min(Math.max(-1, data[0] / sx), 1);
- const rotate = [
- mth.acos(angle, floatPrecision) *
- ((scaleBefore ? 1 : sy) * data[1] < 0 ? -1 : 1),
- ];
-
- if (rotate[0]) {
- transforms.push({ name: 'rotate', data: rotate });
- }
-
- if (rowsSum && colsSum)
- transforms.push({
- name: 'skewX',
- data: [mth.atan(colsSum / (sx * sx), floatPrecision)],
- });
-
- // rotate(a, cx, cy) can consume translate() within optional arguments cx, cy (rotation point)
- if (rotate[0] && (data[4] || data[5])) {
- transforms.shift();
- const oneOverCos = 1 - data[0] / sx;
- const sin = data[1] / (scaleBefore ? sx : sy);
- const x = data[4] * (scaleBefore ? 1 : sy);
- const y = data[5] * (scaleBefore ? 1 : sx);
- const denom = (oneOverCos ** 2 + sin ** 2) * (scaleBefore ? 1 : sx * sy);
- rotate.push(
- (oneOverCos * x - sin * y) / denom,
- (oneOverCos * y + sin * x) / denom,
- );
- }
-
- // Too many transformations, return original matrix if it isn't just a scale/translate
- } else if (data[1] || data[2]) {
- return [transform];
- }
-
- if ((scaleBefore && (sx != 1 || sy != 1)) || !transforms.length) {
- transforms.push({
- name: 'scale',
- data: sx == sy ? [sx] : [sx, sy],
- });
- }
-
- return transforms;
-};
-
-/**
- * Convert transform to the matrix data.
- *
- * @type {(transform: TransformItem) => number[] }
- */
-const transformToMatrix = (transform) => {
- if (transform.name === 'matrix') {
- return transform.data;
- }
- switch (transform.name) {
- case 'translate':
- // [1, 0, 0, 1, tx, ty]
- return [1, 0, 0, 1, transform.data[0], transform.data[1] || 0];
- case 'scale':
- // [sx, 0, 0, sy, 0, 0]
- return [
- transform.data[0],
- 0,
- 0,
- transform.data[1] || transform.data[0],
- 0,
- 0,
- ];
- case 'rotate':
- // [cos(a), sin(a), -sin(a), cos(a), x, y]
- var cos = mth.cos(transform.data[0]),
- sin = mth.sin(transform.data[0]),
- cx = transform.data[1] || 0,
- cy = transform.data[2] || 0;
- return [
- cos,
- sin,
- -sin,
- cos,
- (1 - cos) * cx + sin * cy,
- (1 - cos) * cy - sin * cx,
- ];
- case 'skewX':
- // [1, 0, tan(a), 1, 0, 0]
- return [1, 0, mth.tan(transform.data[0]), 1, 0, 0];
- case 'skewY':
- // [1, tan(a), 0, 1, 0, 0]
- return [1, mth.tan(transform.data[0]), 0, 1, 0, 0];
- default:
- throw Error(`Unknown transform ${transform.name}`);
- }
-};
-
-/**
- * Applies transformation to an arc. To do so, we represent ellipse as a matrix, multiply it
- * by the transformation matrix and use a singular value decomposition to represent in a form
- * rotate(θ)·scale(a b)·rotate(φ). This gives us new ellipse params a, b and θ.
- * SVD is being done with the formulae provided by Wolffram|Alpha (svd {{m0, m2}, {m1, m3}})
- *
- * @type {(
- * cursor: [x: number, y: number],
- * arc: number[],
- * transform: number[]
- * ) => number[]}
- */
-exports.transformArc = (cursor, arc, transform) => {
- const x = arc[5] - cursor[0];
- const y = arc[6] - cursor[1];
- let a = arc[0];
- let b = arc[1];
- const rot = (arc[2] * Math.PI) / 180;
- const cos = Math.cos(rot);
- const sin = Math.sin(rot);
- // skip if radius is 0
- if (a > 0 && b > 0) {
- let h =
- Math.pow(x * cos + y * sin, 2) / (4 * a * a) +
- Math.pow(y * cos - x * sin, 2) / (4 * b * b);
- if (h > 1) {
- h = Math.sqrt(h);
- a *= h;
- b *= h;
- }
- }
- const ellipse = [a * cos, a * sin, -b * sin, b * cos, 0, 0];
- const m = multiplyTransformMatrices(transform, ellipse);
- // Decompose the new ellipse matrix
- const lastCol = m[2] * m[2] + m[3] * m[3];
- const squareSum = m[0] * m[0] + m[1] * m[1] + lastCol;
- const root =
- Math.hypot(m[0] - m[3], m[1] + m[2]) * Math.hypot(m[0] + m[3], m[1] - m[2]);
-
- if (!root) {
- // circle
- arc[0] = arc[1] = Math.sqrt(squareSum / 2);
- arc[2] = 0;
- } else {
- const majorAxisSqr = (squareSum + root) / 2;
- const minorAxisSqr = (squareSum - root) / 2;
- const major = Math.abs(majorAxisSqr - lastCol) > 1e-6;
- const sub = (major ? majorAxisSqr : minorAxisSqr) - lastCol;
- const rowsSum = m[0] * m[2] + m[1] * m[3];
- const term1 = m[0] * sub + m[2] * rowsSum;
- const term2 = m[1] * sub + m[3] * rowsSum;
- arc[0] = Math.sqrt(majorAxisSqr);
- arc[1] = Math.sqrt(minorAxisSqr);
- arc[2] =
- (((major ? term2 < 0 : term1 > 0) ? -1 : 1) *
- Math.acos((major ? term1 : term2) / Math.hypot(term1, term2)) *
- 180) /
- Math.PI;
- }
-
- if (transform[0] < 0 !== transform[3] < 0) {
- // Flip the sweep flag if coordinates are being flipped horizontally XOR vertically
- arc[4] = 1 - arc[4];
- }
-
- return arc;
-};
-
-/**
- * Multiply transformation matrices.
- *
- * @type {(a: number[], b: number[]) => number[]}
- */
-const multiplyTransformMatrices = (a, b) => {
- return [
- a[0] * b[0] + a[2] * b[1],
- a[1] * b[0] + a[3] * b[1],
- a[0] * b[2] + a[2] * b[3],
- a[1] * b[2] + a[3] * b[3],
- a[0] * b[4] + a[2] * b[5] + a[4],
- a[1] * b[4] + a[3] * b[5] + a[5],
- ];
-};
diff --git a/node_modules/svgo/plugins/addAttributesToSVGElement.js b/node_modules/svgo/plugins/addAttributesToSVGElement.js
deleted file mode 100644
index 845cb056..00000000
--- a/node_modules/svgo/plugins/addAttributesToSVGElement.js
+++ /dev/null
@@ -1,82 +0,0 @@
-'use strict';
-
-exports.name = 'addAttributesToSVGElement';
-exports.description = 'adds attributes to an outer <svg> element';
-
-var ENOCLS = `Error in plugin "addAttributesToSVGElement": absent parameters.
-It should have a list of "attributes" or one "attribute".
-Config example:
-
-plugins: [
- {
- name: 'addAttributesToSVGElement',
- params: {
- attribute: "mySvg"
- }
- }
-]
-
-plugins: [
- {
- name: 'addAttributesToSVGElement',
- params: {
- attributes: ["mySvg", "size-big"]
- }
- }
-]
-
-plugins: [
- {
- name: 'addAttributesToSVGElement',
- params: {
- attributes: [
- {
- focusable: false
- },
- {
- 'data-image': icon
- }
- ]
- }
- }
-]
-`;
-
-/**
- * Add attributes to an outer <svg> element. Example config:
- *
- * @author April Arcus
- *
- * @type {import('./plugins-types').Plugin<'addAttributesToSVGElement'>}
- */
-exports.fn = (root, params) => {
- if (!Array.isArray(params.attributes) && !params.attribute) {
- console.error(ENOCLS);
- return null;
- }
- const attributes = params.attributes || [params.attribute];
- return {
- element: {
- enter: (node, parentNode) => {
- if (node.name === 'svg' && parentNode.type === 'root') {
- for (const attribute of attributes) {
- if (typeof attribute === 'string') {
- if (node.attributes[attribute] == null) {
- // @ts-ignore disallow explicit nullable attribute value
- node.attributes[attribute] = undefined;
- }
- }
- if (typeof attribute === 'object') {
- for (const key of Object.keys(attribute)) {
- if (node.attributes[key] == null) {
- // @ts-ignore disallow explicit nullable attribute value
- node.attributes[key] = attribute[key];
- }
- }
- }
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/addClassesToSVGElement.js b/node_modules/svgo/plugins/addClassesToSVGElement.js
deleted file mode 100644
index 1e773d85..00000000
--- a/node_modules/svgo/plugins/addClassesToSVGElement.js
+++ /dev/null
@@ -1,82 +0,0 @@
-'use strict';
-
-exports.name = 'addClassesToSVGElement';
-exports.description = 'adds classnames to an outer <svg> element';
-
-var ENOCLS = `Error in plugin "addClassesToSVGElement": absent parameters.
-It should have a list of classes in "classNames" or one "className".
-Config example:
-
-plugins: [
- {
- name: "addClassesToSVGElement",
- params: {
- className: "mySvg"
- }
- }
-]
-
-plugins: [
- {
- name: "addClassesToSVGElement",
- params: {
- classNames: ["mySvg", "size-big"]
- }
- }
-]
-`;
-
-/**
- * Add classnames to an outer <svg> element. Example config:
- *
- * plugins: [
- * {
- * name: "addClassesToSVGElement",
- * params: {
- * className: "mySvg"
- * }
- * }
- * ]
- *
- * plugins: [
- * {
- * name: "addClassesToSVGElement",
- * params: {
- * classNames: ["mySvg", "size-big"]
- * }
- * }
- * ]
- *
- * @author April Arcus
- *
- * @type {import('./plugins-types').Plugin<'addClassesToSVGElement'>}
- */
-exports.fn = (root, params) => {
- if (
- !(Array.isArray(params.classNames) && params.classNames.some(String)) &&
- !params.className
- ) {
- console.error(ENOCLS);
- return null;
- }
- const classNames = params.classNames || [params.className];
- return {
- element: {
- enter: (node, parentNode) => {
- if (node.name === 'svg' && parentNode.type === 'root') {
- const classList = new Set(
- node.attributes.class == null
- ? null
- : node.attributes.class.split(' '),
- );
- for (const className of classNames) {
- if (className != null) {
- classList.add(className);
- }
- }
- node.attributes.class = Array.from(classList).join(' ');
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/applyTransforms.js b/node_modules/svgo/plugins/applyTransforms.js
deleted file mode 100644
index ae492d54..00000000
--- a/node_modules/svgo/plugins/applyTransforms.js
+++ /dev/null
@@ -1,388 +0,0 @@
-'use strict';
-
-/**
- * @typedef {import('../lib/types').PathDataItem} PathDataItem
- * @typedef {import('../lib/types').XastElement} XastElement
- */
-
-const { collectStylesheet, computeStyle } = require('../lib/style.js');
-const {
- transformsMultiply,
- transform2js,
- transformArc,
-} = require('./_transforms.js');
-const { path2js } = require('./_path.js');
-const {
- removeLeadingZero,
- includesUrlReference,
-} = require('../lib/svgo/tools.js');
-const { referencesProps, attrsGroupsDefaults } = require('./_collections.js');
-
-/**
- * @typedef {PathDataItem[]} PathData
- * @typedef {number[]} Matrix
- */
-
-const regNumericValues = /[-+]?(\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?/g;
-
-/**
- * Apply transformation(s) to the Path data.
- *
- * @type {import('../lib/types').Plugin<{
- * transformPrecision: number,
- * applyTransformsStroked: boolean,
- * }>}
- */
-const applyTransforms = (root, params) => {
- const stylesheet = collectStylesheet(root);
- return {
- element: {
- enter: (node) => {
- if (node.attributes.d == null) {
- return;
- }
-
- // stroke and stroke-width can be redefined with <use>
- if (node.attributes.id != null) {
- return;
- }
-
- // if there are no 'stroke' attr and references to other objects such as
- // gradients or clip-path which are also subjects to transform.
- if (
- node.attributes.transform == null ||
- node.attributes.transform === '' ||
- // styles are not considered when applying transform
- // can be fixed properly with new style engine
- node.attributes.style != null ||
- Object.entries(node.attributes).some(
- ([name, value]) =>
- referencesProps.has(name) && includesUrlReference(value),
- )
- ) {
- return;
- }
-
- const computedStyle = computeStyle(stylesheet, node);
- const transformStyle = computedStyle.transform;
-
- // Transform overridden in <style> tag which is not considered
- if (
- transformStyle.type === 'static' &&
- transformStyle.value !== node.attributes.transform
- ) {
- return;
- }
-
- const matrix = transformsMultiply(
- transform2js(node.attributes.transform),
- );
-
- const stroke =
- computedStyle.stroke?.type === 'static'
- ? computedStyle.stroke.value
- : null;
-
- const strokeWidth =
- computedStyle['stroke-width']?.type === 'static'
- ? computedStyle['stroke-width'].value
- : null;
- const transformPrecision = params.transformPrecision;
-
- if (
- computedStyle.stroke?.type === 'dynamic' ||
- computedStyle['stroke-width']?.type === 'dynamic'
- ) {
- return;
- }
-
- const scale = Number(
- Math.sqrt(
- matrix.data[0] * matrix.data[0] + matrix.data[1] * matrix.data[1],
- ).toFixed(transformPrecision),
- );
-
- if (stroke && stroke != 'none') {
- if (!params.applyTransformsStroked) {
- return;
- }
-
- // stroke cannot be transformed with different vertical and horizontal scale or skew
- if (
- (matrix.data[0] !== matrix.data[3] ||
- matrix.data[1] !== -matrix.data[2]) &&
- (matrix.data[0] !== -matrix.data[3] ||
- matrix.data[1] !== matrix.data[2])
- ) {
- return;
- }
-
- // apply transform to stroke-width, stroke-dashoffset and stroke-dasharray
- if (scale !== 1) {
- if (node.attributes['vector-effect'] !== 'non-scaling-stroke') {
- node.attributes['stroke-width'] = (
- strokeWidth || attrsGroupsDefaults.presentation['stroke-width']
- )
- .trim()
- .replace(regNumericValues, (num) =>
- removeLeadingZero(Number(num) * scale),
- );
-
- if (node.attributes['stroke-dashoffset'] != null) {
- node.attributes['stroke-dashoffset'] = node.attributes[
- 'stroke-dashoffset'
- ]
- .trim()
- .replace(regNumericValues, (num) =>
- removeLeadingZero(Number(num) * scale),
- );
- }
-
- if (node.attributes['stroke-dasharray'] != null) {
- node.attributes['stroke-dasharray'] = node.attributes[
- 'stroke-dasharray'
- ]
- .trim()
- .replace(regNumericValues, (num) =>
- removeLeadingZero(Number(num) * scale),
- );
- }
- }
- }
- }
-
- const pathData = path2js(node);
- applyMatrixToPathData(pathData, matrix.data);
-
- // remove transform attr
- delete node.attributes.transform;
- },
- },
- };
-};
-exports.applyTransforms = applyTransforms;
-
-/**
- * @type {(matrix: Matrix, x: number, y: number) => [number, number]}
- */
-const transformAbsolutePoint = (matrix, x, y) => {
- const newX = matrix[0] * x + matrix[2] * y + matrix[4];
- const newY = matrix[1] * x + matrix[3] * y + matrix[5];
- return [newX, newY];
-};
-
-/**
- * @type {(matrix: Matrix, x: number, y: number) => [number, number]}
- */
-const transformRelativePoint = (matrix, x, y) => {
- const newX = matrix[0] * x + matrix[2] * y;
- const newY = matrix[1] * x + matrix[3] * y;
- return [newX, newY];
-};
-
-/**
- * @type {(pathData: PathData, matrix: Matrix) => void}
- */
-const applyMatrixToPathData = (pathData, matrix) => {
- /**
- * @type {[number, number]}
- */
- const start = [0, 0];
- /**
- * @type {[number, number]}
- */
- const cursor = [0, 0];
-
- for (const pathItem of pathData) {
- let { command, args } = pathItem;
-
- // moveto (x y)
- if (command === 'M') {
- cursor[0] = args[0];
- cursor[1] = args[1];
- start[0] = cursor[0];
- start[1] = cursor[1];
- const [x, y] = transformAbsolutePoint(matrix, args[0], args[1]);
- args[0] = x;
- args[1] = y;
- }
- if (command === 'm') {
- cursor[0] += args[0];
- cursor[1] += args[1];
- start[0] = cursor[0];
- start[1] = cursor[1];
- const [x, y] = transformRelativePoint(matrix, args[0], args[1]);
- args[0] = x;
- args[1] = y;
- }
-
- // horizontal lineto (x)
- // convert to lineto to handle two-dimentional transforms
- if (command === 'H') {
- command = 'L';
- args = [args[0], cursor[1]];
- }
- if (command === 'h') {
- command = 'l';
- args = [args[0], 0];
- }
-
- // vertical lineto (y)
- // convert to lineto to handle two-dimentional transforms
- if (command === 'V') {
- command = 'L';
- args = [cursor[0], args[0]];
- }
- if (command === 'v') {
- command = 'l';
- args = [0, args[0]];
- }
-
- // lineto (x y)
- if (command === 'L') {
- cursor[0] = args[0];
- cursor[1] = args[1];
- const [x, y] = transformAbsolutePoint(matrix, args[0], args[1]);
- args[0] = x;
- args[1] = y;
- }
- if (command === 'l') {
- cursor[0] += args[0];
- cursor[1] += args[1];
- const [x, y] = transformRelativePoint(matrix, args[0], args[1]);
- args[0] = x;
- args[1] = y;
- }
-
- // curveto (x1 y1 x2 y2 x y)
- if (command === 'C') {
- cursor[0] = args[4];
- cursor[1] = args[5];
- const [x1, y1] = transformAbsolutePoint(matrix, args[0], args[1]);
- const [x2, y2] = transformAbsolutePoint(matrix, args[2], args[3]);
- const [x, y] = transformAbsolutePoint(matrix, args[4], args[5]);
- args[0] = x1;
- args[1] = y1;
- args[2] = x2;
- args[3] = y2;
- args[4] = x;
- args[5] = y;
- }
- if (command === 'c') {
- cursor[0] += args[4];
- cursor[1] += args[5];
- const [x1, y1] = transformRelativePoint(matrix, args[0], args[1]);
- const [x2, y2] = transformRelativePoint(matrix, args[2], args[3]);
- const [x, y] = transformRelativePoint(matrix, args[4], args[5]);
- args[0] = x1;
- args[1] = y1;
- args[2] = x2;
- args[3] = y2;
- args[4] = x;
- args[5] = y;
- }
-
- // smooth curveto (x2 y2 x y)
- if (command === 'S') {
- cursor[0] = args[2];
- cursor[1] = args[3];
- const [x2, y2] = transformAbsolutePoint(matrix, args[0], args[1]);
- const [x, y] = transformAbsolutePoint(matrix, args[2], args[3]);
- args[0] = x2;
- args[1] = y2;
- args[2] = x;
- args[3] = y;
- }
- if (command === 's') {
- cursor[0] += args[2];
- cursor[1] += args[3];
- const [x2, y2] = transformRelativePoint(matrix, args[0], args[1]);
- const [x, y] = transformRelativePoint(matrix, args[2], args[3]);
- args[0] = x2;
- args[1] = y2;
- args[2] = x;
- args[3] = y;
- }
-
- // quadratic Bézier curveto (x1 y1 x y)
- if (command === 'Q') {
- cursor[0] = args[2];
- cursor[1] = args[3];
- const [x1, y1] = transformAbsolutePoint(matrix, args[0], args[1]);
- const [x, y] = transformAbsolutePoint(matrix, args[2], args[3]);
- args[0] = x1;
- args[1] = y1;
- args[2] = x;
- args[3] = y;
- }
- if (command === 'q') {
- cursor[0] += args[2];
- cursor[1] += args[3];
- const [x1, y1] = transformRelativePoint(matrix, args[0], args[1]);
- const [x, y] = transformRelativePoint(matrix, args[2], args[3]);
- args[0] = x1;
- args[1] = y1;
- args[2] = x;
- args[3] = y;
- }
-
- // smooth quadratic Bézier curveto (x y)
- if (command === 'T') {
- cursor[0] = args[0];
- cursor[1] = args[1];
- const [x, y] = transformAbsolutePoint(matrix, args[0], args[1]);
- args[0] = x;
- args[1] = y;
- }
- if (command === 't') {
- cursor[0] += args[0];
- cursor[1] += args[1];
- const [x, y] = transformRelativePoint(matrix, args[0], args[1]);
- args[0] = x;
- args[1] = y;
- }
-
- // elliptical arc (rx ry x-axis-rotation large-arc-flag sweep-flag x y)
- if (command === 'A') {
- transformArc(cursor, args, matrix);
- cursor[0] = args[5];
- cursor[1] = args[6];
- // reduce number of digits in rotation angle
- if (Math.abs(args[2]) > 80) {
- const a = args[0];
- const rotation = args[2];
- args[0] = args[1];
- args[1] = a;
- args[2] = rotation + (rotation > 0 ? -90 : 90);
- }
- const [x, y] = transformAbsolutePoint(matrix, args[5], args[6]);
- args[5] = x;
- args[6] = y;
- }
- if (command === 'a') {
- transformArc([0, 0], args, matrix);
- cursor[0] += args[5];
- cursor[1] += args[6];
- // reduce number of digits in rotation angle
- if (Math.abs(args[2]) > 80) {
- const a = args[0];
- const rotation = args[2];
- args[0] = args[1];
- args[1] = a;
- args[2] = rotation + (rotation > 0 ? -90 : 90);
- }
- const [x, y] = transformRelativePoint(matrix, args[5], args[6]);
- args[5] = x;
- args[6] = y;
- }
-
- // closepath
- if (command === 'z' || command === 'Z') {
- cursor[0] = start[0];
- cursor[1] = start[1];
- }
-
- pathItem.command = command;
- pathItem.args = args;
- }
-};
diff --git a/node_modules/svgo/plugins/cleanupAttrs.js b/node_modules/svgo/plugins/cleanupAttrs.js
deleted file mode 100644
index 7b4c6b70..00000000
--- a/node_modules/svgo/plugins/cleanupAttrs.js
+++ /dev/null
@@ -1,49 +0,0 @@
-'use strict';
-
-exports.name = 'cleanupAttrs';
-exports.description =
- 'cleanups attributes from newlines, trailing and repeating spaces';
-
-const regNewlinesNeedSpace = /(\S)\r?\n(\S)/g;
-const regNewlines = /\r?\n/g;
-const regSpaces = /\s{2,}/g;
-
-/**
- * Cleanup attributes values from newlines, trailing and repeating spaces.
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'cleanupAttrs'>}
- */
-exports.fn = (root, params) => {
- const { newlines = true, trim = true, spaces = true } = params;
- return {
- element: {
- enter: (node) => {
- for (const name of Object.keys(node.attributes)) {
- if (newlines) {
- // new line which requires a space instead of themself
- node.attributes[name] = node.attributes[name].replace(
- regNewlinesNeedSpace,
- (match, p1, p2) => p1 + ' ' + p2,
- );
- // simple new line
- node.attributes[name] = node.attributes[name].replace(
- regNewlines,
- '',
- );
- }
- if (trim) {
- node.attributes[name] = node.attributes[name].trim();
- }
- if (spaces) {
- node.attributes[name] = node.attributes[name].replace(
- regSpaces,
- ' ',
- );
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/cleanupEnableBackground.js b/node_modules/svgo/plugins/cleanupEnableBackground.js
deleted file mode 100644
index 330cfb57..00000000
--- a/node_modules/svgo/plugins/cleanupEnableBackground.js
+++ /dev/null
@@ -1,165 +0,0 @@
-'use strict';
-
-const csstree = require('css-tree');
-const { visit } = require('../lib/xast.js');
-
-exports.name = 'cleanupEnableBackground';
-exports.description =
- 'remove or cleanup enable-background attribute when possible';
-
-const regEnableBackground =
- /^new\s0\s0\s([-+]?\d*\.?\d+([eE][-+]?\d+)?)\s([-+]?\d*\.?\d+([eE][-+]?\d+)?)$/;
-
-/**
- * Remove or cleanup enable-background attr which coincides with a width/height box.
- *
- * @see https://www.w3.org/TR/SVG11/filters.html#EnableBackgroundProperty
- * @example
- * <svg width="100" height="50" enable-background="new 0 0 100 50">
- * ⬇
- * <svg width="100" height="50">
- * @author Kir Belevich
- * @type {import('./plugins-types').Plugin<'cleanupEnableBackground'>}
- */
-exports.fn = (root) => {
- let hasFilter = false;
-
- visit(root, {
- element: {
- enter: (node) => {
- if (node.name === 'filter') {
- hasFilter = true;
- }
- },
- },
- });
-
- return {
- element: {
- enter: (node) => {
- /** @type {?csstree.CssNode} */
- let newStyle = null;
- /** @type {?csstree.ListItem<csstree.CssNode>} */
- let enableBackgroundDeclaration = null;
-
- if (node.attributes.style != null) {
- newStyle = csstree.parse(node.attributes.style, {
- context: 'declarationList',
- });
-
- if (newStyle.type === 'DeclarationList') {
- /** @type {csstree.ListItem<csstree.CssNode>[]} */
- const enableBackgroundDeclarations = [];
-
- csstree.walk(newStyle, (node, nodeItem) => {
- if (
- node.type === 'Declaration' &&
- node.property === 'enable-background'
- ) {
- enableBackgroundDeclarations.push(nodeItem);
- enableBackgroundDeclaration = nodeItem;
- }
- });
-
- for (let i = 0; i < enableBackgroundDeclarations.length - 1; i++) {
- newStyle.children.remove(enableBackgroundDeclarations[i]);
- }
- }
- }
-
- if (!hasFilter) {
- delete node.attributes['enable-background'];
-
- if (newStyle?.type === 'DeclarationList') {
- if (enableBackgroundDeclaration) {
- newStyle.children.remove(enableBackgroundDeclaration);
- }
-
- if (newStyle.children.isEmpty) {
- delete node.attributes.style;
- } else {
- node.attributes.style = csstree.generate(newStyle);
- }
- }
-
- return;
- }
-
- const hasDimensions =
- node.attributes.width != null && node.attributes.height != null;
-
- if (
- (node.name === 'svg' ||
- node.name === 'mask' ||
- node.name === 'pattern') &&
- hasDimensions
- ) {
- const attrValue = node.attributes['enable-background'];
- const attrCleaned = cleanupValue(
- attrValue,
- node.name,
- node.attributes.width,
- node.attributes.height,
- );
-
- if (attrCleaned) {
- node.attributes['enable-background'] = attrCleaned;
- } else {
- delete node.attributes['enable-background'];
- }
-
- if (
- newStyle?.type === 'DeclarationList' &&
- enableBackgroundDeclaration
- ) {
- const styleValue = csstree.generate(
- // @ts-ignore
- enableBackgroundDeclaration.data.value,
- );
- const styleCleaned = cleanupValue(
- styleValue,
- node.name,
- node.attributes.width,
- node.attributes.height,
- );
-
- if (styleCleaned) {
- // @ts-ignore
- enableBackgroundDeclaration.data.value = {
- type: 'Raw',
- value: styleCleaned,
- };
- } else {
- newStyle.children.remove(enableBackgroundDeclaration);
- }
- }
- }
-
- if (newStyle?.type === 'DeclarationList') {
- if (newStyle.children.isEmpty) {
- delete node.attributes.style;
- } else {
- node.attributes.style = csstree.generate(newStyle);
- }
- }
- },
- },
- };
-};
-
-/**
- * @param {string} value Value of a enable-background attribute or style declaration.
- * @param {string} nodeName Name of the node the value was assigned to.
- * @param {string} width Width of the node the value was assigned to.
- * @param {string} height Height of the node the value was assigned to.
- * @returns {string | undefined} Cleaned up value, or undefined if it's redundant.
- */
-const cleanupValue = (value, nodeName, width, height) => {
- const match = regEnableBackground.exec(value);
-
- if (match != null && width === match[1] && height === match[3]) {
- return nodeName === 'svg' ? undefined : 'new';
- }
-
- return value;
-};
diff --git a/node_modules/svgo/plugins/cleanupIds.js b/node_modules/svgo/plugins/cleanupIds.js
deleted file mode 100644
index bfabcca5..00000000
--- a/node_modules/svgo/plugins/cleanupIds.js
+++ /dev/null
@@ -1,265 +0,0 @@
-'use strict';
-
-/**
- * @typedef {import('../lib/types').XastElement} XastElement
- */
-
-const { visitSkip } = require('../lib/xast.js');
-const { hasScripts, findReferences } = require('../lib/svgo/tools');
-
-exports.name = 'cleanupIds';
-exports.description = 'removes unused IDs and minifies used';
-
-const generateIdChars = [
- 'a',
- 'b',
- 'c',
- 'd',
- 'e',
- 'f',
- 'g',
- 'h',
- 'i',
- 'j',
- 'k',
- 'l',
- 'm',
- 'n',
- 'o',
- 'p',
- 'q',
- 'r',
- 's',
- 't',
- 'u',
- 'v',
- 'w',
- 'x',
- 'y',
- 'z',
- 'A',
- 'B',
- 'C',
- 'D',
- 'E',
- 'F',
- 'G',
- 'H',
- 'I',
- 'J',
- 'K',
- 'L',
- 'M',
- 'N',
- 'O',
- 'P',
- 'Q',
- 'R',
- 'S',
- 'T',
- 'U',
- 'V',
- 'W',
- 'X',
- 'Y',
- 'Z',
-];
-const maxIdIndex = generateIdChars.length - 1;
-
-/**
- * Check if an ID starts with any one of a list of strings.
- *
- * @type {(string: string, prefixes: string[]) => boolean}
- */
-const hasStringPrefix = (string, prefixes) => {
- for (const prefix of prefixes) {
- if (string.startsWith(prefix)) {
- return true;
- }
- }
- return false;
-};
-
-/**
- * Generate unique minimal ID.
- *
- * @param {?number[]} currentId
- * @returns {number[]}
- */
-const generateId = (currentId) => {
- if (currentId == null) {
- return [0];
- }
- currentId[currentId.length - 1] += 1;
- for (let i = currentId.length - 1; i > 0; i--) {
- if (currentId[i] > maxIdIndex) {
- currentId[i] = 0;
- if (currentId[i - 1] !== undefined) {
- currentId[i - 1]++;
- }
- }
- }
- if (currentId[0] > maxIdIndex) {
- currentId[0] = 0;
- currentId.unshift(0);
- }
- return currentId;
-};
-
-/**
- * Get string from generated ID array.
- *
- * @type {(arr: number[]) => string}
- */
-const getIdString = (arr) => {
- return arr.map((i) => generateIdChars[i]).join('');
-};
-
-/**
- * Remove unused and minify used IDs
- * (only if there are no any <style> or <script>).
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'cleanupIds'>}
- */
-exports.fn = (_root, params) => {
- const {
- remove = true,
- minify = true,
- preserve = [],
- preservePrefixes = [],
- force = false,
- } = params;
- const preserveIds = new Set(
- Array.isArray(preserve) ? preserve : preserve ? [preserve] : [],
- );
- const preserveIdPrefixes = Array.isArray(preservePrefixes)
- ? preservePrefixes
- : preservePrefixes
- ? [preservePrefixes]
- : [];
- /**
- * @type {Map<string, XastElement>}
- */
- const nodeById = new Map();
- /**
- * @type {Map<string, {element: XastElement, name: string }[]>}
- */
- const referencesById = new Map();
- let deoptimized = false;
-
- return {
- element: {
- enter: (node) => {
- if (!force) {
- // deoptimize if style or scripts are present
- if (
- (node.name === 'style' && node.children.length !== 0) ||
- hasScripts(node)
- ) {
- deoptimized = true;
- return;
- }
-
- // avoid removing IDs if the whole SVG consists only of defs
- if (node.name === 'svg') {
- let hasDefsOnly = true;
- for (const child of node.children) {
- if (child.type !== 'element' || child.name !== 'defs') {
- hasDefsOnly = false;
- break;
- }
- }
- if (hasDefsOnly) {
- return visitSkip;
- }
- }
- }
-
- for (const [name, value] of Object.entries(node.attributes)) {
- if (name === 'id') {
- // collect all ids
- const id = value;
- if (nodeById.has(id)) {
- delete node.attributes.id; // remove repeated id
- } else {
- nodeById.set(id, node);
- }
- } else {
- const ids = findReferences(name, value);
- for (const id of ids) {
- let refs = referencesById.get(id);
- if (refs == null) {
- refs = [];
- referencesById.set(id, refs);
- }
- refs.push({ element: node, name });
- }
- }
- }
- },
- },
-
- root: {
- exit: () => {
- if (deoptimized) {
- return;
- }
- /**
- * @param {string} id
- * @returns {boolean}
- */
- const isIdPreserved = (id) =>
- preserveIds.has(id) || hasStringPrefix(id, preserveIdPrefixes);
- /** @type {?number[]} */
- let currentId = null;
- for (const [id, refs] of referencesById) {
- const node = nodeById.get(id);
- if (node != null) {
- // replace referenced IDs with the minified ones
- if (minify && isIdPreserved(id) === false) {
- /** @type {?string} */
- let currentIdString = null;
- do {
- currentId = generateId(currentId);
- currentIdString = getIdString(currentId);
- } while (
- isIdPreserved(currentIdString) ||
- (referencesById.has(currentIdString) &&
- nodeById.get(currentIdString) == null)
- );
- node.attributes.id = currentIdString;
- for (const { element, name } of refs) {
- const value = element.attributes[name];
- if (value.includes('#')) {
- // replace id in href and url()
- element.attributes[name] = value.replace(
- `#${encodeURI(id)}`,
- `#${currentIdString}`,
- );
- } else {
- // replace id in begin attribute
- element.attributes[name] = value.replace(
- `${id}.`,
- `${currentIdString}.`,
- );
- }
- }
- }
- // keep referenced node
- nodeById.delete(id);
- }
- }
- // remove non-referenced IDs attributes from elements
- if (remove) {
- for (const [id, node] of nodeById) {
- if (isIdPreserved(id) === false) {
- delete node.attributes.id;
- }
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/cleanupListOfValues.js b/node_modules/svgo/plugins/cleanupListOfValues.js
deleted file mode 100644
index 618fd062..00000000
--- a/node_modules/svgo/plugins/cleanupListOfValues.js
+++ /dev/null
@@ -1,147 +0,0 @@
-'use strict';
-
-const { removeLeadingZero } = require('../lib/svgo/tools.js');
-
-exports.name = 'cleanupListOfValues';
-exports.description = 'rounds list of values to the fixed precision';
-
-const regNumericValues =
- /^([-+]?\d*\.?\d+([eE][-+]?\d+)?)(px|pt|pc|mm|cm|m|in|ft|em|ex|%)?$/;
-const regSeparator = /\s+,?\s*|,\s*/;
-const absoluteLengths = {
- // relative to px
- cm: 96 / 2.54,
- mm: 96 / 25.4,
- in: 96,
- pt: 4 / 3,
- pc: 16,
- px: 1,
-};
-
-/**
- * Round list of values to the fixed precision.
- *
- * @example
- * <svg viewBox="0 0 200.28423 200.28423" enable-background="new 0 0 200.28423 200.28423">
- * ⬇
- * <svg viewBox="0 0 200.284 200.284" enable-background="new 0 0 200.284 200.284">
- *
- * <polygon points="208.250977 77.1308594 223.069336 ... "/>
- * ⬇
- * <polygon points="208.251 77.131 223.069 ... "/>
- *
- * @author kiyopikko
- *
- * @type {import('./plugins-types').Plugin<'cleanupListOfValues'>}
- */
-exports.fn = (_root, params) => {
- const {
- floatPrecision = 3,
- leadingZero = true,
- defaultPx = true,
- convertToPx = true,
- } = params;
-
- /**
- * @type {(lists: string) => string}
- */
- const roundValues = (lists) => {
- const roundedList = [];
-
- for (const elem of lists.split(regSeparator)) {
- const match = elem.match(regNumericValues);
- const matchNew = elem.match(/new/);
-
- // if attribute value matches regNumericValues
- if (match) {
- // round it to the fixed precision
- let num = Number(Number(match[1]).toFixed(floatPrecision));
- /**
- * @type {any}
- */
- let matchedUnit = match[3] || '';
- /**
- * @type{'' | keyof typeof absoluteLengths}
- */
- let units = matchedUnit;
-
- // convert absolute values to pixels
- if (convertToPx && units && units in absoluteLengths) {
- const pxNum = Number(
- (absoluteLengths[units] * Number(match[1])).toFixed(floatPrecision),
- );
-
- if (pxNum.toString().length < match[0].length) {
- num = pxNum;
- units = 'px';
- }
- }
-
- // and remove leading zero
- let str;
- if (leadingZero) {
- str = removeLeadingZero(num);
- } else {
- str = num.toString();
- }
-
- // remove default 'px' units
- if (defaultPx && units === 'px') {
- units = '';
- }
-
- roundedList.push(str + units);
- }
- // if attribute value is "new"(only enable-background).
- else if (matchNew) {
- roundedList.push('new');
- } else if (elem) {
- roundedList.push(elem);
- }
- }
-
- return roundedList.join(' ');
- };
-
- return {
- element: {
- enter: (node) => {
- if (node.attributes.points != null) {
- node.attributes.points = roundValues(node.attributes.points);
- }
-
- if (node.attributes['enable-background'] != null) {
- node.attributes['enable-background'] = roundValues(
- node.attributes['enable-background'],
- );
- }
-
- if (node.attributes.viewBox != null) {
- node.attributes.viewBox = roundValues(node.attributes.viewBox);
- }
-
- if (node.attributes['stroke-dasharray'] != null) {
- node.attributes['stroke-dasharray'] = roundValues(
- node.attributes['stroke-dasharray'],
- );
- }
-
- if (node.attributes.dx != null) {
- node.attributes.dx = roundValues(node.attributes.dx);
- }
-
- if (node.attributes.dy != null) {
- node.attributes.dy = roundValues(node.attributes.dy);
- }
-
- if (node.attributes.x != null) {
- node.attributes.x = roundValues(node.attributes.x);
- }
-
- if (node.attributes.y != null) {
- node.attributes.y = roundValues(node.attributes.y);
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/cleanupNumericValues.js b/node_modules/svgo/plugins/cleanupNumericValues.js
deleted file mode 100644
index 9b782c3d..00000000
--- a/node_modules/svgo/plugins/cleanupNumericValues.js
+++ /dev/null
@@ -1,106 +0,0 @@
-'use strict';
-
-const { removeLeadingZero } = require('../lib/svgo/tools');
-
-exports.name = 'cleanupNumericValues';
-exports.description =
- 'rounds numeric values to the fixed precision, removes default ‘px’ units';
-
-const regNumericValues =
- /^([-+]?\d*\.?\d+([eE][-+]?\d+)?)(px|pt|pc|mm|cm|m|in|ft|em|ex|%)?$/;
-
-const absoluteLengths = {
- // relative to px
- cm: 96 / 2.54,
- mm: 96 / 25.4,
- in: 96,
- pt: 4 / 3,
- pc: 16,
- px: 1,
-};
-
-/**
- * Round numeric values to the fixed precision,
- * remove default 'px' units.
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'cleanupNumericValues'>}
- */
-exports.fn = (_root, params) => {
- const {
- floatPrecision = 3,
- leadingZero = true,
- defaultPx = true,
- convertToPx = true,
- } = params;
-
- return {
- element: {
- enter: (node) => {
- if (node.attributes.viewBox != null) {
- const nums = node.attributes.viewBox.split(/\s,?\s*|,\s*/g);
- node.attributes.viewBox = nums
- .map((value) => {
- const num = Number(value);
- return Number.isNaN(num)
- ? value
- : Number(num.toFixed(floatPrecision));
- })
- .join(' ');
- }
-
- for (const [name, value] of Object.entries(node.attributes)) {
- // The `version` attribute is a text string and cannot be rounded
- if (name === 'version') {
- continue;
- }
-
- const match = value.match(regNumericValues);
-
- // if attribute value matches regNumericValues
- if (match) {
- // round it to the fixed precision
- let num = Number(Number(match[1]).toFixed(floatPrecision));
- /**
- * @type {any}
- */
- let matchedUnit = match[3] || '';
- /**
- * @type{'' | keyof typeof absoluteLengths}
- */
- let units = matchedUnit;
-
- // convert absolute values to pixels
- if (convertToPx && units !== '' && units in absoluteLengths) {
- const pxNum = Number(
- (absoluteLengths[units] * Number(match[1])).toFixed(
- floatPrecision,
- ),
- );
- if (pxNum.toString().length < match[0].length) {
- num = pxNum;
- units = 'px';
- }
- }
-
- // and remove leading zero
- let str;
- if (leadingZero) {
- str = removeLeadingZero(num);
- } else {
- str = num.toString();
- }
-
- // remove default 'px' units
- if (defaultPx && units === 'px') {
- units = '';
- }
-
- node.attributes[name] = str + units;
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/collapseGroups.js b/node_modules/svgo/plugins/collapseGroups.js
deleted file mode 100644
index 0534ad77..00000000
--- a/node_modules/svgo/plugins/collapseGroups.js
+++ /dev/null
@@ -1,134 +0,0 @@
-'use strict';
-
-/**
- * @typedef {import('../lib/types').XastNode} XastNode
- */
-
-const { inheritableAttrs, elemsGroups } = require('./_collections.js');
-
-exports.name = 'collapseGroups';
-exports.description = 'collapses useless groups';
-
-/**
- * @type {(node: XastNode, name: string) => boolean}
- */
-const hasAnimatedAttr = (node, name) => {
- if (node.type === 'element') {
- if (
- elemsGroups.animation.has(node.name) &&
- node.attributes.attributeName === name
- ) {
- return true;
- }
- for (const child of node.children) {
- if (hasAnimatedAttr(child, name)) {
- return true;
- }
- }
- }
- return false;
-};
-
-/**
- * Collapse useless groups.
- *
- * @example
- * <g>
- * <g attr1="val1">
- * <path d="..."/>
- * </g>
- * </g>
- * ⬇
- * <g>
- * <g>
- * <path attr1="val1" d="..."/>
- * </g>
- * </g>
- * ⬇
- * <path attr1="val1" d="..."/>
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'collapseGroups'>}
- */
-exports.fn = () => {
- return {
- element: {
- exit: (node, parentNode) => {
- if (parentNode.type === 'root' || parentNode.name === 'switch') {
- return;
- }
- // non-empty groups
- if (node.name !== 'g' || node.children.length === 0) {
- return;
- }
-
- // move group attributes to the single child element
- if (
- Object.keys(node.attributes).length !== 0 &&
- node.children.length === 1
- ) {
- const firstChild = node.children[0];
- // TODO untangle this mess
- if (
- firstChild.type === 'element' &&
- firstChild.attributes.id == null &&
- node.attributes.filter == null &&
- (node.attributes.class == null ||
- firstChild.attributes.class == null) &&
- ((node.attributes['clip-path'] == null &&
- node.attributes.mask == null) ||
- (firstChild.name === 'g' &&
- node.attributes.transform == null &&
- firstChild.attributes.transform == null))
- ) {
- for (const [name, value] of Object.entries(node.attributes)) {
- // avoid copying to not conflict with animated attribute
- if (hasAnimatedAttr(firstChild, name)) {
- return;
- }
- if (firstChild.attributes[name] == null) {
- firstChild.attributes[name] = value;
- } else if (name === 'transform') {
- firstChild.attributes[name] =
- value + ' ' + firstChild.attributes[name];
- } else if (firstChild.attributes[name] === 'inherit') {
- firstChild.attributes[name] = value;
- } else if (
- inheritableAttrs.has(name) === false &&
- firstChild.attributes[name] !== value
- ) {
- return;
- }
- delete node.attributes[name];
- }
- }
- }
-
- // collapse groups without attributes
- if (Object.keys(node.attributes).length === 0) {
- // animation elements "add" attributes to group
- // group should be preserved
- for (const child of node.children) {
- if (
- child.type === 'element' &&
- elemsGroups.animation.has(child.name)
- ) {
- return;
- }
- }
- // replace current node with all its children
- const index = parentNode.children.indexOf(node);
- parentNode.children.splice(index, 1, ...node.children);
- // TODO remove legacy parentNode in v4
- for (const child of node.children) {
- Object.defineProperty(child, 'parentNode', {
- writable: true,
- value: parentNode,
- });
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/convertColors.js b/node_modules/svgo/plugins/convertColors.js
deleted file mode 100644
index d894283f..00000000
--- a/node_modules/svgo/plugins/convertColors.js
+++ /dev/null
@@ -1,144 +0,0 @@
-'use strict';
-
-const collections = require('./_collections.js');
-
-exports.name = 'convertColors';
-exports.description = 'converts colors: rgb() to #rrggbb and #rrggbb to #rgb';
-
-const rNumber = '([+-]?(?:\\d*\\.\\d+|\\d+\\.?)%?)';
-const rComma = '\\s*,\\s*';
-const regRGB = new RegExp(
- '^rgb\\(\\s*' + rNumber + rComma + rNumber + rComma + rNumber + '\\s*\\)$',
-);
-const regHEX = /^#(([a-fA-F0-9])\2){3}$/;
-
-/**
- * Convert [r, g, b] to #rrggbb.
- *
- * @see https://gist.github.com/983535
- *
- * @example
- * rgb2hex([255, 255, 255]) // '#ffffff'
- *
- * @author Jed Schmidt
- *
- * @type {(rgb: number[]) => string}
- */
-const convertRgbToHex = ([r, g, b]) => {
- // combine the octets into a 32-bit integer as: [1][r][g][b]
- const hexNumber =
- // operator precedence is (+) > (<<) > (|)
- ((((256 + // [1][0]
- r) << // [1][r]
- 8) | // [1][r][0]
- g) << // [1][r][g]
- 8) | // [1][r][g][0]
- b;
- // serialize [1][r][g][b] to a hex string, and
- // remove the 1 to get the number with 0s intact
- return '#' + hexNumber.toString(16).slice(1).toUpperCase();
-};
-
-/**
- * Convert different colors formats in element attributes to hex.
- *
- * @see https://www.w3.org/TR/SVG11/types.html#DataTypeColor
- * @see https://www.w3.org/TR/SVG11/single-page.html#types-ColorKeywords
- *
- * @example
- * Convert color name keyword to long hex:
- * fuchsia ➡ #ff00ff
- *
- * Convert rgb() to long hex:
- * rgb(255, 0, 255) ➡ #ff00ff
- * rgb(50%, 100, 100%) ➡ #7f64ff
- *
- * Convert long hex to short hex:
- * #aabbcc ➡ #abc
- *
- * Convert hex to short name
- * #000080 ➡ navy
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'convertColors'>}
- */
-exports.fn = (_root, params) => {
- const {
- currentColor = false,
- names2hex = true,
- rgb2hex = true,
- shorthex = true,
- shortname = true,
- } = params;
-
- return {
- element: {
- enter: (node) => {
- for (const [name, value] of Object.entries(node.attributes)) {
- if (collections.colorsProps.has(name)) {
- let val = value;
-
- // convert colors to currentColor
- if (currentColor) {
- let matched;
- if (typeof currentColor === 'string') {
- matched = val === currentColor;
- } else if (currentColor instanceof RegExp) {
- matched = currentColor.exec(val) != null;
- } else {
- matched = val !== 'none';
- }
- if (matched) {
- val = 'currentColor';
- }
- }
-
- // convert color name keyword to long hex
- if (names2hex) {
- const colorName = val.toLowerCase();
- if (collections.colorsNames[colorName] != null) {
- val = collections.colorsNames[colorName];
- }
- }
-
- // convert rgb() to long hex
- if (rgb2hex) {
- let match = val.match(regRGB);
- if (match != null) {
- let nums = match.slice(1, 4).map((m) => {
- let n;
- if (m.indexOf('%') > -1) {
- n = Math.round(parseFloat(m) * 2.55);
- } else {
- n = Number(m);
- }
- return Math.max(0, Math.min(n, 255));
- });
- val = convertRgbToHex(nums);
- }
- }
-
- // convert long hex to short hex
- if (shorthex) {
- let match = val.match(regHEX);
- if (match != null) {
- val = '#' + match[0][1] + match[0][3] + match[0][5];
- }
- }
-
- // convert hex to short name
- if (shortname) {
- const colorName = val.toLowerCase();
- if (collections.colorsShortNames[colorName] != null) {
- val = collections.colorsShortNames[colorName];
- }
- }
-
- node.attributes[name] = val;
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/convertEllipseToCircle.js b/node_modules/svgo/plugins/convertEllipseToCircle.js
deleted file mode 100644
index 50fa20db..00000000
--- a/node_modules/svgo/plugins/convertEllipseToCircle.js
+++ /dev/null
@@ -1,37 +0,0 @@
-'use strict';
-
-exports.name = 'convertEllipseToCircle';
-exports.description = 'converts non-eccentric <ellipse>s to <circle>s';
-
-/**
- * Converts non-eccentric <ellipse>s to <circle>s.
- *
- * @see https://www.w3.org/TR/SVG11/shapes.html
- *
- * @author Taylor Hunt
- *
- * @type {import('./plugins-types').Plugin<'convertEllipseToCircle'>}
- */
-exports.fn = () => {
- return {
- element: {
- enter: (node) => {
- if (node.name === 'ellipse') {
- const rx = node.attributes.rx || '0';
- const ry = node.attributes.ry || '0';
- if (
- rx === ry ||
- rx === 'auto' ||
- ry === 'auto' // SVG2
- ) {
- node.name = 'circle';
- const radius = rx === 'auto' ? ry : rx;
- delete node.attributes.rx;
- delete node.attributes.ry;
- node.attributes.r = radius;
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/convertOneStopGradients.js b/node_modules/svgo/plugins/convertOneStopGradients.js
deleted file mode 100644
index 1cf0d66b..00000000
--- a/node_modules/svgo/plugins/convertOneStopGradients.js
+++ /dev/null
@@ -1,168 +0,0 @@
-'use strict';
-
-/**
- * @typedef {import('../lib/types').XastElement} XastElement
- * @typedef {import('../lib/types').XastParent} XastParent
- */
-
-const { attrsGroupsDefaults, colorsProps } = require('./_collections');
-const {
- detachNodeFromParent,
- querySelectorAll,
- querySelector,
-} = require('../lib/xast');
-const { computeStyle, collectStylesheet } = require('../lib/style');
-
-exports.name = 'convertOneStopGradients';
-exports.description =
- 'converts one-stop (single color) gradients to a plain color';
-
-/**
- * Converts one-stop (single color) gradients to a plain color.
- *
- * @author Seth Falco <seth@falco.fun>
- * @type {import('./plugins-types').Plugin<'convertOneStopGradients'>}
- * @see https://developer.mozilla.org/docs/Web/SVG/Element/linearGradient
- * @see https://developer.mozilla.org/docs/Web/SVG/Element/radialGradient
- */
-exports.fn = (root) => {
- const stylesheet = collectStylesheet(root);
-
- /**
- * Parent defs that had gradients elements removed from them.
- *
- * @type {Set<XastElement>}
- */
- const effectedDefs = new Set();
-
- /**
- * @type {Map<XastElement, XastParent>}
- */
- const allDefs = new Map();
-
- /**
- * @type {Map<XastElement, XastParent>}
- */
- const gradientsToDetach = new Map();
-
- /** Number of references to the xlink:href attribute. */
- let xlinkHrefCount = 0;
-
- return {
- element: {
- enter: (node, parentNode) => {
- if (node.attributes['xlink:href'] != null) {
- xlinkHrefCount++;
- }
-
- if (node.name === 'defs') {
- allDefs.set(node, parentNode);
- return;
- }
-
- if (node.name !== 'linearGradient' && node.name !== 'radialGradient') {
- return;
- }
-
- const stops = node.children.filter((child) => {
- return child.type === 'element' && child.name === 'stop';
- });
-
- const href = node.attributes['xlink:href'] || node.attributes['href'];
- let effectiveNode =
- stops.length === 0 && href != null && href.startsWith('#')
- ? querySelector(root, href)
- : node;
-
- if (effectiveNode == null || effectiveNode.type !== 'element') {
- gradientsToDetach.set(node, parentNode);
- return;
- }
-
- const effectiveStops = effectiveNode.children.filter((child) => {
- return child.type === 'element' && child.name === 'stop';
- });
-
- if (
- effectiveStops.length !== 1 ||
- effectiveStops[0].type !== 'element'
- ) {
- return;
- }
-
- if (parentNode.type === 'element' && parentNode.name === 'defs') {
- effectedDefs.add(parentNode);
- }
-
- gradientsToDetach.set(node, parentNode);
-
- let color;
- const style = computeStyle(stylesheet, effectiveStops[0])['stop-color'];
- if (style != null && style.type === 'static') {
- color = style.value;
- }
-
- const selectorVal = `url(#${node.attributes.id})`;
-
- const selector = [...colorsProps]
- .map((attr) => `[${attr}="${selectorVal}"]`)
- .join(',');
- const elements = querySelectorAll(root, selector);
- for (const element of elements) {
- if (element.type !== 'element') {
- continue;
- }
-
- for (const attr of colorsProps) {
- if (element.attributes[attr] !== selectorVal) {
- continue;
- }
-
- if (color != null) {
- element.attributes[attr] = color;
- } else {
- delete element.attributes[attr];
- }
- }
- }
-
- const styledElements = querySelectorAll(
- root,
- `[style*=${selectorVal}]`,
- );
- for (const element of styledElements) {
- if (element.type !== 'element') {
- continue;
- }
-
- element.attributes.style = element.attributes.style.replace(
- selectorVal,
- color || attrsGroupsDefaults.presentation['stop-color'],
- );
- }
- },
-
- exit: (node) => {
- if (node.name === 'svg') {
- for (const [gradient, parent] of gradientsToDetach.entries()) {
- if (gradient.attributes['xlink:href'] != null) {
- xlinkHrefCount--;
- }
-
- detachNodeFromParent(gradient, parent);
- }
-
- if (xlinkHrefCount === 0) {
- delete node.attributes['xmlns:xlink'];
- }
-
- for (const [defs, parent] of allDefs.entries()) {
- if (effectedDefs.has(defs) && defs.children.length === 0) {
- detachNodeFromParent(defs, parent);
- }
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/convertPathData.js b/node_modules/svgo/plugins/convertPathData.js
deleted file mode 100644
index de7b357f..00000000
--- a/node_modules/svgo/plugins/convertPathData.js
+++ /dev/null
@@ -1,1284 +0,0 @@
-'use strict';
-
-/**
- * @typedef {import('../lib//types').PathDataItem} PathDataItem
- */
-
-const { collectStylesheet, computeStyle } = require('../lib/style.js');
-const { visit } = require('../lib/xast.js');
-const { pathElems } = require('./_collections.js');
-const { path2js, js2path } = require('./_path.js');
-const { applyTransforms } = require('./applyTransforms.js');
-const { cleanupOutData, toFixed } = require('../lib/svgo/tools');
-
-exports.name = 'convertPathData';
-exports.description =
- 'optimizes path data: writes in shorter form, applies transformations';
-
-/** @type {(data: number[]) => number[]} */
-let roundData;
-/** @type {number | false} */
-let precision;
-/** @type {number} */
-let error;
-/** @type {number} */
-let arcThreshold;
-/** @type {number} */
-let arcTolerance;
-
-/**
- * @typedef {{
- * applyTransforms: boolean,
- * applyTransformsStroked: boolean,
- * makeArcs: {
- * threshold: number,
- * tolerance: number,
- * },
- * straightCurves: boolean,
- * convertToQ: boolean,
- * lineShorthands: boolean,
- * convertToZ: boolean,
- * curveSmoothShorthands: boolean,
- * floatPrecision: number | false,
- * transformPrecision: number,
- * smartArcRounding: boolean,
- * removeUseless: boolean,
- * collapseRepeated: boolean,
- * utilizeAbsolute: boolean,
- * leadingZero: boolean,
- * negativeExtraSpace: boolean,
- * noSpaceAfterFlags: boolean,
- * forceAbsolutePath: boolean,
- * }} InternalParams
- */
-
-/**
- * @typedef {[number, number]} Point
- */
-
-/**
- * @typedef {{
- * center: Point,
- * radius: number
- * }} Circle
- */
-
-/**
- * Convert absolute Path to relative,
- * collapse repeated instructions,
- * detect and convert Lineto shorthands,
- * remove useless instructions like "l0,0",
- * trim useless delimiters and leading zeros,
- * decrease accuracy of floating-point numbers.
- *
- * @see https://www.w3.org/TR/SVG11/paths.html#PathData
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'convertPathData'>}
- */
-exports.fn = (root, params) => {
- const {
- // TODO convert to separate plugin in v3
- applyTransforms: _applyTransforms = true,
- applyTransformsStroked = true,
- makeArcs = {
- threshold: 2.5, // coefficient of rounding error
- tolerance: 0.5, // percentage of radius
- },
- straightCurves = true,
- convertToQ = true,
- lineShorthands = true,
- convertToZ = true,
- curveSmoothShorthands = true,
- floatPrecision = 3,
- transformPrecision = 5,
- smartArcRounding = true,
- removeUseless = true,
- collapseRepeated = true,
- utilizeAbsolute = true,
- leadingZero = true,
- negativeExtraSpace = true,
- noSpaceAfterFlags = false, // a20 60 45 0 1 30 20 → a20 60 45 0130 20
- forceAbsolutePath = false,
- } = params;
-
- /**
- * @type {InternalParams}
- */
- const newParams = {
- applyTransforms: _applyTransforms,
- applyTransformsStroked,
- makeArcs,
- straightCurves,
- convertToQ,
- lineShorthands,
- convertToZ,
- curveSmoothShorthands,
- floatPrecision,
- transformPrecision,
- smartArcRounding,
- removeUseless,
- collapseRepeated,
- utilizeAbsolute,
- leadingZero,
- negativeExtraSpace,
- noSpaceAfterFlags,
- forceAbsolutePath,
- };
-
- // invoke applyTransforms plugin
- if (_applyTransforms) {
- visit(
- root,
- // @ts-ignore
- applyTransforms(root, {
- transformPrecision,
- applyTransformsStroked,
- }),
- );
- }
-
- const stylesheet = collectStylesheet(root);
- return {
- element: {
- enter: (node) => {
- if (pathElems.has(node.name) && node.attributes.d != null) {
- const computedStyle = computeStyle(stylesheet, node);
- precision = floatPrecision;
- error =
- precision !== false
- ? +Math.pow(0.1, precision).toFixed(precision)
- : 1e-2;
- roundData =
- precision && precision > 0 && precision < 20 ? strongRound : round;
- if (makeArcs) {
- arcThreshold = makeArcs.threshold;
- arcTolerance = makeArcs.tolerance;
- }
- const hasMarkerMid = computedStyle['marker-mid'] != null;
-
- const maybeHasStroke =
- computedStyle.stroke &&
- (computedStyle.stroke.type === 'dynamic' ||
- computedStyle.stroke.value !== 'none');
- const maybeHasLinecap =
- computedStyle['stroke-linecap'] &&
- (computedStyle['stroke-linecap'].type === 'dynamic' ||
- computedStyle['stroke-linecap'].value !== 'butt');
- const maybeHasStrokeAndLinecap = maybeHasStroke && maybeHasLinecap;
- const isSafeToUseZ = maybeHasStroke
- ? computedStyle['stroke-linecap']?.type === 'static' &&
- computedStyle['stroke-linecap'].value === 'round' &&
- computedStyle['stroke-linejoin']?.type === 'static' &&
- computedStyle['stroke-linejoin'].value === 'round'
- : true;
-
- var data = path2js(node);
-
- // TODO: get rid of functions returns
- if (data.length) {
- convertToRelative(data);
-
- data = filters(data, newParams, {
- isSafeToUseZ,
- maybeHasStrokeAndLinecap,
- hasMarkerMid,
- });
-
- if (utilizeAbsolute) {
- data = convertToMixed(data, newParams);
- }
-
- // @ts-ignore
- js2path(node, data, newParams);
- }
- }
- },
- },
- };
-};
-
-/**
- * Convert absolute path data coordinates to relative.
- *
- * @type {(pathData: PathDataItem[]) => PathDataItem[]}
- */
-const convertToRelative = (pathData) => {
- let start = [0, 0];
- let cursor = [0, 0];
- let prevCoords = [0, 0];
-
- for (let i = 0; i < pathData.length; i += 1) {
- const pathItem = pathData[i];
- let { command, args } = pathItem;
-
- // moveto (x y)
- if (command === 'm') {
- // update start and cursor
- cursor[0] += args[0];
- cursor[1] += args[1];
- start[0] = cursor[0];
- start[1] = cursor[1];
- }
- if (command === 'M') {
- // M → m
- // skip first moveto
- if (i !== 0) {
- command = 'm';
- }
- args[0] -= cursor[0];
- args[1] -= cursor[1];
- // update start and cursor
- cursor[0] += args[0];
- cursor[1] += args[1];
- start[0] = cursor[0];
- start[1] = cursor[1];
- }
-
- // lineto (x y)
- if (command === 'l') {
- cursor[0] += args[0];
- cursor[1] += args[1];
- }
- if (command === 'L') {
- // L → l
- command = 'l';
- args[0] -= cursor[0];
- args[1] -= cursor[1];
- cursor[0] += args[0];
- cursor[1] += args[1];
- }
-
- // horizontal lineto (x)
- if (command === 'h') {
- cursor[0] += args[0];
- }
- if (command === 'H') {
- // H → h
- command = 'h';
- args[0] -= cursor[0];
- cursor[0] += args[0];
- }
-
- // vertical lineto (y)
- if (command === 'v') {
- cursor[1] += args[0];
- }
- if (command === 'V') {
- // V → v
- command = 'v';
- args[0] -= cursor[1];
- cursor[1] += args[0];
- }
-
- // curveto (x1 y1 x2 y2 x y)
- if (command === 'c') {
- cursor[0] += args[4];
- cursor[1] += args[5];
- }
- if (command === 'C') {
- // C → c
- command = 'c';
- args[0] -= cursor[0];
- args[1] -= cursor[1];
- args[2] -= cursor[0];
- args[3] -= cursor[1];
- args[4] -= cursor[0];
- args[5] -= cursor[1];
- cursor[0] += args[4];
- cursor[1] += args[5];
- }
-
- // smooth curveto (x2 y2 x y)
- if (command === 's') {
- cursor[0] += args[2];
- cursor[1] += args[3];
- }
- if (command === 'S') {
- // S → s
- command = 's';
- args[0] -= cursor[0];
- args[1] -= cursor[1];
- args[2] -= cursor[0];
- args[3] -= cursor[1];
- cursor[0] += args[2];
- cursor[1] += args[3];
- }
-
- // quadratic Bézier curveto (x1 y1 x y)
- if (command === 'q') {
- cursor[0] += args[2];
- cursor[1] += args[3];
- }
- if (command === 'Q') {
- // Q → q
- command = 'q';
- args[0] -= cursor[0];
- args[1] -= cursor[1];
- args[2] -= cursor[0];
- args[3] -= cursor[1];
- cursor[0] += args[2];
- cursor[1] += args[3];
- }
-
- // smooth quadratic Bézier curveto (x y)
- if (command === 't') {
- cursor[0] += args[0];
- cursor[1] += args[1];
- }
- if (command === 'T') {
- // T → t
- command = 't';
- args[0] -= cursor[0];
- args[1] -= cursor[1];
- cursor[0] += args[0];
- cursor[1] += args[1];
- }
-
- // elliptical arc (rx ry x-axis-rotation large-arc-flag sweep-flag x y)
- if (command === 'a') {
- cursor[0] += args[5];
- cursor[1] += args[6];
- }
- if (command === 'A') {
- // A → a
- command = 'a';
- args[5] -= cursor[0];
- args[6] -= cursor[1];
- cursor[0] += args[5];
- cursor[1] += args[6];
- }
-
- // closepath
- if (command === 'Z' || command === 'z') {
- // reset cursor
- cursor[0] = start[0];
- cursor[1] = start[1];
- }
-
- pathItem.command = command;
- pathItem.args = args;
- // store absolute coordinates for later use
- // base should preserve reference from other element
- // @ts-ignore
- pathItem.base = prevCoords;
- // @ts-ignore
- pathItem.coords = [cursor[0], cursor[1]];
- // @ts-ignore
- prevCoords = pathItem.coords;
- }
-
- return pathData;
-};
-
-/**
- * Main filters loop.
- *
- * @type {(
- * path: PathDataItem[],
- * params: InternalParams,
- * aux: { isSafeToUseZ: boolean, maybeHasStrokeAndLinecap: boolean, hasMarkerMid: boolean }
- * ) => PathDataItem[]}
- */
-function filters(
- path,
- params,
- { isSafeToUseZ, maybeHasStrokeAndLinecap, hasMarkerMid },
-) {
- const stringify = data2Path.bind(null, params);
- const relSubpoint = [0, 0];
- const pathBase = [0, 0];
- /** @type {any} */
- let prev = {};
- /** @type {Point | undefined} */
- let prevQControlPoint;
-
- path = path.filter(function (item, index, path) {
- const qControlPoint = prevQControlPoint;
- prevQControlPoint = undefined;
-
- let command = item.command;
- let data = item.args;
- let next = path[index + 1];
-
- if (command !== 'Z' && command !== 'z') {
- var sdata = data,
- circle;
-
- if (command === 's') {
- sdata = [0, 0].concat(data);
-
- const pdata = prev.args;
- const n = pdata.length;
-
- // (-x, -y) of the prev tangent point relative to the current point
- sdata[0] = pdata[n - 2] - pdata[n - 4];
- sdata[1] = pdata[n - 1] - pdata[n - 3];
- }
-
- // convert curves to arcs if possible
- if (
- params.makeArcs &&
- (command == 'c' || command == 's') &&
- isConvex(sdata) &&
- (circle = findCircle(sdata))
- ) {
- var r = roundData([circle.radius])[0],
- angle = findArcAngle(sdata, circle),
- sweep = sdata[5] * sdata[0] - sdata[4] * sdata[1] > 0 ? 1 : 0,
- /**
- * @type {PathDataItem}
- */
- arc = {
- command: 'a',
- args: [r, r, 0, 0, sweep, sdata[4], sdata[5]],
- // @ts-ignore
- coords: item.coords.slice(),
- // @ts-ignore
- base: item.base,
- },
- /**
- * @type {PathDataItem[]}
- */
- output = [arc],
- // relative coordinates to adjust the found circle
- /**
- * @type {Point}
- */
- relCenter = [
- circle.center[0] - sdata[4],
- circle.center[1] - sdata[5],
- ],
- relCircle = { center: relCenter, radius: circle.radius },
- arcCurves = [item],
- hasPrev = 0,
- suffix = '',
- nextLonghand;
-
- if (
- (prev.command == 'c' &&
- isConvex(prev.args) &&
- isArcPrev(prev.args, circle)) ||
- (prev.command == 'a' && prev.sdata && isArcPrev(prev.sdata, circle))
- ) {
- arcCurves.unshift(prev);
- // @ts-ignore
- arc.base = prev.base;
- // @ts-ignore
- arc.args[5] = arc.coords[0] - arc.base[0];
- // @ts-ignore
- arc.args[6] = arc.coords[1] - arc.base[1];
- var prevData = prev.command == 'a' ? prev.sdata : prev.args;
- var prevAngle = findArcAngle(prevData, {
- center: [
- prevData[4] + circle.center[0],
- prevData[5] + circle.center[1],
- ],
- radius: circle.radius,
- });
- angle += prevAngle;
- if (angle > Math.PI) arc.args[3] = 1;
- hasPrev = 1;
- }
-
- // check if next curves are fitting the arc
- for (
- var j = index;
- (next = path[++j]) && (next.command === 'c' || next.command === 's');
-
- ) {
- var nextData = next.args;
- if (next.command == 's') {
- nextLonghand = makeLonghand(
- { command: 's', args: next.args.slice() },
- path[j - 1].args,
- );
- nextData = nextLonghand.args;
- nextLonghand.args = nextData.slice(0, 2);
- suffix = stringify([nextLonghand]);
- }
- if (isConvex(nextData) && isArc(nextData, relCircle)) {
- angle += findArcAngle(nextData, relCircle);
- if (angle - 2 * Math.PI > 1e-3) break; // more than 360°
- if (angle > Math.PI) arc.args[3] = 1;
- arcCurves.push(next);
- if (2 * Math.PI - angle > 1e-3) {
- // less than 360°
- // @ts-ignore
- arc.coords = next.coords;
- // @ts-ignore
- arc.args[5] = arc.coords[0] - arc.base[0];
- // @ts-ignore
- arc.args[6] = arc.coords[1] - arc.base[1];
- } else {
- // full circle, make a half-circle arc and add a second one
- arc.args[5] = 2 * (relCircle.center[0] - nextData[4]);
- arc.args[6] = 2 * (relCircle.center[1] - nextData[5]);
- // @ts-ignore
- arc.coords = [
- // @ts-ignore
- arc.base[0] + arc.args[5],
- // @ts-ignore
- arc.base[1] + arc.args[6],
- ];
- arc = {
- command: 'a',
- args: [
- r,
- r,
- 0,
- 0,
- sweep,
- // @ts-ignore
- next.coords[0] - arc.coords[0],
- // @ts-ignore
- next.coords[1] - arc.coords[1],
- ],
- // @ts-ignore
- coords: next.coords,
- // @ts-ignore
- base: arc.coords,
- };
- output.push(arc);
- j++;
- break;
- }
- relCenter[0] -= nextData[4];
- relCenter[1] -= nextData[5];
- } else break;
- }
-
- if ((stringify(output) + suffix).length < stringify(arcCurves).length) {
- if (path[j] && path[j].command == 's') {
- makeLonghand(path[j], path[j - 1].args);
- }
- if (hasPrev) {
- var prevArc = output.shift();
- // @ts-ignore
- roundData(prevArc.args);
- // @ts-ignore
- relSubpoint[0] += prevArc.args[5] - prev.args[prev.args.length - 2];
- // @ts-ignore
- relSubpoint[1] += prevArc.args[6] - prev.args[prev.args.length - 1];
- prev.command = 'a';
- // @ts-ignore
- prev.args = prevArc.args;
- // @ts-ignore
- item.base = prev.coords = prevArc.coords;
- }
- // @ts-ignore
- arc = output.shift();
- if (arcCurves.length == 1) {
- // @ts-ignore
- item.sdata = sdata.slice(); // preserve curve data for future checks
- } else if (arcCurves.length - 1 - hasPrev > 0) {
- // filter out consumed next items
- path.splice(index + 1, arcCurves.length - 1 - hasPrev, ...output);
- }
- if (!arc) return false;
- command = 'a';
- data = arc.args;
- // @ts-ignore
- item.coords = arc.coords;
- }
- }
-
- // Rounding relative coordinates, taking in account accumulating error
- // to get closer to absolute coordinates. Sum of rounded value remains same:
- // l .25 3 .25 2 .25 3 .25 2 -> l .3 3 .2 2 .3 3 .2 2
- if (precision !== false) {
- if (
- command === 'm' ||
- command === 'l' ||
- command === 't' ||
- command === 'q' ||
- command === 's' ||
- command === 'c'
- ) {
- for (var i = data.length; i--; ) {
- // @ts-ignore
- data[i] += item.base[i % 2] - relSubpoint[i % 2];
- }
- } else if (command == 'h') {
- // @ts-ignore
- data[0] += item.base[0] - relSubpoint[0];
- } else if (command == 'v') {
- // @ts-ignore
- data[0] += item.base[1] - relSubpoint[1];
- } else if (command == 'a') {
- // @ts-ignore
- data[5] += item.base[0] - relSubpoint[0];
- // @ts-ignore
- data[6] += item.base[1] - relSubpoint[1];
- }
- roundData(data);
-
- if (command == 'h') relSubpoint[0] += data[0];
- else if (command == 'v') relSubpoint[1] += data[0];
- else {
- relSubpoint[0] += data[data.length - 2];
- relSubpoint[1] += data[data.length - 1];
- }
- roundData(relSubpoint);
-
- if (command === 'M' || command === 'm') {
- pathBase[0] = relSubpoint[0];
- pathBase[1] = relSubpoint[1];
- }
- }
-
- // round arc radius more accurately
- // eg m 0 0 a 1234.567 1234.567 0 0 1 10 0 -> m 0 0 a 1235 1235 0 0 1 10 0
- const sagitta = command === 'a' ? calculateSagitta(data) : undefined;
- if (params.smartArcRounding && sagitta !== undefined && precision) {
- for (let precisionNew = precision; precisionNew >= 0; precisionNew--) {
- const radius = toFixed(data[0], precisionNew);
- const sagittaNew = /** @type {number} */ (
- calculateSagitta([radius, radius, ...data.slice(2)])
- );
- if (Math.abs(sagitta - sagittaNew) < error) {
- data[0] = radius;
- data[1] = radius;
- } else {
- break;
- }
- }
- }
-
- // convert straight curves into lines segments
- if (params.straightCurves) {
- if (
- (command === 'c' && isCurveStraightLine(data)) ||
- (command === 's' && isCurveStraightLine(sdata))
- ) {
- if (next && next.command == 's') makeLonghand(next, data); // fix up next curve
- command = 'l';
- data = data.slice(-2);
- } else if (command === 'q' && isCurveStraightLine(data)) {
- if (next && next.command == 't') makeLonghand(next, data); // fix up next curve
- command = 'l';
- data = data.slice(-2);
- } else if (
- command === 't' &&
- prev.command !== 'q' &&
- prev.command !== 't'
- ) {
- command = 'l';
- data = data.slice(-2);
- } else if (
- command === 'a' &&
- (data[0] === 0 ||
- data[1] === 0 ||
- (sagitta !== undefined && sagitta < error))
- ) {
- command = 'l';
- data = data.slice(-2);
- }
- }
-
- // degree-lower c to q when possible
- // m 0 12 C 4 4 8 4 12 12 → M 0 12 Q 6 0 12 12
- if (params.convertToQ && command == 'c') {
- const x1 =
- // @ts-ignore
- 0.75 * (item.base[0] + data[0]) - 0.25 * item.base[0];
- const x2 =
- // @ts-ignore
- 0.75 * (item.base[0] + data[2]) - 0.25 * (item.base[0] + data[4]);
- if (Math.abs(x1 - x2) < error * 2) {
- const y1 =
- // @ts-ignore
- 0.75 * (item.base[1] + data[1]) - 0.25 * item.base[1];
- const y2 =
- // @ts-ignore
- 0.75 * (item.base[1] + data[3]) - 0.25 * (item.base[1] + data[5]);
- if (Math.abs(y1 - y2) < error * 2) {
- const newData = data.slice();
- newData.splice(
- 0,
- 4,
- // @ts-ignore
- x1 + x2 - item.base[0],
- // @ts-ignore
- y1 + y2 - item.base[1],
- );
- roundData(newData);
- const originalLength = cleanupOutData(data, params).length,
- newLength = cleanupOutData(newData, params).length;
- if (newLength < originalLength) {
- command = 'q';
- data = newData;
- if (next && next.command == 's') makeLonghand(next, data); // fix up next curve
- }
- }
- }
- }
-
- // horizontal and vertical line shorthands
- // l 50 0 → h 50
- // l 0 50 → v 50
- if (params.lineShorthands && command === 'l') {
- if (data[1] === 0) {
- command = 'h';
- data.pop();
- } else if (data[0] === 0) {
- command = 'v';
- data.shift();
- }
- }
-
- // collapse repeated commands
- // h 20 h 30 -> h 50
- if (
- params.collapseRepeated &&
- hasMarkerMid === false &&
- (command === 'm' || command === 'h' || command === 'v') &&
- prev.command &&
- command == prev.command.toLowerCase() &&
- ((command != 'h' && command != 'v') ||
- prev.args[0] >= 0 == data[0] >= 0)
- ) {
- prev.args[0] += data[0];
- if (command != 'h' && command != 'v') {
- prev.args[1] += data[1];
- }
- // @ts-ignore
- prev.coords = item.coords;
- path[index] = prev;
- return false;
- }
-
- // convert curves into smooth shorthands
- if (params.curveSmoothShorthands && prev.command) {
- // curveto
- if (command === 'c') {
- // c + c → c + s
- if (
- prev.command === 'c' &&
- Math.abs(data[0] - -(prev.args[2] - prev.args[4])) < error &&
- Math.abs(data[1] - -(prev.args[3] - prev.args[5])) < error
- ) {
- command = 's';
- data = data.slice(2);
- }
-
- // s + c → s + s
- else if (
- prev.command === 's' &&
- Math.abs(data[0] - -(prev.args[0] - prev.args[2])) < error &&
- Math.abs(data[1] - -(prev.args[1] - prev.args[3])) < error
- ) {
- command = 's';
- data = data.slice(2);
- }
-
- // [^cs] + c → [^cs] + s
- else if (
- prev.command !== 'c' &&
- prev.command !== 's' &&
- Math.abs(data[0]) < error &&
- Math.abs(data[1]) < error
- ) {
- command = 's';
- data = data.slice(2);
- }
- }
-
- // quadratic Bézier curveto
- else if (command === 'q') {
- // q + q → q + t
- if (
- prev.command === 'q' &&
- Math.abs(data[0] - (prev.args[2] - prev.args[0])) < error &&
- Math.abs(data[1] - (prev.args[3] - prev.args[1])) < error
- ) {
- command = 't';
- data = data.slice(2);
- }
-
- // t + q → t + t
- else if (prev.command === 't') {
- const predictedControlPoint = reflectPoint(
- // @ts-ignore
- qControlPoint,
- // @ts-ignore
- item.base,
- );
- const realControlPoint = [
- // @ts-ignore
- data[0] + item.base[0],
- // @ts-ignore
- data[1] + item.base[1],
- ];
- if (
- Math.abs(predictedControlPoint[0] - realControlPoint[0]) <
- error &&
- Math.abs(predictedControlPoint[1] - realControlPoint[1]) < error
- ) {
- command = 't';
- data = data.slice(2);
- }
- }
- }
- }
-
- // remove useless non-first path segments
- if (params.removeUseless && !maybeHasStrokeAndLinecap) {
- // l 0,0 / h 0 / v 0 / q 0,0 0,0 / t 0,0 / c 0,0 0,0 0,0 / s 0,0 0,0
- if (
- (command === 'l' ||
- command === 'h' ||
- command === 'v' ||
- command === 'q' ||
- command === 't' ||
- command === 'c' ||
- command === 's') &&
- data.every(function (i) {
- return i === 0;
- })
- ) {
- path[index] = prev;
- return false;
- }
-
- // a 25,25 -30 0,1 0,0
- if (command === 'a' && data[5] === 0 && data[6] === 0) {
- path[index] = prev;
- return false;
- }
- }
-
- // convert going home to z
- // m 0 0 h 5 v 5 l -5 -5 -> m 0 0 h 5 v 5 z
- if (
- params.convertToZ &&
- (isSafeToUseZ || next?.command === 'Z' || next?.command === 'z') &&
- (command === 'l' || command === 'h' || command === 'v')
- ) {
- if (
- // @ts-ignore
- Math.abs(pathBase[0] - item.coords[0]) < error &&
- // @ts-ignore
- Math.abs(pathBase[1] - item.coords[1]) < error
- ) {
- command = 'z';
- data = [];
- }
- }
-
- item.command = command;
- item.args = data;
- } else {
- // z resets coordinates
- relSubpoint[0] = pathBase[0];
- relSubpoint[1] = pathBase[1];
- if (prev.command === 'Z' || prev.command === 'z') return false;
- }
- if (
- (command === 'Z' || command === 'z') &&
- params.removeUseless &&
- isSafeToUseZ &&
- // @ts-ignore
- Math.abs(item.base[0] - item.coords[0]) < error / 10 &&
- // @ts-ignore
- Math.abs(item.base[1] - item.coords[1]) < error / 10
- )
- return false;
-
- if (command === 'q') {
- // @ts-ignore
- prevQControlPoint = [data[0] + item.base[0], data[1] + item.base[1]];
- } else if (command === 't') {
- if (qControlPoint) {
- // @ts-ignore
- prevQControlPoint = reflectPoint(qControlPoint, item.base);
- } else {
- // @ts-ignore
- prevQControlPoint = item.coords;
- }
- }
- prev = item;
- return true;
- });
-
- return path;
-}
-
-/**
- * Writes data in shortest form using absolute or relative coordinates.
- *
- * @type {(path: PathDataItem[], params: InternalParams) => PathDataItem[]}
- */
-function convertToMixed(path, params) {
- var prev = path[0];
-
- path = path.filter(function (item, index) {
- if (index == 0) return true;
- if (item.command === 'Z' || item.command === 'z') {
- prev = item;
- return true;
- }
-
- var command = item.command,
- data = item.args,
- adata = data.slice(),
- rdata = data.slice();
-
- if (
- command === 'm' ||
- command === 'l' ||
- command === 't' ||
- command === 'q' ||
- command === 's' ||
- command === 'c'
- ) {
- for (var i = adata.length; i--; ) {
- // @ts-ignore
- adata[i] += item.base[i % 2];
- }
- } else if (command == 'h') {
- // @ts-ignore
- adata[0] += item.base[0];
- } else if (command == 'v') {
- // @ts-ignore
- adata[0] += item.base[1];
- } else if (command == 'a') {
- // @ts-ignore
- adata[5] += item.base[0];
- // @ts-ignore
- adata[6] += item.base[1];
- }
-
- roundData(adata);
- roundData(rdata);
-
- var absoluteDataStr = cleanupOutData(adata, params),
- relativeDataStr = cleanupOutData(rdata, params);
-
- // Convert to absolute coordinates if it's shorter or forceAbsolutePath is true.
- // v-20 -> V0
- // Don't convert if it fits following previous command.
- // l20 30-10-50 instead of l20 30L20 30
- if (
- params.forceAbsolutePath ||
- (absoluteDataStr.length < relativeDataStr.length &&
- !(
- params.negativeExtraSpace &&
- command == prev.command &&
- prev.command.charCodeAt(0) > 96 &&
- absoluteDataStr.length == relativeDataStr.length - 1 &&
- (data[0] < 0 ||
- (Math.floor(data[0]) === 0 &&
- !Number.isInteger(data[0]) &&
- prev.args[prev.args.length - 1] % 1))
- ))
- ) {
- // @ts-ignore
- item.command = command.toUpperCase();
- item.args = adata;
- }
-
- prev = item;
- return true;
- });
-
- return path;
-}
-
-/**
- * Checks if curve is convex. Control points of such a curve must form
- * a convex quadrilateral with diagonals crosspoint inside of it.
- *
- * @type {(data: number[]) => boolean}
- */
-function isConvex(data) {
- var center = getIntersection([
- 0,
- 0,
- data[2],
- data[3],
- data[0],
- data[1],
- data[4],
- data[5],
- ]);
-
- return (
- center != null &&
- data[2] < center[0] == center[0] < 0 &&
- data[3] < center[1] == center[1] < 0 &&
- data[4] < center[0] == center[0] < data[0] &&
- data[5] < center[1] == center[1] < data[1]
- );
-}
-
-/**
- * Computes lines equations by two points and returns their intersection point.
- *
- * @type {(coords: number[]) => undefined | Point}
- */
-function getIntersection(coords) {
- // Prev line equation parameters.
- var a1 = coords[1] - coords[3], // y1 - y2
- b1 = coords[2] - coords[0], // x2 - x1
- c1 = coords[0] * coords[3] - coords[2] * coords[1], // x1 * y2 - x2 * y1
- // Next line equation parameters
- a2 = coords[5] - coords[7], // y1 - y2
- b2 = coords[6] - coords[4], // x2 - x1
- c2 = coords[4] * coords[7] - coords[5] * coords[6], // x1 * y2 - x2 * y1
- denom = a1 * b2 - a2 * b1;
-
- if (!denom) return; // parallel lines haven't an intersection
-
- /**
- * @type {Point}
- */
- var cross = [(b1 * c2 - b2 * c1) / denom, (a1 * c2 - a2 * c1) / -denom];
- if (
- !isNaN(cross[0]) &&
- !isNaN(cross[1]) &&
- isFinite(cross[0]) &&
- isFinite(cross[1])
- ) {
- return cross;
- }
-}
-
-/**
- * Decrease accuracy of floating-point numbers
- * in path data keeping a specified number of decimals.
- * Smart rounds values like 2.3491 to 2.35 instead of 2.349.
- * Doesn't apply "smartness" if the number precision fits already.
- *
- * @type {(data: number[]) => number[]}
- */
-function strongRound(data) {
- const precisionNum = precision || 0;
- for (let i = data.length; i-- > 0; ) {
- const fixed = toFixed(data[i], precisionNum);
- if (fixed !== data[i]) {
- const rounded = toFixed(data[i], precisionNum - 1);
- data[i] =
- toFixed(Math.abs(rounded - data[i]), precisionNum + 1) >= error
- ? fixed
- : rounded;
- }
- }
- return data;
-}
-
-/**
- * Simple rounding function if precision is 0.
- *
- * @type {(data: number[]) => number[]}
- */
-function round(data) {
- for (var i = data.length; i-- > 0; ) {
- data[i] = Math.round(data[i]);
- }
- return data;
-}
-
-/**
- * Checks if a curve is a straight line by measuring distance
- * from middle points to the line formed by end points.
- *
- * @type {(data: number[]) => boolean}
- */
-function isCurveStraightLine(data) {
- // Get line equation a·x + b·y + c = 0 coefficients a, b (c = 0) by start and end points.
- var i = data.length - 2,
- a = -data[i + 1], // y1 − y2 (y1 = 0)
- b = data[i], // x2 − x1 (x1 = 0)
- d = 1 / (a * a + b * b); // same part for all points
-
- if (i <= 1 || !isFinite(d)) return false; // curve that ends at start point isn't the case
-
- // Distance from point (x0, y0) to the line is sqrt((c − a·x0 − b·y0)² / (a² + b²))
- while ((i -= 2) >= 0) {
- if (Math.sqrt(Math.pow(a * data[i] + b * data[i + 1], 2) * d) > error)
- return false;
- }
-
- return true;
-}
-
-/**
- * Calculates the sagitta of an arc if possible.
- *
- * @type {(data: number[]) => number | undefined}
- * @see https://wikipedia.org/wiki/Sagitta_(geometry)#Formulas
- */
-function calculateSagitta(data) {
- if (data[3] === 1) return undefined;
- const [rx, ry] = data;
- if (Math.abs(rx - ry) > error) return undefined;
- const chord = Math.sqrt(data[5] ** 2 + data[6] ** 2);
- if (chord > rx * 2) return undefined;
- return rx - Math.sqrt(rx ** 2 - 0.25 * chord ** 2);
-}
-
-/**
- * Converts next curve from shorthand to full form using the current curve data.
- *
- * @type {(item: PathDataItem, data: number[]) => PathDataItem}
- */
-function makeLonghand(item, data) {
- switch (item.command) {
- case 's':
- item.command = 'c';
- break;
- case 't':
- item.command = 'q';
- break;
- }
- item.args.unshift(
- data[data.length - 2] - data[data.length - 4],
- data[data.length - 1] - data[data.length - 3],
- );
- return item;
-}
-
-/**
- * Returns distance between two points
- *
- * @type {(point1: Point, point2: Point) => number}
- */
-function getDistance(point1, point2) {
- return Math.sqrt((point1[0] - point2[0]) ** 2 + (point1[1] - point2[1]) ** 2);
-}
-
-/**
- * Reflects point across another point.
- *
- * @param {Point} controlPoint
- * @param {Point} base
- * @returns {Point}
- */
-function reflectPoint(controlPoint, base) {
- return [2 * base[0] - controlPoint[0], 2 * base[1] - controlPoint[1]];
-}
-
-/**
- * Returns coordinates of the curve point corresponding to the certain t
- * a·(1 - t)³·p1 + b·(1 - t)²·t·p2 + c·(1 - t)·t²·p3 + d·t³·p4,
- * where pN are control points and p1 is zero due to relative coordinates.
- *
- * @type {(curve: number[], t: number) => Point}
- */
-function getCubicBezierPoint(curve, t) {
- var sqrT = t * t,
- cubT = sqrT * t,
- mt = 1 - t,
- sqrMt = mt * mt;
-
- return [
- 3 * sqrMt * t * curve[0] + 3 * mt * sqrT * curve[2] + cubT * curve[4],
- 3 * sqrMt * t * curve[1] + 3 * mt * sqrT * curve[3] + cubT * curve[5],
- ];
-}
-
-/**
- * Finds circle by 3 points of the curve and checks if the curve fits the found circle.
- *
- * @type {(curve: number[]) => undefined | Circle}
- */
-function findCircle(curve) {
- var midPoint = getCubicBezierPoint(curve, 1 / 2),
- m1 = [midPoint[0] / 2, midPoint[1] / 2],
- m2 = [(midPoint[0] + curve[4]) / 2, (midPoint[1] + curve[5]) / 2],
- center = getIntersection([
- m1[0],
- m1[1],
- m1[0] + m1[1],
- m1[1] - m1[0],
- m2[0],
- m2[1],
- m2[0] + (m2[1] - midPoint[1]),
- m2[1] - (m2[0] - midPoint[0]),
- ]),
- radius = center && getDistance([0, 0], center),
- // @ts-ignore
- tolerance = Math.min(arcThreshold * error, (arcTolerance * radius) / 100);
-
- if (
- center &&
- // @ts-ignore
- radius < 1e15 &&
- [1 / 4, 3 / 4].every(function (point) {
- return (
- Math.abs(
- // @ts-ignore
- getDistance(getCubicBezierPoint(curve, point), center) - radius,
- ) <= tolerance
- );
- })
- )
- // @ts-ignore
- return { center: center, radius: radius };
-}
-
-/**
- * Checks if a curve fits the given circle.
- *
- * @type {(curve: number[], circle: Circle) => boolean}
- */
-function isArc(curve, circle) {
- var tolerance = Math.min(
- arcThreshold * error,
- (arcTolerance * circle.radius) / 100,
- );
-
- return [0, 1 / 4, 1 / 2, 3 / 4, 1].every(function (point) {
- return (
- Math.abs(
- getDistance(getCubicBezierPoint(curve, point), circle.center) -
- circle.radius,
- ) <= tolerance
- );
- });
-}
-
-/**
- * Checks if a previous curve fits the given circle.
- *
- * @type {(curve: number[], circle: Circle) => boolean}
- */
-function isArcPrev(curve, circle) {
- return isArc(curve, {
- center: [circle.center[0] + curve[4], circle.center[1] + curve[5]],
- radius: circle.radius,
- });
-}
-
-/**
- * Finds angle of a curve fitting the given arc.
-
- * @type {(curve: number[], relCircle: Circle) => number}
- */
-function findArcAngle(curve, relCircle) {
- var x1 = -relCircle.center[0],
- y1 = -relCircle.center[1],
- x2 = curve[4] - relCircle.center[0],
- y2 = curve[5] - relCircle.center[1];
-
- return Math.acos(
- (x1 * x2 + y1 * y2) / Math.sqrt((x1 * x1 + y1 * y1) * (x2 * x2 + y2 * y2)),
- );
-}
-
-/**
- * Converts given path data to string.
- *
- * @type {(params: InternalParams, pathData: PathDataItem[]) => string}
- */
-function data2Path(params, pathData) {
- return pathData.reduce(function (pathString, item) {
- var strData = '';
- if (item.args) {
- strData = cleanupOutData(roundData(item.args.slice()), params);
- }
- return pathString + item.command + strData;
- }, '');
-}
diff --git a/node_modules/svgo/plugins/convertShapeToPath.js b/node_modules/svgo/plugins/convertShapeToPath.js
deleted file mode 100644
index f0ba0fd8..00000000
--- a/node_modules/svgo/plugins/convertShapeToPath.js
+++ /dev/null
@@ -1,170 +0,0 @@
-'use strict';
-
-/**
- * @typedef {import('../lib/types').PathDataItem} PathDataItem
- */
-
-const { stringifyPathData } = require('../lib/path.js');
-const { detachNodeFromParent } = require('../lib/xast.js');
-
-exports.name = 'convertShapeToPath';
-exports.description = 'converts basic shapes to more compact path form';
-
-const regNumber = /[-+]?(?:\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?/g;
-
-/**
- * Converts basic shape to more compact path.
- * It also allows further optimizations like
- * combining paths with similar attributes.
- *
- * @see https://www.w3.org/TR/SVG11/shapes.html
- *
- * @author Lev Solntsev
- *
- * @type {import('./plugins-types').Plugin<'convertShapeToPath'>}
- */
-exports.fn = (root, params) => {
- const { convertArcs = false, floatPrecision: precision } = params;
-
- return {
- element: {
- enter: (node, parentNode) => {
- // convert rect to path
- if (
- node.name === 'rect' &&
- node.attributes.width != null &&
- node.attributes.height != null &&
- node.attributes.rx == null &&
- node.attributes.ry == null
- ) {
- const x = Number(node.attributes.x || '0');
- const y = Number(node.attributes.y || '0');
- const width = Number(node.attributes.width);
- const height = Number(node.attributes.height);
- // Values like '100%' compute to NaN, thus running after
- // cleanupNumericValues when 'px' units has already been removed.
- // TODO: Calculate sizes from % and non-px units if possible.
- if (Number.isNaN(x - y + width - height)) return;
- /**
- * @type {PathDataItem[]}
- */
- const pathData = [
- { command: 'M', args: [x, y] },
- { command: 'H', args: [x + width] },
- { command: 'V', args: [y + height] },
- { command: 'H', args: [x] },
- { command: 'z', args: [] },
- ];
- node.name = 'path';
- node.attributes.d = stringifyPathData({ pathData, precision });
- delete node.attributes.x;
- delete node.attributes.y;
- delete node.attributes.width;
- delete node.attributes.height;
- }
-
- // convert line to path
- if (node.name === 'line') {
- const x1 = Number(node.attributes.x1 || '0');
- const y1 = Number(node.attributes.y1 || '0');
- const x2 = Number(node.attributes.x2 || '0');
- const y2 = Number(node.attributes.y2 || '0');
- if (Number.isNaN(x1 - y1 + x2 - y2)) return;
- /**
- * @type {PathDataItem[]}
- */
- const pathData = [
- { command: 'M', args: [x1, y1] },
- { command: 'L', args: [x2, y2] },
- ];
- node.name = 'path';
- node.attributes.d = stringifyPathData({ pathData, precision });
- delete node.attributes.x1;
- delete node.attributes.y1;
- delete node.attributes.x2;
- delete node.attributes.y2;
- }
-
- // convert polyline and polygon to path
- if (
- (node.name === 'polyline' || node.name === 'polygon') &&
- node.attributes.points != null
- ) {
- const coords = (node.attributes.points.match(regNumber) || []).map(
- Number,
- );
- if (coords.length < 4) {
- detachNodeFromParent(node, parentNode);
- return;
- }
- /**
- * @type {PathDataItem[]}
- */
- const pathData = [];
- for (let i = 0; i < coords.length; i += 2) {
- pathData.push({
- command: i === 0 ? 'M' : 'L',
- args: coords.slice(i, i + 2),
- });
- }
- if (node.name === 'polygon') {
- pathData.push({ command: 'z', args: [] });
- }
- node.name = 'path';
- node.attributes.d = stringifyPathData({ pathData, precision });
- delete node.attributes.points;
- }
-
- // optionally convert circle
- if (node.name === 'circle' && convertArcs) {
- const cx = Number(node.attributes.cx || '0');
- const cy = Number(node.attributes.cy || '0');
- const r = Number(node.attributes.r || '0');
- if (Number.isNaN(cx - cy + r)) {
- return;
- }
- /**
- * @type {PathDataItem[]}
- */
- const pathData = [
- { command: 'M', args: [cx, cy - r] },
- { command: 'A', args: [r, r, 0, 1, 0, cx, cy + r] },
- { command: 'A', args: [r, r, 0, 1, 0, cx, cy - r] },
- { command: 'z', args: [] },
- ];
- node.name = 'path';
- node.attributes.d = stringifyPathData({ pathData, precision });
- delete node.attributes.cx;
- delete node.attributes.cy;
- delete node.attributes.r;
- }
-
- // optionally convert ellipse
- if (node.name === 'ellipse' && convertArcs) {
- const ecx = Number(node.attributes.cx || '0');
- const ecy = Number(node.attributes.cy || '0');
- const rx = Number(node.attributes.rx || '0');
- const ry = Number(node.attributes.ry || '0');
- if (Number.isNaN(ecx - ecy + rx - ry)) {
- return;
- }
- /**
- * @type {PathDataItem[]}
- */
- const pathData = [
- { command: 'M', args: [ecx, ecy - ry] },
- { command: 'A', args: [rx, ry, 0, 1, 0, ecx, ecy + ry] },
- { command: 'A', args: [rx, ry, 0, 1, 0, ecx, ecy - ry] },
- { command: 'z', args: [] },
- ];
- node.name = 'path';
- node.attributes.d = stringifyPathData({ pathData, precision });
- delete node.attributes.cx;
- delete node.attributes.cy;
- delete node.attributes.rx;
- delete node.attributes.ry;
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/convertStyleToAttrs.js b/node_modules/svgo/plugins/convertStyleToAttrs.js
deleted file mode 100644
index a9305fc4..00000000
--- a/node_modules/svgo/plugins/convertStyleToAttrs.js
+++ /dev/null
@@ -1,136 +0,0 @@
-'use strict';
-
-const { attrsGroups } = require('./_collections');
-
-exports.name = 'convertStyleToAttrs';
-exports.description = 'converts style to attributes';
-
-/**
- * @type {(...args: string[]) => string}
- */
-const g = (...args) => {
- return '(?:' + args.join('|') + ')';
-};
-
-const stylingProps = attrsGroups.presentation;
-const rEscape = '\\\\(?:[0-9a-f]{1,6}\\s?|\\r\\n|.)'; // Like \" or \2051. Code points consume one space.
-const rAttr = '\\s*(' + g('[^:;\\\\]', rEscape) + '*?)\\s*'; // attribute name like ‘fill’
-const rSingleQuotes = "'(?:[^'\\n\\r\\\\]|" + rEscape + ")*?(?:'|$)"; // string in single quotes: 'smth'
-const rQuotes = '"(?:[^"\\n\\r\\\\]|' + rEscape + ')*?(?:"|$)'; // string in double quotes: "smth"
-const rQuotedString = new RegExp('^' + g(rSingleQuotes, rQuotes) + '$');
-// Parentheses, E.g.: url(data:image/png;base64,iVBO...).
-// ':' and ';' inside of it should be treated as is. (Just like in strings.)
-const rParenthesis =
- '\\(' + g('[^\'"()\\\\]+', rEscape, rSingleQuotes, rQuotes) + '*?' + '\\)';
-// The value. It can have strings and parentheses (see above). Fallbacks to anything in case of unexpected input.
-const rValue =
- '\\s*(' +
- g(
- '[^!\'"();\\\\]+?',
- rEscape,
- rSingleQuotes,
- rQuotes,
- rParenthesis,
- '[^;]*?',
- ) +
- '*?' +
- ')';
-// End of declaration. Spaces outside of capturing groups help to do natural trimming.
-const rDeclEnd = '\\s*(?:;\\s*|$)';
-// Important rule
-const rImportant = '(\\s*!important(?![-(\\w]))?';
-// Final RegExp to parse CSS declarations.
-const regDeclarationBlock = new RegExp(
- rAttr + ':' + rValue + rImportant + rDeclEnd,
- 'ig',
-);
-// Comments expression. Honors escape sequences and strings.
-const regStripComments = new RegExp(
- g(rEscape, rSingleQuotes, rQuotes, '/\\*[^]*?\\*/'),
- 'ig',
-);
-
-/**
- * Convert style in attributes. Cleanups comments and illegal declarations (without colon) as a side effect.
- *
- * @example
- * <g style="fill:#000; color: #fff;">
- * ⬇
- * <g fill="#000" color="#fff">
- *
- * @example
- * <g style="fill:#000; color: #fff; -webkit-blah: blah">
- * ⬇
- * <g fill="#000" color="#fff" style="-webkit-blah: blah">
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'convertStyleToAttrs'>}
- */
-exports.fn = (_root, params) => {
- const { keepImportant = false } = params;
- return {
- element: {
- enter: (node) => {
- if (node.attributes.style != null) {
- // ['opacity: 1', 'color: #000']
- let styles = [];
- /**
- * @type {Record<string, string>}
- */
- const newAttributes = {};
-
- // Strip CSS comments preserving escape sequences and strings.
- const styleValue = node.attributes.style.replace(
- regStripComments,
- (match) => {
- return match[0] == '/'
- ? ''
- : match[0] == '\\' && /[-g-z]/i.test(match[1])
- ? match[1]
- : match;
- },
- );
-
- regDeclarationBlock.lastIndex = 0;
- for (var rule; (rule = regDeclarationBlock.exec(styleValue)); ) {
- if (!keepImportant || !rule[3]) {
- styles.push([rule[1], rule[2]]);
- }
- }
-
- if (styles.length) {
- styles = styles.filter(function (style) {
- if (style[0]) {
- var prop = style[0].toLowerCase(),
- val = style[1];
-
- if (rQuotedString.test(val)) {
- val = val.slice(1, -1);
- }
-
- if (stylingProps.has(prop)) {
- newAttributes[prop] = val;
-
- return false;
- }
- }
-
- return true;
- });
-
- Object.assign(node.attributes, newAttributes);
-
- if (styles.length) {
- node.attributes.style = styles
- .map((declaration) => declaration.join(':'))
- .join(';');
- } else {
- delete node.attributes.style;
- }
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/convertTransform.js b/node_modules/svgo/plugins/convertTransform.js
deleted file mode 100644
index 6f399078..00000000
--- a/node_modules/svgo/plugins/convertTransform.js
+++ /dev/null
@@ -1,418 +0,0 @@
-'use strict';
-
-/**
- * @typedef {import('../lib/types').XastChild} XastChild
- * @typedef {import('../lib/types').XastElement} XastElement
- * @typedef {import('../lib/types').XastParent} XastParent
- */
-
-const { cleanupOutData, toFixed } = require('../lib/svgo/tools.js');
-const {
- transform2js,
- transformsMultiply,
- matrixToTransform,
-} = require('./_transforms.js');
-
-exports.name = 'convertTransform';
-exports.description = 'collapses multiple transformations and optimizes it';
-
-/**
- * Convert matrices to the short aliases,
- * convert long translate, scale or rotate transform notations to the shorts ones,
- * convert transforms to the matrices and multiply them all into one,
- * remove useless transforms.
- *
- * @see https://www.w3.org/TR/SVG11/coords.html#TransformMatrixDefined
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'convertTransform'>}
- */
-exports.fn = (_root, params) => {
- const {
- convertToShorts = true,
- // degPrecision = 3, // transformPrecision (or matrix precision) - 2 by default
- degPrecision,
- floatPrecision = 3,
- transformPrecision = 5,
- matrixToTransform = true,
- shortTranslate = true,
- shortScale = true,
- shortRotate = true,
- removeUseless = true,
- collapseIntoOne = true,
- leadingZero = true,
- negativeExtraSpace = false,
- } = params;
- const newParams = {
- convertToShorts,
- degPrecision,
- floatPrecision,
- transformPrecision,
- matrixToTransform,
- shortTranslate,
- shortScale,
- shortRotate,
- removeUseless,
- collapseIntoOne,
- leadingZero,
- negativeExtraSpace,
- };
- return {
- element: {
- enter: (node) => {
- if (node.attributes.transform != null) {
- convertTransform(node, 'transform', newParams);
- }
-
- if (node.attributes.gradientTransform != null) {
- convertTransform(node, 'gradientTransform', newParams);
- }
-
- if (node.attributes.patternTransform != null) {
- convertTransform(node, 'patternTransform', newParams);
- }
- },
- },
- };
-};
-
-/**
- * @typedef {{
- * convertToShorts: boolean,
- * degPrecision?: number,
- * floatPrecision: number,
- * transformPrecision: number,
- * matrixToTransform: boolean,
- * shortTranslate: boolean,
- * shortScale: boolean,
- * shortRotate: boolean,
- * removeUseless: boolean,
- * collapseIntoOne: boolean,
- * leadingZero: boolean,
- * negativeExtraSpace: boolean,
- * }} TransformParams
- */
-
-/**
- * @typedef {{ name: string, data: number[] }} TransformItem
- */
-
-/**
- * @param {XastElement} item
- * @param {string} attrName
- * @param {TransformParams} params
- */
-const convertTransform = (item, attrName, params) => {
- let data = transform2js(item.attributes[attrName]);
- params = definePrecision(data, params);
-
- if (params.collapseIntoOne && data.length > 1) {
- data = [transformsMultiply(data)];
- }
-
- if (params.convertToShorts) {
- data = convertToShorts(data, params);
- } else {
- data.forEach((item) => roundTransform(item, params));
- }
-
- if (params.removeUseless) {
- data = removeUseless(data);
- }
-
- if (data.length) {
- item.attributes[attrName] = js2transform(data, params);
- } else {
- delete item.attributes[attrName];
- }
-};
-
-/**
- * Defines precision to work with certain parts.
- * transformPrecision - for scale and four first matrix parameters (needs a better precision due to multiplying),
- * floatPrecision - for translate including two last matrix and rotate parameters,
- * degPrecision - for rotate and skew. By default it's equal to (roughly)
- * transformPrecision - 2 or floatPrecision whichever is lower. Can be set in params.
- *
- * @type {(data: TransformItem[], params: TransformParams) => TransformParams}
- *
- * clone params so it don't affect other elements transformations.
- */
-const definePrecision = (data, { ...newParams }) => {
- const matrixData = [];
- for (const item of data) {
- if (item.name == 'matrix') {
- matrixData.push(...item.data.slice(0, 4));
- }
- }
- let numberOfDigits = newParams.transformPrecision;
- // Limit transform precision with matrix one. Calculating with larger precision doesn't add any value.
- if (matrixData.length) {
- newParams.transformPrecision = Math.min(
- newParams.transformPrecision,
- Math.max.apply(Math, matrixData.map(floatDigits)) ||
- newParams.transformPrecision,
- );
- numberOfDigits = Math.max.apply(
- Math,
- matrixData.map(
- (n) => n.toString().replace(/\D+/g, '').length, // Number of digits in a number. 123.45 → 5
- ),
- );
- }
- // No sense in angle precision more then number of significant digits in matrix.
- if (newParams.degPrecision == null) {
- newParams.degPrecision = Math.max(
- 0,
- Math.min(newParams.floatPrecision, numberOfDigits - 2),
- );
- }
- return newParams;
-};
-
-/**
- * @type {(data: number[], params: TransformParams) => number[]}
- */
-const degRound = (data, params) => {
- if (
- params.degPrecision != null &&
- params.degPrecision >= 1 &&
- params.floatPrecision < 20
- ) {
- return smartRound(params.degPrecision, data);
- } else {
- return round(data);
- }
-};
-/**
- * @type {(data: number[], params: TransformParams) => number[]}
- */
-const floatRound = (data, params) => {
- if (params.floatPrecision >= 1 && params.floatPrecision < 20) {
- return smartRound(params.floatPrecision, data);
- } else {
- return round(data);
- }
-};
-
-/**
- * @type {(data: number[], params: TransformParams) => number[]}
- */
-const transformRound = (data, params) => {
- if (params.transformPrecision >= 1 && params.floatPrecision < 20) {
- return smartRound(params.transformPrecision, data);
- } else {
- return round(data);
- }
-};
-
-/**
- * Returns number of digits after the point. 0.125 → 3
- *
- * @type {(n: number) => number}
- */
-const floatDigits = (n) => {
- const str = n.toString();
- return str.slice(str.indexOf('.')).length - 1;
-};
-
-/**
- * Convert transforms to the shorthand alternatives.
- *
- * @param {TransformItem[]} transforms
- * @param {TransformParams} params
- * @returns {TransformItem[]}
- */
-const convertToShorts = (transforms, params) => {
- for (var i = 0; i < transforms.length; i++) {
- let transform = transforms[i];
-
- // convert matrix to the short aliases
- if (params.matrixToTransform && transform.name === 'matrix') {
- var decomposed = matrixToTransform(transform, params);
- if (
- js2transform(decomposed, params).length <=
- js2transform([transform], params).length
- ) {
- transforms.splice(i, 1, ...decomposed);
- }
- transform = transforms[i];
- }
-
- // fixed-point numbers
- // 12.754997 → 12.755
- roundTransform(transform, params);
-
- // convert long translate transform notation to the shorts one
- // translate(10 0) → translate(10)
- if (
- params.shortTranslate &&
- transform.name === 'translate' &&
- transform.data.length === 2 &&
- !transform.data[1]
- ) {
- transform.data.pop();
- }
-
- // convert long scale transform notation to the shorts one
- // scale(2 2) → scale(2)
- if (
- params.shortScale &&
- transform.name === 'scale' &&
- transform.data.length === 2 &&
- transform.data[0] === transform.data[1]
- ) {
- transform.data.pop();
- }
-
- // convert long rotate transform notation to the short one
- // translate(cx cy) rotate(a) translate(-cx -cy) → rotate(a cx cy)
- if (
- params.shortRotate &&
- transforms[i - 2]?.name === 'translate' &&
- transforms[i - 1].name === 'rotate' &&
- transforms[i].name === 'translate' &&
- transforms[i - 2].data[0] === -transforms[i].data[0] &&
- transforms[i - 2].data[1] === -transforms[i].data[1]
- ) {
- transforms.splice(i - 2, 3, {
- name: 'rotate',
- data: [
- transforms[i - 1].data[0],
- transforms[i - 2].data[0],
- transforms[i - 2].data[1],
- ],
- });
-
- // splice compensation
- i -= 2;
- }
- }
-
- return transforms;
-};
-
-/**
- * Remove useless transforms.
- *
- * @type {(transforms: TransformItem[]) => TransformItem[]}
- */
-const removeUseless = (transforms) => {
- return transforms.filter((transform) => {
- // translate(0), rotate(0[, cx, cy]), skewX(0), skewY(0)
- if (
- (['translate', 'rotate', 'skewX', 'skewY'].indexOf(transform.name) > -1 &&
- (transform.data.length == 1 || transform.name == 'rotate') &&
- !transform.data[0]) ||
- // translate(0, 0)
- (transform.name == 'translate' &&
- !transform.data[0] &&
- !transform.data[1]) ||
- // scale(1)
- (transform.name == 'scale' &&
- transform.data[0] == 1 &&
- (transform.data.length < 2 || transform.data[1] == 1)) ||
- // matrix(1 0 0 1 0 0)
- (transform.name == 'matrix' &&
- transform.data[0] == 1 &&
- transform.data[3] == 1 &&
- !(
- transform.data[1] ||
- transform.data[2] ||
- transform.data[4] ||
- transform.data[5]
- ))
- ) {
- return false;
- }
-
- return true;
- });
-};
-
-/**
- * Convert transforms JS representation to string.
- *
- * @param {TransformItem[]} transformJS
- * @param {TransformParams} params
- * @returns {string}
- */
-const js2transform = (transformJS, params) => {
- const transformString = transformJS
- .map((transform) => {
- roundTransform(transform, params);
- return `${transform.name}(${cleanupOutData(transform.data, params)})`;
- })
- .join('');
-
- return transformString;
-};
-
-/**
- * @type {(transform: TransformItem, params: TransformParams) => TransformItem}
- */
-const roundTransform = (transform, params) => {
- switch (transform.name) {
- case 'translate':
- transform.data = floatRound(transform.data, params);
- break;
- case 'rotate':
- transform.data = [
- ...degRound(transform.data.slice(0, 1), params),
- ...floatRound(transform.data.slice(1), params),
- ];
- break;
- case 'skewX':
- case 'skewY':
- transform.data = degRound(transform.data, params);
- break;
- case 'scale':
- transform.data = transformRound(transform.data, params);
- break;
- case 'matrix':
- transform.data = [
- ...transformRound(transform.data.slice(0, 4), params),
- ...floatRound(transform.data.slice(4), params),
- ];
- break;
- }
- return transform;
-};
-
-/**
- * Rounds numbers in array.
- *
- * @type {(data: number[]) => number[]}
- */
-const round = (data) => {
- return data.map(Math.round);
-};
-
-/**
- * Decrease accuracy of floating-point numbers
- * in transforms keeping a specified number of decimals.
- * Smart rounds values like 2.349 to 2.35.
- *
- * @param {number} precision
- * @param {number[]} data
- * @returns {number[]}
- */
-const smartRound = (precision, data) => {
- for (
- var i = data.length,
- tolerance = +Math.pow(0.1, precision).toFixed(precision);
- i--;
-
- ) {
- if (toFixed(data[i], precision) !== data[i]) {
- var rounded = +data[i].toFixed(precision - 1);
- data[i] =
- +Math.abs(rounded - data[i]).toFixed(precision + 1) >= tolerance
- ? +data[i].toFixed(precision)
- : rounded;
- }
- }
-
- return data;
-};
diff --git a/node_modules/svgo/plugins/inlineStyles.js b/node_modules/svgo/plugins/inlineStyles.js
deleted file mode 100644
index e09988de..00000000
--- a/node_modules/svgo/plugins/inlineStyles.js
+++ /dev/null
@@ -1,390 +0,0 @@
-'use strict';
-
-/**
- * @typedef {import('../lib/types').XastElement} XastElement
- * @typedef {import('../lib/types').XastParent} XastParent
- */
-
-const csstree = require('css-tree');
-const {
- syntax: { specificity },
-} = require('csso');
-const {
- visitSkip,
- querySelectorAll,
- detachNodeFromParent,
-} = require('../lib/xast.js');
-const { compareSpecificity, includesAttrSelector } = require('../lib/style');
-const { attrsGroups, pseudoClasses } = require('./_collections');
-
-exports.name = 'inlineStyles';
-exports.description = 'inline styles (additional options)';
-
-/**
- * Some pseudo-classes can only be calculated by clients, like :visited,
- * :future, or :hover, but there are other pseudo-classes that we can evaluate
- * during optimization.
- *
- * The list of pseudo-classes that we can evaluate during optimization, and so
- * shouldn't be toggled conditionally through the `usePseudos` parameter.
- *
- * @see https://developer.mozilla.org/docs/Web/CSS/Pseudo-classes
- */
-const preservedPseudos = [
- ...pseudoClasses.functional,
- ...pseudoClasses.treeStructural,
-];
-
-/**
- * Merges styles from style nodes into inline styles.
- *
- * @type {import('./plugins-types').Plugin<'inlineStyles'>}
- * @author strarsis <strarsis@gmail.com>
- */
-exports.fn = (root, params) => {
- const {
- onlyMatchedOnce = true,
- removeMatchedSelectors = true,
- useMqs = ['', 'screen'],
- usePseudos = [''],
- } = params;
-
- /**
- * @type {{ node: XastElement, parentNode: XastParent, cssAst: csstree.StyleSheet }[]}
- */
- const styles = [];
- /**
- * @type {{
- * node: csstree.Selector,
- * item: csstree.ListItem<csstree.CssNode>,
- * rule: csstree.Rule,
- * matchedElements?: XastElement[]
- * }[]}
- */
- let selectors = [];
-
- return {
- element: {
- enter: (node, parentNode) => {
- if (node.name === 'foreignObject') {
- return visitSkip;
- }
- if (node.name !== 'style' || node.children.length === 0) {
- return;
- }
- if (
- node.attributes.type != null &&
- node.attributes.type !== '' &&
- node.attributes.type !== 'text/css'
- ) {
- return;
- }
-
- const cssText = node.children
- .filter((child) => child.type === 'text' || child.type === 'cdata')
- // @ts-ignore
- .map((child) => child.value)
- .join('');
-
- /** @type {?csstree.CssNode} */
- let cssAst = null;
- try {
- cssAst = csstree.parse(cssText, {
- parseValue: false,
- parseCustomProperty: false,
- });
- } catch {
- return;
- }
- if (cssAst.type === 'StyleSheet') {
- styles.push({ node, parentNode, cssAst });
- }
-
- // collect selectors
- csstree.walk(cssAst, {
- visit: 'Rule',
- enter(node) {
- const atrule = this.atrule;
-
- // skip media queries not included into useMqs param
- let mediaQuery = '';
- if (atrule != null) {
- mediaQuery = atrule.name;
- if (atrule.prelude != null) {
- mediaQuery += ` ${csstree.generate(atrule.prelude)}`;
- }
- }
- if (!useMqs.includes(mediaQuery)) {
- return;
- }
-
- if (node.prelude.type === 'SelectorList') {
- node.prelude.children.forEach((childNode, item) => {
- if (childNode.type === 'Selector') {
- /**
- * @type {{
- * item: csstree.ListItem<csstree.CssNode>,
- * list: csstree.List<csstree.CssNode>
- * }[]}
- */
- const pseudos = [];
-
- childNode.children.forEach(
- (grandchildNode, grandchildItem, grandchildList) => {
- const isPseudo =
- grandchildNode.type === 'PseudoClassSelector' ||
- grandchildNode.type === 'PseudoElementSelector';
-
- if (
- isPseudo &&
- !preservedPseudos.includes(grandchildNode.name)
- ) {
- pseudos.push({
- item: grandchildItem,
- list: grandchildList,
- });
- }
- },
- );
-
- const pseudoSelectors = csstree.generate({
- type: 'Selector',
- children: new csstree.List().fromArray(
- pseudos.map((pseudo) => pseudo.item.data),
- ),
- });
-
- if (usePseudos.includes(pseudoSelectors)) {
- for (const pseudo of pseudos) {
- pseudo.list.remove(pseudo.item);
- }
- }
-
- selectors.push({ node: childNode, rule: node, item: item });
- }
- });
- }
- },
- });
- },
- },
-
- root: {
- exit: () => {
- if (styles.length === 0) {
- return;
- }
- const sortedSelectors = selectors
- .slice()
- .sort((a, b) => {
- const aSpecificity = specificity(a.item.data);
- const bSpecificity = specificity(b.item.data);
- return compareSpecificity(aSpecificity, bSpecificity);
- })
- .reverse();
-
- for (const selector of sortedSelectors) {
- // match selectors
- const selectorText = csstree.generate(selector.item.data);
- /** @type {XastElement[]} */
- const matchedElements = [];
- try {
- for (const node of querySelectorAll(root, selectorText)) {
- if (node.type === 'element') {
- matchedElements.push(node);
- }
- }
- } catch (selectError) {
- continue;
- }
- // nothing selected
- if (matchedElements.length === 0) {
- continue;
- }
-
- // apply styles to matched elements
- // skip selectors that match more than once if option onlyMatchedOnce is enabled
- if (onlyMatchedOnce && matchedElements.length > 1) {
- continue;
- }
-
- // apply <style/> to matched elements
- for (const selectedEl of matchedElements) {
- const styleDeclarationList = csstree.parse(
- selectedEl.attributes.style ?? '',
- {
- context: 'declarationList',
- parseValue: false,
- },
- );
- if (styleDeclarationList.type !== 'DeclarationList') {
- continue;
- }
- const styleDeclarationItems = new Map();
-
- /** @type {csstree.ListItem<csstree.CssNode>} */
- let firstListItem;
-
- csstree.walk(styleDeclarationList, {
- visit: 'Declaration',
- enter(node, item) {
- if (firstListItem == null) {
- firstListItem = item;
- }
-
- styleDeclarationItems.set(node.property.toLowerCase(), item);
- },
- });
- // merge declarations
- csstree.walk(selector.rule, {
- visit: 'Declaration',
- enter(ruleDeclaration) {
- // existing inline styles have higher priority
- // no inline styles, external styles, external styles used
- // inline styles, external styles same priority as inline styles, inline styles used
- // inline styles, external styles higher priority than inline styles, external styles used
- const property = ruleDeclaration.property;
-
- if (
- attrsGroups.presentation.has(property) &&
- !selectors.some((selector) =>
- includesAttrSelector(selector.item, property),
- )
- ) {
- delete selectedEl.attributes[property];
- }
-
- const matchedItem = styleDeclarationItems.get(property);
- const ruleDeclarationItem =
- styleDeclarationList.children.createItem(ruleDeclaration);
- if (matchedItem == null) {
- styleDeclarationList.children.insert(
- ruleDeclarationItem,
- firstListItem,
- );
- } else if (
- matchedItem.data.important !== true &&
- ruleDeclaration.important === true
- ) {
- styleDeclarationList.children.replace(
- matchedItem,
- ruleDeclarationItem,
- );
- styleDeclarationItems.set(property, ruleDeclarationItem);
- }
- },
- });
-
- const newStyles = csstree.generate(styleDeclarationList);
- if (newStyles.length !== 0) {
- selectedEl.attributes.style = newStyles;
- }
- }
-
- if (
- removeMatchedSelectors &&
- matchedElements.length !== 0 &&
- selector.rule.prelude.type === 'SelectorList'
- ) {
- // clean up matching simple selectors if option removeMatchedSelectors is enabled
- selector.rule.prelude.children.remove(selector.item);
- }
- selector.matchedElements = matchedElements;
- }
-
- // no further processing required
- if (!removeMatchedSelectors) {
- return;
- }
-
- // clean up matched class + ID attribute values
- for (const selector of sortedSelectors) {
- if (selector.matchedElements == null) {
- continue;
- }
-
- if (onlyMatchedOnce && selector.matchedElements.length > 1) {
- // skip selectors that match more than once if option onlyMatchedOnce is enabled
- continue;
- }
-
- for (const selectedEl of selector.matchedElements) {
- // class
- const classList = new Set(
- selectedEl.attributes.class == null
- ? null
- : selectedEl.attributes.class.split(' '),
- );
-
- for (const child of selector.node.children) {
- if (
- child.type === 'ClassSelector' &&
- !selectors.some((selector) =>
- includesAttrSelector(
- selector.item,
- 'class',
- child.name,
- true,
- ),
- )
- ) {
- classList.delete(child.name);
- }
- }
-
- if (classList.size === 0) {
- delete selectedEl.attributes.class;
- } else {
- selectedEl.attributes.class = Array.from(classList).join(' ');
- }
-
- // ID
- const firstSubSelector = selector.node.children.first;
- if (
- firstSubSelector?.type === 'IdSelector' &&
- selectedEl.attributes.id === firstSubSelector.name &&
- !selectors.some((selector) =>
- includesAttrSelector(
- selector.item,
- 'id',
- firstSubSelector.name,
- true,
- ),
- )
- ) {
- delete selectedEl.attributes.id;
- }
- }
- }
-
- for (const style of styles) {
- csstree.walk(style.cssAst, {
- visit: 'Rule',
- enter: function (node, item, list) {
- // clean up <style/> rulesets without any css selectors left
- if (
- node.type === 'Rule' &&
- node.prelude.type === 'SelectorList' &&
- node.prelude.children.isEmpty
- ) {
- list.remove(item);
- }
- },
- });
-
- // csstree v2 changed this type
- if (style.cssAst.children.isEmpty) {
- // remove empty style element
- detachNodeFromParent(style.node, style.parentNode);
- } else {
- // update style element if any styles left
- const firstChild = style.node.children[0];
- if (firstChild.type === 'text' || firstChild.type === 'cdata') {
- firstChild.value = csstree.generate(style.cssAst);
- }
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/mergePaths.js b/node_modules/svgo/plugins/mergePaths.js
deleted file mode 100644
index fe982c13..00000000
--- a/node_modules/svgo/plugins/mergePaths.js
+++ /dev/null
@@ -1,148 +0,0 @@
-'use strict';
-
-/**
- * @typedef {import("../lib/types").PathDataItem} PathDataItem
- * @typedef {import('../lib/types').XastChild} XastChild
- * @typedef {import('../lib/types').XastElement} XastElement
- */
-
-const { collectStylesheet, computeStyle } = require('../lib/style.js');
-const { path2js, js2path, intersects } = require('./_path.js');
-
-exports.name = 'mergePaths';
-exports.description = 'merges multiple paths in one if possible';
-
-/**
- * Merge multiple Paths into one.
- *
- * @author Kir Belevich, Lev Solntsev
- *
- * @type {import('./plugins-types').Plugin<'mergePaths'>}
- */
-exports.fn = (root, params) => {
- const {
- force = false,
- floatPrecision,
- noSpaceAfterFlags = false, // a20 60 45 0 1 30 20 → a20 60 45 0130 20
- } = params;
- const stylesheet = collectStylesheet(root);
-
- return {
- element: {
- enter: (node) => {
- if (node.children.length <= 1) {
- return;
- }
-
- /** @type {XastChild[]} */
- const elementsToRemove = [];
- let prevChild = node.children[0];
- let prevPathData = null;
-
- /**
- * @param {XastElement} child
- * @param {PathDataItem[]} pathData
- */
- const updatePreviousPath = (child, pathData) => {
- js2path(child, pathData, {
- floatPrecision,
- noSpaceAfterFlags,
- });
- prevPathData = null;
- };
-
- for (let i = 1; i < node.children.length; i++) {
- const child = node.children[i];
-
- if (
- prevChild.type !== 'element' ||
- prevChild.name !== 'path' ||
- prevChild.children.length !== 0 ||
- prevChild.attributes.d == null
- ) {
- if (prevPathData && prevChild.type === 'element') {
- updatePreviousPath(prevChild, prevPathData);
- }
- prevChild = child;
- continue;
- }
-
- if (
- child.type !== 'element' ||
- child.name !== 'path' ||
- child.children.length !== 0 ||
- child.attributes.d == null
- ) {
- if (prevPathData) {
- updatePreviousPath(prevChild, prevPathData);
- }
- prevChild = child;
- continue;
- }
-
- const computedStyle = computeStyle(stylesheet, child);
- if (
- computedStyle['marker-start'] ||
- computedStyle['marker-mid'] ||
- computedStyle['marker-end']
- ) {
- if (prevPathData) {
- updatePreviousPath(prevChild, prevPathData);
- }
- prevChild = child;
- continue;
- }
- const childAttrs = Object.keys(child.attributes);
- if (childAttrs.length !== Object.keys(prevChild.attributes).length) {
- if (prevPathData) {
- updatePreviousPath(prevChild, prevPathData);
- }
- prevChild = child;
- continue;
- }
-
- const areAttrsEqual = childAttrs.some((attr) => {
- return (
- attr !== 'd' &&
- prevChild.type === 'element' &&
- prevChild.attributes[attr] !== child.attributes[attr]
- );
- });
-
- if (areAttrsEqual) {
- if (prevPathData) {
- updatePreviousPath(prevChild, prevPathData);
- }
- prevChild = child;
- continue;
- }
-
- const hasPrevPath = prevPathData != null;
- const currentPathData = path2js(child);
- prevPathData = prevPathData ?? path2js(prevChild);
-
- if (force || !intersects(prevPathData, currentPathData)) {
- prevPathData.push(...currentPathData);
- elementsToRemove.push(child);
- continue;
- }
-
- if (hasPrevPath) {
- updatePreviousPath(prevChild, prevPathData);
- }
-
- prevChild = child;
- prevPathData = null;
- }
-
- if (prevPathData && prevChild.type === 'element') {
- updatePreviousPath(prevChild, prevPathData);
- }
-
- node.children = node.children.filter(
- (child) => !elementsToRemove.includes(child),
- );
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/mergeStyles.js b/node_modules/svgo/plugins/mergeStyles.js
deleted file mode 100644
index 764d0194..00000000
--- a/node_modules/svgo/plugins/mergeStyles.js
+++ /dev/null
@@ -1,98 +0,0 @@
-'use strict';
-
-/**
- * @typedef {import('../lib/types').XastElement} XastElement
- * @typedef {import('../lib/types').XastChild} XastChild
- */
-
-const { visitSkip, detachNodeFromParent } = require('../lib/xast.js');
-
-exports.name = 'mergeStyles';
-exports.description = 'merge multiple style elements into one';
-
-/**
- * Merge multiple style elements into one.
- *
- * @author strarsis <strarsis@gmail.com>
- *
- * @type {import('./plugins-types').Plugin<'mergeStyles'>}
- */
-exports.fn = () => {
- /**
- * @type {?XastElement}
- */
- let firstStyleElement = null;
- let collectedStyles = '';
- /**
- * @type {'text' | 'cdata'}
- */
- let styleContentType = 'text';
-
- return {
- element: {
- enter: (node, parentNode) => {
- // skip <foreignObject> content
- if (node.name === 'foreignObject') {
- return visitSkip;
- }
-
- // collect style elements
- if (node.name !== 'style') {
- return;
- }
-
- // skip <style> with invalid type attribute
- if (
- node.attributes.type != null &&
- node.attributes.type !== '' &&
- node.attributes.type !== 'text/css'
- ) {
- return;
- }
-
- // extract style element content
- let css = '';
- for (const child of node.children) {
- if (child.type === 'text') {
- css += child.value;
- }
- if (child.type === 'cdata') {
- styleContentType = 'cdata';
- css += child.value;
- }
- }
-
- // remove empty style elements
- if (css.trim().length === 0) {
- detachNodeFromParent(node, parentNode);
- return;
- }
-
- // collect css and wrap with media query if present in attribute
- if (node.attributes.media == null) {
- collectedStyles += css;
- } else {
- collectedStyles += `@media ${node.attributes.media}{${css}}`;
- delete node.attributes.media;
- }
-
- // combine collected styles in the first style element
- if (firstStyleElement == null) {
- firstStyleElement = node;
- } else {
- detachNodeFromParent(node, parentNode);
- /**
- * @type {XastChild}
- */
- const child = { type: styleContentType, value: collectedStyles };
- // TODO remove legacy parentNode in v4
- Object.defineProperty(child, 'parentNode', {
- writable: true,
- value: firstStyleElement,
- });
- firstStyleElement.children = [child];
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/minifyStyles.js b/node_modules/svgo/plugins/minifyStyles.js
deleted file mode 100644
index ade441b3..00000000
--- a/node_modules/svgo/plugins/minifyStyles.js
+++ /dev/null
@@ -1,141 +0,0 @@
-'use strict';
-
-/**
- * @typedef {import('../lib/types').XastElement} XastElement
- * @typedef {import('../lib/types').XastParent} XastParent
- */
-
-const csso = require('csso');
-const { detachNodeFromParent } = require('../lib/xast');
-const { hasScripts } = require('../lib/svgo/tools');
-
-exports.name = 'minifyStyles';
-exports.description = 'minifies styles and removes unused styles';
-
-/**
- * Minifies styles (<style> element + style attribute) using CSSO.
- *
- * @author strarsis <strarsis@gmail.com>
- * @type {import('./plugins-types').Plugin<'minifyStyles'>}
- */
-exports.fn = (_root, { usage, ...params }) => {
- /** @type {Map<XastElement, XastParent>} */
- const styleElements = new Map();
-
- /** @type {XastElement[]} */
- const elementsWithStyleAttributes = [];
-
- /** @type {Set<string>} */
- const tagsUsage = new Set();
-
- /** @type {Set<string>} */
- const idsUsage = new Set();
-
- /** @type {Set<string>} */
- const classesUsage = new Set();
-
- let enableTagsUsage = true;
- let enableIdsUsage = true;
- let enableClassesUsage = true;
-
- /**
- * Force to use usage data even if it unsafe. For example, the document
- * contains scripts or in attributes..
- */
- let forceUsageDeoptimized = false;
-
- if (typeof usage === 'boolean') {
- enableTagsUsage = usage;
- enableIdsUsage = usage;
- enableClassesUsage = usage;
- } else if (usage) {
- enableTagsUsage = usage.tags == null ? true : usage.tags;
- enableIdsUsage = usage.ids == null ? true : usage.ids;
- enableClassesUsage = usage.classes == null ? true : usage.classes;
- forceUsageDeoptimized = usage.force == null ? false : usage.force;
- }
-
- let deoptimized = false;
-
- return {
- element: {
- enter: (node, parentNode) => {
- // detect deoptimisations
- if (hasScripts(node)) {
- deoptimized = true;
- }
-
- // collect tags, ids and classes usage
- tagsUsage.add(node.name);
- if (node.attributes.id != null) {
- idsUsage.add(node.attributes.id);
- }
- if (node.attributes.class != null) {
- for (const className of node.attributes.class.split(/\s+/)) {
- classesUsage.add(className);
- }
- }
- // collect style elements or elements with style attribute
- if (node.name === 'style' && node.children.length !== 0) {
- styleElements.set(node, parentNode);
- } else if (node.attributes.style != null) {
- elementsWithStyleAttributes.push(node);
- }
- },
- },
-
- root: {
- exit: () => {
- /** @type {csso.Usage} */
- const cssoUsage = {};
- if (!deoptimized || forceUsageDeoptimized) {
- if (enableTagsUsage) {
- cssoUsage.tags = Array.from(tagsUsage);
- }
- if (enableIdsUsage) {
- cssoUsage.ids = Array.from(idsUsage);
- }
- if (enableClassesUsage) {
- cssoUsage.classes = Array.from(classesUsage);
- }
- }
- // minify style elements
- for (const [styleNode, styleNodeParent] of styleElements.entries()) {
- if (
- styleNode.children[0].type === 'text' ||
- styleNode.children[0].type === 'cdata'
- ) {
- const cssText = styleNode.children[0].value;
- const minified = csso.minify(cssText, {
- ...params,
- usage: cssoUsage,
- }).css;
-
- if (minified.length === 0) {
- detachNodeFromParent(styleNode, styleNodeParent);
- continue;
- }
-
- // preserve cdata if necessary
- // TODO split cdata -> text optimisation into separate plugin
- if (cssText.indexOf('>') >= 0 || cssText.indexOf('<') >= 0) {
- styleNode.children[0].type = 'cdata';
- styleNode.children[0].value = minified;
- } else {
- styleNode.children[0].type = 'text';
- styleNode.children[0].value = minified;
- }
- }
- }
- // minify style attributes
- for (const node of elementsWithStyleAttributes) {
- // style attribute
- const elemStyle = node.attributes.style;
- node.attributes.style = csso.minifyBlock(elemStyle, {
- ...params,
- }).css;
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/moveElemsAttrsToGroup.js b/node_modules/svgo/plugins/moveElemsAttrsToGroup.js
deleted file mode 100644
index 633f4439..00000000
--- a/node_modules/svgo/plugins/moveElemsAttrsToGroup.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-
-const { visit } = require('../lib/xast.js');
-const { inheritableAttrs, pathElems } = require('./_collections.js');
-
-exports.name = 'moveElemsAttrsToGroup';
-exports.description = 'Move common attributes of group children to the group';
-
-/**
- * Move common attributes of group children to the group
- *
- * @example
- * <g attr1="val1">
- * <g attr2="val2">
- * text
- * </g>
- * <circle attr2="val2" attr3="val3"/>
- * </g>
- * ⬇
- * <g attr1="val1" attr2="val2">
- * <g>
- * text
- * </g>
- * <circle attr3="val3"/>
- * </g>
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'moveElemsAttrsToGroup'>}
- */
-exports.fn = (root) => {
- // find if any style element is present
- let deoptimizedWithStyles = false;
- visit(root, {
- element: {
- enter: (node) => {
- if (node.name === 'style') {
- deoptimizedWithStyles = true;
- }
- },
- },
- });
-
- return {
- element: {
- exit: (node) => {
- // process only groups with more than 1 children
- if (node.name !== 'g' || node.children.length <= 1) {
- return;
- }
-
- // deoptimize the plugin when style elements are present
- // selectors may rely on id, classes or tag names
- if (deoptimizedWithStyles) {
- return;
- }
-
- /**
- * find common attributes in group children
- * @type {Map<string, string>}
- */
- const commonAttributes = new Map();
- let initial = true;
- let everyChildIsPath = true;
- for (const child of node.children) {
- if (child.type === 'element') {
- if (!pathElems.has(child.name)) {
- everyChildIsPath = false;
- }
- if (initial) {
- initial = false;
- // collect all inheritable attributes from first child element
- for (const [name, value] of Object.entries(child.attributes)) {
- // consider only inheritable attributes
- if (inheritableAttrs.has(name)) {
- commonAttributes.set(name, value);
- }
- }
- } else {
- // exclude uncommon attributes from initial list
- for (const [name, value] of commonAttributes) {
- if (child.attributes[name] !== value) {
- commonAttributes.delete(name);
- }
- }
- }
- }
- }
-
- // preserve transform on children when group has clip-path or mask
- if (
- node.attributes['clip-path'] != null ||
- node.attributes.mask != null
- ) {
- commonAttributes.delete('transform');
- }
-
- // preserve transform when all children are paths
- // so the transform could be applied to path data by other plugins
- if (everyChildIsPath) {
- commonAttributes.delete('transform');
- }
-
- // add common children attributes to group
- for (const [name, value] of commonAttributes) {
- if (name === 'transform') {
- if (node.attributes.transform != null) {
- node.attributes.transform = `${node.attributes.transform} ${value}`;
- } else {
- node.attributes.transform = value;
- }
- } else {
- node.attributes[name] = value;
- }
- }
-
- // delete common attributes from children
- for (const child of node.children) {
- if (child.type === 'element') {
- for (const [name] of commonAttributes) {
- delete child.attributes[name];
- }
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/moveGroupAttrsToElems.js b/node_modules/svgo/plugins/moveGroupAttrsToElems.js
deleted file mode 100644
index 450fb265..00000000
--- a/node_modules/svgo/plugins/moveGroupAttrsToElems.js
+++ /dev/null
@@ -1,65 +0,0 @@
-'use strict';
-
-const { pathElems, referencesProps } = require('./_collections.js');
-const { includesUrlReference } = require('../lib/svgo/tools.js');
-
-exports.name = 'moveGroupAttrsToElems';
-exports.description = 'moves some group attributes to the content elements';
-
-const pathElemsWithGroupsAndText = [...pathElems, 'g', 'text'];
-
-/**
- * Move group attrs to the content elements.
- *
- * @example
- * <g transform="scale(2)">
- * <path transform="rotate(45)" d="M0,0 L10,20"/>
- * <path transform="translate(10, 20)" d="M0,10 L20,30"/>
- * </g>
- * ⬇
- * <g>
- * <path transform="scale(2) rotate(45)" d="M0,0 L10,20"/>
- * <path transform="scale(2) translate(10, 20)" d="M0,10 L20,30"/>
- * </g>
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'moveGroupAttrsToElems'>}
- */
-exports.fn = () => {
- return {
- element: {
- enter: (node) => {
- // move group transform attr to content's pathElems
- if (
- node.name === 'g' &&
- node.children.length !== 0 &&
- node.attributes.transform != null &&
- Object.entries(node.attributes).some(
- ([name, value]) =>
- referencesProps.has(name) && includesUrlReference(value),
- ) === false &&
- node.children.every(
- (child) =>
- child.type === 'element' &&
- pathElemsWithGroupsAndText.includes(child.name) &&
- child.attributes.id == null,
- )
- ) {
- for (const child of node.children) {
- const value = node.attributes.transform;
- if (child.type === 'element') {
- if (child.attributes.transform != null) {
- child.attributes.transform = `${value} ${child.attributes.transform}`;
- } else {
- child.attributes.transform = value;
- }
- }
- }
-
- delete node.attributes.transform;
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/plugins-types.d.ts b/node_modules/svgo/plugins/plugins-types.d.ts
deleted file mode 100644
index e94e7137..00000000
--- a/node_modules/svgo/plugins/plugins-types.d.ts
+++ /dev/null
@@ -1,291 +0,0 @@
-import type {
- Plugin as PluginDef,
- PluginInfo,
- XastElement,
-} from '../lib/types';
-
-type DefaultPlugins = {
- cleanupAttrs: {
- newlines?: boolean;
- trim?: boolean;
- spaces?: boolean;
- };
- cleanupEnableBackground: void;
- cleanupIds: {
- remove?: boolean;
- minify?: boolean;
- preserve?: string[];
- preservePrefixes?: string[];
- force?: boolean;
- };
- cleanupNumericValues: {
- floatPrecision?: number;
- leadingZero?: boolean;
- defaultPx?: boolean;
- convertToPx?: boolean;
- };
- collapseGroups: void;
- convertColors: {
- currentColor?: boolean | string | RegExp;
- names2hex?: boolean;
- rgb2hex?: boolean;
- shorthex?: boolean;
- shortname?: boolean;
- };
- convertEllipseToCircle: void;
- convertPathData: {
- applyTransforms?: boolean;
- applyTransformsStroked?: boolean;
- makeArcs?: {
- threshold: number;
- tolerance: number;
- };
- straightCurves?: boolean;
- convertToQ?: boolean;
- lineShorthands?: boolean;
- convertToZ?: boolean;
- curveSmoothShorthands?: boolean;
- floatPrecision?: number | false;
- transformPrecision?: number;
- smartArcRounding?: boolean;
- removeUseless?: boolean;
- collapseRepeated?: boolean;
- utilizeAbsolute?: boolean;
- leadingZero?: boolean;
- negativeExtraSpace?: boolean;
- noSpaceAfterFlags?: boolean;
- forceAbsolutePath?: boolean;
- };
- convertShapeToPath: {
- convertArcs?: boolean;
- floatPrecision?: number;
- };
- convertTransform: {
- convertToShorts?: boolean;
- degPrecision?: number;
- floatPrecision?: number;
- transformPrecision?: number;
- matrixToTransform?: boolean;
- shortTranslate?: boolean;
- shortScale?: boolean;
- shortRotate?: boolean;
- removeUseless?: boolean;
- collapseIntoOne?: boolean;
- leadingZero?: boolean;
- negativeExtraSpace?: boolean;
- };
- mergeStyles: void;
- inlineStyles: {
- /**
- * Inlines selectors that match once only.
- *
- * @default true
- */
- onlyMatchedOnce?: boolean;
- /**
- * Clean up matched selectors. Unused selects are left as-is.
- *
- * @default true
- */
- removeMatchedSelectors?: boolean;
- /**
- * Media queries to use. An empty string indicates all selectors outside of
- * media queries.
- */
- useMqs?: string[];
- /**
- * Pseudo-classes and elements to use. An empty string indicates all
- * all non-pseudo-classes and elements.
- */
- usePseudos?: string[];
- };
- mergePaths: {
- force?: boolean;
- floatPrecision?: number;
- noSpaceAfterFlags?: boolean;
- };
-
- minifyStyles: {
- /**
- * Disable or enable a structure optimisations.
- * @default true
- */
- restructure?: boolean;
- /**
- * Enables merging of @media rules with the same media query split by other rules.
- * The optimisation is unsafe in general, but should work fine in most cases. Use it on your own risk.
- * @default false
- */
- forceMediaMerge?: boolean;
- /**
- * Specify what comments to leave:
- * - 'exclamation' or true – leave all exclamation comments
- * - 'first-exclamation' – remove every comment except first one
- * - false – remove all comments
- * @default true
- */
- comments?: string | boolean;
- /**
- * Advanced optimizations
- */
- usage?:
- | boolean
- | {
- force?: boolean;
- ids?: boolean;
- classes?: boolean;
- tags?: boolean;
- };
- };
-
- moveElemsAttrsToGroup: void;
- moveGroupAttrsToElems: void;
- removeComments: {
- preservePatterns: Array<RegExp | string> | false;
- };
- removeDesc: {
- removeAny?: boolean;
- };
- removeDoctype: void;
- removeEditorsNSData: {
- additionalNamespaces?: string[];
- };
- removeEmptyAttrs: void;
- removeEmptyContainers: void;
- removeEmptyText: {
- text?: boolean;
- tspan?: boolean;
- tref?: boolean;
- };
- removeHiddenElems: {
- isHidden?: boolean;
- displayNone?: boolean;
- opacity0?: boolean;
- circleR0?: boolean;
- ellipseRX0?: boolean;
- ellipseRY0?: boolean;
- rectWidth0?: boolean;
- rectHeight0?: boolean;
- patternWidth0?: boolean;
- patternHeight0?: boolean;
- imageWidth0?: boolean;
- imageHeight0?: boolean;
- pathEmptyD?: boolean;
- polylineEmptyPoints?: boolean;
- polygonEmptyPoints?: boolean;
- };
- removeMetadata: void;
- removeNonInheritableGroupAttrs: void;
- removeTitle: void;
- removeUnknownsAndDefaults: {
- unknownContent?: boolean;
- unknownAttrs?: boolean;
- defaultAttrs?: boolean;
- /**
- * If to remove XML declarations that are assigned their default value. XML
- * declarations are the properties in the `<?xml … ?>` block at the top of
- * the document.
- */
- defaultMarkupDeclarations?: boolean;
- uselessOverrides?: boolean;
- keepDataAttrs?: boolean;
- keepAriaAttrs?: boolean;
- keepRoleAttr?: boolean;
- };
- removeUnusedNS: void;
- removeUselessDefs: void;
- removeUselessStrokeAndFill: {
- stroke?: boolean;
- fill?: boolean;
- removeNone?: boolean;
- };
- removeViewBox: void;
- removeXMLProcInst: void;
- sortAttrs: {
- order?: string[];
- xmlnsOrder?: 'front' | 'alphabetical';
- };
- sortDefsChildren: void;
-};
-
-type PresetDefaultOverrides = {
- [Name in keyof DefaultPlugins]?: DefaultPlugins[Name] | false;
-};
-
-export type BuiltinsWithOptionalParams = DefaultPlugins & {
- 'preset-default': {
- floatPrecision?: number;
- /**
- * All default plugins can be customized or disabled here
- * for example
- * {
- * sortAttrs: { xmlnsOrder: "alphabetical" },
- * cleanupAttrs: false,
- * }
- */
- overrides?: PresetDefaultOverrides;
- };
- cleanupListOfValues: {
- floatPrecision?: number;
- leadingZero?: boolean;
- defaultPx?: boolean;
- convertToPx?: boolean;
- };
- convertOneStopGradients: void;
- convertStyleToAttrs: {
- keepImportant?: boolean;
- };
- prefixIds: {
- prefix?:
- | boolean
- | string
- | ((node: XastElement, info: PluginInfo) => string);
- delim?: string;
- prefixIds?: boolean;
- prefixClassNames?: boolean;
- };
- removeDimensions: void;
- removeOffCanvasPaths: void;
- removeRasterImages: void;
- removeScriptElement: void;
- removeStyleElement: void;
- removeXlink: {
- /**
- * By default this plugin ignores legacy elements that were deprecated or
- * removed in SVG 2. Set to true to force performing operations on those
- * too.
- *
- * @default false
- */
- includeLegacy: boolean;
- };
- removeXMLNS: void;
- reusePaths: void;
-};
-
-export type BuiltinsWithRequiredParams = {
- addAttributesToSVGElement: {
- attribute?: string | Record<string, null | string>;
- attributes?: Array<string | Record<string, null | string>>;
- };
- addClassesToSVGElement: {
- className?: string;
- classNames?: string[];
- };
- removeAttributesBySelector: any;
- removeAttrs: {
- elemSeparator?: string;
- preserveCurrentColor?: boolean;
- attrs: string | string[];
- };
- removeElementsByAttr: {
- id?: string | string[];
- class?: string | string[];
- };
-};
-
-type PluginsParams = BuiltinsWithOptionalParams & BuiltinsWithRequiredParams;
-
-export type Plugin<Name extends keyof PluginsParams> = PluginDef<
- PluginsParams[Name]
->;
diff --git a/node_modules/svgo/plugins/prefixIds.js b/node_modules/svgo/plugins/prefixIds.js
deleted file mode 100644
index ec305c6b..00000000
--- a/node_modules/svgo/plugins/prefixIds.js
+++ /dev/null
@@ -1,268 +0,0 @@
-'use strict';
-
-/**
- * @typedef {import('../lib/types.js').PluginInfo} PluginInfo
- * @typedef {import('../lib/types').XastElement} XastElement
- */
-
-const csstree = require('css-tree');
-const { referencesProps } = require('./_collections.js');
-
-exports.name = 'prefixIds';
-exports.description = 'prefix IDs';
-
-/**
- * extract basename from path
- * @type {(path: string) => string}
- */
-const getBasename = (path) => {
- // extract everything after latest slash or backslash
- const matched = /[/\\]?([^/\\]+)$/.exec(path);
- if (matched) {
- return matched[1];
- }
- return '';
-};
-
-/**
- * escapes a string for being used as ID
- * @type {(string: string) => string}
- */
-const escapeIdentifierName = (str) => {
- return str.replace(/[. ]/g, '_');
-};
-
-/**
- * @type {(string: string) => string}
- */
-const unquote = (string) => {
- if (
- (string.startsWith('"') && string.endsWith('"')) ||
- (string.startsWith("'") && string.endsWith("'"))
- ) {
- return string.slice(1, -1);
- }
- return string;
-};
-
-/**
- * Prefix the given string, unless it already starts with the generated prefix.
- *
- * @param {(id: string) => string} prefixGenerator Function to generate a prefix.
- * @param {string} body An arbitrary string.
- * @returns {string} The given string with a prefix prepended to it.
- */
-const prefixId = (prefixGenerator, body) => {
- const prefix = prefixGenerator(body);
- if (body.startsWith(prefix)) {
- return body;
- }
- return prefix + body;
-};
-
-/**
- * Insert the prefix in a reference string. A reference string is already
- * prefixed with #, so the prefix is inserted after the first character.
- *
- * @param {(id: string) => string} prefixGenerator Function to generate a prefix.
- * @param {string} reference An arbitrary string, should start with "#".
- * @returns {?string} The given string with a prefix inserted, or null if the string did not start with "#".
- */
-const prefixReference = (prefixGenerator, reference) => {
- if (reference.startsWith('#')) {
- return '#' + prefixId(prefixGenerator, reference.slice(1));
- }
- return null;
-};
-
-/**
- * Generates a prefix for the given string.
- *
- * @param {string} body An arbitrary string.
- * @param {XastElement} node XML node that the identifier belongs to.
- * @param {PluginInfo} info
- * @param {((node: XastElement, info: PluginInfo) => string)|string|boolean|undefined} prefixGenerator Some way of obtaining a prefix.
- * @param {string} delim Content to insert between the prefix and original value.
- * @param {Map<string, string>} history Map of previously generated prefixes to IDs.
- * @returns {string} A generated prefix.
- */
-const generatePrefix = (body, node, info, prefixGenerator, delim, history) => {
- if (typeof prefixGenerator === 'function') {
- let prefix = history.get(body);
-
- if (prefix != null) {
- return prefix;
- }
-
- prefix = prefixGenerator(node, info) + delim;
- history.set(body, prefix);
- return prefix;
- }
-
- if (typeof prefixGenerator === 'string') {
- return prefixGenerator + delim;
- }
-
- if (prefixGenerator === false) {
- return '';
- }
-
- if (info.path != null && info.path.length > 0) {
- return escapeIdentifierName(getBasename(info.path)) + delim;
- }
-
- return 'prefix' + delim;
-};
-
-/**
- * Prefixes identifiers
- *
- * @author strarsis <strarsis@gmail.com>
- * @type {import('./plugins-types').Plugin<'prefixIds'>}
- */
-exports.fn = (_root, params, info) => {
- const {
- delim = '__',
- prefix,
- prefixIds = true,
- prefixClassNames = true,
- } = params;
-
- /** @type {Map<string, string>} */
- const prefixMap = new Map();
-
- return {
- element: {
- enter: (node) => {
- /**
- * @param {string} id A node identifier or class.
- * @returns {string} Given string with a prefix inserted, or null if the string did not start with "#".
- */
- const prefixGenerator = (id) =>
- generatePrefix(id, node, info, prefix, delim, prefixMap);
-
- // prefix id/class selectors and url() references in styles
- if (node.name === 'style') {
- // skip empty <style/> elements
- if (node.children.length === 0) {
- return;
- }
-
- for (const child of node.children) {
- if (child.type !== 'text' && child.type !== 'cdata') {
- continue;
- }
-
- const cssText = child.value;
- /** @type {?csstree.CssNode} */
- let cssAst = null;
- try {
- cssAst = csstree.parse(cssText, {
- parseValue: true,
- parseCustomProperty: false,
- });
- } catch {
- return;
- }
-
- csstree.walk(cssAst, (node) => {
- if (
- (prefixIds && node.type === 'IdSelector') ||
- (prefixClassNames && node.type === 'ClassSelector')
- ) {
- node.name = prefixId(prefixGenerator, node.name);
- return;
- }
- if (node.type === 'Url' && node.value.length > 0) {
- const prefixed = prefixReference(
- prefixGenerator,
- unquote(node.value),
- );
- if (prefixed != null) {
- node.value = prefixed;
- }
- }
- });
-
- child.value = csstree.generate(cssAst);
- return;
- }
- }
-
- // prefix an ID attribute value
- if (
- prefixIds &&
- node.attributes.id != null &&
- node.attributes.id.length !== 0
- ) {
- node.attributes.id = prefixId(prefixGenerator, node.attributes.id);
- }
-
- // prefix a class attribute value
- if (
- prefixClassNames &&
- node.attributes.class != null &&
- node.attributes.class.length !== 0
- ) {
- node.attributes.class = node.attributes.class
- .split(/\s+/)
- .map((name) => prefixId(prefixGenerator, name))
- .join(' ');
- }
-
- // prefix a href attribute value
- // xlink:href is deprecated, must be still supported
- for (const name of ['href', 'xlink:href']) {
- if (
- node.attributes[name] != null &&
- node.attributes[name].length !== 0
- ) {
- const prefixed = prefixReference(
- prefixGenerator,
- node.attributes[name],
- );
- if (prefixed != null) {
- node.attributes[name] = prefixed;
- }
- }
- }
-
- // prefix a URL attribute value
- for (const name of referencesProps) {
- if (
- node.attributes[name] != null &&
- node.attributes[name].length !== 0
- ) {
- node.attributes[name] = node.attributes[name].replace(
- /\burl\((["'])?(#.+?)\1\)/gi,
- (match, _, url) => {
- const prefixed = prefixReference(prefixGenerator, url);
- if (prefixed == null) {
- return match;
- }
- return `url(${prefixed})`;
- },
- );
- }
- }
-
- // prefix begin/end attribute value
- for (const name of ['begin', 'end']) {
- if (
- node.attributes[name] != null &&
- node.attributes[name].length !== 0
- ) {
- const parts = node.attributes[name].split(/\s*;\s+/).map((val) => {
- if (val.endsWith('.end') || val.endsWith('.start')) {
- const [id, postfix] = val.split('.');
- return `${prefixId(prefixGenerator, id)}.${postfix}`;
- }
- return val;
- });
- node.attributes[name] = parts.join('; ');
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/preset-default.js b/node_modules/svgo/plugins/preset-default.js
deleted file mode 100644
index 86516fd7..00000000
--- a/node_modules/svgo/plugins/preset-default.js
+++ /dev/null
@@ -1,82 +0,0 @@
-'use strict';
-
-const { createPreset } = require('../lib/svgo/plugins.js');
-
-const removeDoctype = require('./removeDoctype.js');
-const removeXMLProcInst = require('./removeXMLProcInst.js');
-const removeComments = require('./removeComments.js');
-const removeMetadata = require('./removeMetadata.js');
-const removeEditorsNSData = require('./removeEditorsNSData.js');
-const cleanupAttrs = require('./cleanupAttrs.js');
-const mergeStyles = require('./mergeStyles.js');
-const inlineStyles = require('./inlineStyles.js');
-const minifyStyles = require('./minifyStyles.js');
-const cleanupIds = require('./cleanupIds.js');
-const removeUselessDefs = require('./removeUselessDefs.js');
-const cleanupNumericValues = require('./cleanupNumericValues.js');
-const convertColors = require('./convertColors.js');
-const removeUnknownsAndDefaults = require('./removeUnknownsAndDefaults.js');
-const removeNonInheritableGroupAttrs = require('./removeNonInheritableGroupAttrs.js');
-const removeUselessStrokeAndFill = require('./removeUselessStrokeAndFill.js');
-const removeViewBox = require('./removeViewBox.js');
-const cleanupEnableBackground = require('./cleanupEnableBackground.js');
-const removeHiddenElems = require('./removeHiddenElems.js');
-const removeEmptyText = require('./removeEmptyText.js');
-const convertShapeToPath = require('./convertShapeToPath.js');
-const convertEllipseToCircle = require('./convertEllipseToCircle.js');
-const moveElemsAttrsToGroup = require('./moveElemsAttrsToGroup.js');
-const moveGroupAttrsToElems = require('./moveGroupAttrsToElems.js');
-const collapseGroups = require('./collapseGroups.js');
-const convertPathData = require('./convertPathData.js');
-const convertTransform = require('./convertTransform.js');
-const removeEmptyAttrs = require('./removeEmptyAttrs.js');
-const removeEmptyContainers = require('./removeEmptyContainers.js');
-const mergePaths = require('./mergePaths.js');
-const removeUnusedNS = require('./removeUnusedNS.js');
-const sortAttrs = require('./sortAttrs.js');
-const sortDefsChildren = require('./sortDefsChildren.js');
-const removeTitle = require('./removeTitle.js');
-const removeDesc = require('./removeDesc.js');
-
-const presetDefault = createPreset({
- name: 'preset-default',
- plugins: [
- removeDoctype,
- removeXMLProcInst,
- removeComments,
- removeMetadata,
- removeEditorsNSData,
- cleanupAttrs,
- mergeStyles,
- inlineStyles,
- minifyStyles,
- cleanupIds,
- removeUselessDefs,
- cleanupNumericValues,
- convertColors,
- removeUnknownsAndDefaults,
- removeNonInheritableGroupAttrs,
- removeUselessStrokeAndFill,
- removeViewBox,
- cleanupEnableBackground,
- removeHiddenElems,
- removeEmptyText,
- convertShapeToPath,
- convertEllipseToCircle,
- moveElemsAttrsToGroup,
- moveGroupAttrsToElems,
- collapseGroups,
- convertPathData,
- convertTransform,
- removeEmptyAttrs,
- removeEmptyContainers,
- mergePaths,
- removeUnusedNS,
- sortAttrs,
- sortDefsChildren,
- removeTitle,
- removeDesc,
- ],
-});
-
-module.exports = presetDefault;
diff --git a/node_modules/svgo/plugins/removeAttributesBySelector.js b/node_modules/svgo/plugins/removeAttributesBySelector.js
deleted file mode 100644
index 12630c2a..00000000
--- a/node_modules/svgo/plugins/removeAttributesBySelector.js
+++ /dev/null
@@ -1,97 +0,0 @@
-'use strict';
-
-const { querySelectorAll } = require('../lib/xast.js');
-
-exports.name = 'removeAttributesBySelector';
-exports.description =
- 'removes attributes of elements that match a css selector';
-
-/**
- * Removes attributes of elements that match a css selector.
- *
- * @example
- * <caption>A selector removing a single attribute</caption>
- * plugins: [
- * {
- * name: "removeAttributesBySelector",
- * params: {
- * selector: "[fill='#00ff00']"
- * attributes: "fill"
- * }
- * }
- * ]
- *
- * <rect x="0" y="0" width="100" height="100" fill="#00ff00" stroke="#00ff00"/>
- * ↓
- * <rect x="0" y="0" width="100" height="100" stroke="#00ff00"/>
- *
- * <caption>A selector removing multiple attributes</caption>
- * plugins: [
- * {
- * name: "removeAttributesBySelector",
- * params: {
- * selector: "[fill='#00ff00']",
- * attributes: [
- * "fill",
- * "stroke"
- * ]
- * }
- * }
- * ]
- *
- * <rect x="0" y="0" width="100" height="100" fill="#00ff00" stroke="#00ff00"/>
- * ↓
- * <rect x="0" y="0" width="100" height="100"/>
- *
- * <caption>Multiple selectors removing attributes</caption>
- * plugins: [
- * {
- * name: "removeAttributesBySelector",
- * params: {
- * selectors: [
- * {
- * selector: "[fill='#00ff00']",
- * attributes: "fill"
- * },
- * {
- * selector: "#remove",
- * attributes: [
- * "stroke",
- * "id"
- * ]
- * }
- * ]
- * }
- * }
- * ]
- *
- * <rect x="0" y="0" width="100" height="100" fill="#00ff00" stroke="#00ff00"/>
- * ↓
- * <rect x="0" y="0" width="100" height="100"/>
- *
- * @link https://developer.mozilla.org/docs/Web/CSS/CSS_Selectors|MDN CSS Selectors
- *
- * @author Bradley Mease
- *
- * @type {import('./plugins-types').Plugin<'removeAttributesBySelector'>}
- */
-exports.fn = (root, params) => {
- const selectors = Array.isArray(params.selectors)
- ? params.selectors
- : [params];
- for (const { selector, attributes } of selectors) {
- const nodes = querySelectorAll(root, selector);
- for (const node of nodes) {
- if (node.type === 'element') {
- if (Array.isArray(attributes)) {
- for (const name of attributes) {
- delete node.attributes[name];
- }
- } else {
- delete node.attributes[attributes];
- }
- }
- }
- }
- return {};
-};
diff --git a/node_modules/svgo/plugins/removeAttrs.js b/node_modules/svgo/plugins/removeAttrs.js
deleted file mode 100644
index dc1224bd..00000000
--- a/node_modules/svgo/plugins/removeAttrs.js
+++ /dev/null
@@ -1,151 +0,0 @@
-'use strict';
-
-exports.name = 'removeAttrs';
-exports.description = 'removes specified attributes';
-
-const DEFAULT_SEPARATOR = ':';
-const ENOATTRS = `Warning: The plugin "removeAttrs" requires the "attrs" parameter.
-It should have a pattern to remove, otherwise the plugin is a noop.
-Config example:
-
-plugins: [
- {
- name: "removeAttrs",
- params: {
- attrs: "(fill|stroke)"
- }
- }
-]
-`;
-
-/**
- * Remove attributes
- *
- * @example elemSeparator
- * format: string
- *
- * @example preserveCurrentColor
- * format: boolean
- *
- * @example attrs:
- *
- * format: [ element* : attribute* : value* ]
- *
- * element : regexp (wrapped into ^...$), single * or omitted > all elements (must be present when value is used)
- * attribute : regexp (wrapped into ^...$)
- * value : regexp (wrapped into ^...$), single * or omitted > all values
- *
- * examples:
- *
- * > basic: remove fill attribute
- * ---
- * removeAttrs:
- * attrs: 'fill'
- *
- * > remove fill attribute on path element
- * ---
- * attrs: 'path:fill'
- *
- * > remove fill attribute on path element where value is none
- * ---
- * attrs: 'path:fill:none'
- *
- *
- * > remove all fill and stroke attribute
- * ---
- * attrs:
- * - 'fill'
- * - 'stroke'
- *
- * [is same as]
- *
- * attrs: '(fill|stroke)'
- *
- * [is same as]
- *
- * attrs: '*:(fill|stroke)'
- *
- * [is same as]
- *
- * attrs: '.*:(fill|stroke)'
- *
- * [is same as]
- *
- * attrs: '.*:(fill|stroke):.*'
- *
- *
- * > remove all stroke related attributes
- * ----
- * attrs: 'stroke.*'
- *
- *
- * @author Benny Schudel
- *
- * @type {import('./plugins-types').Plugin<'removeAttrs'>}
- */
-exports.fn = (root, params) => {
- if (typeof params.attrs == 'undefined') {
- console.warn(ENOATTRS);
- return null;
- }
-
- const elemSeparator =
- typeof params.elemSeparator == 'string'
- ? params.elemSeparator
- : DEFAULT_SEPARATOR;
- const preserveCurrentColor =
- typeof params.preserveCurrentColor == 'boolean'
- ? params.preserveCurrentColor
- : false;
- const attrs = Array.isArray(params.attrs) ? params.attrs : [params.attrs];
-
- return {
- element: {
- enter: (node) => {
- for (let pattern of attrs) {
- // if no element separators (:), assume it's attribute name, and apply to all elements *regardless of value*
- if (!pattern.includes(elemSeparator)) {
- pattern = ['.*', pattern, '.*'].join(elemSeparator);
- // if only 1 separator, assume it's element and attribute name, and apply regardless of attribute value
- } else if (pattern.split(elemSeparator).length < 3) {
- pattern = [pattern, '.*'].join(elemSeparator);
- }
-
- // create regexps for element, attribute name, and attribute value
- const list = pattern.split(elemSeparator).map((value) => {
- // adjust single * to match anything
- if (value === '*') {
- value = '.*';
- }
- return new RegExp(['^', value, '$'].join(''), 'i');
- });
-
- // matches element
- if (list[0].test(node.name)) {
- // loop attributes
- for (const [name, value] of Object.entries(node.attributes)) {
- const isFillCurrentColor =
- preserveCurrentColor &&
- name == 'fill' &&
- value == 'currentColor';
- const isStrokeCurrentColor =
- preserveCurrentColor &&
- name == 'stroke' &&
- value == 'currentColor';
- if (
- !isFillCurrentColor &&
- !isStrokeCurrentColor &&
- // matches attribute name
- list[1].test(name) &&
- // matches attribute value
- list[2].test(value)
- ) {
- delete node.attributes[name];
- }
- }
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeComments.js b/node_modules/svgo/plugins/removeComments.js
deleted file mode 100644
index 46a32590..00000000
--- a/node_modules/svgo/plugins/removeComments.js
+++ /dev/null
@@ -1,51 +0,0 @@
-'use strict';
-
-const { detachNodeFromParent } = require('../lib/xast.js');
-
-exports.name = 'removeComments';
-exports.description = 'removes comments';
-
-/**
- * If a comment matches one of the following patterns, it will be
- * preserved by default. Particularly for copyright/license information.
- */
-const DEFAULT_PRESERVE_PATTERNS = [/^!/];
-
-/**
- * Remove comments.
- *
- * @example
- * <!-- Generator: Adobe Illustrator 15.0.0, SVG Export
- * Plug-In . SVG Version: 6.00 Build 0) -->
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'removeComments'>}
- */
-exports.fn = (_root, params) => {
- const { preservePatterns = DEFAULT_PRESERVE_PATTERNS } = params;
-
- return {
- comment: {
- enter: (node, parentNode) => {
- if (preservePatterns) {
- if (!Array.isArray(preservePatterns)) {
- throw Error(
- `Expected array in removeComments preservePatterns parameter but received ${preservePatterns}`,
- );
- }
-
- const matches = preservePatterns.some((pattern) => {
- return new RegExp(pattern).test(node.value);
- });
-
- if (matches) {
- return;
- }
- }
-
- detachNodeFromParent(node, parentNode);
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeDesc.js b/node_modules/svgo/plugins/removeDesc.js
deleted file mode 100644
index f766350e..00000000
--- a/node_modules/svgo/plugins/removeDesc.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-const { detachNodeFromParent } = require('../lib/xast.js');
-
-exports.name = 'removeDesc';
-exports.description = 'removes <desc>';
-
-const standardDescs = /^(Created with|Created using)/;
-
-/**
- * Removes <desc>.
- * Removes only standard editors content or empty elements 'cause it can be used for accessibility.
- * Enable parameter 'removeAny' to remove any description.
- *
- * https://developer.mozilla.org/docs/Web/SVG/Element/desc
- *
- * @author Daniel Wabyick
- *
- * @type {import('./plugins-types').Plugin<'removeDesc'>}
- */
-exports.fn = (root, params) => {
- const { removeAny = false } = params;
- return {
- element: {
- enter: (node, parentNode) => {
- if (node.name === 'desc') {
- if (
- removeAny ||
- node.children.length === 0 ||
- (node.children[0].type === 'text' &&
- standardDescs.test(node.children[0].value))
- ) {
- detachNodeFromParent(node, parentNode);
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeDimensions.js b/node_modules/svgo/plugins/removeDimensions.js
deleted file mode 100644
index 4f4f3984..00000000
--- a/node_modules/svgo/plugins/removeDimensions.js
+++ /dev/null
@@ -1,43 +0,0 @@
-'use strict';
-
-exports.name = 'removeDimensions';
-exports.description =
- 'removes width and height in presence of viewBox (opposite to removeViewBox, disable it first)';
-
-/**
- * Remove width/height attributes and add the viewBox attribute if it's missing
- *
- * @example
- * <svg width="100" height="50" />
- * ↓
- * <svg viewBox="0 0 100 50" />
- *
- * @author Benny Schudel
- *
- * @type {import('./plugins-types').Plugin<'removeDimensions'>}
- */
-exports.fn = () => {
- return {
- element: {
- enter: (node) => {
- if (node.name === 'svg') {
- if (node.attributes.viewBox != null) {
- delete node.attributes.width;
- delete node.attributes.height;
- } else if (
- node.attributes.width != null &&
- node.attributes.height != null &&
- Number.isNaN(Number(node.attributes.width)) === false &&
- Number.isNaN(Number(node.attributes.height)) === false
- ) {
- const width = Number(node.attributes.width);
- const height = Number(node.attributes.height);
- node.attributes.viewBox = `0 0 ${width} ${height}`;
- delete node.attributes.width;
- delete node.attributes.height;
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeDoctype.js b/node_modules/svgo/plugins/removeDoctype.js
deleted file mode 100644
index cbdcd013..00000000
--- a/node_modules/svgo/plugins/removeDoctype.js
+++ /dev/null
@@ -1,40 +0,0 @@
-'use strict';
-
-const { detachNodeFromParent } = require('../lib/xast.js');
-
-exports.name = 'removeDoctype';
-exports.description = 'removes doctype declaration';
-
-/**
- * Remove DOCTYPE declaration.
- *
- * "Unfortunately the SVG DTDs are a source of so many
- * issues that the SVG WG has decided not to write one
- * for the upcoming SVG 1.2 standard. In fact SVG WG
- * members are even telling people not to use a DOCTYPE
- * declaration in SVG 1.0 and 1.1 documents"
- * https://jwatt.org/svg/authoring/#doctype-declaration
- *
- * @example
- * <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
- * q"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
- *
- * @example
- * <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- * "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
- * <!-- an internal subset can be embedded here -->
- * ]>
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'removeDoctype'>}
- */
-exports.fn = () => {
- return {
- doctype: {
- enter: (node, parentNode) => {
- detachNodeFromParent(node, parentNode);
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeEditorsNSData.js b/node_modules/svgo/plugins/removeEditorsNSData.js
deleted file mode 100644
index 852681bf..00000000
--- a/node_modules/svgo/plugins/removeEditorsNSData.js
+++ /dev/null
@@ -1,64 +0,0 @@
-'use strict';
-
-const { detachNodeFromParent } = require('../lib/xast.js');
-const { editorNamespaces } = require('./_collections.js');
-
-exports.name = 'removeEditorsNSData';
-exports.description = 'removes editors namespaces, elements and attributes';
-
-/**
- * Remove editors namespaces, elements and attributes.
- *
- * @example
- * <svg xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd">
- * <sodipodi:namedview/>
- * <path sodipodi:nodetypes="cccc"/>
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'removeEditorsNSData'>}
- */
-exports.fn = (_root, params) => {
- let namespaces = [...editorNamespaces];
- if (Array.isArray(params.additionalNamespaces)) {
- namespaces = [...editorNamespaces, ...params.additionalNamespaces];
- }
- /**
- * @type {string[]}
- */
- const prefixes = [];
- return {
- element: {
- enter: (node, parentNode) => {
- // collect namespace prefixes from svg element
- if (node.name === 'svg') {
- for (const [name, value] of Object.entries(node.attributes)) {
- if (name.startsWith('xmlns:') && namespaces.includes(value)) {
- prefixes.push(name.slice('xmlns:'.length));
- // <svg xmlns:sodipodi="">
- delete node.attributes[name];
- }
- }
- }
- // remove editor attributes, for example
- // <* sodipodi:*="">
- for (const name of Object.keys(node.attributes)) {
- if (name.includes(':')) {
- const [prefix] = name.split(':');
- if (prefixes.includes(prefix)) {
- delete node.attributes[name];
- }
- }
- }
- // remove editor elements, for example
- // <sodipodi:*>
- if (node.name.includes(':')) {
- const [prefix] = node.name.split(':');
- if (prefixes.includes(prefix)) {
- detachNodeFromParent(node, parentNode);
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeElementsByAttr.js b/node_modules/svgo/plugins/removeElementsByAttr.js
deleted file mode 100644
index 9c9915f0..00000000
--- a/node_modules/svgo/plugins/removeElementsByAttr.js
+++ /dev/null
@@ -1,73 +0,0 @@
-'use strict';
-
-const { detachNodeFromParent } = require('../lib/xast.js');
-
-exports.name = 'removeElementsByAttr';
-exports.description =
- 'removes arbitrary elements by ID or className (disabled by default)';
-
-/**
- * Remove arbitrary SVG elements by ID or className.
- *
- * @example id
- * > single: remove element with ID of `elementID`
- * ---
- * removeElementsByAttr:
- * id: 'elementID'
- *
- * > list: remove multiple elements by ID
- * ---
- * removeElementsByAttr:
- * id:
- * - 'elementID'
- * - 'anotherID'
- *
- * @example class
- * > single: remove all elements with class of `elementClass`
- * ---
- * removeElementsByAttr:
- * class: 'elementClass'
- *
- * > list: remove all elements with class of `elementClass` or `anotherClass`
- * ---
- * removeElementsByAttr:
- * class:
- * - 'elementClass'
- * - 'anotherClass'
- *
- * @author Eli Dupuis (@elidupuis)
- *
- * @type {import('./plugins-types').Plugin<'removeElementsByAttr'>}
- */
-exports.fn = (root, params) => {
- const ids =
- params.id == null ? [] : Array.isArray(params.id) ? params.id : [params.id];
- const classes =
- params.class == null
- ? []
- : Array.isArray(params.class)
- ? params.class
- : [params.class];
- return {
- element: {
- enter: (node, parentNode) => {
- // remove element if it's `id` matches configured `id` params
- if (node.attributes.id != null && ids.length !== 0) {
- if (ids.includes(node.attributes.id)) {
- detachNodeFromParent(node, parentNode);
- }
- }
- // remove element if it's `class` contains any of the configured `class` params
- if (node.attributes.class && classes.length !== 0) {
- const classList = node.attributes.class.split(' ');
- for (const item of classes) {
- if (classList.includes(item)) {
- detachNodeFromParent(node, parentNode);
- break;
- }
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeEmptyAttrs.js b/node_modules/svgo/plugins/removeEmptyAttrs.js
deleted file mode 100644
index 194d27b8..00000000
--- a/node_modules/svgo/plugins/removeEmptyAttrs.js
+++ /dev/null
@@ -1,31 +0,0 @@
-'use strict';
-
-const { attrsGroups } = require('./_collections.js');
-
-exports.name = 'removeEmptyAttrs';
-exports.description = 'removes empty attributes';
-
-/**
- * Remove attributes with empty values.
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'removeEmptyAttrs'>}
- */
-exports.fn = () => {
- return {
- element: {
- enter: (node) => {
- for (const [name, value] of Object.entries(node.attributes)) {
- if (
- value === '' &&
- // empty conditional processing attributes prevents elements from rendering
- !attrsGroups.conditionalProcessing.has(name)
- ) {
- delete node.attributes[name];
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeEmptyContainers.js b/node_modules/svgo/plugins/removeEmptyContainers.js
deleted file mode 100644
index 03907344..00000000
--- a/node_modules/svgo/plugins/removeEmptyContainers.js
+++ /dev/null
@@ -1,59 +0,0 @@
-'use strict';
-
-const { detachNodeFromParent } = require('../lib/xast.js');
-const { elemsGroups } = require('./_collections.js');
-
-exports.name = 'removeEmptyContainers';
-exports.description = 'removes empty container elements';
-
-/**
- * Remove empty containers.
- *
- * @see https://www.w3.org/TR/SVG11/intro.html#TermContainerElement
- *
- * @example
- * <defs/>
- *
- * @example
- * <g><marker><a/></marker></g>
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'removeEmptyContainers'>}
- */
-exports.fn = () => {
- return {
- element: {
- exit: (node, parentNode) => {
- // remove only empty non-svg containers
- if (
- node.name === 'svg' ||
- !elemsGroups.container.has(node.name) ||
- node.children.length !== 0
- ) {
- return;
- }
- // empty patterns may contain reusable configuration
- if (
- node.name === 'pattern' &&
- Object.keys(node.attributes).length !== 0
- ) {
- return;
- }
- // The <g> may not have content, but the filter may cause a rectangle
- // to be created and filled with pattern.
- if (node.name === 'g' && node.attributes.filter != null) {
- return;
- }
- // empty <mask> hides masked element
- if (node.name === 'mask' && node.attributes.id != null) {
- return;
- }
- if (parentNode.type === 'element' && parentNode.name === 'switch') {
- return;
- }
- detachNodeFromParent(node, parentNode);
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeEmptyText.js b/node_modules/svgo/plugins/removeEmptyText.js
deleted file mode 100644
index 5f6db3d3..00000000
--- a/node_modules/svgo/plugins/removeEmptyText.js
+++ /dev/null
@@ -1,51 +0,0 @@
-'use strict';
-
-const { detachNodeFromParent } = require('../lib/xast.js');
-
-exports.name = 'removeEmptyText';
-exports.description = 'removes empty <text> elements';
-
-/**
- * Remove empty Text elements.
- *
- * @see https://www.w3.org/TR/SVG11/text.html
- *
- * @example
- * Remove empty text element:
- * <text/>
- *
- * Remove empty tspan element:
- * <tspan/>
- *
- * Remove tref with empty xlink:href attribute:
- * <tref xlink:href=""/>
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'removeEmptyText'>}
- */
-exports.fn = (root, params) => {
- const { text = true, tspan = true, tref = true } = params;
- return {
- element: {
- enter: (node, parentNode) => {
- // Remove empty text element
- if (text && node.name === 'text' && node.children.length === 0) {
- detachNodeFromParent(node, parentNode);
- }
- // Remove empty tspan element
- if (tspan && node.name === 'tspan' && node.children.length === 0) {
- detachNodeFromParent(node, parentNode);
- }
- // Remove tref with empty xlink:href attribute
- if (
- tref &&
- node.name === 'tref' &&
- node.attributes['xlink:href'] == null
- ) {
- detachNodeFromParent(node, parentNode);
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeHiddenElems.js b/node_modules/svgo/plugins/removeHiddenElems.js
deleted file mode 100644
index 75720a06..00000000
--- a/node_modules/svgo/plugins/removeHiddenElems.js
+++ /dev/null
@@ -1,440 +0,0 @@
-'use strict';
-
-/**
- * @typedef {import('../lib/types').XastChild} XastChild
- * @typedef {import('../lib/types').XastElement} XastElement
- * @typedef {import('../lib/types').XastParent} XastParent
- */
-
-const { elemsGroups } = require('./_collections.js');
-const {
- visit,
- visitSkip,
- querySelector,
- detachNodeFromParent,
-} = require('../lib/xast.js');
-const { collectStylesheet, computeStyle } = require('../lib/style.js');
-const { parsePathData } = require('../lib/path.js');
-const { hasScripts, findReferences } = require('../lib/svgo/tools.js');
-
-const nonRendering = elemsGroups.nonRendering;
-
-exports.name = 'removeHiddenElems';
-exports.description =
- 'removes hidden elements (zero sized, with absent attributes)';
-
-/**
- * Remove hidden elements with disabled rendering:
- * - display="none"
- * - opacity="0"
- * - circle with zero radius
- * - ellipse with zero x-axis or y-axis radius
- * - rectangle with zero width or height
- * - pattern with zero width or height
- * - image with zero width or height
- * - path with empty data
- * - polyline with empty points
- * - polygon with empty points
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'removeHiddenElems'>}
- */
-exports.fn = (root, params) => {
- const {
- isHidden = true,
- displayNone = true,
- opacity0 = true,
- circleR0 = true,
- ellipseRX0 = true,
- ellipseRY0 = true,
- rectWidth0 = true,
- rectHeight0 = true,
- patternWidth0 = true,
- patternHeight0 = true,
- imageWidth0 = true,
- imageHeight0 = true,
- pathEmptyD = true,
- polylineEmptyPoints = true,
- polygonEmptyPoints = true,
- } = params;
- const stylesheet = collectStylesheet(root);
-
- /**
- * Skip non-rendered nodes initially, and only detach if they have no ID, or
- * their ID is not referenced by another node.
- *
- * @type {Map<XastElement, XastParent>}
- */
- const nonRenderedNodes = new Map();
-
- /**
- * IDs for removed hidden definitions.
- *
- * @type {Set<string>}
- */
- const removedDefIds = new Set();
-
- /**
- * @type {Map<XastElement, XastParent>}
- */
- const allDefs = new Map();
-
- /** @type {Set<string>} */
- const allReferences = new Set();
-
- /**
- * @type {Map<string, Array<{ node: XastElement, parentNode: XastParent }>>}
- */
- const referencesById = new Map();
-
- /**
- * If styles are present, we can't be sure if a definition is unused or not
- */
- let deoptimized = false;
-
- /**
- * @param {XastChild} node
- * @param {XastParent} parentNode
- */
- function removeElement(node, parentNode) {
- if (
- node.type === 'element' &&
- node.attributes.id != null &&
- parentNode.type === 'element' &&
- parentNode.name === 'defs'
- ) {
- removedDefIds.add(node.attributes.id);
- }
-
- detachNodeFromParent(node, parentNode);
- }
-
- visit(root, {
- element: {
- enter: (node, parentNode) => {
- // transparent non-rendering elements still apply where referenced
- if (nonRendering.has(node.name)) {
- if (node.attributes.id == null) {
- detachNodeFromParent(node, parentNode);
- return visitSkip;
- }
-
- nonRenderedNodes.set(node, parentNode);
- return visitSkip;
- }
- const computedStyle = computeStyle(stylesheet, node);
- // opacity="0"
- //
- // https://www.w3.org/TR/SVG11/masking.html#ObjectAndGroupOpacityProperties
- if (
- opacity0 &&
- computedStyle.opacity &&
- computedStyle.opacity.type === 'static' &&
- computedStyle.opacity.value === '0'
- ) {
- removeElement(node, parentNode);
- }
- },
- },
- });
-
- return {
- element: {
- enter: (node, parentNode) => {
- if (
- (node.name === 'style' && node.children.length !== 0) ||
- hasScripts(node)
- ) {
- deoptimized = true;
- return;
- }
-
- if (node.name === 'defs') {
- allDefs.set(node, parentNode);
- }
-
- if (node.name === 'use') {
- for (const attr of Object.keys(node.attributes)) {
- if (attr !== 'href' && !attr.endsWith(':href')) continue;
- const value = node.attributes[attr];
- const id = value.slice(1);
-
- let refs = referencesById.get(id);
- if (!refs) {
- refs = [];
- referencesById.set(id, refs);
- }
- refs.push({ node, parentNode });
- }
- }
-
- // Removes hidden elements
- // https://www.w3schools.com/cssref/pr_class_visibility.asp
- const computedStyle = computeStyle(stylesheet, node);
- if (
- isHidden &&
- computedStyle.visibility &&
- computedStyle.visibility.type === 'static' &&
- computedStyle.visibility.value === 'hidden' &&
- // keep if any descendant enables visibility
- querySelector(node, '[visibility=visible]') == null
- ) {
- removeElement(node, parentNode);
- return;
- }
-
- // display="none"
- //
- // https://www.w3.org/TR/SVG11/painting.html#DisplayProperty
- // "A value of display: none indicates that the given element
- // and its children shall not be rendered directly"
- if (
- displayNone &&
- computedStyle.display &&
- computedStyle.display.type === 'static' &&
- computedStyle.display.value === 'none' &&
- // markers with display: none still rendered
- node.name !== 'marker'
- ) {
- removeElement(node, parentNode);
- return;
- }
-
- // Circles with zero radius
- //
- // https://www.w3.org/TR/SVG11/shapes.html#CircleElementRAttribute
- // "A value of zero disables rendering of the element"
- //
- // <circle r="0">
- if (
- circleR0 &&
- node.name === 'circle' &&
- node.children.length === 0 &&
- node.attributes.r === '0'
- ) {
- removeElement(node, parentNode);
- return;
- }
-
- // Ellipse with zero x-axis radius
- //
- // https://www.w3.org/TR/SVG11/shapes.html#EllipseElementRXAttribute
- // "A value of zero disables rendering of the element"
- //
- // <ellipse rx="0">
- if (
- ellipseRX0 &&
- node.name === 'ellipse' &&
- node.children.length === 0 &&
- node.attributes.rx === '0'
- ) {
- removeElement(node, parentNode);
- return;
- }
-
- // Ellipse with zero y-axis radius
- //
- // https://www.w3.org/TR/SVG11/shapes.html#EllipseElementRYAttribute
- // "A value of zero disables rendering of the element"
- //
- // <ellipse ry="0">
- if (
- ellipseRY0 &&
- node.name === 'ellipse' &&
- node.children.length === 0 &&
- node.attributes.ry === '0'
- ) {
- removeElement(node, parentNode);
- return;
- }
-
- // Rectangle with zero width
- //
- // https://www.w3.org/TR/SVG11/shapes.html#RectElementWidthAttribute
- // "A value of zero disables rendering of the element"
- //
- // <rect width="0">
- if (
- rectWidth0 &&
- node.name === 'rect' &&
- node.children.length === 0 &&
- node.attributes.width === '0'
- ) {
- removeElement(node, parentNode);
- return;
- }
-
- // Rectangle with zero height
- //
- // https://www.w3.org/TR/SVG11/shapes.html#RectElementHeightAttribute
- // "A value of zero disables rendering of the element"
- //
- // <rect height="0">
- if (
- rectHeight0 &&
- rectWidth0 &&
- node.name === 'rect' &&
- node.children.length === 0 &&
- node.attributes.height === '0'
- ) {
- removeElement(node, parentNode);
- return;
- }
-
- // Pattern with zero width
- //
- // https://www.w3.org/TR/SVG11/pservers.html#PatternElementWidthAttribute
- // "A value of zero disables rendering of the element (i.e., no paint is applied)"
- //
- // <pattern width="0">
- if (
- patternWidth0 &&
- node.name === 'pattern' &&
- node.attributes.width === '0'
- ) {
- removeElement(node, parentNode);
- return;
- }
-
- // Pattern with zero height
- //
- // https://www.w3.org/TR/SVG11/pservers.html#PatternElementHeightAttribute
- // "A value of zero disables rendering of the element (i.e., no paint is applied)"
- //
- // <pattern height="0">
- if (
- patternHeight0 &&
- node.name === 'pattern' &&
- node.attributes.height === '0'
- ) {
- removeElement(node, parentNode);
- return;
- }
-
- // Image with zero width
- //
- // https://www.w3.org/TR/SVG11/struct.html#ImageElementWidthAttribute
- // "A value of zero disables rendering of the element"
- //
- // <image width="0">
- if (
- imageWidth0 &&
- node.name === 'image' &&
- node.attributes.width === '0'
- ) {
- removeElement(node, parentNode);
- return;
- }
-
- // Image with zero height
- //
- // https://www.w3.org/TR/SVG11/struct.html#ImageElementHeightAttribute
- // "A value of zero disables rendering of the element"
- //
- // <image height="0">
- if (
- imageHeight0 &&
- node.name === 'image' &&
- node.attributes.height === '0'
- ) {
- removeElement(node, parentNode);
- return;
- }
-
- // Path with empty data
- //
- // https://www.w3.org/TR/SVG11/paths.html#DAttribute
- //
- // <path d=""/>
- if (pathEmptyD && node.name === 'path') {
- if (node.attributes.d == null) {
- removeElement(node, parentNode);
- return;
- }
- const pathData = parsePathData(node.attributes.d);
- if (pathData.length === 0) {
- removeElement(node, parentNode);
- return;
- }
- // keep single point paths for markers
- if (
- pathData.length === 1 &&
- computedStyle['marker-start'] == null &&
- computedStyle['marker-end'] == null
- ) {
- removeElement(node, parentNode);
- return;
- }
- }
-
- // Polyline with empty points
- //
- // https://www.w3.org/TR/SVG11/shapes.html#PolylineElementPointsAttribute
- //
- // <polyline points="">
- if (
- polylineEmptyPoints &&
- node.name === 'polyline' &&
- node.attributes.points == null
- ) {
- removeElement(node, parentNode);
- return;
- }
-
- // Polygon with empty points
- //
- // https://www.w3.org/TR/SVG11/shapes.html#PolygonElementPointsAttribute
- //
- // <polygon points="">
- if (
- polygonEmptyPoints &&
- node.name === 'polygon' &&
- node.attributes.points == null
- ) {
- removeElement(node, parentNode);
- return;
- }
-
- for (const [name, value] of Object.entries(node.attributes)) {
- const ids = findReferences(name, value);
-
- for (const id of ids) {
- allReferences.add(id);
- }
- }
- },
- },
- root: {
- exit: () => {
- for (const id of removedDefIds) {
- const refs = referencesById.get(id);
- if (refs) {
- for (const { node, parentNode } of refs) {
- detachNodeFromParent(node, parentNode);
- }
- }
- }
-
- if (!deoptimized) {
- for (const [
- nonRenderedNode,
- nonRenderedParent,
- ] of nonRenderedNodes.entries()) {
- const id = nonRenderedNode.attributes.id;
-
- if (!allReferences.has(id)) {
- detachNodeFromParent(nonRenderedNode, nonRenderedParent);
- }
- }
- }
-
- for (const [node, parentNode] of allDefs.entries()) {
- if (node.children.length === 0) {
- detachNodeFromParent(node, parentNode);
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeMetadata.js b/node_modules/svgo/plugins/removeMetadata.js
deleted file mode 100644
index 8c9de27e..00000000
--- a/node_modules/svgo/plugins/removeMetadata.js
+++ /dev/null
@@ -1,27 +0,0 @@
-'use strict';
-
-const { detachNodeFromParent } = require('../lib/xast.js');
-
-exports.name = 'removeMetadata';
-exports.description = 'removes <metadata>';
-
-/**
- * Remove <metadata>.
- *
- * https://www.w3.org/TR/SVG11/metadata.html
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'removeMetadata'>}
- */
-exports.fn = () => {
- return {
- element: {
- enter: (node, parentNode) => {
- if (node.name === 'metadata') {
- detachNodeFromParent(node, parentNode);
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeNonInheritableGroupAttrs.js b/node_modules/svgo/plugins/removeNonInheritableGroupAttrs.js
deleted file mode 100644
index 73e6bcda..00000000
--- a/node_modules/svgo/plugins/removeNonInheritableGroupAttrs.js
+++ /dev/null
@@ -1,38 +0,0 @@
-'use strict';
-
-const {
- inheritableAttrs,
- attrsGroups,
- presentationNonInheritableGroupAttrs,
-} = require('./_collections');
-
-exports.name = 'removeNonInheritableGroupAttrs';
-exports.description =
- 'removes non-inheritable group’s presentational attributes';
-
-/**
- * Remove non-inheritable group's "presentation" attributes.
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'removeNonInheritableGroupAttrs'>}
- */
-exports.fn = () => {
- return {
- element: {
- enter: (node) => {
- if (node.name === 'g') {
- for (const name of Object.keys(node.attributes)) {
- if (
- attrsGroups.presentation.has(name) &&
- !inheritableAttrs.has(name) &&
- !presentationNonInheritableGroupAttrs.has(name)
- ) {
- delete node.attributes[name];
- }
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeOffCanvasPaths.js b/node_modules/svgo/plugins/removeOffCanvasPaths.js
deleted file mode 100644
index 60a69fb1..00000000
--- a/node_modules/svgo/plugins/removeOffCanvasPaths.js
+++ /dev/null
@@ -1,136 +0,0 @@
-'use strict';
-
-/**
- * @typedef {import('../lib/types').PathDataItem} PathDataItem
- */
-
-const { visitSkip, detachNodeFromParent } = require('../lib/xast.js');
-const { parsePathData } = require('../lib/path.js');
-const { intersects } = require('./_path.js');
-
-exports.name = 'removeOffCanvasPaths';
-exports.description =
- 'removes elements that are drawn outside of the viewbox (disabled by default)';
-
-/**
- * Remove elements that are drawn outside of the viewbox.
- *
- * @author JoshyPHP
- *
- * @type {import('./plugins-types').Plugin<'removeOffCanvasPaths'>}
- */
-exports.fn = () => {
- /**
- * @type {?{
- * top: number,
- * right: number,
- * bottom: number,
- * left: number,
- * width: number,
- * height: number
- * }}
- */
- let viewBoxData = null;
-
- return {
- element: {
- enter: (node, parentNode) => {
- if (node.name === 'svg' && parentNode.type === 'root') {
- let viewBox = '';
- // find viewbox
- if (node.attributes.viewBox != null) {
- // remove commas and plus signs, normalize and trim whitespace
- viewBox = node.attributes.viewBox;
- } else if (
- node.attributes.height != null &&
- node.attributes.width != null
- ) {
- viewBox = `0 0 ${node.attributes.width} ${node.attributes.height}`;
- }
-
- // parse viewbox
- // remove commas and plus signs, normalize and trim whitespace
- viewBox = viewBox
- .replace(/[,+]|px/g, ' ')
- .replace(/\s+/g, ' ')
- .replace(/^\s*|\s*$/g, '');
- // ensure that the dimensions are 4 values separated by space
- const m =
- /^(-?\d*\.?\d+) (-?\d*\.?\d+) (\d*\.?\d+) (\d*\.?\d+)$/.exec(
- viewBox,
- );
- if (m == null) {
- return;
- }
- const left = Number.parseFloat(m[1]);
- const top = Number.parseFloat(m[2]);
- const width = Number.parseFloat(m[3]);
- const height = Number.parseFloat(m[4]);
-
- // store the viewBox boundaries
- viewBoxData = {
- left,
- top,
- right: left + width,
- bottom: top + height,
- width,
- height,
- };
- }
-
- // consider that any item with a transform attribute is visible
- if (node.attributes.transform != null) {
- return visitSkip;
- }
-
- if (
- node.name === 'path' &&
- node.attributes.d != null &&
- viewBoxData != null
- ) {
- const pathData = parsePathData(node.attributes.d);
-
- // consider that a M command within the viewBox is visible
- let visible = false;
- for (const pathDataItem of pathData) {
- if (pathDataItem.command === 'M') {
- const [x, y] = pathDataItem.args;
- if (
- x >= viewBoxData.left &&
- x <= viewBoxData.right &&
- y >= viewBoxData.top &&
- y <= viewBoxData.bottom
- ) {
- visible = true;
- }
- }
- }
- if (visible) {
- return;
- }
-
- if (pathData.length === 2) {
- // close the path too short for intersects()
- pathData.push({ command: 'z', args: [] });
- }
-
- const { left, top, width, height } = viewBoxData;
- /**
- * @type {PathDataItem[]}
- */
- const viewBoxPathData = [
- { command: 'M', args: [left, top] },
- { command: 'h', args: [width] },
- { command: 'v', args: [height] },
- { command: 'H', args: [left] },
- { command: 'z', args: [] },
- ];
-
- if (intersects(viewBoxPathData, pathData) === false) {
- detachNodeFromParent(node, parentNode);
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeRasterImages.js b/node_modules/svgo/plugins/removeRasterImages.js
deleted file mode 100644
index 1a4a4a12..00000000
--- a/node_modules/svgo/plugins/removeRasterImages.js
+++ /dev/null
@@ -1,31 +0,0 @@
-'use strict';
-
-const { detachNodeFromParent } = require('../lib/xast.js');
-
-exports.name = 'removeRasterImages';
-exports.description = 'removes raster images (disabled by default)';
-
-/**
- * Remove raster images references in <image>.
- *
- * @see https://bugs.webkit.org/show_bug.cgi?id=63548
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'removeRasterImages'>}
- */
-exports.fn = () => {
- return {
- element: {
- enter: (node, parentNode) => {
- if (
- node.name === 'image' &&
- node.attributes['xlink:href'] != null &&
- /(\.|image\/)(jpe?g|png|gif)/.test(node.attributes['xlink:href'])
- ) {
- detachNodeFromParent(node, parentNode);
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeScriptElement.js b/node_modules/svgo/plugins/removeScriptElement.js
deleted file mode 100644
index 80fcea3b..00000000
--- a/node_modules/svgo/plugins/removeScriptElement.js
+++ /dev/null
@@ -1,70 +0,0 @@
-'use strict';
-
-const { detachNodeFromParent } = require('../lib/xast.js');
-const { attrsGroups } = require('./_collections.js');
-
-exports.name = 'removeScriptElement';
-exports.description = 'removes scripts (disabled by default)';
-
-/** Union of all event attributes. */
-const eventAttrs = [
- ...attrsGroups.animationEvent,
- ...attrsGroups.documentEvent,
- ...attrsGroups.documentElementEvent,
- ...attrsGroups.globalEvent,
- ...attrsGroups.graphicalEvent,
-];
-
-/**
- * Remove scripts.
- *
- * https://www.w3.org/TR/SVG11/script.html
- *
- * @author Patrick Klingemann
- * @type {import('./plugins-types').Plugin<'removeScriptElement'>}
- */
-exports.fn = () => {
- return {
- element: {
- enter: (node, parentNode) => {
- if (node.name === 'script') {
- detachNodeFromParent(node, parentNode);
- return;
- }
-
- for (const attr of eventAttrs) {
- if (node.attributes[attr] != null) {
- delete node.attributes[attr];
- }
- }
- },
- exit: (node, parentNode) => {
- if (node.name !== 'a') {
- return;
- }
-
- for (const attr of Object.keys(node.attributes)) {
- if (attr === 'href' || attr.endsWith(':href')) {
- if (
- node.attributes[attr] == null ||
- !node.attributes[attr].trimStart().startsWith('javascript:')
- ) {
- continue;
- }
-
- const index = parentNode.children.indexOf(node);
- parentNode.children.splice(index, 1, ...node.children);
-
- // TODO remove legacy parentNode in v4
- for (const child of node.children) {
- Object.defineProperty(child, 'parentNode', {
- writable: true,
- value: parentNode,
- });
- }
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeStyleElement.js b/node_modules/svgo/plugins/removeStyleElement.js
deleted file mode 100644
index d869a50a..00000000
--- a/node_modules/svgo/plugins/removeStyleElement.js
+++ /dev/null
@@ -1,27 +0,0 @@
-'use strict';
-
-const { detachNodeFromParent } = require('../lib/xast.js');
-
-exports.name = 'removeStyleElement';
-exports.description = 'removes <style> element (disabled by default)';
-
-/**
- * Remove <style>.
- *
- * https://www.w3.org/TR/SVG11/styling.html#StyleElement
- *
- * @author Betsy Dupuis
- *
- * @type {import('./plugins-types').Plugin<'removeStyleElement'>}
- */
-exports.fn = () => {
- return {
- element: {
- enter: (node, parentNode) => {
- if (node.name === 'style') {
- detachNodeFromParent(node, parentNode);
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeTitle.js b/node_modules/svgo/plugins/removeTitle.js
deleted file mode 100644
index 906dd3c2..00000000
--- a/node_modules/svgo/plugins/removeTitle.js
+++ /dev/null
@@ -1,27 +0,0 @@
-'use strict';
-
-const { detachNodeFromParent } = require('../lib/xast.js');
-
-exports.name = 'removeTitle';
-exports.description = 'removes <title>';
-
-/**
- * Remove <title>.
- *
- * https://developer.mozilla.org/docs/Web/SVG/Element/title
- *
- * @author Igor Kalashnikov
- *
- * @type {import('./plugins-types').Plugin<'removeTitle'>}
- */
-exports.fn = () => {
- return {
- element: {
- enter: (node, parentNode) => {
- if (node.name === 'title') {
- detachNodeFromParent(node, parentNode);
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeUnknownsAndDefaults.js b/node_modules/svgo/plugins/removeUnknownsAndDefaults.js
deleted file mode 100644
index e76e4e5f..00000000
--- a/node_modules/svgo/plugins/removeUnknownsAndDefaults.js
+++ /dev/null
@@ -1,212 +0,0 @@
-'use strict';
-
-const { visitSkip, detachNodeFromParent } = require('../lib/xast.js');
-const { collectStylesheet, computeStyle } = require('../lib/style.js');
-const {
- elems,
- attrsGroups,
- elemsGroups,
- attrsGroupsDefaults,
- presentationNonInheritableGroupAttrs,
-} = require('./_collections');
-
-exports.name = 'removeUnknownsAndDefaults';
-exports.description =
- 'removes unknown elements content and attributes, removes attrs with default values';
-
-// resolve all groups references
-
-/**
- * @type {Map<string, Set<string>>}
- */
-const allowedChildrenPerElement = new Map();
-/**
- * @type {Map<string, Set<string>>}
- */
-const allowedAttributesPerElement = new Map();
-/**
- * @type {Map<string, Map<string, string>>}
- */
-const attributesDefaultsPerElement = new Map();
-
-for (const [name, config] of Object.entries(elems)) {
- /**
- * @type {Set<string>}
- */
- const allowedChildren = new Set();
- if (config.content) {
- for (const elementName of config.content) {
- allowedChildren.add(elementName);
- }
- }
- if (config.contentGroups) {
- for (const contentGroupName of config.contentGroups) {
- const elemsGroup = elemsGroups[contentGroupName];
- if (elemsGroup) {
- for (const elementName of elemsGroup) {
- allowedChildren.add(elementName);
- }
- }
- }
- }
- /**
- * @type {Set<string>}
- */
- const allowedAttributes = new Set();
- if (config.attrs) {
- for (const attrName of config.attrs) {
- allowedAttributes.add(attrName);
- }
- }
- /**
- * @type {Map<string, string>}
- */
- const attributesDefaults = new Map();
- if (config.defaults) {
- for (const [attrName, defaultValue] of Object.entries(config.defaults)) {
- attributesDefaults.set(attrName, defaultValue);
- }
- }
- for (const attrsGroupName of config.attrsGroups) {
- const attrsGroup = attrsGroups[attrsGroupName];
- if (attrsGroup) {
- for (const attrName of attrsGroup) {
- allowedAttributes.add(attrName);
- }
- }
- const groupDefaults = attrsGroupsDefaults[attrsGroupName];
- if (groupDefaults) {
- for (const [attrName, defaultValue] of Object.entries(groupDefaults)) {
- attributesDefaults.set(attrName, defaultValue);
- }
- }
- }
- allowedChildrenPerElement.set(name, allowedChildren);
- allowedAttributesPerElement.set(name, allowedAttributes);
- attributesDefaultsPerElement.set(name, attributesDefaults);
-}
-
-/**
- * Remove unknown elements content and attributes,
- * remove attributes with default values.
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'removeUnknownsAndDefaults'>}
- */
-exports.fn = (root, params) => {
- const {
- unknownContent = true,
- unknownAttrs = true,
- defaultAttrs = true,
- defaultMarkupDeclarations = true,
- uselessOverrides = true,
- keepDataAttrs = true,
- keepAriaAttrs = true,
- keepRoleAttr = false,
- } = params;
- const stylesheet = collectStylesheet(root);
-
- return {
- instruction: {
- enter: (node) => {
- if (defaultMarkupDeclarations) {
- node.value = node.value.replace(/\s*standalone\s*=\s*(["'])no\1/, '');
- }
- },
- },
- element: {
- enter: (node, parentNode) => {
- // skip namespaced elements
- if (node.name.includes(':')) {
- return;
- }
- // skip visiting foreignObject subtree
- if (node.name === 'foreignObject') {
- return visitSkip;
- }
-
- // remove unknown element's content
- if (unknownContent && parentNode.type === 'element') {
- const allowedChildren = allowedChildrenPerElement.get(
- parentNode.name,
- );
- if (allowedChildren == null || allowedChildren.size === 0) {
- // remove unknown elements
- if (allowedChildrenPerElement.get(node.name) == null) {
- detachNodeFromParent(node, parentNode);
- return;
- }
- } else {
- // remove not allowed children
- if (allowedChildren.has(node.name) === false) {
- detachNodeFromParent(node, parentNode);
- return;
- }
- }
- }
-
- const allowedAttributes = allowedAttributesPerElement.get(node.name);
- const attributesDefaults = attributesDefaultsPerElement.get(node.name);
- const computedParentStyle =
- parentNode.type === 'element'
- ? computeStyle(stylesheet, parentNode)
- : null;
-
- // remove element's unknown attrs and attrs with default values
- for (const [name, value] of Object.entries(node.attributes)) {
- if (keepDataAttrs && name.startsWith('data-')) {
- continue;
- }
- if (keepAriaAttrs && name.startsWith('aria-')) {
- continue;
- }
- if (keepRoleAttr && name === 'role') {
- continue;
- }
- // skip xmlns attribute
- if (name === 'xmlns') {
- continue;
- }
- // skip namespaced attributes except xml:* and xlink:*
- if (name.includes(':')) {
- const [prefix] = name.split(':');
- if (prefix !== 'xml' && prefix !== 'xlink') {
- continue;
- }
- }
-
- if (
- unknownAttrs &&
- allowedAttributes &&
- allowedAttributes.has(name) === false
- ) {
- delete node.attributes[name];
- }
- if (
- defaultAttrs &&
- node.attributes.id == null &&
- attributesDefaults &&
- attributesDefaults.get(name) === value
- ) {
- // keep defaults if parent has own or inherited style
- if (computedParentStyle?.[name] == null) {
- delete node.attributes[name];
- }
- }
- if (uselessOverrides && node.attributes.id == null) {
- const style = computedParentStyle?.[name];
- if (
- presentationNonInheritableGroupAttrs.has(name) === false &&
- style != null &&
- style.type === 'static' &&
- style.value === value
- ) {
- delete node.attributes[name];
- }
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeUnusedNS.js b/node_modules/svgo/plugins/removeUnusedNS.js
deleted file mode 100644
index ac81eeaf..00000000
--- a/node_modules/svgo/plugins/removeUnusedNS.js
+++ /dev/null
@@ -1,59 +0,0 @@
-'use strict';
-
-exports.name = 'removeUnusedNS';
-exports.description = 'removes unused namespaces declaration';
-
-/**
- * Remove unused namespaces declaration from svg element
- * which are not used in elements or attributes
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'removeUnusedNS'>}
- */
-exports.fn = () => {
- /**
- * @type {Set<string>}
- */
- const unusedNamespaces = new Set();
- return {
- element: {
- enter: (node, parentNode) => {
- // collect all namespaces from svg element
- // (such as xmlns:xlink="http://www.w3.org/1999/xlink")
- if (node.name === 'svg' && parentNode.type === 'root') {
- for (const name of Object.keys(node.attributes)) {
- if (name.startsWith('xmlns:')) {
- const local = name.slice('xmlns:'.length);
- unusedNamespaces.add(local);
- }
- }
- }
- if (unusedNamespaces.size !== 0) {
- // preserve namespace used in nested elements names
- if (node.name.includes(':')) {
- const [ns] = node.name.split(':');
- if (unusedNamespaces.has(ns)) {
- unusedNamespaces.delete(ns);
- }
- }
- // preserve namespace used in nested elements attributes
- for (const name of Object.keys(node.attributes)) {
- if (name.includes(':')) {
- const [ns] = name.split(':');
- unusedNamespaces.delete(ns);
- }
- }
- }
- },
- exit: (node, parentNode) => {
- // remove unused namespace attributes from svg element
- if (node.name === 'svg' && parentNode.type === 'root') {
- for (const name of unusedNamespaces) {
- delete node.attributes[`xmlns:${name}`];
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeUselessDefs.js b/node_modules/svgo/plugins/removeUselessDefs.js
deleted file mode 100644
index 5d19810e..00000000
--- a/node_modules/svgo/plugins/removeUselessDefs.js
+++ /dev/null
@@ -1,65 +0,0 @@
-'use strict';
-
-/**
- * @typedef {import('../lib/types').XastElement} XastElement
- */
-
-const { detachNodeFromParent } = require('../lib/xast.js');
-const { elemsGroups } = require('./_collections.js');
-
-exports.name = 'removeUselessDefs';
-exports.description = 'removes elements in <defs> without id';
-
-/**
- * Removes content of defs and properties that aren't rendered directly without ids.
- *
- * @author Lev Solntsev
- *
- * @type {import('./plugins-types').Plugin<'removeUselessDefs'>}
- */
-exports.fn = () => {
- return {
- element: {
- enter: (node, parentNode) => {
- if (node.name === 'defs') {
- /**
- * @type {XastElement[]}
- */
- const usefulNodes = [];
- collectUsefulNodes(node, usefulNodes);
- if (usefulNodes.length === 0) {
- detachNodeFromParent(node, parentNode);
- }
- // TODO remove legacy parentNode in v4
- for (const usefulNode of usefulNodes) {
- Object.defineProperty(usefulNode, 'parentNode', {
- writable: true,
- value: node,
- });
- }
- node.children = usefulNodes;
- } else if (
- elemsGroups.nonRendering.has(node.name) &&
- node.attributes.id == null
- ) {
- detachNodeFromParent(node, parentNode);
- }
- },
- },
- };
-};
-
-/**
- * @type {(node: XastElement, usefulNodes: XastElement[]) => void}
- */
-const collectUsefulNodes = (node, usefulNodes) => {
- for (const child of node.children) {
- if (child.type === 'element') {
- if (child.attributes.id != null || child.name === 'style') {
- usefulNodes.push(child);
- } else {
- collectUsefulNodes(child, usefulNodes);
- }
- }
- }
-};
diff --git a/node_modules/svgo/plugins/removeUselessStrokeAndFill.js b/node_modules/svgo/plugins/removeUselessStrokeAndFill.js
deleted file mode 100644
index 95193fa6..00000000
--- a/node_modules/svgo/plugins/removeUselessStrokeAndFill.js
+++ /dev/null
@@ -1,139 +0,0 @@
-'use strict';
-
-const { visit, visitSkip, detachNodeFromParent } = require('../lib/xast.js');
-const { collectStylesheet, computeStyle } = require('../lib/style.js');
-const { hasScripts } = require('../lib/svgo/tools.js');
-const { elemsGroups } = require('./_collections.js');
-
-exports.name = 'removeUselessStrokeAndFill';
-exports.description = 'removes useless stroke and fill attributes';
-
-/**
- * Remove useless stroke and fill attrs.
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'removeUselessStrokeAndFill'>}
- */
-exports.fn = (root, params) => {
- const {
- stroke: removeStroke = true,
- fill: removeFill = true,
- removeNone = false,
- } = params;
-
- // style and script elements deoptimise this plugin
- let hasStyleOrScript = false;
- visit(root, {
- element: {
- enter: (node) => {
- if (node.name === 'style' || hasScripts(node)) {
- hasStyleOrScript = true;
- }
- },
- },
- });
- if (hasStyleOrScript) {
- return null;
- }
-
- const stylesheet = collectStylesheet(root);
-
- return {
- element: {
- enter: (node, parentNode) => {
- // id attribute deoptimise the whole subtree
- if (node.attributes.id != null) {
- return visitSkip;
- }
- if (!elemsGroups.shape.has(node.name)) {
- return;
- }
- const computedStyle = computeStyle(stylesheet, node);
- const stroke = computedStyle.stroke;
- const strokeOpacity = computedStyle['stroke-opacity'];
- const strokeWidth = computedStyle['stroke-width'];
- const markerEnd = computedStyle['marker-end'];
- const fill = computedStyle.fill;
- const fillOpacity = computedStyle['fill-opacity'];
- const computedParentStyle =
- parentNode.type === 'element'
- ? computeStyle(stylesheet, parentNode)
- : null;
- const parentStroke =
- computedParentStyle == null ? null : computedParentStyle.stroke;
-
- // remove stroke*
- if (removeStroke) {
- if (
- stroke == null ||
- (stroke.type === 'static' && stroke.value == 'none') ||
- (strokeOpacity != null &&
- strokeOpacity.type === 'static' &&
- strokeOpacity.value === '0') ||
- (strokeWidth != null &&
- strokeWidth.type === 'static' &&
- strokeWidth.value === '0')
- ) {
- // stroke-width may affect the size of marker-end
- // marker is not visible when stroke-width is 0
- if (
- (strokeWidth != null &&
- strokeWidth.type === 'static' &&
- strokeWidth.value === '0') ||
- markerEnd == null
- ) {
- for (const name of Object.keys(node.attributes)) {
- if (name.startsWith('stroke')) {
- delete node.attributes[name];
- }
- }
- // set explicit none to not inherit from parent
- if (
- parentStroke != null &&
- parentStroke.type === 'static' &&
- parentStroke.value !== 'none'
- ) {
- node.attributes.stroke = 'none';
- }
- }
- }
- }
-
- // remove fill*
- if (removeFill) {
- if (
- (fill != null && fill.type === 'static' && fill.value === 'none') ||
- (fillOpacity != null &&
- fillOpacity.type === 'static' &&
- fillOpacity.value === '0')
- ) {
- for (const name of Object.keys(node.attributes)) {
- if (name.startsWith('fill-')) {
- delete node.attributes[name];
- }
- }
- if (
- fill == null ||
- (fill.type === 'static' && fill.value !== 'none')
- ) {
- node.attributes.fill = 'none';
- }
- }
- }
-
- if (removeNone) {
- if (
- (stroke == null || node.attributes.stroke === 'none') &&
- ((fill != null &&
- fill.type === 'static' &&
- fill.value === 'none') ||
- node.attributes.fill === 'none')
- ) {
- detachNodeFromParent(node, parentNode);
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeViewBox.js b/node_modules/svgo/plugins/removeViewBox.js
deleted file mode 100644
index c0f23de2..00000000
--- a/node_modules/svgo/plugins/removeViewBox.js
+++ /dev/null
@@ -1,49 +0,0 @@
-'use strict';
-
-exports.name = 'removeViewBox';
-exports.description = 'removes viewBox attribute when possible';
-
-const viewBoxElems = new Set(['pattern', 'svg', 'symbol']);
-
-/**
- * Remove viewBox attr which coincides with a width/height box.
- *
- * @see https://www.w3.org/TR/SVG11/coords.html#ViewBoxAttribute
- *
- * @example
- * <svg width="100" height="50" viewBox="0 0 100 50">
- * ⬇
- * <svg width="100" height="50">
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'removeViewBox'>}
- */
-exports.fn = () => {
- return {
- element: {
- enter: (node, parentNode) => {
- if (
- viewBoxElems.has(node.name) &&
- node.attributes.viewBox != null &&
- node.attributes.width != null &&
- node.attributes.height != null
- ) {
- // TODO remove width/height for such case instead
- if (node.name === 'svg' && parentNode.type !== 'root') {
- return;
- }
- const nums = node.attributes.viewBox.split(/[ ,]+/g);
- if (
- nums[0] === '0' &&
- nums[1] === '0' &&
- node.attributes.width.replace(/px$/, '') === nums[2] && // could use parseFloat too
- node.attributes.height.replace(/px$/, '') === nums[3]
- ) {
- delete node.attributes.viewBox;
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeXMLNS.js b/node_modules/svgo/plugins/removeXMLNS.js
deleted file mode 100644
index b7ec69a1..00000000
--- a/node_modules/svgo/plugins/removeXMLNS.js
+++ /dev/null
@@ -1,29 +0,0 @@
-'use strict';
-
-exports.name = 'removeXMLNS';
-exports.description =
- 'removes xmlns attribute (for inline svg, disabled by default)';
-
-/**
- * Remove the xmlns attribute when present.
- *
- * @example
- * <svg viewBox="0 0 100 50" xmlns="http://www.w3.org/2000/svg">
- * ↓
- * <svg viewBox="0 0 100 50">
- *
- * @author Ricardo Tomasi
- *
- * @type {import('./plugins-types').Plugin<'removeXMLNS'>}
- */
-exports.fn = () => {
- return {
- element: {
- enter: (node) => {
- if (node.name === 'svg') {
- delete node.attributes.xmlns;
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeXMLProcInst.js b/node_modules/svgo/plugins/removeXMLProcInst.js
deleted file mode 100644
index 73ec2335..00000000
--- a/node_modules/svgo/plugins/removeXMLProcInst.js
+++ /dev/null
@@ -1,28 +0,0 @@
-'use strict';
-
-const { detachNodeFromParent } = require('../lib/xast.js');
-
-exports.name = 'removeXMLProcInst';
-exports.description = 'removes XML processing instructions';
-
-/**
- * Remove XML Processing Instruction.
- *
- * @example
- * <?xml version="1.0" encoding="utf-8"?>
- *
- * @author Kir Belevich
- *
- * @type {import('./plugins-types').Plugin<'removeXMLProcInst'>}
- */
-exports.fn = () => {
- return {
- instruction: {
- enter: (node, parentNode) => {
- if (node.name === 'xml') {
- detachNodeFromParent(node, parentNode);
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/removeXlink.js b/node_modules/svgo/plugins/removeXlink.js
deleted file mode 100644
index 0411cc14..00000000
--- a/node_modules/svgo/plugins/removeXlink.js
+++ /dev/null
@@ -1,226 +0,0 @@
-'use strict';
-
-const { elems } = require('./_collections');
-
-/**
- * @typedef {import('../lib/types').XastElement} XastElement
- */
-
-exports.name = 'removeXlink';
-exports.description =
- 'remove xlink namespace and replaces attributes with the SVG 2 equivalent where applicable';
-
-/** URI indicating the Xlink namespace. */
-const XLINK_NAMESPACE = 'http://www.w3.org/1999/xlink';
-
-/**
- * Map of `xlink:show` values to the SVG 2 `target` attribute values.
- *
- * @type {Record<string, string>}
- * @see https://developer.mozilla.org/docs/Web/SVG/Attribute/xlink:show#usage_notes
- */
-const SHOW_TO_TARGET = {
- new: '_blank',
- replace: '_self',
-};
-
-/**
- * Elements that use xlink:href, but were deprecated in SVG 2 and therefore
- * don't support the SVG 2 href attribute.
- *
- * @type {Set<string>}
- * @see https://developer.mozilla.org/docs/Web/SVG/Attribute/xlink:href
- * @see https://developer.mozilla.org/docs/Web/SVG/Attribute/href
- */
-const LEGACY_ELEMENTS = new Set([
- 'cursor',
- 'filter',
- 'font-face-uri',
- 'glyphRef',
- 'tref',
-]);
-
-/**
- * @param {XastElement} node
- * @param {string[]} prefixes
- * @param {string} attr
- * @returns {string[]}
- */
-const findPrefixedAttrs = (node, prefixes, attr) => {
- return prefixes
- .map((prefix) => `${prefix}:${attr}`)
- .filter((attr) => node.attributes[attr] != null);
-};
-
-/**
- * Removes XLink namespace prefixes and converts references to XLink attributes
- * to the native SVG equivalent.
- *
- * The XLink namespace is deprecated in SVG 2.
- *
- * @type {import('./plugins-types').Plugin<'removeXlink'>}
- * @see https://developer.mozilla.org/docs/Web/SVG/Attribute/xlink:href
- */
-exports.fn = (_, params) => {
- const { includeLegacy } = params;
-
- /**
- * XLink namespace prefixes that are currently in the stack.
- *
- * @type {string[]}
- */
- const xlinkPrefixes = [];
-
- /**
- * Namespace prefixes that exist in {@link xlinkPrefixes} but were overridden
- * in a child element to point to another namespace, and so is not treated as
- * an XLink attribute.
- *
- * @type {string[]}
- */
- const overriddenPrefixes = [];
-
- /**
- * Namespace prefixes that were used in one of the {@link LEGACY_ELEMENTS}.
- *
- * @type {string[]}
- */
- const usedInLegacyElement = [];
-
- return {
- element: {
- enter: (node) => {
- for (const [key, value] of Object.entries(node.attributes)) {
- if (key.startsWith('xmlns:')) {
- const prefix = key.split(':', 2)[1];
-
- if (value === XLINK_NAMESPACE) {
- xlinkPrefixes.push(prefix);
- continue;
- }
-
- if (xlinkPrefixes.includes(prefix)) {
- overriddenPrefixes.push(prefix);
- }
- }
- }
-
- if (
- overriddenPrefixes.some((prefix) => xlinkPrefixes.includes(prefix))
- ) {
- return;
- }
-
- const showAttrs = findPrefixedAttrs(node, xlinkPrefixes, 'show');
- let showHandled = node.attributes.target != null;
- for (let i = showAttrs.length - 1; i >= 0; i--) {
- const attr = showAttrs[i];
- const value = node.attributes[attr];
- const mapping = SHOW_TO_TARGET[value];
-
- if (showHandled || mapping == null) {
- delete node.attributes[attr];
- continue;
- }
-
- if (mapping !== elems[node.name]?.defaults?.target) {
- node.attributes.target = mapping;
- }
-
- delete node.attributes[attr];
- showHandled = true;
- }
-
- const titleAttrs = findPrefixedAttrs(node, xlinkPrefixes, 'title');
- for (let i = titleAttrs.length - 1; i >= 0; i--) {
- const attr = titleAttrs[i];
- const value = node.attributes[attr];
- const hasTitle = node.children.filter(
- (child) => child.type === 'element' && child.name === 'title',
- );
-
- if (hasTitle.length > 0) {
- delete node.attributes[attr];
- continue;
- }
-
- /** @type {XastElement} */
- const titleTag = {
- type: 'element',
- name: 'title',
- attributes: {},
- children: [
- {
- type: 'text',
- value,
- },
- ],
- };
-
- Object.defineProperty(titleTag, 'parentNode', {
- writable: true,
- value: node,
- });
-
- node.children.unshift(titleTag);
- delete node.attributes[attr];
- }
-
- const hrefAttrs = findPrefixedAttrs(node, xlinkPrefixes, 'href');
-
- if (
- hrefAttrs.length > 0 &&
- LEGACY_ELEMENTS.has(node.name) &&
- !includeLegacy
- ) {
- hrefAttrs
- .map((attr) => attr.split(':', 1)[0])
- .forEach((prefix) => usedInLegacyElement.push(prefix));
- return;
- }
-
- for (let i = hrefAttrs.length - 1; i >= 0; i--) {
- const attr = hrefAttrs[i];
- const value = node.attributes[attr];
-
- if (node.attributes.href != null) {
- delete node.attributes[attr];
- continue;
- }
-
- node.attributes.href = value;
- delete node.attributes[attr];
- }
- },
- exit: (node) => {
- for (const [key, value] of Object.entries(node.attributes)) {
- const [prefix, attr] = key.split(':', 2);
-
- if (
- xlinkPrefixes.includes(prefix) &&
- !overriddenPrefixes.includes(prefix) &&
- !usedInLegacyElement.includes(prefix) &&
- !includeLegacy
- ) {
- delete node.attributes[key];
- continue;
- }
-
- if (key.startsWith('xmlns:') && !usedInLegacyElement.includes(attr)) {
- if (value === XLINK_NAMESPACE) {
- const index = xlinkPrefixes.indexOf(attr);
- xlinkPrefixes.splice(index, 1);
- delete node.attributes[key];
- continue;
- }
-
- if (overriddenPrefixes.includes(prefix)) {
- const index = overriddenPrefixes.indexOf(attr);
- overriddenPrefixes.splice(index, 1);
- }
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/reusePaths.js b/node_modules/svgo/plugins/reusePaths.js
deleted file mode 100644
index 8c2ddf0d..00000000
--- a/node_modules/svgo/plugins/reusePaths.js
+++ /dev/null
@@ -1,195 +0,0 @@
-'use strict';
-
-const { collectStylesheet } = require('../lib/style');
-const { detachNodeFromParent, querySelectorAll } = require('../lib/xast');
-
-/**
- * @typedef {import('../lib/types').XastElement} XastElement
- * @typedef {import('../lib/types').XastParent} XastParent
- * @typedef {import('../lib/types').XastNode} XastNode
- */
-
-exports.name = 'reusePaths';
-exports.description =
- 'Finds <path> elements with the same d, fill, and ' +
- 'stroke, and converts them to <use> elements ' +
- 'referencing a single <path> def.';
-
-/**
- * Finds <path> elements with the same d, fill, and stroke, and converts them to
- * <use> elements referencing a single <path> def.
- *
- * @author Jacob Howcroft
- *
- * @type {import('./plugins-types').Plugin<'reusePaths'>}
- */
-exports.fn = (root) => {
- const stylesheet = collectStylesheet(root);
-
- /**
- * @type {Map<string, XastElement[]>}
- */
- const paths = new Map();
-
- /**
- * Reference to the first defs element that is a direct child of the svg
- * element if one exists.
- *
- * @type {XastElement}
- * @see https://developer.mozilla.org/docs/Web/SVG/Element/defs
- */
- let svgDefs;
-
- /**
- * Set of hrefs that reference the id of another node.
- *
- * @type {Set<string>}
- */
- const hrefs = new Set();
-
- return {
- element: {
- enter: (node, parentNode) => {
- if (node.name === 'path' && node.attributes.d != null) {
- const d = node.attributes.d;
- const fill = node.attributes.fill || '';
- const stroke = node.attributes.stroke || '';
- const key = d + ';s:' + stroke + ';f:' + fill;
- let list = paths.get(key);
- if (list == null) {
- list = [];
- paths.set(key, list);
- }
- list.push(node);
- }
-
- if (
- svgDefs == null &&
- node.name === 'defs' &&
- parentNode.type === 'element' &&
- parentNode.name === 'svg'
- ) {
- svgDefs = node;
- }
-
- if (node.name === 'use') {
- for (const name of ['href', 'xlink:href']) {
- const href = node.attributes[name];
-
- if (href != null && href.startsWith('#') && href.length > 1) {
- hrefs.add(href.slice(1));
- }
- }
- }
- },
-
- exit: (node, parentNode) => {
- if (node.name === 'svg' && parentNode.type === 'root') {
- let defsTag = svgDefs;
-
- if (defsTag == null) {
- defsTag = {
- type: 'element',
- name: 'defs',
- attributes: {},
- children: [],
- };
- // TODO remove legacy parentNode in v4
- Object.defineProperty(defsTag, 'parentNode', {
- writable: true,
- value: node,
- });
- }
-
- let index = 0;
- for (const list of paths.values()) {
- if (list.length > 1) {
- /** @type {XastElement} */
- const reusablePath = {
- type: 'element',
- name: 'path',
- attributes: {},
- children: [],
- };
-
- for (const attr of ['fill', 'stroke', 'd']) {
- if (list[0].attributes[attr] != null) {
- reusablePath.attributes[attr] = list[0].attributes[attr];
- }
- }
-
- const originalId = list[0].attributes.id;
- if (
- originalId == null ||
- hrefs.has(originalId) ||
- stylesheet.rules.some(
- (rule) => rule.selector === `#${originalId}`,
- )
- ) {
- reusablePath.attributes.id = 'reuse-' + index++;
- } else {
- reusablePath.attributes.id = originalId;
- delete list[0].attributes.id;
- }
- // TODO remove legacy parentNode in v4
- Object.defineProperty(reusablePath, 'parentNode', {
- writable: true,
- value: defsTag,
- });
- defsTag.children.push(reusablePath);
- // convert paths to <use>
- for (const pathNode of list) {
- delete pathNode.attributes.d;
- delete pathNode.attributes.stroke;
- delete pathNode.attributes.fill;
-
- if (
- defsTag.children.includes(pathNode) &&
- pathNode.children.length === 0
- ) {
- if (Object.keys(pathNode.attributes).length === 0) {
- detachNodeFromParent(pathNode, defsTag);
- continue;
- }
-
- if (
- Object.keys(pathNode.attributes).length === 1 &&
- pathNode.attributes.id != null
- ) {
- detachNodeFromParent(pathNode, defsTag);
- const selector = `[xlink\\:href=#${pathNode.attributes.id}], [href=#${pathNode.attributes.id}]`;
- for (const child of querySelectorAll(node, selector)) {
- if (child.type !== 'element') {
- continue;
- }
- for (const name of ['href', 'xlink:href']) {
- if (child.attributes[name] != null) {
- child.attributes[name] =
- '#' + reusablePath.attributes.id;
- }
- }
- }
- continue;
- }
- }
-
- pathNode.name = 'use';
- pathNode.attributes['xlink:href'] =
- '#' + reusablePath.attributes.id;
- }
- }
- }
- if (defsTag.children.length !== 0) {
- if (node.attributes['xmlns:xlink'] == null) {
- node.attributes['xmlns:xlink'] = 'http://www.w3.org/1999/xlink';
- }
-
- if (svgDefs == null) {
- node.children.unshift(defsTag);
- }
- }
- }
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/sortAttrs.js b/node_modules/svgo/plugins/sortAttrs.js
deleted file mode 100644
index 6347f65e..00000000
--- a/node_modules/svgo/plugins/sortAttrs.js
+++ /dev/null
@@ -1,108 +0,0 @@
-'use strict';
-
-exports.name = 'sortAttrs';
-exports.description = 'Sort element attributes for better compression';
-
-/**
- * Sort element attributes for better compression
- *
- * @author Nikolay Frantsev
- *
- * @type {import('./plugins-types').Plugin<'sortAttrs'>}
- */
-exports.fn = (_root, params) => {
- const {
- order = [
- 'id',
- 'width',
- 'height',
- 'x',
- 'x1',
- 'x2',
- 'y',
- 'y1',
- 'y2',
- 'cx',
- 'cy',
- 'r',
- 'fill',
- 'stroke',
- 'marker',
- 'd',
- 'points',
- ],
- xmlnsOrder = 'front',
- } = params;
-
- /**
- * @type {(name: string) => number}
- */
- const getNsPriority = (name) => {
- if (xmlnsOrder === 'front') {
- // put xmlns first
- if (name === 'xmlns') {
- return 3;
- }
- // xmlns:* attributes second
- if (name.startsWith('xmlns:')) {
- return 2;
- }
- }
- // other namespaces after and sort them alphabetically
- if (name.includes(':')) {
- return 1;
- }
- // other attributes
- return 0;
- };
-
- /**
- * @type {(a: [string, string], b: [string, string]) => number}
- */
- const compareAttrs = ([aName], [bName]) => {
- // sort namespaces
- const aPriority = getNsPriority(aName);
- const bPriority = getNsPriority(bName);
- const priorityNs = bPriority - aPriority;
- if (priorityNs !== 0) {
- return priorityNs;
- }
- // extract the first part from attributes
- // for example "fill" from "fill" and "fill-opacity"
- const [aPart] = aName.split('-');
- const [bPart] = bName.split('-');
- // rely on alphabetical sort when the first part is the same
- if (aPart !== bPart) {
- const aInOrderFlag = order.includes(aPart) ? 1 : 0;
- const bInOrderFlag = order.includes(bPart) ? 1 : 0;
- // sort by position in order param
- if (aInOrderFlag === 1 && bInOrderFlag === 1) {
- return order.indexOf(aPart) - order.indexOf(bPart);
- }
- // put attributes from order param before others
- const priorityOrder = bInOrderFlag - aInOrderFlag;
- if (priorityOrder !== 0) {
- return priorityOrder;
- }
- }
- // sort alphabetically
- return aName < bName ? -1 : 1;
- };
-
- return {
- element: {
- enter: (node) => {
- const attrs = Object.entries(node.attributes);
- attrs.sort(compareAttrs);
- /**
- * @type {Record<string, string>}
- */
- const sortedAttributes = {};
- for (const [name, value] of attrs) {
- sortedAttributes[name] = value;
- }
- node.attributes = sortedAttributes;
- },
- },
- };
-};
diff --git a/node_modules/svgo/plugins/sortDefsChildren.js b/node_modules/svgo/plugins/sortDefsChildren.js
deleted file mode 100644
index 6ae5d421..00000000
--- a/node_modules/svgo/plugins/sortDefsChildren.js
+++ /dev/null
@@ -1,58 +0,0 @@
-'use strict';
-
-exports.name = 'sortDefsChildren';
-exports.description = 'Sorts children of <defs> to improve compression';
-
-/**
- * Sorts children of defs in order to improve compression.
- * Sorted first by frequency then by element name length then by element name (to ensure grouping).
- *
- * @author David Leston
- *
- * @type {import('./plugins-types').Plugin<'sortDefsChildren'>}
- */
-exports.fn = () => {
- return {
- element: {
- enter: (node) => {
- if (node.name === 'defs') {
- /**
- * @type {Map<string, number>}
- */
- const frequencies = new Map();
- for (const child of node.children) {
- if (child.type === 'element') {
- const frequency = frequencies.get(child.name);
- if (frequency == null) {
- frequencies.set(child.name, 1);
- } else {
- frequencies.set(child.name, frequency + 1);
- }
- }
- }
- node.children.sort((a, b) => {
- if (a.type !== 'element' || b.type !== 'element') {
- return 0;
- }
- const aFrequency = frequencies.get(a.name);
- const bFrequency = frequencies.get(b.name);
- if (aFrequency != null && bFrequency != null) {
- const frequencyComparison = bFrequency - aFrequency;
- if (frequencyComparison !== 0) {
- return frequencyComparison;
- }
- }
- const lengthComparison = b.name.length - a.name.length;
- if (lengthComparison !== 0) {
- return lengthComparison;
- }
- if (a.name !== b.name) {
- return a.name > b.name ? -1 : 1;
- }
- return 0;
- });
- }
- },
- },
- };
-};