From 2f3c32f2e4574def1c3527e10ebcbe8a1087d61b Mon Sep 17 00:00:00 2001 From: Marcell Mars Date: Mon, 12 Dec 2022 17:40:03 +0100 Subject: [PATCH] !publish! big update. --- .../SandpointsTheme/assets/css/site.css | 235 +- .../SandpointsTheme/assets/js/sandpoints.js | 61 +- .../customizations/Dotawo/assets/css/site.css | 1 + .../_default/_markup/render-image.html | 18 +- .../Dotawo/layouts/partials/header.html | 15 +- .../Dotawo/layouts/partials/singlebody.html | 18 +- .../Dotawo/static/css/site.min.css | 2 +- .../data/sandpointsnamegraph.json | 71 +- .../_default/_markup/render-image.html | 24 +- .../layouts/_default/baseof.html | 4 +- .../layouts/_default/list.html | 13 +- .../SandpointsTheme/layouts/edit/baseof.html | 13 +- .../SandpointsTheme/layouts/edit/list.html | 10 +- .../SandpointsTheme/layouts/edit/single.html | 1 + .../layouts/metadata/list.js.js | 21 +- .../layouts/partials/head.html | 19 +- .../layouts/partials/header.html | 15 +- .../layouts/partials/printsinglebody.html | 8 + .../layouts/partials/readdir.html | 5 +- .../layouts/partials/sandpointjs.html | 2 +- .../layouts/partials/singlebody.html | 18 +- .../SandpointsTheme/layouts/print/baseof.html | 2 +- .../layouts/taxonomy/baseof.html | 12 + .../layouts/taxonomy/list.html | 23 + .../SandpointsTheme/static/css/print.css | 8 +- .../SandpointsTheme/static/css/site.min.css | 2 +- .../static/js/paged.polyfill.js | 6299 +++++++++++------ .../SandpointsTheme/static/logo/800x418.png | Bin 0 -> 21285 bytes .../SandpointsTheme/static/logo/800x800.png | Bin 0 -> 38346 bytes .../SandpointsTheme/static/logo/index.html | 145 + _vendor/modules.txt | 2 +- config.toml | 117 +- 32 files changed, 4752 insertions(+), 2432 deletions(-) create mode 100644 _vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/edit/single.html create mode 100644 _vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/taxonomy/baseof.html create mode 100644 _vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/taxonomy/list.html create mode 100644 _vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/logo/800x418.png create mode 100644 _vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/logo/800x800.png create mode 100644 _vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/logo/index.html diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/assets/css/site.css b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/assets/css/site.css index cfc4cd0..e2ea2b2 100644 --- a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/assets/css/site.css +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/assets/css/site.css @@ -90,18 +90,18 @@ th:not([align]) { src: url("../fonts/vollkorn-sc-v4-latin-ext_latin-regular.eot"); /* IE9 Compat Modes */ src: local(""), - url("../fonts/vollkorn-sc-v4-latin-ext_latin-regular.eot?#iefix") - format("embedded-opentype"), - /* IE6-IE8 */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-regular.woff2") - format("woff2"), - /* Super Modern Browsers */ - url("../fonts/vollkorn-sc-v4-latin-ext_latin-regular.woff") format("woff"), - /* Modern Browsers */ - url("../fonts/vollkorn-sc-v4-latin-ext_latin-regular.ttf") - format("truetype"), - /* Safari, Android, iOS */ - url("../fonts/vollkorn-sc-v4-latin-ext_latin-regular.svg#VollkornSC") - format("svg"); + url("../fonts/vollkorn-sc-v4-latin-ext_latin-regular.eot?#iefix") + format("embedded-opentype"), + /* IE6-IE8 */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-regular.woff2") + format("woff2"), + /* Super Modern Browsers */ + url("../fonts/vollkorn-sc-v4-latin-ext_latin-regular.woff") format("woff"), + /* Modern Browsers */ + url("../fonts/vollkorn-sc-v4-latin-ext_latin-regular.ttf") + format("truetype"), + /* Safari, Android, iOS */ + url("../fonts/vollkorn-sc-v4-latin-ext_latin-regular.svg#VollkornSC") + format("svg"); /* Legacy iOS */ } @@ -114,17 +114,17 @@ th:not([align]) { src: url("../fonts/vollkorn-sc-v4-latin-ext_latin-600.eot"); /* IE9 Compat Modes */ src: local(""), - url("../fonts/vollkorn-sc-v4-latin-ext_latin-600.eot?#iefix") - format("embedded-opentype"), - /* IE6-IE8 */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-600.woff2") - format("woff2"), - /* Super Modern Browsers */ - url("../fonts/vollkorn-sc-v4-latin-ext_latin-600.woff") format("woff"), - /* Modern Browsers */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-600.ttf") - format("truetype"), - /* Safari, Android, iOS */ - url("../fonts/vollkorn-sc-v4-latin-ext_latin-600.svg#VollkornSC") - format("svg"); + url("../fonts/vollkorn-sc-v4-latin-ext_latin-600.eot?#iefix") + format("embedded-opentype"), + /* IE6-IE8 */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-600.woff2") + format("woff2"), + /* Super Modern Browsers */ + url("../fonts/vollkorn-sc-v4-latin-ext_latin-600.woff") format("woff"), + /* Modern Browsers */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-600.ttf") + format("truetype"), + /* Safari, Android, iOS */ + url("../fonts/vollkorn-sc-v4-latin-ext_latin-600.svg#VollkornSC") + format("svg"); /* Legacy iOS */ } @@ -137,17 +137,17 @@ th:not([align]) { src: url("../fonts/vollkorn-sc-v4-latin-ext_latin-700.eot"); /* IE9 Compat Modes */ src: local(""), - url("../fonts/vollkorn-sc-v4-latin-ext_latin-700.eot?#iefix") - format("embedded-opentype"), - /* IE6-IE8 */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-700.woff2") - format("woff2"), - /* Super Modern Browsers */ - url("../fonts/vollkorn-sc-v4-latin-ext_latin-700.woff") format("woff"), - /* Modern Browsers */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-700.ttf") - format("truetype"), - /* Safari, Android, iOS */ - url("../fonts/vollkorn-sc-v4-latin-ext_latin-700.svg#VollkornSC") - format("svg"); + url("../fonts/vollkorn-sc-v4-latin-ext_latin-700.eot?#iefix") + format("embedded-opentype"), + /* IE6-IE8 */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-700.woff2") + format("woff2"), + /* Super Modern Browsers */ + url("../fonts/vollkorn-sc-v4-latin-ext_latin-700.woff") format("woff"), + /* Modern Browsers */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-700.ttf") + format("truetype"), + /* Safari, Android, iOS */ + url("../fonts/vollkorn-sc-v4-latin-ext_latin-700.svg#VollkornSC") + format("svg"); /* Legacy iOS */ } @@ -160,17 +160,17 @@ th:not([align]) { src: url("../fonts/vollkorn-sc-v4-latin-ext_latin-900.eot"); /* IE9 Compat Modes */ src: local(""), - url("../fonts/vollkorn-sc-v4-latin-ext_latin-900.eot?#iefix") - format("embedded-opentype"), - /* IE6-IE8 */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-900.woff2") - format("woff2"), - /* Super Modern Browsers */ - url("../fonts/vollkorn-sc-v4-latin-ext_latin-900.woff") format("woff"), - /* Modern Browsers */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-900.ttf") - format("truetype"), - /* Safari, Android, iOS */ - url("../fonts/vollkorn-sc-v4-latin-ext_latin-900.svg#VollkornSC") - format("svg"); + url("../fonts/vollkorn-sc-v4-latin-ext_latin-900.eot?#iefix") + format("embedded-opentype"), + /* IE6-IE8 */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-900.woff2") + format("woff2"), + /* Super Modern Browsers */ + url("../fonts/vollkorn-sc-v4-latin-ext_latin-900.woff") format("woff"), + /* Modern Browsers */ url("../fonts/vollkorn-sc-v4-latin-ext_latin-900.ttf") + format("truetype"), + /* Safari, Android, iOS */ + url("../fonts/vollkorn-sc-v4-latin-ext_latin-900.svg#VollkornSC") + format("svg"); /* Legacy iOS */ } @@ -183,18 +183,18 @@ th:not([align]) { src: url("../fonts/vollkorn-v12-latin-ext_latin-500italic.eot"); /* IE9 Compat Modes */ src: local(""), - url("../fonts/vollkorn-v12-latin-ext_latin-500italic.eot?#iefix") - format("embedded-opentype"), - /* IE6-IE8 */ url("../fonts/vollkorn-v12-latin-ext_latin-500italic.woff2") - format("woff2"), - /* Super Modern Browsers */ - url("../fonts/vollkorn-v12-latin-ext_latin-500italic.woff") format("woff"), - /* Modern Browsers */ - url("../fonts/vollkorn-v12-latin-ext_latin-500italic.ttf") - format("truetype"), - /* Safari, Android, iOS */ - url("../fonts/vollkorn-v12-latin-ext_latin-500italic.svg#Vollkorn") - format("svg"); + url("../fonts/vollkorn-v12-latin-ext_latin-500italic.eot?#iefix") + format("embedded-opentype"), + /* IE6-IE8 */ url("../fonts/vollkorn-v12-latin-ext_latin-500italic.woff2") + format("woff2"), + /* Super Modern Browsers */ + url("../fonts/vollkorn-v12-latin-ext_latin-500italic.woff") format("woff"), + /* Modern Browsers */ + url("../fonts/vollkorn-v12-latin-ext_latin-500italic.ttf") + format("truetype"), + /* Safari, Android, iOS */ + url("../fonts/vollkorn-v12-latin-ext_latin-500italic.svg#Vollkorn") + format("svg"); /* Legacy iOS */ } @@ -207,18 +207,18 @@ th:not([align]) { src: url("../fonts/vollkorn-v12-latin-ext_latin-regular.eot"); /* IE9 Compat Modes */ src: local(""), - url("../fonts/vollkorn-v12-latin-ext_latin-regular.eot?#iefix") - format("embedded-opentype"), - /* IE6-IE8 */ url("../fonts/vollkorn-v12-latin-ext_latin-regular.woff2") - format("woff2"), - /* Super Modern Browsers */ - url("../fonts/vollkorn-v12-latin-ext_latin-regular.woff") format("woff"), - /* Modern Browsers */ - url("../fonts/vollkorn-v12-latin-ext_latin-regular.ttf") - format("truetype"), - /* Safari, Android, iOS */ - url("../fonts/vollkorn-v12-latin-ext_latin-regular.svg#Vollkorn") - format("svg"); + url("../fonts/vollkorn-v12-latin-ext_latin-regular.eot?#iefix") + format("embedded-opentype"), + /* IE6-IE8 */ url("../fonts/vollkorn-v12-latin-ext_latin-regular.woff2") + format("woff2"), + /* Super Modern Browsers */ + url("../fonts/vollkorn-v12-latin-ext_latin-regular.woff") format("woff"), + /* Modern Browsers */ + url("../fonts/vollkorn-v12-latin-ext_latin-regular.ttf") + format("truetype"), + /* Safari, Android, iOS */ + url("../fonts/vollkorn-v12-latin-ext_latin-regular.svg#Vollkorn") + format("svg"); /* Legacy iOS */ } @@ -231,17 +231,17 @@ th:not([align]) { src: url("../fonts/vollkorn-v12-latin-ext_latin-500.eot"); /* IE9 Compat Modes */ src: local(""), - url("../fonts/vollkorn-v12-latin-ext_latin-500.eot?#iefix") - format("embedded-opentype"), - /* IE6-IE8 */ url("../fonts/vollkorn-v12-latin-ext_latin-500.woff2") - format("woff2"), - /* Super Modern Browsers */ - url("../fonts/vollkorn-v12-latin-ext_latin-500.woff") format("woff"), - /* Modern Browsers */ url("../fonts/vollkorn-v12-latin-ext_latin-500.ttf") - format("truetype"), - /* Safari, Android, iOS */ - url("../fonts/vollkorn-v12-latin-ext_latin-500.svg#Vollkorn") - format("svg"); + url("../fonts/vollkorn-v12-latin-ext_latin-500.eot?#iefix") + format("embedded-opentype"), + /* IE6-IE8 */ url("../fonts/vollkorn-v12-latin-ext_latin-500.woff2") + format("woff2"), + /* Super Modern Browsers */ + url("../fonts/vollkorn-v12-latin-ext_latin-500.woff") format("woff"), + /* Modern Browsers */ url("../fonts/vollkorn-v12-latin-ext_latin-500.ttf") + format("truetype"), + /* Safari, Android, iOS */ + url("../fonts/vollkorn-v12-latin-ext_latin-500.svg#Vollkorn") + format("svg"); /* Legacy iOS */ } @@ -254,17 +254,17 @@ th:not([align]) { src: url("../fonts/vollkorn-v12-latin-ext_latin-italic.eot"); /* IE9 Compat Modes */ src: local(""), - url("../fonts/vollkorn-v12-latin-ext_latin-italic.eot?#iefix") - format("embedded-opentype"), - /* IE6-IE8 */ url("../fonts/vollkorn-v12-latin-ext_latin-italic.woff2") - format("woff2"), - /* Super Modern Browsers */ - url("../fonts/vollkorn-v12-latin-ext_latin-italic.woff") format("woff"), - /* Modern Browsers */ - url("../fonts/vollkorn-v12-latin-ext_latin-italic.ttf") format("truetype"), - /* Safari, Android, iOS */ - url("../fonts/vollkorn-v12-latin-ext_latin-italic.svg#Vollkorn") - format("svg"); + url("../fonts/vollkorn-v12-latin-ext_latin-italic.eot?#iefix") + format("embedded-opentype"), + /* IE6-IE8 */ url("../fonts/vollkorn-v12-latin-ext_latin-italic.woff2") + format("woff2"), + /* Super Modern Browsers */ + url("../fonts/vollkorn-v12-latin-ext_latin-italic.woff") format("woff"), + /* Modern Browsers */ + url("../fonts/vollkorn-v12-latin-ext_latin-italic.ttf") format("truetype"), + /* Safari, Android, iOS */ + url("../fonts/vollkorn-v12-latin-ext_latin-italic.svg#Vollkorn") + format("svg"); /* Legacy iOS */ } @@ -277,18 +277,18 @@ th:not([align]) { src: url("../fonts/great-vibes-v7-latin-ext_latin-regular.eot"); /* IE9 Compat Modes */ src: local("Great Vibes"), local("GreatVibes-Regular"), - url("../fonts/great-vibes-v7-latin-ext_latin-regular.eot?#iefix") - format("embedded-opentype"), - /* IE6-IE8 */ url("../fonts/great-vibes-v7-latin-ext_latin-regular.woff2") - format("woff2"), - /* Super Modern Browsers */ - url("../fonts/great-vibes-v7-latin-ext_latin-regular.woff") format("woff"), - /* Modern Browsers */ - url("../fonts/great-vibes-v7-latin-ext_latin-regular.ttf") - format("truetype"), - /* Safari, Android, iOS */ - url("../fonts/great-vibes-v7-latin-ext_latin-regular.svg#GreatVibes") - format("svg"); + url("../fonts/great-vibes-v7-latin-ext_latin-regular.eot?#iefix") + format("embedded-opentype"), + /* IE6-IE8 */ url("../fonts/great-vibes-v7-latin-ext_latin-regular.woff2") + format("woff2"), + /* Super Modern Browsers */ + url("../fonts/great-vibes-v7-latin-ext_latin-regular.woff") format("woff"), + /* Modern Browsers */ + url("../fonts/great-vibes-v7-latin-ext_latin-regular.ttf") + format("truetype"), + /* Safari, Android, iOS */ + url("../fonts/great-vibes-v7-latin-ext_latin-regular.svg#GreatVibes") + format("svg"); /* Legacy iOS */ } @@ -477,8 +477,11 @@ ol li { list-style-type: decimal; } -img { - width: 100%; +img, video { + max-width: 100%; + display: block; + margin-left: auto; + margin-right: auto; } .supt { @@ -575,9 +578,9 @@ img { .rightcolumn { /* display: grid; - grid-column: 2; - grid-template-columns: auto 1fr; - grid-auto-rows: max-content; */ + grid-column: 2; + grid-template-columns: auto 1fr; + grid-auto-rows: max-content; */ padding-left: 0.5rem; } @@ -592,6 +595,7 @@ img { .hasauthors { font-size: 1.6rem !important; + display: flex; } .hassup { @@ -669,7 +673,7 @@ h6 { padding-top: 1.2rem; padding-bottom: 1.2rem; background-color: rgba(0, 0, 0, 0.05); - max-width: 70ch; + max-width: 45ch; } .authors { @@ -775,7 +779,7 @@ h6:before { color: rgba(0, 0, 0, 0.4); counter-increment: h6; content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." - counter(h6) ". "; + counter(h6) ". "; } h2.nocount:before, @@ -834,9 +838,9 @@ details { } /* .glossline { - border-bottom: lightgray solid 1px; - border-top: lightgray solid 1px; -} */ + border-bottom: lightgray solid 1px; + border-top: lightgray solid 1px; + } */ .glosswords { display: inline-block; @@ -876,6 +880,11 @@ details { background-color: #fff9f9; } +.svedit { + display: none; + margin-left: 0.5rem; +} + @media (max-width: 767px) { html { box-sizing: border-box; diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/assets/js/sandpoints.js b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/assets/js/sandpoints.js index 1ffb04c..4d46e25 100644 --- a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/assets/js/sandpoints.js +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/assets/js/sandpoints.js @@ -54,7 +54,48 @@ window.addEventListener("scroll", function (e) { } }); +function editPage(repoJsId) { + let relPath = "../".repeat(relPathDepth - 1); + var el = document.createElement('script'); + el.onload = ()=> { + console.log("loading...") + console.log(repo) + } + el.src = `${relPath}js/repo/${repoJsId}.js` + document.body.appendChild(el) + document.location.href = `${relPath}edit/index.html?edit=${repoJsId}` +ev} + +window.addEventListener("keyup", (e)=> { + if (e.key == "e" && location.protocol == "file:") { + editPage(sandpointsPageId) + } else if (e.key == "E" && location.protocol == "file:") { + let preview = document.querySelector("#preview"); + if (preview.style.display == "flex") { + preview.style.display = "none"; + } else { + preview.style.display = "flex"; + } + console.log("preview: ", preview); + } +}) + window.addEventListener("DOMContentLoaded", (e) => { + if (location.protocol == "file:") { + document.querySelectorAll(".svedit").forEach((i) => { + i.style.display = "inline"; + }) + } + + document.querySelectorAll('.triadlink').forEach((i) => { + i.addEventListener("click", (ev) => { + if (ev.ctrlKey) { + ev.preventDefault() + editPage(ev.target.getAttribute("repoid")) + } + }) + }) + let preview = document.querySelector("#preview"); if ( location.pathname.split("/").includes("_preview") || @@ -66,15 +107,17 @@ window.addEventListener("DOMContentLoaded", (e) => { let par = document.querySelector( "#TableOfContents > ol:first-child > li:first-child" ); - let s = document.createElement("span"); - s.appendChild(par.cloneNode(true)); - par.remove(); - document - .querySelector("#TableOfContents > ol:first-child") - .insertBefore( - s, - document.querySelector("#TableOfContents > ol:first-child").firstChild - ); + if (par) { + let s = document.createElement("span"); + s.appendChild(par.cloneNode(true)); + par.remove(); + document + .querySelector("#TableOfContents > ol:first-child") + .insertBefore( + s, + document.querySelector("#TableOfContents > ol:first-child").firstChild + ); + } if (document.querySelector(".soundcite")) { let relPath = "../".repeat(relPathDepth - 1); diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/assets/css/site.css b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/assets/css/site.css index 52ccedf..c30694e 100644 --- a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/assets/css/site.css +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/assets/css/site.css @@ -427,6 +427,7 @@ ol li { .hasauthors { font-size: 1.6rem !important; + display: flex; } .hassup { diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/layouts/_default/_markup/render-image.html b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/layouts/_default/_markup/render-image.html index 7faa3d3..fad8dcd 100644 --- a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/layouts/_default/_markup/render-image.html +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/layouts/_default/_markup/render-image.html @@ -5,7 +5,17 @@ {{ $_.Add "triads" $k }} {{- end -}} -{{- if strings.HasPrefix .Destination "bib:" -}} +{{- if strings.HasPrefix .Destination "img:" -}} + {{- $img_params := (substr .Destination 4) -}} + {{- $img_src := index (split $img_params " ") 0 -}} + {{- $img_attr := index (split $img_params $img_src) 1 -}} + +{{- else if strings.HasPrefix .Destination "vid:" -}} + {{- $vid_params := (substr .Destination 4) -}} + {{- $vid_src := index (split $vid_params " ") 0 -}} + {{- $vid_attr := index (split $vid_params $vid_src) 1 -}} + +{{- else if strings.HasPrefix .Destination "bib:" -}} {{- $destination := (substr .Destination 4) -}} {{- $c_prefix := .Page.Site.Params.sandpointsCatalogPrefix | default "/library/" -}} {{- if index $.Page.Site.Data.books.catalog $destination -}} @@ -22,16 +32,16 @@ bib⁄{{- $text_link -}} {{- end -}} {{- else -}} - {{- $text_link -}}⦚bib:{{- $destination -}} not found + {{- $text_link -}}⦚bib:{{- $destination -}} not found {{- end -}} {{- else if in ($_.Get "triads") (index (split .Destination ":") 0) -}} {{- if $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}} {{- $session := $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}} {{ .Page.Scratch.Add "links" (slice $session) }} {{- if not $text_link -}} - {{- index (split .Destination ":") 0 -}}⁄{{- $session.Title -}} + {{- index (split .Destination ":") 0 -}}⁄{{- $session.Title -}} {{- else -}} - {{- index (split .Destination ":") 0 -}}⁄{{- $text_link -}} + {{- index (split .Destination ":") 0 -}}⁄{{- $text_link -}} {{- end -}} {{- else -}} {{- $text_link -}}⦚{{- .Destination -}} not found diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/layouts/partials/header.html b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/layouts/partials/header.html index 8d506f2..c88addd 100644 --- a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/layouts/partials/header.html +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/layouts/partials/header.html @@ -33,9 +33,19 @@ {{ with $scratch.mantle }}ADD_{{ index . 0 | upper }}{{ end }} {{ with $scratch.crust }}ADD_{{ index . 0 | upper }}{{ end }} {{ if not $scratch.core }}ADD_{{ substr $currentDir 0 -1 | upper }}{{ end }} - PUBLISH + PUBLISH ? +{{ else }} + {{ $editPage := $.Site.GetPage "/edit" }} +
+ EDIT_THIS + {{ with $scratch.core }}ADD_{{ index . 0 | upper }}{{ end }} + {{ with $scratch.mantle }}ADD_{{ index . 0 | upper }}{{ end }} + {{ with $scratch.crust }}ADD_{{ index . 0 | upper }}{{ end }} + {{ if not $scratch.core }}ADD_{{ substr $currentDir 0 -1 | upper }}{{ end }} +
+ {{ end }}
@@ -43,6 +53,9 @@ {{ end }} {{ if in .Page.Site.Params.sandpointsMentionedIn (substr $currentDir 0 -1) }}
@@ -92,4 +99,7 @@ {{ with .Page.Params.abstract }}
abstract⁄{{ . | $.Page.RenderString | htmlUnescape | safeHTML }}
{{ end }} -{{- $vld := false -}}{{- range $k, $v := .Page.Params.keywords -}}{{- if eq $k 0 -}}{{- $vld = true -}}
keywords⁄{{- $v -}}{{- else -}}, {{- $v -}}{{- end -}}{{- end -}}{{- with $vld -}}
{{- end -}} +{{- $vld := false -}}{{- range $k, $v := .Page.Params.keywords -}}{{- if eq $k 0 -}}{{- $vld = true -}}
keywords⁄{{- $v -}}{{- else -}}, {{- $v -}}{{- end -}}{{- end -}}{{- with $vld -}}
{{- end -}} + +{{ $var := printf "repo={\"frontmatter\": %s, \"content\": %s, \"path\": \"%s\", \"relpermalink\": \"%s\" }" (jsonify .Params) (jsonify .RawContent) .File.Path .RelPermalink | resources.FromString (printf "js/repo/%s.js" .File.UniqueID) }} +{{ $dummy := $var.Permalink }} diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/static/css/site.min.css b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/static/css/site.min.css index c53dcc3..496544f 100644 --- a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/static/css/site.min.css +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/customizations/Dotawo/static/css/site.min.css @@ -1 +1 @@ -html,body,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}ul{list-style:none}button,input,select,textarea{margin:0}html{box-sizing:border-box}img,video{height:auto;max-width:100%}iframe{border:0}strong del{display:inline;text-decoration:none;margin-left:1rem;box-decoration-break:clone;-webkit-box-decoration-break:clone}table{border-collapse:collapse;border-spacing:0;background-color:#fff9f9;border-left:1px red solid;margin-left:1rem}td,th{padding:0;vertical-align:top;padding-right:1rem;padding-left:1rem;padding-bottom:.5rem}td:not([align]),th:not([align]){text-align:left}@font-face{font-family:gentium plus;font-style:normal;src:url(../fonts/GentiumPlus-R.woff),url(../fonts/GentiumPlus-R.woff)format("woff")}@font-face{font-family:gentium plus;font-style:italic;src:url(../fonts/GentiumPlus-I.woff),url(../fonts/GentiumPlus-I.woff)format("woff")}@font-face{font-family:great vibes;font-style:normal;font-weight:400;src:url(../fonts/great-vibes-v7-latin-ext_latin-regular.eot);src:local("Great Vibes"),local("GreatVibes-Regular"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.eot?#iefix)format("embedded-opentype"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.woff2)format("woff2"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.woff)format("woff"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.ttf)format("truetype"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.svg#GreatVibes)format("svg")}@font-face{font-family:antinoou;font-style:normal;src:url(../fonts/Antinoou.ttf),url(../fonts/Antinoou.ttf)format("truetype");unicode-range:U+2C80–U+2CFF,U+0370–U+03FF,U+102E0–U+102FF}@font-face{font-family:antinoou;font-style:italic;src:url(../fonts/AntinoouItalic.ttf),url(../fonts/AntinoouItalic.ttf)format("truetype");unicode-range:U+2C80–U+2CFF,U+0370–U+03FF,U+102E0–U+102FF}html{line-height:1.5}body{font-family:gentium plus,antinoou,serif;max-width:1024px;font-size:1.4rem;padding-left:3rem;padding-top:.5rem;padding-right:2rem;color:#000}#preview{display:none}sup,sub{vertical-align:baseline;position:relative;top:-.4em}sub{top:.4em}.headiter{display:flex;justify-content:space-between;border-bottom:.3rem solid red;border-top:.1rem solid red;padding-top:1rem;padding-bottom:.5rem;padding-left:1rem;padding-right:1rem;margin-bottom:1rem}a.edit-button{color:#000;text-decoration:none}a.edit-button:hover{text-decoration:underline;-webkit-text-decoration-color:red;text-decoration-color:red;font-weight:700;cursor:pointer}.header{display:grid;grid-template-columns:auto;grid-auto-flow:column;position:sticky;top:0;padding-top:.5rem;font-size:1.1rem;background-color:#fff;z-index:10}.mantlebar{display:none}.breadcrumbs{grid-column:1}.bibliotheke{width:2.4rem;grid-column:2;margin-left:auto}.bibliotheke:hover{text-decoration:none;font-size:1rem}.alsoin{font-weight:700;display:inline-flex;padding-left:.2rem;padding-right:.3rem}.ddmenu{cursor:pointer;display:inline-grid}.ddmenu input{display:none}.ddmenu li{list-style-type:none}.ddmenu .hiddendiv{display:none;margin-top:-.9rem}input:focus,select:focus,textarea:focus,label:focus,button:focus{outline:none}.ddmenu input:checked~.hiddendiv{display:block}.logolink{width:2.4rem;margin-left:auto}.sandpointlogo{border-radius:50%;border:.3em solid red;display:inline-flex;font-family:great vibes,cursive;font-size:1.2rem;font-weight:700;color:#fff;background-color:red;position:relative;padding-left:1em;padding-right:.3em;padding-bottom:1.2em;max-width:0;max-height:0}.sandpointF{position:absolute;font-size:1.2em;margin-top:-.2em;margin-left:-.4em}.sandpointN{position:absolute;font-size:.7em;margin-top:.4em;color:red;margin-left:-.5em}.sandpointC{position:absolute;font-size:1em;margin-left:-.37em}footer{display:flex;margin-bottom:1rem;margin-top:4rem}li{list-style-type:"› "}li[role=doc-endnote]{list-style-type:decimal}ol li{list-style-type:decimal}.supt{display:inline-flex;flex-wrap:nowrap;font-family:great vibes,cursive;font-size:.9em;font-style:normal;color:rgba(0,0,0,.8);vertical-align:baseline;position:relative;top:-.3em}.sup{display:inline-flex;flex-wrap:nowrap;font-family:great vibes,cursive;font-size:.9em;font-style:normal;color:red;vertical-align:baseline;position:relative;top:-.3em}.sup:hover{font-weight:400!important}.nosup a{color:red}.nosup a span.sup{display:none}.syllabustitle,.coretitle{margin-top:4rem;font-style:italic;font-size:4rem;margin-bottom:4rem}.mantletitle,.crusttitle{margin-top:4rem;font-style:italic;font-size:2rem;margin-bottom:4rem}.grid{padding-left:3rem;margin-bottom:2rem;display:grid;grid-template-columns:1fr 1fr}.leftcolumn{grid-column:1;padding-right:1.2rem;position:relative}#TableOfContents{margin-left:-2rem;margin-top:-1.5rem}#TableOfContents li{list-style:decimal inside;padding-left:.5rem;color:rgba(0,0,0,.4);margin:0;padding:0}#TableOfContents li a{font-family:gentium plus;font-size:1.4rem;font-weight:700}.rightcolumn{padding-left:.5rem}.has{display:inline-grid;grid-column:2;grid-auto-rows:max-content;font-size:1.4rem;font-style:italic;margin-bottom:.8rem}.hasauthors{font-size:1.6rem!important}.hassup{grid-column:1;font-family:great vibes,cursive;font-size:.9em;font-style:normal;color:red;vertical-align:baseline;position:relative}.afterhas{grid-column:2}.content{margin-top:4rem;padding-left:3rem;padding-right:10rem;max-width:720px}a{color:#000;text-decoration:none}a:hover{text-decoration:underline;text-decoration-color:red;font-weight:700;cursor:pointer}h1{display:none}h2{font-weight:700;font-size:1.6rem}h3{font-weight:700;font-size:1.4rem}h4{font-weight:700;font-size:1.2rem}h5{font-weight:700;font-size:1.1rem}h6{font-weight:700;font-size:1rem}.abstract{font-style:italic;border-left:1px solid #000;margin-left:5rem;margin-right:2rem;margin-bottom:1.2rem;padding-left:1rem;padding-right:2rem;padding-top:1.2rem;padding-bottom:1.2rem;background-color:rgba(0,0,0,.05);max-width:70ch}.authors{display:inline-block;font-size:1.8rem;margin-left:5rem;margin-right:2rem;padding-left:1rem}.keywords{display:inline-block;font-size:1.2rem;margin-left:5rem;margin-right:2rem;padding-left:1rem;padding-right:2rem;margin-bottom:2.2rem;max-width:72ch}blockquote{border-left:1px red solid;margin-left:1rem;margin-right:2rem;padding-left:1rem;padding-right:2rem;padding-top:.1rem;padding-bottom:.1rem;background-color:#fff9f9}.hx{position:relative}.hpar{display:none}.smallcaps{font-family:gentium plus,serif;font-variant:small-caps}body{counter-reset:h2 glossN}h2{counter-reset:h3}h3{counter-reset:h4}h4{counter-reset:h5}h5{counter-reset:h6}h2:before{color:rgba(0,0,0,.4);counter-increment:h2;content:counter(h2)". "}h3:before{color:rgba(0,0,0,.4);counter-increment:h3;content:counter(h2)"." counter(h3)". "}h4:before{color:rgba(0,0,0,.4);counter-increment:h4;content:counter(h2)"." counter(h3)"." counter(h4)". "}h5:before{color:rgba(0,0,0,.4);counter-increment:h5;content:counter(h2)"." counter(h3)"." counter(h4)"." counter(h5)". "}h6:before{color:rgba(0,0,0,.4);counter-increment:h6;content:counter(h2)"." counter(h3)"." counter(h4)"." counter(h5)"." counter(h6)". "}h2.nocount:before,h3.nocount:before,h4.nocount:before,h5.nocount:before,h6.nocount:before{content:"";counter-increment:none}details{padding-left:1rem}#toggleAllLinks{font-size:.8rem}#toggleAllLinks:hover{cursor:pointer;text-decoration:underline;text-decoration-color:red}.glosscontainer{display:grid;grid-template-columns:auto 1fr;grid-template-rows:1fr;gap:0 0;grid-template-areas:"glossnumber gloss";border-left:1px red solid;background-color:#fff9f9;padding-top:.4em;margin-top:1rem;margin-bottom:1rem;margin-left:1rem;margin-right:2rem;padding-bottom:.4em;padding-left:1rem;padding-right:2rem}.gloss{grid-area:gloss}.glossnumber{grid-area:glossnumber;padding-right:.6rem}.glossnumberAuto::before{counter-increment:glossN;content:"(" counter(glossN)")"}.glosswords{display:inline-block;padding-left:-.3rem;padding-right:1rem}.sitemap{padding-left:3rem;font-size:1.2rem}.sitemap a{color:rgba(0,0,0,.4)}.sitemap .sup{color:rgba(255,0,0,.7)}.highline a,.sitemap a:hover{color:#000}.highline .sup,.sitemap .sup:hover{color:red}.highline{font-size:1.6rem;color:#000;border-left:1px red solid;padding-left:1rem;padding-top:.1rem;padding-bottom:.1rem;background-color:#fff9f9}@media(max-width:767px){html{box-sizing:border-box;max-width:767px;margin:0 auto;padding:0}body{font-size:1rem;padding-left:10px;padding-right:10px}.grid{display:inline}.coretitle{margin-top:3rem;margin-bottom:2rem;font-size:2.2rem}.leftcolumn{display:none}.has,.afterhas{font-size:1.1rem}.mantle,.crust{margin-bottom:.2em}.content{padding:0;margin:0 auto;margin-top:4rem}.hpar{display:none}.mantletitle{font-size:1.7rem}.sessiongrid{display:none}} \ No newline at end of file +html,body,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}ul{list-style:none}button,input,select,textarea{margin:0}html{box-sizing:border-box}img,video{height:auto;max-width:100%}iframe{border:0}strong del{display:inline;text-decoration:none;margin-left:1rem;box-decoration-break:clone;-webkit-box-decoration-break:clone}table{border-collapse:collapse;border-spacing:0;background-color:#fff9f9;border-left:1px red solid;margin-left:1rem}td,th{padding:0;vertical-align:top;padding-right:1rem;padding-left:1rem;padding-bottom:.5rem}td:not([align]),th:not([align]){text-align:left}@font-face{font-family:gentium plus;font-style:normal;src:url(../fonts/GentiumPlus-R.woff),url(../fonts/GentiumPlus-R.woff)format("woff")}@font-face{font-family:gentium plus;font-style:italic;src:url(../fonts/GentiumPlus-I.woff),url(../fonts/GentiumPlus-I.woff)format("woff")}@font-face{font-family:great vibes;font-style:normal;font-weight:400;src:url(../fonts/great-vibes-v7-latin-ext_latin-regular.eot);src:local("Great Vibes"),local("GreatVibes-Regular"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.eot?#iefix)format("embedded-opentype"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.woff2)format("woff2"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.woff)format("woff"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.ttf)format("truetype"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.svg#GreatVibes)format("svg")}@font-face{font-family:antinoou;font-style:normal;src:url(../fonts/Antinoou.ttf),url(../fonts/Antinoou.ttf)format("truetype");unicode-range:U+2C80–U+2CFF,U+0370–U+03FF,U+102E0–U+102FF}@font-face{font-family:antinoou;font-style:italic;src:url(../fonts/AntinoouItalic.ttf),url(../fonts/AntinoouItalic.ttf)format("truetype");unicode-range:U+2C80–U+2CFF,U+0370–U+03FF,U+102E0–U+102FF}html{line-height:1.5}body{font-family:gentium plus,antinoou,serif;max-width:1024px;font-size:1.4rem;padding-left:3rem;padding-top:.5rem;padding-right:2rem;color:#000}#preview{display:none}sup,sub{vertical-align:baseline;position:relative;top:-.4em}sub{top:.4em}.headiter{display:flex;justify-content:space-between;border-bottom:.3rem solid red;border-top:.1rem solid red;padding-top:1rem;padding-bottom:.5rem;padding-left:1rem;padding-right:1rem;margin-bottom:1rem}a.edit-button{color:#000;text-decoration:none}a.edit-button:hover{text-decoration:underline;-webkit-text-decoration-color:red;text-decoration-color:red;font-weight:700;cursor:pointer}.header{display:grid;grid-template-columns:auto;grid-auto-flow:column;position:sticky;top:0;padding-top:.5rem;font-size:1.1rem;background-color:#fff;z-index:10}.mantlebar{display:none}.breadcrumbs{grid-column:1}.bibliotheke{width:2.4rem;grid-column:2;margin-left:auto}.bibliotheke:hover{text-decoration:none;font-size:1rem}.alsoin{font-weight:700;display:inline-flex;padding-left:.2rem;padding-right:.3rem}.ddmenu{cursor:pointer;display:inline-grid}.ddmenu input{display:none}.ddmenu li{list-style-type:none}.ddmenu .hiddendiv{display:none;margin-top:-.9rem}input:focus,select:focus,textarea:focus,label:focus,button:focus{outline:none}.ddmenu input:checked~.hiddendiv{display:block}.logolink{width:2.4rem;margin-left:auto}.sandpointlogo{border-radius:50%;border:.3em solid red;display:inline-flex;font-family:great vibes,cursive;font-size:1.2rem;font-weight:700;color:#fff;background-color:red;position:relative;padding-left:1em;padding-right:.3em;padding-bottom:1.2em;max-width:0;max-height:0}.sandpointF{position:absolute;font-size:1.2em;margin-top:-.2em;margin-left:-.4em}.sandpointN{position:absolute;font-size:.7em;margin-top:.4em;color:red;margin-left:-.5em}.sandpointC{position:absolute;font-size:1em;margin-left:-.37em}footer{display:flex;margin-bottom:1rem;margin-top:4rem}li{list-style-type:"› "}li[role=doc-endnote]{list-style-type:decimal}ol li{list-style-type:decimal}.supt{display:inline-flex;flex-wrap:nowrap;font-family:great vibes,cursive;font-size:.9em;font-style:normal;color:rgba(0,0,0,.8);vertical-align:baseline;position:relative;top:-.3em}.sup{display:inline-flex;flex-wrap:nowrap;font-family:great vibes,cursive;font-size:.9em;font-style:normal;color:red;vertical-align:baseline;position:relative;top:-.3em}.sup:hover{font-weight:400!important}.nosup a{color:red}.nosup a span.sup{display:none}.syllabustitle,.coretitle{margin-top:4rem;font-style:italic;font-size:4rem;margin-bottom:4rem}.mantletitle,.crusttitle{margin-top:4rem;font-style:italic;font-size:2rem;margin-bottom:4rem}.grid{padding-left:3rem;margin-bottom:2rem;display:grid;grid-template-columns:1fr 1fr}.leftcolumn{grid-column:1;padding-right:1.2rem;position:relative}#TableOfContents{margin-left:-2rem;margin-top:-1.5rem}#TableOfContents li{list-style:decimal inside;padding-left:.5rem;color:rgba(0,0,0,.4);margin:0;padding:0}#TableOfContents li a{font-family:gentium plus;font-size:1.4rem;font-weight:700}.rightcolumn{padding-left:.5rem}.has{display:inline-grid;grid-column:2;grid-auto-rows:max-content;font-size:1.4rem;font-style:italic;margin-bottom:.8rem}.hasauthors{font-size:1.6rem!important;display:flex}.hassup{grid-column:1;font-family:great vibes,cursive;font-size:.9em;font-style:normal;color:red;vertical-align:baseline;position:relative}.afterhas{grid-column:2}.content{margin-top:4rem;padding-left:3rem;padding-right:10rem;max-width:720px}a{color:#000;text-decoration:none}a:hover{text-decoration:underline;text-decoration-color:red;font-weight:700;cursor:pointer}h1{display:none}h2{font-weight:700;font-size:1.6rem}h3{font-weight:700;font-size:1.4rem}h4{font-weight:700;font-size:1.2rem}h5{font-weight:700;font-size:1.1rem}h6{font-weight:700;font-size:1rem}.abstract{font-style:italic;border-left:1px solid #000;margin-left:5rem;margin-right:2rem;margin-bottom:1.2rem;padding-left:1rem;padding-right:2rem;padding-top:1.2rem;padding-bottom:1.2rem;background-color:rgba(0,0,0,5%);max-width:70ch}.authors{display:inline-block;font-size:1.8rem;margin-left:5rem;margin-right:2rem;padding-left:1rem}.keywords{display:inline-block;font-size:1.2rem;margin-left:5rem;margin-right:2rem;padding-left:1rem;padding-right:2rem;margin-bottom:2.2rem;max-width:72ch}blockquote{border-left:1px red solid;margin-left:1rem;margin-right:2rem;padding-left:1rem;padding-right:2rem;padding-top:.1rem;padding-bottom:.1rem;background-color:#fff9f9}.hx{position:relative}.hpar{display:none}.smallcaps{font-family:gentium plus,serif;font-variant:small-caps}body{counter-reset:h2 glossN}h2{counter-reset:h3}h3{counter-reset:h4}h4{counter-reset:h5}h5{counter-reset:h6}h2:before{color:rgba(0,0,0,.4);counter-increment:h2;content:counter(h2)". "}h3:before{color:rgba(0,0,0,.4);counter-increment:h3;content:counter(h2)"." counter(h3)". "}h4:before{color:rgba(0,0,0,.4);counter-increment:h4;content:counter(h2)"." counter(h3)"." counter(h4)". "}h5:before{color:rgba(0,0,0,.4);counter-increment:h5;content:counter(h2)"." counter(h3)"." counter(h4)"." counter(h5)". "}h6:before{color:rgba(0,0,0,.4);counter-increment:h6;content:counter(h2)"." counter(h3)"." counter(h4)"." counter(h5)"." counter(h6)". "}h2.nocount:before,h3.nocount:before,h4.nocount:before,h5.nocount:before,h6.nocount:before{content:"";counter-increment:none}details{padding-left:1rem}#toggleAllLinks{font-size:.8rem}#toggleAllLinks:hover{cursor:pointer;text-decoration:underline;text-decoration-color:red}.glosscontainer{display:grid;grid-template-columns:auto 1fr;grid-template-rows:1fr;gap:0 0;grid-template-areas:"glossnumber gloss";border-left:1px red solid;background-color:#fff9f9;padding-top:.4em;margin-top:1rem;margin-bottom:1rem;margin-left:1rem;margin-right:2rem;padding-bottom:.4em;padding-left:1rem;padding-right:2rem}.gloss{grid-area:gloss}.glossnumber{grid-area:glossnumber;padding-right:.6rem}.glossnumberAuto::before{counter-increment:glossN;content:"(" counter(glossN)")"}.glosswords{display:inline-block;padding-left:-.3rem;padding-right:1rem}.sitemap{padding-left:3rem;font-size:1.2rem}.sitemap a{color:rgba(0,0,0,.4)}.sitemap .sup{color:rgba(255,0,0,.7)}.highline a,.sitemap a:hover{color:#000}.highline .sup,.sitemap .sup:hover{color:red}.highline{font-size:1.6rem;color:#000;border-left:1px red solid;padding-left:1rem;padding-top:.1rem;padding-bottom:.1rem;background-color:#fff9f9}@media(max-width:767px){html{box-sizing:border-box;max-width:767px;margin:0 auto;padding:0}body{font-size:1rem;padding-left:10px;padding-right:10px}.grid{display:inline}.coretitle{margin-top:3rem;margin-bottom:2rem;font-size:2.2rem}.leftcolumn{display:none}.has,.afterhas{font-size:1.1rem}.mantle,.crust{margin-bottom:.2em}.content{padding:0;margin:0 auto;margin-top:4rem}.hpar{display:none}.mantletitle{font-size:1.7rem}.sessiongrid{display:none}} \ No newline at end of file diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/data/sandpointsnamegraph.json b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/data/sandpointsnamegraph.json index 5b7bb06..554308f 100644 --- a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/data/sandpointsnamegraph.json +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/data/sandpointsnamegraph.json @@ -1,20 +1,61 @@ { - "syllabus": "syllabi", - "curriculum": "curriculums", - "notebook": "notebooks", - "book": "books", - "journal": "journals", - "topic": "topics", - "part": "parts", - "issue": "issues", - "tab": "tabs", - "experiment": "experiments", - "session": "sessions", - "chapter": "chapters", - "article": "articles", - "note": "notes", "annex": "annexes", + "article": "articles", + "atlas": "atlases", "author": "authors", + "book": "books", + "bundle": "bundles", + "cabin": "cabins", + "chapter": "chapters", + "compartment": "compartments", + "contributor": "contributors", + "curriculum": "curriculums", + "deck": "decks", + "doc": "docs", + "document": "documents", "editor": "editors", - "contributor": "contributors" + "entry": "entries", + "experiment": "experiments", + "factor": "factors", + "floor": "floors", + "fragment": "fragments", + "glossary": "glossaries", + "highlight": "highlights", + "house": "houses", + "issue": "issues", + "item": "items", + "journal": "journals", + "library": "libraries", + "librarian": "librarians", + "logbook": "logbooks", + "glassblower": "glassblowers", + "map": "maps", + "mirror": "mirrors", + "memory": "memories", + "note": "notes", + "notebook": "notebooks", + "part": "parts", + "person": "people", + "pin": "pins", + "print": "prints", + "record": "records", + "reflection": "reflections", + "repertorium": "repertoriums", + "research": "researches", + "room": "rooms", + "scribe": "scribes", + "section": "sections", + "series": "series", + "session": "sessions", + "shard": "shards", + "ship": "ships", + "spectre": "spectres", + "struggle": "struggles", + "syllabus": "syllabi", + "tab": "tabs", + "term":"terms", + "thing": "things", + "topic": "topics", + "toponym": "toponyms", + "voice": "voices" } diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/_default/_markup/render-image.html b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/_default/_markup/render-image.html index f1cef80..2955281 100644 --- a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/_default/_markup/render-image.html +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/_default/_markup/render-image.html @@ -5,7 +5,17 @@ {{ $_.Add "triads" $k }} {{- end -}} -{{- if strings.HasPrefix .Destination "bib:" -}} +{{- if strings.HasPrefix .Destination "img:" -}} + {{- $img_params := (substr .Destination 4) -}} + {{- $img_src := index (split $img_params " ") 0 -}} + {{- $img_attr := index (split $img_params $img_src) 1 -}} + +{{- else if strings.HasPrefix .Destination "vid:" -}} + {{- $vid_params := (substr .Destination 4) -}} + {{- $vid_src := index (split $vid_params " ") 0 -}} + {{- $vid_attr := index (split $vid_params $vid_src) 1 -}} + +{{- else if strings.HasPrefix .Destination "bib:" -}} {{- $destination := (substr .Destination 4) -}} {{- $c_prefix := .Page.Site.Params.sandpointsCatalogPrefix | default "/library/" -}} {{- if index $.Page.Site.Data.books.catalog $destination -}} @@ -17,21 +27,21 @@ {{ end }} {{ .Page.Scratch.Add "bibs" (slice (slice $bibhref $bibtitle)) }} {{- if not $text_link -}} - {{- delimit $b.authors ", " " & " -}}{{- with $b.pubdate -}}, {{- substr . 0 4}}{{- end -}}.bib⁄‘{{- $b.title -}}’. {{- with $b.publisher -}}{{- . -}}.{{- end -}} - {{- else -}} - bib⁄{{- $text_link -}} + {{- delimit $b.authors ", " " & " -}}{{- with $b.pubdate -}}, {{- substr . 0 4}}{{- end -}}. bib⁄{{- $b.title -}}. {{- with $b.publisher -}}{{- . -}}.{{- end -}} + {{- else -}} + bib⁄{{- $text_link -}} {{- end -}} {{- else -}} - {{- $text_link -}}⦚bib:{{- $destination -}} not found + {{- $text_link -}}⦚bib:{{- $destination -}} not found {{- end -}} {{- else if in ($_.Get "triads") (index (split .Destination ":") 0) -}} {{- if $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}} {{- $session := $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}} {{ .Page.Scratch.Add "links" (slice $session) }} {{- if not $text_link -}} - {{- index (split .Destination ":") 0 -}}⁄{{- $session.Title -}} + {{- index (split .Destination ":") 0 -}}⁄{{- $session.Title -}} {{- else -}} - {{- index (split .Destination ":") 0 -}}⁄{{- $text_link -}} + {{- index (split .Destination ":") 0 -}}⁄{{- $text_link -}} {{- end -}} {{- else -}} {{- $text_link -}}⦚{{- .Destination -}} not found diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/_default/baseof.html b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/_default/baseof.html index 4c09044..051e285 100644 --- a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/_default/baseof.html +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/_default/baseof.html @@ -2,12 +2,12 @@ - {{- partialCached "head.html" . -}} + {{- partial "head.html" . -}} {{- .Title }} - {{ .Site.Title -}} {{- partialCached "sandpointjs.html" . .RelPermalink -}} - {{- block "singlebody" . }}{{- end }} + {{- block "singlebody" . }}{{- end -}} {{- partialCached "footer.html" . -}} diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/_default/list.html b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/_default/list.html index 62c1535..dc2631f 100644 --- a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/_default/list.html +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/_default/list.html @@ -6,6 +6,9 @@ {{ $currentDir = .Dir }} {{ end }} {{ $currentFile := (printf "/%s" .File) }} + {{ $editFile := $.Site.GetPage "/edit" }} + {{ $editFilePath := $editFile.RelPermalink }} +
Sitemap⁄{{ substr $.Site.Title 0 1 }}{{ substr $.Site.Title 1 }} {{with $currentDir}}({{ . }}){{ end }}
@@ -14,22 +17,22 @@ {{ range $p := .Site.RegularPages }} {{ $scratch := $s.Get (printf "/%s" $p.File) }} {{ if eq $scratch.depth "core" }} -
+
{{ range $coreKid := $scratch.has_children }} -
+ {{ end }} {{ else if not (in (slice "core" "mantle" "crust") $scratch.depth)}} - {{ $noTriad = $noTriad | append $p }} + {{ $noTriad = $noTriad | append $p }} {{ else }}
{{ end }} {{ end }} {{ range $noTriad }} - +
{{- substr .File.Dir 0 -1 -}}⁄{{- .Title -}}{{ if not (or (hasPrefix .File.Dir "edit") (hasPrefix .File.Dir "print")) }}[EDIT]{{ end }}
{{ end }} {{ end }} diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/edit/baseof.html b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/edit/baseof.html index 95528be..c0451ba 100644 --- a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/edit/baseof.html +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/edit/baseof.html @@ -1,9 +1,14 @@ + - {{- .Title }} - {{ .Site.Title -}} + + + + + + + edit⁄{{- .Site.Title -}} - - {{ block "edit" . }}{{ end }} - + {{- block "main" . -}}{{- end -}} diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/edit/list.html b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/edit/list.html index 5214213..e4e4a83 100644 --- a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/edit/list.html +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/edit/list.html @@ -1,10 +1,2 @@ -{{ define "edit" }} - {{ range (readDir ".") }} - {{ if .IsDir }} -

Dir: {{ .Name }}

- {{ partial "readdir.html" .Name }} - {{ else }} -

File: {{ .Name }} - {{ end }} - {{ end }} +{{ define "main" }} {{ end }} diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/edit/single.html b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/edit/single.html new file mode 100644 index 0000000..27f8f31 --- /dev/null +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/edit/single.html @@ -0,0 +1 @@ +{{- define "main" -}}{{- end -}} diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/metadata/list.js.js b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/metadata/list.js.js index 2768a68..40d5ba3 100644 --- a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/metadata/list.js.js +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/metadata/list.js.js @@ -1 +1,20 @@ -{{ define "main" }}SECTIONS=[{{ range .Site.Sections }}{"section": "{{ with .File }}{{ trim .Dir "/" }}{{ end }}", "items": [{{ range .Pages }}"{{ .File.BaseFileName }}", {{ end }}]}, {{ end }}];{{ end }} +{{- define "main" -}} + {{ $sections := (slice) }} + {{ $tiers := (slice) }} + {{ range $.Site.Sections }} + {{ with .File }} + {{ $sections = $sections | append (strings.TrimSuffix "/" .Dir) }} + {{ end }} + {{ end }} + {{ $metasp := (dict) }} + {{ range $k, $v := $.Site.Data.sandpointsnamegraph }} + {{ if in $sections $k }} + {{ $tiers = (slice) }} + {{ range where $.Site.RegularPages "Section" $k }} + {{ $tiers = $tiers | append (merge (dict "file" .File.LogicalName) (dict "title" .Title)) }} + {{ end }} + {{ $metasp = merge $metasp (dict $v (merge (dict "singular" $k) (dict "tiers" $tiers))) }} + {{ end }} + {{ end }} +{{ printf "METASP=%s;" (jsonify $metasp) }} +{{ end }} diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/partials/head.html b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/partials/head.html index 6173b24..482f33d 100644 --- a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/partials/head.html +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/partials/head.html @@ -11,10 +11,21 @@ {{ end }} -{{ if .Params.Author }} - +{{ if .Params.editors }} + {{ range .Params.editors }} + {{ $e := $.GetPage (printf "editor/%s" .) }} + + {{ end }} {{ end }} +{{ if .Params.authors }} + {{ range .Params.authors }} + {{ $e := $.GetPage (printf "author/%s" .) }} + + {{ end }} +{{ end }} + + {{ template "_internal/opengraph.html" . }} {{ template "_internal/twitter_cards.html" . }} @@ -27,9 +38,9 @@ {{ if eq hugo.Environment "dev" }} - {{ $style := resources.Get "css/site.css" | postCSS (dict "config" "assets/css/postcss.config.js") | minify }} + {{ $style := resources.Get "css/site.css" | resources.PostCSS (dict "config" "assets/css/postcss.config.js") | minify }} - {{ $style := resources.Get "css/player.css" | postCSS (dict "config" "assets/css/postcss.config.js") | minify }} + {{ $style := resources.Get "css/player.css" | resources.PostCSS (dict "config" "assets/css/postcss.config.js") | minify }} {{ else }} diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/partials/header.html b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/partials/header.html index fc5880a..f21592a 100644 --- a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/partials/header.html +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/partials/header.html @@ -33,9 +33,19 @@ {{ with $scratch.mantle }}ADD_{{ index . 0 | upper }}{{ end }} {{ with $scratch.crust }}ADD_{{ index . 0 | upper }}{{ end }} {{ if not $scratch.core }}ADD_{{ substr $currentDir 0 -1 | upper }}{{ end }} - PUBLISH + PUBLISH ?

+{{ else }} + {{ $editPage := $.Site.GetPage "/edit" }} +
+ EDIT_THIS + {{ with $scratch.core }}ADD_{{ index . 0 | upper }}{{ end }} + {{ with $scratch.mantle }}ADD_{{ index . 0 | upper }}{{ end }} + {{ with $scratch.crust }}ADD_{{ index . 0 | upper }}{{ end }} + {{ if not $scratch.core }}ADD_{{ substr $currentDir 0 -1 | upper }}{{ end }} +
+
{{ end }}
@@ -43,6 +53,9 @@ @@ -31,12 +33,17 @@ {{ $mentions := intersect $paramsKeys $sandnamePlural }} {{ range $mention := $mentions }} {{ range $k, $m := index $currentNode.Params $mention }} - {{ $mentionLink := printf "/%s/%s" (substr $mention 0 -1) $m }} + {{ range $k, $v := $.Site.Data.sandpointsnamegraph }} + {{ if eq $v $mention }} + {{ $mentionLink = printf "/%s/%s" $k $m }} + {{ $sandnameSingular = $k }} + {{ end }} + {{ end }} {{- with $.GetPage $mentionLink -}} {{- with not $k -}} {{ $closeDivs = true }}
-
{{ with (index $currentNode.Params $mention) }}{{ if gt (len (index $currentNode.Params $mention)) 1 }}{{ $mention }}{{ else }}{{ substr $mention 0 -1 }}{{ end }}{{ end }}⁄
+
{{ with (index $currentNode.Params $mention) }}{{ if gt (len (index $currentNode.Params $mention)) 1 }}{{ $mention }}{{ else }}{{ $sandnameSingular }}{{ end }}{{ end }}⁄
{{- end -}}
@@ -44,8 +51,8 @@
{{- end -}} {{ end }} + {{- with $closeDivs -}}
{{ end }} {{ end }} - {{- with $closeDivs -}}
{{ end }} {{ if in .Page.Site.Params.sandpointsMentionedIn (substr $currentDir 0 -1) }}
@@ -92,4 +99,7 @@ {{ with .Page.Params.abstract }}
abstract⁄{{ . | $.Page.RenderString | htmlUnescape | safeHTML }}
{{ end }} -{{- $vld := false -}}{{- range $k, $v := .Page.Params.keywords -}}{{- if eq $k 0 -}}{{- $vld = true -}}
keywords⁄{{- $v -}}{{- else -}}, {{- $v -}}{{- end -}}{{- end -}}{{- with $vld -}}
{{- end -}} +{{- $vld := false -}}{{- range $k, $v := .Page.Params.keywords -}}{{- if eq $k 0 -}}{{- $vld = true -}}
keywords⁄{{- $v -}}{{- else -}}, {{- $v -}}{{- end -}}{{- end -}}{{- with $vld -}}
{{- end -}} + +{{ $var := printf "repo={\"frontmatter\": %s, \"content\": %s, \"path\": \"%s\", \"relpermalink\": \"%s\" }" (jsonify .Params) (jsonify .RawContent) .File.Path .RelPermalink | resources.FromString (printf "js/repo/%s.js" .File.UniqueID) }} +{{ $dummy := $var.Permalink }} diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/print/baseof.html b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/print/baseof.html index c92c161..3a88dcf 100644 --- a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/print/baseof.html +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/print/baseof.html @@ -2,7 +2,7 @@ - {{- partialCached "head.html" . -}} + {{- partial "head.html" . -}} {{- partial "pagedjs.html" . -}} diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/taxonomy/baseof.html b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/taxonomy/baseof.html new file mode 100644 index 0000000..ff6a2c7 --- /dev/null +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/taxonomy/baseof.html @@ -0,0 +1,12 @@ + + + + {{- partialCached "head.html" . -}} + {{- .Title }} - {{ .Site.Title -}} + {{- partialCached "sandpointjs.html" . .RelPermalink -}} + + + {{- block "keywords" . -}}{{- end -}} + {{- partialCached "footer.html" . -}} + + diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/taxonomy/list.html b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/taxonomy/list.html new file mode 100644 index 0000000..e70e8e3 --- /dev/null +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/taxonomy/list.html @@ -0,0 +1,23 @@ +{{ define "keywords" }} + {{ $p := split (trim .RelPermalink "/") "/" }} + {{ if eq (len $p) 1 }} +
{{ index $p 0 }}⁄All
+ {{ range $taxonomyname, $taxonomy := .Site.Taxonomies }} + {{ if eq (index $p 0) $taxonomyname }} + {{ range $key, $value := $taxonomy }} + {{ $key }}({{ len (index (index $.Site.Taxonomies $taxonomyname) $key) }}) + {{ end }} + {{ end }} + {{ end }} + {{ else }} +
{{ index $p 0 }}⁄{{ index $p 1 }}
+ {{ range .Pages.ByDate.Reverse }} +
{{ .Date.Format "Jan 2, 2006" }}
+ + {{ range $n, $authorFile := .Params.authors }} + {{ $author := $.GetPage (printf "/author/%s" $authorFile) }} + {{ $author.Title }} + {{ end }} + {{ end }} + {{ end }} +{{ end }} diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/css/print.css b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/css/print.css index 8dcf660..4682b5e 100644 --- a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/css/print.css +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/css/print.css @@ -200,7 +200,8 @@ bottom: 0 } - .crustoc::after { + a.toc::before { + direction: rtl; content: " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "; line-height: 0; height: 1px; @@ -233,4 +234,9 @@ ol[data-split-from] { padding-left: 0.5rem; } + + .longesttitle { + visibility: hidden; + cursor: default; + } } diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/css/site.min.css b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/css/site.min.css index 11a51fc..35c040a 100644 --- a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/css/site.min.css +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/css/site.min.css @@ -1 +1 @@ -stdin 587:3 ⚠ grid-auto-rows is not supported by ie [autoprefixer] html,body,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}ul{list-style:none}button,input,select,textarea{margin:0}html{box-sizing:border-box}img,video{height:auto;max-width:100%}iframe{border:0}strong del{display:inline;text-decoration:none;margin-left:1rem;box-decoration-break:clone;-webkit-box-decoration-break:clone}table{border-collapse:collapse;border-spacing:0;background-color:#fff9f9;border-left:1px red solid;margin-left:1rem}td,th{padding:0;vertical-align:top;padding-right:1rem;padding-left:1rem;padding-bottom:.5rem}td:not([align]),th:not([align]){text-align:left}@font-face{font-family:vollkorn sc;font-style:normal;font-weight:400;src:url(../fonts/vollkorn-sc-v4-latin-ext_latin-regular.eot);src:local(""),url(../fonts/vollkorn-sc-v4-latin-ext_latin-regular.eot?#iefix)format("embedded-opentype"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-regular.woff2)format("woff2"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-regular.woff)format("woff"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-regular.ttf)format("truetype"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-regular.svg#VollkornSC)format("svg")}@font-face{font-family:vollkorn sc;font-style:normal;font-weight:600;src:url(../fonts/vollkorn-sc-v4-latin-ext_latin-600.eot);src:local(""),url(../fonts/vollkorn-sc-v4-latin-ext_latin-600.eot?#iefix)format("embedded-opentype"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-600.woff2)format("woff2"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-600.woff)format("woff"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-600.ttf)format("truetype"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-600.svg#VollkornSC)format("svg")}@font-face{font-family:vollkorn sc;font-style:normal;font-weight:700;src:url(../fonts/vollkorn-sc-v4-latin-ext_latin-700.eot);src:local(""),url(../fonts/vollkorn-sc-v4-latin-ext_latin-700.eot?#iefix)format("embedded-opentype"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-700.woff2)format("woff2"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-700.woff)format("woff"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-700.ttf)format("truetype"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-700.svg#VollkornSC)format("svg")}@font-face{font-family:vollkorn sc;font-style:normal;font-weight:900;src:url(../fonts/vollkorn-sc-v4-latin-ext_latin-900.eot);src:local(""),url(../fonts/vollkorn-sc-v4-latin-ext_latin-900.eot?#iefix)format("embedded-opentype"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-900.woff2)format("woff2"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-900.woff)format("woff"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-900.ttf)format("truetype"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-900.svg#VollkornSC)format("svg")}@font-face{font-family:vollkorn;font-style:italic;font-weight:500;src:url(../fonts/vollkorn-v12-latin-ext_latin-500italic.eot);src:local(""),url(../fonts/vollkorn-v12-latin-ext_latin-500italic.eot?#iefix)format("embedded-opentype"),url(../fonts/vollkorn-v12-latin-ext_latin-500italic.woff2)format("woff2"),url(../fonts/vollkorn-v12-latin-ext_latin-500italic.woff)format("woff"),url(../fonts/vollkorn-v12-latin-ext_latin-500italic.ttf)format("truetype"),url(../fonts/vollkorn-v12-latin-ext_latin-500italic.svg#Vollkorn)format("svg")}@font-face{font-family:vollkorn;font-style:normal;font-weight:400;src:url(../fonts/vollkorn-v12-latin-ext_latin-regular.eot);src:local(""),url(../fonts/vollkorn-v12-latin-ext_latin-regular.eot?#iefix)format("embedded-opentype"),url(../fonts/vollkorn-v12-latin-ext_latin-regular.woff2)format("woff2"),url(../fonts/vollkorn-v12-latin-ext_latin-regular.woff)format("woff"),url(../fonts/vollkorn-v12-latin-ext_latin-regular.ttf)format("truetype"),url(../fonts/vollkorn-v12-latin-ext_latin-regular.svg#Vollkorn)format("svg")}@font-face{font-family:vollkorn;font-style:normal;font-weight:500;src:url(../fonts/vollkorn-v12-latin-ext_latin-500.eot);src:local(""),url(../fonts/vollkorn-v12-latin-ext_latin-500.eot?#iefix)format("embedded-opentype"),url(../fonts/vollkorn-v12-latin-ext_latin-500.woff2)format("woff2"),url(../fonts/vollkorn-v12-latin-ext_latin-500.woff)format("woff"),url(../fonts/vollkorn-v12-latin-ext_latin-500.ttf)format("truetype"),url(../fonts/vollkorn-v12-latin-ext_latin-500.svg#Vollkorn)format("svg")}@font-face{font-family:vollkorn;font-style:italic;font-weight:400;src:url(../fonts/vollkorn-v12-latin-ext_latin-italic.eot);src:local(""),url(../fonts/vollkorn-v12-latin-ext_latin-italic.eot?#iefix)format("embedded-opentype"),url(../fonts/vollkorn-v12-latin-ext_latin-italic.woff2)format("woff2"),url(../fonts/vollkorn-v12-latin-ext_latin-italic.woff)format("woff"),url(../fonts/vollkorn-v12-latin-ext_latin-italic.ttf)format("truetype"),url(../fonts/vollkorn-v12-latin-ext_latin-italic.svg#Vollkorn)format("svg")}@font-face{font-family:great vibes;font-style:normal;font-weight:400;src:url(../fonts/great-vibes-v7-latin-ext_latin-regular.eot);src:local("Great Vibes"),local("GreatVibes-Regular"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.eot?#iefix)format("embedded-opentype"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.woff2)format("woff2"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.woff)format("woff"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.ttf)format("truetype"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.svg#GreatVibes)format("svg")}html{line-height:1.5}body{font-family:vollkorn,serif;font-weight:400;max-width:1024px;font-size:1.4rem;padding-left:3rem;padding-top:.5rem;padding-right:2rem;color:#000}#preview{display:none}sup,sub{vertical-align:baseline;position:relative;top:-.4em}sub{top:.4em}.headiter{display:flex;justify-content:space-between;border-bottom:.3rem solid red;border-top:.1rem solid red;padding-top:1rem;padding-bottom:.5rem;padding-left:1rem;padding-right:1rem;margin-bottom:1rem}a.edit-button{color:#000;text-decoration:none}a.edit-button:hover{text-decoration:underline;-webkit-text-decoration-color:red;text-decoration-color:red;font-weight:500;font-size:.97em;cursor:pointer}.header{display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;grid-auto-flow:column;position:-webkit-sticky;position:sticky;top:0;padding-top:.5rem;font-size:1.1rem;background-color:#fff;z-index:10}.mantlebar{display:none}.breadcrumbs{-ms-grid-column:1;grid-column:1}.bibliotheke{width:2.4rem;-ms-grid-column:2;grid-column:2;margin-left:auto}.bibliotheke:hover{text-decoration:none;font-size:1rem}.alsoin{font-weight:700;display:inline-flex;padding-left:.2rem;padding-right:.3rem}.ddmenu{cursor:pointer;display:-ms-inline-grid;display:inline-grid}.ddmenu input{display:none}.ddmenu li{list-style-type:none}.ddmenu .hiddendiv{display:none;margin-top:-.9rem}input:focus,select:focus,textarea:focus,label:focus,button:focus{outline:none}.ddmenu input:checked~.hiddendiv{display:block}.logolink{width:2.4rem;margin-left:auto}.sandpointlogo{border-radius:50%;border:.3em solid red;display:inline-flex;font-family:great vibes,cursive;font-size:1.2rem;font-weight:700;color:#fff;background-color:red;position:relative;padding-left:1em;padding-right:.3em;padding-bottom:1.2em;max-width:0;max-height:0}.sandpointF{position:absolute;font-size:1.2em;margin-top:-.2em;margin-left:-.4em}.sandpointN{position:absolute;font-size:.7em;margin-top:.4em;color:red;margin-left:-.5em}.sandpointC{position:absolute;font-size:1em;margin-left:-.37em}footer{display:flex;margin-bottom:1rem;margin-top:4rem}li{list-style-type:"› "}li[role=doc-endnote]{list-style-type:decimal}ol li{list-style-type:decimal}img{width:100%}.supt{display:inline-flex;flex-wrap:nowrap;font-family:great vibes,cursive;font-size:.9em;font-style:normal;color:rgba(0,0,0,.8);vertical-align:baseline;position:relative;top:-.3em}.sup{display:inline-flex;flex-wrap:nowrap;font-family:great vibes,cursive;font-size:.9em;font-style:normal;color:red;vertical-align:baseline;position:relative;top:-.3em}.sup:hover{font-weight:400!important}.nosup a{color:red}.nosup a span.sup{display:none}.syllabustitle,.coretitle{margin-top:4rem;font-style:italic;font-size:4rem;margin-bottom:4rem}.mantletitle,.crusttitle{margin-top:4rem;font-style:italic;font-size:2rem;margin-bottom:4rem}.grid{padding-left:3rem;margin-bottom:2rem;display:-ms-grid;display:grid;-ms-grid-columns:1fr 1fr;grid-template-columns:1fr 1fr}.leftcolumn{-ms-grid-column:1;grid-column:1;padding-right:1.2rem;position:relative}#TableOfContents{margin-left:-2rem;margin-top:-1.5rem}#TableOfContents li{list-style:decimal inside;padding-left:.5rem;color:rgba(0,0,0,.4);margin:0;padding:0}#TableOfContents li a{font-family:vollkorn;font-size:1.4rem;font-weight:500;font-style:normal}#TableOfContents>ol:first-child>span>li>a::after{content:"¶";color:rgba(0,0,0,.2);font-size:1.3em;padding-left:.1em}.rightcolumn{padding-left:.5rem}.has{display:-ms-inline-grid;display:inline-grid;-ms-grid-column:2;grid-column:2;grid-auto-rows:-webkit-max-content;grid-auto-rows:max-content;font-size:1.4rem;font-style:italic;margin-bottom:.8rem}.hasauthors{font-size:1.6rem!important}.hassup{-ms-grid-column:1;grid-column:1;font-family:great vibes,cursive;font-size:.9em;font-style:normal;color:red;vertical-align:baseline;position:relative}.afterhas{-ms-grid-column:2;grid-column:2}.content{margin-top:4rem;padding-left:3rem;padding-right:10rem;max-width:720px}a{color:#000;text-decoration:none}a:hover{text-decoration:underline;-webkit-text-decoration-color:red;text-decoration-color:red;font-weight:500;font-size:.97em;cursor:pointer}h1{display:none}h2{font-weight:500;font-size:1.6rem}h3{font-weight:500;font-size:1.4rem}h4{font-weight:500;font-size:1.2rem}h5{font-weight:500;font-size:1.1rem}h6{font-weight:500;font-size:1rem}.abstract{font-style:italic;border-left:1px solid #000;margin-left:5rem;margin-right:2rem;margin-bottom:1.2rem;padding-left:1rem;padding-right:2rem;padding-top:1.2rem;padding-bottom:1.2rem;background-color:rgba(0,0,0,.05);max-width:70ch}.authors{display:inline-block;font-size:1.8rem;margin-left:5rem;margin-right:2rem;padding-left:1rem}.keywords{display:inline-block;font-size:1.2rem;margin-left:5rem;margin-right:2rem;padding-left:1rem;padding-right:2rem;margin-bottom:2.2rem;max-width:72ch}blockquote{border-left:1px red solid;margin-left:1rem;margin-right:2rem;padding-left:1rem;padding-right:2rem;padding-top:.1rem;padding-bottom:.1rem;background-color:#fff9f9}h2+p:first-letter{font-family:great vibes,cursive;color:rgba(0,0,0,.8);font-size:1.5em;line-height:0}.hx{position:relative}.hpar{position:absolute;font-size:1.7em;font-style:normal;color:rgba(0,0,0,.1);top:0;margin-top:-.4em}.smallcaps{font-family:vollkorn sc,serif;font-weight:400}body{counter-reset:h2 glossN}h2{counter-reset:h3}h3{counter-reset:h4}h4{counter-reset:h5}h5{counter-reset:h6}h2:before{color:rgba(0,0,0,.4);counter-increment:h2;content:counter(h2)". "}h3:before{color:rgba(0,0,0,.4);counter-increment:h3;content:counter(h2)"." counter(h3)". "}h4:before{color:rgba(0,0,0,.4);counter-increment:h4;content:counter(h2)"." counter(h3)"." counter(h4)". "}h5:before{color:rgba(0,0,0,.4);counter-increment:h5;content:counter(h2)"." counter(h3)"." counter(h4)"." counter(h5)". "}h6:before{color:rgba(0,0,0,.4);counter-increment:h6;content:counter(h2)"." counter(h3)"." counter(h4)"." counter(h5)"." counter(h6)". "}h2.nocount:before,h3.nocount:before,h4.nocount:before,h5.nocount:before,h6.nocount:before{content:"";counter-increment:none}details{padding-left:1rem}#toggleAllLinks{font-size:.8rem}#toggleAllLinks:hover{cursor:pointer;text-decoration:underline;-webkit-text-decoration-color:red;text-decoration-color:red}.glosscontainer{display:-ms-grid;display:grid;-ms-grid-columns:auto 0 1fr;grid-template-columns:auto 1fr;-ms-grid-rows:1fr;grid-template-rows:1fr;gap:0 0;grid-template-areas:"glossnumber gloss";border-left:1px red solid;background-color:#fff9f9;padding-top:.4em;margin-top:1rem;margin-bottom:1rem;margin-left:1rem;margin-right:2rem;padding-bottom:.4em;padding-left:1rem;padding-right:2rem}.gloss{-ms-grid-row:1;-ms-grid-column:3;grid-area:gloss}.glossnumber{-ms-grid-row:1;-ms-grid-column:1;grid-area:glossnumber;padding-right:.6rem}.glossnumberAuto::before{counter-increment:glossN;content:"(" counter(glossN)")"}.glosswords{display:inline-block;padding-left:-.3rem;padding-right:1rem}.sitemap{padding-left:3rem;font-size:1.2rem}.sitemap a{color:rgba(0,0,0,.4)}.sitemap .sup{color:rgba(255,0,0,.7)}.highline a,.sitemap a:hover{color:#000}.highline .sup,.sitemap .sup:hover{color:red}.highline{font-size:1.6rem;color:#000;border-left:1px red solid;padding-left:1rem;padding-top:.1rem;padding-bottom:.1rem;background-color:#fff9f9}@media(max-width:767px){html{box-sizing:border-box;max-width:767px;margin:0 auto;padding:0}body{font-size:1rem;padding-left:10px;padding-right:10px}.grid{display:inline}.coretitle{margin-top:3rem;margin-bottom:2rem;font-size:2.2rem}.leftcolumn{display:none}.has,.afterhas{font-size:1.1rem}.mantle,.crust{margin-bottom:.2em}.content{padding:0;margin:0 auto;margin-top:4rem}.hpar{display:none}.mantletitle{font-size:1.7rem}.sessiongrid{display:none}} \ No newline at end of file +qhtml,body,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}ul{list-style:none}button,input,select,textarea{margin:0}html{box-sizing:border-box}img,video{height:auto;max-width:100%}iframe{border:0}strong del{display:inline;text-decoration:none;margin-left:1rem;box-decoration-break:clone;-webkit-box-decoration-break:clone}table{border-collapse:collapse;border-spacing:0;background-color:#fff9f9;border-left:1px red solid;margin-left:1rem}td,th{padding:0;vertical-align:top;padding-right:1rem;padding-left:1rem;padding-bottom:.5rem}td:not([align]),th:not([align]){text-align:left}@font-face{font-family:vollkorn sc;font-style:normal;font-weight:400;src:url(../fonts/vollkorn-sc-v4-latin-ext_latin-regular.eot);src:local(""),url(../fonts/vollkorn-sc-v4-latin-ext_latin-regular.eot?#iefix)format("embedded-opentype"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-regular.woff2)format("woff2"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-regular.woff)format("woff"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-regular.ttf)format("truetype"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-regular.svg#VollkornSC)format("svg")}@font-face{font-family:vollkorn sc;font-style:normal;font-weight:600;src:url(../fonts/vollkorn-sc-v4-latin-ext_latin-600.eot);src:local(""),url(../fonts/vollkorn-sc-v4-latin-ext_latin-600.eot?#iefix)format("embedded-opentype"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-600.woff2)format("woff2"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-600.woff)format("woff"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-600.ttf)format("truetype"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-600.svg#VollkornSC)format("svg")}@font-face{font-family:vollkorn sc;font-style:normal;font-weight:700;src:url(../fonts/vollkorn-sc-v4-latin-ext_latin-700.eot);src:local(""),url(../fonts/vollkorn-sc-v4-latin-ext_latin-700.eot?#iefix)format("embedded-opentype"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-700.woff2)format("woff2"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-700.woff)format("woff"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-700.ttf)format("truetype"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-700.svg#VollkornSC)format("svg")}@font-face{font-family:vollkorn sc;font-style:normal;font-weight:900;src:url(../fonts/vollkorn-sc-v4-latin-ext_latin-900.eot);src:local(""),url(../fonts/vollkorn-sc-v4-latin-ext_latin-900.eot?#iefix)format("embedded-opentype"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-900.woff2)format("woff2"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-900.woff)format("woff"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-900.ttf)format("truetype"),url(../fonts/vollkorn-sc-v4-latin-ext_latin-900.svg#VollkornSC)format("svg")}@font-face{font-family:vollkorn;font-style:italic;font-weight:500;src:url(../fonts/vollkorn-v12-latin-ext_latin-500italic.eot);src:local(""),url(../fonts/vollkorn-v12-latin-ext_latin-500italic.eot?#iefix)format("embedded-opentype"),url(../fonts/vollkorn-v12-latin-ext_latin-500italic.woff2)format("woff2"),url(../fonts/vollkorn-v12-latin-ext_latin-500italic.woff)format("woff"),url(../fonts/vollkorn-v12-latin-ext_latin-500italic.ttf)format("truetype"),url(../fonts/vollkorn-v12-latin-ext_latin-500italic.svg#Vollkorn)format("svg")}@font-face{font-family:vollkorn;font-style:normal;font-weight:400;src:url(../fonts/vollkorn-v12-latin-ext_latin-regular.eot);src:local(""),url(../fonts/vollkorn-v12-latin-ext_latin-regular.eot?#iefix)format("embedded-opentype"),url(../fonts/vollkorn-v12-latin-ext_latin-regular.woff2)format("woff2"),url(../fonts/vollkorn-v12-latin-ext_latin-regular.woff)format("woff"),url(../fonts/vollkorn-v12-latin-ext_latin-regular.ttf)format("truetype"),url(../fonts/vollkorn-v12-latin-ext_latin-regular.svg#Vollkorn)format("svg")}@font-face{font-family:vollkorn;font-style:normal;font-weight:500;src:url(../fonts/vollkorn-v12-latin-ext_latin-500.eot);src:local(""),url(../fonts/vollkorn-v12-latin-ext_latin-500.eot?#iefix)format("embedded-opentype"),url(../fonts/vollkorn-v12-latin-ext_latin-500.woff2)format("woff2"),url(../fonts/vollkorn-v12-latin-ext_latin-500.woff)format("woff"),url(../fonts/vollkorn-v12-latin-ext_latin-500.ttf)format("truetype"),url(../fonts/vollkorn-v12-latin-ext_latin-500.svg#Vollkorn)format("svg")}@font-face{font-family:vollkorn;font-style:italic;font-weight:400;src:url(../fonts/vollkorn-v12-latin-ext_latin-italic.eot);src:local(""),url(../fonts/vollkorn-v12-latin-ext_latin-italic.eot?#iefix)format("embedded-opentype"),url(../fonts/vollkorn-v12-latin-ext_latin-italic.woff2)format("woff2"),url(../fonts/vollkorn-v12-latin-ext_latin-italic.woff)format("woff"),url(../fonts/vollkorn-v12-latin-ext_latin-italic.ttf)format("truetype"),url(../fonts/vollkorn-v12-latin-ext_latin-italic.svg#Vollkorn)format("svg")}@font-face{font-family:great vibes;font-style:normal;font-weight:400;src:url(../fonts/great-vibes-v7-latin-ext_latin-regular.eot);src:local("Great Vibes"),local("GreatVibes-Regular"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.eot?#iefix)format("embedded-opentype"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.woff2)format("woff2"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.woff)format("woff"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.ttf)format("truetype"),url(../fonts/great-vibes-v7-latin-ext_latin-regular.svg#GreatVibes)format("svg")}html{line-height:1.5}body{font-family:vollkorn,serif;font-weight:400;max-width:1024px;font-size:1.4rem;padding-left:3rem;padding-top:.5rem;padding-right:2rem;color:#000}#preview{display:none}sup,sub{vertical-align:baseline;position:relative;top:-.4em}sub{top:.4em}.headiter{display:flex;justify-content:space-between;border-bottom:.3rem solid red;border-top:.1rem solid red;padding-top:1rem;padding-bottom:.5rem;padding-left:1rem;padding-right:1rem;margin-bottom:1rem}a.edit-button{color:#000;text-decoration:none}a.edit-button:hover{text-decoration:underline;-webkit-text-decoration-color:red;text-decoration-color:red;font-weight:500;font-size:.97em;cursor:pointer}.header{display:grid;grid-template-columns:auto;grid-auto-flow:column;position:sticky;top:0;padding-top:.5rem;font-size:1.1rem;background-color:#fff;z-index:10}.mantlebar{display:none}.breadcrumbs{grid-column:1}.bibliotheke{width:2.4rem;grid-column:2;margin-left:auto}.bibliotheke:hover{text-decoration:none;font-size:1rem}.alsoin{font-weight:700;display:inline-flex;padding-left:.2rem;padding-right:.3rem}.ddmenu{cursor:pointer;display:inline-grid}.ddmenu input{display:none}.ddmenu li{list-style-type:none}.ddmenu .hiddendiv{display:none;margin-top:-.9rem}input:focus,select:focus,textarea:focus,label:focus,button:focus{outline:none}.ddmenu input:checked~.hiddendiv{display:block}.logolink{width:2.4rem;margin-left:auto}.sandpointlogo{border-radius:50%;border:.3em solid red;display:inline-flex;font-family:great vibes,cursive;font-size:1.2rem;font-weight:700;color:#fff;background-color:red;position:relative;padding-left:1em;padding-right:.3em;padding-bottom:1.2em;max-width:0;max-height:0}.sandpointF{position:absolute;font-size:1.2em;margin-top:-.2em;margin-left:-.4em}.sandpointN{position:absolute;font-size:.7em;margin-top:.4em;color:red;margin-left:-.5em}.sandpointC{position:absolute;font-size:1em;margin-left:-.37em}footer{display:flex;margin-bottom:1rem;margin-top:4rem}li{list-style-type:"› "}li[role=doc-endnote]{list-style-type:decimal}ol li{list-style-type:decimal}img{width:100%}.supt{display:inline-flex;flex-wrap:nowrap;font-family:great vibes,cursive;font-size:.9em;font-style:normal;color:rgba(0,0,0,.8);vertical-align:baseline;position:relative;top:-.3em}.sup{display:inline-flex;flex-wrap:nowrap;font-family:great vibes,cursive;font-size:.9em;font-style:normal;color:red;vertical-align:baseline;position:relative;top:-.3em}.sup:hover{font-weight:400!important}.nosup a{color:red}.nosup a span.sup{display:none}.syllabustitle,.coretitle{margin-top:4rem;font-style:italic;font-size:4rem;margin-bottom:4rem}.mantletitle,.crusttitle{margin-top:4rem;font-style:italic;font-size:2rem;margin-bottom:4rem}.grid{padding-left:3rem;margin-bottom:2rem;display:grid;grid-template-columns:1fr 1fr}.leftcolumn{grid-column:1;padding-right:1.2rem;position:relative}#TableOfContents{margin-left:-2rem;margin-top:-1.5rem}#TableOfContents li{list-style:decimal inside;padding-left:.5rem;color:rgba(0,0,0,.4);margin:0;padding:0}#TableOfContents li a{font-family:vollkorn;font-size:1.4rem;font-weight:500;font-style:normal}#TableOfContents>ol:first-child>span>li>a::after{content:"¶";color:rgba(0,0,0,.2);font-size:1.3em;padding-left:.1em}.rightcolumn{padding-left:.5rem}.has{display:inline-grid;grid-column:2;grid-auto-rows:max-content;font-size:1.4rem;font-style:italic;margin-bottom:.8rem}.hasauthors{font-size:1.6rem!important;display:flex}.hassup{grid-column:1;font-family:great vibes,cursive;font-size:.9em;font-style:normal;color:red;vertical-align:baseline;position:relative}.afterhas{grid-column:2}.content{margin-top:4rem;padding-left:3rem;padding-right:10rem;max-width:720px}a{color:#000;text-decoration:none}a:hover{text-decoration:underline;text-decoration-color:red;font-weight:500;font-size:.97em;cursor:pointer}h1{display:none}h2{font-weight:500;font-size:1.6rem}h3{font-weight:500;font-size:1.4rem}h4{font-weight:500;font-size:1.2rem}h5{font-weight:500;font-size:1.1rem}h6{font-weight:500;font-size:1rem}.abstract{font-style:italic;border-left:1px solid #000;margin-left:5rem;margin-right:2rem;margin-bottom:1.2rem;padding-left:1rem;padding-right:2rem;padding-top:1.2rem;padding-bottom:1.2rem;background-color:rgba(0,0,0,5%);max-width:45ch}.authors{display:inline-block;font-size:1.8rem;margin-left:5rem;margin-right:2rem;padding-left:1rem}.keywords{display:inline-block;font-size:1.2rem;margin-left:5rem;margin-right:2rem;padding-left:1rem;padding-right:2rem;margin-bottom:2.2rem;max-width:72ch}blockquote{border-left:1px red solid;margin-left:1rem;margin-right:2rem;padding-left:1rem;padding-right:2rem;padding-top:.1rem;padding-bottom:.1rem;background-color:#fff9f9}h2+p:first-letter{font-family:great vibes,cursive;color:rgba(0,0,0,.8);font-size:1.5em;line-height:0}.hx{position:relative}.hpar{position:absolute;font-size:1.7em;font-style:normal;color:rgba(0,0,0,.1);top:0;margin-top:-.4em}.smallcaps{font-family:vollkorn sc,serif;font-weight:400}body{counter-reset:h2 glossN}h2{counter-reset:h3}h3{counter-reset:h4}h4{counter-reset:h5}h5{counter-reset:h6}h2:before{color:rgba(0,0,0,.4);counter-increment:h2;content:counter(h2)". "}h3:before{color:rgba(0,0,0,.4);counter-increment:h3;content:counter(h2)"." counter(h3)". "}h4:before{color:rgba(0,0,0,.4);counter-increment:h4;content:counter(h2)"." counter(h3)"." counter(h4)". "}h5:before{color:rgba(0,0,0,.4);counter-increment:h5;content:counter(h2)"." counter(h3)"." counter(h4)"." counter(h5)". "}h6:before{color:rgba(0,0,0,.4);counter-increment:h6;content:counter(h2)"." counter(h3)"." counter(h4)"." counter(h5)"." counter(h6)". "}h2.nocount:before,h3.nocount:before,h4.nocount:before,h5.nocount:before,h6.nocount:before{content:"";counter-increment:none}details{padding-left:1rem}#toggleAllLinks{font-size:.8rem}#toggleAllLinks:hover{cursor:pointer;text-decoration:underline;text-decoration-color:red}.glosscontainer{display:grid;grid-template-columns:auto 1fr;grid-template-rows:1fr;gap:0 0;grid-template-areas:"glossnumber gloss";border-left:1px red solid;background-color:#fff9f9;padding-top:.4em;margin-top:1rem;margin-bottom:1rem;margin-left:1rem;margin-right:2rem;padding-bottom:.4em;padding-left:1rem;padding-right:2rem}.gloss{grid-area:gloss}.glossnumber{grid-area:glossnumber;padding-right:.6rem}.glossnumberAuto::before{counter-increment:glossN;content:"(" counter(glossN)")"}.glosswords{display:inline-block;padding-left:-.3rem;padding-right:1rem}.sitemap{padding-left:3rem;font-size:1.2rem}.sitemap a{color:rgba(0,0,0,.4)}.sitemap .sup{color:rgba(255,0,0,.7)}.highline a,.sitemap a:hover{color:#000}.highline .sup,.sitemap .sup:hover{color:red}.highline{font-size:1.6rem;color:#000;border-left:1px red solid;padding-left:1rem;padding-top:.1rem;padding-bottom:.1rem;background-color:#fff9f9}.svedit{display:none;margin-left:.5rem}@media(max-width:767px){html{box-sizing:border-box;max-width:767px;margin:0 auto;padding:0}body{font-size:1rem;padding-left:10px;padding-right:10px}.grid{display:inline}.coretitle{margin-top:3rem;margin-bottom:2rem;font-size:2.2rem}.leftcolumn{display:none}.has,.afterhas{font-size:1.1rem}.mantle,.crust{margin-bottom:.2em}.content{padding:0;margin:0 auto;margin-top:4rem}.hpar{display:none}.mantletitle{font-size:1.7rem}.sessiongrid{display:none}} diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/js/paged.polyfill.js b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/js/paged.polyfill.js index c984974..e1f48b4 100644 --- a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/js/paged.polyfill.js +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/js/paged.polyfill.js @@ -1,22 +1,18 @@ /** - * @license Paged.js v0.1.43 | MIT | https://gitlab.pagedmedia.org/tools/pagedjs + * @license Paged.js v0.4.0 | MIT | https://gitlab.pagedmedia.org/tools/pagedjs */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : - (global = global || self, global.PagedPolyfill = factory()); -}(this, (function () { 'use strict'; + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.PagedPolyfill = factory()); +})(this, (function () { 'use strict'; - function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; - } + var eventEmitter = {exports: {}}; - function getCjsExportFromNamespace (n) { - return n && n['default'] || n; - } + var d$3 = {exports: {}}; - var isImplemented = function () { + var isImplemented$6 = function () { var assign = Object.assign, obj; if (typeof assign !== "function") return false; obj = { foo: "raz" }; @@ -24,7 +20,7 @@ return (obj.foo + obj.bar + obj.trzy) === "razdwatrzy"; }; - var isImplemented$1 = function () { + var isImplemented$5 = function () { try { Object.keys("primitive"); return true; @@ -34,34 +30,40 @@ }; // eslint-disable-next-line no-empty-function - var noop = function () {}; + var noop$4 = function () {}; - var _undefined = noop(); // Support ES3 engines + var _undefined = noop$4(); // Support ES3 engines - var isValue = function (val) { + var isValue$5 = function (val) { return (val !== _undefined) && (val !== null); }; - var keys = Object.keys; + var isValue$4 = isValue$5; - var shim = function (object) { - return keys(isValue(object) ? Object(object) : object); + var keys$2 = Object.keys; + + var shim$5 = function (object) { + return keys$2(isValue$4(object) ? Object(object) : object); }; - var keys$1 = isImplemented$1() + var keys$1 = isImplemented$5() ? Object.keys - : shim; + : shim$5; - var validValue = function (value) { - if (!isValue(value)) throw new TypeError("Cannot use null or undefined"); + var isValue$3 = isValue$5; + + var validValue$1 = function (value) { + if (!isValue$3(value)) throw new TypeError("Cannot use null or undefined"); return value; }; - var max = Math.max; + var keys = keys$1 + , value$3 = validValue$1 + , max$1 = Math.max; - var shim$1 = function (dest, src /*, …srcn*/) { - var error, i, length = max(arguments.length, 2), assign; - dest = Object(validValue(dest)); + var shim$4 = function (dest, src /*, …srcn*/) { + var error, i, length = max$1(arguments.length, 2), assign; + dest = Object(value$3(dest)); assign = function (key) { try { dest[key] = src[key]; @@ -71,17 +73,19 @@ }; for (i = 1; i < length; ++i) { src = arguments[i]; - keys$1(src).forEach(assign); + keys(src).forEach(assign); } if (error !== undefined) throw error; return dest; }; - var assign = isImplemented() + var assign$2 = isImplemented$6() ? Object.assign - : shim$1; + : shim$4; - var forEach = Array.prototype.forEach, create = Object.create; + var isValue$2 = isValue$5; + + var forEach$1 = Array.prototype.forEach, create$6 = Object.create; var process = function (src, obj) { var key; @@ -90,42 +94,43 @@ // eslint-disable-next-line no-unused-vars var normalizeOptions = function (opts1 /*, …options*/) { - var result = create(null); - forEach.call(arguments, function (options) { - if (!isValue(options)) return; + var result = create$6(null); + forEach$1.call(arguments, function (options) { + if (!isValue$2(options)) return; process(Object(options), result); }); return result; }; - // Deprecated - - var isCallable = function (obj) { + var isCallable$1 = function (obj) { return typeof obj === "function"; }; var str = "razdwatrzy"; - var isImplemented$2 = function () { + var isImplemented$4 = function () { if (typeof str.contains !== "function") return false; return (str.contains("dwa") === true) && (str.contains("foo") === false); }; - var indexOf = String.prototype.indexOf; + var indexOf$3 = String.prototype.indexOf; - var shim$2 = function (searchString/*, position*/) { - return indexOf.call(this, searchString, arguments[1]) > -1; + var shim$3 = function (searchString/*, position*/) { + return indexOf$3.call(this, searchString, arguments[1]) > -1; }; - var contains = isImplemented$2() + var contains$1 = isImplemented$4() ? String.prototype.contains - : shim$2; + : shim$3; - var d_1 = createCommonjsModule(function (module) { + var assign$1 = assign$2 + , normalizeOpts = normalizeOptions + , isCallable = isCallable$1 + , contains = contains$1 - var d; + , d$2; - d = module.exports = function (dscr, value/*, options*/) { + d$2 = d$3.exports = function (dscr, value/*, options*/) { var c, e, w, options, desc; if ((arguments.length < 2) || (typeof dscr !== 'string')) { options = value; @@ -144,10 +149,10 @@ } desc = { value: value, configurable: c, enumerable: e, writable: w }; - return !options ? desc : assign(normalizeOptions(options), desc); + return !options ? desc : assign$1(normalizeOpts(options), desc); }; - d.gs = function (dscr, get, set/*, options*/) { + d$2.gs = function (dscr, get, set/*, options*/) { var c, e, options, desc; if (typeof dscr !== 'string') { options = set; @@ -177,18 +182,20 @@ } desc = { get: get, set: set, configurable: c, enumerable: e }; - return !options ? desc : assign(normalizeOptions(options), desc); + return !options ? desc : assign$1(normalizeOpts(options), desc); }; - }); var validCallable = function (fn) { if (typeof fn !== "function") throw new TypeError(fn + " is not a function"); return fn; }; - var eventEmitter = createCommonjsModule(function (module, exports) { + (function (module, exports) { - var apply = Function.prototype.apply, call = Function.prototype.call + var d = d$3.exports + , callable = validCallable + + , apply = Function.prototype.apply, call = Function.prototype.call , create = Object.create, defineProperty = Object.defineProperty , defineProperties = Object.defineProperties , hasOwnProperty = Object.prototype.hasOwnProperty @@ -199,7 +206,7 @@ on = function (type, listener) { var data; - validCallable(listener); + callable(listener); if (!hasOwnProperty.call(this, '__ee__')) { data = descriptor.value = create(null); @@ -218,7 +225,7 @@ once = function (type, listener) { var once, self; - validCallable(listener); + callable(listener); self = this; on.call(this, type, once = function () { off.call(self, type, once); @@ -232,7 +239,7 @@ off = function (type, listener) { var data, listeners, candidate, i; - validCallable(listener); + callable(listener); if (!hasOwnProperty.call(this, '__ee__')) return this; data = this.__ee__; @@ -303,10 +310,10 @@ }; descriptors = { - on: d_1(on), - once: d_1(once), - off: d_1(off), - emit: d_1(emit) + on: d(on), + once: d(once), + off: d(off), + emit: d(emit) }; base = defineProperties({}, descriptors); @@ -315,8 +322,9 @@ return (o == null) ? create(base) : defineProperties(Object(o), descriptors); }; exports.methods = methods; - }); - var eventEmitter_1 = eventEmitter.methods; + }(eventEmitter, eventEmitter.exports)); + + var EventEmitter = eventEmitter.exports; /** * Hooks allow for injecting functions that must all complete in order before finishing @@ -366,11 +374,12 @@ if(executing && typeof executing["then"] === "function") { // Task is a function that returns a promise promises.push(executing); + } else { + // Otherwise Task resolves immediately, add resolved promise with result + promises.push(new Promise((resolve, reject) => { + resolve(executing); + })); } - // Otherwise Task resolves immediately, add resolved promise with result - promises.push(new Promise((resolve, reject) => { - resolve(executing); - })); }); @@ -591,7 +600,7 @@ return node && node.nodeType === 3; } - function *walk(start, limiter) { + function* walk$2(start, limiter) { let node = start; while (node) { @@ -689,7 +698,7 @@ let after = elementAfter(node, limiter); while (after && after.dataset.undisplayed) { - after = elementAfter(after); + after = elementAfter(after, limiter); } return after; @@ -699,7 +708,7 @@ let before = elementBefore(node, limiter); while (before && before.dataset.undisplayed) { - before = elementBefore(before); + before = elementBefore(before, limiter); } return before; @@ -712,6 +721,41 @@ let fragment = document.createDocumentFragment(); + // Handle rowspan on table + if (node.nodeName === "TR") { + let previousRow = node.previousElementSibling; + let previousRowDistance = 1; + while (previousRow) { + // previous row has more columns, might indicate a rowspan. + if (previousRow.childElementCount > node.childElementCount) { + const initialColumns = Array.from(node.children); + while (node.firstChild) { + node.firstChild.remove(); + } + let k = 0; + for (let j = 0; j < previousRow.children.length; j++) { + let column = previousRow.children[j]; + if (column.rowSpan && column.rowSpan > previousRowDistance) { + const duplicatedColumn = column.cloneNode(true); + // Adjust rowspan value + duplicatedColumn.rowSpan = column.rowSpan - previousRowDistance; + // Add the column to the row + node.appendChild(duplicatedColumn); + } else { + // Fill the gap with the initial columns (if exists) + const initialColumn = initialColumns[k++]; + // The initial column can be undefined if the newly created table has less columns than the original table + if (initialColumn) { + node.appendChild(initialColumn); + } + } + } + } + previousRow = previousRow.previousElementSibling; + previousRowDistance++; + } + } + // Gather all ancestors let element = node; while(element.parentNode && element.parentNode.nodeType === 1) { @@ -722,7 +766,7 @@ for (var i = 0; i < ancestors.length; i++) { ancestor = ancestors[i]; parent = ancestor.cloneNode(false); - + parent.setAttribute("data-split-from", parent.getAttribute("data-ref")); // ancestor.setAttribute("data-split-to", parent.getAttribute("data-ref")); @@ -748,12 +792,23 @@ fragment.appendChild(parent); } added.push(parent); + + // rebuild table rows + if (parent.nodeName === "TD" && ancestor.parentElement.contains(ancestor)) { + let td = ancestor; + let prev = parent; + while ((td = td.previousElementSibling)) { + let sib = td.cloneNode(false); + parent.parentElement.insertBefore(sib, prev); + prev = sib; + } + + } } added = undefined; return fragment; } - /* export function split(bound, cutElement, breakAfter) { let needsRemoval = []; @@ -844,8 +899,20 @@ if (node.dataset && node.dataset.undisplayed) { return false; } - const previousSignificantNodePage = previousSignificantNode.dataset ? previousSignificantNode.dataset.page : undefined; - const currentNodePage = node.dataset ? node.dataset.page : undefined; + let previousSignificantNodePage = previousSignificantNode.dataset ? previousSignificantNode.dataset.page : undefined; + if (typeof previousSignificantNodePage === "undefined") { + const nodeWithNamedPage = getNodeWithNamedPage(previousSignificantNode); + if (nodeWithNamedPage) { + previousSignificantNodePage = nodeWithNamedPage.dataset.page; + } + } + let currentNodePage = node.dataset ? node.dataset.page : undefined; + if (typeof currentNodePage === "undefined") { + const nodeWithNamedPage = getNodeWithNamedPage(node, previousSignificantNode); + if (nodeWithNamedPage) { + currentNodePage = nodeWithNamedPage.dataset.page; + } + } return currentNodePage !== previousSignificantNodePage; } @@ -856,10 +923,11 @@ let currentLetter; let range; + const significantWhitespaces = node.parentElement && node.parentElement.nodeName === "PRE"; - while(currentOffset < max) { + while (currentOffset < max) { currentLetter = currentText[currentOffset]; - if (/^[\S\u202F\u00A0]$/.test(currentLetter)) { + if (/^[\S\u202F\u00A0]$/.test(currentLetter) || significantWhitespaces) { if (!range) { range = document.createRange(); range.setStart(node, currentOffset); @@ -878,7 +946,6 @@ if (range) { range.setEnd(node, currentOffset); yield range; - range = undefined; } } @@ -958,7 +1025,7 @@ case "BLOCKQUOTE": case "PRE": case "LI": - case "TR": + case "TD": case "DT": case "DD": case "VIDEO": @@ -976,13 +1043,17 @@ return n.cloneNode(deep); } - function findElement(node, doc) { + function findElement(node, doc, forceQuery) { const ref = node.getAttribute("data-ref"); - return findRef(ref, doc); + return findRef(ref, doc, forceQuery); } - function findRef(ref, doc) { - return doc.querySelector(`[data-ref='${ref}']`); + function findRef(ref, doc, forceQuery) { + if (!forceQuery && doc.indexOfRefs && doc.indexOfRefs[ref]) { + return doc.indexOfRefs[ref]; + } else { + return doc.querySelector(`[data-ref='${ref}']`); + } } function validNode(node) { @@ -1014,7 +1085,7 @@ } - function indexOf$1(node) { + function indexOf$2(node) { let parent = node.parentNode; if (!parent) { return 0; @@ -1113,6 +1184,23 @@ return null; } + function getNodeWithNamedPage(node, limiter) { + if (node && node.dataset && node.dataset.page) { + return node; + } + if (node.parentNode) { + while ((node = node.parentNode)) { + if (limiter && node === limiter) { + return; + } + if (node.dataset && node.dataset.page) { + return node; + } + } + } + return null; + } + function breakInsideAvoidParentNode(node) { while ((node = node.parentNode)) { if (node && node.dataset && node.dataset.breakInside === "avoid") { @@ -1182,7 +1270,7 @@ } /** - * Layout + * BreakToken * @class */ class BreakToken { @@ -1207,6 +1295,49 @@ return true; } + toJSON(hash) { + let node; + let index = 0; + if (!this.node) { + return {}; + } + if (isElement(this.node) && this.node.dataset.ref) { + node = this.node.dataset.ref; + } else if (hash) { + node = this.node.parentElement.dataset.ref; + } + + if (this.node.parentElement) { + const children = Array.from(this.node.parentElement.childNodes); + index = children.indexOf(this.node); + } + + return JSON.stringify({ + "node": node, + "index" : index, + "offset": this.offset + }); + } + + } + + /** + * Render result. + * @class + */ + class RenderResult { + + constructor(breakToken, error) { + this.breakToken = breakToken; + this.error = error; + } + } + + class OverflowContentError extends Error { + constructor(message, items) { + super(message); + this.items = items; + } } const MAX_CHARS_PER_BREAK = 1500; @@ -1221,6 +1352,15 @@ this.element = element; this.bounds = this.element.getBoundingClientRect(); + this.parentBounds = this.element.offsetParent.getBoundingClientRect(); + let gap = parseFloat(window.getComputedStyle(this.element).columnGap); + + if (gap) { + let leftMargin = this.bounds.left - this.parentBounds.left; + this.gap = gap - leftMargin; + } else { + this.gap = 0; + } if (hooks) { this.hooks = hooks; @@ -1231,6 +1371,7 @@ this.hooks.layoutNode = new Hook(); this.hooks.beforeOverflow = new Hook(); this.hooks.onOverflow = new Hook(); + this.hooks.afterOverflowRemoved = new Hook(); this.hooks.onBreakToken = new Hook(); } @@ -1242,7 +1383,7 @@ async renderTo(wrapper, source, breakToken, bounds = this.bounds) { let start = this.getStart(source, breakToken); - let walker = walk(start, source); + let walker = walk$2(start, source); let node; let prevNode; @@ -1274,15 +1415,18 @@ if (newBreakToken && newBreakToken.equals(prevBreakToken)) { console.warn("Unable to layout item: ", prevNode); - return undefined; + return new RenderResult(undefined, new OverflowContentError("Unable to layout item", [prevNode])); } - return newBreakToken; + + this.rebuildTableFromBreakToken(newBreakToken, wrapper); + + return new RenderResult(newBreakToken); } this.hooks && this.hooks.layoutNode.trigger(node); // Check if the rendered element has a break set - if (hasRenderedContent && this.shouldBreak(node)) { + if (hasRenderedContent && this.shouldBreak(node, start)) { this.hooks && this.hooks.layout.trigger(wrapper, this); let imgs = wrapper.querySelectorAll("img"); @@ -1294,11 +1438,18 @@ if (!newBreakToken) { newBreakToken = this.breakAt(node); + } else { + this.rebuildTableFromBreakToken(newBreakToken, wrapper); } if (newBreakToken && newBreakToken.equals(prevBreakToken)) { console.warn("Unable to layout item: ", node); - return undefined; + let after = newBreakToken.node && nodeAfter(newBreakToken.node); + if (after) { + newBreakToken = new BreakToken(after); + } else { + return new RenderResult(undefined, new OverflowContentError("Unable to layout item", [node])); + } } length = 0; @@ -1306,6 +1457,17 @@ break; } + if (node.dataset && node.dataset.page) { + let named = node.dataset.page; + let page = this.element.closest(".pagedjs_page"); + page.classList.add("pagedjs_named_page"); + page.classList.add("pagedjs_" + named + "_page"); + + if (!node.dataset.splitFrom) { + page.classList.add("pagedjs_" + named + "_first_page"); + } + } + // Should the Node be a shallow or deep clone let shallow = isContainer(node); @@ -1320,7 +1482,7 @@ // Skip to the next node if a deep clone was rendered if (!shallow) { - walker = walk(nodeAfter(node, source), source); + walker = walk$2(nodeAfter(node, source), source); } if (this.forceRenderBreak) { @@ -1330,6 +1492,8 @@ if (!newBreakToken) { newBreakToken = this.breakAt(node); + } else { + this.rebuildTableFromBreakToken(newBreakToken, wrapper); } length = 0; @@ -1350,19 +1514,25 @@ newBreakToken = this.findBreakToken(wrapper, source, bounds, prevBreakToken); - if (newBreakToken && newBreakToken.equals(prevBreakToken)) { - console.warn("Unable to layout item: ", node); - return undefined; - } - if (newBreakToken) { length = 0; + this.rebuildTableFromBreakToken(newBreakToken, wrapper); + } + + if (newBreakToken && newBreakToken.equals(prevBreakToken)) { + console.warn("Unable to layout item: ", node); + let after = newBreakToken.node && nodeAfter(newBreakToken.node); + if (after) { + newBreakToken = new BreakToken(after); + } else { + return new RenderResult(undefined, new OverflowContentError("Unable to layout item", [node])); + } } } } - return newBreakToken; + return new RenderResult(newBreakToken); } breakAt(node, offset = 0) { @@ -1380,17 +1550,17 @@ return newBreakToken; } - shouldBreak(node) { - let previousSibling = previousSignificantNode(node); + shouldBreak(node, limiter) { + let previousNode = nodeBefore(node, limiter); let parentNode = node.parentNode; - let parentBreakBefore = needsBreakBefore(node) && parentNode && !previousSibling && needsBreakBefore(parentNode); + let parentBreakBefore = needsBreakBefore(node) && parentNode && !previousNode && needsBreakBefore(parentNode); let doubleBreakBefore; if (parentBreakBefore) { doubleBreakBefore = node.dataset.breakBefore === parentNode.dataset.breakBefore; } - return !doubleBreakBefore && needsBreakBefore(node) || needsPreviousBreakAfter(node) || needsPageBreak(node, previousSibling); + return !doubleBreakBefore && needsBreakBefore(node) || needsPreviousBreakAfter(node) || needsPageBreak(node, previousNode); } forceBreak() { @@ -1441,6 +1611,13 @@ dest.appendChild(clone); } + if (clone.dataset && clone.dataset.ref) { + if (!dest.indexOfRefs) { + dest.indexOfRefs = {}; + } + dest.indexOfRefs[clone.dataset.ref] = clone; + } + let nodeHooks = this.hooks.renderNode.triggerSync(clone, node, this); nodeHooks.forEach((newNode) => { if (typeof newNode != "undefined") { @@ -1451,6 +1628,23 @@ return clone; } + rebuildTableFromBreakToken(breakToken, dest) { + if (!breakToken || !breakToken.node) { + return; + } + let node = breakToken.node; + let td = isElement(node) ? node.closest("td") : node.parentElement.closest("td"); + if (td) { + let rendered = findElement(td, dest, true); + if (!rendered) { + return; + } + while ((td = td.nextElementSibling)) { + this.append(td, dest, null, true); + } + } + } + async waitForImages(imgs) { let results = Array.from(imgs).map(async (img) => { return this.awaitImageLoaded(img); @@ -1620,7 +1814,8 @@ } if (breakToken && breakToken.node && extract) { - this.removeOverflow(overflow, breakLetter); + let removed = this.removeOverflow(overflow, breakLetter); + this.hooks && this.hooks.afterOverflowRemoved.trigger(removed, rendered, this); } } @@ -1629,19 +1824,23 @@ hasOverflow(element, bounds = this.bounds) { let constrainingElement = element && element.parentNode; // this gets the element, instead of the wrapper for the width workaround - let {width} = element.getBoundingClientRect(); + let {width, height} = element.getBoundingClientRect(); let scrollWidth = constrainingElement ? constrainingElement.scrollWidth : 0; - return Math.max(Math.floor(width), scrollWidth) > Math.round(bounds.width); + let scrollHeight = constrainingElement ? constrainingElement.scrollHeight : 0; + return Math.max(Math.floor(width), scrollWidth) > Math.round(bounds.width) || + Math.max(Math.floor(height), scrollHeight) > Math.round(bounds.height); } - findOverflow(rendered, bounds = this.bounds) { + findOverflow(rendered, bounds = this.bounds, gap = this.gap) { if (!this.hasOverflow(rendered, bounds)) return; - let start = Math.round(bounds.left); - let end = Math.round(bounds.right); + let start = Math.floor(bounds.left); + let end = Math.round(bounds.right + gap); + let vStart = Math.round(bounds.top); + let vEnd = Math.round(bounds.bottom); let range; - let walker = walk(rendered.firstChild, rendered); + let walker = walk$2(rendered.firstChild, rendered); // Find Start let next, done, node, offset, skip, breakAvoid, prev, br; @@ -1658,8 +1857,10 @@ let pos = getBoundingClientRect(node); let left = Math.round(pos.left); let right = Math.floor(pos.right); + let top = Math.round(pos.top); + let bottom = Math.floor(pos.bottom); - if (!range && left >= end) { + if (!range && (left >= end || top >= vEnd)) { // Check if it is a float let isFloat = false; @@ -1667,7 +1868,8 @@ const insideTableCell = parentOf(node, "TD", rendered); if (insideTableCell && window.getComputedStyle(insideTableCell)["break-inside"] === "avoid") { // breaking inside a table cell produces unexpected result, as a workaround, we forcibly avoid break inside in a cell. - prev = insideTableCell; + // But we take the whole row, not just the cell that is causing the break. + prev = insideTableCell.parentElement; } else if (isElement(node)) { let styles = window.getComputedStyle(node); isFloat = styles.getPropertyValue("float") !== "none"; @@ -1677,6 +1879,48 @@ br = node.tagName === "BR" || node.tagName === "WBR"; } + let tableRow; + if (node.nodeName === "TR") { + tableRow = node; + } else { + tableRow = parentOf(node, "TR", rendered); + } + if (tableRow) { + // honor break-inside="avoid" in parent tbody/thead + let container = tableRow.parentElement; + if (["TBODY", "THEAD"].includes(container.nodeName)) { + let styles = window.getComputedStyle(container); + if (styles.getPropertyValue("break-inside") === "avoid") prev = container; + } + + // Check if the node is inside a row with a rowspan + const table = parentOf(tableRow, "TABLE", rendered); + const rowspan = table.querySelector("[colspan]"); + if (table && rowspan) { + let columnCount = 0; + for (const cell of Array.from(table.rows[0].cells)) { + columnCount += parseInt(cell.getAttribute("colspan") || "1"); + } + if (tableRow.cells.length !== columnCount) { + let previousRow = tableRow.previousElementSibling; + let previousRowColumnCount; + while (previousRow !== null) { + previousRowColumnCount = 0; + for (const cell of Array.from(previousRow.cells)) { + previousRowColumnCount += parseInt(cell.getAttribute("colspan") || "1"); + } + if (previousRowColumnCount === columnCount) { + break; + } + previousRow = previousRow.previousElementSibling; + } + if (previousRowColumnCount === columnCount) { + prev = previousRow; + } + } + } + } + if (prev) { range = document.createRange(); range.selectNode(prev); @@ -1704,16 +1948,20 @@ let rects = getClientRects(node); let rect; left = 0; + top = 0; for (var i = 0; i != rects.length; i++) { rect = rects[i]; if (rect.width > 0 && (!left || rect.left > left)) { left = rect.left; } + if (rect.height > 0 && (!top || rect.top > top)) { + top = rect.top; + } } - if (left >= end) { + if (left >= end || top >= vEnd) { range = document.createRange(); - offset = this.textBreak(node, start, end); + offset = this.textBreak(node, start, end, vStart, vEnd); if (!offset) { range = undefined; } else { @@ -1724,10 +1972,10 @@ } // Skip children - if (skip || right <= end) { + if (skip || (right <= end && bottom <= vEnd)) { next = nodeAfter(node, rendered); if (next) { - walker = walk(next, rendered); + walker = walk$2(next, rendered); } } @@ -1743,7 +1991,7 @@ } - findEndToken(rendered, source, bounds = this.bounds) { + findEndToken(rendered, source) { if (rendered.childNodes.length === 0) { return; } @@ -1767,7 +2015,7 @@ if (isText(lastChild)) { if (lastChild.parentNode.dataset.ref) { - lastNodeIndex = indexOf$1(lastChild); + lastNodeIndex = indexOf$2(lastChild); lastChild = lastChild.parentNode; } else { lastChild = lastChild.previousSibling; @@ -1785,10 +2033,12 @@ return this.breakAt(after); } - textBreak(node, start, end) { + textBreak(node, start, end, vStart, vEnd) { let wordwalker = words(node); let left = 0; let right = 0; + let top = 0; + let bottom = 0; let word, next, done, pos; let offset; while (!done) { @@ -1804,13 +2054,15 @@ left = Math.floor(pos.left); right = Math.floor(pos.right); + top = Math.floor(pos.top); + bottom = Math.floor(pos.bottom); - if (left >= end) { + if (left >= end || top >= vEnd) { offset = word.startOffset; break; } - if (right > end) { + if (right > end || bottom > vEnd) { let letterwalker = letters(word); let letter, nextLetter, doneLetter; @@ -1825,8 +2077,9 @@ pos = getBoundingClientRect(letter); left = Math.floor(pos.left); + top = Math.floor(pos.top); - if (left >= end) { + if (left >= end || top >= vEnd) { offset = letter.startOffset; done = true; @@ -1879,14 +2132,14 @@ } } - eventEmitter(Layout.prototype); + EventEmitter(Layout.prototype); /** * Render a page * @class */ class Page { - constructor(pagesArea, pageTemplate, blank, hooks) { + constructor(pagesArea, pageTemplate, blank, hooks, options) { this.pagesArea = pagesArea; this.pageTemplate = pageTemplate; this.blank = blank; @@ -1896,6 +2149,8 @@ this.hooks = hooks; + this.settings = options || {}; + // this.element = this.create(this.pageTemplate); } @@ -1916,13 +2171,14 @@ let pagebox = page.querySelector(".pagedjs_pagebox"); let area = page.querySelector(".pagedjs_page_content"); + let footnotesArea = page.querySelector(".pagedjs_footnote_area"); let size = area.getBoundingClientRect(); area.style.columnWidth = Math.round(size.width) + "px"; - area.style.columnGap = "calc(var(--pagedjs-margin-right) + var(--pagedjs-margin-left))"; + area.style.columnGap = "calc(var(--pagedjs-margin-right) + var(--pagedjs-margin-left) + var(--pagedjs-bleed-right) + var(--pagedjs-bleed-left) + var(--pagedjs-column-gap-offset))"; // area.style.overflow = "scroll"; this.width = Math.round(size.width); @@ -1931,6 +2187,7 @@ this.element = page; this.pagebox = pagebox; this.area = area; + this.footnotesArea = footnotesArea; return page; } @@ -2003,10 +2260,16 @@ this.startToken = breakToken; - this.layoutMethod = new Layout(this.area, this.hooks, maxChars); + let settings = this.settings; + if (!settings.maxChars && maxChars) { + settings.maxChars = maxChars; + } + + this.layoutMethod = new Layout(this.area, this.hooks, settings); + + let renderResult = await this.layoutMethod.renderTo(this.wrapper, contents, breakToken); + let newBreakToken = renderResult.breakToken; - let newBreakToken = await this.layoutMethod.renderTo(this.wrapper, contents, breakToken); - this.addListeners(contents); this.endToken = newBreakToken; @@ -2020,7 +2283,8 @@ return this.layout(contents, breakToken); } - let newBreakToken = await this.layoutMethod.renderTo(this.wrapper, contents, breakToken); + let renderResult = await this.layoutMethod.renderTo(this.wrapper, contents, breakToken); + let newBreakToken = renderResult.breakToken; this.endToken = newBreakToken; @@ -2151,7 +2415,7 @@ } } - eventEmitter(Page.prototype); + EventEmitter(Page.prototype); /** * Render a flow of text offscreen @@ -2499,6 +2763,11 @@
+
+
+
+
+
@@ -2523,8 +2792,10 @@ this.hooks.renderNode = new Hook(this); this.hooks.layoutNode = new Hook(this); this.hooks.onOverflow = new Hook(this); + this.hooks.afterOverflowRemoved = new Hook(this); this.hooks.onBreakToken = new Hook(); this.hooks.afterPageLayout = new Hook(this); + this.hooks.finalizePage = new Hook(this); this.hooks.afterRendered = new Hook(this); this.pages = []; @@ -2631,7 +2902,7 @@ // } async render(parsed, startAt) { - let renderer = this.layout(parsed, startAt, this.settings); + let renderer = this.layout(parsed, startAt); let done = false; let result; @@ -2681,7 +2952,7 @@ } } - async handleBreaks(node) { + async handleBreaks(node, force) { let currentPage = this.total + 1; let currentPosition = currentPage % 2 === 0 ? "left" : "right"; // TODO: Recto and Verso should reverse for rtl languages @@ -2706,7 +2977,9 @@ breakBefore = node.dataset.breakBefore; } - if( previousBreakAfter && + if (force) { + page = this.addPage(true); + } else if( previousBreakAfter && (previousBreakAfter === "left" || previousBreakAfter === "right") && previousBreakAfter !== currentPosition) { page = this.addPage(true); @@ -2729,14 +3002,16 @@ this.emit("page", page); // await this.hooks.layout.trigger(page.element, page, undefined, this); await this.hooks.afterPageLayout.trigger(page.element, page, undefined, this); + await this.hooks.finalizePage.trigger(page.element, page, undefined, this); this.emit("renderedPage", page); } } async *layout(content, startAt) { let breakToken = startAt || false; + let tokens = []; - while (breakToken !== undefined && ( true)) { + while (breakToken !== undefined && (true)) { if (breakToken && breakToken.node) { await this.handleBreaks(breakToken.node); @@ -2752,7 +3027,20 @@ // Layout content in the page, starting from the breakToken breakToken = await page.layout(content, breakToken, this.maxChars); + if (breakToken) { + let newToken = breakToken.toJSON(true); + if (tokens.lastIndexOf(newToken) > -1) { + // loop + let err = new OverflowContentError("Layout repeated", [breakToken.node]); + console.error("Layout repeated at: ", breakToken.node); + return err; + } else { + tokens.push(newToken); + } + } + await this.hooks.afterPageLayout.trigger(page.element, page, breakToken, this); + await this.hooks.finalizePage.trigger(page.element, page, undefined, this); this.emit("renderedPage", page); this.recoredCharLength(page.wrapper.textContent.length); @@ -2803,7 +3091,7 @@ addPage(blank) { let lastPage = this.pages[this.pages.length - 1]; // Create a new page from the template - let page = new Page(this.pagesArea, this.pageTemplate, blank, this.hooks); + let page = new Page(this.pagesArea, this.pageTemplate, blank, this.hooks, this.settings); this.pages.push(page); @@ -2901,7 +3189,31 @@ } */ + async clonePage(originalPage) { + let lastPage = this.pages[this.pages.length - 1]; + let page = new Page(this.pagesArea, this.pageTemplate, false, this.hooks); + + this.pages.push(page); + + // Create the pages + page.create(undefined, lastPage && lastPage.element); + + page.index(this.total); + + await this.hooks.beforePageLayout.trigger(page, undefined, undefined, this); + this.emit("page", page); + + for (const className of originalPage.element.classList) { + if (className !== "pagedjs_left_page" && className !== "pagedjs_right_page") { + page.element.classList.add(className); + } + } + + await this.hooks.afterPageLayout.trigger(page.element, page, undefined, this); + await this.hooks.finalizePage.trigger(page.element, page, undefined, this); + this.emit("renderedPage", page); + } loadFonts() { let fontPromises = []; @@ -2928,7 +3240,11 @@ } - eventEmitter(Chunker.prototype); + EventEmitter(Chunker.prototype); + + var syntax = {exports: {}}; + + var create$5 = {}; // // list @@ -2987,16 +3303,16 @@ } var cursors = null; - var List = function() { + var List$6 = function() { this.cursor = null; this.head = null; this.tail = null; }; - List.createItem = createItem; - List.prototype.createItem = createItem; + List$6.createItem = createItem; + List$6.prototype.createItem = createItem; - List.prototype.updateCursors = function(prevOld, prevNew, nextOld, nextNew) { + List$6.prototype.updateCursors = function(prevOld, prevNew, nextOld, nextNew) { var cursor = this.cursor; while (cursor !== null) { @@ -3012,7 +3328,7 @@ } }; - List.prototype.getSize = function() { + List$6.prototype.getSize = function() { var size = 0; var cursor = this.head; @@ -3024,7 +3340,7 @@ return size; }; - List.prototype.fromArray = function(array) { + List$6.prototype.fromArray = function(array) { var cursor = null; this.head = null; @@ -3047,7 +3363,7 @@ return this; }; - List.prototype.toArray = function() { + List$6.prototype.toArray = function() { var cursor = this.head; var result = []; @@ -3059,21 +3375,21 @@ return result; }; - List.prototype.toJSON = List.prototype.toArray; + List$6.prototype.toJSON = List$6.prototype.toArray; - List.prototype.isEmpty = function() { + List$6.prototype.isEmpty = function() { return this.head === null; }; - List.prototype.first = function() { + List$6.prototype.first = function() { return this.head && this.head.data; }; - List.prototype.last = function() { + List$6.prototype.last = function() { return this.tail && this.tail.data; }; - List.prototype.each = function(fn, context) { + List$6.prototype.each = function(fn, context) { var item; if (context === undefined) { @@ -3094,9 +3410,9 @@ releaseCursor(this); }; - List.prototype.forEach = List.prototype.each; + List$6.prototype.forEach = List$6.prototype.each; - List.prototype.eachRight = function(fn, context) { + List$6.prototype.eachRight = function(fn, context) { var item; if (context === undefined) { @@ -3117,9 +3433,57 @@ releaseCursor(this); }; - List.prototype.forEachRight = List.prototype.eachRight; + List$6.prototype.forEachRight = List$6.prototype.eachRight; - List.prototype.nextUntil = function(start, fn, context) { + List$6.prototype.reduce = function(fn, initialValue, context) { + var item; + + if (context === undefined) { + context = this; + } + + // push cursor + var cursor = allocateCursor(this, null, this.head); + var acc = initialValue; + + while (cursor.next !== null) { + item = cursor.next; + cursor.next = item.next; + + acc = fn.call(context, acc, item.data, item, this); + } + + // pop cursor + releaseCursor(this); + + return acc; + }; + + List$6.prototype.reduceRight = function(fn, initialValue, context) { + var item; + + if (context === undefined) { + context = this; + } + + // push cursor + var cursor = allocateCursor(this, this.tail, null); + var acc = initialValue; + + while (cursor.prev !== null) { + item = cursor.prev; + cursor.prev = item.prev; + + acc = fn.call(context, acc, item.data, item, this); + } + + // pop cursor + releaseCursor(this); + + return acc; + }; + + List$6.prototype.nextUntil = function(start, fn, context) { if (start === null) { return; } @@ -3146,7 +3510,7 @@ releaseCursor(this); }; - List.prototype.prevUntil = function(start, fn, context) { + List$6.prototype.prevUntil = function(start, fn, context) { if (start === null) { return; } @@ -3173,7 +3537,7 @@ releaseCursor(this); }; - List.prototype.some = function(fn, context) { + List$6.prototype.some = function(fn, context) { var cursor = this.head; if (context === undefined) { @@ -3191,8 +3555,8 @@ return false; }; - List.prototype.map = function(fn, context) { - var result = new List(); + List$6.prototype.map = function(fn, context) { + var result = new List$6(); var cursor = this.head; if (context === undefined) { @@ -3207,8 +3571,8 @@ return result; }; - List.prototype.filter = function(fn, context) { - var result = new List(); + List$6.prototype.filter = function(fn, context) { + var result = new List$6(); var cursor = this.head; if (context === undefined) { @@ -3225,13 +3589,13 @@ return result; }; - List.prototype.clear = function() { + List$6.prototype.clear = function() { this.head = null; this.tail = null; }; - List.prototype.copy = function() { - var result = new List(); + List$6.prototype.copy = function() { + var result = new List$6(); var cursor = this.head; while (cursor !== null) { @@ -3242,7 +3606,7 @@ return result; }; - List.prototype.prepend = function(item) { + List$6.prototype.prepend = function(item) { // head // ^ // item @@ -3267,19 +3631,19 @@ return this; }; - List.prototype.prependData = function(data) { + List$6.prototype.prependData = function(data) { return this.prepend(createItem(data)); }; - List.prototype.append = function(item) { + List$6.prototype.append = function(item) { return this.insert(item); }; - List.prototype.appendData = function(data) { + List$6.prototype.appendData = function(data) { return this.insert(createItem(data)); }; - List.prototype.insert = function(item, before) { + List$6.prototype.insert = function(item, before) { if (before !== undefined && before !== null) { // prev before // ^ @@ -3334,11 +3698,11 @@ return this; }; - List.prototype.insertData = function(data, before) { + List$6.prototype.insertData = function(data, before) { return this.insert(createItem(data), before); }; - List.prototype.remove = function(item) { + List$6.prototype.remove = function(item) { // item // ^ // prev next @@ -3370,35 +3734,35 @@ return item; }; - List.prototype.push = function(data) { + List$6.prototype.push = function(data) { this.insert(createItem(data)); }; - List.prototype.pop = function() { + List$6.prototype.pop = function() { if (this.tail !== null) { return this.remove(this.tail); } }; - List.prototype.unshift = function(data) { + List$6.prototype.unshift = function(data) { this.prepend(createItem(data)); }; - List.prototype.shift = function() { + List$6.prototype.shift = function() { if (this.head !== null) { return this.remove(this.head); } }; - List.prototype.prependList = function(list) { + List$6.prototype.prependList = function(list) { return this.insertList(list, this.head); }; - List.prototype.appendList = function(list) { + List$6.prototype.appendList = function(list) { return this.insertList(list); }; - List.prototype.insertList = function(list, before) { + List$6.prototype.insertList = function(list, before) { // ignore empty lists if (list.head === null) { return this; @@ -3447,7 +3811,7 @@ return this; }; - List.prototype.replace = function(oldItem, newItemOrList) { + List$6.prototype.replace = function(oldItem, newItemOrList) { if ('head' in newItemOrList) { this.insertList(newItemOrList, oldItem); } else { @@ -3457,9 +3821,9 @@ this.remove(oldItem); }; - var List_1 = List; + var List_1 = List$6; - var createCustomError = function createCustomError(name, message) { + var createCustomError$3 = function createCustomError(name, message) { // use Object.create(), because some VMs prevent setting line/column otherwise // (iOS Safari 10 even throws an exception) var error = Object.create(SyntaxError.prototype); @@ -3477,6 +3841,7 @@ return error; }; + var createCustomError$2 = createCustomError$3; var MAX_LINE_LENGTH = 100; var OFFSET_CORRECTION = 60; var TAB_REPLACEMENT = ' '; @@ -3527,8 +3892,8 @@ ].filter(Boolean).join('\n'); } - var SyntaxError$1 = function(message, source, offset, line, column) { - var error = createCustomError('SyntaxError', message); + var SyntaxError$4 = function(message, source, offset, line, column) { + var error = createCustomError$2('SyntaxError', message); error.source = source; error.offset = offset; @@ -3557,11 +3922,11 @@ return error; }; - var _SyntaxError = SyntaxError$1; + var _SyntaxError$1 = SyntaxError$4; // CSS Syntax Module Level 3 // https://www.w3.org/TR/css-syntax-3/ - var TYPE = { + var TYPE$H = { EOF: 0, // Ident: 1, // Function: 2, // @@ -3590,33 +3955,33 @@ Comment: 25 }; - var NAME = Object.keys(TYPE).reduce(function(result, key) { - result[TYPE[key]] = key; + var NAME$3 = Object.keys(TYPE$H).reduce(function(result, key) { + result[TYPE$H[key]] = key; return result; }, {}); var _const = { - TYPE: TYPE, - NAME: NAME + TYPE: TYPE$H, + NAME: NAME$3 }; - var EOF = 0; + var EOF$1 = 0; // https://drafts.csswg.org/css-syntax-3/ // § 4.2. Definitions // digit // A code point between U+0030 DIGIT ZERO (0) and U+0039 DIGIT NINE (9). - function isDigit(code) { + function isDigit$5(code) { return code >= 0x0030 && code <= 0x0039; } // hex digit // A digit, or a code point between U+0041 LATIN CAPITAL LETTER A (A) and U+0046 LATIN CAPITAL LETTER F (F), // or a code point between U+0061 LATIN SMALL LETTER A (a) and U+0066 LATIN SMALL LETTER F (f). - function isHexDigit(code) { + function isHexDigit$4(code) { return ( - isDigit(code) || // 0 .. 9 + isDigit$5(code) || // 0 .. 9 (code >= 0x0041 && code <= 0x0046) || // A .. F (code >= 0x0061 && code <= 0x0066) // a .. f ); @@ -3624,7 +3989,7 @@ // uppercase letter // A code point between U+0041 LATIN CAPITAL LETTER A (A) and U+005A LATIN CAPITAL LETTER Z (Z). - function isUppercaseLetter(code) { + function isUppercaseLetter$1(code) { return code >= 0x0041 && code <= 0x005A; } @@ -3637,7 +4002,7 @@ // letter // An uppercase letter or a lowercase letter. function isLetter(code) { - return isUppercaseLetter(code) || isLowercaseLetter(code); + return isUppercaseLetter$1(code) || isLowercaseLetter(code); } // non-ASCII code point @@ -3654,8 +4019,8 @@ // name code point // A name-start code point, a digit, or U+002D HYPHEN-MINUS (-). - function isName(code) { - return isNameStart(code) || isDigit(code) || code === 0x002D; + function isName$2(code) { + return isNameStart(code) || isDigit$5(code) || code === 0x002D; } // non-printable code point @@ -3674,25 +4039,25 @@ // U+000A LINE FEED. Note that U+000D CARRIAGE RETURN and U+000C FORM FEED are not included in this definition, // as they are converted to U+000A LINE FEED during preprocessing. // TODO: we doesn't do a preprocessing, so check a code point for U+000D CARRIAGE RETURN and U+000C FORM FEED - function isNewline(code) { + function isNewline$1(code) { return code === 0x000A || code === 0x000D || code === 0x000C; } // whitespace // A newline, U+0009 CHARACTER TABULATION, or U+0020 SPACE. - function isWhiteSpace(code) { - return isNewline(code) || code === 0x0020 || code === 0x0009; + function isWhiteSpace$2(code) { + return isNewline$1(code) || code === 0x0020 || code === 0x0009; } // § 4.3.8. Check if two code points are a valid escape - function isValidEscape(first, second) { + function isValidEscape$2(first, second) { // If the first code point is not U+005C REVERSE SOLIDUS (\), return false. if (first !== 0x005C) { return false; } // Otherwise, if the second code point is a newline or EOF, return false. - if (isNewline(second) || second === EOF) { + if (isNewline$1(second) || second === EOF$1) { return false; } @@ -3701,7 +4066,7 @@ } // § 4.3.9. Check if three code points would start an identifier - function isIdentifierStart(first, second, third) { + function isIdentifierStart$2(first, second, third) { // Look at the first code point: // U+002D HYPHEN-MINUS @@ -3711,7 +4076,7 @@ return ( isNameStart(second) || second === 0x002D || - isValidEscape(second, third) + isValidEscape$2(second, third) ); } @@ -3724,7 +4089,7 @@ // U+005C REVERSE SOLIDUS (\) if (first === 0x005C) { // If the first and second code points are a valid escape, return true. Otherwise, return false. - return isValidEscape(first, second); + return isValidEscape$2(first, second); } // anything else @@ -3733,31 +4098,31 @@ } // § 4.3.10. Check if three code points would start a number - function isNumberStart(first, second, third) { + function isNumberStart$1(first, second, third) { // Look at the first code point: // U+002B PLUS SIGN (+) // U+002D HYPHEN-MINUS (-) if (first === 0x002B || first === 0x002D) { // If the second code point is a digit, return true. - if (isDigit(second)) { + if (isDigit$5(second)) { return 2; } // Otherwise, if the second code point is a U+002E FULL STOP (.) // and the third code point is a digit, return true. // Otherwise, return false. - return second === 0x002E && isDigit(third) ? 3 : 0; + return second === 0x002E && isDigit$5(third) ? 3 : 0; } // U+002E FULL STOP (.) if (first === 0x002E) { // If the second code point is a digit, return true. Otherwise, return false. - return isDigit(second) ? 2 : 0; + return isDigit$5(second) ? 2 : 0; } // digit - if (isDigit(first)) { + if (isDigit$5(first)) { // Return true. return 1; } @@ -3772,7 +4137,7 @@ // // detect BOM (https://en.wikipedia.org/wiki/Byte_order_mark) - function isBOM(code) { + function isBOM$2(code) { // UTF-16BE if (code === 0xFEFF) { return 1; @@ -3797,70 +4162,71 @@ // > A name-start code point, a digit, or U+002D HYPHEN-MINUS (-) // That means only ASCII code points has a special meaning and we define a maps for 0..127 codes only var CATEGORY = new Array(0x80); - charCodeCategory.Eof = 0x80; - charCodeCategory.WhiteSpace = 0x82; - charCodeCategory.Digit = 0x83; - charCodeCategory.NameStart = 0x84; - charCodeCategory.NonPrintable = 0x85; + charCodeCategory$1.Eof = 0x80; + charCodeCategory$1.WhiteSpace = 0x82; + charCodeCategory$1.Digit = 0x83; + charCodeCategory$1.NameStart = 0x84; + charCodeCategory$1.NonPrintable = 0x85; for (var i = 0; i < CATEGORY.length; i++) { switch (true) { - case isWhiteSpace(i): - CATEGORY[i] = charCodeCategory.WhiteSpace; + case isWhiteSpace$2(i): + CATEGORY[i] = charCodeCategory$1.WhiteSpace; break; - case isDigit(i): - CATEGORY[i] = charCodeCategory.Digit; + case isDigit$5(i): + CATEGORY[i] = charCodeCategory$1.Digit; break; case isNameStart(i): - CATEGORY[i] = charCodeCategory.NameStart; + CATEGORY[i] = charCodeCategory$1.NameStart; break; case isNonPrintable(i): - CATEGORY[i] = charCodeCategory.NonPrintable; + CATEGORY[i] = charCodeCategory$1.NonPrintable; break; default: - CATEGORY[i] = i || charCodeCategory.Eof; + CATEGORY[i] = i || charCodeCategory$1.Eof; } } - function charCodeCategory(code) { - return code < 0x80 ? CATEGORY[code] : charCodeCategory.NameStart; + function charCodeCategory$1(code) { + return code < 0x80 ? CATEGORY[code] : charCodeCategory$1.NameStart; } - var charCodeDefinitions = { - isDigit: isDigit, - isHexDigit: isHexDigit, - isUppercaseLetter: isUppercaseLetter, + var charCodeDefinitions$1 = { + isDigit: isDigit$5, + isHexDigit: isHexDigit$4, + isUppercaseLetter: isUppercaseLetter$1, isLowercaseLetter: isLowercaseLetter, isLetter: isLetter, isNonAscii: isNonAscii, isNameStart: isNameStart, - isName: isName, + isName: isName$2, isNonPrintable: isNonPrintable, - isNewline: isNewline, - isWhiteSpace: isWhiteSpace, - isValidEscape: isValidEscape, - isIdentifierStart: isIdentifierStart, - isNumberStart: isNumberStart, + isNewline: isNewline$1, + isWhiteSpace: isWhiteSpace$2, + isValidEscape: isValidEscape$2, + isIdentifierStart: isIdentifierStart$2, + isNumberStart: isNumberStart$1, - isBOM: isBOM, - charCodeCategory: charCodeCategory + isBOM: isBOM$2, + charCodeCategory: charCodeCategory$1 }; - var isDigit$1 = charCodeDefinitions.isDigit; - var isHexDigit$1 = charCodeDefinitions.isHexDigit; - var isUppercaseLetter$1 = charCodeDefinitions.isUppercaseLetter; - var isName$1 = charCodeDefinitions.isName; - var isWhiteSpace$1 = charCodeDefinitions.isWhiteSpace; - var isValidEscape$1 = charCodeDefinitions.isValidEscape; + var charCodeDef = charCodeDefinitions$1; + var isDigit$4 = charCodeDef.isDigit; + var isHexDigit$3 = charCodeDef.isHexDigit; + var isUppercaseLetter = charCodeDef.isUppercaseLetter; + var isName$1 = charCodeDef.isName; + var isWhiteSpace$1 = charCodeDef.isWhiteSpace; + var isValidEscape$1 = charCodeDef.isValidEscape; function getCharCode(source, offset) { return offset < source.length ? source.charCodeAt(offset) : 0; } - function getNewlineLength(source, offset, code) { + function getNewlineLength$1(source, offset, code) { if (code === 13 /* \r */ && getCharCode(source, offset + 1) === 10 /* \n */) { return 2; } @@ -3868,18 +4234,18 @@ return 1; } - function cmpChar(testStr, offset, referenceCode) { + function cmpChar$5(testStr, offset, referenceCode) { var code = testStr.charCodeAt(offset); // code.toLowerCase() for A..Z - if (isUppercaseLetter$1(code)) { + if (isUppercaseLetter(code)) { code = code | 32; } return code === referenceCode; } - function cmpStr(testStr, start, end, referenceStr) { + function cmpStr$6(testStr, start, end, referenceStr) { if (end - start !== referenceStr.length) { return false; } @@ -3893,7 +4259,7 @@ var referenceCode = referenceStr.charCodeAt(i - start); // testCode.toLowerCase() for A..Z - if (isUppercaseLetter$1(testCode)) { + if (isUppercaseLetter(testCode)) { testCode = testCode | 32; } @@ -3905,7 +4271,7 @@ return true; } - function findWhiteSpaceStart(source, offset) { + function findWhiteSpaceStart$1(source, offset) { for (; offset >= 0; offset--) { if (!isWhiteSpace$1(source.charCodeAt(offset))) { break; @@ -3915,7 +4281,7 @@ return offset + 1; } - function findWhiteSpaceEnd(source, offset) { + function findWhiteSpaceEnd$1(source, offset) { for (; offset < source.length; offset++) { if (!isWhiteSpace$1(source.charCodeAt(offset))) { break; @@ -3927,7 +4293,7 @@ function findDecimalNumberEnd(source, offset) { for (; offset < source.length; offset++) { - if (!isDigit$1(source.charCodeAt(offset))) { + if (!isDigit$4(source.charCodeAt(offset))) { break; } } @@ -3936,17 +4302,17 @@ } // § 4.3.7. Consume an escaped code point - function consumeEscaped(source, offset) { + function consumeEscaped$1(source, offset) { // It assumes that the U+005C REVERSE SOLIDUS (\) has already been consumed and // that the next input code point has already been verified to be part of a valid escape. offset += 2; // hex digit - if (isHexDigit$1(getCharCode(source, offset - 1))) { + if (isHexDigit$3(getCharCode(source, offset - 1))) { // Consume as many hex digits as possible, but no more than 5. // Note that this means 1-6 hex digits have been consumed in total. for (var maxOffset = Math.min(source.length, offset + 5); offset < maxOffset; offset++) { - if (!isHexDigit$1(getCharCode(source, offset))) { + if (!isHexDigit$3(getCharCode(source, offset))) { break; } } @@ -3954,7 +4320,7 @@ // If the next input code point is whitespace, consume it as well. var code = getCharCode(source, offset); if (isWhiteSpace$1(code)) { - offset += getNewlineLength(source, offset, code); + offset += getNewlineLength$1(source, offset, code); } } @@ -3965,7 +4331,7 @@ // Note: This algorithm does not do the verification of the first few code points that are necessary // to ensure the returned code points would constitute an . If that is the intended use, // ensure that the stream starts with an identifier before calling this algorithm. - function consumeName(source, offset) { + function consumeName$1(source, offset) { // Let result initially be an empty string. // Repeatedly consume the next input code point from the stream: for (; offset < source.length; offset++) { @@ -3980,7 +4346,7 @@ // the stream starts with a valid escape if (isValidEscape$1(code, getCharCode(source, offset + 1))) { // Consume an escaped code point. Append the returned code point to result. - offset = consumeEscaped(source, offset) - 1; + offset = consumeEscaped$1(source, offset) - 1; continue; } @@ -3993,7 +4359,7 @@ } // §4.3.12. Consume a number - function consumeNumber(source, offset) { + function consumeNumber$5(source, offset) { var code = source.charCodeAt(offset); // 2. If the next input code point is U+002B PLUS SIGN (+) or U+002D HYPHEN-MINUS (-), @@ -4003,13 +4369,13 @@ } // 3. While the next input code point is a digit, consume it and append it to repr. - if (isDigit$1(code)) { + if (isDigit$4(code)) { offset = findDecimalNumberEnd(source, offset + 1); code = source.charCodeAt(offset); } // 4. If the next 2 input code points are U+002E FULL STOP (.) followed by a digit, then: - if (code === 0x002E && isDigit$1(source.charCodeAt(offset + 1))) { + if (code === 0x002E && isDigit$4(source.charCodeAt(offset + 1))) { // 4.1 Consume them. // 4.2 Append them to repr. code = source.charCodeAt(offset += 2); @@ -4024,7 +4390,7 @@ // 5. If the next 2 or 3 input code points are U+0045 LATIN CAPITAL LETTER E (E) // or U+0065 LATIN SMALL LETTER E (e), ... , followed by a digit, then: - if (cmpChar(source, offset, 101 /* e */)) { + if (cmpChar$5(source, offset, 101 /* e */)) { var sign = 0; code = source.charCodeAt(offset + 1); @@ -4035,7 +4401,7 @@ } // ... followed by a digit - if (isDigit$1(code)) { + if (isDigit$4(code)) { // 5.1 Consume them. // 5.2 Append them to repr. @@ -4053,7 +4419,7 @@ // § 4.3.14. Consume the remnants of a bad url // ... its sole use is to consume enough of the input stream to reach a recovery point // where normal tokenizing can resume. - function consumeBadUrlRemnants(source, offset) { + function consumeBadUrlRemnants$1(source, offset) { // Repeatedly consume the next input code point from the stream: for (; offset < source.length; offset++) { var code = source.charCodeAt(offset); @@ -4071,48 +4437,49 @@ // Note: This allows an escaped right parenthesis ("\)") to be encountered // without ending the . This is otherwise identical to // the "anything else" clause. - offset = consumeEscaped(source, offset); + offset = consumeEscaped$1(source, offset); } } return offset; } - var utils = { - consumeEscaped: consumeEscaped, - consumeName: consumeName, - consumeNumber: consumeNumber, - consumeBadUrlRemnants: consumeBadUrlRemnants, + var utils$2 = { + consumeEscaped: consumeEscaped$1, + consumeName: consumeName$1, + consumeNumber: consumeNumber$5, + consumeBadUrlRemnants: consumeBadUrlRemnants$1, - cmpChar: cmpChar, - cmpStr: cmpStr, + cmpChar: cmpChar$5, + cmpStr: cmpStr$6, - getNewlineLength: getNewlineLength, - findWhiteSpaceStart: findWhiteSpaceStart, - findWhiteSpaceEnd: findWhiteSpaceEnd + getNewlineLength: getNewlineLength$1, + findWhiteSpaceStart: findWhiteSpaceStart$1, + findWhiteSpaceEnd: findWhiteSpaceEnd$1 }; - var TYPE$1 = _const.TYPE; - var NAME$1 = _const.NAME; + var constants$2 = _const; + var TYPE$G = constants$2.TYPE; + var NAME$2 = constants$2.NAME; + var utils$1 = utils$2; + var cmpStr$5 = utils$1.cmpStr; - var cmpStr$1 = utils.cmpStr; + var EOF = TYPE$G.EOF; + var WHITESPACE$c = TYPE$G.WhiteSpace; + var COMMENT$a = TYPE$G.Comment; - var EOF$1 = TYPE$1.EOF; - var WHITESPACE = TYPE$1.WhiteSpace; - var COMMENT = TYPE$1.Comment; + var OFFSET_MASK$1 = 0x00FFFFFF; + var TYPE_SHIFT$1 = 24; - var OFFSET_MASK = 0x00FFFFFF; - var TYPE_SHIFT = 24; - - var TokenStream = function() { + var TokenStream$4 = function() { this.offsetAndType = null; this.balance = null; this.reset(); }; - TokenStream.prototype = { + TokenStream$4.prototype = { reset: function() { this.eof = false; this.tokenIndex = -1; @@ -4125,16 +4492,16 @@ offset += this.tokenIndex; if (offset < this.tokenCount) { - return this.offsetAndType[offset] >> TYPE_SHIFT; + return this.offsetAndType[offset] >> TYPE_SHIFT$1; } - return EOF$1; + return EOF; }, lookupOffset: function(offset) { offset += this.tokenIndex; if (offset < this.tokenCount) { - return this.offsetAndType[offset - 1] & OFFSET_MASK; + return this.offsetAndType[offset - 1] & OFFSET_MASK$1; } return this.source.length; @@ -4143,10 +4510,10 @@ offset += this.tokenIndex; if (offset < this.tokenCount) { - return cmpStr$1( + return cmpStr$5( this.source, - this.offsetAndType[offset - 1] & OFFSET_MASK, - this.offsetAndType[offset] & OFFSET_MASK, + this.offsetAndType[offset - 1] & OFFSET_MASK$1, + this.offsetAndType[offset] & OFFSET_MASK$1, referenceStr ); } @@ -4160,8 +4527,8 @@ if (tokenIndex > 0) { return tokenIndex < this.tokenCount - ? this.offsetAndType[tokenIndex - 1] & OFFSET_MASK - : this.offsetAndType[this.tokenCount] & OFFSET_MASK; + ? this.offsetAndType[tokenIndex - 1] & OFFSET_MASK$1 + : this.offsetAndType[this.tokenCount] & OFFSET_MASK$1; } return this.firstCharOffset; @@ -4171,7 +4538,7 @@ getRawLength: function(startToken, mode) { var cursor = startToken; var balanceEnd; - var offset = this.offsetAndType[Math.max(cursor - 1, 0)] & OFFSET_MASK; + var offset = this.offsetAndType[Math.max(cursor - 1, 0)] & OFFSET_MASK$1; var type; loop: @@ -4183,7 +4550,7 @@ break loop; } - type = this.offsetAndType[cursor] >> TYPE_SHIFT; + type = this.offsetAndType[cursor] >> TYPE_SHIFT$1; // check token is stop type switch (mode(type, this.source, offset)) { @@ -4195,12 +4562,12 @@ break loop; default: - offset = this.offsetAndType[cursor] & OFFSET_MASK; - // fast forward to the end of balanced block if (this.balance[balanceEnd] === cursor) { cursor = balanceEnd; } + + offset = this.offsetAndType[cursor] & OFFSET_MASK$1; } } @@ -4212,13 +4579,13 @@ isDelim: function(code, offset) { if (offset) { return ( - this.lookupType(offset) === TYPE$1.Delim && + this.lookupType(offset) === TYPE$G.Delim && this.source.charCodeAt(this.lookupOffset(offset)) === code ); } return ( - this.tokenType === TYPE$1.Delim && + this.tokenType === TYPE$G.Delim && this.source.charCodeAt(this.tokenStart) === code ); }, @@ -4235,7 +4602,7 @@ skipWS: function() { for (var i = this.tokenIndex, skipTokenCount = 0; i < this.tokenCount; i++, skipTokenCount++) { - if ((this.offsetAndType[i] >> TYPE_SHIFT) !== WHITESPACE) { + if ((this.offsetAndType[i] >> TYPE_SHIFT$1) !== WHITESPACE$c) { break; } } @@ -4245,7 +4612,7 @@ } }, skipSC: function() { - while (this.tokenType === WHITESPACE || this.tokenType === COMMENT) { + while (this.tokenType === WHITESPACE$c || this.tokenType === COMMENT$a) { this.next(); } }, @@ -4254,10 +4621,10 @@ if (next < this.tokenCount) { this.tokenIndex = next; - this.tokenStart = this.offsetAndType[next - 1] & OFFSET_MASK; + this.tokenStart = this.offsetAndType[next - 1] & OFFSET_MASK$1; next = this.offsetAndType[next]; - this.tokenType = next >> TYPE_SHIFT; - this.tokenEnd = next & OFFSET_MASK; + this.tokenType = next >> TYPE_SHIFT$1; + this.tokenEnd = next & OFFSET_MASK$1; } else { this.tokenIndex = this.tokenCount; this.next(); @@ -4270,38 +4637,48 @@ this.tokenIndex = next; this.tokenStart = this.tokenEnd; next = this.offsetAndType[next]; - this.tokenType = next >> TYPE_SHIFT; - this.tokenEnd = next & OFFSET_MASK; + this.tokenType = next >> TYPE_SHIFT$1; + this.tokenEnd = next & OFFSET_MASK$1; } else { this.tokenIndex = this.tokenCount; this.eof = true; - this.tokenType = EOF$1; + this.tokenType = EOF; this.tokenStart = this.tokenEnd = this.source.length; } }, - dump: function() { - var offset = this.firstCharOffset; - - return Array.prototype.slice.call(this.offsetAndType, 0, this.tokenCount).map(function(item, idx) { + forEachToken(fn) { + for (var i = 0, offset = this.firstCharOffset; i < this.tokenCount; i++) { var start = offset; - var end = item & OFFSET_MASK; + var item = this.offsetAndType[i]; + var end = item & OFFSET_MASK$1; + var type = item >> TYPE_SHIFT$1; offset = end; - return { - idx: idx, - type: NAME$1[item >> TYPE_SHIFT], + fn(type, start, end, i); + } + }, + + dump() { + var tokens = new Array(this.tokenCount); + + this.forEachToken((type, start, end, index) => { + tokens[index] = { + idx: index, + type: NAME$2[type], chunk: this.source.substring(start, end), - balance: this.balance[idx] + balance: this.balance[index] }; - }, this); + }); + + return tokens; } }; - var TokenStream_1 = TokenStream; + var TokenStream_1 = TokenStream$4; - function noop$1(value) { + function noop$3(value) { return value; } @@ -4350,7 +4727,7 @@ function generateSequence(node, decorate, forceBraces, compact) { var combinator = node.combinator === ' ' || compact ? node.combinator : ' ' + node.combinator + ' '; var result = node.terms.map(function(term) { - return generate(term, decorate, forceBraces, compact); + return generate$2(term, decorate, forceBraces, compact); }).join(combinator); if (node.explicit || forceBraces) { @@ -4360,7 +4737,7 @@ return result; } - function generate(node, decorate, forceBraces, compact) { + function generate$2(node, decorate, forceBraces, compact) { var result; switch (node.type) { @@ -4373,7 +4750,7 @@ case 'Multiplier': // return since node is a composition return ( - generate(node.term, decorate, forceBraces, compact) + + generate$2(node.term, decorate, forceBraces, compact) + decorate(generateMultiplier(node), node) ); @@ -4414,7 +4791,7 @@ } var generate_1 = function(node, options) { - var decorate = noop$1; + var decorate = noop$3; var forceBraces = false; var compact = false; @@ -4428,23 +4805,34 @@ } } - return generate(node, decorate, forceBraces, compact); + return generate$2(node, decorate, forceBraces, compact); }; - function fromMatchResult(matchResult) { - var tokens = matchResult.tokens; - var longestMatch = matchResult.longestMatch; - var node = longestMatch < tokens.length ? tokens[longestMatch].node : null; - var mismatchOffset = -1; - var entries = 0; - var css = ''; + const createCustomError$1 = createCustomError$3; + const generate$1 = generate_1; + 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; - for (var i = 0; i < tokens.length; i++) { if (i === longestMatch) { + mismatchLength = token.length; mismatchOffset = css.length; } - if (node !== null && tokens[i].node === node) { + if (badNode !== null && tokens[i].node === badNode) { if (i <= longestMatch) { entries++; } else { @@ -4452,33 +4840,58 @@ } } - css += tokens[i].value; + css += token; + } + + if (longestMatch === tokens.length || entries > 1) { // last + 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 { - node: node, - css: css, - mismatchOffset: mismatchOffset === -1 ? css.length : mismatchOffset, - last: node === null || entries > 1 + css, + mismatchOffset, + mismatchLength, + start, + end }; } - function getLocation(node, point) { - var loc = node && node.loc && node.loc[point]; + function fromLoc(node, point) { + const value = node && node.loc && node.loc[point]; - if (loc) { - return { - offset: loc.offset, - line: loc.line, - column: loc.column - }; + if (value) { + return 'line' in value ? buildLoc(value) : value; } return null; } - var SyntaxReferenceError = function(type, referenceName) { - var error = createCustomError( + function buildLoc({ offset, line, column }, extra) { + const loc = { + offset, + line, + 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$1( 'SyntaxReferenceError', type + (referenceName ? ' `' + referenceName + '`' : '') ); @@ -4488,51 +4901,52 @@ return error; }; - var MatchError = function(message, syntax, node, matchResult) { - var error = createCustomError('SyntaxMatchError', message); - var details = fromMatchResult(matchResult); - var mismatchOffset = details.mismatchOffset || 0; - var badNode = details.node || node; - var end = getLocation(badNode, 'end'); - var start = details.last ? end : getLocation(badNode, 'start'); - var css = details.css; + const SyntaxMatchError$1 = function(message, syntax, node, matchResult) { + const error = createCustomError$1('SyntaxMatchError', message); + const { + css, + mismatchOffset, + mismatchLength, + start, + end + } = locateMismatch(matchResult, node); error.rawMessage = message; - error.syntax = syntax ? generate_1(syntax) : ''; + error.syntax = syntax ? generate$1(syntax) : ''; error.css = css; error.mismatchOffset = mismatchOffset; - error.loc = { - source: (badNode && badNode.loc && badNode.loc.source) || '', - start: start, - end: end - }; - error.line = start ? start.line : undefined; - error.column = start ? start.column : undefined; - error.offset = start ? start.offset : undefined; + error.mismatchLength = mismatchLength; error.message = message + '\n' + ' syntax: ' + error.syntax + '\n' + - ' value: ' + (error.css || '') + '\n' + + ' value: ' + (css || '') + '\n' + ' --------' + new Array(error.mismatchOffset + 1).join('-') + '^'; + Object.assign(error, start); + error.loc = { + source: (node && node.loc && node.loc.source) || '', + start, + end + }; + return error; }; var error = { - SyntaxReferenceError: SyntaxReferenceError, - MatchError: MatchError + SyntaxReferenceError: SyntaxReferenceError$1, + SyntaxMatchError: SyntaxMatchError$1 }; - var hasOwnProperty = Object.prototype.hasOwnProperty; - var keywords = Object.create(null); - var properties = Object.create(null); - var HYPHENMINUS = 45; // '-'.charCodeAt() + var hasOwnProperty$7 = Object.prototype.hasOwnProperty; + var keywords$1 = Object.create(null); + var properties$1 = Object.create(null); + var HYPHENMINUS$5 = 45; // '-'.charCodeAt() - function isCustomProperty(str, offset) { + function isCustomProperty$1(str, offset) { offset = offset || 0; return str.length - offset >= 2 && - str.charCodeAt(offset) === HYPHENMINUS && - str.charCodeAt(offset + 1) === HYPHENMINUS; + str.charCodeAt(offset) === HYPHENMINUS$5 && + str.charCodeAt(offset + 1) === HYPHENMINUS$5; } function getVendorPrefix(str, offset) { @@ -4541,8 +4955,8 @@ // verdor prefix should be at least 3 chars length if (str.length - offset >= 3) { // vendor prefix starts with hyper minus following non-hyper minus - if (str.charCodeAt(offset) === HYPHENMINUS && - str.charCodeAt(offset + 1) !== HYPHENMINUS) { + if (str.charCodeAt(offset) === HYPHENMINUS$5 && + str.charCodeAt(offset + 1) !== HYPHENMINUS$5) { // vendor prefix should contain a hyper minus at the ending var secondDashIndex = str.indexOf('-', offset + 2); @@ -4556,20 +4970,20 @@ } function getKeywordDescriptor(keyword) { - if (hasOwnProperty.call(keywords, keyword)) { - return keywords[keyword]; + if (hasOwnProperty$7.call(keywords$1, keyword)) { + return keywords$1[keyword]; } var name = keyword.toLowerCase(); - if (hasOwnProperty.call(keywords, name)) { - return keywords[keyword] = keywords[name]; + if (hasOwnProperty$7.call(keywords$1, name)) { + return keywords$1[keyword] = keywords$1[name]; } - var custom = isCustomProperty(name, 0); + var custom = isCustomProperty$1(name, 0); var vendor = !custom ? getVendorPrefix(name, 0) : ''; - return keywords[keyword] = Object.freeze({ + return keywords$1[keyword] = Object.freeze({ basename: name.substr(vendor.length), name: name, vendor: vendor, @@ -4579,8 +4993,8 @@ } function getPropertyDescriptor(property) { - if (hasOwnProperty.call(properties, property)) { - return properties[property]; + if (hasOwnProperty$7.call(properties$1, property)) { + return properties$1[property]; } var name = property; @@ -4597,20 +5011,20 @@ hack = ''; } - var custom = isCustomProperty(name, hack.length); + var custom = isCustomProperty$1(name, hack.length); // re-use result when possible (the same as for lower case) if (!custom) { name = name.toLowerCase(); - if (hasOwnProperty.call(properties, name)) { - return properties[property] = properties[name]; + if (hasOwnProperty$7.call(properties$1, name)) { + return properties$1[property] = properties$1[name]; } } var vendor = !custom ? getVendorPrefix(name, hack.length) : ''; var prefix = name.substr(0, hack.length + vendor.length); - return properties[property] = Object.freeze({ + return properties$1[property] = Object.freeze({ basename: name.substr(prefix.length), name: name.substr(hack.length), hack: hack, @@ -4620,17 +5034,17 @@ }); } - var names = { + var names$2 = { keyword: getKeywordDescriptor, property: getPropertyDescriptor, - isCustomProperty: isCustomProperty, + isCustomProperty: isCustomProperty$1, vendorPrefix: getVendorPrefix }; var MIN_SIZE = 16 * 1024; var SafeUint32Array = typeof Uint32Array !== 'undefined' ? Uint32Array : Array; // fallback on Array when TypedArray is not supported - var adoptBuffer = function adoptBuffer(buffer, size) { + var adoptBuffer$2 = function adoptBuffer(buffer, size) { if (buffer === null || buffer.length < size) { return new SafeUint32Array(Math.max(size + 1024, MIN_SIZE)); } @@ -4638,30 +5052,34 @@ return buffer; }; - var TYPE$2 = _const.TYPE; + var TokenStream$3 = TokenStream_1; + var adoptBuffer$1 = adoptBuffer$2; + var constants$1 = _const; + var TYPE$F = constants$1.TYPE; - var isNewline$1 = charCodeDefinitions.isNewline; - var isName$2 = charCodeDefinitions.isName; - var isValidEscape$2 = charCodeDefinitions.isValidEscape; - var isNumberStart$1 = charCodeDefinitions.isNumberStart; + var charCodeDefinitions = charCodeDefinitions$1; + var isNewline = charCodeDefinitions.isNewline; + var isName = charCodeDefinitions.isName; + var isValidEscape = charCodeDefinitions.isValidEscape; + var isNumberStart = charCodeDefinitions.isNumberStart; var isIdentifierStart$1 = charCodeDefinitions.isIdentifierStart; - var charCodeCategory$1 = charCodeDefinitions.charCodeCategory; + var charCodeCategory = charCodeDefinitions.charCodeCategory; var isBOM$1 = charCodeDefinitions.isBOM; + var utils = utils$2; + var cmpStr$4 = utils.cmpStr; + var getNewlineLength = utils.getNewlineLength; + var findWhiteSpaceEnd = utils.findWhiteSpaceEnd; + var consumeEscaped = utils.consumeEscaped; + var consumeName = utils.consumeName; + var consumeNumber$4 = utils.consumeNumber; + var consumeBadUrlRemnants = utils.consumeBadUrlRemnants; - var cmpStr$2 = utils.cmpStr; - var getNewlineLength$1 = utils.getNewlineLength; - var findWhiteSpaceEnd$1 = utils.findWhiteSpaceEnd; - var consumeEscaped$1 = utils.consumeEscaped; - var consumeName$1 = utils.consumeName; - var consumeNumber$1 = utils.consumeNumber; - var consumeBadUrlRemnants$1 = utils.consumeBadUrlRemnants; + var OFFSET_MASK = 0x00FFFFFF; + var TYPE_SHIFT = 24; - var OFFSET_MASK$1 = 0x00FFFFFF; - var TYPE_SHIFT$1 = 24; - - function tokenize(source, stream) { + function tokenize$3(source, stream) { function getCharCode(offset) { return offset < sourceLength ? source.charCodeAt(offset) : 0; } @@ -4669,28 +5087,28 @@ // § 4.3.3. Consume a numeric token function consumeNumericToken() { // Consume a number and let number be the result. - offset = consumeNumber$1(source, offset); + offset = consumeNumber$4(source, offset); // If the next 3 input code points would start an identifier, then: if (isIdentifierStart$1(getCharCode(offset), getCharCode(offset + 1), getCharCode(offset + 2))) { // Create a with the same value and type flag as number, and a unit set initially to the empty string. // Consume a name. Set the ’s unit to the returned value. // Return the . - type = TYPE$2.Dimension; - offset = consumeName$1(source, offset); + type = TYPE$F.Dimension; + offset = consumeName(source, offset); return; } // Otherwise, if the next input code point is U+0025 PERCENTAGE SIGN (%), consume it. if (getCharCode(offset) === 0x0025) { // Create a with the same value as number, and return it. - type = TYPE$2.Percentage; + type = TYPE$F.Percentage; offset++; return; } // Otherwise, create a with the same value and type flag as number, and return it. - type = TYPE$2.Number; + type = TYPE$F.Number; } // § 4.3.4. Consume an ident-like token @@ -4698,20 +5116,20 @@ const nameStartOffset = offset; // Consume a name, and let string be the result. - offset = consumeName$1(source, offset); + offset = consumeName(source, offset); // If string’s value is an ASCII case-insensitive match for "url", // and the next input code point is U+0028 LEFT PARENTHESIS ((), consume it. - if (cmpStr$2(source, nameStartOffset, offset, 'url') && getCharCode(offset) === 0x0028) { + if (cmpStr$4(source, nameStartOffset, offset, 'url') && getCharCode(offset) === 0x0028) { // While the next two input code points are whitespace, consume the next input code point. - offset = findWhiteSpaceEnd$1(source, offset + 1); + offset = findWhiteSpaceEnd(source, offset + 1); // If the next one or two input code points are U+0022 QUOTATION MARK ("), U+0027 APOSTROPHE ('), // or whitespace followed by U+0022 QUOTATION MARK (") or U+0027 APOSTROPHE ('), // then create a with its value set to string and return it. if (getCharCode(offset) === 0x0022 || getCharCode(offset) === 0x0027) { - type = TYPE$2.Function; + type = TYPE$F.Function; offset = nameStartOffset + 4; return; } @@ -4724,13 +5142,13 @@ // Otherwise, if the next input code point is U+0028 LEFT PARENTHESIS ((), consume it. // Create a with its value set to string and return it. if (getCharCode(offset) === 0x0028) { - type = TYPE$2.Function; + type = TYPE$F.Function; offset++; return; } // Otherwise, create an with its value set to string and return it. - type = TYPE$2.Ident; + type = TYPE$F.Ident; } // § 4.3.5. Consume a string token @@ -4743,13 +5161,13 @@ } // Initially create a with its value set to the empty string. - type = TYPE$2.String; + type = TYPE$F.String; // Repeatedly consume the next input code point from the stream: for (; offset < source.length; offset++) { var code = source.charCodeAt(offset); - switch (charCodeCategory$1(code)) { + switch (charCodeCategory(code)) { // ending code point case endingCodePoint: // Return the . @@ -4757,17 +5175,17 @@ return; // EOF - case charCodeCategory$1.Eof: + case charCodeCategory.Eof: // This is a parse error. Return the . return; // newline - case charCodeCategory$1.WhiteSpace: - if (isNewline$1(code)) { + case charCodeCategory.WhiteSpace: + if (isNewline(code)) { // This is a parse error. Reconsume the current input code point, // create a , and return it. - offset += getNewlineLength$1(source, offset, code); - type = TYPE$2.BadString; + offset += getNewlineLength(source, offset, code); + type = TYPE$F.BadString; return; } break; @@ -4782,13 +5200,13 @@ var nextCode = getCharCode(offset + 1); // Otherwise, if the next input code point is a newline, consume it. - if (isNewline$1(nextCode)) { - offset += getNewlineLength$1(source, offset + 1, nextCode); - } else if (isValidEscape$2(code, nextCode)) { + if (isNewline(nextCode)) { + offset += getNewlineLength(source, offset + 1, nextCode); + } else if (isValidEscape(code, nextCode)) { // Otherwise, (the stream starts with a valid escape) consume // an escaped code point and append the returned code point to // the ’s value. - offset = consumeEscaped$1(source, offset) - 1; + offset = consumeEscaped(source, offset) - 1; } break; @@ -4805,16 +5223,16 @@ // automatically handles this distinction; this algorithm shouldn’t be called directly otherwise. function consumeUrlToken() { // Initially create a with its value set to the empty string. - type = TYPE$2.Url; + type = TYPE$F.Url; // Consume as much whitespace as possible. - offset = findWhiteSpaceEnd$1(source, offset); + offset = findWhiteSpaceEnd(source, offset); // Repeatedly consume the next input code point from the stream: for (; offset < source.length; offset++) { var code = source.charCodeAt(offset); - switch (charCodeCategory$1(code)) { + switch (charCodeCategory(code)) { // U+0029 RIGHT PARENTHESIS ()) case 0x0029: // Return the . @@ -4822,14 +5240,14 @@ return; // EOF - case charCodeCategory$1.Eof: + case charCodeCategory.Eof: // This is a parse error. Return the . return; // whitespace - case charCodeCategory$1.WhiteSpace: + case charCodeCategory.WhiteSpace: // Consume as much whitespace as possible. - offset = findWhiteSpaceEnd$1(source, offset); + offset = findWhiteSpaceEnd(source, offset); // If the next input code point is U+0029 RIGHT PARENTHESIS ()) or EOF, // consume it and return the @@ -4843,8 +5261,8 @@ // otherwise, consume the remnants of a bad url, create a , // and return it. - offset = consumeBadUrlRemnants$1(source, offset); - type = TYPE$2.BadUrl; + offset = consumeBadUrlRemnants(source, offset); + type = TYPE$F.BadUrl; return; // U+0022 QUOTATION MARK (") @@ -4854,26 +5272,26 @@ case 0x0022: case 0x0027: case 0x0028: - case charCodeCategory$1.NonPrintable: + case charCodeCategory.NonPrintable: // This is a parse error. Consume the remnants of a bad url, // create a , and return it. - offset = consumeBadUrlRemnants$1(source, offset); - type = TYPE$2.BadUrl; + offset = consumeBadUrlRemnants(source, offset); + type = TYPE$F.BadUrl; return; // U+005C REVERSE SOLIDUS (\) case 0x005C: // If the stream starts with a valid escape, consume an escaped code point and // append the returned code point to the ’s value. - if (isValidEscape$2(code, getCharCode(offset + 1))) { - offset = consumeEscaped$1(source, offset) - 1; + if (isValidEscape(code, getCharCode(offset + 1))) { + offset = consumeEscaped(source, offset) - 1; break; } // Otherwise, this is a parse error. Consume the remnants of a bad url, // create a , and return it. - offset = consumeBadUrlRemnants$1(source, offset); - type = TYPE$2.BadUrl; + offset = consumeBadUrlRemnants(source, offset); + type = TYPE$F.BadUrl; return; // anything else @@ -4883,15 +5301,15 @@ } if (!stream) { - stream = new TokenStream_1(); + stream = new TokenStream$3(); } // ensure source is a string source = String(source || ''); var sourceLength = source.length; - var offsetAndType = adoptBuffer(stream.offsetAndType, sourceLength + 1); // +1 because of eof-token - var balance = adoptBuffer(stream.balance, sourceLength + 1); + var offsetAndType = adoptBuffer$1(stream.offsetAndType, sourceLength + 1); // +1 because of eof-token + var balance = adoptBuffer$1(stream.balance, sourceLength + 1); var tokenCount = 0; var start = isBOM$1(getCharCode(0)); var offset = start; @@ -4907,12 +5325,12 @@ balance[tokenCount] = sourceLength; - switch (charCodeCategory$1(code)) { + switch (charCodeCategory(code)) { // whitespace - case charCodeCategory$1.WhiteSpace: + case charCodeCategory.WhiteSpace: // Consume as much whitespace as possible. Return a . - type = TYPE$2.WhiteSpace; - offset = findWhiteSpaceEnd$1(source, offset + 1); + type = TYPE$F.WhiteSpace; + offset = findWhiteSpaceEnd(source, offset + 1); break; // U+0022 QUOTATION MARK (") @@ -4924,9 +5342,9 @@ // U+0023 NUMBER SIGN (#) case 0x0023: // If the next input code point is a name code point or the next two input code points are a valid escape, then: - if (isName$2(getCharCode(offset + 1)) || isValidEscape$2(getCharCode(offset + 1), getCharCode(offset + 2))) { + if (isName(getCharCode(offset + 1)) || isValidEscape(getCharCode(offset + 1), getCharCode(offset + 2))) { // Create a . - type = TYPE$2.Hash; + type = TYPE$F.Hash; // If the next 3 input code points would start an identifier, set the ’s type flag to "id". // if (isIdentifierStart(getCharCode(offset + 1), getCharCode(offset + 2), getCharCode(offset + 3))) { @@ -4934,12 +5352,12 @@ // } // Consume a name, and set the ’s value to the returned string. - offset = consumeName$1(source, offset + 1); + offset = consumeName(source, offset + 1); // Return the . } else { // Otherwise, return a with its value set to the current input code point. - type = TYPE$2.Delim; + type = TYPE$F.Delim; offset++; } @@ -4954,26 +5372,26 @@ // U+0028 LEFT PARENTHESIS (() case 0x0028: // Return a <(-token>. - type = TYPE$2.LeftParenthesis; + type = TYPE$F.LeftParenthesis; offset++; break; // U+0029 RIGHT PARENTHESIS ()) case 0x0029: // Return a <)-token>. - type = TYPE$2.RightParenthesis; + type = TYPE$F.RightParenthesis; offset++; break; // U+002B PLUS SIGN (+) case 0x002B: // If the input stream starts with a number, ... - if (isNumberStart$1(code, getCharCode(offset + 1), getCharCode(offset + 2))) { + if (isNumberStart(code, getCharCode(offset + 1), getCharCode(offset + 2))) { // ... reconsume the current input code point, consume a numeric token, and return it. consumeNumericToken(); } else { // Otherwise, return a with its value set to the current input code point. - type = TYPE$2.Delim; + type = TYPE$F.Delim; offset++; } break; @@ -4981,20 +5399,20 @@ // U+002C COMMA (,) case 0x002C: // Return a . - type = TYPE$2.Comma; + type = TYPE$F.Comma; offset++; break; // U+002D HYPHEN-MINUS (-) case 0x002D: // If the input stream starts with a number, reconsume the current input code point, consume a numeric token, and return it. - if (isNumberStart$1(code, getCharCode(offset + 1), getCharCode(offset + 2))) { + if (isNumberStart(code, getCharCode(offset + 1), getCharCode(offset + 2))) { consumeNumericToken(); } else { // Otherwise, if the next 2 input code points are U+002D HYPHEN-MINUS U+003E GREATER-THAN SIGN (->), consume them and return a . if (getCharCode(offset + 1) === 0x002D && getCharCode(offset + 2) === 0x003E) { - type = TYPE$2.CDC; + type = TYPE$F.CDC; offset = offset + 3; } else { // Otherwise, if the input stream starts with an identifier, ... @@ -5003,7 +5421,7 @@ consumeIdentLikeToken(); } else { // Otherwise, return a with its value set to the current input code point. - type = TYPE$2.Delim; + type = TYPE$F.Delim; offset++; } } @@ -5013,12 +5431,12 @@ // U+002E FULL STOP (.) case 0x002E: // If the input stream starts with a number, ... - if (isNumberStart$1(code, getCharCode(offset + 1), getCharCode(offset + 2))) { + if (isNumberStart(code, getCharCode(offset + 1), getCharCode(offset + 2))) { // ... reconsume the current input code point, consume a numeric token, and return it. consumeNumericToken(); } else { // Otherwise, return a with its value set to the current input code point. - type = TYPE$2.Delim; + type = TYPE$F.Delim; offset++; } @@ -5030,13 +5448,13 @@ if (getCharCode(offset + 1) === 0x002A) { // ... consume them and all following code points up to and including the first U+002A ASTERISK (*) // followed by a U+002F SOLIDUS (/), or up to an EOF code point. - type = TYPE$2.Comment; + type = TYPE$F.Comment; offset = source.indexOf('*/', offset + 2) + 2; if (offset === 1) { offset = source.length; } } else { - type = TYPE$2.Delim; + type = TYPE$F.Delim; offset++; } break; @@ -5044,14 +5462,14 @@ // U+003A COLON (:) case 0x003A: // Return a . - type = TYPE$2.Colon; + type = TYPE$F.Colon; offset++; break; // U+003B SEMICOLON (;) case 0x003B: // Return a . - type = TYPE$2.Semicolon; + type = TYPE$F.Semicolon; offset++; break; @@ -5062,11 +5480,11 @@ getCharCode(offset + 2) === 0x002D && getCharCode(offset + 3) === 0x002D) { // ... consume them and return a . - type = TYPE$2.CDO; + type = TYPE$F.CDO; offset = offset + 4; } else { // Otherwise, return a with its value set to the current input code point. - type = TYPE$2.Delim; + type = TYPE$F.Delim; offset++; } @@ -5077,11 +5495,11 @@ // If the next 3 input code points would start an identifier, ... if (isIdentifierStart$1(getCharCode(offset + 1), getCharCode(offset + 2), getCharCode(offset + 3))) { // ... consume a name, create an with its value set to the returned value, and return it. - type = TYPE$2.AtKeyword; - offset = consumeName$1(source, offset + 1); + type = TYPE$F.AtKeyword; + offset = consumeName(source, offset + 1); } else { // Otherwise, return a with its value set to the current input code point. - type = TYPE$2.Delim; + type = TYPE$F.Delim; offset++; } @@ -5090,19 +5508,19 @@ // U+005B LEFT SQUARE BRACKET ([) case 0x005B: // Return a <[-token>. - type = TYPE$2.LeftSquareBracket; + type = TYPE$F.LeftSquareBracket; offset++; break; // U+005C REVERSE SOLIDUS (\) case 0x005C: // If the input stream starts with a valid escape, ... - if (isValidEscape$2(code, getCharCode(offset + 1))) { + if (isValidEscape(code, getCharCode(offset + 1))) { // ... reconsume the current input code point, consume an ident-like token, and return it. consumeIdentLikeToken(); } else { // Otherwise, this is a parse error. Return a with its value set to the current input code point. - type = TYPE$2.Delim; + type = TYPE$F.Delim; offset++; } break; @@ -5110,53 +5528,53 @@ // U+005D RIGHT SQUARE BRACKET (]) case 0x005D: // Return a <]-token>. - type = TYPE$2.RightSquareBracket; + type = TYPE$F.RightSquareBracket; offset++; break; // U+007B LEFT CURLY BRACKET ({) case 0x007B: // Return a <{-token>. - type = TYPE$2.LeftCurlyBracket; + type = TYPE$F.LeftCurlyBracket; offset++; break; // U+007D RIGHT CURLY BRACKET (}) case 0x007D: // Return a <}-token>. - type = TYPE$2.RightCurlyBracket; + type = TYPE$F.RightCurlyBracket; offset++; break; // digit - case charCodeCategory$1.Digit: + case charCodeCategory.Digit: // Reconsume the current input code point, consume a numeric token, and return it. consumeNumericToken(); break; // name-start code point - case charCodeCategory$1.NameStart: + case charCodeCategory.NameStart: // Reconsume the current input code point, consume an ident-like token, and return it. consumeIdentLikeToken(); break; // EOF - case charCodeCategory$1.Eof: + case charCodeCategory.Eof: // Return an . break; // anything else default: // Return a with its value set to the current input code point. - type = TYPE$2.Delim; + type = TYPE$F.Delim; offset++; } switch (type) { case balanceCloseType: - balancePrev = balanceStart & OFFSET_MASK$1; + balancePrev = balanceStart & OFFSET_MASK; balanceStart = balance[balancePrev]; - balanceCloseType = balanceStart >> TYPE_SHIFT$1; + balanceCloseType = balanceStart >> TYPE_SHIFT; balance[tokenCount] = balancePrev; balance[balancePrev++] = tokenCount; for (; balancePrev < tokenCount; balancePrev++) { @@ -5166,35 +5584,35 @@ } break; - case TYPE$2.LeftParenthesis: - case TYPE$2.Function: + case TYPE$F.LeftParenthesis: + case TYPE$F.Function: balance[tokenCount] = balanceStart; - balanceCloseType = TYPE$2.RightParenthesis; - balanceStart = (balanceCloseType << TYPE_SHIFT$1) | tokenCount; + balanceCloseType = TYPE$F.RightParenthesis; + balanceStart = (balanceCloseType << TYPE_SHIFT) | tokenCount; break; - case TYPE$2.LeftSquareBracket: + case TYPE$F.LeftSquareBracket: balance[tokenCount] = balanceStart; - balanceCloseType = TYPE$2.RightSquareBracket; - balanceStart = (balanceCloseType << TYPE_SHIFT$1) | tokenCount; + balanceCloseType = TYPE$F.RightSquareBracket; + balanceStart = (balanceCloseType << TYPE_SHIFT) | tokenCount; break; - case TYPE$2.LeftCurlyBracket: + case TYPE$F.LeftCurlyBracket: balance[tokenCount] = balanceStart; - balanceCloseType = TYPE$2.RightCurlyBracket; - balanceStart = (balanceCloseType << TYPE_SHIFT$1) | tokenCount; + balanceCloseType = TYPE$F.RightCurlyBracket; + balanceStart = (balanceCloseType << TYPE_SHIFT) | tokenCount; break; } - offsetAndType[tokenCount++] = (type << TYPE_SHIFT$1) | offset; + offsetAndType[tokenCount++] = (type << TYPE_SHIFT) | offset; } // finalize buffers - offsetAndType[tokenCount] = (TYPE$2.EOF << TYPE_SHIFT$1) | offset; // + offsetAndType[tokenCount] = (TYPE$F.EOF << TYPE_SHIFT) | offset; // balance[tokenCount] = sourceLength; balance[sourceLength] = sourceLength; // prevents false positive balance match with any token while (balanceStart !== 0) { - balancePrev = balanceStart & OFFSET_MASK$1; + balancePrev = balanceStart & OFFSET_MASK; balanceStart = balance[balancePrev]; balance[balancePrev] = sourceLength; } @@ -5212,56 +5630,56 @@ } // extend tokenizer with constants - Object.keys(_const).forEach(function(key) { - tokenize[key] = _const[key]; + Object.keys(constants$1).forEach(function(key) { + tokenize$3[key] = constants$1[key]; }); // extend tokenizer with static methods from utils Object.keys(charCodeDefinitions).forEach(function(key) { - tokenize[key] = charCodeDefinitions[key]; + tokenize$3[key] = charCodeDefinitions[key]; }); Object.keys(utils).forEach(function(key) { - tokenize[key] = utils[key]; + tokenize$3[key] = utils[key]; }); - var tokenizer = tokenize; + var tokenizer$3 = tokenize$3; - var isDigit$2 = tokenizer.isDigit; - var cmpChar$1 = tokenizer.cmpChar; - var TYPE$3 = tokenizer.TYPE; + var isDigit$3 = tokenizer$3.isDigit; + var cmpChar$4 = tokenizer$3.cmpChar; + var TYPE$E = tokenizer$3.TYPE; - var DELIM = TYPE$3.Delim; - var WHITESPACE$1 = TYPE$3.WhiteSpace; - var COMMENT$1 = TYPE$3.Comment; - var IDENT = TYPE$3.Ident; - var NUMBER = TYPE$3.Number; - var DIMENSION = TYPE$3.Dimension; - var PLUSSIGN = 0x002B; // U+002B PLUS SIGN (+) - var HYPHENMINUS$1 = 0x002D; // U+002D HYPHEN-MINUS (-) - var N = 0x006E; // U+006E LATIN SMALL LETTER N (n) - var DISALLOW_SIGN = true; - var ALLOW_SIGN = false; + var DELIM$6 = TYPE$E.Delim; + var WHITESPACE$b = TYPE$E.WhiteSpace; + var COMMENT$9 = TYPE$E.Comment; + var IDENT$i = TYPE$E.Ident; + var NUMBER$9 = TYPE$E.Number; + var DIMENSION$7 = TYPE$E.Dimension; + var PLUSSIGN$8 = 0x002B; // U+002B PLUS SIGN (+) + var HYPHENMINUS$4 = 0x002D; // U+002D HYPHEN-MINUS (-) + var N$4 = 0x006E; // U+006E LATIN SMALL LETTER N (n) + var DISALLOW_SIGN$1 = true; + var ALLOW_SIGN$1 = false; - function isDelim(token, code) { - return token !== null && token.type === DELIM && token.value.charCodeAt(0) === code; + function isDelim$1(token, code) { + return token !== null && token.type === DELIM$6 && token.value.charCodeAt(0) === code; } function skipSC(token, offset, getNextToken) { - while (token !== null && (token.type === WHITESPACE$1 || token.type === COMMENT$1)) { + while (token !== null && (token.type === WHITESPACE$b || token.type === COMMENT$9)) { token = getNextToken(++offset); } return offset; } - function checkInteger(token, valueOffset, disallowSign, offset) { + function checkInteger$1(token, valueOffset, disallowSign, offset) { if (!token) { return 0; } var code = token.value.charCodeAt(valueOffset); - if (code === PLUSSIGN || code === HYPHENMINUS$1) { + if (code === PLUSSIGN$8 || code === HYPHENMINUS$4) { if (disallowSign) { // Number sign is not allowed return 0; @@ -5270,7 +5688,7 @@ } for (; valueOffset < token.value.length; valueOffset++) { - if (!isDigit$2(token.value.charCodeAt(valueOffset))) { + if (!isDigit$3(token.value.charCodeAt(valueOffset))) { // Integer is expected return 0; } @@ -5281,7 +5699,7 @@ // ... // ... ['+' | '-'] - function consumeB(token, offset_, getNextToken) { + function consumeB$1(token, offset_, getNextToken) { var sign = false; var offset = skipSC(token, offset_, getNextToken); @@ -5291,13 +5709,13 @@ return offset_; } - if (token.type !== NUMBER) { - if (isDelim(token, PLUSSIGN) || isDelim(token, HYPHENMINUS$1)) { + if (token.type !== NUMBER$9) { + 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 !== NUMBER) { + if (token === null && token.type !== NUMBER$9) { return 0; } } else { @@ -5307,13 +5725,13 @@ if (!sign) { var code = token.value.charCodeAt(0); - if (code !== PLUSSIGN && code !== HYPHENMINUS$1) { + if (code !== PLUSSIGN$8 && code !== HYPHENMINUS$4) { // Number sign is expected return 0; } } - return checkInteger(token, sign ? 0 : 1, sign, offset); + return checkInteger$1(token, sign ? 0 : 1, sign, offset); } // An+B microsyntax https://www.w3.org/TR/css-syntax-3/#anb @@ -5326,8 +5744,8 @@ } // - if (token.type === NUMBER) { - return checkInteger(token, 0, ALLOW_SIGN, offset); // b + if (token.type === NUMBER$9) { + return checkInteger$1(token, 0, ALLOW_SIGN$1, offset); // b } // -n @@ -5335,9 +5753,9 @@ // -n ['+' | '-'] // -n- // - else if (token.type === IDENT && token.value.charCodeAt(0) === HYPHENMINUS$1) { + else if (token.type === IDENT$i && token.value.charCodeAt(0) === HYPHENMINUS$4) { // expect 1st char is N - if (!cmpChar$1(token.value, 1, N)) { + if (!cmpChar$4(token.value, 1, N$4)) { return 0; } @@ -5346,26 +5764,26 @@ // -n // -n ['+' | '-'] case 2: - return consumeB(getNextToken(++offset), offset, getNextToken); + return consumeB$1(getNextToken(++offset), offset, getNextToken); // -n- case 3: - if (token.value.charCodeAt(2) !== HYPHENMINUS$1) { + if (token.value.charCodeAt(2) !== HYPHENMINUS$4) { return 0; } offset = skipSC(getNextToken(++offset), offset, getNextToken); token = getNextToken(offset); - return checkInteger(token, 0, DISALLOW_SIGN, offset); + return checkInteger$1(token, 0, DISALLOW_SIGN$1, offset); // default: - if (token.value.charCodeAt(2) !== HYPHENMINUS$1) { + if (token.value.charCodeAt(2) !== HYPHENMINUS$4) { return 0; } - return checkInteger(token, 3, DISALLOW_SIGN, offset); + return checkInteger$1(token, 3, DISALLOW_SIGN$1, offset); } } @@ -5374,13 +5792,13 @@ // '+'? n ['+' | '-'] // '+'? n- // '+'? - else if (token.type === IDENT || (isDelim(token, PLUSSIGN) && getNextToken(offset + 1).type === IDENT)) { + else if (token.type === IDENT$i || (isDelim$1(token, PLUSSIGN$8) && getNextToken(offset + 1).type === IDENT$i)) { // just ignore a plus - if (token.type !== IDENT) { + if (token.type !== IDENT$i) { token = getNextToken(++offset); } - if (token === null || !cmpChar$1(token.value, 0, N)) { + if (token === null || !cmpChar$4(token.value, 0, N$4)) { return 0; } @@ -5389,26 +5807,26 @@ // '+'? n // '+'? n ['+' | '-'] case 1: - return consumeB(getNextToken(++offset), offset, getNextToken); + return consumeB$1(getNextToken(++offset), offset, getNextToken); // '+'? n- case 2: - if (token.value.charCodeAt(1) !== HYPHENMINUS$1) { + if (token.value.charCodeAt(1) !== HYPHENMINUS$4) { return 0; } offset = skipSC(getNextToken(++offset), offset, getNextToken); token = getNextToken(offset); - return checkInteger(token, 0, DISALLOW_SIGN, offset); + return checkInteger$1(token, 0, DISALLOW_SIGN$1, offset); // '+'? default: - if (token.value.charCodeAt(1) !== HYPHENMINUS$1) { + if (token.value.charCodeAt(1) !== HYPHENMINUS$4) { return 0; } - return checkInteger(token, 2, DISALLOW_SIGN, offset); + return checkInteger$1(token, 2, DISALLOW_SIGN$1, offset); } } @@ -5417,12 +5835,12 @@ // // // ['+' | '-'] - else if (token.type === DIMENSION) { + else if (token.type === DIMENSION$7) { var code = token.value.charCodeAt(0); - var sign = code === PLUSSIGN || code === HYPHENMINUS$1 ? 1 : 0; + var sign = code === PLUSSIGN$8 || code === HYPHENMINUS$4 ? 1 : 0; for (var i = sign; i < token.value.length; i++) { - if (!isDigit$2(token.value.charCodeAt(i))) { + if (!isDigit$3(token.value.charCodeAt(i))) { break; } } @@ -5432,7 +5850,7 @@ return 0; } - if (!cmpChar$1(token.value, i, N)) { + if (!cmpChar$4(token.value, i, N$4)) { return 0; } @@ -5440,9 +5858,9 @@ // // ['+' | '-'] if (i + 1 === token.value.length) { - return consumeB(getNextToken(++offset), offset, getNextToken); + return consumeB$1(getNextToken(++offset), offset, getNextToken); } else { - if (token.value.charCodeAt(i + 1) !== HYPHENMINUS$1) { + if (token.value.charCodeAt(i + 1) !== HYPHENMINUS$4) { return 0; } @@ -5451,11 +5869,11 @@ offset = skipSC(getNextToken(++offset), offset, getNextToken); token = getNextToken(offset); - return checkInteger(token, 0, DISALLOW_SIGN, offset); + return checkInteger$1(token, 0, DISALLOW_SIGN$1, offset); } // else { - return checkInteger(token, i + 2, DISALLOW_SIGN, offset); + return checkInteger$1(token, i + 2, DISALLOW_SIGN$1, offset); } } } @@ -5463,24 +5881,24 @@ return 0; }; - var isHexDigit$2 = tokenizer.isHexDigit; - var cmpChar$2 = tokenizer.cmpChar; - var TYPE$4 = tokenizer.TYPE; + var isHexDigit$2 = tokenizer$3.isHexDigit; + var cmpChar$3 = tokenizer$3.cmpChar; + var TYPE$D = tokenizer$3.TYPE; - var IDENT$1 = TYPE$4.Ident; - var DELIM$1 = TYPE$4.Delim; - var NUMBER$1 = TYPE$4.Number; - var DIMENSION$1 = TYPE$4.Dimension; - var PLUSSIGN$1 = 0x002B; // U+002B PLUS SIGN (+) - var HYPHENMINUS$2 = 0x002D; // U+002D HYPHEN-MINUS (-) - var QUESTIONMARK = 0x003F; // U+003F QUESTION MARK (?) - var U = 0x0075; // U+0075 LATIN SMALL LETTER U (u) + var IDENT$h = TYPE$D.Ident; + var DELIM$5 = TYPE$D.Delim; + var NUMBER$8 = TYPE$D.Number; + var DIMENSION$6 = TYPE$D.Dimension; + var PLUSSIGN$7 = 0x002B; // U+002B PLUS SIGN (+) + var HYPHENMINUS$3 = 0x002D; // U+002D HYPHEN-MINUS (-) + var QUESTIONMARK$2 = 0x003F; // U+003F QUESTION MARK (?) + var U$2 = 0x0075; // U+0075 LATIN SMALL LETTER U (u) - function isDelim$1(token, code) { - return token !== null && token.type === DELIM$1 && token.value.charCodeAt(0) === code; + function isDelim(token, code) { + return token !== null && token.type === DELIM$5 && token.value.charCodeAt(0) === code; } - function startsWith(token, code) { + function startsWith$1(token, code) { return token.value.charCodeAt(0) === code; } @@ -5488,7 +5906,7 @@ for (var pos = offset, hexlen = 0; pos < token.value.length; pos++) { var code = token.value.charCodeAt(pos); - if (code === HYPHENMINUS$2 && allowDash && hexlen !== 0) { + if (code === HYPHENMINUS$3 && allowDash && hexlen !== 0) { if (hexSequence(token, offset + hexlen + 1, false) > 0) { return 6; // dissallow following question marks } @@ -5512,7 +5930,7 @@ return 0; // nothing consumed } - while (isDelim$1(getNextToken(length), QUESTIONMARK)) { + while (isDelim(getNextToken(length), QUESTIONMARK$2)) { if (++consumed > 6) { return 0; // too many question marks } @@ -5546,7 +5964,7 @@ var length = 0; // should start with `u` or `U` - if (token === null || token.type !== IDENT$1 || !cmpChar$2(token.value, 0, U)) { + if (token === null || token.type !== IDENT$h || !cmpChar$3(token.value, 0, U$2)) { return 0; } @@ -5557,18 +5975,18 @@ // u '+' '?'* // u '+' '?'+ - if (isDelim$1(token, PLUSSIGN$1)) { + if (isDelim(token, PLUSSIGN$7)) { token = getNextToken(++length); if (token === null) { return 0; } - if (token.type === IDENT$1) { + if (token.type === IDENT$h) { // u '+' '?'* return withQuestionMarkSequence(hexSequence(token, 0, true), ++length, getNextToken); } - if (isDelim$1(token, QUESTIONMARK)) { + if (isDelim(token, QUESTIONMARK$2)) { // u '+' '?'+ return withQuestionMarkSequence(1, ++length, getNextToken); } @@ -5580,8 +5998,8 @@ // u '?'* // u // u - if (token.type === NUMBER$1) { - if (!startsWith(token, PLUSSIGN$1)) { + if (token.type === NUMBER$8) { + if (!startsWith$1(token, PLUSSIGN$7)) { return 0; } @@ -5596,10 +6014,10 @@ return length; } - if (token.type === DIMENSION$1 || token.type === NUMBER$1) { + if (token.type === DIMENSION$6 || token.type === NUMBER$8) { // u // u - if (!startsWith(token, HYPHENMINUS$2) || !hexSequence(token, 1, false)) { + if (!startsWith$1(token, HYPHENMINUS$3) || !hexSequence(token, 1, false)) { return 0; } @@ -5611,8 +6029,8 @@ } // u '?'* - if (token.type === DIMENSION$1) { - if (!startsWith(token, PLUSSIGN$1)) { + if (token.type === DIMENSION$6) { + if (!startsWith$1(token, PLUSSIGN$7)) { return 0; } @@ -5622,16 +6040,17 @@ return 0; }; - var isIdentifierStart$2 = tokenizer.isIdentifierStart; - var isHexDigit$3 = tokenizer.isHexDigit; - var isDigit$3 = tokenizer.isDigit; - var cmpStr$3 = tokenizer.cmpStr; - var consumeNumber$2 = tokenizer.consumeNumber; - var TYPE$5 = tokenizer.TYPE; + var tokenizer$2 = tokenizer$3; + var isIdentifierStart = tokenizer$2.isIdentifierStart; + var isHexDigit$1 = tokenizer$2.isHexDigit; + var isDigit$2 = tokenizer$2.isDigit; + var cmpStr$3 = tokenizer$2.cmpStr; + var consumeNumber$3 = tokenizer$2.consumeNumber; + var TYPE$C = tokenizer$2.TYPE; + var anPlusB = genericAnPlusB; + var urange = genericUrange; - - - var cssWideKeywords = ['unset', 'initial', 'inherit']; + var cssWideKeywords$1 = ['unset', 'initial', 'inherit']; var calcFunctionNames = ['calc(', '-moz-calc(', '-webkit-calc(']; // https://www.w3.org/TR/css-values-3/#lengths @@ -5726,7 +6145,7 @@ return ( str.charCodeAt(offset) === 0x005C && // U+005C REVERSE SOLIDUS (\) - isDigit$3(str.charCodeAt(offset + 1)) + isDigit$2(str.charCodeAt(offset + 1)) ); } @@ -5779,7 +6198,7 @@ return 0; } - if (token.type === TYPE$5.Function && eqStrAny(token.value, calcFunctionNames)) { + if (token.type === TYPE$C.Function && eqStrAny(token.value, calcFunctionNames)) { return consumeFunction(token, getNextToken); } @@ -5821,14 +6240,14 @@ // // See also: https://developer.mozilla.org/en-US/docs/Web/CSS/custom-ident function customIdent(token) { - if (token === null || token.type !== TYPE$5.Ident) { + if (token === null || token.type !== TYPE$C.Ident) { return 0; } var name = token.value.toLowerCase(); // The CSS-wide keywords are not valid s - if (eqStrAny(name, cssWideKeywords)) { + if (eqStrAny(name, cssWideKeywords$1)) { return 0; } @@ -5853,7 +6272,7 @@ // NOTE: Current implementation treat `--` as a valid name since most (all?) major browsers treat it as valid. function customPropertyName(token) { // ... defined as any valid identifier - if (token === null || token.type !== TYPE$5.Ident) { + if (token === null || token.type !== TYPE$C.Ident) { return 0; } @@ -5870,7 +6289,7 @@ // In other words, a hex color is written as a hash character, "#", followed by some number of digits 0-9 or // letters a-f (the case of the letters doesn’t matter - #00ff00 is identical to #00FF00). function hexColor(token) { - if (token === null || token.type !== TYPE$5.Hash) { + if (token === null || token.type !== TYPE$C.Hash) { return 0; } @@ -5882,7 +6301,7 @@ } for (var i = 1; i < length; i++) { - if (!isHexDigit$3(token.value.charCodeAt(i))) { + if (!isHexDigit$1(token.value.charCodeAt(i))) { return 0; } } @@ -5891,11 +6310,11 @@ } function idSelector(token) { - if (token === null || token.type !== TYPE$5.Hash) { + if (token === null || token.type !== TYPE$C.Hash) { return 0; } - if (!isIdentifierStart$2(charCode(token.value, 1), charCode(token.value, 2), charCode(token.value, 3))) { + if (!isIdentifierStart(charCode(token.value, 1), charCode(token.value, 2), charCode(token.value, 3))) { return 0; } @@ -5919,14 +6338,14 @@ do { switch (token.type) { // ... does not contain , , - case TYPE$5.BadString: - case TYPE$5.BadUrl: + case TYPE$C.BadString: + case TYPE$C.BadUrl: break scan; // ... unmatched <)-token>, <]-token>, or <}-token>, - case TYPE$5.RightCurlyBracket: - case TYPE$5.RightParenthesis: - case TYPE$5.RightSquareBracket: + case TYPE$C.RightCurlyBracket: + case TYPE$C.RightParenthesis: + case TYPE$C.RightSquareBracket: if (token.balance > token.index || token.balance < startIdx) { break scan; } @@ -5935,7 +6354,7 @@ break; // ... or top-level tokens - case TYPE$5.Semicolon: + case TYPE$C.Semicolon: if (level === 0) { break scan; } @@ -5943,17 +6362,17 @@ break; // ... or tokens with a value of "!" - case TYPE$5.Delim: + case TYPE$C.Delim: if (token.value === '!' && level === 0) { break scan; } break; - case TYPE$5.Function: - case TYPE$5.LeftParenthesis: - case TYPE$5.LeftSquareBracket: - case TYPE$5.LeftCurlyBracket: + case TYPE$C.Function: + case TYPE$C.LeftParenthesis: + case TYPE$C.LeftSquareBracket: + case TYPE$C.LeftCurlyBracket: level++; break; } @@ -5987,14 +6406,14 @@ do { switch (token.type) { // ... does not contain , , - case TYPE$5.BadString: - case TYPE$5.BadUrl: + case TYPE$C.BadString: + case TYPE$C.BadUrl: break scan; // ... unmatched <)-token>, <]-token>, or <}-token>, - case TYPE$5.RightCurlyBracket: - case TYPE$5.RightParenthesis: - case TYPE$5.RightSquareBracket: + case TYPE$C.RightCurlyBracket: + case TYPE$C.RightParenthesis: + case TYPE$C.RightSquareBracket: if (token.balance > token.index || token.balance < startIdx) { break scan; } @@ -6019,11 +6438,11 @@ function dimension(type) { return function(token, getNextToken, opts) { - if (token === null || token.type !== TYPE$5.Dimension) { + if (token === null || token.type !== TYPE$C.Dimension) { return 0; } - var numberEnd = consumeNumber$2(token.value, 0); + var numberEnd = consumeNumber$3(token.value, 0); // check unit if (type !== null) { @@ -6055,7 +6474,7 @@ // https://drafts.csswg.org/css-values-4/#percentages function percentage(token, getNextToken, opts) { // ... corresponds to the production - if (token === null || token.type !== TYPE$5.Percentage) { + if (token === null || token.type !== TYPE$C.Percentage) { return 0; } @@ -6083,7 +6502,7 @@ } return function(token, getNextToken, opts) { - if (token !== null && token.type === TYPE$5.Number) { + if (token !== null && token.type === TYPE$C.Number) { if (Number(token.value) === 0) { return 1; } @@ -6102,7 +6521,7 @@ return 0; } - var numberEnd = consumeNumber$2(token.value, 0); + var numberEnd = consumeNumber$3(token.value, 0); var isNumber = numberEnd === token.value.length; if (!isNumber && !isPostfixIeHack(token.value, numberEnd)) { return 0; @@ -6120,7 +6539,7 @@ // https://drafts.csswg.org/css-values-4/#integers function integer(token, getNextToken, opts) { // ... corresponds to a subset of the production - if (token === null || token.type !== TYPE$5.Number) { + if (token === null || token.type !== TYPE$C.Number) { return 0; } @@ -6130,7 +6549,7 @@ // When written literally, an integer is one or more decimal digits 0 through 9 ... for (; i < token.value.length; i++) { - if (!isDigit$3(token.value.charCodeAt(i))) { + if (!isDigit$2(token.value.charCodeAt(i))) { return 0; } } @@ -6143,44 +6562,44 @@ return 1; } - var generic = { + var generic$1 = { // token types - 'ident-token': tokenType(TYPE$5.Ident), - 'function-token': tokenType(TYPE$5.Function), - 'at-keyword-token': tokenType(TYPE$5.AtKeyword), - 'hash-token': tokenType(TYPE$5.Hash), - 'string-token': tokenType(TYPE$5.String), - 'bad-string-token': tokenType(TYPE$5.BadString), - 'url-token': tokenType(TYPE$5.Url), - 'bad-url-token': tokenType(TYPE$5.BadUrl), - 'delim-token': tokenType(TYPE$5.Delim), - 'number-token': tokenType(TYPE$5.Number), - 'percentage-token': tokenType(TYPE$5.Percentage), - 'dimension-token': tokenType(TYPE$5.Dimension), - 'whitespace-token': tokenType(TYPE$5.WhiteSpace), - 'CDO-token': tokenType(TYPE$5.CDO), - 'CDC-token': tokenType(TYPE$5.CDC), - 'colon-token': tokenType(TYPE$5.Colon), - 'semicolon-token': tokenType(TYPE$5.Semicolon), - 'comma-token': tokenType(TYPE$5.Comma), - '[-token': tokenType(TYPE$5.LeftSquareBracket), - ']-token': tokenType(TYPE$5.RightSquareBracket), - '(-token': tokenType(TYPE$5.LeftParenthesis), - ')-token': tokenType(TYPE$5.RightParenthesis), - '{-token': tokenType(TYPE$5.LeftCurlyBracket), - '}-token': tokenType(TYPE$5.RightCurlyBracket), + 'ident-token': tokenType(TYPE$C.Ident), + 'function-token': tokenType(TYPE$C.Function), + 'at-keyword-token': tokenType(TYPE$C.AtKeyword), + 'hash-token': tokenType(TYPE$C.Hash), + 'string-token': tokenType(TYPE$C.String), + 'bad-string-token': tokenType(TYPE$C.BadString), + 'url-token': tokenType(TYPE$C.Url), + 'bad-url-token': tokenType(TYPE$C.BadUrl), + 'delim-token': tokenType(TYPE$C.Delim), + 'number-token': tokenType(TYPE$C.Number), + 'percentage-token': tokenType(TYPE$C.Percentage), + 'dimension-token': tokenType(TYPE$C.Dimension), + 'whitespace-token': tokenType(TYPE$C.WhiteSpace), + 'CDO-token': tokenType(TYPE$C.CDO), + 'CDC-token': tokenType(TYPE$C.CDC), + 'colon-token': tokenType(TYPE$C.Colon), + 'semicolon-token': tokenType(TYPE$C.Semicolon), + 'comma-token': tokenType(TYPE$C.Comma), + '[-token': tokenType(TYPE$C.LeftSquareBracket), + ']-token': tokenType(TYPE$C.RightSquareBracket), + '(-token': tokenType(TYPE$C.LeftParenthesis), + ')-token': tokenType(TYPE$C.RightParenthesis), + '{-token': tokenType(TYPE$C.LeftCurlyBracket), + '}-token': tokenType(TYPE$C.RightCurlyBracket), // token type aliases - 'string': tokenType(TYPE$5.String), - 'ident': tokenType(TYPE$5.Ident), + 'string': tokenType(TYPE$C.String), + 'ident': tokenType(TYPE$C.Ident), // complex types 'custom-ident': customIdent, 'custom-property-name': customPropertyName, 'hex-color': hexColor, 'id-selector': idSelector, // element( ) - 'an-plus-b': genericAnPlusB, - 'urange': genericUrange, + 'an-plus-b': anPlusB, + 'urange': urange, 'declaration-value': declarationValue, 'any-value': anyValue, @@ -6207,7 +6626,9 @@ '-ms-legacy-expression': func('expression') }; - var _SyntaxError$1 = function SyntaxError(message, input, offset) { + var createCustomError = createCustomError$3; + + var _SyntaxError = function SyntaxError(message, input, offset) { var error = createCustomError('SyntaxError', message); error.input = input; @@ -6220,18 +6641,20 @@ return error; }; - var TAB = 9; - var N$1 = 10; - var F = 12; - var R = 13; - var SPACE = 32; + var SyntaxError$3 = _SyntaxError; - var Tokenizer = function(str) { + var TAB$1 = 9; + var N$3 = 10; + var F$2 = 12; + var R$2 = 13; + var SPACE$2 = 32; + + var Tokenizer$1 = function(str) { this.str = str; this.pos = 0; }; - Tokenizer.prototype = { + Tokenizer$1.prototype = { charCodeAt: function(pos) { return pos < this.str.length ? this.str.charCodeAt(pos) : 0; }, @@ -6247,7 +6670,7 @@ findWsEnd: function(pos) { for (; pos < this.str.length; pos++) { var code = this.str.charCodeAt(pos); - if (code !== R && code !== N$1 && code !== F && code !== SPACE && code !== TAB) { + if (code !== R$2 && code !== N$3 && code !== F$2 && code !== SPACE$2 && code !== TAB$1) { break; } } @@ -6268,36 +6691,37 @@ return this.pos < this.str.length ? this.str.charAt(this.pos++) : ''; }, error: function(message) { - throw new _SyntaxError$1(message, this.str, this.pos); + throw new SyntaxError$3(message, this.str, this.pos); } }; - var tokenizer$1 = Tokenizer; + var tokenizer$1 = Tokenizer$1; - var TAB$1 = 9; + var Tokenizer = tokenizer$1; + var TAB = 9; var N$2 = 10; var F$1 = 12; var R$1 = 13; var SPACE$1 = 32; - var EXCLAMATIONMARK = 33; // ! - var NUMBERSIGN = 35; // # - var AMPERSAND = 38; // & + var EXCLAMATIONMARK$3 = 33; // ! + var NUMBERSIGN$4 = 35; // # + var AMPERSAND$1 = 38; // & var APOSTROPHE = 39; // ' - var LEFTPARENTHESIS = 40; // ( - var RIGHTPARENTHESIS = 41; // ) - var ASTERISK = 42; // * - var PLUSSIGN$2 = 43; // + - var COMMA = 44; // , + var LEFTPARENTHESIS$7 = 40; // ( + var RIGHTPARENTHESIS$7 = 41; // ) + var ASTERISK$6 = 42; // * + var PLUSSIGN$6 = 43; // + + var COMMA$4 = 44; // , var HYPERMINUS = 45; // - var LESSTHANSIGN = 60; // < - var GREATERTHANSIGN = 62; // > + var GREATERTHANSIGN$2 = 62; // > var QUESTIONMARK$1 = 63; // ? var COMMERCIALAT = 64; // @ - var LEFTSQUAREBRACKET = 91; // [ - var RIGHTSQUAREBRACKET = 93; // ] - var LEFTCURLYBRACKET = 123; // { - var VERTICALLINE = 124; // | - var RIGHTCURLYBRACKET = 125; // } + var LEFTSQUAREBRACKET$4 = 91; // [ + var RIGHTSQUAREBRACKET$2 = 93; // ] + var LEFTCURLYBRACKET$4 = 123; // { + var VERTICALLINE$3 = 124; // | + var RIGHTCURLYBRACKET$2 = 125; // } var INFINITY = 8734; // ∞ var NAME_CHAR = createCharMap(function(ch) { return /[a-zA-Z0-9\-]/.test(ch); @@ -6372,20 +6796,20 @@ var min = null; var max = null; - tokenizer.eat(LEFTCURLYBRACKET); + tokenizer.eat(LEFTCURLYBRACKET$4); min = scanNumber(tokenizer); - if (tokenizer.charCode() === COMMA) { + if (tokenizer.charCode() === COMMA$4) { tokenizer.pos++; - if (tokenizer.charCode() !== RIGHTCURLYBRACKET) { + if (tokenizer.charCode() !== RIGHTCURLYBRACKET$2) { max = scanNumber(tokenizer); } } else { max = min; } - tokenizer.eat(RIGHTCURLYBRACKET); + tokenizer.eat(RIGHTCURLYBRACKET$2); return { min: Number(min), @@ -6398,7 +6822,7 @@ var comma = false; switch (tokenizer.charCode()) { - case ASTERISK: + case ASTERISK$6: tokenizer.pos++; range = { @@ -6408,7 +6832,7 @@ break; - case PLUSSIGN$2: + case PLUSSIGN$6: tokenizer.pos++; range = { @@ -6428,12 +6852,12 @@ break; - case NUMBERSIGN: + case NUMBERSIGN$4: tokenizer.pos++; comma = true; - if (tokenizer.charCode() === LEFTCURLYBRACKET) { + if (tokenizer.charCode() === LEFTCURLYBRACKET$4) { range = readMultiplierRange(tokenizer); } else { range = { @@ -6444,7 +6868,7 @@ break; - case LEFTCURLYBRACKET: + case LEFTCURLYBRACKET$4: range = readMultiplierRange(tokenizer); break; @@ -6485,7 +6909,7 @@ }; } - function readProperty(tokenizer) { + function readProperty$1(tokenizer) { var name; tokenizer.eat(LESSTHANSIGN); @@ -6494,7 +6918,7 @@ name = scanWord(tokenizer); tokenizer.eat(APOSTROPHE); - tokenizer.eat(GREATERTHANSIGN); + tokenizer.eat(GREATERTHANSIGN$2); return maybeMultiplied(tokenizer, { type: 'Property', @@ -6515,7 +6939,7 @@ var max = null; // Infinity var sign = 1; - tokenizer.eat(LEFTSQUAREBRACKET); + tokenizer.eat(LEFTSQUAREBRACKET$4); if (tokenizer.charCode() === HYPERMINUS) { tokenizer.peek(); @@ -6529,7 +6953,7 @@ } scanSpaces(tokenizer); - tokenizer.eat(COMMA); + tokenizer.eat(COMMA$4); scanSpaces(tokenizer); if (tokenizer.charCode() === INFINITY) { @@ -6545,7 +6969,7 @@ max = sign * Number(scanNumber(tokenizer)); } - tokenizer.eat(RIGHTSQUAREBRACKET); + tokenizer.eat(RIGHTSQUAREBRACKET$2); // If no range is indicated, either by using the bracketed range notation // or in the property description, then [−∞,∞] is assumed. @@ -6567,18 +6991,18 @@ tokenizer.eat(LESSTHANSIGN); name = scanWord(tokenizer); - if (tokenizer.charCode() === LEFTPARENTHESIS && - tokenizer.nextCharCode() === RIGHTPARENTHESIS) { + if (tokenizer.charCode() === LEFTPARENTHESIS$7 && + tokenizer.nextCharCode() === RIGHTPARENTHESIS$7) { tokenizer.pos += 2; name += '()'; } - if (tokenizer.charCodeAt(tokenizer.findWsEnd(tokenizer.pos)) === LEFTSQUAREBRACKET) { + if (tokenizer.charCodeAt(tokenizer.findWsEnd(tokenizer.pos)) === LEFTSQUAREBRACKET$4) { scanSpaces(tokenizer); opts = readTypeRange(tokenizer); } - tokenizer.eat(GREATERTHANSIGN); + tokenizer.eat(GREATERTHANSIGN$2); return maybeMultiplied(tokenizer, { type: 'Type', @@ -6592,7 +7016,7 @@ name = scanWord(tokenizer); - if (tokenizer.charCode() === LEFTPARENTHESIS) { + if (tokenizer.charCode() === LEFTPARENTHESIS$7) { tokenizer.pos++; return { @@ -6708,13 +7132,13 @@ function readGroup(tokenizer) { var result; - tokenizer.eat(LEFTSQUAREBRACKET); + tokenizer.eat(LEFTSQUAREBRACKET$4); result = readImplicitGroup(tokenizer); - tokenizer.eat(RIGHTSQUAREBRACKET); + tokenizer.eat(RIGHTSQUAREBRACKET$2); result.explicit = true; - if (tokenizer.charCode() === EXCLAMATIONMARK) { + if (tokenizer.charCode() === EXCLAMATIONMARK$3) { tokenizer.pos++; result.disallowEmpty = true; } @@ -6730,38 +7154,38 @@ } switch (code) { - case RIGHTSQUAREBRACKET: + case RIGHTSQUAREBRACKET$2: // don't eat, stop scan a group break; - case LEFTSQUAREBRACKET: + case LEFTSQUAREBRACKET$4: return maybeMultiplied(tokenizer, readGroup(tokenizer)); case LESSTHANSIGN: return tokenizer.nextCharCode() === APOSTROPHE - ? readProperty(tokenizer) + ? readProperty$1(tokenizer) : readType(tokenizer); - case VERTICALLINE: + case VERTICALLINE$3: return { type: 'Combinator', value: tokenizer.substringToPos( - tokenizer.nextCharCode() === VERTICALLINE + tokenizer.nextCharCode() === VERTICALLINE$3 ? tokenizer.pos + 2 : tokenizer.pos + 1 ) }; - case AMPERSAND: + case AMPERSAND$1: tokenizer.pos++; - tokenizer.eat(AMPERSAND); + tokenizer.eat(AMPERSAND$1); return { type: 'Combinator', value: '&&' }; - case COMMA: + case COMMA$4: tokenizer.pos++; return { type: 'Comma' @@ -6774,7 +7198,7 @@ }); case SPACE$1: - case TAB$1: + case TAB: case N$2: case R$1: case F$1: @@ -6796,15 +7220,15 @@ return maybeToken(tokenizer); - case ASTERISK: - case PLUSSIGN$2: + case ASTERISK$6: + case PLUSSIGN$6: case QUESTIONMARK$1: - case NUMBERSIGN: - case EXCLAMATIONMARK: + case NUMBERSIGN$4: + case EXCLAMATIONMARK$3: // prohibited tokens (used as a multiplier start) break; - case LEFTCURLYBRACKET: + case LEFTCURLYBRACKET$4: // LEFTCURLYBRACKET is allowed since mdn/data uses it w/o quoting // check next char isn't a number, because it's likely a disjoined multiplier code = tokenizer.nextCharCode(); @@ -6820,8 +7244,8 @@ } } - function parse(source) { - var tokenizer = new tokenizer$1(source); + function parse$2(source) { + var tokenizer = new Tokenizer(source); var result = readImplicitGroup(tokenizer); if (tokenizer.pos !== source.length) { @@ -6838,13 +7262,13 @@ // warm up parse to elimitate code branches that never execute // fix soft deoptimizations (insufficient type feedback) - parse('[a&&#|<\'c\'>*||e() f{2} /,(% g#{1,2} h{2,})]!'); + parse$2('[a&&#|<\'c\'>*||e() f{2} /,(% g#{1,2} h{2,})]!'); - var parse_1 = parse; + var parse_1 = parse$2; var noop$2 = function() {}; - function ensureFunction(value) { + function ensureFunction$1(value) { return typeof value === 'function' ? value : noop$2; } @@ -6884,8 +7308,8 @@ if (typeof options === 'function') { enter = options; } else if (options) { - enter = ensureFunction(options.enter); - leave = ensureFunction(options.leave); + enter = ensureFunction$1(options.enter); + leave = ensureFunction$1(options.leave); } if (enter === noop$2 && leave === noop$2) { @@ -6895,7 +7319,9 @@ walk(node); }; - var tokenStream = new TokenStream_1(); + var tokenize$2 = tokenizer$3; + var TokenStream$2 = TokenStream_1; + var tokenStream = new TokenStream$2(); var astToTokens = { decorator: function(handlers) { var curNode = null; @@ -6923,19 +7349,19 @@ } }, result: function() { - return prepareTokens(buffer, nodes); + return prepareTokens$1(buffer, nodes); } }; } }; - function prepareTokens(str, nodes) { + function prepareTokens$1(str, nodes) { var tokens = []; var nodesOffset = 0; var nodesIndex = 0; var currentNode = nodes ? nodes[nodesIndex].node : null; - tokenizer(str, tokenStream); + tokenize$2(str, tokenStream); while (!tokenStream.eof) { if (nodes) { @@ -6961,29 +7387,31 @@ var prepareTokens_1 = function(value, syntax) { if (typeof value === 'string') { - return prepareTokens(value, null); + return prepareTokens$1(value, null); } return syntax.generate(value, astToTokens); }; - var MATCH = { type: 'Match' }; - var MISMATCH = { type: 'Mismatch' }; - var DISALLOW_EMPTY = { type: 'DisallowEmpty' }; - var LEFTPARENTHESIS$1 = 40; // ( - var RIGHTPARENTHESIS$1 = 41; // ) + var parse$1 = parse_1; + + var MATCH$1 = { type: 'Match' }; + var MISMATCH$1 = { type: 'Mismatch' }; + var DISALLOW_EMPTY$1 = { type: 'DisallowEmpty' }; + var LEFTPARENTHESIS$6 = 40; // ( + var RIGHTPARENTHESIS$6 = 41; // ) function createCondition(match, thenBranch, elseBranch) { // reduce node count - if (thenBranch === MATCH && elseBranch === MISMATCH) { + if (thenBranch === MATCH$1 && elseBranch === MISMATCH$1) { return match; } - if (match === MATCH && thenBranch === MATCH && elseBranch === MATCH) { + if (match === MATCH$1 && thenBranch === MATCH$1 && elseBranch === MATCH$1) { return match; } - if (match.type === 'If' && match.else === MISMATCH && thenBranch === MATCH) { + if (match.type === 'If' && match.else === MISMATCH$1 && thenBranch === MATCH$1) { thenBranch = match.then; match = match.match; } @@ -6999,8 +7427,8 @@ function isFunctionType(name) { return ( name.length > 2 && - name.charCodeAt(name.length - 2) === LEFTPARENTHESIS$1 && - name.charCodeAt(name.length - 1) === RIGHTPARENTHESIS$1 + name.charCodeAt(name.length - 2) === LEFTPARENTHESIS$6 && + name.charCodeAt(name.length - 1) === RIGHTPARENTHESIS$6 ); } @@ -7027,7 +7455,7 @@ // else MISMATCH // else MISMATCH // else MISMATCH - var result = MATCH; + var result = MATCH$1; for (var i = terms.length - 1; i >= 0; i--) { var term = terms[i]; @@ -7035,7 +7463,7 @@ result = createCondition( term, result, - MISMATCH + MISMATCH$1 ); } return result; @@ -7053,7 +7481,7 @@ // then MATCH // else MISMATCH - var result = MISMATCH; + var result = MISMATCH$1; var map = null; for (var i = terms.length - 1; i >= 0; i--) { @@ -7068,7 +7496,7 @@ type: 'Enum', map: map }, - MATCH, + MATCH$1, result ); } @@ -7087,7 +7515,7 @@ // create a new conditonal node result = createCondition( term, - MATCH, + MATCH$1, result ); } @@ -7130,7 +7558,7 @@ // then MATCH // else MISMATCH // else MISMATCH - var result = MISMATCH; + var result = MISMATCH$1; for (var i = terms.length - 1; i >= 0; i--) { var term = terms[i]; @@ -7145,7 +7573,7 @@ false ); } else { - thenClause = MATCH; + thenClause = MATCH$1; } result = createCondition( @@ -7193,7 +7621,7 @@ // then MATCH // else MATCH // else MISMATCH - var result = atLeastOneTermMatched ? MATCH : MISMATCH; + var result = atLeastOneTermMatched ? MATCH$1 : MISMATCH$1; for (var i = terms.length - 1; i >= 0; i--) { var term = terms[i]; @@ -7208,7 +7636,7 @@ true ); } else { - thenClause = MATCH; + thenClause = MATCH$1; } result = createCondition( @@ -7222,15 +7650,15 @@ } function buildMultiplierMatchGraph(node) { - var result = MATCH; - var matchTerm = buildMatchGraph(node.term); + var result = MATCH$1; + var matchTerm = buildMatchGraph$1(node.term); if (node.max === 0) { // disable repeating of empty match to prevent infinite loop matchTerm = createCondition( matchTerm, - DISALLOW_EMPTY, - MISMATCH + DISALLOW_EMPTY$1, + MISMATCH$1 ); // an occurrence count is not limited, make a cycle; @@ -7238,12 +7666,12 @@ result = createCondition( matchTerm, null, // will be a loop - MISMATCH + MISMATCH$1 ); result.then = createCondition( - MATCH, - MATCH, + MATCH$1, + MATCH$1, result // make a loop ); @@ -7251,28 +7679,28 @@ result.then.else = createCondition( { type: 'Comma', syntax: node }, result, - MISMATCH + MISMATCH$1 ); } } else { // create a match node chain for [min .. max] interval with optional matches for (var i = node.min || 1; i <= node.max; i++) { - if (node.comma && result !== MATCH) { + if (node.comma && result !== MATCH$1) { result = createCondition( { type: 'Comma', syntax: node }, result, - MISMATCH + MISMATCH$1 ); } result = createCondition( matchTerm, createCondition( - MATCH, - MATCH, + MATCH$1, + MATCH$1, result ), - MISMATCH + MISMATCH$1 ); } } @@ -7280,25 +7708,25 @@ if (node.min === 0) { // allow zero match result = createCondition( - MATCH, - MATCH, + MATCH$1, + MATCH$1, result ); } else { // create a match node chain to collect [0 ... min - 1] required matches for (var i = 0; i < node.min - 1; i++) { - if (node.comma && result !== MATCH) { + if (node.comma && result !== MATCH$1) { result = createCondition( { type: 'Comma', syntax: node }, result, - MISMATCH + MISMATCH$1 ); } result = createCondition( matchTerm, result, - MISMATCH + MISMATCH$1 ); } } @@ -7306,7 +7734,7 @@ return result; } - function buildMatchGraph(node) { + function buildMatchGraph$1(node) { if (typeof node === 'function') { return { type: 'Generic', @@ -7318,15 +7746,15 @@ case 'Group': var result = buildGroupMatchGraph( node.combinator, - node.terms.map(buildMatchGraph), + node.terms.map(buildMatchGraph$1), false ); if (node.disallowEmpty) { result = createCondition( result, - DISALLOW_EMPTY, - MISMATCH + DISALLOW_EMPTY$1, + MISMATCH$1 ); } @@ -7399,30 +7827,30 @@ } } - var matchGraph = { - MATCH: MATCH, - MISMATCH: MISMATCH, - DISALLOW_EMPTY: DISALLOW_EMPTY, + var matchGraph$1 = { + MATCH: MATCH$1, + MISMATCH: MISMATCH$1, + DISALLOW_EMPTY: DISALLOW_EMPTY$1, buildMatchGraph: function(syntaxTree, ref) { if (typeof syntaxTree === 'string') { - syntaxTree = parse_1(syntaxTree); + syntaxTree = parse$1(syntaxTree); } return { type: 'MatchGraph', - match: buildMatchGraph(syntaxTree), + match: buildMatchGraph$1(syntaxTree), syntax: ref || null, source: syntaxTree }; } }; - var hasOwnProperty$1 = Object.prototype.hasOwnProperty; - - var MATCH$1 = matchGraph.MATCH; - var MISMATCH$1 = matchGraph.MISMATCH; - var DISALLOW_EMPTY$1 = matchGraph.DISALLOW_EMPTY; - var TYPE$6 = _const.TYPE; + var hasOwnProperty$6 = Object.prototype.hasOwnProperty; + var matchGraph = matchGraph$1; + var MATCH = matchGraph.MATCH; + var MISMATCH = matchGraph.MISMATCH; + var DISALLOW_EMPTY = matchGraph.DISALLOW_EMPTY; + var TYPE$B = _const.TYPE; var STUB = 0; var TOKEN = 1; @@ -7473,18 +7901,28 @@ return true; } + function isContextEdgeDelim(token) { + if (token.type !== TYPE$B.Delim) { + return false; + } + + // Fix matching for unicode-range: U+30??, U+FF00-FF9F + // Probably we need to check out previous match instead + return token.value !== '?'; + } + function isCommaContextStart(token) { if (token === null) { return true; } return ( - token.type === TYPE$6.Comma || - token.type === TYPE$6.Function || - token.type === TYPE$6.LeftParenthesis || - token.type === TYPE$6.LeftSquareBracket || - token.type === TYPE$6.LeftCurlyBracket || - token.type === TYPE$6.Delim + token.type === TYPE$B.Comma || + token.type === TYPE$B.Function || + token.type === TYPE$B.LeftParenthesis || + token.type === TYPE$B.LeftSquareBracket || + token.type === TYPE$B.LeftCurlyBracket || + isContextEdgeDelim(token) ); } @@ -7494,10 +7932,10 @@ } return ( - token.type === TYPE$6.RightParenthesis || - token.type === TYPE$6.RightSquareBracket || - token.type === TYPE$6.RightCurlyBracket || - token.type === TYPE$6.Delim + token.type === TYPE$B.RightParenthesis || + token.type === TYPE$B.RightSquareBracket || + token.type === TYPE$B.RightCurlyBracket || + token.type === TYPE$B.Delim ); } @@ -7506,7 +7944,7 @@ do { tokenIndex++; token = tokenIndex < tokens.length ? tokens[tokenIndex] : null; - } while (token !== null && (token.type === TYPE$6.WhiteSpace || token.type === TYPE$6.Comment)); + } while (token !== null && (token.type === TYPE$B.WhiteSpace || token.type === TYPE$B.Comment)); } function getNextToken(offset) { @@ -7634,7 +8072,7 @@ if (token !== null) { // doesn't mismatch if just one token left and it's an IE hack if (tokenIndex !== tokens.length - 1 || (token.value !== '\\0' && token.value !== '\\9')) { - state = MISMATCH$1; + state = MISMATCH; break; } } @@ -7648,12 +8086,12 @@ state = thenStack.nextState; // check match is not empty - if (state === DISALLOW_EMPTY$1) { + if (state === DISALLOW_EMPTY) { if (thenStack.matchStack === matchStack) { - state = MISMATCH$1; + state = MISMATCH; break; } else { - state = MATCH$1; + state = MATCH; } } @@ -7703,11 +8141,11 @@ case 'If': // IMPORTANT: else stack push must go first, // since it stores the state of thenStack before changes - if (state.else !== MISMATCH$1) { + if (state.else !== MISMATCH) { pushElseStack(state.else); } - if (state.then !== MATCH$1) { + if (state.then !== MATCH) { pushThenStack(state.then); } @@ -7729,18 +8167,18 @@ if (state.index === terms.length) { // no matches at all or it's required all terms to be matched if (state.mask === 0 || state.syntax.all) { - state = MISMATCH$1; + state = MISMATCH; break; } // a partial match is ok - state = MATCH$1; + state = MATCH; break; } // all terms are matched if (state.mask === (1 << terms.length) - 1) { - state = MATCH$1; + state = MATCH; break; } @@ -7782,13 +8220,13 @@ name = name.replace(/\\[09].*$/, ''); } - if (hasOwnProperty$1.call(state.map, name)) { + if (hasOwnProperty$6.call(state.map, name)) { state = state.map[name]; break; } } - state = MISMATCH$1; + state = MISMATCH; break; case 'Generic': @@ -7800,9 +8238,9 @@ addTokenToMatch(); } - state = MATCH$1; + state = MATCH; } else { - state = MISMATCH$1; + state = MISMATCH; } break; @@ -7810,7 +8248,7 @@ case 'Type': case 'Property': var syntaxDict = state.type === 'Type' ? 'types' : 'properties'; - var dictSyntax = hasOwnProperty$1.call(syntaxes, syntaxDict) ? syntaxes[syntaxDict][state.name] : null; + var dictSyntax = hasOwnProperty$6.call(syntaxes, syntaxDict) ? syntaxes[syntaxDict][state.name] : null; if (!dictSyntax || !dictSyntax.match) { throw new Error( @@ -7827,7 +8265,7 @@ // https://drafts.csswg.org/css-values-4/#custom-idents // When parsing positionally-ambiguous keywords in a property value, a production // can only claim the keyword if no other unfulfilled production can claim it. - (state.name === 'custom-ident' && token.type === TYPE$6.Ident) || + (state.name === 'custom-ident' && token.type === TYPE$B.Ident) || // https://drafts.csswg.org/css-values-4/#lengths // ... if a `0` could be parsed as either a or a in a property (such as line-height), @@ -7839,7 +8277,7 @@ syntaxStash = stateSnapshotFromSyntax(state, elseStack); } - state = MISMATCH$1; + state = MISMATCH; break; } } @@ -7861,45 +8299,45 @@ if (areStringsEqualCaseInsensitive(keywordName, name)) { addTokenToMatch(); - state = MATCH$1; + state = MATCH; break; } } - state = MISMATCH$1; + state = MISMATCH; break; case 'AtKeyword': case 'Function': if (token !== null && areStringsEqualCaseInsensitive(token.value, state.name)) { addTokenToMatch(); - state = MATCH$1; + state = MATCH; break; } - state = MISMATCH$1; + state = MISMATCH; break; case 'Token': if (token !== null && token.value === state.value) { addTokenToMatch(); - state = MATCH$1; + state = MATCH; break; } - state = MISMATCH$1; + state = MISMATCH; break; case 'Comma': - if (token !== null && token.type === TYPE$6.Comma) { + if (token !== null && token.type === TYPE$B.Comma) { if (isCommaContextStart(matchStack.token)) { - state = MISMATCH$1; + state = MISMATCH; } else { addTokenToMatch(); - state = isCommaContextEnd(token) ? MISMATCH$1 : MATCH$1; + state = isCommaContextEnd(token) ? MISMATCH : MATCH; } } else { - state = isCommaContextStart(matchStack.token) || isCommaContextEnd(token) ? MATCH$1 : MISMATCH$1; + state = isCommaContextStart(matchStack.token) || isCommaContextEnd(token) ? MATCH : MISMATCH; } break; @@ -7916,9 +8354,9 @@ addTokenToMatch(); } - state = MATCH$1; + state = MATCH; } else { - state = MISMATCH$1; + state = MISMATCH; } break; @@ -7992,7 +8430,7 @@ return matchResult; } - function matchAsTree(tokens, matchGraph, syntaxes) { + function matchAsTree$1(tokens, matchGraph, syntaxes) { var matchResult = internalMatch(tokens, matchGraph, syntaxes || {}); if (matchResult.match === null) { @@ -8041,7 +8479,7 @@ var match = { matchAsList: matchAsList, - matchAsTree: matchAsTree, + matchAsTree: matchAsTree$1, getTotalIterationCount: function() { return totalIterationCount; } @@ -8120,13 +8558,15 @@ }); } - var trace = { + var trace$1 = { getTrace: getTrace, isType: isType, isProperty: isProperty, isKeyword: isKeyword }; + var List$5 = List_1; + function getFirstMatchNode(matchNode) { if ('node' in matchNode) { return matchNode.node; @@ -8153,7 +8593,7 @@ lexer.syntax.walk(ast, function(node, item, list) { if (node === start) { - var nodes = new List_1(); + var nodes = new List$5(); do { nodes.appendData(item.data); @@ -8187,11 +8627,12 @@ return fragments; } - var search = { + var search$1 = { matchFragments: matchFragments }; - var hasOwnProperty$2 = Object.prototype.hasOwnProperty; + var List$4 = List_1; + var hasOwnProperty$5 = Object.prototype.hasOwnProperty; function isValidNumber(value) { // Number.isInteger(value) && value >= 0 @@ -8221,7 +8662,7 @@ for (var key in node) { var valid = true; - if (hasOwnProperty$2.call(node, key) === false) { + if (hasOwnProperty$5.call(node, key) === false) { continue; } @@ -8266,7 +8707,7 @@ if (typeof fieldType === 'string') { valid = node[key] && node[key].type === fieldType; } else if (Array.isArray(fieldType)) { - valid = node[key] instanceof List_1; + valid = node[key] instanceof List$4; } } } @@ -8280,8 +8721,8 @@ } for (var key in fields) { - if (hasOwnProperty$2.call(fields, key) && - hasOwnProperty$2.call(node, key) === false) { + if (hasOwnProperty$5.call(fields, key) && + hasOwnProperty$5.call(node, key) === false) { warn(node, 'Field `' + type + '.' + key + '` is missed'); } } @@ -8299,7 +8740,7 @@ }; for (var key in structure) { - if (hasOwnProperty$2.call(structure, key) === false) { + if (hasOwnProperty$5.call(structure, key) === false) { continue; } @@ -8338,7 +8779,7 @@ if (config.node) { for (var name in config.node) { - if (hasOwnProperty$2.call(config.node, name)) { + if (hasOwnProperty$5.call(config.node, name)) { var nodeType = config.node[name]; if (nodeType.structure) { @@ -8354,21 +8795,21 @@ } }; - var SyntaxReferenceError$1 = error.SyntaxReferenceError; - var MatchError$1 = error.MatchError; - - - - - - - var buildMatchGraph$1 = matchGraph.buildMatchGraph; - var matchAsTree$1 = match.matchAsTree; - - + var SyntaxReferenceError = error.SyntaxReferenceError; + var SyntaxMatchError = error.SyntaxMatchError; + var names$1 = names$2; + var generic = generic$1; + var parse = parse_1; + var generate = generate_1; + var walk = walk$1; + var prepareTokens = prepareTokens_1; + var buildMatchGraph = matchGraph$1.buildMatchGraph; + var matchAsTree = match.matchAsTree; + var trace = trace$1; + var search = search$1; var getStructureFromConfig = structure.getStructureFromConfig; - var cssWideKeywords$1 = buildMatchGraph$1('inherit | initial | unset'); - var cssWideKeywordsWithExpression = buildMatchGraph$1('inherit | initial | unset | <-ms-legacy-expression>'); + var cssWideKeywords = buildMatchGraph('inherit | initial | unset'); + var cssWideKeywordsWithExpression = buildMatchGraph('inherit | initial | unset | <-ms-legacy-expression>'); function dumpMapSyntax(map, compact, syntaxAsAst) { var result = {}; @@ -8377,13 +8818,30 @@ if (map[name].syntax) { result[name] = syntaxAsAst ? map[name].syntax - : generate_1(map[name].syntax, { compact: compact }); + : 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(atrule.prelude.syntax, { compact }) + ), + descriptors: atrule.descriptors && dumpMapSyntax(atrule.descriptors, compact, syntaxAsAst) + }; + } + + return result; + } + function valueHasVar(tokens) { for (var i = 0; i < tokens.length; i++) { if (tokens[i].value.toLowerCase() === 'var(') { @@ -8407,7 +8865,7 @@ } function matchSyntax(lexer, syntax, value, useCommon) { - var tokens = prepareTokens_1(value, lexer.syntax); + var tokens = prepareTokens(value, lexer.syntax); var result; if (valueHasVar(tokens)) { @@ -8415,15 +8873,15 @@ } if (useCommon) { - result = matchAsTree$1(tokens, lexer.valueCommonSyntax, lexer); + result = matchAsTree(tokens, lexer.valueCommonSyntax, lexer); } if (!useCommon || !result.match) { - result = matchAsTree$1(tokens, syntax.match, lexer); + result = matchAsTree(tokens, syntax.match, lexer); if (!result.match) { return buildMatchResult( null, - new MatchError$1(result.reason, syntax.syntax, value, result), + new SyntaxMatchError(result.reason, syntax.syntax, value, result), result.iterations ); } @@ -8432,8 +8890,8 @@ return buildMatchResult(result.match, null, result.iterations); } - var Lexer = function(config, syntax, structure) { - this.valueCommonSyntax = cssWideKeywords$1; + var Lexer$1 = function(config, syntax, structure) { + this.valueCommonSyntax = cssWideKeywords; this.syntax = syntax; this.generic = false; this.atrules = {}; @@ -8469,7 +8927,7 @@ } }; - Lexer.prototype = { + Lexer$1.prototype = { structure: {}, checkStructure: function(ast) { function collectWarning(node, message) { @@ -8493,7 +8951,7 @@ return warns.length ? warns : false; }, - createDescriptor: function(syntax, type, name) { + createDescriptor: function(syntax, type, name, parent = null) { var ref = { type: type, name: name @@ -8501,19 +8959,20 @@ var descriptor = { type: type, name: name, + parent: parent, syntax: null, match: null }; if (typeof syntax === 'function') { - descriptor.match = buildMatchGraph$1(syntax, ref); + descriptor.match = buildMatchGraph(syntax, ref); } else { if (typeof syntax === 'string') { // lazy parsing on first access Object.defineProperty(descriptor, 'syntax', { get: function() { Object.defineProperty(descriptor, 'syntax', { - value: parse_1(syntax) + value: parse(syntax) }); return descriptor.syntax; @@ -8527,7 +8986,7 @@ Object.defineProperty(descriptor, 'match', { get: function() { Object.defineProperty(descriptor, 'match', { - value: buildMatchGraph$1(descriptor.syntax, ref) + value: buildMatchGraph(descriptor.syntax, ref) }); return descriptor.match; @@ -8538,20 +8997,34 @@ return descriptor; }, addAtrule_: function(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((res, name) => { - res[name] = this.createDescriptor(syntax.descriptors[name], 'AtruleDescriptor', name); + ? Object.keys(syntax.descriptors).reduce((res, descName) => { + res[descName] = this.createDescriptor(syntax.descriptors[descName], 'AtruleDescriptor', descName, name); return res; }, {}) : null }; }, addProperty_: function(name, syntax) { + if (!syntax) { + return; + } + this.properties[name] = this.createDescriptor(syntax, 'Property', name); }, addType_: function(name, syntax) { + if (!syntax) { + return; + } + this.types[name] = this.createDescriptor(syntax, 'Type', name); if (syntax === generic['-ms-legacy-expression']) { @@ -8559,48 +9032,84 @@ } }, - matchAtrulePrelude: function(atruleName, prelude) { - var atrule = names.keyword(atruleName); + checkAtruleName: function(atruleName) { + if (!this.getAtrule(atruleName)) { + return new SyntaxReferenceError('Unknown at-rule', '@' + atruleName); + } + }, + checkAtrulePrelude: function(atruleName, prelude) { + let error = this.checkAtruleName(atruleName); - var atrulePreludeSyntax = atrule.vendor - ? this.getAtrulePrelude(atrule.name) || this.getAtrulePrelude(atrule.basename) - : this.getAtrulePrelude(atrule.name); - - if (!atrulePreludeSyntax) { - if (atrule.basename in this.atrules) { - return buildMatchResult(null, new Error('At-rule `' + atruleName + '` should not contain a prelude')); - } - - return buildMatchResult(null, new SyntaxReferenceError$1('Unknown at-rule', atruleName)); + if (error) { + return error; } - return matchSyntax(this, atrulePreludeSyntax, prelude, true); + var atrule = this.getAtrule(atruleName); + + if (!atrule.prelude && prelude) { + return new SyntaxError('At-rule `@' + atruleName + '` should not contain a prelude'); + } + + if (atrule.prelude && !prelude) { + return new SyntaxError('At-rule `@' + atruleName + '` should contain a prelude'); + } + }, + checkAtruleDescriptorName: function(atruleName, descriptorName) { + let error = this.checkAtruleName(atruleName); + + if (error) { + return error; + } + + var atrule = this.getAtrule(atruleName); + var descriptor = names$1.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 SyntaxReferenceError('Unknown at-rule descriptor', descriptorName); + } + }, + checkPropertyName: function(propertyName) { + var property = names$1.property(propertyName); + + // don't match syntax for a custom property + if (property.custom) { + return new Error('Lexer matching doesn\'t applicable for custom properties'); + } + + if (!this.getProperty(propertyName)) { + return new SyntaxReferenceError('Unknown property', propertyName); + } + }, + + matchAtrulePrelude: function(atruleName, prelude) { + var error = this.checkAtrulePrelude(atruleName, prelude); + + if (error) { + return buildMatchResult(null, error); + } + + if (!prelude) { + return buildMatchResult(null, null); + } + + return matchSyntax(this, this.getAtrule(atruleName).prelude, prelude, false); }, matchAtruleDescriptor: function(atruleName, descriptorName, value) { - var atrule = names.keyword(atruleName); - var descriptor = names.keyword(descriptorName); + var error = this.checkAtruleDescriptorName(atruleName, descriptorName); - var atruleEntry = atrule.vendor - ? this.atrules[atrule.name] || this.atrules[atrule.basename] - : this.atrules[atrule.name]; - - if (!atruleEntry) { - return buildMatchResult(null, new SyntaxReferenceError$1('Unknown at-rule', atruleName)); + if (error) { + return buildMatchResult(null, error); } - if (!atruleEntry.descriptors) { - return buildMatchResult(null, new Error('At-rule `' + atruleName + '` has no known descriptors')); - } + var atrule = this.getAtrule(atruleName); + var descriptor = names$1.keyword(descriptorName); - var atruleDescriptorSyntax = descriptor.vendor - ? atruleEntry.descriptors[descriptor.name] || atruleEntry.descriptors[descriptor.basename] - : atruleEntry.descriptors[descriptor.name]; - - if (!atruleDescriptorSyntax) { - return buildMatchResult(null, new SyntaxReferenceError$1('Unknown at-rule descriptor', descriptorName)); - } - - return matchSyntax(this, atruleDescriptorSyntax, value, true); + return matchSyntax(this, atrule.descriptors[descriptor.name] || atrule.descriptors[descriptor.basename], value, false); }, matchDeclaration: function(node) { if (node.type !== 'Declaration') { @@ -8610,35 +9119,26 @@ return this.matchProperty(node.property, node.value); }, matchProperty: function(propertyName, value) { - var property = names.property(propertyName); + var error = this.checkPropertyName(propertyName); - // don't match syntax for a custom property - if (property.custom) { - return buildMatchResult(null, new Error('Lexer matching doesn\'t applicable for custom properties')); + if (error) { + return buildMatchResult(null, error); } - var propertySyntax = property.vendor - ? this.getProperty(property.name) || this.getProperty(property.basename) - : this.getProperty(property.name); - - if (!propertySyntax) { - return buildMatchResult(null, new SyntaxReferenceError$1('Unknown property', propertyName)); - } - - return matchSyntax(this, propertySyntax, value, true); + return matchSyntax(this, this.getProperty(propertyName), value, true); }, matchType: function(typeName, value) { var typeSyntax = this.getType(typeName); if (!typeSyntax) { - return buildMatchResult(null, new SyntaxReferenceError$1('Unknown type', typeName)); + return buildMatchResult(null, new SyntaxReferenceError('Unknown type', typeName)); } return matchSyntax(this, typeSyntax, value, false); }, match: function(syntax, value) { if (typeof syntax !== 'string' && (!syntax || !syntax.type)) { - return buildMatchResult(null, new SyntaxReferenceError$1('Bad syntax')); + return buildMatchResult(null, new SyntaxReferenceError('Bad syntax')); } if (typeof syntax === 'string' || !syntax.match) { @@ -8667,16 +9167,31 @@ return result; }, - getAtrulePrelude: function(atruleName) { - return this.atrules.hasOwnProperty(atruleName) ? this.atrules[atruleName].prelude : null; + getAtrule: function(atruleName, fallbackBasename = true) { + var atrule = names$1.keyword(atruleName); + var atruleEntry = atrule.vendor && fallbackBasename + ? this.atrules[atrule.name] || this.atrules[atrule.basename] + : this.atrules[atrule.name]; + + return atruleEntry || null; + }, + getAtrulePrelude: function(atruleName, fallbackBasename = true) { + const atrule = this.getAtrule(atruleName, fallbackBasename); + + return atrule && atrule.prelude || null; }, getAtruleDescriptor: function(atruleName, name) { return this.atrules.hasOwnProperty(atruleName) && this.atrules.declarators ? this.atrules[atruleName].declarators[name] || null : null; }, - getProperty: function(name) { - return this.properties.hasOwnProperty(name) ? this.properties[name] : null; + getProperty: function(propertyName, fallbackBasename = true) { + var property = names$1.property(propertyName); + var propertyEntry = property.vendor && fallbackBasename + ? this.properties[property.name] || this.properties[property.basename] + : this.properties[property.name]; + + return propertyEntry || null; }, getType: function(name) { return this.types.hasOwnProperty(name) ? this.types[name] : null; @@ -8690,7 +9205,7 @@ broken[name] = false; if (descriptor.syntax !== null) { - walk$1(descriptor.syntax, function(node) { + walk(descriptor.syntax, function(node) { if (node.type !== 'Type' && node.type !== 'Property') { return; } @@ -8736,7 +9251,8 @@ return { generic: this.generic, types: dumpMapSyntax(this.types, !pretty, syntaxAsAst), - properties: dumpMapSyntax(this.properties, !pretty, syntaxAsAst) + properties: dumpMapSyntax(this.properties, !pretty, syntaxAsAst), + atrules: dumpAtruleMapSyntax(this.atrules, !pretty, syntaxAsAst) }; }, toString: function() { @@ -8744,20 +9260,21 @@ } }; - var Lexer_1 = Lexer; + var Lexer_1 = Lexer$1; - var definitionSyntax = { - SyntaxError: _SyntaxError$1, + var definitionSyntax$1 = { + SyntaxError: _SyntaxError, parse: parse_1, generate: generate_1, walk: walk$1 }; - var isBOM$2 = tokenizer.isBOM; + var adoptBuffer = adoptBuffer$2; + var isBOM = tokenizer$3.isBOM; - var N$3 = 10; - var F$2 = 12; - var R$2 = 13; + var N$1 = 10; + var F = 12; + var R = 13; function computeLinesAndColumns(host, source) { var sourceLength = source.length; @@ -8765,7 +9282,7 @@ var line = host.startLine; var columns = adoptBuffer(host.columns, sourceLength); var column = host.startColumn; - var startOffset = source.length > 0 ? isBOM$2(source.charCodeAt(0)) : 0; + var startOffset = source.length > 0 ? isBOM(source.charCodeAt(0)) : 0; for (var i = startOffset; i < sourceLength; i++) { // -1 var code = source.charCodeAt(i); @@ -8773,8 +9290,8 @@ lines[i] = line; columns[i] = column++; - if (code === N$3 || code === R$2 || code === F$2) { - if (code === R$2 && i + 1 < sourceLength && source.charCodeAt(i + 1) === N$3) { + if (code === N$1 || code === R || code === F) { + if (code === R && i + 1 < sourceLength && source.charCodeAt(i + 1) === N$1) { i++; lines[i] = line; columns[i] = column; @@ -8792,13 +9309,13 @@ host.columns = columns; } - var OffsetToLocation = function() { + var OffsetToLocation$1 = function() { this.lines = null; this.columns = null; this.linesAndColumnsComputed = false; }; - OffsetToLocation.prototype = { + OffsetToLocation$1.prototype = { setSource: function(source, startOffset, startLine, startColumn) { this.source = source; this.startOffset = typeof startOffset === 'undefined' ? 0 : startOffset; @@ -8842,13 +9359,13 @@ } }; - var OffsetToLocation_1 = OffsetToLocation; + var OffsetToLocation_1 = OffsetToLocation$1; - var TYPE$7 = tokenizer.TYPE; - var WHITESPACE$2 = TYPE$7.WhiteSpace; - var COMMENT$2 = TYPE$7.Comment; + var TYPE$A = tokenizer$3.TYPE; + var WHITESPACE$a = TYPE$A.WhiteSpace; + var COMMENT$8 = TYPE$A.Comment; - var sequence = function readSequence(recognizer) { + var sequence$1 = function readSequence(recognizer) { var children = this.createList(); var child = null; var context = { @@ -8862,11 +9379,11 @@ while (!this.scanner.eof) { switch (this.scanner.tokenType) { - case COMMENT$2: + case COMMENT$8: this.scanner.next(); continue; - case WHITESPACE$2: + case WHITESPACE$a: if (context.ignoreWS) { this.scanner.next(); } else { @@ -8899,20 +9416,27 @@ return children; }; - var findWhiteSpaceStart$1 = utils.findWhiteSpaceStart; + var OffsetToLocation = OffsetToLocation_1; + var SyntaxError$2 = _SyntaxError$1; + var TokenStream$1 = TokenStream_1; + var List$3 = List_1; + var tokenize$1 = tokenizer$3; + var constants = _const; + var { findWhiteSpaceStart, cmpStr: cmpStr$2 } = utils$2; + var sequence = sequence$1; + var noop$1 = function() {}; - var noop$3 = function() {}; - - var TYPE$8 = _const.TYPE; - var NAME$2 = _const.NAME; - var WHITESPACE$3 = TYPE$8.WhiteSpace; - var IDENT$2 = TYPE$8.Ident; - var FUNCTION = TYPE$8.Function; - var URL$1 = TYPE$8.Url; - var HASH = TYPE$8.Hash; - var PERCENTAGE = TYPE$8.Percentage; - var NUMBER$2 = TYPE$8.Number; - var NUMBERSIGN$1 = 0x0023; // U+0023 NUMBER SIGN (#) + var TYPE$z = constants.TYPE; + var NAME$1 = constants.NAME; + var WHITESPACE$9 = TYPE$z.WhiteSpace; + var COMMENT$7 = TYPE$z.Comment; + var IDENT$g = TYPE$z.Ident; + var FUNCTION$6 = TYPE$z.Function; + var URL$4 = TYPE$z.Url; + var HASH$5 = TYPE$z.Hash; + var PERCENTAGE$3 = TYPE$z.Percentage; + var NUMBER$7 = TYPE$z.Number; + var NUMBERSIGN$3 = 0x0023; // U+0023 NUMBER SIGN (#) var NULL = 0; function createParseContext(name) { @@ -8978,14 +9502,14 @@ return parserConfig; } - var create$1 = function createParser(config) { + var create$4 = function createParser(config) { var parser = { - scanner: new TokenStream_1(), - locationMap: new OffsetToLocation_1(), + scanner: new TokenStream$1(), + locationMap: new OffsetToLocation(), filename: '', needPositions: false, - onParseError: noop$3, + onParseError: noop$1, onParseErrorThrow: false, parseAtrulePrelude: true, parseRulePrelude: true, @@ -8995,10 +9519,10 @@ readSequence: sequence, createList: function() { - return new List_1(); + return new List$3(); }, createSingleNodeList: function(node) { - return new List_1().appendData(node); + return new List$3().appendData(node); }, getFirstListNode: function(list) { return list && list.first(); @@ -9030,7 +9554,7 @@ lookupNonWSType: function(offset) { do { var type = this.scanner.lookupType(offset++); - if (type !== WHITESPACE$3) { + if (type !== WHITESPACE$9) { return type; } } while (type !== NULL); @@ -9041,13 +9565,13 @@ eat: function(tokenType) { if (this.scanner.tokenType !== tokenType) { var offset = this.scanner.tokenStart; - var message = NAME$2[tokenType] + ' is expected'; + var message = NAME$1[tokenType] + ' is expected'; // tweak message and offset switch (tokenType) { - case IDENT$2: + case IDENT$g: // when identifier is expected but there is a function or url - if (this.scanner.tokenType === FUNCTION || this.scanner.tokenType === URL$1) { + if (this.scanner.tokenType === FUNCTION$6 || this.scanner.tokenType === URL$4) { offset = this.scanner.tokenEnd - 1; message = 'Identifier is expected but function found'; } else { @@ -9055,16 +9579,16 @@ } break; - case HASH: - if (this.scanner.isDelim(NUMBERSIGN$1)) { + case HASH$5: + if (this.scanner.isDelim(NUMBERSIGN$3)) { this.scanner.next(); offset++; message = 'Name is expected'; } break; - case PERCENTAGE: - if (this.scanner.tokenType === NUMBER$2) { + case PERCENTAGE$3: + if (this.scanner.tokenType === NUMBER$7) { offset = this.scanner.tokenEnd; message = 'Percent sign is expected'; } @@ -9094,7 +9618,7 @@ consumeFunctionName: function() { var name = this.scanner.source.substring(this.scanner.tokenStart, this.scanner.tokenEnd - 1); - this.eat(FUNCTION); + this.eat(FUNCTION$6); return name; }, @@ -9128,10 +9652,10 @@ var location = typeof offset !== 'undefined' && offset < this.scanner.source.length ? this.locationMap.getLocation(offset) : this.scanner.eof - ? this.locationMap.getLocation(findWhiteSpaceStart$1(this.scanner.source, this.scanner.source.length - 1)) + ? this.locationMap.getLocation(findWhiteSpaceStart(this.scanner.source, this.scanner.source.length - 1)) : this.locationMap.getLocation(this.scanner.tokenStart); - throw new _SyntaxError( + throw new SyntaxError$2( message || 'Unexpected input', this.scanner.source, location.offset, @@ -9150,9 +9674,10 @@ options = options || {}; var context = options.context || 'default'; + var onComment = options.onComment; var ast; - tokenizer(source, parser.scanner); + tokenize$1(source, parser.scanner); parser.locationMap.setSource( source, options.offset, @@ -9162,7 +9687,7 @@ parser.filename = options.filename || ''; parser.needPositions = Boolean(options.positions); - parser.onParseError = typeof options.onParseError === 'function' ? options.onParseError : noop$3; + parser.onParseError = typeof options.onParseError === 'function' ? options.onParseError : noop$1; parser.onParseErrorThrow = false; parser.parseAtrulePrelude = 'parseAtrulePrelude' in options ? Boolean(options.parseAtrulePrelude) : true; parser.parseRulePrelude = 'parseRulePrelude' in options ? Boolean(options.parseRulePrelude) : true; @@ -9173,6 +9698,19 @@ throw new Error('Unknown context `' + context + '`'); } + if (typeof onComment === 'function') { + parser.scanner.forEachToken((type, start, end) => { + if (type === COMMENT$7) { + const loc = parser.getLocation(start, end); + const value = cmpStr$2(source, end - 2, end, '*/') + ? source.slice(start + 2, end - 2) + : source.slice(start + 2, end); + + onComment(value, loc); + } + }); + } + ast = parser.context[context].call(parser, options); if (!parser.scanner.eof) { @@ -9183,7 +9721,14 @@ }; }; + var sourceMapGenerator = {}; + + var base64Vlq = {}; + + var base64$1 = {}; + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* * Copyright 2011 Mozilla Foundation and contributors * Licensed under the New BSD license. See LICENSE or: @@ -9195,7 +9740,7 @@ /** * Encode an integer in the range of 0 to 63 to a single base 64 digit. */ - var encode = function (number) { + base64$1.encode = function (number) { if (0 <= number && number < intToCharMap.length) { return intToCharMap[number]; } @@ -9206,7 +9751,7 @@ * Decode a single base 64 character code digit to an integer. Returns -1 on * failure. */ - var decode = function (charCode) { + base64$1.decode = function (charCode) { var bigA = 65; // 'A' var bigZ = 90; // 'Z' @@ -9251,12 +9796,8 @@ return -1; }; - var base64 = { - encode: encode, - decode: decode - }; - /* -*- Mode: js; js-indent-level: 2; -*- */ + /* * Copyright 2011 Mozilla Foundation and contributors * Licensed under the New BSD license. See LICENSE or: @@ -9293,7 +9834,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + var base64 = base64$1; // A single base 64 digit can contain 6 bits of data. For the base 64 variable // length quantities we use in the source map spec, the first bit is the sign, @@ -9347,7 +9888,7 @@ /** * Returns the base 64 VLQ encoded value. */ - var encode$1 = function base64VLQ_encode(aValue) { + base64Vlq.encode = function base64VLQ_encode(aValue) { var encoded = ""; var digit; @@ -9371,7 +9912,7 @@ * Decodes the next base 64 VLQ value from the given string and returns the * value and the rest of the string via the out parameter. */ - var decode$1 = function base64VLQ_decode(aStr, aIndex, aOutParam) { + base64Vlq.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { var strLen = aStr.length; var result = 0; var shift = 0; @@ -9397,13 +9938,11 @@ aOutParam.rest = aIndex; }; - var base64Vlq = { - encode: encode$1, - decode: decode$1 - }; + var util$3 = {}; - var util = createCommonjsModule(function (module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ + + (function (exports) { /* * Copyright 2011 Mozilla Foundation and contributors * Licensed under the New BSD license. See LICENSE or: @@ -9891,31 +10430,20 @@ return normalize(sourceURL); } exports.computeSourceURL = computeSourceURL; - }); - var util_1 = util.getArg; - var util_2 = util.urlParse; - var util_3 = util.urlGenerate; - var util_4 = util.normalize; - var util_5 = util.join; - var util_6 = util.isAbsolute; - var util_7 = util.relative; - var util_8 = util.toSetString; - var util_9 = util.fromSetString; - var util_10 = util.compareByOriginalPositions; - var util_11 = util.compareByGeneratedPositionsDeflated; - var util_12 = util.compareByGeneratedPositionsInflated; - var util_13 = util.parseSourceMapInput; - var util_14 = util.computeSourceURL; + }(util$3)); + + var arraySet = {}; /* -*- Mode: js; js-indent-level: 2; -*- */ + /* * Copyright 2011 Mozilla Foundation and contributors * Licensed under the New BSD license. See LICENSE or: * http://opensource.org/licenses/BSD-3-Clause */ - - var has = Object.prototype.hasOwnProperty; + var util$2 = util$3; + var has$1 = Object.prototype.hasOwnProperty; var hasNativeMap = typeof Map !== "undefined"; /** @@ -9924,7 +10452,7 @@ * element is O(1). Removing elements from the set is not supported. Only * strings are supported for membership. */ - function ArraySet() { + function ArraySet$1() { this._array = []; this._set = hasNativeMap ? new Map() : Object.create(null); } @@ -9932,8 +10460,8 @@ /** * Static method for creating ArraySet instances from an existing array. */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); + 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); } @@ -9946,7 +10474,7 @@ * * @returns Number */ - ArraySet.prototype.size = function ArraySet_size() { + ArraySet$1.prototype.size = function ArraySet_size() { return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; }; @@ -9955,9 +10483,9 @@ * * @param String aStr */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + ArraySet$1.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util$2.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has$1.call(this._set, sStr); var idx = this._array.length; if (!isDuplicate || aAllowDuplicates) { this._array.push(aStr); @@ -9976,12 +10504,12 @@ * * @param String aStr */ - ArraySet.prototype.has = function ArraySet_has(aStr) { + ArraySet$1.prototype.has = function ArraySet_has(aStr) { if (hasNativeMap) { return this._set.has(aStr); } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); + var sStr = util$2.toSetString(aStr); + return has$1.call(this._set, sStr); } }; @@ -9990,15 +10518,15 @@ * * @param String aStr */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + 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.toSetString(aStr); - if (has.call(this._set, sStr)) { + var sStr = util$2.toSetString(aStr); + if (has$1.call(this._set, sStr)) { return this._set[sStr]; } } @@ -10011,7 +10539,7 @@ * * @param Number aIdx */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { + ArraySet$1.prototype.at = function ArraySet_at(aIdx) { if (aIdx >= 0 && aIdx < this._array.length) { return this._array[aIdx]; } @@ -10023,24 +10551,23 @@ * indicated by indexOf). Note that this is a copy of the internal array used * for storing the members so that no one can mess with internal state. */ - ArraySet.prototype.toArray = function ArraySet_toArray() { + ArraySet$1.prototype.toArray = function ArraySet_toArray() { return this._array.slice(); }; - var ArraySet_1 = ArraySet; + arraySet.ArraySet = ArraySet$1; - var arraySet = { - ArraySet: ArraySet_1 - }; + var mappingList = {}; /* -*- Mode: js; js-indent-level: 2; -*- */ + /* * Copyright 2014 Mozilla Foundation and contributors * Licensed under the New BSD license. See LICENSE or: * http://opensource.org/licenses/BSD-3-Clause */ - + var util$1 = util$3; /** * Determine whether mappingB is after mappingA with respect to generated @@ -10053,7 +10580,7 @@ var columnA = mappingA.generatedColumn; var columnB = mappingB.generatedColumn; return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + util$1.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; } /** @@ -10061,7 +10588,7 @@ * performance conscious manner. It trades a neglibable overhead in general * case for a large speedup in case of mappings being added in order. */ - function MappingList() { + function MappingList$1() { this._array = []; this._sorted = true; // Serves as infimum @@ -10074,7 +10601,7 @@ * * NOTE: The order of the mappings is NOT guaranteed. */ - MappingList.prototype.unsortedForEach = + MappingList$1.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) { this._array.forEach(aCallback, aThisArg); }; @@ -10084,7 +10611,7 @@ * * @param Object aMapping */ - MappingList.prototype.add = function MappingList_add(aMapping) { + MappingList$1.prototype.add = function MappingList_add(aMapping) { if (generatedPositionAfter(this._last, aMapping)) { this._last = aMapping; this._array.push(aMapping); @@ -10103,31 +10630,28 @@ * an immutable borrow. If you want to take ownership, you must make your own * copy. */ - MappingList.prototype.toArray = function MappingList_toArray() { + MappingList$1.prototype.toArray = function MappingList_toArray() { if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); + this._array.sort(util$1.compareByGeneratedPositionsInflated); this._sorted = true; } return this._array; }; - var MappingList_1 = MappingList; - - var mappingList = { - MappingList: MappingList_1 - }; + mappingList.MappingList = MappingList$1; /* -*- Mode: js; js-indent-level: 2; -*- */ + /* * Copyright 2011 Mozilla Foundation and contributors * Licensed under the New BSD license. See LICENSE or: * http://opensource.org/licenses/BSD-3-Clause */ - - - var ArraySet$1 = arraySet.ArraySet; - var MappingList$1 = mappingList.MappingList; + var base64VLQ = base64Vlq; + var util = util$3; + var ArraySet = arraySet.ArraySet; + var MappingList = mappingList.MappingList; /** * An instance of the SourceMapGenerator represents a source map which is @@ -10137,30 +10661,30 @@ * - file: The filename of the generated source. * - sourceRoot: A root for all relative URLs in this source map. */ - function SourceMapGenerator(aArgs) { + function SourceMapGenerator$1(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$1(); - this._names = new ArraySet$1(); - this._mappings = new MappingList$1(); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); this._sourcesContents = null; } - SourceMapGenerator.prototype._version = 3; + SourceMapGenerator$1.prototype._version = 3; /** * Creates a new SourceMapGenerator based on a SourceMapConsumer * * @param aSourceMapConsumer The SourceMap. */ - SourceMapGenerator.fromSourceMap = + SourceMapGenerator$1.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ + var generator = new SourceMapGenerator$1({ file: aSourceMapConsumer.file, sourceRoot: sourceRoot }); @@ -10218,7 +10742,7 @@ * - source: The original source file (relative to the sourceRoot). * - name: An optional original token name for this mapping. */ - SourceMapGenerator.prototype.addMapping = + SourceMapGenerator$1.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) { var generated = util.getArg(aArgs, 'generated'); var original = util.getArg(aArgs, 'original', null); @@ -10256,7 +10780,7 @@ /** * Set the source content for a source file. */ - SourceMapGenerator.prototype.setSourceContent = + SourceMapGenerator$1.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { var source = aSourceFile; if (this._sourceRoot != null) { @@ -10296,7 +10820,7 @@ * paths. If so, those relative source paths need to be rewritten * relative to the SourceMapGenerator. */ - SourceMapGenerator.prototype.applySourceMap = + SourceMapGenerator$1.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { var sourceFile = aSourceFile; // If aSourceFile is omitted, we will use the file property of the SourceMap @@ -10316,8 +10840,8 @@ } // Applying the SourceMap can add and remove items from the sources and // the names array. - var newSources = new ArraySet$1(); - var newNames = new ArraySet$1(); + var newSources = new ArraySet(); + var newNames = new ArraySet(); // Find mappings for the "sourceFile" this._mappings.unsortedForEach(function (mapping) { @@ -10384,7 +10908,7 @@ * To maintain consistency, we validate that any new mapping being added falls * in to one of these categories. */ - SourceMapGenerator.prototype._validateMapping = + SourceMapGenerator$1.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) { // When aOriginal is truthy but has empty values for .line and .column, @@ -10427,7 +10951,7 @@ * Serialize the accumulated mappings in to the stream of base 64 VLQs * specified by the source map format. */ - SourceMapGenerator.prototype._serializeMappings = + SourceMapGenerator$1.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() { var previousGeneratedColumn = 0; var previousGeneratedLine = 1; @@ -10462,27 +10986,27 @@ } } - next += base64Vlq.encode(mapping.generatedColumn + next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn); previousGeneratedColumn = mapping.generatedColumn; if (mapping.source != null) { sourceIdx = this._sources.indexOf(mapping.source); - next += base64Vlq.encode(sourceIdx - previousSource); + next += base64VLQ.encode(sourceIdx - previousSource); previousSource = sourceIdx; // lines are stored 0-based in SourceMap spec version 3 - next += base64Vlq.encode(mapping.originalLine - 1 + next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine); previousOriginalLine = mapping.originalLine - 1; - next += base64Vlq.encode(mapping.originalColumn + next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn); previousOriginalColumn = mapping.originalColumn; if (mapping.name != null) { nameIdx = this._names.indexOf(mapping.name); - next += base64Vlq.encode(nameIdx - previousName); + next += base64VLQ.encode(nameIdx - previousName); previousName = nameIdx; } } @@ -10493,7 +11017,7 @@ return result; }; - SourceMapGenerator.prototype._generateSourcesContent = + SourceMapGenerator$1.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { return aSources.map(function (source) { if (!this._sourcesContents) { @@ -10512,7 +11036,7 @@ /** * Externalize the source map. */ - SourceMapGenerator.prototype.toJSON = + SourceMapGenerator$1.prototype.toJSON = function SourceMapGenerator_toJSON() { var map = { version: this._version, @@ -10536,26 +11060,22 @@ /** * Render the source map being generated to a string. */ - SourceMapGenerator.prototype.toString = + SourceMapGenerator$1.prototype.toString = function SourceMapGenerator_toString() { return JSON.stringify(this.toJSON()); }; - var SourceMapGenerator_1 = SourceMapGenerator; + sourceMapGenerator.SourceMapGenerator = SourceMapGenerator$1; - var sourceMapGenerator = { - SourceMapGenerator: SourceMapGenerator_1 - }; - - var SourceMapGenerator$1 = sourceMapGenerator.SourceMapGenerator; + var SourceMapGenerator = sourceMapGenerator.SourceMapGenerator; var trackNodes = { Atrule: true, Selector: true, Declaration: true }; - var sourceMap = function generateSourceMap(handlers) { - var map = new SourceMapGenerator$1(); + var sourceMap$1 = function generateSourceMap(handlers) { + var map = new SourceMapGenerator(); var line = 1; var column = 0; var generated = { @@ -10643,7 +11163,8 @@ return handlers; }; - var hasOwnProperty$3 = Object.prototype.hasOwnProperty; + var sourceMap = sourceMap$1; + var hasOwnProperty$4 = Object.prototype.hasOwnProperty; function processChildren(node, delimeter) { var list = node.children; @@ -10663,9 +11184,9 @@ } } - var create$2 = function createGenerator(config) { + var create$3 = function createGenerator(config) { function processNode(node) { - if (hasOwnProperty$3.call(types, node.type)) { + if (hasOwnProperty$4.call(types, node.type)) { types[node.type].call(this, node); } else { throw new Error('Unknown node type: ' + node.type); @@ -10709,13 +11230,15 @@ }; }; - var create$3 = function createConvertors(walk) { + var List$2 = List_1; + + var create$2 = function createConvertors(walk) { return { fromPlainObject: function(ast) { walk(ast, { enter: function(node) { - if (node.children && node.children instanceof List_1 === false) { - node.children = new List_1().fromArray(node.children); + if (node.children && node.children instanceof List$2 === false) { + node.children = new List$2().fromArray(node.children); } } }); @@ -10725,7 +11248,7 @@ toPlainObject: function(ast) { walk(ast, { leave: function(node) { - if (node.children && node.children instanceof List_1) { + if (node.children && node.children instanceof List$2) { node.children = node.children.toArray(); } } @@ -10736,11 +11259,11 @@ }; }; - var hasOwnProperty$4 = Object.prototype.hasOwnProperty; - var noop$4 = function() {}; + var hasOwnProperty$3 = Object.prototype.hasOwnProperty; + var noop = function() {}; - function ensureFunction$1(value) { - return typeof value === 'function' ? value : noop$4; + function ensureFunction(value) { + return typeof value === 'function' ? value : noop; } function invokeForType(fn, type) { @@ -10756,7 +11279,7 @@ var walkers = []; for (var key in structure) { - if (hasOwnProperty$4.call(structure, key) === false) { + if (hasOwnProperty$3.call(structure, key) === false) { continue; } @@ -10801,7 +11324,7 @@ var types = {}; for (var name in config.node) { - if (hasOwnProperty$4.call(config.node, name)) { + if (hasOwnProperty$3.call(config.node, name)) { var nodeType = config.node[name]; if (!nodeType.structure) { @@ -10824,7 +11347,7 @@ fields.reverse(); } - return function(node, context, walk) { + return function(node, context, walk, walkReducer) { var prevContextValue; if (useContext) { @@ -10838,13 +11361,15 @@ if (!field.nullable || ref) { if (field.type === 'list') { - if (reverse) { - ref.forEachRight(walk); - } else { - ref.forEach(walk); + var breakWalk = reverse + ? ref.reduceRight(walkReducer, false) + : ref.reduce(walkReducer, false); + + if (breakWalk) { + return true; } - } else { - walk(ref); + } else if (walk(ref)) { + return true; } } } @@ -10879,13 +11404,15 @@ }; } - var create$4 = function createWalker(config) { + var create$1 = function createWalker(config) { var types = getTypesFromConfig(config); var iteratorsNatural = {}; var iteratorsReverse = {}; + var breakWalk = Symbol('break-walk'); + var skipNode = Symbol('skip-node'); for (var name in types) { - if (hasOwnProperty$4.call(types, name) && types[name] !== null) { + if (hasOwnProperty$3.call(types, name) && types[name] !== null) { iteratorsNatural[name] = createTypeIterator(types[name], false); iteratorsReverse[name] = createTypeIterator(types[name], true); } @@ -10896,19 +11423,38 @@ var walk = function(root, options) { function walkNode(node, item, list) { - enter.call(context, node, item, list); + var enterRet = enter.call(context, node, item, list); - if (iterators.hasOwnProperty(node.type)) { - iterators[node.type](node, context, walkNode); + if (enterRet === breakWalk) { + debugger; + return true; } - leave.call(context, node, item, list); + 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; } - var enter = noop$4; - var leave = noop$4; + var walkReducer = (ret, data, item, list) => ret || walkNode(data, item, list); + var enter = noop; + var leave = noop; var iterators = iteratorsNatural; var context = { + break: breakWalk, + skip: skipNode, + root: root, stylesheet: null, atrule: null, @@ -10923,8 +11469,8 @@ if (typeof options === 'function') { enter = options; } else if (options) { - enter = ensureFunction$1(options.enter); - leave = ensureFunction$1(options.leave); + enter = ensureFunction(options.enter); + leave = ensureFunction(options.leave); if (options.reverse) { iterators = iteratorsReverse; @@ -10944,26 +11490,23 @@ } } - if (enter === noop$4 && leave === noop$4) { + if (enter === noop && leave === noop) { throw new Error('Neither `enter` nor `leave` walker handler is set or both aren\'t a function'); } - // swap handlers in reverse mode to invert visit order - if (options.reverse) { - var tmp = enter; - enter = leave; - leave = tmp; - } - walkNode(root); }; + walk.break = breakWalk; + walk.skip = skipNode; + walk.find = function(ast, fn) { var found = null; walk(ast, function(node, item, list) { - if (found === null && fn.call(this, node, item, list)) { + if (fn.call(this, node, item, list)) { found = node; + return breakWalk; } }); @@ -10976,8 +11519,9 @@ walk(ast, { reverse: true, enter: function(node, item, list) { - if (found === null && fn.call(this, node, item, list)) { + if (fn.call(this, node, item, list)) { found = node; + return breakWalk; } } }); @@ -11000,14 +11544,16 @@ return walk; }; - var clone = function clone(node) { + var List$1 = List_1; + + var clone$1 = function clone(node) { var result = {}; for (var key in node) { var value = node[key]; if (value) { - if (Array.isArray(value) || value instanceof List_1) { + if (Array.isArray(value) || value instanceof List$1) { value = value.map(clone); } else if (value.constructor === Object) { value = clone(value); @@ -11020,84 +11566,138 @@ return result; }; - var hasOwnProperty$5 = Object.prototype.hasOwnProperty; - var shape = { + const hasOwnProperty$2 = Object.prototype.hasOwnProperty; + const shape$1 = { generic: true, - types: {}, - atrules: {}, - properties: {}, - parseContext: {}, - scope: {}, + 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) { + function isObject$2(value) { return value && value.constructor === Object; } function copy(value) { - if (isObject(value)) { - return Object.assign({}, value); - } else { - return value; - } + return isObject$2(value) + ? Object.assign({}, value) + : value; } - function extend(dest, src) { - for (var key in src) { - if (hasOwnProperty$5.call(src, key)) { - if (isObject(dest[key])) { - extend(dest[key], copy(src[key])); + + function assign(dest, src) { + return Object.assign(dest, src); + } + + function deepAssign(dest, src) { + for (const key in src) { + if (hasOwnProperty$2.call(src, key)) { + if (isObject$2(dest[key])) { + deepAssign(dest[key], copy(src[key])); } else { dest[key] = copy(src[key]); } } } + + return dest; } - function mix(dest, src, shape) { - for (var key in shape) { - if (hasOwnProperty$5.call(shape, key) === false) { + 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 = Object.assign({}, a); + for (let key in b) { + if (hasOwnProperty$2.call(b, key)) { + result[key] = append(hasOwnProperty$2.call(a, key) ? a[key] : undefined, b[key]); + } + } + + return result; + } + + function appendOrAssignOrNull(a, b) { + const result = appendOrAssign(a, b); + + return !isObject$2(result) || Object.keys(result).length + ? result + : null; + } + + function mix$1(dest, src, shape) { + for (const key in shape) { + if (hasOwnProperty$2.call(shape, key) === false) { continue; } if (shape[key] === true) { if (key in src) { - if (hasOwnProperty$5.call(src, key)) { + if (hasOwnProperty$2.call(src, key)) { dest[key] = copy(src[key]); } } } else if (shape[key]) { - if (isObject(shape[key])) { - var res = {}; - extend(res, dest[key]); - extend(res, src[key]); - dest[key] = res; + if (typeof shape[key] === 'function') { + const fn = shape[key]; + dest[key] = fn({}, dest[key]); + dest[key] = fn(dest[key] || {}, src[key]); + } else if (isObject$2(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])) { - var res = {}; - var innerShape = shape[key].reduce(function(s, k) { + const res = {}; + const innerShape = shape[key].reduce(function(s, k) { s[k] = true; return s; }, {}); - for (var name in dest[key]) { - if (hasOwnProperty$5.call(dest[key], name)) { - res[name] = {}; - if (dest[key] && dest[key][name]) { - mix(res[name], dest[key][name], innerShape); - } + + for (const [name, value] of Object.entries(dest[key] || {})) { + res[name] = {}; + if (value) { + mix$1(res[name], value, innerShape); } } - for (var name in src[key]) { - if (hasOwnProperty$5.call(src[key], name)) { + + for (const name in src[key]) { + if (hasOwnProperty$2.call(src[key], name)) { if (!res[name]) { res[name] = {}; } + if (src[key] && src[key][name]) { - mix(res[name], src[key][name], innerShape); + mix$1(res[name], src[key][name], innerShape); } } } + dest[key] = res; } } @@ -11105,21 +11705,33 @@ return dest; } - var mix_1 = function(dest, src) { - return mix(dest, src, shape); - }; + var mix_1 = (dest, src) => mix$1(dest, src, shape$1); + + var List = List_1; + var SyntaxError$1 = _SyntaxError$1; + var TokenStream = TokenStream_1; + var Lexer = Lexer_1; + var definitionSyntax = definitionSyntax$1; + var tokenize = tokenizer$3; + var createParser = create$4; + var createGenerator = create$3; + var createConvertor = create$2; + var createWalker = create$1; + var clone = clone$1; + var names = names$2; + var mix = mix_1; function createSyntax(config) { - var parse = create$1(config); - var walk = create$4(config); - var generate = create$2(config); - var convert = create$3(walk); + var parse = createParser(config); + var walk = createWalker(config); + var generate = createGenerator(config); + var convert = createConvertor(walk); var syntax = { - List: List_1, - SyntaxError: _SyntaxError, - TokenStream: TokenStream_1, - Lexer: Lexer_1, + List: List, + SyntaxError: SyntaxError$1, + TokenStream: TokenStream, + Lexer: Lexer, vendorPrefix: names.vendorPrefix, keyword: names.keyword, @@ -11129,10 +11741,10 @@ definitionSyntax: definitionSyntax, lexer: null, createLexer: function(config) { - return new Lexer_1(config, syntax, syntax.lexer.structure); + return new Lexer(config, syntax, syntax.lexer.structure); }, - tokenize: tokenizer, + tokenize: tokenize, parse: parse, walk: walk, generate: generate, @@ -11146,19 +11758,19 @@ toPlainObject: convert.toPlainObject, createSyntax: function(config) { - return createSyntax(mix_1({}, config)); + return createSyntax(mix({}, config)); }, fork: function(extension) { - var base = mix_1({}, config); // copy of config + var base = mix({}, config); // copy of config return createSyntax( typeof extension === 'function' ? extension(base, Object.assign) - : mix_1(base, extension) + : mix(base, extension) ); } }; - syntax.lexer = new Lexer_1({ + syntax.lexer = new Lexer({ generic: true, types: config.types, atrules: config.atrules, @@ -11168,15 +11780,11 @@ return syntax; } - var create_1 = function(config) { - return createSyntax(mix_1({}, config)); + create$5.create = function(config) { + return createSyntax(mix({}, config)); }; - var create$5 = { - create: create_1 - }; - - var atRules = { + var require$$0 = { "@charset": { syntax: "@charset \"\";", groups: [ @@ -11197,7 +11805,7 @@ "additive-symbols": { syntax: "[ && ]#", media: "all", - initial: "N/A", + initial: "n/a (required)", percentages: "no", computed: "asSpecified", order: "orderOfAppearance", @@ -11269,7 +11877,7 @@ symbols: { syntax: "+", media: "all", - initial: "N/A", + initial: "n/a (required)", percentages: "no", computed: "asSpecified", order: "orderOfAppearance", @@ -11476,7 +12084,7 @@ percentages: "no", computed: "asSpecified", order: "uniqueOrder", - status: "experimental" + status: "standard" }, marks: { syntax: "none | [ crop || cross ]", @@ -11488,11 +12096,64 @@ percentages: "no", computed: "asSpecified", order: "orderOfAppearance", - status: "experimental" + status: "standard" + }, + size: { + syntax: "{1,2} | auto | [ || [ portrait | landscape ] ]", + media: [ + "visual", + "paged" + ], + initial: "auto", + percentages: "no", + computed: "asSpecifiedRelativeToAbsoluteLengths", + order: "orderOfAppearance", + status: "standard" } }, status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@page" + }, + "@property": { + syntax: "@property {\n \n}", + interfaces: [ + "CSS", + "CSSPropertyRule" + ], + groups: [ + "CSS Houdini" + ], + descriptors: { + syntax: { + syntax: "", + media: "all", + percentages: "no", + initial: "n/a (required)", + computed: "asSpecified", + order: "uniqueOrder", + status: "experimental" + }, + inherits: { + syntax: "true | false", + media: "all", + percentages: "no", + initial: "auto", + computed: "asSpecified", + order: "uniqueOrder", + status: "experimental" + }, + "initial-value": { + syntax: "", + media: "all", + initial: "n/a (required)", + percentages: "no", + computed: "asSpecified", + order: "uniqueOrder", + status: "experimental" + } + }, + status: "experimental", + mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@property" }, "@supports": { syntax: "@supports {\n \n}", @@ -11633,6 +12294,18 @@ order: "uniqueOrder", status: "standard" }, + "viewport-fit": { + syntax: "auto | contain | cover", + media: [ + "visual", + "continuous" + ], + initial: "auto", + percentages: "no", + computed: "asSpecified", + order: "uniqueOrder", + status: "standard" + }, width: { syntax: "{1,2}", media: [ @@ -11672,11 +12345,6 @@ } }; - var atRules$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - 'default': atRules - }); - var all = { syntax: "initial | inherit | unset | revert", media: "noPracticalMedia", @@ -11728,7 +12396,7 @@ mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation" }; var appearance = { - syntax: "none | auto | button | textfield | ", + syntax: "none | auto | textfield | menulist-button | ", media: "all", inherited: false, animationType: "discrete", @@ -11741,7 +12409,7 @@ computed: "asSpecified", order: "perGrammar", status: "experimental", - mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-appearance" + mdn_url: "https://developer.mozilla.org/docs/Web/CSS/appearance" }; var azimuth = { syntax: " | [ [ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards", @@ -11888,7 +12556,7 @@ status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/clip" }; - var color = { + var color$1 = { syntax: "", media: "visual", inherited: true, @@ -11947,7 +12615,7 @@ appliesto: "allElements", computed: "asSpecified", order: "perGrammar", - status: "experimental", + status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/contain" }; var content = { @@ -12141,7 +12809,7 @@ "row-gap", "column-gap" ], - appliesto: "gridContainers", + appliesto: "multiColumnElementsFlexContainersGridContainers", computed: [ "row-gap", "column-gap" @@ -12194,7 +12862,7 @@ mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid" }; var height = { - syntax: "[ | ] && [ border-box | content-box ]? | available | min-content | max-content | fit-content | auto", + syntax: "auto | | | min-content | max-content | fit-content()", media: "visual", inherited: false, animationType: "lpc", @@ -12297,7 +12965,8 @@ ], order: "uniqueOrder", alsoAppliesTo: [ - "::first-letter" + "::first-letter", + "::first-line" ], status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin" @@ -12384,7 +13053,7 @@ ], order: "perGrammar", stacking: true, - status: "experimental", + status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/offset" }; var opacity = { @@ -12416,7 +13085,7 @@ "CSS Flexible Box Layout" ], initial: "0", - appliesto: "flexItemsAndAbsolutelyPositionedFlexContainerChildren", + appliesto: "flexItemsGridItemsAbsolutelyPositionedContainerChildren", computed: "asSpecified", order: "uniqueOrder", status: "standard", @@ -12480,7 +13149,10 @@ ], initial: "visible", appliesto: "blockContainersFlexContainersGridContainers", - computed: "asSpecified", + computed: [ + "overflow-x", + "overflow-y" + ], order: "uniqueOrder", status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow" @@ -12509,7 +13181,8 @@ ], order: "uniqueOrder", alsoAppliesTo: [ - "::first-letter" + "::first-letter", + "::first-line" ], status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding" @@ -12531,7 +13204,7 @@ status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/perspective" }; - var position = { + var position$1 = { syntax: "static | relative | absolute | sticky | fixed", media: "visual", inherited: false, @@ -12739,7 +13412,7 @@ mdn_url: "https://developer.mozilla.org/docs/Web/CSS/widows" }; var width = { - syntax: "[ | ] && [ border-box | content-box ]? | available | min-content | max-content | fit-content | auto", + syntax: "auto | | | min-content | max-content | fit-content()", media: "visual", inherited: false, animationType: "lpc", @@ -12770,7 +13443,7 @@ status: "nonstandard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/zoom" }; - var properties$1 = { + var require$$1 = { "--*": { syntax: "", media: "all", @@ -13009,6 +13682,38 @@ order: "uniqueOrder", status: "nonstandard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-flow-into" + }, + "-ms-grid-columns": { + syntax: "none | | ", + media: "visual", + inherited: false, + animationType: "simpleListOfLpcDifferenceLpc", + percentages: "referToDimensionOfContentArea", + groups: [ + "CSS Grid Layout" + ], + initial: "none", + appliesto: "gridContainers", + computed: "asSpecifiedRelativeToAbsoluteLengths", + order: "uniqueOrder", + status: "nonstandard", + mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-grid-columns" + }, + "-ms-grid-rows": { + syntax: "none | | ", + media: "visual", + inherited: false, + animationType: "simpleListOfLpcDifferenceLpc", + percentages: "referToDimensionOfContentArea", + groups: [ + "CSS Grid Layout" + ], + initial: "none", + appliesto: "gridContainers", + computed: "asSpecifiedRelativeToAbsoluteLengths", + order: "uniqueOrder", + status: "nonstandard", + mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-grid-rows" }, "-ms-high-contrast-adjust": { syntax: "auto | none", @@ -13575,7 +14280,7 @@ computed: "asSpecified", order: "uniqueOrder", status: "nonstandard", - mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-appearance" + mdn_url: "https://developer.mozilla.org/docs/Web/CSS/appearance" }, "-moz-binding": { syntax: " | none", @@ -13690,7 +14395,7 @@ mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-float-edge" }, "-moz-force-broken-image-icon": { - syntax: "", + syntax: "", media: "visual", inherited: false, animationType: "discrete", @@ -13950,7 +14655,7 @@ mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-window-shadow" }, "-webkit-appearance": { - syntax: "none | button | button-bevel | 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 | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield", + syntax: "none | button | button-bevel | 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 | 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", media: "visual", inherited: false, animationType: "discrete", @@ -13963,7 +14668,7 @@ computed: "asSpecified", order: "uniqueOrder", status: "nonstandard", - mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-appearance" + mdn_url: "https://developer.mozilla.org/docs/Web/CSS/appearance" }, "-webkit-border-before": { syntax: "<'border-width'> || <'border-style'> || <'color'>", @@ -14474,6 +15179,22 @@ order: "uniqueOrder", status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/align-self" + }, + "align-tracks": { + syntax: "[ normal | | | ? ]#", + media: "visual", + inherited: false, + animationType: "discrete", + percentages: "no", + groups: [ + "CSS Grid Layout" + ], + initial: "normal", + appliesto: "gridContainersWithMasonryLayoutInTheirBlockAxis", + computed: "asSpecified", + order: "uniqueOrder", + status: "experimental", + mdn_url: "https://developer.mozilla.org/docs/Web/CSS/align-tracks" }, all: all, animation: animation, @@ -14636,7 +15357,7 @@ appliesto: "allElementsSVGContainerElements", computed: "asSpecified", order: "uniqueOrder", - status: "experimental", + status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/backdrop-filter" }, "backface-visibility": { @@ -14804,7 +15525,7 @@ mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-position" }, "background-position-x": { - syntax: "[ center | [ left | right | x-start | x-end ]? ? ]#", + syntax: "[ center | [ [ left | right | x-start | x-end ]? ? ]! ]#", media: "visual", inherited: false, animationType: "discrete", @@ -14820,7 +15541,7 @@ mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-position-x" }, "background-position-y": { - syntax: "[ center | [ top | bottom | y-start | y-end ]? ? ]#", + syntax: "[ center | [ [ top | bottom | y-start | y-end ]? ? ]! ]#", media: "visual", inherited: false, animationType: "discrete", @@ -14896,7 +15617,7 @@ syntax: "<'width'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: "lpc", percentages: "blockSizeOfContainingBlock", groups: [ "CSS Logical Properties" @@ -14985,7 +15706,11 @@ syntax: "<'border-top-width'> || <'border-top-style'> || <'color'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: [ + "border-block-end-color", + "border-block-end-style", + "border-block-end-width" + ], percentages: "no", groups: [ "CSS Logical Properties" @@ -15009,7 +15734,7 @@ syntax: "<'border-top-color'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: "color", percentages: "no", groups: [ "CSS Logical Properties" @@ -15041,7 +15766,7 @@ syntax: "<'border-top-width'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: "length", percentages: "logicalWidthOfContainingBlock", groups: [ "CSS Logical Properties" @@ -15057,7 +15782,11 @@ syntax: "<'border-top-width'> || <'border-top-style'> || <'color'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: [ + "border-block-start-color", + "border-block-start-style", + "border-block-start-width" + ], percentages: "no", groups: [ "CSS Logical Properties" @@ -15081,7 +15810,7 @@ syntax: "<'border-top-color'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: "color", percentages: "no", groups: [ "CSS Logical Properties" @@ -15113,7 +15842,7 @@ syntax: "<'border-top-width'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: "length", percentages: "logicalWidthOfContainingBlock", groups: [ "CSS Logical Properties" @@ -15496,7 +16225,11 @@ syntax: "<'border-top-width'> || <'border-top-style'> || <'color'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: [ + "border-inline-end-color", + "border-inline-end-style", + "border-inline-end-width" + ], percentages: "no", groups: [ "CSS Logical Properties" @@ -15568,7 +16301,7 @@ syntax: "<'border-top-color'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: "color", percentages: "no", groups: [ "CSS Logical Properties" @@ -15600,7 +16333,7 @@ syntax: "<'border-top-width'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: "length", percentages: "logicalWidthOfContainingBlock", groups: [ "CSS Logical Properties" @@ -15616,7 +16349,11 @@ syntax: "<'border-top-width'> || <'border-top-style'> || <'color'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: [ + "border-inline-start-color", + "border-inline-start-style", + "border-inline-start-width" + ], percentages: "no", groups: [ "CSS Logical Properties" @@ -15640,7 +16377,7 @@ syntax: "<'border-top-color'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: "color", percentages: "no", groups: [ "CSS Logical Properties" @@ -15672,7 +16409,7 @@ syntax: "<'border-top-width'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: "length", percentages: "logicalWidthOfContainingBlock", groups: [ "CSS Logical Properties" @@ -16423,7 +17160,7 @@ status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/clip-path" }, - color: color, + color: color$1, "color-adjust": { syntax: "economy | exact", media: "visual", @@ -16895,7 +17632,7 @@ "::first-line", "::placeholder" ], - status: "experimental", + status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variation-settings" }, "font-size": { @@ -16939,6 +17676,22 @@ ], status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-size-adjust" + }, + "font-smooth": { + syntax: "auto | never | always | | ", + media: "visual", + inherited: true, + animationType: "discrete", + percentages: "no", + groups: [ + "CSS Fonts" + ], + initial: "auto", + appliesto: "allElements", + computed: "asSpecified", + order: "uniqueOrder", + status: "nonstandard", + mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-smooth" }, "font-stretch": { syntax: "", @@ -17514,7 +18267,7 @@ groups: [ "CSS Images" ], - initial: "0deg", + initial: "from-image", appliesto: "allElements", computed: "angleRoundedToNextQuarter", order: "uniqueOrder", @@ -17604,7 +18357,7 @@ syntax: "<'width'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: "lpc", percentages: "inlineSizeOfContainingBlock", groups: [ "CSS Logical Properties" @@ -17761,6 +18514,22 @@ order: "uniqueOrder", status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/justify-self" + }, + "justify-tracks": { + syntax: "[ normal | | ? [ | left | right ] ]#", + media: "visual", + inherited: false, + animationType: "discrete", + percentages: "no", + groups: [ + "CSS Grid Layout" + ], + initial: "normal", + appliesto: "gridContainersWithMasonryLayoutInTheirInlineAxis", + computed: "asSpecified", + order: "uniqueOrder", + status: "experimental", + mdn_url: "https://developer.mozilla.org/docs/Web/CSS/justify-tracks" }, left: left, "letter-spacing": { @@ -17786,7 +18555,7 @@ "line-break": { syntax: "auto | loose | normal | strict | anywhere", media: "visual", - inherited: false, + inherited: true, animationType: "discrete", percentages: "no", groups: [ @@ -17944,7 +18713,7 @@ syntax: "<'margin-left'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: "length", percentages: "dependsOnLayoutModel", groups: [ "CSS Logical Properties" @@ -17960,7 +18729,7 @@ syntax: "<'margin-left'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: "length", percentages: "dependsOnLayoutModel", groups: [ "CSS Logical Properties" @@ -17986,7 +18755,8 @@ computed: "percentageAsSpecifiedOrAbsoluteLength", order: "uniqueOrder", alsoAppliesTo: [ - "::first-letter" + "::first-letter", + "::first-line" ], status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-bottom" @@ -18011,7 +18781,7 @@ syntax: "<'margin-left'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: "length", percentages: "dependsOnLayoutModel", groups: [ "CSS Logical Properties" @@ -18027,7 +18797,7 @@ syntax: "<'margin-left'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: "length", percentages: "dependsOnLayoutModel", groups: [ "CSS Logical Properties" @@ -18053,7 +18823,8 @@ computed: "percentageAsSpecifiedOrAbsoluteLength", order: "uniqueOrder", alsoAppliesTo: [ - "::first-letter" + "::first-letter", + "::first-line" ], status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-left" @@ -18072,7 +18843,8 @@ computed: "percentageAsSpecifiedOrAbsoluteLength", order: "uniqueOrder", alsoAppliesTo: [ - "::first-letter" + "::first-letter", + "::first-line" ], status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-right" @@ -18091,10 +18863,31 @@ computed: "percentageAsSpecifiedOrAbsoluteLength", order: "uniqueOrder", alsoAppliesTo: [ - "::first-letter" + "::first-letter", + "::first-line" ], status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-top" + }, + "margin-trim": { + syntax: "none | in-flow | all", + media: "visual", + inherited: false, + animationType: "discrete", + percentages: "no", + groups: [ + "CSS Box Model" + ], + initial: "none", + appliesto: "blockContainersAndMultiColumnContainers", + computed: "asSpecified", + order: "perGrammar", + alsoAppliesTo: [ + "::first-letter", + "::first-line" + ], + status: "experimental", + mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-trim" }, mask: mask, "mask-border": { @@ -18135,7 +18928,7 @@ ], order: "perGrammar", stacking: true, - status: "experimental", + status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border" }, "mask-border-mode": { @@ -18151,7 +18944,7 @@ appliesto: "allElementsSVGContainerElements", computed: "asSpecified", order: "perGrammar", - status: "experimental", + status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-mode" }, "mask-border-outset": { @@ -18167,7 +18960,7 @@ appliesto: "allElementsSVGContainerElements", computed: "asSpecifiedRelativeToAbsoluteLengths", order: "perGrammar", - status: "experimental", + status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-outset" }, "mask-border-repeat": { @@ -18183,7 +18976,7 @@ appliesto: "allElementsSVGContainerElements", computed: "asSpecified", order: "perGrammar", - status: "experimental", + status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-repeat" }, "mask-border-slice": { @@ -18199,7 +18992,7 @@ appliesto: "allElementsSVGContainerElements", computed: "asSpecified", order: "perGrammar", - status: "experimental", + status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-slice" }, "mask-border-source": { @@ -18215,7 +19008,7 @@ appliesto: "allElementsSVGContainerElements", computed: "asSpecifiedURLsAbsolute", order: "perGrammar", - status: "experimental", + status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-source" }, "mask-border-width": { @@ -18231,7 +19024,7 @@ appliesto: "allElementsSVGContainerElements", computed: "asSpecifiedRelativeToAbsoluteLengths", order: "perGrammar", - status: "experimental", + status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-width" }, "mask-clip": { @@ -18377,12 +19170,44 @@ order: "perGrammar", status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-type" + }, + "masonry-auto-flow": { + syntax: "[ pack | next ] || [ definite-first | ordered ]", + media: "visual", + inherited: false, + animationType: "discrete", + percentages: "no", + groups: [ + "CSS Grid Layout" + ], + initial: "pack", + appliesto: "gridContainersWithMasonryLayout", + computed: "asSpecified", + order: "uniqueOrder", + status: "experimental", + mdn_url: "https://developer.mozilla.org/docs/Web/CSS/masonry-auto-flow" + }, + "math-style": { + syntax: "normal | compact", + media: "visual", + inherited: true, + animationType: "notAnimatable", + percentages: "no", + groups: [ + "MathML" + ], + initial: "normal", + appliesto: "allElements", + computed: "asSpecified", + order: "perGrammar", + status: "standard", + mdn_url: "https://developer.mozilla.org/docs/Web/CSS/math-style" }, "max-block-size": { syntax: "<'max-width'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: "lpc", percentages: "blockSizeOfContainingBlock", groups: [ "CSS Logical Properties" @@ -18391,11 +19216,11 @@ appliesto: "sameAsWidthAndHeight", computed: "sameAsMaxWidthAndMaxHeight", order: "uniqueOrder", - status: "experimental", + status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/max-block-size" }, "max-height": { - syntax: " | | none | max-content | min-content | fit-content | fill-available", + syntax: "none | | min-content | max-content | fit-content()", media: "visual", inherited: false, animationType: "lpc", @@ -18414,7 +19239,7 @@ syntax: "<'max-width'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: "lpc", percentages: "inlineSizeOfContainingBlock", groups: [ "CSS Logical Properties" @@ -18423,7 +19248,7 @@ appliesto: "sameAsWidthAndHeight", computed: "sameAsMaxWidthAndMaxHeight", order: "uniqueOrder", - status: "experimental", + status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/max-inline-size" }, "max-lines": { @@ -18442,7 +19267,7 @@ status: "experimental" }, "max-width": { - syntax: " | | none | max-content | min-content | fit-content | fill-available", + syntax: "none | | min-content | max-content | fit-content()", media: "visual", inherited: false, animationType: "lpc", @@ -18461,7 +19286,7 @@ syntax: "<'min-width'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: "lpc", percentages: "blockSizeOfContainingBlock", groups: [ "CSS Logical Properties" @@ -18474,7 +19299,7 @@ mdn_url: "https://developer.mozilla.org/docs/Web/CSS/min-block-size" }, "min-height": { - syntax: " | | auto | max-content | min-content | fit-content | fill-available", + syntax: "auto | | | min-content | max-content | fit-content()", media: "visual", inherited: false, animationType: "lpc", @@ -18493,7 +19318,7 @@ syntax: "<'min-width'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: "lpc", percentages: "inlineSizeOfContainingBlock", groups: [ "CSS Logical Properties" @@ -18506,7 +19331,7 @@ mdn_url: "https://developer.mozilla.org/docs/Web/CSS/min-inline-size" }, "min-width": { - syntax: " | | auto | max-content | min-content | fit-content | fill-available", + syntax: "auto | | | min-content | max-content | fit-content()", media: "visual", inherited: false, animationType: "lpc", @@ -18584,7 +19409,7 @@ appliesto: "transformableElements", computed: "forLengthAbsoluteValueOtherwisePercentage", order: "perGrammar", - status: "experimental" + status: "standard" }, "offset-distance": { syntax: "", @@ -18599,11 +19424,11 @@ appliesto: "transformableElements", computed: "forLengthAbsoluteValueOtherwisePercentage", order: "perGrammar", - status: "experimental", + status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/offset-distance" }, "offset-path": { - syntax: "none | ray( [ && ? && contain? ] ) | | | [ || ]", + syntax: "none | ray( [ && && contain? ] ) | | | [ || ]", media: "visual", inherited: false, animationType: "angleOrBasicShapeOrPath", @@ -18616,7 +19441,7 @@ computed: "asSpecified", order: "perGrammar", stacking: true, - status: "experimental", + status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/offset-path" }, "offset-position": { @@ -18647,7 +19472,7 @@ appliesto: "transformableElements", computed: "asSpecified", order: "perGrammar", - status: "experimental", + status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/offset-rotate" }, opacity: opacity, @@ -18744,7 +19569,7 @@ appliesto: "allElements", computed: "asSpecified", order: "perGrammar", - status: "experimental" + status: "standard" }, "overflow-block": { syntax: "visible | hidden | clip | scroll | auto", @@ -18757,9 +19582,9 @@ ], initial: "auto", appliesto: "blockContainersFlexContainersGridContainers", - computed: "asSpecified", + computed: "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent", order: "perGrammar", - status: "experimental" + status: "standard" }, "overflow-clip-box": { syntax: "padding-box | content-box", @@ -18788,9 +19613,9 @@ ], initial: "auto", appliesto: "blockContainersFlexContainersGridContainers", - computed: "asSpecified", + computed: "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent", order: "perGrammar", - status: "experimental" + status: "standard" }, "overflow-wrap": { syntax: "normal | break-word | anywhere", @@ -18819,7 +19644,7 @@ ], initial: "visible", appliesto: "blockContainersFlexContainersGridContainers", - computed: "asSpecified", + computed: "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent", order: "uniqueOrder", status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow-x" @@ -18835,7 +19660,7 @@ ], initial: "visible", appliesto: "blockContainersFlexContainersGridContainers", - computed: "asSpecified", + computed: "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent", order: "uniqueOrder", status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow-y" @@ -18853,8 +19678,40 @@ appliesto: "nonReplacedBlockAndInlineBlockElements", computed: "asSpecified", order: "uniqueOrder", - status: "nonstandard", + status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior" + }, + "overscroll-behavior-block": { + syntax: "contain | none | auto", + media: "visual", + inherited: false, + animationType: "discrete", + percentages: "no", + groups: [ + "CSS Box Model" + ], + initial: "auto", + appliesto: "nonReplacedBlockAndInlineBlockElements", + computed: "asSpecified", + order: "uniqueOrder", + status: "standard", + mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block" + }, + "overscroll-behavior-inline": { + syntax: "contain | none | auto", + media: "visual", + inherited: false, + animationType: "discrete", + percentages: "no", + groups: [ + "CSS Box Model" + ], + initial: "auto", + appliesto: "nonReplacedBlockAndInlineBlockElements", + computed: "asSpecified", + order: "uniqueOrder", + status: "standard", + mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline" }, "overscroll-behavior-x": { syntax: "contain | none | auto", @@ -18869,7 +19726,7 @@ appliesto: "nonReplacedBlockAndInlineBlockElements", computed: "asSpecified", order: "uniqueOrder", - status: "nonstandard", + status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x" }, "overscroll-behavior-y": { @@ -18885,7 +19742,7 @@ appliesto: "nonReplacedBlockAndInlineBlockElements", computed: "asSpecified", order: "uniqueOrder", - status: "nonstandard", + status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y" }, padding: padding, @@ -18909,7 +19766,7 @@ syntax: "<'padding-left'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: "length", percentages: "logicalWidthOfContainingBlock", groups: [ "CSS Logical Properties" @@ -18925,7 +19782,7 @@ syntax: "<'padding-left'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: "length", percentages: "logicalWidthOfContainingBlock", groups: [ "CSS Logical Properties" @@ -18951,7 +19808,8 @@ computed: "percentageAsSpecifiedOrAbsoluteLength", order: "uniqueOrder", alsoAppliesTo: [ - "::first-letter" + "::first-letter", + "::first-line" ], status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-bottom" @@ -18976,7 +19834,7 @@ syntax: "<'padding-left'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: "length", percentages: "logicalWidthOfContainingBlock", groups: [ "CSS Logical Properties" @@ -18992,7 +19850,7 @@ syntax: "<'padding-left'>", media: "visual", inherited: false, - animationType: "discrete", + animationType: "length", percentages: "logicalWidthOfContainingBlock", groups: [ "CSS Logical Properties" @@ -19018,7 +19876,8 @@ computed: "percentageAsSpecifiedOrAbsoluteLength", order: "uniqueOrder", alsoAppliesTo: [ - "::first-letter" + "::first-letter", + "::first-line" ], status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-left" @@ -19037,7 +19896,8 @@ computed: "percentageAsSpecifiedOrAbsoluteLength", order: "uniqueOrder", alsoAppliesTo: [ - "::first-letter" + "::first-letter", + "::first-line" ], status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-right" @@ -19056,7 +19916,8 @@ computed: "percentageAsSpecifiedOrAbsoluteLength", order: "uniqueOrder", alsoAppliesTo: [ - "::first-letter" + "::first-letter", + "::first-line" ], status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-top" @@ -19131,7 +19992,7 @@ appliesto: "textElements", computed: "asSpecified", order: "uniqueOrder", - status: "experimental", + status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/paint-order" }, perspective: perspective, @@ -19227,7 +20088,7 @@ status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/pointer-events" }, - position: position, + position: position$1, quotes: quotes, resize: resize, right: right, @@ -19311,6 +20172,22 @@ order: "perGrammar", status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scrollbar-color" + }, + "scrollbar-gutter": { + syntax: "auto | [ stable | always ] && both? && force?", + media: "visual", + inherited: false, + animationType: "discrete", + percentages: "no", + groups: [ + "CSS Overflow" + ], + initial: "auto", + appliesto: "allElements", + computed: "asSpecified", + order: "perGrammar", + status: "standard", + mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scrollbar-gutter" }, "scrollbar-width": { syntax: "auto | thin | none", @@ -19959,7 +20836,7 @@ syntax: "none | all | [ digits ? ]", media: "visual", inherited: true, - animationType: "discrete", + animationType: "notAnimatable", percentages: "no", groups: [ "CSS Writing Modes" @@ -20065,7 +20942,7 @@ mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip" }, "text-decoration-skip-ink": { - syntax: "auto | none", + syntax: "auto | all | none", media: "visual", inherited: true, animationType: "discrete", @@ -20077,7 +20954,7 @@ appliesto: "allElements", computed: "asSpecified", order: "orderOfAppearance", - status: "experimental", + status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink" }, "text-decoration-style": { @@ -20102,11 +20979,11 @@ mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-style" }, "text-decoration-thickness": { - syntax: "auto | from-font | ", + syntax: "auto | from-font | | ", media: "visual", inherited: false, animationType: "byComputedValueType", - percentages: "no", + percentages: "referToElementFontSize", groups: [ "CSS Text Decoration" ], @@ -20337,11 +21214,11 @@ mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-transform" }, "text-underline-offset": { - syntax: "auto | from-font | ", + syntax: "auto | | ", media: "visual", inherited: true, animationType: "byComputedValueType", - percentages: "no", + percentages: "referToElementFontSize", groups: [ "CSS Text Decoration" ], @@ -20358,7 +21235,7 @@ mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-underline-offset" }, "text-underline-position": { - syntax: "auto | [ under || [ left | right ] ]", + syntax: "auto | from-font | [ under || [ left | right ] ]", media: "visual", inherited: true, animationType: "discrete", @@ -20392,7 +21269,7 @@ }, transform: transform, "transform-box": { - syntax: "border-box | fill-box | view-box", + syntax: "content-box | border-box | fill-box | stroke-box | view-box", media: "visual", inherited: false, animationType: "discrete", @@ -20400,10 +21277,10 @@ groups: [ "CSS Transforms" ], - initial: "border-box ", + initial: "view-box", appliesto: "transformableElements", computed: "asSpecified", - order: "uniqueOrder", + order: "perGrammar", status: "standard", mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transform-box" }, @@ -20683,77 +21560,18 @@ zoom: zoom }; - var properties$2 = /*#__PURE__*/Object.freeze({ - __proto__: null, - all: all, - animation: animation, - appearance: appearance, - azimuth: azimuth, - background: background, - border: border, - bottom: bottom, - clear: clear, - clip: clip, - color: color, - columns: columns, - contain: contain, - content: content, - cursor: cursor, - direction: direction, - display: display, - filter: filter, - flex: flex, - float: float, - font: font, - gap: gap, - grid: grid, - height: height, - hyphens: hyphens, - inset: inset, - isolation: isolation, - left: left, - margin: margin, - mask: mask, - offset: offset, - opacity: opacity, - order: order, - orphans: orphans, - outline: outline, - overflow: overflow, - padding: padding, - perspective: perspective, - position: position, - quotes: quotes, - resize: resize, - right: right, - rotate: rotate, - scale: scale, - top: top, - transform: transform, - transition: transition, - translate: translate, - visibility: visibility, - widows: widows, - width: width, - zoom: zoom, - 'default': properties$1 - }); - var attachment = { syntax: "scroll | fixed | local" }; var box = { syntax: "border-box | padding-box | content-box" }; - var color$1 = { + var color = { syntax: " | | | | | | currentcolor | " }; var combinator = { syntax: "'>' | '+' | '~' | [ '||' ]" }; - var compat = { - syntax: "searchfield | textarea | push-button | button-bevel | slider-horizontal | checkbox | radio | square-button | menulist | menulist-button | listbox | meter | progress-bar" - }; var gradient = { syntax: " | | | | " }; @@ -20763,10 +21581,10 @@ var image = { syntax: " | | | | | | " }; - var nth = { + var nth$1 = { syntax: " | even | odd" }; - var position$1 = { + var position = { syntax: "[ [ left | center | right ] || [ top | center | bottom ] | [ left | center | right | ] [ top | center | bottom | ]? | [ [ left | right ] ] && [ [ top | bottom ] ] ]" }; var quote = { @@ -20775,7 +21593,7 @@ var shadow = { syntax: "inset? && {2,4} && ?" }; - var shape$1 = { + var shape = { syntax: "rect(, , , )" }; var size = { @@ -20787,7 +21605,7 @@ var target = { syntax: " | | " }; - var syntaxes = { + var require$$2 = { "absolute-size": { syntax: "xx-small | x-small | small | medium | large | x-large | xx-large | xxx-large" }, @@ -20832,7 +21650,7 @@ syntax: "[ first | last ]? baseline" }, "basic-shape": { - syntax: " | | | " + syntax: " | | | | " }, "bg-image": { syntax: "none | " @@ -20886,7 +21704,7 @@ "clip-source": { syntax: "" }, - color: color$1, + color: color, "color-stop": { syntax: " | " }, @@ -20903,7 +21721,9 @@ "common-lig-values": { syntax: "[ common-ligatures | no-common-ligatures ]" }, - compat: compat, + "compat-auto": { + syntax: "searchfield | textarea | push-button | slider-horizontal | checkbox | radio | square-button | menulist | listbox | meter | progress-bar | button" + }, "composite-style": { syntax: "clear | copy | source-over | source-in | source-out | source-atop | destination-over | destination-in | destination-out | destination-atop | xor" }, @@ -20959,7 +21779,7 @@ syntax: "cross-fade( , ? )" }, "cubic-bezier-timing-function": { - syntax: "ease | ease-in | ease-out | ease-in-out | cubic-bezier(, , , )" + syntax: "ease | ease-in | ease-out | ease-in-out | cubic-bezier(, , , )" }, "deprecated-system-color": { syntax: "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" @@ -21064,7 +21884,7 @@ syntax: "[ normal | small-caps ]" }, "font-weight-absolute": { - syntax: "normal | bold | " + syntax: "normal | bold | " }, "frequency-percentage": { syntax: " | " @@ -21244,7 +22064,7 @@ syntax: "min( # )" }, "minmax()": { - syntax: "minmax( [ | | | min-content | max-content | auto ] , [ | | | min-content | max-content | auto ] )" + syntax: "minmax( [ | | min-content | max-content | auto ] , [ | | | min-content | max-content | auto ] )" }, "named-color": { syntax: "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" @@ -21267,7 +22087,7 @@ "numeric-spacing-values": { syntax: "[ proportional-nums | tabular-nums ]" }, - nth: nth, + nth: nth$1, "opacity()": { syntax: "opacity( [ ] )" }, @@ -21291,6 +22111,9 @@ }, "page-selector": { syntax: "+ | *" + }, + "path()": { + syntax: "path( [ , ]? )" }, "paint()": { syntax: "paint( , ? )" @@ -21301,7 +22124,7 @@ "polygon()": { syntax: "polygon( ? , [ ]# )" }, - position: position$1, + position: position, "pseudo-class-selector": { syntax: "':' | ':' ')'" }, @@ -21394,7 +22217,7 @@ "shadow-t": { syntax: "[ {2,3} && ? ]" }, - shape: shape$1, + shape: shape, "shape-box": { syntax: " | margin-box" }, @@ -21514,28 +22337,20 @@ } }; - var syntaxes$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - attachment: attachment, - box: box, - color: color$1, - combinator: combinator, - compat: compat, - gradient: gradient, - hue: hue, - image: image, - nth: nth, - position: position$1, - quote: quote, - shadow: shadow, - shape: shape$1, - size: size, - symbol: symbol, - target: target, - 'default': syntaxes - }); - - var properties$3 = { + var atrules = { + charset: { + prelude: "" + }, + "font-face": { + descriptors: { + "unicode-range": { + comment: "replaces , an old production name", + syntax: "#" + } + } + } + }; + var properties = { "-moz-background-clip": { comment: "deprecated syntax in old Firefox, https://developer.mozilla.org/en/docs/Web/CSS/background-clip", syntax: "padding | border" @@ -21608,18 +22423,10 @@ comment: "add this property first since it uses as fallback for flexbox, https://msdn.microsoft.com/en-us/library/windows/apps/hh466338.aspx", syntax: "start | end | center | stretch" }, - "-ms-grid-columns": { - comment: "misssed old syntax implemented in IE; https://www.w3.org/TR/2012/WD-css3-grid-layout-20120322/#grid-columns", - syntax: "" - }, "-ms-grid-row-align": { comment: "add this property first since it uses as fallback for flexbox, https://msdn.microsoft.com/en-us/library/windows/apps/hh466348.aspx", syntax: "start | end | center | stretch" }, - "-ms-grid-rows": { - comment: "misssed old syntax implemented in IE; https://www.w3.org/TR/2012/WD-css3-grid-layout-20120322/#grid-rows", - syntax: "" - }, "-ms-hyphenate-limit-last": { comment: "misssed old syntax implemented in IE; https://www.w3.org/TR/css-text-4/#hyphenate-line-limits", syntax: "none | always | column | page | spread" @@ -21629,7 +22436,7 @@ references: [ "http://css-infos.net/property/-webkit-appearance" ], - syntax: "none | button | button-bevel | caps-lock-indicator | caret | checkbox | default-button | listbox | listitem | media-fullscreen-button | media-mute-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | 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" + syntax: "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-background-clip": { comment: "https://developer.mozilla.org/en/docs/Web/CSS/background-clip", @@ -21720,11 +22527,11 @@ }, display: { comment: "extended with -ms-flexbox", - syntax: "block | contents | flex | flow | flow-root | grid | inline | inline-block | inline-flex | inline-grid | inline-list-item | inline-table | list-item | none | ruby | ruby-base | ruby-base-container | ruby-text | ruby-text-container | run-in | table | table-caption | table-cell | table-column | table-column-group | table-footer-group | table-header-group | table-row | table-row-group | -ms-flexbox | -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" + syntax: "| <-non-standard-display>" }, position: { comment: "extended with -webkit-sticky", - syntax: "static | relative | absolute | sticky | fixed | -webkit-sticky" + syntax: "| -webkit-sticky" }, "dominant-baseline": { comment: "added SVG property", @@ -21739,7 +22546,7 @@ "https://developer.mozilla.org/en/docs/Web/CSS/image-rendering", "https://www.w3.org/TR/SVG/painting.html#ImageRenderingProperty" ], - syntax: "auto | crisp-edges | pixelated | optimizeSpeed | optimizeQuality | <-non-standard-image-rendering>" + syntax: "| optimizeSpeed | optimizeQuality | <-non-standard-image-rendering>" }, fill: { comment: "added SVG property", @@ -21764,7 +22571,7 @@ }, filter: { comment: "extend with IE legacy syntaxes", - syntax: "none | | <-ms-filter-function-list>" + syntax: "| <-ms-filter-function-list>" }, "glyph-orientation-horizontal": { comment: "added SVG property", @@ -21823,20 +22630,20 @@ syntax: "none | " }, "max-width": { - comment: "extend by non-standard width keywords https://developer.mozilla.org/en-US/docs/Web/CSS/max-width", - syntax: " | | none | max-content | min-content | fit-content | fill-available | <-non-standard-width>" + comment: "fix auto -> none (https://github.com/mdn/data/pull/431); extend by non-standard width keywords https://developer.mozilla.org/en-US/docs/Web/CSS/max-width", + syntax: "none | | min-content | max-content | fit-content() | <-non-standard-width>" + }, + width: { + comment: "per spec fit-content should be a function, however browsers are supporting it as a keyword (https://github.com/csstree/stylelint-validator/issues/29)", + syntax: "| fit-content | -moz-fit-content | -webkit-fit-content" }, "min-width": { comment: "extend by non-standard width keywords https://developer.mozilla.org/en-US/docs/Web/CSS/width", - syntax: " | | auto | max-content | min-content | fit-content | fill-available | <-non-standard-width>" - }, - opacity: { - comment: "strict to 0..1 -> ", - syntax: "" + syntax: "auto | | min-content | max-content | fit-content() | <-non-standard-width>" }, overflow: { comment: "extend by vendor keywords https://developer.mozilla.org/en-US/docs/Web/CSS/overflow", - syntax: "[ visible | hidden | clip | scroll | auto ]{1,2} | <-non-standard-overflow>" + syntax: "| <-non-standard-overflow>" }, pause: { comment: "https://www.w3.org/TR/css3-speech/#property-index", @@ -21946,7 +22753,7 @@ }, "unicode-bidi": { comment: "added prefixed keywords https://developer.mozilla.org/en-US/docs/Web/CSS/unicode-bidi", - syntax: "normal | embed | isolate | bidi-override | isolate-override | plaintext | -moz-isolate | -moz-isolate-override | -moz-plaintext | -webkit-isolate" + syntax: "| -moz-isolate | -moz-isolate-override | -moz-plaintext | -webkit-isolate | -webkit-isolate-override | -webkit-plaintext" }, "unicode-range": { comment: "added missed property https://developer.mozilla.org/en-US/docs/Web/CSS/%40font-face/unicode-range", @@ -21986,10 +22793,10 @@ }, "writing-mode": { comment: "extend with SVG keywords", - syntax: "horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr | " + syntax: "| " } }; - var syntaxes$2 = { + var syntaxes = { "-legacy-gradient": { comment: "added collection of legacy gradient syntaxes", syntax: "<-webkit-gradient()> | <-legacy-linear-gradient> | <-legacy-repeating-linear-gradient> | <-legacy-radial-gradient> | <-legacy-repeating-radial-gradient>" @@ -22051,7 +22858,7 @@ }, "-non-standard-width": { comment: "non-standard keywords https://developer.mozilla.org/en-US/docs/Web/CSS/width", - syntax: "min-intrinsic | intrinsic | -moz-min-content | -moz-max-content | -webkit-min-content | -webkit-max-content" + syntax: "fill-available | min-intrinsic | intrinsic | -moz-available | -moz-fit-content | -moz-min-content | -moz-max-content | -webkit-min-content | -webkit-max-content" }, "-webkit-gradient()": { comment: "first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/ - TODO: simplify when after match algorithm improvement ( [, point, radius | , point] -> [, radius]? , point )", @@ -22120,7 +22927,11 @@ }, "content-list": { comment: "missed -> https://drafts.csswg.org/css-content/#typedef-content-list (document-url, and leader() is omitted util stabilization)", - syntax: "[ | contents | | | | counter( , <'list-style-type'>? ) ]+" + syntax: "[ | contents | | | | | | counter( , <'list-style-type'>? ) ]+" + }, + "element()": { + comment: "https://drafts.csswg.org/css-gcpm/#element-syntax & https://drafts.csswg.org/css-images-4/#element-notation", + syntax: "element( , [ first | start | last | first-except ]? ) | element( )" }, "generic-voice": { comment: "https://www.w3.org/TR/css3-speech/#voice-family", @@ -22135,11 +22946,11 @@ references: [ "https://webkit.org/blog/3709/using-the-system-font-in-web-content/" ], - syntax: "serif | sans-serif | cursive | fantasy | monospace | -apple-system" + syntax: "| -apple-system" }, gradient: { comment: "added legacy syntaxes support", - syntax: " | | | | | <-legacy-gradient>" + syntax: "| <-legacy-gradient>" }, left: { comment: "missed; not sure we should add it, but no others except `shape` is using it so it's ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect", @@ -22155,15 +22966,15 @@ }, "named-color": { comment: "added non standard color names", - syntax: "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>" + syntax: "| <-non-standard-color>" }, paint: { comment: "used by SVG https://www.w3.org/TR/SVG/painting.html#SpecifyingPaint", syntax: "none | | [ none | ]? | context-fill | context-stroke" }, - "path()": { - comment: "missed, `motion` property was renamed, but left it as is for now; path() syntax was get from last draft https://drafts.fxtf.org/motion-1/#funcdef-offset-path-path", - syntax: "path( )" + "page-size": { + comment: "https://www.w3.org/TR/css-page-3/#typedef-page-size-page-size", + syntax: "A5 | A4 | A3 | B5 | B4 | JIS-B5 | JIS-B4 | letter | legal | ledger" }, ratio: { comment: "missed, https://drafts.csswg.org/mediaqueries-4/#typedef-ratio", @@ -22240,39 +23051,34 @@ }, "positive-integer": { syntax: "" + }, + "-non-standard-display": { + syntax: "-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" } }; - var patch = { - properties: properties$3, - syntaxes: syntaxes$2 + var require$$3 = { + atrules: atrules, + properties: properties, + syntaxes: syntaxes }; - var patch$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - properties: properties$3, - syntaxes: syntaxes$2, - 'default': patch - }); - - var mdnAtrules = getCjsExportFromNamespace(atRules$1); - - var mdnProperties = getCjsExportFromNamespace(properties$2); - - var mdnSyntaxes = getCjsExportFromNamespace(syntaxes$1); - - var patch$2 = getCjsExportFromNamespace(patch$1); + const mdnAtrules = require$$0; + const mdnProperties = require$$1; + const mdnSyntaxes = require$$2; + const patch = require$$3; + const extendSyntax = /^\s*\|\s*/; function preprocessAtrules(dict) { - var result = Object.create(null); + const result = Object.create(null); - for (var atruleName in dict) { - var atrule = dict[atruleName]; - var descriptors = null; + for (const atruleName in dict) { + const atrule = dict[atruleName]; + let descriptors = null; if (atrule.descriptors) { descriptors = Object.create(null); - for (var descriptor in atrule.descriptors) { + for (const descriptor in atrule.descriptors) { descriptors[descriptor] = atrule.descriptors[descriptor].syntax; } } @@ -22286,25 +23092,27 @@ return result; } - function buildDictionary(dict, patchDict) { - var result = {}; + function patchDictionary(dict, patchDict) { + const result = {}; // copy all syntaxes for an original dict - for (var key in dict) { - result[key] = dict[key].syntax; + for (const key in dict) { + result[key] = dict[key].syntax || dict[key]; } // apply a patch - for (var key in patchDict) { + for (const key in patchDict) { if (key in dict) { if (patchDict[key].syntax) { - result[key] = patchDict[key].syntax; + result[key] = extendSyntax.test(patchDict[key].syntax) + ? result[key] + ' ' + patchDict[key].syntax.trim() + : patchDict[key].syntax; } else { delete result[key]; } } else { if (patchDict[key].syntax) { - result[key] = patchDict[key].syntax; + result[key] = patchDict[key].syntax.replace(extendSyntax, ''); } } } @@ -22312,32 +23120,72 @@ return result; } - var data = { - types: buildDictionary(mdnSyntaxes, patch$2.syntaxes), - atrules: preprocessAtrules(mdnAtrules), - properties: buildDictionary(mdnProperties, patch$2.properties) + function unpackSyntaxes(dict) { + const result = {}; + + for (const key in dict) { + result[key] = dict[key].syntax; + } + + return result; + } + + function patchAtrules(dict, patchDict) { + const result = {}; + + // copy all syntaxes for an original dict + for (const key in dict) { + const patchDescriptors = (patchDict[key] && patchDict[key].descriptors) || null; + + result[key] = { + prelude: key in patchDict && 'prelude' in patchDict[key] + ? patchDict[key].prelude + : dict[key].prelude || null, + descriptors: dict[key].descriptors + ? patchDictionary(dict[key].descriptors, patchDescriptors || {}) + : patchDescriptors && unpackSyntaxes(patchDescriptors) + }; + } + + // apply a patch + for (const key in patchDict) { + if (!hasOwnProperty.call(dict, key)) { + result[key] = { + prelude: patchDict[key].prelude || null, + descriptors: patchDict[key].descriptors && unpackSyntaxes(patchDict[key].descriptors) + }; + } + } + + return result; + } + + var data$1 = { + types: patchDictionary(mdnSyntaxes, patch.syntaxes), + atrules: patchAtrules(preprocessAtrules(mdnAtrules), patch.atrules), + properties: patchDictionary(mdnProperties, patch.properties) }; - var cmpChar$3 = tokenizer.cmpChar; - var isDigit$4 = tokenizer.isDigit; - var TYPE$9 = tokenizer.TYPE; + var cmpChar$2 = tokenizer$3.cmpChar; + var isDigit$1 = tokenizer$3.isDigit; + var TYPE$y = tokenizer$3.TYPE; - var WHITESPACE$4 = TYPE$9.WhiteSpace; - var COMMENT$3 = TYPE$9.Comment; - var IDENT$3 = TYPE$9.Ident; - var NUMBER$3 = TYPE$9.Number; - var DIMENSION$2 = TYPE$9.Dimension; - var PLUSSIGN$3 = 0x002B; // U+002B PLUS SIGN (+) - var HYPHENMINUS$3 = 0x002D; // U+002D HYPHEN-MINUS (-) - var N$4 = 0x006E; // U+006E LATIN SMALL LETTER N (n) - var DISALLOW_SIGN$1 = true; - var ALLOW_SIGN$1 = false; + var WHITESPACE$8 = TYPE$y.WhiteSpace; + var COMMENT$6 = TYPE$y.Comment; + var IDENT$f = TYPE$y.Ident; + var NUMBER$6 = TYPE$y.Number; + var DIMENSION$5 = TYPE$y.Dimension; + var PLUSSIGN$5 = 0x002B; // U+002B PLUS SIGN (+) + var HYPHENMINUS$2 = 0x002D; // U+002D HYPHEN-MINUS (-) + var N = 0x006E; // U+006E LATIN SMALL LETTER N (n) + var DISALLOW_SIGN = true; + var ALLOW_SIGN = false; - function checkInteger$1(offset, disallowSign) { + function checkInteger(offset, disallowSign) { var pos = this.scanner.tokenStart + offset; var code = this.scanner.source.charCodeAt(pos); - if (code === PLUSSIGN$3 || code === HYPHENMINUS$3) { + if (code === PLUSSIGN$5 || code === HYPHENMINUS$2) { if (disallowSign) { this.error('Number sign is not allowed'); } @@ -22345,25 +23193,25 @@ } for (; pos < this.scanner.tokenEnd; pos++) { - if (!isDigit$4(this.scanner.source.charCodeAt(pos))) { + if (!isDigit$1(this.scanner.source.charCodeAt(pos))) { this.error('Integer is expected', pos); } } } function checkTokenIsInteger(disallowSign) { - return checkInteger$1.call(this, 0, disallowSign); + return checkInteger.call(this, 0, disallowSign); } function expectCharCode(offset, code) { - if (!cmpChar$3(this.scanner.source, this.scanner.tokenStart + offset, code)) { + if (!cmpChar$2(this.scanner.source, this.scanner.tokenStart + offset, code)) { var msg = ''; switch (code) { - case N$4: + case N: msg = 'N is expected'; break; - case HYPHENMINUS$3: + case HYPHENMINUS$2: msg = 'HyphenMinus is expected'; break; } @@ -22374,27 +23222,27 @@ // ... // ... ['+' | '-'] - function consumeB$1() { + function consumeB() { var offset = 0; var sign = 0; var type = this.scanner.tokenType; - while (type === WHITESPACE$4 || type === COMMENT$3) { + while (type === WHITESPACE$8 || type === COMMENT$6) { type = this.scanner.lookupType(++offset); } - if (type !== NUMBER$3) { - if (this.scanner.isDelim(PLUSSIGN$3, offset) || - this.scanner.isDelim(HYPHENMINUS$3, offset)) { - sign = this.scanner.isDelim(PLUSSIGN$3, offset) ? PLUSSIGN$3 : HYPHENMINUS$3; + if (type !== NUMBER$6) { + if (this.scanner.isDelim(PLUSSIGN$5, offset) || + this.scanner.isDelim(HYPHENMINUS$2, offset)) { + sign = this.scanner.isDelim(PLUSSIGN$5, offset) ? PLUSSIGN$5 : HYPHENMINUS$2; do { type = this.scanner.lookupType(++offset); - } while (type === WHITESPACE$4 || type === COMMENT$3); + } while (type === WHITESPACE$8 || type === COMMENT$6); - if (type !== NUMBER$3) { + if (type !== NUMBER$6) { this.scanner.skip(offset); - checkTokenIsInteger.call(this, DISALLOW_SIGN$1); + checkTokenIsInteger.call(this, DISALLOW_SIGN); } } else { return null; @@ -22407,13 +23255,13 @@ if (sign === 0) { type = this.scanner.source.charCodeAt(this.scanner.tokenStart); - if (type !== PLUSSIGN$3 && type !== HYPHENMINUS$3) { + if (type !== PLUSSIGN$5 && type !== HYPHENMINUS$2) { this.error('Number sign is expected'); } } checkTokenIsInteger.call(this, sign !== 0); - return sign === HYPHENMINUS$3 ? '-' + this.consume(NUMBER$3) : this.consume(NUMBER$3); + return sign === HYPHENMINUS$2 ? '-' + this.consume(NUMBER$6) : this.consume(NUMBER$6); } // An+B microsyntax https://www.w3.org/TR/css-syntax-3/#anb @@ -22430,9 +23278,9 @@ var b = null; // - if (this.scanner.tokenType === NUMBER$3) { - checkTokenIsInteger.call(this, ALLOW_SIGN$1); - b = this.consume(NUMBER$3); + if (this.scanner.tokenType === NUMBER$6) { + checkTokenIsInteger.call(this, ALLOW_SIGN); + b = this.consume(NUMBER$6); } // -n @@ -22440,10 +23288,10 @@ // -n ['+' | '-'] // -n- // - else if (this.scanner.tokenType === IDENT$3 && cmpChar$3(this.scanner.source, this.scanner.tokenStart, HYPHENMINUS$3)) { + else if (this.scanner.tokenType === IDENT$f && cmpChar$2(this.scanner.source, this.scanner.tokenStart, HYPHENMINUS$2)) { a = '-1'; - expectCharCode.call(this, 1, N$4); + expectCharCode.call(this, 1, N); switch (this.scanner.getTokenLength()) { // -n @@ -22451,25 +23299,25 @@ // -n ['+' | '-'] case 2: this.scanner.next(); - b = consumeB$1.call(this); + b = consumeB.call(this); break; // -n- case 3: - expectCharCode.call(this, 2, HYPHENMINUS$3); + expectCharCode.call(this, 2, HYPHENMINUS$2); this.scanner.next(); this.scanner.skipSC(); - checkTokenIsInteger.call(this, DISALLOW_SIGN$1); + checkTokenIsInteger.call(this, DISALLOW_SIGN); - b = '-' + this.consume(NUMBER$3); + b = '-' + this.consume(NUMBER$6); break; // default: - expectCharCode.call(this, 2, HYPHENMINUS$3); - checkInteger$1.call(this, 3, DISALLOW_SIGN$1); + expectCharCode.call(this, 2, HYPHENMINUS$2); + checkInteger.call(this, 3, DISALLOW_SIGN); this.scanner.next(); b = this.scanner.substrToCursor(start + 2); @@ -22481,17 +23329,17 @@ // '+'? n ['+' | '-'] // '+'? n- // '+'? - else if (this.scanner.tokenType === IDENT$3 || (this.scanner.isDelim(PLUSSIGN$3) && this.scanner.lookupType(1) === IDENT$3)) { + else if (this.scanner.tokenType === IDENT$f || (this.scanner.isDelim(PLUSSIGN$5) && this.scanner.lookupType(1) === IDENT$f)) { var sign = 0; a = '1'; // just ignore a plus - if (this.scanner.isDelim(PLUSSIGN$3)) { + if (this.scanner.isDelim(PLUSSIGN$5)) { sign = 1; this.scanner.next(); } - expectCharCode.call(this, 0, N$4); + expectCharCode.call(this, 0, N); switch (this.scanner.getTokenLength()) { // '+'? n @@ -22499,25 +23347,25 @@ // '+'? n ['+' | '-'] case 1: this.scanner.next(); - b = consumeB$1.call(this); + b = consumeB.call(this); break; // '+'? n- case 2: - expectCharCode.call(this, 1, HYPHENMINUS$3); + expectCharCode.call(this, 1, HYPHENMINUS$2); this.scanner.next(); this.scanner.skipSC(); - checkTokenIsInteger.call(this, DISALLOW_SIGN$1); + checkTokenIsInteger.call(this, DISALLOW_SIGN); - b = '-' + this.consume(NUMBER$3); + b = '-' + this.consume(NUMBER$6); break; // '+'? default: - expectCharCode.call(this, 1, HYPHENMINUS$3); - checkInteger$1.call(this, 2, DISALLOW_SIGN$1); + expectCharCode.call(this, 1, HYPHENMINUS$2); + checkInteger.call(this, 2, DISALLOW_SIGN); this.scanner.next(); b = this.scanner.substrToCursor(start + sign + 1); @@ -22529,12 +23377,12 @@ // // // ['+' | '-'] - else if (this.scanner.tokenType === DIMENSION$2) { + else if (this.scanner.tokenType === DIMENSION$5) { var code = this.scanner.source.charCodeAt(this.scanner.tokenStart); - var sign = code === PLUSSIGN$3 || code === HYPHENMINUS$3; + var sign = code === PLUSSIGN$5 || code === HYPHENMINUS$2; for (var i = this.scanner.tokenStart + sign; i < this.scanner.tokenEnd; i++) { - if (!isDigit$4(this.scanner.source.charCodeAt(i))) { + if (!isDigit$1(this.scanner.source.charCodeAt(i))) { break; } } @@ -22543,7 +23391,7 @@ this.error('Integer is expected', this.scanner.tokenStart + sign); } - expectCharCode.call(this, i - this.scanner.tokenStart, N$4); + expectCharCode.call(this, i - this.scanner.tokenStart, N); a = this.scanner.source.substring(start, i); // @@ -22551,20 +23399,20 @@ // ['+' | '-'] if (i + 1 === this.scanner.tokenEnd) { this.scanner.next(); - b = consumeB$1.call(this); + b = consumeB.call(this); } else { - expectCharCode.call(this, i - this.scanner.tokenStart + 1, HYPHENMINUS$3); + expectCharCode.call(this, i - this.scanner.tokenStart + 1, HYPHENMINUS$2); // if (i + 2 === this.scanner.tokenEnd) { this.scanner.next(); this.scanner.skipSC(); - checkTokenIsInteger.call(this, DISALLOW_SIGN$1); - b = '-' + this.consume(NUMBER$3); + checkTokenIsInteger.call(this, DISALLOW_SIGN); + b = '-' + this.consume(NUMBER$6); } // else { - checkInteger$1.call(this, i - this.scanner.tokenStart + 2, DISALLOW_SIGN$1); + checkInteger.call(this, i - this.scanner.tokenStart + 2, DISALLOW_SIGN); this.scanner.next(); b = this.scanner.substrToCursor(i + 1); } @@ -22573,11 +23421,11 @@ this.error(); } - if (a !== null && a.charCodeAt(0) === PLUSSIGN$3) { + if (a !== null && a.charCodeAt(0) === PLUSSIGN$5) { a = a.substr(1); } - if (b !== null && b.charCodeAt(0) === PLUSSIGN$3) { + if (b !== null && b.charCodeAt(0) === PLUSSIGN$5) { b = b.substr(1); } @@ -22616,17 +23464,18 @@ } }; - var TYPE$a = tokenizer.TYPE; + var tokenizer = tokenizer$3; + var TYPE$x = tokenizer.TYPE; - var WhiteSpace = TYPE$a.WhiteSpace; - var Semicolon = TYPE$a.Semicolon; - var LeftCurlyBracket = TYPE$a.LeftCurlyBracket; - var Delim = TYPE$a.Delim; - var EXCLAMATIONMARK$1 = 0x0021; // U+0021 EXCLAMATION MARK (!) + var WhiteSpace$1 = TYPE$x.WhiteSpace; + var Semicolon = TYPE$x.Semicolon; + var LeftCurlyBracket = TYPE$x.LeftCurlyBracket; + var Delim = TYPE$x.Delim; + var EXCLAMATIONMARK$2 = 0x0021; // U+0021 EXCLAMATION MARK (!) function getOffsetExcludeWS() { if (this.scanner.tokenIndex > 0) { - if (this.scanner.lookupType(-1) === WhiteSpace) { + if (this.scanner.lookupType(-1) === WhiteSpace$1) { return this.scanner.tokenIndex > 1 ? this.scanner.getTokenStart(this.scanner.tokenIndex - 1) : this.scanner.firstCharOffset; @@ -22653,7 +23502,7 @@ // EXCLAMATIONMARK, SEMICOLON, false function exclamationMarkOrSemicolon(tokenType, source, offset) { - if (tokenType === Delim && source.charCodeAt(offset) === EXCLAMATIONMARK$1) { + if (tokenType === Delim && source.charCodeAt(offset) === EXCLAMATIONMARK$2) { return 1; } @@ -22703,16 +23552,16 @@ } }; - var TYPE$b = tokenizer.TYPE; - var rawMode = Raw.mode; + var TYPE$w = tokenizer$3.TYPE; + var rawMode$5 = Raw.mode; - var ATKEYWORD = TYPE$b.AtKeyword; - var SEMICOLON = TYPE$b.Semicolon; - var LEFTCURLYBRACKET$1 = TYPE$b.LeftCurlyBracket; - var RIGHTCURLYBRACKET$1 = TYPE$b.RightCurlyBracket; + var ATKEYWORD$2 = TYPE$w.AtKeyword; + var SEMICOLON$4 = TYPE$w.Semicolon; + var LEFTCURLYBRACKET$3 = TYPE$w.LeftCurlyBracket; + var RIGHTCURLYBRACKET$1 = TYPE$w.RightCurlyBracket; - function consumeRaw(startToken) { - return this.Raw(startToken, rawMode.leftCurlyBracketOrSemicolon, true); + function consumeRaw$5(startToken) { + return this.Raw(startToken, rawMode$5.leftCurlyBracketOrSemicolon, true); } function isDeclarationBlockAtrule() { @@ -22721,8 +23570,8 @@ return true; } - if (type === LEFTCURLYBRACKET$1 || - type === ATKEYWORD) { + if (type === LEFTCURLYBRACKET$3 || + type === ATKEYWORD$2) { return false; } } @@ -22744,7 +23593,7 @@ var prelude = null; var block = null; - this.eat(ATKEYWORD); + this.eat(ATKEYWORD$2); name = this.scanner.substrToCursor(start + 1); nameLowerCase = name.toLowerCase(); @@ -22752,28 +23601,28 @@ // parse prelude if (this.scanner.eof === false && - this.scanner.tokenType !== LEFTCURLYBRACKET$1 && - this.scanner.tokenType !== SEMICOLON) { + this.scanner.tokenType !== LEFTCURLYBRACKET$3 && + this.scanner.tokenType !== SEMICOLON$4) { if (this.parseAtrulePrelude) { - prelude = this.parseWithFallback(this.AtrulePrelude.bind(this, name), consumeRaw); + prelude = this.parseWithFallback(this.AtrulePrelude.bind(this, name), consumeRaw$5); // turn empty AtrulePrelude into null if (prelude.type === 'AtrulePrelude' && prelude.children.head === null) { prelude = null; } } else { - prelude = consumeRaw.call(this, this.scanner.tokenIndex); + prelude = consumeRaw$5.call(this, this.scanner.tokenIndex); } this.scanner.skipSC(); } switch (this.scanner.tokenType) { - case SEMICOLON: + case SEMICOLON$4: this.scanner.next(); break; - case LEFTCURLYBRACKET$1: + case LEFTCURLYBRACKET$3: if (this.atrule.hasOwnProperty(nameLowerCase) && typeof this.atrule[nameLowerCase].block === 'function') { block = this.atrule[nameLowerCase].block.call(this); @@ -22811,10 +23660,10 @@ walkContext: 'atrule' }; - var TYPE$c = tokenizer.TYPE; + var TYPE$v = tokenizer$3.TYPE; - var SEMICOLON$1 = TYPE$c.Semicolon; - var LEFTCURLYBRACKET$2 = TYPE$c.LeftCurlyBracket; + var SEMICOLON$3 = TYPE$v.Semicolon; + var LEFTCURLYBRACKET$2 = TYPE$v.LeftCurlyBracket; var AtrulePrelude = { name: 'AtrulePrelude', @@ -22843,7 +23692,7 @@ if (this.scanner.eof !== true && this.scanner.tokenType !== LEFTCURLYBRACKET$2 && - this.scanner.tokenType !== SEMICOLON$1) { + this.scanner.tokenType !== SEMICOLON$3) { this.error('Semicolon or block is expected'); } @@ -22863,19 +23712,19 @@ walkContext: 'atrulePrelude' }; - var TYPE$d = tokenizer.TYPE; + var TYPE$u = tokenizer$3.TYPE; - var IDENT$4 = TYPE$d.Ident; - var STRING = TYPE$d.String; - var COLON = TYPE$d.Colon; - var LEFTSQUAREBRACKET$1 = TYPE$d.LeftSquareBracket; - var RIGHTSQUAREBRACKET$1 = TYPE$d.RightSquareBracket; - var DOLLARSIGN = 0x0024; // U+0024 DOLLAR SIGN ($) - var ASTERISK$1 = 0x002A; // U+002A ASTERISK (*) + var IDENT$e = TYPE$u.Ident; + var STRING$3 = TYPE$u.String; + var COLON$6 = TYPE$u.Colon; + var LEFTSQUAREBRACKET$3 = TYPE$u.LeftSquareBracket; + var RIGHTSQUAREBRACKET$1 = TYPE$u.RightSquareBracket; + var DOLLARSIGN$1 = 0x0024; // U+0024 DOLLAR SIGN ($) + var ASTERISK$5 = 0x002A; // U+002A ASTERISK (*) var EQUALSSIGN = 0x003D; // U+003D EQUALS SIGN (=) var CIRCUMFLEXACCENT = 0x005E; // U+005E (^) - var VERTICALLINE$1 = 0x007C; // U+007C VERTICAL LINE (|) - var TILDE = 0x007E; // U+007E TILDE (~) + var VERTICALLINE$2 = 0x007C; // U+007C VERTICAL LINE (|) + var TILDE$2 = 0x007E; // U+007E TILDE (~) function getAttributeName() { if (this.scanner.eof) { @@ -22886,18 +23735,18 @@ var expectIdent = false; var checkColon = true; - if (this.scanner.isDelim(ASTERISK$1)) { + if (this.scanner.isDelim(ASTERISK$5)) { expectIdent = true; checkColon = false; this.scanner.next(); - } else if (!this.scanner.isDelim(VERTICALLINE$1)) { - this.eat(IDENT$4); + } else if (!this.scanner.isDelim(VERTICALLINE$2)) { + this.eat(IDENT$e); } - if (this.scanner.isDelim(VERTICALLINE$1)) { + if (this.scanner.isDelim(VERTICALLINE$2)) { if (this.scanner.source.charCodeAt(this.scanner.tokenStart + 1) !== EQUALSSIGN) { this.scanner.next(); - this.eat(IDENT$4); + this.eat(IDENT$e); } else if (expectIdent) { this.error('Identifier is expected', this.scanner.tokenEnd); } @@ -22905,9 +23754,9 @@ this.error('Vertical line is expected'); } - if (checkColon && this.scanner.tokenType === COLON) { + if (checkColon && this.scanner.tokenType === COLON$6) { this.scanner.next(); - this.eat(IDENT$4); + this.eat(IDENT$e); } return { @@ -22922,11 +23771,11 @@ var code = this.scanner.source.charCodeAt(start); if (code !== EQUALSSIGN && // = - code !== TILDE && // ~= + code !== TILDE$2 && // ~= code !== CIRCUMFLEXACCENT && // ^= - code !== DOLLARSIGN && // $= - code !== ASTERISK$1 && // *= - code !== VERTICALLINE$1 // |= + code !== DOLLARSIGN$1 && // $= + code !== ASTERISK$5 && // *= + code !== VERTICALLINE$2 // |= ) { this.error('Attribute selector (=, ~=, ^=, $=, *=, |=) is expected'); } @@ -22961,7 +23810,7 @@ var value = null; var flags = null; - this.eat(LEFTSQUAREBRACKET$1); + this.eat(LEFTSQUAREBRACKET$3); this.scanner.skipSC(); name = getAttributeName.call(this); @@ -22969,12 +23818,12 @@ if (this.scanner.tokenType !== RIGHTSQUAREBRACKET$1) { // avoid case `[name i]` - if (this.scanner.tokenType !== IDENT$4) { + if (this.scanner.tokenType !== IDENT$e) { matcher = getOperator.call(this); this.scanner.skipSC(); - value = this.scanner.tokenType === STRING + value = this.scanner.tokenType === STRING$3 ? this.String() : this.Identifier(); @@ -22982,7 +23831,7 @@ } // attribute flags - if (this.scanner.tokenType === IDENT$4) { + if (this.scanner.tokenType === IDENT$e) { flags = this.scanner.getTokenValue(); this.scanner.next(); @@ -23029,24 +23878,24 @@ } }; - var TYPE$e = tokenizer.TYPE; - var rawMode$1 = Raw.mode; + var TYPE$t = tokenizer$3.TYPE; + var rawMode$4 = Raw.mode; - var WHITESPACE$5 = TYPE$e.WhiteSpace; - var COMMENT$4 = TYPE$e.Comment; - var SEMICOLON$2 = TYPE$e.Semicolon; - var ATKEYWORD$1 = TYPE$e.AtKeyword; - var LEFTCURLYBRACKET$3 = TYPE$e.LeftCurlyBracket; - var RIGHTCURLYBRACKET$2 = TYPE$e.RightCurlyBracket; + var WHITESPACE$7 = TYPE$t.WhiteSpace; + var COMMENT$5 = TYPE$t.Comment; + var SEMICOLON$2 = TYPE$t.Semicolon; + var ATKEYWORD$1 = TYPE$t.AtKeyword; + var LEFTCURLYBRACKET$1 = TYPE$t.LeftCurlyBracket; + var RIGHTCURLYBRACKET = TYPE$t.RightCurlyBracket; - function consumeRaw$1(startToken) { + function consumeRaw$4(startToken) { return this.Raw(startToken, null, true); } function consumeRule() { - return this.parseWithFallback(this.Rule, consumeRaw$1); + return this.parseWithFallback(this.Rule, consumeRaw$4); } function consumeRawDeclaration(startToken) { - return this.Raw(startToken, rawMode$1.semicolonIncluded, true); + return this.Raw(startToken, rawMode$4.semicolonIncluded, true); } function consumeDeclaration() { if (this.scanner.tokenType === SEMICOLON$2) { @@ -23077,21 +23926,21 @@ var start = this.scanner.tokenStart; var children = this.createList(); - this.eat(LEFTCURLYBRACKET$3); + this.eat(LEFTCURLYBRACKET$1); scan: while (!this.scanner.eof) { switch (this.scanner.tokenType) { - case RIGHTCURLYBRACKET$2: + case RIGHTCURLYBRACKET: break scan; - case WHITESPACE$5: - case COMMENT$4: + case WHITESPACE$7: + case COMMENT$5: this.scanner.next(); break; case ATKEYWORD$1: - children.push(this.parseWithFallback(this.Atrule, consumeRaw$1)); + children.push(this.parseWithFallback(this.Atrule, consumeRaw$4)); break; default: @@ -23100,7 +23949,7 @@ } if (!this.scanner.eof) { - this.eat(RIGHTCURLYBRACKET$2); + this.eat(RIGHTCURLYBRACKET); } return { @@ -23121,10 +23970,10 @@ walkContext: 'block' }; - var TYPE$f = tokenizer.TYPE; + var TYPE$s = tokenizer$3.TYPE; - var LEFTSQUAREBRACKET$2 = TYPE$f.LeftSquareBracket; - var RIGHTSQUAREBRACKET$2 = TYPE$f.RightSquareBracket; + var LEFTSQUAREBRACKET$2 = TYPE$s.LeftSquareBracket; + var RIGHTSQUAREBRACKET = TYPE$s.RightSquareBracket; var Brackets = { name: 'Brackets', @@ -23140,7 +23989,7 @@ children = readSequence.call(this, recognizer); if (!this.scanner.eof) { - this.eat(RIGHTSQUAREBRACKET$2); + this.eat(RIGHTSQUAREBRACKET); } return { @@ -23156,7 +24005,7 @@ } }; - var CDC = tokenizer.TYPE.CDC; + var CDC$1 = tokenizer$3.TYPE.CDC; var CDC_1 = { name: 'CDC', @@ -23164,7 +24013,7 @@ parse: function() { var start = this.scanner.tokenStart; - this.eat(CDC); // --> + this.eat(CDC$1); // --> return { type: 'CDC', @@ -23176,7 +24025,7 @@ } }; - var CDO = tokenizer.TYPE.CDO; + var CDO$1 = tokenizer$3.TYPE.CDO; var CDO_1 = { name: 'CDO', @@ -23184,7 +24033,7 @@ parse: function() { var start = this.scanner.tokenStart; - this.eat(CDO); // + case CDC: // --> child = this.CDC(); break; // CSS Syntax Module Level 3 // §2.2 Error handling // At the "top level" of a stylesheet, an starts an at-rule. - case ATKEYWORD$2: - child = this.parseWithFallback(this.Atrule, consumeRaw$4); + case ATKEYWORD: + child = this.parseWithFallback(this.Atrule, consumeRaw$1); break; // Anything else starts a qualified rule ... default: - child = this.parseWithFallback(this.Rule, consumeRaw$4); + child = this.parseWithFallback(this.Rule, consumeRaw$1); } children.push(child); @@ -24425,15 +25288,15 @@ walkContext: 'stylesheet' }; - var TYPE$A = tokenizer.TYPE; + var TYPE$7 = tokenizer$3.TYPE; - var IDENT$d = TYPE$A.Ident; - var ASTERISK$4 = 0x002A; // U+002A ASTERISK (*) - var VERTICALLINE$2 = 0x007C; // U+007C VERTICAL LINE (|) + var IDENT$5 = TYPE$7.Ident; + var ASTERISK$2 = 0x002A; // U+002A ASTERISK (*) + var VERTICALLINE$1 = 0x007C; // U+007C VERTICAL LINE (|) function eatIdentifierOrAsterisk() { - if (this.scanner.tokenType !== IDENT$d && - this.scanner.isDelim(ASTERISK$4) === false) { + if (this.scanner.tokenType !== IDENT$5 && + this.scanner.isDelim(ASTERISK$2) === false) { this.error('Identifier or asterisk is expected'); } @@ -24456,13 +25319,13 @@ parse: function() { var start = this.scanner.tokenStart; - if (this.scanner.isDelim(VERTICALLINE$2)) { + if (this.scanner.isDelim(VERTICALLINE$1)) { this.scanner.next(); eatIdentifierOrAsterisk.call(this); } else { eatIdentifierOrAsterisk.call(this); - if (this.scanner.isDelim(VERTICALLINE$2)) { + if (this.scanner.isDelim(VERTICALLINE$1)) { this.scanner.next(); eatIdentifierOrAsterisk.call(this); } @@ -24479,24 +25342,24 @@ } }; - var isHexDigit$4 = tokenizer.isHexDigit; - var cmpChar$4 = tokenizer.cmpChar; - var TYPE$B = tokenizer.TYPE; - var NAME$3 = tokenizer.NAME; + var isHexDigit = tokenizer$3.isHexDigit; + var cmpChar$1 = tokenizer$3.cmpChar; + var TYPE$6 = tokenizer$3.TYPE; + var NAME = tokenizer$3.NAME; - var IDENT$e = TYPE$B.Ident; - var NUMBER$7 = TYPE$B.Number; - var DIMENSION$5 = TYPE$B.Dimension; - var PLUSSIGN$6 = 0x002B; // U+002B PLUS SIGN (+) - var HYPHENMINUS$4 = 0x002D; // U+002D HYPHEN-MINUS (-) - var QUESTIONMARK$2 = 0x003F; // U+003F QUESTION MARK (?) + var IDENT$4 = TYPE$6.Ident; + var NUMBER$2 = TYPE$6.Number; + var DIMENSION$2 = TYPE$6.Dimension; + var PLUSSIGN$2 = 0x002B; // U+002B PLUS SIGN (+) + var HYPHENMINUS$1 = 0x002D; // U+002D HYPHEN-MINUS (-) + var QUESTIONMARK = 0x003F; // U+003F QUESTION MARK (?) var U$1 = 0x0075; // U+0075 LATIN SMALL LETTER U (u) function eatHexSequence(offset, allowDash) { for (var pos = this.scanner.tokenStart + offset, len = 0; pos < this.scanner.tokenEnd; pos++) { var code = this.scanner.source.charCodeAt(pos); - if (code === HYPHENMINUS$4 && allowDash && len !== 0) { + if (code === HYPHENMINUS$1 && allowDash && len !== 0) { if (eatHexSequence.call(this, offset + len + 1, false) === 0) { this.error(); } @@ -24504,7 +25367,7 @@ return -1; } - if (!isHexDigit$4(code)) { + if (!isHexDigit(code)) { this.error( allowDash && len !== 0 ? 'HyphenMinus' + (len < 6 ? ' or hex digit' : '') + ' is expected' @@ -24524,7 +25387,7 @@ function eatQuestionMarkSequence(max) { var count = 0; - while (this.scanner.isDelim(QUESTIONMARK$2)) { + while (this.scanner.isDelim(QUESTIONMARK)) { if (++count > max) { this.error('Too many question marks'); } @@ -24533,9 +25396,9 @@ } } - function startsWith$1(code) { + function startsWith(code) { if (this.scanner.source.charCodeAt(this.scanner.tokenStart) !== code) { - this.error(NAME$3[code] + ' is expected'); + this.error(NAME[code] + ' is expected'); } } @@ -24563,10 +25426,10 @@ // u '+' '?'* // u '+' '?'+ - if (this.scanner.isDelim(PLUSSIGN$6)) { + if (this.scanner.isDelim(PLUSSIGN$2)) { this.scanner.next(); - if (this.scanner.tokenType === IDENT$e) { + if (this.scanner.tokenType === IDENT$4) { hexLength = eatHexSequence.call(this, 0, true); if (hexLength > 0) { eatQuestionMarkSequence.call(this, 6 - hexLength); @@ -24574,7 +25437,7 @@ return; } - if (this.scanner.isDelim(QUESTIONMARK$2)) { + if (this.scanner.isDelim(QUESTIONMARK)) { this.scanner.next(); eatQuestionMarkSequence.call(this, 5); return; @@ -24587,18 +25450,18 @@ // u '?'* // u // u - if (this.scanner.tokenType === NUMBER$7) { - startsWith$1.call(this, PLUSSIGN$6); + if (this.scanner.tokenType === NUMBER$2) { + startsWith.call(this, PLUSSIGN$2); hexLength = eatHexSequence.call(this, 1, true); - if (this.scanner.isDelim(QUESTIONMARK$2)) { + if (this.scanner.isDelim(QUESTIONMARK)) { eatQuestionMarkSequence.call(this, 6 - hexLength); return; } - if (this.scanner.tokenType === DIMENSION$5 || - this.scanner.tokenType === NUMBER$7) { - startsWith$1.call(this, HYPHENMINUS$4); + if (this.scanner.tokenType === DIMENSION$2 || + this.scanner.tokenType === NUMBER$2) { + startsWith.call(this, HYPHENMINUS$1); eatHexSequence.call(this, 1, false); return; } @@ -24607,8 +25470,8 @@ } // u '?'* - if (this.scanner.tokenType === DIMENSION$5) { - startsWith$1.call(this, PLUSSIGN$6); + if (this.scanner.tokenType === DIMENSION$2) { + startsWith.call(this, PLUSSIGN$2); hexLength = eatHexSequence.call(this, 1, true); if (hexLength > 0) { @@ -24630,11 +25493,11 @@ var start = this.scanner.tokenStart; // U or u - if (!cmpChar$4(this.scanner.source, start, U$1)) { + if (!cmpChar$1(this.scanner.source, start, U$1)) { this.error('U is expected'); } - if (!cmpChar$4(this.scanner.source, start + 1, PLUSSIGN$6)) { + if (!cmpChar$1(this.scanner.source, start + 1, PLUSSIGN$2)) { this.error('Plus sign is expected'); } @@ -24652,13 +25515,13 @@ } }; - var isWhiteSpace$2 = tokenizer.isWhiteSpace; - var cmpStr$4 = tokenizer.cmpStr; - var TYPE$C = tokenizer.TYPE; + var isWhiteSpace = tokenizer$3.isWhiteSpace; + var cmpStr$1 = tokenizer$3.cmpStr; + var TYPE$5 = tokenizer$3.TYPE; - var FUNCTION$3 = TYPE$C.Function; - var URL$2 = TYPE$C.Url; - var RIGHTPARENTHESIS$7 = TYPE$C.RightParenthesis; + var FUNCTION$3 = TYPE$5.Function; + var URL$3 = TYPE$5.Url; + var RIGHTPARENTHESIS = TYPE$5.RightParenthesis; // | ) var Url = { @@ -24671,15 +25534,15 @@ var value; switch (this.scanner.tokenType) { - case URL$2: + case URL$3: var rawStart = start + 4; var rawEnd = this.scanner.tokenEnd - 1; - while (rawStart < rawEnd && isWhiteSpace$2(this.scanner.source.charCodeAt(rawStart))) { + while (rawStart < rawEnd && isWhiteSpace(this.scanner.source.charCodeAt(rawStart))) { rawStart++; } - while (rawStart < rawEnd && isWhiteSpace$2(this.scanner.source.charCodeAt(rawEnd - 1))) { + while (rawStart < rawEnd && isWhiteSpace(this.scanner.source.charCodeAt(rawEnd - 1))) { rawEnd--; } @@ -24689,11 +25552,11 @@ value: this.scanner.source.substring(rawStart, rawEnd) }; - this.eat(URL$2); + this.eat(URL$3); break; case FUNCTION$3: - if (!cmpStr$4(this.scanner.source, this.scanner.tokenStart, this.scanner.tokenEnd, 'url(')) { + if (!cmpStr$1(this.scanner.source, this.scanner.tokenStart, this.scanner.tokenEnd, 'url(')) { this.error('Function name must be `url`'); } @@ -24701,7 +25564,7 @@ this.scanner.skipSC(); value = this.String(); this.scanner.skipSC(); - this.eat(RIGHTPARENTHESIS$7); + this.eat(RIGHTPARENTHESIS); break; default: @@ -24742,21 +25605,21 @@ } }; - var WHITESPACE$9 = tokenizer.TYPE.WhiteSpace; - var SPACE$2 = Object.freeze({ + var WHITESPACE$2 = tokenizer$3.TYPE.WhiteSpace; + var SPACE = Object.freeze({ type: 'WhiteSpace', loc: null, value: ' ' }); - var WhiteSpace$1 = { + var WhiteSpace = { name: 'WhiteSpace', structure: { value: String }, parse: function() { - this.eat(WHITESPACE$9); - return SPACE$2; + this.eat(WHITESPACE$2); + return SPACE; // return { // type: 'WhiteSpace', @@ -24785,7 +25648,7 @@ DeclarationList: DeclarationList, Dimension: Dimension, Function: _Function, - HexColor: HexColor, + Hash: Hash, Identifier: Identifier, IdSelector: IdSelector, MediaFeature: MediaFeature, @@ -24809,9 +25672,11 @@ UnicodeRange: UnicodeRange, Url: Url, Value: Value, - WhiteSpace: WhiteSpace$1 + WhiteSpace: WhiteSpace }; + var data = data$1; + var lexer = { generic: true, types: data.types, @@ -24820,87 +25685,87 @@ node: node }; - var cmpChar$5 = tokenizer.cmpChar; - var cmpStr$5 = tokenizer.cmpStr; - var TYPE$D = tokenizer.TYPE; + var cmpChar = tokenizer$3.cmpChar; + var cmpStr = tokenizer$3.cmpStr; + var TYPE$4 = tokenizer$3.TYPE; - var IDENT$f = TYPE$D.Ident; - var STRING$2 = TYPE$D.String; - var NUMBER$8 = TYPE$D.Number; - var FUNCTION$4 = TYPE$D.Function; - var URL$3 = TYPE$D.Url; - var HASH$4 = TYPE$D.Hash; - var DIMENSION$6 = TYPE$D.Dimension; - var PERCENTAGE$2 = TYPE$D.Percentage; - var LEFTPARENTHESIS$5 = TYPE$D.LeftParenthesis; - var LEFTSQUAREBRACKET$3 = TYPE$D.LeftSquareBracket; - var COMMA$3 = TYPE$D.Comma; - var DELIM$5 = TYPE$D.Delim; - var NUMBERSIGN$3 = 0x0023; // U+0023 NUMBER SIGN (#) - var ASTERISK$5 = 0x002A; // U+002A ASTERISK (*) - var PLUSSIGN$7 = 0x002B; // U+002B PLUS SIGN (+) - var HYPHENMINUS$5 = 0x002D; // U+002D HYPHEN-MINUS (-) - var SOLIDUS$4 = 0x002F; // U+002F SOLIDUS (/) - var U$2 = 0x0075; // U+0075 LATIN SMALL LETTER U (u) + var IDENT$3 = TYPE$4.Ident; + var STRING$1 = TYPE$4.String; + var NUMBER$1 = TYPE$4.Number; + var FUNCTION$2 = TYPE$4.Function; + var URL$2 = TYPE$4.Url; + var HASH$1 = TYPE$4.Hash; + var DIMENSION$1 = TYPE$4.Dimension; + var PERCENTAGE$1 = TYPE$4.Percentage; + var LEFTPARENTHESIS$2 = TYPE$4.LeftParenthesis; + var LEFTSQUAREBRACKET$1 = TYPE$4.LeftSquareBracket; + var COMMA$1 = TYPE$4.Comma; + var DELIM$1 = TYPE$4.Delim; + var NUMBERSIGN$1 = 0x0023; // U+0023 NUMBER SIGN (#) + var ASTERISK$1 = 0x002A; // U+002A ASTERISK (*) + var PLUSSIGN$1 = 0x002B; // U+002B PLUS SIGN (+) + var HYPHENMINUS = 0x002D; // U+002D HYPHEN-MINUS (-) + var SOLIDUS$1 = 0x002F; // U+002F SOLIDUS (/) + var U = 0x0075; // U+0075 LATIN SMALL LETTER U (u) var _default = function defaultRecognizer(context) { switch (this.scanner.tokenType) { - case HASH$4: - return this.HexColor(); + case HASH$1: + return this.Hash(); - case COMMA$3: + case COMMA$1: context.space = null; context.ignoreWSAfter = true; return this.Operator(); - case LEFTPARENTHESIS$5: + case LEFTPARENTHESIS$2: return this.Parentheses(this.readSequence, context.recognizer); - case LEFTSQUAREBRACKET$3: + case LEFTSQUAREBRACKET$1: return this.Brackets(this.readSequence, context.recognizer); - case STRING$2: + case STRING$1: return this.String(); - case DIMENSION$6: + case DIMENSION$1: return this.Dimension(); - case PERCENTAGE$2: + case PERCENTAGE$1: return this.Percentage(); - case NUMBER$8: + case NUMBER$1: return this.Number(); - case FUNCTION$4: - return cmpStr$5(this.scanner.source, this.scanner.tokenStart, this.scanner.tokenEnd, 'url(') + case FUNCTION$2: + return cmpStr(this.scanner.source, this.scanner.tokenStart, this.scanner.tokenEnd, 'url(') ? this.Url() : this.Function(this.readSequence, context.recognizer); - case URL$3: + case URL$2: return this.Url(); - case IDENT$f: + case IDENT$3: // check for unicode range, it should start with u+ or U+ - if (cmpChar$5(this.scanner.source, this.scanner.tokenStart, U$2) && - cmpChar$5(this.scanner.source, this.scanner.tokenStart + 1, PLUSSIGN$7)) { + if (cmpChar(this.scanner.source, this.scanner.tokenStart, U) && + cmpChar(this.scanner.source, this.scanner.tokenStart + 1, PLUSSIGN$1)) { return this.UnicodeRange(); } else { return this.Identifier(); } - case DELIM$5: + case DELIM$1: var code = this.scanner.source.charCodeAt(this.scanner.tokenStart); - if (code === SOLIDUS$4 || - code === ASTERISK$5 || - code === PLUSSIGN$7 || - code === HYPHENMINUS$5) { + if (code === SOLIDUS$1 || + code === ASTERISK$1 || + code === PLUSSIGN$1 || + code === HYPHENMINUS) { return this.Operator(); // TODO: replace with Delim } // TODO: produce a node with Delim node type - if (code === NUMBERSIGN$3) { + if (code === NUMBERSIGN$1) { this.error('Hex or identifier is expected', this.scanner.tokenStart + 1); } @@ -24912,76 +25777,76 @@ getNode: _default }; - var TYPE$E = tokenizer.TYPE; + var TYPE$3 = tokenizer$3.TYPE; - var DELIM$6 = TYPE$E.Delim; - var IDENT$g = TYPE$E.Ident; - var DIMENSION$7 = TYPE$E.Dimension; - var PERCENTAGE$3 = TYPE$E.Percentage; - var NUMBER$9 = TYPE$E.Number; - var HASH$5 = TYPE$E.Hash; - var COLON$5 = TYPE$E.Colon; - var LEFTSQUAREBRACKET$4 = TYPE$E.LeftSquareBracket; - var NUMBERSIGN$4 = 0x0023; // U+0023 NUMBER SIGN (#) - var ASTERISK$6 = 0x002A; // U+002A ASTERISK (*) - var PLUSSIGN$8 = 0x002B; // U+002B PLUS SIGN (+) - var SOLIDUS$5 = 0x002F; // U+002F SOLIDUS (/) - var FULLSTOP$2 = 0x002E; // U+002E FULL STOP (.) - var GREATERTHANSIGN$2 = 0x003E; // U+003E GREATER-THAN SIGN (>) - var VERTICALLINE$3 = 0x007C; // U+007C VERTICAL LINE (|) - var TILDE$2 = 0x007E; // U+007E TILDE (~) + var DELIM = TYPE$3.Delim; + var IDENT$2 = TYPE$3.Ident; + var DIMENSION = TYPE$3.Dimension; + var PERCENTAGE = TYPE$3.Percentage; + var NUMBER = TYPE$3.Number; + var HASH = TYPE$3.Hash; + var COLON$1 = TYPE$3.Colon; + var LEFTSQUAREBRACKET = TYPE$3.LeftSquareBracket; + var NUMBERSIGN = 0x0023; // U+0023 NUMBER SIGN (#) + var ASTERISK = 0x002A; // U+002A ASTERISK (*) + var PLUSSIGN = 0x002B; // U+002B PLUS SIGN (+) + var SOLIDUS = 0x002F; // U+002F SOLIDUS (/) + var FULLSTOP = 0x002E; // U+002E FULL STOP (.) + var GREATERTHANSIGN = 0x003E; // U+003E GREATER-THAN SIGN (>) + var VERTICALLINE = 0x007C; // U+007C VERTICAL LINE (|) + var TILDE = 0x007E; // U+007E TILDE (~) function getNode(context) { switch (this.scanner.tokenType) { - case LEFTSQUAREBRACKET$4: + case LEFTSQUAREBRACKET: return this.AttributeSelector(); - case HASH$5: + case HASH: return this.IdSelector(); - case COLON$5: - if (this.scanner.lookupType(1) === COLON$5) { + case COLON$1: + if (this.scanner.lookupType(1) === COLON$1) { return this.PseudoElementSelector(); } else { return this.PseudoClassSelector(); } - case IDENT$g: + case IDENT$2: return this.TypeSelector(); - case NUMBER$9: - case PERCENTAGE$3: + case NUMBER: + case PERCENTAGE: return this.Percentage(); - case DIMENSION$7: + case DIMENSION: // throws when .123ident - if (this.scanner.source.charCodeAt(this.scanner.tokenStart) === FULLSTOP$2) { + if (this.scanner.source.charCodeAt(this.scanner.tokenStart) === FULLSTOP) { this.error('Identifier is expected', this.scanner.tokenStart + 1); } break; - case DELIM$6: + case DELIM: var code = this.scanner.source.charCodeAt(this.scanner.tokenStart); switch (code) { - case PLUSSIGN$8: - case GREATERTHANSIGN$2: - case TILDE$2: + case PLUSSIGN: + case GREATERTHANSIGN: + case TILDE: context.space = null; context.ignoreWSAfter = true; return this.Combinator(); - case SOLIDUS$5: // /deep/ + case SOLIDUS: // /deep/ return this.Combinator(); - case FULLSTOP$2: + case FULLSTOP: return this.ClassSelector(); - case ASTERISK$6: - case VERTICALLINE$3: + case ASTERISK: + case VERTICALLINE: return this.TypeSelector(); - case NUMBERSIGN$4: + case NUMBERSIGN: return this.IdSelector(); } @@ -24992,20 +25857,6 @@ getNode: getNode }; - // https://drafts.csswg.org/css-images-4/#element-notation - // https://developer.mozilla.org/en-US/docs/Web/CSS/element - var element = function() { - this.scanner.skipSC(); - - var children = this.createSingleNodeList( - this.IdSelector() - ); - - this.scanner.skipSC(); - - return children; - }; - // legacy IE function // expression( ) var expression = function() { @@ -25014,10 +25865,11 @@ ); }; - var TYPE$F = tokenizer.TYPE; - var rawMode$5 = Raw.mode; + var TYPE$2 = tokenizer$3.TYPE; + var rawMode = Raw.mode; - var COMMA$4 = TYPE$F.Comma; + var COMMA = TYPE$2.Comma; + var WHITESPACE$1 = TYPE$2.WhiteSpace; // var( , ? ) var _var = function() { @@ -25030,21 +25882,35 @@ this.scanner.skipSC(); - if (this.scanner.tokenType === COMMA$4) { + if (this.scanner.tokenType === COMMA) { children.push(this.Operator()); - children.push(this.parseCustomProperty + + const startIndex = this.scanner.tokenIndex; + const value = this.parseCustomProperty ? this.Value(null) - : this.Raw(this.scanner.tokenIndex, rawMode$5.exclamationMarkOrSemicolon, false) - ); + : this.Raw(this.scanner.tokenIndex, rawMode.exclamationMarkOrSemicolon, false); + + if (value.type === 'Value' && value.children.isEmpty()) { + for (let offset = startIndex - this.scanner.tokenIndex; offset <= 0; offset++) { + if (this.scanner.lookupType(offset) === WHITESPACE$1) { + value.children.appendData({ + type: 'WhiteSpace', + loc: null, + value: ' ' + }); + break; + } + } + } + + children.push(value); } return children; }; - var value = { + var value$2 = { getNode: _default, - '-moz-element': element, - 'element': element, 'expression': expression, 'var': _var }; @@ -25052,7 +25918,7 @@ var scope = { AtrulePrelude: atrulePrelude, Selector: selector, - Value: value + Value: value$2 }; var fontFace = { @@ -25064,13 +25930,13 @@ } }; - var TYPE$G = tokenizer.TYPE; + var TYPE$1 = tokenizer$3.TYPE; - var STRING$3 = TYPE$G.String; - var IDENT$h = TYPE$G.Ident; - var URL$4 = TYPE$G.Url; - var FUNCTION$5 = TYPE$G.Function; - var LEFTPARENTHESIS$6 = TYPE$G.LeftParenthesis; + var STRING = TYPE$1.String; + var IDENT$1 = TYPE$1.Ident; + var URL$1 = TYPE$1.Url; + var FUNCTION$1 = TYPE$1.Function; + var LEFTPARENTHESIS$1 = TYPE$1.LeftParenthesis; var _import = { parse: { @@ -25080,12 +25946,12 @@ this.scanner.skipSC(); switch (this.scanner.tokenType) { - case STRING$3: + case STRING: children.push(this.String()); break; - case URL$4: - case FUNCTION$5: + case URL$1: + case FUNCTION$1: children.push(this.Url()); break; @@ -25093,8 +25959,8 @@ this.error('String or url() is expected'); } - if (this.lookupNonWSType(0) === IDENT$h || - this.lookupNonWSType(0) === LEFTPARENTHESIS$6) { + if (this.lookupNonWSType(0) === IDENT$1 || + this.lookupNonWSType(0) === LEFTPARENTHESIS$1) { children.push(this.WhiteSpace()); children.push(this.MediaQueryList()); } @@ -25131,16 +25997,16 @@ } }; - var TYPE$H = tokenizer.TYPE; + var TYPE = tokenizer$3.TYPE; - var WHITESPACE$a = TYPE$H.WhiteSpace; - var COMMENT$9 = TYPE$H.Comment; - var IDENT$i = TYPE$H.Ident; - var FUNCTION$6 = TYPE$H.Function; - var COLON$6 = TYPE$H.Colon; - var LEFTPARENTHESIS$7 = TYPE$H.LeftParenthesis; + var WHITESPACE = TYPE.WhiteSpace; + var COMMENT = TYPE.Comment; + var IDENT = TYPE.Ident; + var FUNCTION = TYPE.Function; + var COLON = TYPE.Colon; + var LEFTPARENTHESIS = TYPE.LeftParenthesis; - function consumeRaw$5() { + function consumeRaw() { return this.createSingleNodeList( this.Raw(this.scanner.tokenIndex, null, false) ); @@ -25149,8 +26015,8 @@ function parentheses() { this.scanner.skipSC(); - if (this.scanner.tokenType === IDENT$i && - this.lookupNonWSType(1) === COLON$6) { + if (this.scanner.tokenType === IDENT && + this.lookupNonWSType(1) === COLON) { return this.createSingleNodeList( this.Declaration() ); @@ -25169,23 +26035,23 @@ scan: while (!this.scanner.eof) { switch (this.scanner.tokenType) { - case WHITESPACE$a: + case WHITESPACE: space = this.WhiteSpace(); continue; - case COMMENT$9: + case COMMENT: this.scanner.next(); continue; - case FUNCTION$6: - child = this.Function(consumeRaw$5, this.scope.AtrulePrelude); + case FUNCTION: + child = this.Function(consumeRaw, this.scope.AtrulePrelude); break; - case IDENT$i: + case IDENT: child = this.Identifier(); break; - case LEFTPARENTHESIS$7: + case LEFTPARENTHESIS: child = this.Parentheses(parentheses, this.scope.AtrulePrelude); break; @@ -25237,7 +26103,7 @@ } }; - var has$1 = { + var has = { parse: function() { return this.createSingleNodeList( this.SelectorList() @@ -25281,7 +26147,7 @@ var DISALLOW_OF_CLAUSE = false; - var nth$1 = { + var nth = { parse: function nth() { return this.createSingleNodeList( this.Nth(DISALLOW_OF_CLAUSE) @@ -25289,9 +26155,9 @@ } }; - var nthLastOfType = nth$1; + var nthLastOfType = nth; - var nthOfType = nth$1; + var nthOfType = nth; var slotted = { parse: function compoundSelector() { @@ -25303,7 +26169,7 @@ var pseudo = { 'dir': dir, - 'has': has$1, + 'has': has, 'lang': lang, 'matches': matches, 'not': not, @@ -25344,6 +26210,136 @@ node: node }; + var _args = [ + [ + "css-tree@1.1.3", + "/home/gitlab-runner/builds/BQJy2NwB/0/pagedjs/pagedjs" + ] + ]; + var _from = "css-tree@1.1.3"; + var _id = "css-tree@1.1.3"; + var _inBundle = false; + var _integrity = "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q=="; + var _location = "/css-tree"; + var _phantomChildren = { + }; + var _requested = { + type: "version", + registry: true, + raw: "css-tree@1.1.3", + name: "css-tree", + escapedName: "css-tree", + rawSpec: "1.1.3", + saveSpec: null, + fetchSpec: "1.1.3" + }; + var _requiredBy = [ + "/" + ]; + var _resolved = "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz"; + var _spec = "1.1.3"; + var _where = "/home/gitlab-runner/builds/BQJy2NwB/0/pagedjs/pagedjs"; + var author = { + name: "Roman Dvornov", + email: "rdvornov@gmail.com", + url: "https://github.com/lahmatiy" + }; + var bugs = { + url: "https://github.com/csstree/csstree/issues" + }; + var dependencies = { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + }; + var description = "A tool set for CSS: fast detailed parser (CSS → AST), walker (AST traversal), generator (AST → CSS) and lexer (validation and matching) based on specs and browser implementations"; + var devDependencies = { + "@rollup/plugin-commonjs": "^11.0.2", + "@rollup/plugin-json": "^4.0.2", + "@rollup/plugin-node-resolve": "^7.1.1", + coveralls: "^3.0.9", + eslint: "^6.8.0", + "json-to-ast": "^2.1.0", + mocha: "^6.2.3", + nyc: "^14.1.1", + rollup: "^1.32.1", + "rollup-plugin-terser": "^5.3.0" + }; + var engines = { + node: ">=8.0.0" + }; + var files = [ + "data", + "dist", + "lib" + ]; + var homepage = "https://github.com/csstree/csstree#readme"; + var jsdelivr = "dist/csstree.min.js"; + var keywords = [ + "css", + "ast", + "tokenizer", + "parser", + "walker", + "lexer", + "generator", + "utils", + "syntax", + "validation" + ]; + var license = "MIT"; + var main = "lib/index.js"; + var name = "css-tree"; + var repository = { + type: "git", + url: "git+https://github.com/csstree/csstree.git" + }; + var scripts = { + build: "rollup --config", + coverage: "nyc npm test", + coveralls: "nyc report --reporter=text-lcov | coveralls", + hydrogen: "node --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces --redirect-code-traces-to=code.asm --trace_hydrogen_file=code.cfg --print-opt-code bin/parse --stat -o /dev/null", + lint: "eslint data lib scripts test && node scripts/review-syntax-patch --lint && node scripts/update-docs --lint", + "lint-and-test": "npm run lint && npm test", + prepublishOnly: "npm run build", + "review:syntax-patch": "node scripts/review-syntax-patch", + test: "mocha --reporter progress", + travis: "nyc npm run lint-and-test && npm run coveralls", + "update:docs": "node scripts/update-docs" + }; + var unpkg = "dist/csstree.min.js"; + var version = "1.1.3"; + var require$$4 = { + _args: _args, + _from: _from, + _id: _id, + _inBundle: _inBundle, + _integrity: _integrity, + _location: _location, + _phantomChildren: _phantomChildren, + _requested: _requested, + _requiredBy: _requiredBy, + _resolved: _resolved, + _spec: _spec, + _where: _where, + author: author, + bugs: bugs, + dependencies: dependencies, + description: description, + devDependencies: devDependencies, + engines: engines, + files: files, + homepage: homepage, + jsdelivr: jsdelivr, + keywords: keywords, + license: license, + main: main, + name: name, + repository: repository, + scripts: scripts, + unpkg: unpkg, + version: version + }; + function merge() { var dest = {}; @@ -25357,15 +26353,16 @@ return dest; } - var syntax = create$5.create( + syntax.exports = create$5.create( merge( lexer, parser, walker ) ); + syntax.exports.version = require$$4.version; - var lib = syntax; + var lib = syntax.exports; class Sheet { constructor(url, hooks) { @@ -25437,9 +26434,10 @@ insertRule(rule) { let inserted = this.ast.children.appendData(rule); - inserted.forEach((item) => { - this.declarations(item); - }); + + this.declarations(rule); + + return inserted; } urls(ast) { @@ -25480,7 +26478,6 @@ lib.walk(ast, { visit: "Rule", enter: (ruleNode, ruleItem, rulelist) => { - // console.log("rule", ruleNode); this.hooks.onRule.trigger(ruleNode, ruleItem, rulelist); this.declarations(ruleNode, ruleItem, rulelist); @@ -25494,7 +26491,6 @@ lib.walk(ruleNode, { visit: "Declaration", enter: (declarationNode, dItem, dList) => { - // console.log(declarationNode); this.hooks.onDeclaration.trigger(declarationNode, dItem, dList, {ruleNode, ruleItem, rulelist}); @@ -25516,7 +26512,6 @@ lib.walk(ruleNode, { visit: "Selector", enter: (selectNode, selectItem, selectList) => { - // console.log(selectNode); this.hooks.onSelector.trigger(selectNode, selectItem, selectList, {ruleNode, ruleItem, rulelist}); if (selectNode.children.forEach(node => {if (node.type === "PseudoElementSelector") { @@ -25527,10 +26522,6 @@ } }); }})); - // else { - // console.log("dommage"); - // } - } }); } @@ -25691,6 +26682,7 @@ --pagedjs-height-left: 11in; --pagedjs-pagebox-width: 8.5in; --pagedjs-pagebox-height: 11in; + --pagedjs-footnotes-height: 0mm; --pagedjs-margin-top: 1in; --pagedjs-margin-right: 1in; --pagedjs-margin-bottom: 1in; @@ -25716,6 +26708,7 @@ --pagedjs-bleed-left-bottom: 0mm; --pagedjs-bleed-left-left: 0mm; --pagedjs-crop-color: black; + --pagedjs-crop-shadow: white; --pagedjs-crop-offset: 2mm; --pagedjs-crop-stroke: 1px; --pagedjs-cross-size: 5mm; @@ -25723,6 +26716,8 @@ --pagedjs-mark-crop-display: none; --pagedjs-page-count: 0; --pagedjs-page-counter-increment: 1; + --pagedjs-footnotes-count: 0; + --pagedjs-column-gap-offset: 1000px; } @page { @@ -25798,6 +26793,7 @@ .pagedjs_bleed-bottom .pagedjs_marks-crop:nth-child(1) { width: calc(var(--pagedjs-bleed-left) - var(--pagedjs-crop-stroke)); border-right: var(--pagedjs-crop-stroke) solid var(--pagedjs-crop-color); + box-shadow: 1px 0px 0px 0px var(--pagedjs-crop-shadow); } .pagedjs_right_page .pagedjs_bleed-top .pagedjs_marks-crop:nth-child(1), @@ -25814,6 +26810,7 @@ .pagedjs_bleed-bottom .pagedjs_marks-crop:nth-child(3) { width: calc(var(--pagedjs-bleed-right) - var(--pagedjs-crop-stroke)); border-left: var(--pagedjs-crop-stroke) solid var(--pagedjs-crop-color); + box-shadow: -1px 0px 0px 0px var(--pagedjs-crop-shadow); } .pagedjs_right_page .pagedjs_bleed-top .pagedjs_marks-crop:nth-child(3), @@ -25856,6 +26853,7 @@ .pagedjs_bleed-right .pagedjs_marks-crop:nth-child(1) { height: calc(var(--pagedjs-bleed-top) - var(--pagedjs-crop-stroke)); border-bottom: var(--pagedjs-crop-stroke) solid var(--pagedjs-crop-color); + box-shadow: 0px 1px 0px 0px var(--pagedjs-crop-shadow); } .pagedjs_right_page .pagedjs_bleed-left .pagedjs_marks-crop:nth-child(1), @@ -25872,6 +26870,7 @@ .pagedjs_bleed-right .pagedjs_marks-crop:nth-child(3) { height: calc(var(--pagedjs-bleed-bottom) - var(--pagedjs-crop-stroke)); border-top: var(--pagedjs-crop-stroke) solid var(--pagedjs-crop-color); + box-shadow: 0px -1px 0px 0px var(--pagedjs-crop-shadow); } .pagedjs_right_page .pagedjs_bleed-left .pagedjs_marks-crop:nth-child(3), @@ -26056,11 +27055,86 @@ .pagedjs_pagebox > .pagedjs_area > .pagedjs_page_content { width: 100%; - height: 100%; + height: calc(100% - var(--pagedjs-footnotes-height)); position: relative; column-fill: auto; } +.pagedjs_pagebox > .pagedjs_area > .pagedjs_page_content > div { + height: inherit; +} + +.pagedjs_pagebox > .pagedjs_area > .pagedjs_footnote_area { + position: relative; + overflow: hidden; + height: var(--pagedjs-footnotes-height); + display: flex; + justify-content: flex-end; + flex-flow: column; +} + +.pagedjs_pagebox > .pagedjs_area > .pagedjs_footnote_area > .pagedjs_footnote_content { + overflow: hidden; +} + +.pagedjs_pagebox > .pagedjs_area > .pagedjs_footnote_area > .pagedjs_footnote_inner_content { + overflow: hidden; +} + +.pagedjs_area [data-footnote-call] { + all: unset; + counter-increment: footnote; +} + +.pagedjs_area [data-split-from] { + counter-increment: unset; + counter-reset: unset; +} + +[data-footnote-call]::after { + vertical-align: super; + font-size: 65%; + line-height: normal; + content: counter(footnote); +} + +@supports ( font-variant-position: super ) { + [data-footnote-call]::after { + vertical-align: baseline; + font-size: 100%; + line-height: inherit; + font-variant-position: super; + } +} + +.pagedjs_footnote_empty { + display: none; +} + +.pagedjs_area [data-split-from] { + counter-increment: unset; + counter-reset: unset; +} + +[data-footnote-marker]:not([data-split-from]) { + counter-increment: footnote-marker; + text-indent: 0; + display: list-item; + list-style-position: inside; +} + +[data-footnote-marker]::marker { + content: counter(footnote-marker) ". "; +} + +[data-footnote-marker][data-split-from]::marker { + content: unset; +} + +.pagedjs_area .pagedjs_footnote_inner_content [data-note-display="inline"] { + display: inline; +} + .pagedjs_page { counter-increment: page var(--pagedjs-page-counter-increment); width: var(--pagedjs-width); @@ -26078,7 +27152,7 @@ } .pagedjs_pages { - counter-reset: pages var(--pagedjs-page-count); + counter-reset: pages var(--pagedjs-page-count) footnote var(--pagedjs-footnotes-count) footnote-marker var(--pagedjs-footnotes-count); } .pagedjs_pagebox .pagedjs_margin-top-left-corner, @@ -26206,13 +27280,13 @@ margin: unset; } -.pagedjs_pages > .pagedjs_page > .pagedjs_sheet > .pagedjs_pagebox > .pagedjs_area > div [data-split-to]:after, -.pagedjs_pages > .pagedjs_page > .pagedjs_sheet > .pagedjs_pagebox > .pagedjs_area > div [data-split-to]::after { +.pagedjs_pages > .pagedjs_page > .pagedjs_sheet > .pagedjs_pagebox > .pagedjs_area > div [data-split-to]:not([data-footnote-call]):after, +.pagedjs_pages > .pagedjs_page > .pagedjs_sheet > .pagedjs_pagebox > .pagedjs_area > div [data-split-to]:not([data-footnote-call])::after { content: unset; } -.pagedjs_pages > .pagedjs_page > .pagedjs_sheet > .pagedjs_pagebox > .pagedjs_area > div [data-split-from]:before, -.pagedjs_pages > .pagedjs_page > .pagedjs_sheet > .pagedjs_pagebox > .pagedjs_area > div [data-split-from]::before { +.pagedjs_pages > .pagedjs_page > .pagedjs_sheet > .pagedjs_pagebox > .pagedjs_area > div [data-split-from]:not([data-footnote-call]):before, +.pagedjs_pages > .pagedjs_page > .pagedjs_sheet > .pagedjs_pagebox > .pagedjs_area > div [data-split-from]:not([data-footnote-call])::before { content: unset; } @@ -26257,6 +27331,8 @@ html { width: 100%; height: 100%; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; } body { margin: 0; @@ -26421,7 +27497,6 @@ insert(text){ let head = document.querySelector("head"); let style = document.createElement("style"); - style.type = "text/css"; style.setAttribute("data-pagedjs-inserted-styles", "true"); style.appendChild(document.createTextNode(text)); @@ -26457,7 +27532,7 @@ } } - eventEmitter(Handler.prototype); + EventEmitter(Handler.prototype); // https://www.w3.org/TR/css3-page/#page-size-prop @@ -26666,7 +27741,9 @@ }, backgroundOrigin: undefined, block: {}, - marks: undefined + marks: undefined, + notes: undefined, + added: false }; } @@ -26694,6 +27771,8 @@ page = this.pages[selector]; marginalia = this.replaceMarginalia(node); needsMerge = true; + // Mark page for getting classes added again + page.added = false; } else { page = this.pageModel(selector); marginalia = this.replaceMarginalia(node); @@ -26710,6 +27789,9 @@ page.marginalia = marginalia; } + let notes = this.replaceNotes(node); + page.notes = notes; + let declarations = this.replaceDeclarations(node); if (declarations.size) { @@ -26810,9 +27892,11 @@ */ afterTreeWalk(ast, sheet) { + let dirtyPage = "*" in this.pages && this.pages["*"].added === false; + this.addPageClasses(this.pages, ast, sheet); - if ("*" in this.pages) { + if (dirtyPage) { let width = this.pages["*"].width; let height = this.pages["*"].height; let format = this.pages["*"].format; @@ -26894,25 +27978,49 @@ replaceMarginalia(ast) { let parsed = {}; + const MARGINS = [ + "top-left-corner", "top-left", "top", "top-center", "top-right", "top-right-corner", + "bottom-left-corner", "bottom-left", "bottom", "bottom-center", "bottom-right", "bottom-right-corner", + "left-top", "left-middle", "left", "left-bottom", "top-right-corner", + "right-top", "right-middle", "right", "right-bottom", "right-right-corner" + ]; + lib.walk(ast.block, { + visit: "Atrule", + enter: (node, item, list) => { + let name = node.name; + if (MARGINS.includes(name)) { + if (name === "top") { + name = "top-center"; + } + if (name === "right") { + name = "right-middle"; + } + if (name === "left") { + name = "left-middle"; + } + if (name === "bottom") { + name = "bottom-center"; + } + parsed[name] = node.block; + list.remove(item); + } + } + }); + + return parsed; + } + + replaceNotes(ast) { + let parsed = {}; lib.walk(ast.block, { visit: "Atrule", enter: (node, item, list) => { let name = node.name; - if (name === "top") { - name = "top-center"; + if (name === "footnote") { + parsed[name] = node.block; + list.remove(item); } - if (name === "right") { - name = "right-middle"; - } - if (name === "left") { - name = "left-middle"; - } - if (name === "bottom") { - name = "bottom-center"; - } - parsed[name] = node.block; - list.remove(item); } }); @@ -27234,41 +28342,48 @@ addPageClasses(pages, ast, sheet) { // First add * page - if ("*" in pages) { + if ("*" in pages && pages["*"].added === false) { let p = this.createPage(pages["*"], ast.children, sheet); sheet.insertRule(p); + pages["*"].added = true; } // Add :left & :right - if (":left" in pages) { + if (":left" in pages && pages[":left"].added === false) { let left = this.createPage(pages[":left"], ast.children, sheet); sheet.insertRule(left); + pages[":left"].added = true; } - if (":right" in pages) { + if (":right" in pages && pages[":right"].added === false) { let right = this.createPage(pages[":right"], ast.children, sheet); sheet.insertRule(right); + pages[":right"].added = true; } // Add :first & :blank - if (":first" in pages) { + if (":first" in pages && pages[":first"].added === false) { let first = this.createPage(pages[":first"], ast.children, sheet); sheet.insertRule(first); + pages[":first"].added = true; } - if (":blank" in pages) { + if (":blank" in pages && pages[":blank"].added === false) { let blank = this.createPage(pages[":blank"], ast.children, sheet); sheet.insertRule(blank); + pages[":blank"].added = true; } // Add nth pages for (let pg in pages) { - if (pages[pg].nth) { + if (pages[pg].nth && pages[pg].added === false) { let nth = this.createPage(pages[pg], ast.children, sheet); sheet.insertRule(nth); + pages[pg].added = true; } } // Add named pages for (let pg in pages) { - if (pages[pg].name) { + if (pages[pg].name && pages[pg].added === false) { let named = this.createPage(pages[pg], ast.children, sheet); sheet.insertRule(named); + pages[pg].added = true; } } @@ -27300,6 +28415,11 @@ this.addMarginaliaStyles(page, ruleList, rule, sheet); this.addMarginaliaContent(page, ruleList, rule, sheet); } + + if(page.notes) { + this.addNotesStyles(page.notes, page, ruleList, rule, sheet); + } + return rule; } @@ -27345,20 +28465,20 @@ addBorderVars(border, list, item) { // variables for borders - for (let b in border) { - if (typeof border[b] !== "undefined") { - let value = border[b]; - let bVar = list.createItem({ + for (const name of Object.keys(border)) { + const value = border[name]; + // value is an empty object when undefined + if (typeof value === "string") { + const borderItem = list.createItem({ type: "Declaration", - property: "--pagedjs-border-" + b, + property: "--pagedjs-border-" + name, value: { type: "Raw", value: value } }); - list.append(bVar, item); + list.append(borderItem, item); } - } } @@ -27669,6 +28789,29 @@ ast.children.appendData(rule); } + + addNotesStyles(notes, page, list, item, sheet) { + + for (const note in notes) { + let selectors = this.selectorsForPage(page); + + selectors.insertData({ + type: "Combinator", + name: " " + }); + + selectors.insertData({ + type: "ClassSelector", + name: "pagedjs_" + note + "_content" + }); + + let notesRule = this.createRule(selectors, notes[note]); + + list.appendData(notesRule); + } + + } + /* @page { size: var(--pagedjs-width) var(--pagedjs-height); @@ -28224,15 +29367,20 @@ } addPageAttributes(page, start, pages) { - let named = start.dataset.page; + let namedPages = [start.dataset.page]; - if (named) { - page.name = named; - page.element.classList.add("pagedjs_named_page"); - page.element.classList.add("pagedjs_" + named + "_page"); + if (namedPages && namedPages.length) { + for (const named of namedPages) { + if (!named) { + continue; + } + page.name = named; + page.element.classList.add("pagedjs_named_page"); + page.element.classList.add("pagedjs_" + named + "_page"); - if (!start.dataset.splitFrom) { - page.element.classList.add("pagedjs_" + named + "_first_page"); + if (!start.dataset.splitFrom) { + page.element.classList.add("pagedjs_" + named + "_first_page"); + } } } } @@ -28278,7 +29426,7 @@ // page.element.querySelector('.paged_area').style.color = red; } - afterPageLayout(fragment, page, breakToken, chunker) { + finalizePage(fragment, page, breakToken, chunker) { for (let m in this.marginalia) { let margin = this.marginalia[m]; let sels = m.split(" "); @@ -28912,21 +30060,45 @@ onAtMedia(node, item, list) { let media = this.getMediaName(node); let rules; - - if (media === "print") { + if (media.includes("print")) { rules = node.block.children; - // Remove rules from the @media block - node.block.children = new lib.List(); + // Append rules to the end of main rules list + // TODO: this isn't working right, needs to check what is in the prelude + /* + rules.forEach((selectList) => { + if (selectList.prelude) { + selectList.prelude.children.forEach((rule) => { + + rule.children.prependData({ + type: "Combinator", + name: " " + }); + + rule.children.prependData({ + type: "ClassSelector", + name: "pagedjs_page" + }); + }); + } + }); + + list.insertList(rules, item); + */ // Append rules to the end of main rules list list.appendList(rules); + + // Remove rules from the @media block + list.remove(item); + } else if (!media.includes("all") && !media.includes("pagedjs-ignore")) { + list.remove(item); } } getMediaName(node) { - let media = ""; + let media = []; if (typeof node.prelude === "undefined" || node.prelude.type !== "AtrulePrelude" ) { @@ -28936,7 +30108,7 @@ lib.walk(node.prelude, { visit: "Identifier", enter: (identNode, iItem, iList) => { - media = identNode.name; + media.push(identNode.name); } }); return media; @@ -29009,22 +30181,32 @@ let property = declaration.property; if (property === "counter-increment") { - let inc = this.handleIncrement(declaration, rule); - if (inc) { + this.handleIncrement(declaration, rule); + // clean up empty declaration + let hasProperities = false; + declaration.value.children.forEach((data) => { + if (data.type && data.type !== "WhiteSpace") { + hasProperities = true; + } + }); + if (!hasProperities) { dList.remove(dItem); } } else if (property === "counter-reset") { - let reset = this.handleReset(declaration, rule); - if (reset) { + this.handleReset(declaration, rule); + // clean up empty declaration + let hasProperities = false; + declaration.value.children.forEach((data) => { + if (data.type && data.type !== "WhiteSpace") { + hasProperities = true; + } + }); + if (!hasProperities) { dList.remove(dItem); } } } - onContent(funcNode, fItem, fList, declaration, rule) { - if (funcNode.name === "counter") ; - } - afterParsed(parsed) { this.processCounters(parsed, this.counters); this.scopeCounters(this.counters); @@ -29045,47 +30227,113 @@ } handleIncrement(declaration, rule) { - const identifier = declaration.value.children.first(); - const number = declaration.value.children.getSize() > 1 ? declaration.value.children.last().value : 1; - const name = identifier && identifier.name; + let increments = []; + let children = declaration.value.children; - if (name === "page" || name.indexOf("target-counter-") === 0) { - return; - } + children.forEach((data, item) => { + if (data.type && data.type === "Identifier") { + let name = data.name; - let selector = lib.generate(rule.ruleNode.prelude); + if (name === "page" || name.indexOf("target-counter-") === 0) { + return; + } - let counter; - if (!(name in this.counters)) { - counter = this.addCounter(name); - } else { - counter = this.counters[name]; - } + let whitespace, number, value; + if (item.next && item.next.data.type === "WhiteSpace") { + whitespace = item.next; + } + if (whitespace && whitespace.next && whitespace.next.data.type === "Number") { + number = whitespace.next; + value = parseInt(number.data.value); + } - return counter.increments[selector] = { - selector: selector, - number - }; + let selector = lib.generate(rule.ruleNode.prelude); + + let counter; + if (!(name in this.counters)) { + counter = this.addCounter(name); + } else { + counter = this.counters[name]; + } + let increment = { + selector: selector, + number: value || 1 + }; + counter.increments[selector] = increment; + increments.push(increment); + + // Remove the parsed resets + children.remove(item); + if (whitespace) { + children.remove(whitespace); + } + if (number) { + children.remove(number); + } + } + }); + + return increments; } handleReset(declaration, rule) { - let identifier = declaration.value.children.first(); - let number = declaration.value.children.getSize() > 1 - && declaration.value.children.last().value; - let name = identifier && identifier.name; - let selector = lib.generate(rule.ruleNode.prelude); - let counter; + let resets = []; + let children = declaration.value.children; - if (!(name in this.counters)) { - counter = this.addCounter(name); - } else { - counter = this.counters[name]; - } + children.forEach((data, item) => { + if (data.type && data.type === "Identifier") { + let name = data.name; + let whitespace, number, value; + if (item.next && item.next.data.type === "WhiteSpace") { + whitespace = item.next; + } + if (whitespace && whitespace.next && whitespace.next.data.type === "Number") { + number = whitespace.next; + value = parseInt(number.data.value); + } - return counter.resets[selector] = { - selector: selector, - number: number || 0 - }; + let counter; + let selector; + let prelude = rule.ruleNode.prelude; + + if (rule.ruleNode.type === "Atrule" && rule.ruleNode.name === "page") { + selector = ".pagedjs_page"; + } else { + selector = lib.generate(prelude || rule.ruleNode); + } + + if (name === "footnote") { + this.addFootnoteMarkerCounter(declaration.value.children); + } + + if (!(name in this.counters)) { + counter = this.addCounter(name); + } else { + counter = this.counters[name]; + } + + let reset = { + selector: selector, + number: value || 0 + }; + + counter.resets[selector] = reset; + resets.push(reset); + + if (selector !== ".pagedjs_page") { + // Remove the parsed resets + children.remove(item); + if (whitespace) { + children.remove(whitespace); + } + if (number) { + children.remove(number); + } + } + } + }); + + return resets; } processCounters(parsed, counters) { @@ -29108,7 +30356,7 @@ } } // Add to pages to allow cross page scope - this.insertRule(`.pagedjs_pages { counter-reset: ${countersArray.join(" ")} page 0 pages var(--pagedjs-page-count)}`); + this.insertRule(`.pagedjs_pages { counter-reset: ${countersArray.join(" ")} page 0 pages var(--pagedjs-page-count) footnote var(--pagedjs-footnotes-count) footnote-marker var(--pagedjs-footnotes-count)}`); } insertRule(rule) { @@ -29124,7 +30372,11 @@ // Add counter data for (let i = 0; i < incrementElements.length; i++) { incrementElements[i].setAttribute("data-counter-"+ counter.name +"-increment", increment.number); - incrementElements[i].setAttribute("data-counter-increment", counter.name); + if (incrementElements[i].getAttribute("data-counter-increment")) { + incrementElements[i].setAttribute("data-counter-increment", incrementElements[i].getAttribute("data-counter-increment") + " " + counter.name); + } else { + incrementElements[i].setAttribute("data-counter-increment", counter.name); + } } } } @@ -29138,14 +30390,23 @@ // Add counter data for (var i = 0; i < resetElements.length; i++) { resetElements[i].setAttribute("data-counter-"+ counter.name +"-reset", reset.number); - resetElements[i].setAttribute("data-counter-reset", counter.name); + if (resetElements[i].getAttribute("data-counter-reset")) { + resetElements[i].setAttribute("data-counter-reset", resetElements[i].getAttribute("data-counter-reset") + " " + counter.name); + } else { + resetElements[i].setAttribute("data-counter-reset", counter.name); + } } } } addCounterValues(parsed, counter) { - const counterName = counter.name; - const elements = parsed.querySelectorAll("[data-counter-"+ counterName +"-reset], [data-counter-"+ counterName +"-increment]"); + let counterName = counter.name; + + if (counterName === "page" || counterName === "footnote") { + return; + } + + let elements = parsed.querySelectorAll("[data-counter-"+ counterName +"-reset], [data-counter-"+ counterName +"-increment]"); let count = 0; let element; @@ -29188,6 +30449,41 @@ } } + addFootnoteMarkerCounter(list) { + let markers = []; + lib.walk(list, { + visit: "Identifier", + enter: (identNode, iItem, iList) => { + markers.push(identNode.name); + } + }); + + // Already added + if (markers.includes("footnote-maker")) { + return; + } + + list.insertData({ + type: "WhiteSpace", + value: " " + }); + + list.insertData({ + type: "Identifier", + name: "footnote-marker" + }); + + list.insertData({ + type: "WhiteSpace", + value: " " + }); + + list.insertData({ + type: "Number", + value: 0 + }); + } + incrementCounterForElement(element, incrementArray) { if (!element || !incrementArray || incrementArray.length === 0) return; @@ -29211,7 +30507,9 @@ } afterPageLayout(pageElement, page) { - let pgreset = pageElement.querySelectorAll("[data-counter-page-reset]"); + let resets = []; + + let pgreset = pageElement.querySelectorAll("[data-counter-page-reset]:not([data-split-from])"); pgreset.forEach((reset) => { const ref = reset.dataset && reset.dataset.ref; if (ref && this.resetCountersMap.has(ref)) ; else { @@ -29219,9 +30517,20 @@ this.resetCountersMap.set(ref, ""); } let value = reset.dataset.counterPageReset; - this.styleSheet.insertRule(`[data-page-number="${pageElement.dataset.pageNumber}"] { counter-increment: none; counter-reset: page ${value}; }`, this.styleSheet.cssRules.length); + resets.push(`page ${value}`); } }); + + let notereset = pageElement.querySelectorAll("[data-counter-footnote-reset]:not([data-split-from])"); + notereset.forEach((reset) => { + let value = reset.dataset.counterFootnoteReset; + resets.push(`footnote ${value}`); + resets.push(`footnote-marker ${value}`); + }); + + if (resets.length) { + this.styleSheet.insertRule(`[data-page-number="${pageElement.dataset.pageNumber}"] { counter-increment: none; counter-reset: ${resets.join(" ")} }`, this.styleSheet.cssRules.length); + } } } @@ -29241,12 +30550,9 @@ afterPageLayout(pageElement, page, breakToken, chunker) { var orderedLists = pageElement.getElementsByTagName("ol"); for (var list of orderedLists) { - if (list.hasChildNodes()) { + if (list.firstElementChild) { list.start = list.firstElementChild.dataset.itemNum; } - else { - list.parentNode.removeChild(list); - } } } @@ -29335,7 +30641,7 @@ const number = declaration.value.children.getSize() > 1 ? declaration.value.children.last().value : 1; const name = identifier && identifier.name; - if (name.indexOf("target-counter-") === 0) { + if (name && name.indexOf("target-counter-") === 0) { return; } // A counter named page is automatically created and incremented by 1 on every page of the document, @@ -29470,17 +30776,560 @@ } } + class Footnotes extends Handler { + constructor(chunker, polisher, caller) { + super(chunker, polisher, caller); + + this.footnotes = {}; + this.needsLayout = []; + } + + onDeclaration(declaration, dItem, dList, rule) { + let property = declaration.property; + if (property === "float") { + let identifier = declaration.value.children && declaration.value.children.first(); + let location = identifier && identifier.name; + if (location === "footnote") { + let selector = lib.generate(rule.ruleNode.prelude); + this.footnotes[selector] = { + selector: selector, + policy: "auto", + display: "block" + }; + dList.remove(dItem); + } + } + if (property === "footnote-policy") { + let identifier = declaration.value.children && declaration.value.children.first(); + let policy = identifier && identifier.name; + if (policy) { + let selector = lib.generate(rule.ruleNode.prelude); + let note = this.footnotes[selector]; + if (note) { + note.policy = policy; + } + } + } + if (property === "footnote-display") { + let identifier = declaration.value.children && declaration.value.children.first(); + let display = identifier && identifier.name; + let selector = lib.generate(rule.ruleNode.prelude); + if (display && this.footnotes[selector]) { + let note = this.footnotes[selector]; + if (note) { + note.display = display; + } + } + } + } + + onPseudoSelector(pseudoNode, pItem, pList, selector, rule) { + let name = pseudoNode.name; + if (name === "footnote-marker") { + // switch ::footnote-marker to [data-footnote-marker]::before + let prelude = rule.ruleNode.prelude; + let newPrelude = new lib.List(); + + // Can't get remove to work, so just copying everything else + prelude.children.first().children.each((node) => { + if (node.type !== "PseudoElementSelector") { + newPrelude.appendData(node); + } + }); + + // Add our data call + newPrelude.appendData({ + type: "AttributeSelector", + name: { + type: "Identifier", + name: "data-footnote-marker", + }, + flags: null, + loc: null, + matcher: null, + value: null + }); + + // Add new pseudo element + newPrelude.appendData({ + type: "PseudoElementSelector", + name: "marker", + loc: null, + children: null + }); + + prelude.children.first().children = newPrelude; + } + + if (name === "footnote-call") { + // switch ::footnote-call to [data-footnote-call]::after + + let prelude = rule.ruleNode.prelude; + let newPrelude = new lib.List(); + + // Can't get remove to work, so just copying everything else + prelude.children.first().children.each((node) => { + if (node.type !== "PseudoElementSelector") { + newPrelude.appendData(node); + } + }); + + // Add our data call + newPrelude.appendData({ + type: "AttributeSelector", + name: { + type: "Identifier", + name: "data-footnote-call", + }, + flags: null, + loc: null, + matcher: null, + value: null + }); + + // Add new pseudo element + newPrelude.appendData({ + type: "PseudoElementSelector", + name: "after", + loc: null, + children: null + }); + + prelude.children.first().children = newPrelude; + } + } + + afterParsed(parsed) { + this.processFootnotes(parsed, this.footnotes); + } + + processFootnotes(parsed, notes) { + for (let n in notes) { + // Find elements + let elements = parsed.querySelectorAll(n); + let element; + let note = notes[n]; + for (var i = 0; i < elements.length; i++) { + element = elements[i]; + // Add note type + element.setAttribute("data-note", "footnote"); + element.setAttribute("data-break-before", "avoid"); + element.setAttribute("data-note-policy", note.policy || "auto"); + element.setAttribute("data-note-display", note.display || "block"); + // Mark all parents + this.processFootnoteContainer(element); + } + } + } + + processFootnoteContainer(node) { + // Find the container + let element = node.parentElement; + let prevElement = element; + // Walk up the dom until we find a container element + while (element) { + if (isContainer(element)) { + // Add flag to the previous non-container element that will render with children + prevElement.setAttribute("data-has-notes", "true"); + break; + } + + prevElement = element; + element = element.parentElement; + + // If no containers were found and there are no further parents flag the last element + if (!element) { + prevElement.setAttribute("data-has-notes", "true"); + } + } + } + + renderNode(node) { + if (node.nodeType == 1) { + // Get all notes + let notes; + + // Ingnore html element nodes, like mathml + if (!node.dataset) { + return; + } + + if (node.dataset.note === "footnote") { + notes = [node]; + } else if (node.dataset.hasNotes || node.querySelectorAll("[data-note='footnote']")) { + notes = node.querySelectorAll("[data-note='footnote']"); + } + + if (notes && notes.length) { + this.findVisibleFootnotes(notes, node); + } + } + } + + findVisibleFootnotes(notes, node) { + let area, size, right; + area = node.closest(".pagedjs_page_content"); + size = area.getBoundingClientRect(); + right = size.left + size.width; + + for (let i = 0; i < notes.length; ++i) { + let currentNote = notes[i]; + let bounds = currentNote.getBoundingClientRect(); + let left = bounds.left; + + if (left < right) { + // Add call for the note + this.moveFootnote(currentNote, node.closest(".pagedjs_area"), true); + } + } + } + + moveFootnote(node, pageArea, needsNoteCall) { + // let pageArea = node.closest(".pagedjs_area"); + let noteArea = pageArea.querySelector(".pagedjs_footnote_area"); + let noteContent = noteArea.querySelector(".pagedjs_footnote_content"); + let noteInnerContent = noteContent.querySelector(".pagedjs_footnote_inner_content"); + + if (!isElement(node)) { + return; + } + + // Add call for the note + let noteCall; + if (needsNoteCall) { + noteCall = this.createFootnoteCall(node); + } + + // Remove the break before attribute for future layout + node.removeAttribute("data-break-before"); + + // Check if note already exists for overflow + let existing = noteInnerContent.querySelector(`[data-ref="${node.dataset.ref}"]`); + if (existing) { + // Remove the note from the flow but no need to render it again + node.remove(); + return; + } + + // Add the note node + noteInnerContent.appendChild(node); + + // Remove empty class + if (noteContent.classList.contains("pagedjs_footnote_empty")) { + noteContent.classList.remove("pagedjs_footnote_empty"); + } + + // Add marker + node.dataset.footnoteMarker = node.dataset.ref; + + // Add Id + node.id = `note-${node.dataset.ref}`; + + // Get note content size + let height = noteContent.scrollHeight; + + // Check the noteCall is still on screen + let area = pageArea.querySelector(".pagedjs_page_content"); + let size = area.getBoundingClientRect(); + let right = size.left + size.width; + + // TODO: add a max height in CSS + + // Check element sizes + let noteCallBounds = noteCall && noteCall.getBoundingClientRect(); + let noteAreaBounds = noteArea.getBoundingClientRect(); + + // Get the @footnote margins + let noteContentMargins = this.marginsHeight(noteContent); + let noteContentPadding = this.paddingHeight(noteContent); + let noteContentBorders = this.borderHeight(noteContent); + let total = noteContentMargins + noteContentPadding + noteContentBorders; + + // Get the top of the @footnote area + let notAreaTop = Math.floor(noteAreaBounds.top); + // If the height isn't set yet, remove the margins from the top + if (noteAreaBounds.height === 0) { + notAreaTop -= this.marginsHeight(noteContent, false); + notAreaTop -= this.paddingHeight(noteContent, false); + notAreaTop -= this.borderHeight(noteContent, false); + } + // Determine the note call position and offset per policy + let notePolicy = node.dataset.notePolicy; + let noteCallPosition = 0; + let noteCallOffset = 0; + if (noteCall) { + // Get the correct line bottom for super or sub styled callouts + let prevSibling = noteCall.previousSibling; + let range = new Range(); + if (prevSibling) { + range.setStartBefore(prevSibling); + } else { + range.setStartBefore(noteCall); + } + range.setEndAfter(noteCall); + let rangeBounds = range.getBoundingClientRect(); + noteCallPosition = rangeBounds.bottom; + if (!notePolicy || notePolicy === "auto") { + noteCallOffset = Math.ceil(rangeBounds.bottom); + } else if (notePolicy === "line") { + noteCallOffset = Math.ceil(rangeBounds.top); + } else if (notePolicy === "block") { + // Check that there is a previous element on the page + let parentParagraph = noteCall.closest("p").previousElementSibling; + if (parentParagraph) { + noteCallOffset = Math.ceil( + parentParagraph.getBoundingClientRect().bottom + ); + } else { + noteCallOffset = Math.ceil(rangeBounds.bottom); + } + } + } + + let contentDelta = height + total - noteAreaBounds.height; + // Space between the top of the footnotes area and the bottom of the footnote call + let noteDelta = noteCallPosition ? notAreaTop - noteCallPosition : 0; + // Space needed for the force a break for the policy of the footnote + let notePolicyDelta = noteCallPosition ? Math.floor(noteAreaBounds.top) - noteCallOffset : 0; + let hasNotes = noteArea.querySelector("[data-note='footnote']"); + if (needsNoteCall && noteCallBounds.left > right) { + // Note is offscreen and will be chunked to the next page on overflow + node.remove(); + } else if (!hasNotes && needsNoteCall && total > noteDelta) { + // No space to add even the footnote area + pageArea.style.setProperty("--pagedjs-footnotes-height", "0px"); + // Add a wrapper as this div is removed later + let wrapperDiv = document.createElement("div"); + wrapperDiv.appendChild(node); + // Push to the layout queue for the next page + this.needsLayout.push(wrapperDiv); + } else if (!needsNoteCall) { + // Call was previously added, force adding footnote + pageArea.style.setProperty( + "--pagedjs-footnotes-height", + `${height + total}px` + ); + } else if (noteCallPosition < noteAreaBounds.top - contentDelta) { + // the current note content will fit without pushing the call to the next page + pageArea.style.setProperty( + "--pagedjs-footnotes-height", + `${height + noteContentMargins + noteContentBorders}px` + ); + } else { + // set height to just before note call + pageArea.style.setProperty( + "--pagedjs-footnotes-height", + `${noteAreaBounds.height + notePolicyDelta}px` + ); + noteInnerContent.style.height = + noteAreaBounds.height + notePolicyDelta - total + "px"; + } + } + + createFootnoteCall(node) { + let parentElement = node.parentElement; + let footnoteCall = document.createElement("a"); + for (const className of node.classList) { + footnoteCall.classList.add(`${className}`); + } + + footnoteCall.dataset.footnoteCall = node.dataset.ref; + footnoteCall.dataset.ref = node.dataset.ref; + + // Increment for counters + footnoteCall.dataset.dataCounterFootnoteIncrement = 1; + + // Add link + footnoteCall.href = `#note-${node.dataset.ref}`; + + parentElement.insertBefore(footnoteCall, node); + + return footnoteCall; + } + + afterPageLayout(pageElement, page, breakToken, chunker) { + let pageArea = pageElement.querySelector(".pagedjs_area"); + let noteArea = page.footnotesArea; + let noteContent = noteArea.querySelector(".pagedjs_footnote_content"); + let noteInnerContent = noteArea.querySelector(".pagedjs_footnote_inner_content"); + + let noteContentBounds = noteContent.getBoundingClientRect(); + let { width } = noteContentBounds; + + noteInnerContent.style.columnWidth = Math.round(width) + "px"; + noteInnerContent.style.columnGap = "calc(var(--pagedjs-margin-right) + var(--pagedjs-margin-left))"; + + // Get overflow + let layout = new Layout(noteArea, undefined, chunker.settings); + let overflow = layout.findOverflow(noteInnerContent, noteContentBounds); + + if (overflow) { + let { startContainer, startOffset } = overflow; + let startIsNode; + if (isElement(startContainer)) { + let start = startContainer.childNodes[startOffset]; + startIsNode = isElement(start) && start.hasAttribute("data-footnote-marker"); + } + + let extracted = overflow.extractContents(); + + if (!startIsNode) { + let splitChild = extracted.firstElementChild; + splitChild.dataset.splitFrom = splitChild.dataset.ref; + + this.handleAlignment(noteInnerContent.lastElementChild); + } + + this.needsLayout.push(extracted); + + noteContent.style.removeProperty("height"); + noteInnerContent.style.removeProperty("height"); + + let noteInnerContentBounds = noteInnerContent.getBoundingClientRect(); + let { height } = noteInnerContentBounds; + + // Get the @footnote margins + let noteContentMargins = this.marginsHeight(noteContent); + let noteContentPadding = this.paddingHeight(noteContent); + let noteContentBorders = this.borderHeight(noteContent); + pageArea.style.setProperty( + "--pagedjs-footnotes-height", + `${height + noteContentMargins + noteContentBorders + noteContentPadding}px` + ); + + // Hide footnote content if empty + if (noteInnerContent.childNodes.length === 0) { + noteContent.classList.add("pagedjs_footnote_empty"); + } + + if (!breakToken) { + chunker.clonePage(page); + } else { + let breakBefore, previousBreakAfter; + if ( + breakToken.node && + typeof breakToken.node.dataset !== "undefined" && + typeof breakToken.node.dataset.previousBreakAfter !== "undefined" + ) { + previousBreakAfter = breakToken.node.dataset.previousBreakAfter; + } + + if ( + breakToken.node && + typeof breakToken.node.dataset !== "undefined" && + typeof breakToken.node.dataset.breakBefore !== "undefined" + ) { + breakBefore = breakToken.node.dataset.breakBefore; + } + + if (breakBefore || previousBreakAfter) { + chunker.clonePage(page); + } + } + } + noteInnerContent.style.height = "auto"; + } + + handleAlignment(node) { + let styles = window.getComputedStyle(node); + let alignLast = styles["text-align-last"]; + node.dataset.lastSplitElement = "true"; + if (alignLast === "auto") { + node.dataset.alignLastSplitElement = "justify"; + } else { + node.dataset.alignLastSplitElement = alignLast; + } + } + + beforePageLayout(page) { + while (this.needsLayout.length) { + let fragment = this.needsLayout.shift(); + + Array.from(fragment.childNodes).forEach((node) => { + this.moveFootnote( + node, + page.element.querySelector(".pagedjs_area"), + false + ); + }); + } + } + + afterOverflowRemoved(removed, rendered) { + // Find the page area + let area = rendered.closest(".pagedjs_area"); + // Get any rendered footnotes + let notes = area.querySelectorAll(".pagedjs_footnote_area [data-note='footnote']"); + for (let n = 0; n < notes.length; n++) { + const note = notes[n]; + // Check if the call for that footnote has been removed with the overflow + let call = removed.querySelector(`[data-footnote-call="${note.dataset.ref}"]`); + if (call) { + note.remove(); + } + } + // Hide footnote content if empty + let noteInnerContent = area.querySelector(".pagedjs_footnote_inner_content"); + if (noteInnerContent && noteInnerContent.childNodes.length === 0) { + noteInnerContent.parentElement.classList.add("pagedjs_footnote_empty"); + } + } + + marginsHeight(element, total=true) { + let styles = window.getComputedStyle(element); + let marginTop = parseInt(styles.marginTop); + let marginBottom = parseInt(styles.marginBottom); + let margin = 0; + if (marginTop) { + margin += marginTop; + } + if (marginBottom && total) { + margin += marginBottom; + } + return margin; + } + + paddingHeight(element, total=true) { + let styles = window.getComputedStyle(element); + let paddingTop = parseInt(styles.paddingTop); + let paddingBottom = parseInt(styles.paddingBottom); + let padding = 0; + if (paddingTop) { + padding += paddingTop; + } + if (paddingBottom && total) { + padding += paddingBottom; + } + return padding; + } + + borderHeight(element, total=true) { + let styles = window.getComputedStyle(element); + let borderTop = parseInt(styles.borderTop); + let borderBottom = parseInt(styles.borderBottom); + let borders = 0; + if (borderTop) { + borders += borderTop; + } + if (borderBottom && total) { + borders += borderBottom; + } + return borders; + } + } + var pagedMediaHandlers = [ + PrintMedia, AtPage, Breaks, - PrintMedia, Splits, Counters, Lists, PositionFixed, PageCounterIncrement, NthOfType, - Following + Following, + Footnotes ]; class RunningHeaders extends Handler { @@ -29628,7 +31477,7 @@ switch (parts.length) { case 4: - if (parts[3] === "pagedjs_first_page") { + if (/^pagedjs_[\w-]+_first_page$/.test(parts[3])) { weight = 7; } else if (parts[3] === "pagedjs_left_page" || parts[3] === "pagedjs_right_page") { weight = 6; @@ -29729,7 +31578,7 @@ this.stringSetSelectors = {}; this.type; - // pageLastString = last string variable defined on the page + // pageLastString = last string variable defined on the page this.pageLastString; } @@ -29738,21 +31587,35 @@ if (declaration.property === "string-set") { let selector = lib.generate(rule.ruleNode.prelude); - let identifier = declaration.value.children.first().name; + let identifiers = []; + let functions = []; + let values = []; - let value; - lib.walk(declaration, { - visit: "Function", - enter: (node, item, list) => { - value = lib.generate(node); + declaration.value.children.forEach((child) => { + if (child.type === "Identifier") { + identifiers.push(child.name); + } + if (child.type === "Function") { + functions.push(child.name); + child.children.forEach((subchild) => { + if (subchild.type === "Identifier") { + values.push(subchild.name); + } + }); } }); - this.stringSetSelectors[identifier] = { - identifier, - value, - selector - }; + identifiers.forEach((identifier, index) => { + let func = functions[index]; + let value = values[index]; + this.stringSetSelectors[identifier] = { + identifier, + func, + value, + selector + }; + }); + } } @@ -29792,11 +31655,13 @@ { this.pageLastString = {}; } - + for (let name of Object.keys(this.stringSetSelectors)) { let set = this.stringSetSelectors[name]; + let value = set.value; + let func = set.func; let selected = fragment.querySelectorAll(set.selector); // Get the last found string for the current identifier @@ -29814,18 +31679,36 @@ selected.forEach((sel) => { // push each content into the array to define in the variable the first and the last element of the page. - this.pageLastString[name] = selected[selected.length - 1].textContent; - + if (func === "content") { + this.pageLastString[name] = selected[selected.length - 1].textContent; + } + + if (func === "attr") { + this.pageLastString[name] = selected[selected.length - 1].getAttribute(value) || ""; + } + }); /* FIRST */ - varFirst = selected[0].textContent; + if (func === "content") { + varFirst = selected[0].textContent; + } + + if (func === "attr") { + varFirst = selected[0].getAttribute(value) || ""; + } /* LAST */ - varLast = selected[selected.length - 1].textContent; + if (func === "content") { + varLast = selected[selected.length - 1].textContent; + } + + if (func === "attr") { + varLast = selected[selected.length - 1].getAttribute(value) || ""; + } /* START */ @@ -29935,7 +31818,7 @@ afterPageLayout(fragment, page, breakToken, chunker) { Object.keys(this.counterTargets).forEach((name) => { let target = this.counterTargets[name]; - let split = target.selector.split("::"); + let split = target.selector.split(/::?/g); let query = split[0]; let queried = chunker.pagesArea.querySelectorAll(query + ":not([data-" + target.variable + "])"); @@ -29960,7 +31843,8 @@ let pages = chunker.pagesArea.querySelectorAll(".pagedjs_page"); let pg = 0; for (let i = 0; i < pages.length; i++) { - let styles = window.getComputedStyle(pages[i]); + let page = pages[i]; + let styles = window.getComputedStyle(page); let reset = styles["counter-reset"].replace("page", "").trim(); let increment = styles["counter-increment"].replace("page", "").trim(); @@ -29971,11 +31855,10 @@ pg += parseInt(increment); } - if (pages[i].contains(element)) { + if (page.contains(element)){ break; } } - this.styleSheet.insertRule(`[data-${target.variable}="${selector}"]${pseudo} { counter-reset: ${target.variable} ${pg}; }`, this.styleSheet.cssRules.length); } else { let value = element.getAttribute(`data-counter-${target.counter}-value`); @@ -29983,6 +31866,14 @@ this.styleSheet.insertRule(`[data-${target.variable}="${selector}"]${pseudo} { counter-reset: ${target.variable} ${target.variable} ${parseInt(value)}; }`, this.styleSheet.cssRules.length); } } + + // force redraw + let el = document.querySelector(`[data-${target.variable}="${selector}"]`); + if (el) { + el.style.display = "none"; + el.clientHeight; + el.style.removeProperty("display"); + } } }); }); @@ -30210,7 +32101,8 @@ } - var clearCut = createCommonjsModule(function (module, exports) { + var clearCut = {}; + /** * Originally ported from https://github.com/keeganstreet/specificity/blob/866bf7ab4e7f62a7179c15b13a95af4e1c7b1afa/specificity.js * @@ -30220,6 +32112,7 @@ * Returns a selector integer value */ + (function (exports) { // The following regular expressions assume that selectors matching the preceding regular expressions have been removed var attributeRegex = /(\[[^\]]+\])/g; var idRegex = /(#[^\s\+>~\.\[:]+)/g; @@ -30333,10 +32226,7 @@ throw error; } }; - }); - var clearCut_1 = clearCut.calculateSpecificity; - var clearCut_2 = clearCut.isSelectorValid; - var clearCut_3 = clearCut.validateSelector; + }(clearCut)); class UndisplayedFilter extends Handler { constructor(chunker, polisher, caller) { @@ -30353,7 +32243,7 @@ this.displayRules[s] = { value: value, selector: s, - specificity: clearCut_1(s), + specificity: clearCut.calculateSpecificity(s), important: declaration.important }; }); @@ -30455,7 +32345,7 @@ var validTypes = { object: true, symbol: true }; - var isImplemented$4 = function () { + var isImplemented$2 = function () { var symbol; if (typeof Symbol !== 'function') return false; symbol = Symbol('test symbol'); @@ -30469,7 +32359,7 @@ return true; }; - var isSymbol = function (x) { + var isSymbol$1 = function (x) { if (!x) return false; if (typeof x === 'symbol') return true; if (!x.constructor) return false; @@ -30477,14 +32367,19 @@ return (x[x.constructor.toStringTag] === 'Symbol'); }; - var validateSymbol = function (value) { + var isSymbol = isSymbol$1; + + var validateSymbol$1 = function (value) { if (!isSymbol(value)) throw new TypeError(value + " is not a symbol"); return value; }; - var create$6 = Object.create, defineProperties = Object.defineProperties - , defineProperty = Object.defineProperty, objPrototype = Object.prototype - , NativeSymbol, SymbolPolyfill, HiddenSymbol, globalSymbols = create$6(null) + var d$1 = d$3.exports + , validateSymbol = validateSymbol$1 + + , create = Object.create, defineProperties = Object.defineProperties + , defineProperty$2 = Object.defineProperty, objPrototype = Object.prototype + , NativeSymbol, SymbolPolyfill, HiddenSymbol, globalSymbols = create(null) , isNativeSafe; if (typeof Symbol === 'function') { @@ -30496,21 +32391,21 @@ } var generateName = (function () { - var created = create$6(null); + var created = create(null); return function (desc) { var postfix = 0, name, ie11BugWorkaround; while (created[desc + (postfix || '')]) ++postfix; desc += (postfix || ''); created[desc] = true; name = '@@' + desc; - defineProperty(objPrototype, name, d_1.gs(null, function (value) { + defineProperty$2(objPrototype, name, d$1.gs(null, function (value) { // For IE11 issue see: // https://connect.microsoft.com/IE/feedbackdetail/view/1928508/ // ie11-broken-getters-on-dom-objects // https://github.com/medikoo/es6-symbol/issues/12 if (ie11BugWorkaround) return; ie11BugWorkaround = true; - defineProperty(this, name, d_1(value)); + defineProperty$2(this, name, d$1(value)); ie11BugWorkaround = false; })); return name; @@ -30530,19 +32425,19 @@ var symbol; if (this instanceof Symbol) throw new TypeError('Symbol is not a constructor'); if (isNativeSafe) return NativeSymbol(description); - symbol = create$6(HiddenSymbol.prototype); + symbol = create(HiddenSymbol.prototype); description = (description === undefined ? '' : String(description)); return defineProperties(symbol, { - __description__: d_1('', description), - __name__: d_1('', generateName(description)) + __description__: d$1('', description), + __name__: d$1('', generateName(description)) }); }; defineProperties(SymbolPolyfill, { - for: d_1(function (key) { + for: d$1(function (key) { if (globalSymbols[key]) return globalSymbols[key]; return (globalSymbols[key] = SymbolPolyfill(String(key))); }), - keyFor: d_1(function (s) { + keyFor: d$1(function (s) { var key; validateSymbol(s); for (key in globalSymbols) if (globalSymbols[key] === s) return key; @@ -30550,120 +32445,131 @@ // To ensure proper interoperability with other native functions (e.g. Array.from) // fallback to eventual native implementation of given symbol - hasInstance: d_1('', (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill('hasInstance')), - isConcatSpreadable: d_1('', (NativeSymbol && NativeSymbol.isConcatSpreadable) || + hasInstance: d$1('', (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill('hasInstance')), + isConcatSpreadable: d$1('', (NativeSymbol && NativeSymbol.isConcatSpreadable) || SymbolPolyfill('isConcatSpreadable')), - iterator: d_1('', (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill('iterator')), - match: d_1('', (NativeSymbol && NativeSymbol.match) || SymbolPolyfill('match')), - replace: d_1('', (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill('replace')), - search: d_1('', (NativeSymbol && NativeSymbol.search) || SymbolPolyfill('search')), - species: d_1('', (NativeSymbol && NativeSymbol.species) || SymbolPolyfill('species')), - split: d_1('', (NativeSymbol && NativeSymbol.split) || SymbolPolyfill('split')), - toPrimitive: d_1('', (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill('toPrimitive')), - toStringTag: d_1('', (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill('toStringTag')), - unscopables: d_1('', (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill('unscopables')) + iterator: d$1('', (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill('iterator')), + match: d$1('', (NativeSymbol && NativeSymbol.match) || SymbolPolyfill('match')), + replace: d$1('', (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill('replace')), + search: d$1('', (NativeSymbol && NativeSymbol.search) || SymbolPolyfill('search')), + species: d$1('', (NativeSymbol && NativeSymbol.species) || SymbolPolyfill('species')), + split: d$1('', (NativeSymbol && NativeSymbol.split) || SymbolPolyfill('split')), + toPrimitive: d$1('', (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill('toPrimitive')), + toStringTag: d$1('', (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill('toStringTag')), + unscopables: d$1('', (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill('unscopables')) }); // Internal tweaks for real symbol producer defineProperties(HiddenSymbol.prototype, { - constructor: d_1(SymbolPolyfill), - toString: d_1('', function () { return this.__name__; }) + constructor: d$1(SymbolPolyfill), + toString: d$1('', function () { return this.__name__; }) }); // Proper implementation of methods exposed on Symbol.prototype // They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype defineProperties(SymbolPolyfill.prototype, { - toString: d_1(function () { return 'Symbol (' + validateSymbol(this).__description__ + ')'; }), - valueOf: d_1(function () { return validateSymbol(this); }) + toString: d$1(function () { return 'Symbol (' + validateSymbol(this).__description__ + ')'; }), + valueOf: d$1(function () { return validateSymbol(this); }) }); - defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d_1('', function () { + defineProperty$2(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d$1('', function () { var symbol = validateSymbol(this); if (typeof symbol === 'symbol') return symbol; return symbol.toString(); })); - defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d_1('c', 'Symbol')); + defineProperty$2(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d$1('c', 'Symbol')); // Proper implementaton of toPrimitive and toStringTag for returned symbol instances - defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag, - d_1('c', SymbolPolyfill.prototype[SymbolPolyfill.toStringTag])); + defineProperty$2(HiddenSymbol.prototype, SymbolPolyfill.toStringTag, + d$1('c', SymbolPolyfill.prototype[SymbolPolyfill.toStringTag])); // Note: It's important to define `toPrimitive` as last one, as some implementations // implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols) // And that may invoke error in definition flow: // See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149 - defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, - d_1('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive])); + defineProperty$2(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, + d$1('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive])); - var es6Symbol = isImplemented$4() ? Symbol : polyfill; + var es6Symbol = isImplemented$2() ? Symbol : polyfill; - var objToString = Object.prototype.toString - , id = objToString.call( + var objToString$2 = Object.prototype.toString + , id$2 = objToString$2.call( (function () { return arguments; })() ); - var isArguments = function (value) { - return objToString.call(value) === id; + var isArguments$1 = function (value) { + return objToString$2.call(value) === id$2; }; - var objToString$1 = Object.prototype.toString, id$1 = objToString$1.call(noop); + var objToString$1 = Object.prototype.toString, id$1 = objToString$1.call(noop$4); - var isFunction = function (value) { + var isFunction$1 = function (value) { return typeof value === "function" && objToString$1.call(value) === id$1; }; - var isImplemented$5 = function () { + var isImplemented$1 = function () { var sign = Math.sign; if (typeof sign !== "function") return false; return (sign(10) === 1) && (sign(-20) === -1); }; - var shim$3 = function (value) { + var shim$2 = function (value) { value = Number(value); if (isNaN(value) || (value === 0)) return value; return value > 0 ? 1 : -1; }; - var sign = isImplemented$5() + var sign$1 = isImplemented$1() ? Math.sign - : shim$3; + : shim$2; - var abs = Math.abs, floor = Math.floor; + var sign = sign$1 - var toInteger = function (value) { + , abs$1 = Math.abs, floor$1 = Math.floor; + + var toInteger$1 = function (value) { if (isNaN(value)) return 0; value = Number(value); if ((value === 0) || !isFinite(value)) return value; - return sign(value) * floor(abs(value)); + return sign(value) * floor$1(abs$1(value)); }; - var max$1 = Math.max; + var toInteger = toInteger$1 + + , max = Math.max; var toPosInteger = function (value) { - return max$1(0, toInteger(value)); + return max(0, toInteger(value)); }; - var objToString$2 = Object.prototype.toString, id$2 = objToString$2.call(""); + var objToString = Object.prototype.toString, id = objToString.call(""); - var isString = function (value) { + var isString$1 = function (value) { return ( typeof value === "string" || (value && typeof value === "object" && - (value instanceof String || objToString$2.call(value) === id$2)) || + (value instanceof String || objToString.call(value) === id)) || false ); }; var iteratorSymbol = es6Symbol.iterator + , isArguments = isArguments$1 + , isFunction = isFunction$1 + , toPosInt$1 = toPosInteger + , callable = validCallable + , validValue = validValue$1 + , isValue$1 = isValue$5 + , isString = isString$1 , isArray = Array.isArray , call = Function.prototype.call , desc = { configurable: true, enumerable: true, writable: true, value: null } , defineProperty$1 = Object.defineProperty; // eslint-disable-next-line complexity - var shim$4 = function (arrayLike /*, mapFn, thisArg*/) { + var shim$1 = function (arrayLike /*, mapFn, thisArg*/) { var mapFn = arguments[1] , thisArg = arguments[2] , Context @@ -30679,7 +32585,7 @@ arrayLike = Object(validValue(arrayLike)); - if (isValue(mapFn)) validCallable(mapFn); + if (isValue$1(mapFn)) callable(mapFn); if (!this || this === Array || !isFunction(this)) { // Result: Plain array if (!mapFn) { @@ -30707,7 +32613,7 @@ if (!isArray(arrayLike)) { if ((getIterator = arrayLike[iteratorSymbol]) !== undefined) { // Source: Iterator - iterator = validCallable(getIterator).call(arrayLike); + iterator = callable(getIterator).call(arrayLike); if (Context) arr = new Context(); result = iterator.next(); i = 0; @@ -30748,7 +32654,7 @@ } if (length === undefined) { // Source: array or array-like - length = toPosInteger(arrayLike.length); + length = toPosInt$1(arrayLike.length); if (Context) arr = new Context(length); for (i = 0; i < length; ++i) { value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i]; @@ -30767,109 +32673,121 @@ return arr; }; - var from_1 = isImplemented$3() + var from = isImplemented$3() ? Array.from - : shim$4; + : shim$1; - var isImplemented$6 = function () { + var isImplemented = function () { var numberIsNaN = Number.isNaN; if (typeof numberIsNaN !== "function") return false; return !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34); }; - var shim$5 = function (value) { + var shim = function (value) { // eslint-disable-next-line no-self-compare return value !== value; }; - var isNan = isImplemented$6() + var isNan = isImplemented() ? Number.isNaN - : shim$5; + : shim; - var indexOf$2 = Array.prototype.indexOf + var numberIsNaN = isNan + , toPosInt = toPosInteger + , value$1 = validValue$1 + , indexOf$1 = Array.prototype.indexOf , objHasOwnProperty = Object.prototype.hasOwnProperty - , abs$1 = Math.abs - , floor$1 = Math.floor; + , abs = Math.abs + , floor = Math.floor; var eIndexOf = function (searchElement /*, fromIndex*/) { var i, length, fromIndex, val; - if (!isNan(searchElement)) return indexOf$2.apply(this, arguments); + if (!numberIsNaN(searchElement)) return indexOf$1.apply(this, arguments); - length = toPosInteger(validValue(this).length); + length = toPosInt(value$1(this).length); fromIndex = arguments[1]; if (isNaN(fromIndex)) fromIndex = 0; - else if (fromIndex >= 0) fromIndex = floor$1(fromIndex); - else fromIndex = toPosInteger(this.length) - floor$1(abs$1(fromIndex)); + else if (fromIndex >= 0) fromIndex = floor(fromIndex); + else fromIndex = toPosInt(this.length) - floor(abs(fromIndex)); for (i = fromIndex; i < length; ++i) { if (objHasOwnProperty.call(this, i)) { val = this[i]; - if (isNan(val)) return i; // Jslint: ignore + if (numberIsNaN(val)) return i; // Jslint: ignore } } return -1; }; - var forEach$1 = Array.prototype.forEach + var indexOf = eIndexOf + , forEach = Array.prototype.forEach , splice = Array.prototype.splice; // eslint-disable-next-line no-unused-vars - var remove = function (itemToRemove /*, …item*/) { - forEach$1.call( + var remove$1 = function (itemToRemove /*, …item*/) { + forEach.call( arguments, function (item) { - var index = eIndexOf.call(this, item); + var index = indexOf.call(this, item); if (index !== -1) splice.call(this, index, 1); }, this ); }; + var isValue = isValue$5; + var map = { function: true, object: true }; var isObject$1 = function (value) { return (isValue(value) && map[typeof value]) || false; }; + var isObject = isObject$1; + var validObject = function (value) { - if (!isObject$1(value)) throw new TypeError(value + " is not an Object"); + if (!isObject(value)) throw new TypeError(value + " is not an Object"); return value; }; - var emit = eventEmitter.methods.emit + var aFrom = from + , remove = remove$1 + , value = validObject + , d = d$3.exports + , emit = eventEmitter.exports.methods.emit - , defineProperty$2 = Object.defineProperty - , hasOwnProperty$6 = Object.prototype.hasOwnProperty + , defineProperty = Object.defineProperty + , hasOwnProperty$1 = Object.prototype.hasOwnProperty , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var pipe = function (e1, e2/*, name*/) { var pipes, pipe, desc, name; - (validObject(e1) && validObject(e2)); + (value(e1) && value(e2)); name = arguments[2]; if (name === undefined) name = 'emit'; pipe = { close: function () { remove.call(pipes, e2); } }; - if (hasOwnProperty$6.call(e1, '__eePipes__')) { + if (hasOwnProperty$1.call(e1, '__eePipes__')) { (pipes = e1.__eePipes__).push(e2); return pipe; } - defineProperty$2(e1, '__eePipes__', d_1('c', pipes = [e2])); + defineProperty(e1, '__eePipes__', d('c', pipes = [e2])); desc = getOwnPropertyDescriptor(e1, name); if (!desc) { - desc = d_1('c', undefined); + desc = d('c', undefined); } else { delete desc.get; delete desc.set; } desc.value = function () { - var i, emitter, data = from_1(pipes); + var i, emitter, data = aFrom(pipes); emit.apply(this, arguments); for (i = 0; (emitter = data[i]); ++i) emit.apply(emitter, arguments); }; - defineProperty$2(e1, name, desc); + defineProperty(e1, name, desc); return pipe; }; @@ -30885,7 +32803,7 @@ } } - eventEmitter(Handlers.prototype); + EventEmitter(Handlers.prototype); function registerHandlers() { for (var i = 0; i < arguments.length; i++) { @@ -30993,22 +32911,36 @@ removeStyles(doc=document) { // Get all stylesheets - let stylesheets = Array.from(doc.querySelectorAll("link[rel='stylesheet']")); - let hrefs = stylesheets.map((sheet) => { - sheet.remove(); - return sheet.href; - }); - + const stylesheets = Array.from(doc.querySelectorAll("link[rel='stylesheet']:not([data-pagedjs-ignore], [media~='screen'])")); // Get inline styles - let inlineStyles = Array.from(doc.querySelectorAll("style:not([data-pagedjs-inserted-styles])")); - inlineStyles.forEach((inlineStyle) => { - let obj = {}; - obj[window.location.href] = inlineStyle.textContent; - hrefs.push(obj); - inlineStyle.remove(); - }); - - return hrefs; + const inlineStyles = Array.from(doc.querySelectorAll("style:not([data-pagedjs-inserted-styles], [data-pagedjs-ignore], [media~='screen'])")); + const elements = [...stylesheets, ...inlineStyles]; + return elements + // preserve order + .sort(function (element1, element2) { + const position = element1.compareDocumentPosition(element2); + if (position === Node.DOCUMENT_POSITION_PRECEDING) { + return 1; + } else if (position === Node.DOCUMENT_POSITION_FOLLOWING) { + return -1; + } + return 0; + }) + // extract the href + .map((element) => { + if (element.nodeName === "STYLE") { + const obj = {}; + obj[window.location.href] = element.textContent; + element.remove(); + return obj; + } + if (element.nodeName === "LINK") { + element.remove(); + return element.href; + } + // ignore + console.warn(`Unable to process: ${element}, ignoring.`); + }); } async preview(content, stylesheets, renderTo) { @@ -31047,7 +32979,7 @@ } } - eventEmitter(Previewer.prototype); + EventEmitter(Previewer.prototype); var Paged = /*#__PURE__*/Object.freeze({ __proto__: null, @@ -31055,6 +32987,7 @@ Polisher: Polisher, Previewer: Previewer, Handler: Handler, + registeredHandlers: registeredHandlers, registerHandlers: registerHandlers, initializeHandlers: initializeHandlers }); @@ -31104,4 +33037,4 @@ return previewer; -}))); +})); diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/logo/800x418.png b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/logo/800x418.png new file mode 100644 index 0000000000000000000000000000000000000000..4595f4c16f02f72c6cd1781f7bca0e9548b0866a GIT binary patch literal 21285 zcmXt9b5vkow64j<^`3v+?b3 z@4{rIMG#L{=0LTGDmV{B$= zMCj;dYeZ<|YGw=q;<{RyYGF^zSrzngNOgfK>OZxQOoGhFowC1$M44P(RGhEFsN8Be z78eJOI2qu6w)Js+`0-d~Rao4__;T{&pOT7}(M_KuU-#MR`;Dsf-P^~I%KI}PU-!FS zQ#BtZKFY=Z&1s2F^w`oa-)4!=){SuYO~|_U&6lSx@29&z20l71uS4N&`x)MEX?)!q zmyXR-7tZG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gf_+nDnEEtfZ;Uo?yENnPw9TfyA9bPp&{^Ae?>ITk_3yW|g3iV% zY&Fpmd*AHI{*I&>2CjFL@itE%sZ1yoZGYw%c+24?|KHKQ{cB}BgGGzC3d`Lr<_0cr O6k5mRB0LJvcW2 literal 0 HcmV?d00001 diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/logo/800x800.png b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/logo/800x800.png new file mode 100644 index 0000000000000000000000000000000000000000..84656c838bfdf9f825c18fe82fb3a8651aa8a8b2 GIT binary patch literal 38346 zcmaHRV{oM1^Y%<^I~&{C*tTukw#|*XvCZAs$;R2(wl}u_^ZcsbukVMcshRseefsLt zxVq~^D=A1K!r{RI002a3DKQlQ0G#;04-6RSA2qZjK>&b^(??CqO~u%g*vZAw!rIQ9 z*v;F?oY>sU+5!OZTC2^rPS$OA3I8(1Gypp?<_4feT_bh*1wxlBTxv57R5_?eiyQ16 zIYmI6OntpSxql7i=b5;*HyKFQ<_UTqpi&9CeXZx;eSCV;Kfix|-cb2{Azd;BqQ2xk z=LsOUynoog3ViOrJREy6-edQ|93nGG32sw_*2@mp=U(*WCXan7;5w?CHo4i2OI{*!#R@9EOwJO9Jg`9D%RE z+;i2SZ5mI-(KFI!>XY!WuouPqf}ygc+16N^M4wdGv@cC#p0PLG9QM?+-@T2L>)BH9 z7m5+fYfLbpJkn1K!k@pe4AacEIvX+*rGo28(v(6Szqg>c#NsrH|6tLVXJ1yawO8lo)U|0()6li;j^pq>YtJz7J?~Bsko*>%PG20)@rq-ru;psO zIdQO6q;WCvn4)i;^3T)*+k^4x&o zpBXxxr$@RD-4~C%m+wED9W}o0ABfBt{C;B@mfd$fvfA>kWij3}qK2`GbCa2Vhi2JI z1;X*rTJ}Wd6tk4)yr7=OplO>aJJ3I$ico~VglRcE|Lojmd7AKc9emxs#R{ZwRj7Om z9MyB9`XF%(OkzhzyUb`*#HKA1nDytg9G(h;5}ljZyZdeyDQJf}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n`f&c75fQwp|6*g*SLCO0OB_xe5UM<>aomu!<#?fff{kX8g0tfg-}=f1)1fyaY^)+(Ps2QL@Q7jo>964JNu8^^`(WM&pB z0x_s#9KDqoF)o(?C_Eoz3eX3SH_ zCbb}P<~ivE-2Hhx=vmB8PmF6wAL8+5dJ>BQnGBS+h@k>g-=M3c3kw1|yrHcCk@@{K z;J=ry6V;!44@fV(>b7mmJ$!W!%1Gyb{t5evns}^Z?A!k%rC#JooF|8_U3G5BDj(fD zHM4?@u0I71CFUpG<#+YQTCJsJK7FE#y$JmNyGlVt*<9Mv!EC!bCH^f*#|wh^O{0Pp zc}@ zkGVMre4N*JwdM2uNO)S8VixPK)y(HICJ55S<-PC9OsganDixUU-Ki~huez; z*y+J00J*!lr#5l7_3li(caM=(TmmYAd%cTCvblw8ai%QkZiuwbs=@Dm23$2rpkv@r zd(&r10=CeEAd@pF=}EeEc5=ACCNOHMw*Bso=-Fx#DQRPEDF0Gq(G*7jZwluaSzV`I z+t~7NTlVj-OOezGRvEtVl0lIO!eiA^I+XuVS3=rPgfy@J>)+zH^Q64MBMJ?x|F%R5 N!p73^K%qIE`42qO4>SM( literal 0 HcmV?d00001 diff --git a/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/logo/index.html b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/logo/index.html new file mode 100644 index 0000000..e4ed5bf --- /dev/null +++ b/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/logo/index.html @@ -0,0 +1,145 @@ + + + + + + + + + + +

+
+ +
+
+ + diff --git a/_vendor/modules.txt b/_vendor/modules.txt index 20739db..7a8cf1b 100644 --- a/_vendor/modules.txt +++ b/_vendor/modules.txt @@ -1 +1 @@ -# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20210314123921-28595383157a +# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20221212163146-fea2002f3205 diff --git a/config.toml b/config.toml index f093c8b..4d3ed92 100644 --- a/config.toml +++ b/config.toml @@ -5,38 +5,37 @@ relativeurls = true disableKinds = ["RSS", "sitemap"] [taxonomies] - keyword = "keywords" +keyword = "keywords" [params] - description = "Some description should land here..." - images = ["/UNS-logo.png"] - title = "Dotawo Journal" - sandpointsGiteaUrl = "https://git.sandpoints.org/UnionForNubianStudies/Dotawo" - sandpointsCatalogPrefix = "/library/" - sandpointsCatalogName = "dotawo" - sandpointsMentionedIn = ["annex", "author", "editor"] +description = "Some description should land here..." +images = ["/UNS-logo.png"] +sandpointsGiteaUrl = "https://git.sandpoints.org/UnionForNubianStudies/Dotawo" +sandpointsCatalogPrefix = "/library/" +sandpointsCatalogName = "dotawo" +sandpointsMentionedIn = ["annex", "author", "editor"] [outputFormats] - [outputFormats.js] - isPlainText = true - mediaType = "text/javascript" +[outputFormats.js] +isPlainText = true +mediaType = "text/javascript" [outputs] - list = ["html", "js"] +list = ["html", "js"] [markup] - [markup.tableOfContents] - endLevel=4 - ordered = true - startLevel = 1 +[markup.tableOfContents] +endLevel=4 +ordered = true +startLevel = 1 [markup.goldmark.renderer] - unsafe = true +unsafe = true [module] - # replacements = "git.sandpoints.org/Drawwell/SandpointsTheme -> /home/m/devel/SandpointsTheme" - [[module.imports]] - path = "git.sandpoints.org/Drawwell/SandpointsTheme" +# replacements = "git.sandpoints.org/Drawwell/SandpointsTheme -> /home/m/devel/SandpointsTheme" +[[module.imports]] +path = "git.sandpoints.org/Drawwell/SandpointsTheme" # if only [[module.imports]]'s path is provided # and repo is made into hugo module (hugo mod init repo_name) @@ -45,42 +44,42 @@ disableKinds = ["RSS", "sitemap"] # if repo needs some specific customization the rest of the # mounts below should be added respectively # - [[module.imports.mounts]] - source = "archetypes" - target = "archetypes" - [[module.imports.mounts]] - source = "assets" - target = "assets" - [[module.imports.mounts]] - source = "data" - target = "data" - [[module.imports.mounts]] - source = "layouts" - target = "layouts" - [[module.imports.mounts]] - source = "static" - target = "static" - [[module.imports.mounts]] - source = "customizations/Dotawo/static/fonts" - target = "static/fonts" - [[module.imports.mounts]] - source = "customizations/Dotawo/assets/css/site.css" - target = "assets/css/site.css" - [[module.imports.mounts]] - source = "customizations/Dotawo/static/css/site.min.css" - target = "static/css/site.min.css" - [[module.imports.mounts]] - source = "customizations/Dotawo/static/css/dyn.css" - target = "static/css/dyn.css" - [[module.imports.mounts]] - source = "customizations/Dotawo/layouts/partials/header.html" - target = "layouts/partials/header.html" - [[module.imports.mounts]] - source = "customizations/Dotawo/layouts/partials/singlebody.html" - target = "layouts/partials/singlebody.html" - [[module.imports.mounts]] - source = "customizations/Dotawo/layouts/_default/_markup/render-image.html" - target = "layouts/_default/_markup/render-image.html" - [[module.imports.mounts]] - source = "customizations/Dotawo/layouts/_default/_markup/render-link.html" - target = "layouts/_default/_markup/render-link.html" +[[module.imports.mounts]] +source = "archetypes" +target = "archetypes" +[[module.imports.mounts]] +source = "assets" +target = "assets" +[[module.imports.mounts]] +source = "data" +target = "data" +[[module.imports.mounts]] +source = "layouts" +target = "layouts" +[[module.imports.mounts]] +source = "static" +target = "static" +[[module.imports.mounts]] +source = "customizations/Dotawo/static/fonts" +target = "static/fonts" +[[module.imports.mounts]] +source = "customizations/Dotawo/assets/css/site.css" +target = "assets/css/site.css" +[[module.imports.mounts]] +source = "customizations/Dotawo/static/css/site.min.css" +target = "static/css/site.min.css" +[[module.imports.mounts]] +source = "customizations/Dotawo/static/css/dyn.css" +target = "static/css/dyn.css" +[[module.imports.mounts]] +source = "customizations/Dotawo/layouts/partials/header.html" +target = "layouts/partials/header.html" +[[module.imports.mounts]] +source = "customizations/Dotawo/layouts/partials/singlebody.html" +target = "layouts/partials/singlebody.html" +[[module.imports.mounts]] +source = "customizations/Dotawo/layouts/_default/_markup/render-image.html" +target = "layouts/_default/_markup/render-image.html" +[[module.imports.mounts]] +source = "customizations/Dotawo/layouts/_default/_markup/render-link.html" +target = "layouts/_default/_markup/render-link.html"