pfwr 0.17.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -4
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/nikku/pfwr/actions/workflows/CI.yml)
|
|
4
4
|
|
|
5
|
-
Turns your [Markdown file](https://github.com/nikku/pfwr/blob/main/README.md#example) into [a beautiful HTML slide deck](https://cdn.statically.io/gh/nikku/pfwr/v0.17.
|
|
5
|
+
Turns your [Markdown file](https://github.com/nikku/pfwr/blob/main/README.md#example) into [a beautiful HTML slide deck](https://cdn.statically.io/gh/nikku/pfwr/v0.17.1/example/presentation.html). Batteries included.
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
## Introduction
|
|
9
9
|
|
|
10
|
-
[](https://cdn.statically.io/gh/nikku/pfwr/v0.17.
|
|
10
|
+
[](https://cdn.statically.io/gh/nikku/pfwr/v0.17.1/example/presentation.html)
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
@@ -28,7 +28,10 @@ pfwr presentation.md presentation.html
|
|
|
28
28
|
## Features
|
|
29
29
|
|
|
30
30
|
* Recognizes [CommonMark](https://commonmark.org/) and [GitHub flavored Markdown](https://github.github.com/gfm/)
|
|
31
|
-
*
|
|
31
|
+
* Produces a self-contained HTML slide deck
|
|
32
|
+
* Responsive
|
|
33
|
+
* Printable
|
|
34
|
+
* Single slide + grid view
|
|
32
35
|
* Embeds HTML, on purpose (cf. [security considerations](#security-considerations))
|
|
33
36
|
* Allows you to configure meta-data via front-matter
|
|
34
37
|
* Watch mode (rebuild on changes)
|
|
@@ -74,7 +77,7 @@ Convert the file to an HTML file:
|
|
|
74
77
|
pfwr presentation.md presentation.html
|
|
75
78
|
```
|
|
76
79
|
|
|
77
|
-
Open [the slide deck](https://cdn.statically.io/gh/nikku/pfwr/v0.17.
|
|
80
|
+
Open [the slide deck](https://cdn.statically.io/gh/nikku/pfwr/v0.17.1/example/presentation.html) in your favorite browser.
|
|
78
81
|
|
|
79
82
|
|
|
80
83
|
## Security Considerations
|
package/dist/index.js
CHANGED
|
@@ -70781,7 +70781,7 @@ function tagSlide(node) {
|
|
|
70781
70781
|
|
|
70782
70782
|
var pfwrStyle = "html,\nbody {\n margin: 0;\n padding: 0;\n height: 100%;\n box-sizing: border-box;\n}\n\n:root {\n\n --font-scale: 1;\n\n /* base type scales with the slide container (cqmin), so the same slide\n renders legibly full-screen and as a small overview tile */\n --font-size-default: calc(var(--font-scale) * 5cqmin);\n --font-size-h1: 3.2em;\n --font-size-h2: 2.2em;\n --font-size-h3: 1.8em;\n --font-size-h4: 1.4em;\n --font-size-small: 1.5cqmin;\n --font-size-smaller: .7em;\n\n --font-size-default-print: 2.4em;\n\n --slide-margin: calc(var(--font-scale) * 6cqmin);\n\n --font-family-body: 'Montserrat', sans-serif;\n --font-family-heading: 'Roboto Slab', serif;\n --font-family-code: 'Roboto Mono', monospace;\n\n --list-margin: .5em;\n --line-height: 1.3;\n\n --color-navy: #001F3F;\n --color-blue: #0074D9;\n --color-aqua: #7FDBFF;\n --color-teal: #39CCCC;\n --color-olive: #3D9970;\n --color-green: #2ECC40;\n --color-lime: #01FF70;\n --color-yellow: #FFDC00;\n --color-orange: #FF851B;\n --color-red: #FF4136;\n --color-fuchsia: #F012BE;\n --color-purple: #B10DC9;\n --color-maroon: #85144B;\n --color-white: #FFFFFF;\n --color-gray-7: #FCFCFC;\n --color-gray-6: #F0F0F0;\n --color-gray-5: #DDDDDD;\n --color-gray-4: #AAAAAA;\n --color-gray-3: #888;\n --color-gray-2: #666;\n --color-gray-1: #333;\n --color-black: #111;\n\n --color-default: var(--color-gray-1);\n --color-bg: var(--color-white);\n\n --color-highlight: var(--color-gray-7);\n --color-highlight-bg: var(--color-fuchsia);\n\n --color-slide-number: var(--color-gray-3);\n\n --color-code-bg: #cfcaca59;\n --color-code: var(--color-gray-7);\n\n --color-link: var(--color-blue);\n\n --color-table-head: var(--color-gray-7);\n --color-table-head-bg: var(--color-orange);\n --color-table: var(--color-default);\n --color-table-bg: var(--color-gray-6);\n --color-table-border: var(--color-gray-5);\n}\n\n.slide[data-theme='funky'] {\n\n --color-default: var(--color-gray-7);\n --color-bg: var(--color-fuchsia);\n\n --color-slide-number: var(--color-gray-5);\n\n --color-code: var(--color-gray-7);\n --color-code-bg: #cfcaca59;\n\n --color-highlight: var(--color-gray-7);\n --color-highlight-bg: var(--color-orange);\n\n --color-link: var(--color-gray-7);\n\n --color-table-head: var(--color-gray-1);\n --color-table-head-bg: var(--color-yellow);\n --color-table-bg: var(--color-gray-7);\n --color-table-border: var(--color-gray-4);\n}\n\n.slide[data-theme='eco'] {\n\n --color-default: var(--color-gray-7);\n --color-bg: var(--color-olive);\n\n --color-slide-number: var(--color-gray-5);\n\n --color-code: var(--color-gray-7);\n --color-code-bg: #cfcaca59;\n\n --color-highlight: var(--color-white);\n --color-highlight-bg: var(--color-red);\n\n --color-link: var(--color-gray-7);\n\n --color-table-head: var(--color-gray-7);\n --color-table-head-bg: var(--color-orange);\n --color-table-bg: var(--color-gray-7);\n --color-table-border: var(--color-gray-4);\n}\n\ncode:not([class*=\"language-\"]) {\n padding: .2em .4em;\n margin: 0;\n font-size: 85%;\n border-radius: .1em;\n\n background-color: var(--color-code-bg);\n font-family: var(--font-family-code);\n}\n\nh1, h2, h3, h4 {\n font-family: var(--font-family-heading);\n}\n\nh1 {\n font-size: var(--font-size-h1);\n}\n\nh2 {\n font-size: var(--font-size-h2);\n}\n\nh3 {\n font-size: var(--font-size-h3);\n}\n\nh4 {\n font-size: var(--font-size-h4);\n}\n\nli + li {\n margin-top: var(--list-margin);\n}\n\na {\n color: var(--color-link);\n}\n\nsmall {\n font-size: var(--font-size-smaller);\n}\n\nem {\n background: var(--color-highlight-bg);\n font-style: normal;\n color: var(--color-highlight);\n}\n\ntable, pre {\n width: fit-content;\n min-width: 50%;\n}\n\np:has(> a > img:only-child:not(.emoji)),\np:has(> img:only-child:not(.emoji)),\na:has(> img:only-child:not(.emoji)) {\n display: flex;\n flex: initial;\n overflow: hidden;\n justify-content: center;\n}\n\nimg:not(.emoji) {\n max-width: 100%;\n object-fit: scale-down;\n}\n\n.slide-content > pre[class*=\"language-\"] {\n font-size: .5em;\n margin: 2em;\n}\n\n.slide-content > *:not(:first-child) {\n margin-top: 0 !important;\n}\n\n.slide-content > *,\n.slide-content > pre[class*=\"language-\"] {\n margin-left: var(--slide-margin);\n margin-right: var(--slide-margin);\n}\n\n.slide-content > *:first-child {\n margin-top: var(--slide-margin);\n}\n\n.slide-content > *:last-child {\n margin-bottom: var(--slide-margin);\n}\n\n.slide-container {\n font-family: var(--font-family-body);\n line-height: var(--line-height);\n}\n\n/* display: contents keeps the content elements as flex items of .slide\n (so layout/alignment is unchanged) while anchoring the responsive\n base font-size to .slide, which is the query container */\n.slide-content {\n display: contents;\n font-size: var(--font-size-default);\n}\n\n.slide-container {\n width: 100vw;\n height: 100vh;\n}\n\n.slide {\n position: relative;\n\n width: 100%;\n height: 100%;\n container-type: size;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n\n background: var(--color-bg);\n color: var(--color-default);\n}\n\n.slide[data-align='center'] {\n align-items: center;\n text-align: center;\n}\n\n.slide[data-align='left'] {\n align-items: flex-start;\n}\n\n.slide[data-align='right'] {\n align-items: flex-end;\n}\n\ntable {\n border-radius: .6em;\n overflow: hidden;\n border-collapse: collapse;\n\n color: var(--color-table);\n background: var(--color-table-bg);\n\n font-size: .7em;\n margin-bottom: 1em;\n}\n\nthead {\n color: var(--color-table-head);\n background: var(--color-table-head-bg);\n}\n\ntbody tr + tr {\n border-top: solid 1px var(--color-table-border);\n}\n\ntable td,\ntable th {\n padding: .7em .8em;\n}\n\ntable th:first-child,\ntable td:first-child {\n padding-left: 1.5em;\n}\n\ntable th:last-child,\ntable td:last-child {\n padding-right: 1.5em;\n}\n\nimg.emoji {\n height: 1em;\n width: 1em;\n margin: 0 .05em 0 .1em;\n vertical-align: -0.1em;\n}\n\n.slide-number {\n position: absolute;\n bottom: calc(var(--slide-margin) / 2);\n right: calc(var(--slide-margin) / 2);\n color: var(--color-slide-number);\n font-size: var(--font-size-small);\n margin: 0;\n}\n\n.slide-navigation {\n position: fixed;\n top: 20px;\n right: 20px;\n}\n\n.slide-navigation:not(.shown) {\n display: none;\n}\n\n.slide-navigation a {\n text-decoration: none;\n display: inline-block;\n margin: .05em;\n padding: .2em;\n\n background: var(--color-gray-5);\n color: var(--color-gray-1);\n opacity: .4;\n border-radius: .1em;\n}\n\n.slide-navigation a svg {\n display: block;\n}\n\n.slide-navigation a:hover {\n opacity: 1;\n}\n\n/* in overview only the toggle stays; slide navigation is meaningless */\n.slide-container.overview .navigation-button:not([data-navigate=\"overview\"]) {\n display: none;\n}\n\n@media print {\n\n .slide-navigation {\n display: none;\n }\n\n .slide-content {\n font-size: var(--font-size-default-print);\n }\n\n .slide {\n page-break-after: always;\n }\n}\n\n@media screen {\n .slide-container {\n overflow: hidden;\n }\n\n .slide {\n position: absolute;\n transform: translate(-100%, -100%);\n }\n\n .slide.current {\n top: 0;\n left: 0;\n transform: translate(0, 0);\n }\n\n /* overview: lay slides out as a responsive grid of clickable tiles.\n each tile is a size container, so the cqmin-based type scales down */\n .slide-container.overview {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));\n gap: 1.5rem;\n padding: 1.5rem;\n\n /* grow with the tiles and let the document scroll; a fixed height\n would collapse the auto rows (size-contained tiles report no\n height), making the aspect-ratio tiles overlap */\n height: auto;\n min-height: 100vh;\n overflow: visible;\n\n /* fill the available width instead of 100vw + padding (content-box),\n which would overflow past the scrollbar and force horizontal scroll */\n width: auto;\n align-items: start;\n background: var(--color-gray-5);\n }\n\n .overview .slide {\n position: static;\n transform: none;\n height: auto;\n min-height: 0;\n aspect-ratio: 16 / 9;\n overflow: hidden;\n cursor: pointer;\n border-radius: .5rem;\n box-shadow: 0 0 .2rem rgb(0 0 0 / .25);\n }\n\n .overview .slide.current {\n box-shadow: 0 0 0 .25rem var(--color-navy), 0.1rem .1rem .2rem rgb(0 0 0 / .25);\n }\n}\n\n";
|
|
70783
70783
|
|
|
70784
|
-
var pfwrScript = "function addNavigationControls(container, dispatch) {\n\n const html = `<nav class=\"slide-navigation shown\">\n <a class=\"navigation-button\" data-navigate=\"first\" title=\"First slide\" href>\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M12 16.5a4.5 4.5 0 100-9 4.5 4.5 0 000 9zm0 1.5a6 6 0 100-12 6 6 0 000 12z\"></path></svg>\n </a>\n <a class=\"navigation-button\" data-navigate=\"previous\" title=\"Previous slide (Left Arrow)\" href>\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"currentColor\"><path d=\"M8.854 11.646l5.792-5.792a.5.5 0 01.854.353v11.586a.5.5 0 01-.854.353l-5.792-5.792a.5.5 0 010-.708z\"></path></svg>\n </a>\n <a class=\"navigation-button\" data-navigate=\"next\" title=\"Next slide (Enter/Spacebar/Right Arrow)\" href>\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"currentColor\"><path d=\"M15.146 12.354l-5.792 5.792a.5.5 0 01-.854-.353V6.207a.5.5 0 01.854-.353l5.792 5.792a.5.5 0 010 .708z\"></path></svg>\n </a>\n <a class=\"navigation-button\" data-navigate=\"last\" title=\"Last slide\" href>\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"currentColor\"><path d=\"M12 18a6 6 0 100-12 6 6 0 000 12z\"></path></svg>\n </a>\n <a class=\"navigation-button\" data-navigate=\"overview\" title=\"Toggle overview (O)\" href>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"currentColor\" viewBox=\"-4 -4 24 24\"><path d=\"m14.12 10.163 1.715.858c.22.11.22.424 0 .534L8.267 15.34a.6.6 0 0 1-.534 0L.165 11.555a.299.299 0 0 1 0-.534l1.716-.858 5.317 2.659c.505.252 1.1.252 1.604 0l5.317-2.66zM7.733.063a.6.6 0 0 1 .534 0l7.568 3.784a.3.3 0 0 1 0 .535L8.267 8.165a.6.6 0 0 1-.534 0L.165 4.382a.299.299 0 0 1 0-.535z\"></path><path d=\"m14.12 6.576 1.715.858c.22.11.22.424 0 .534l-7.568 3.784a.6.6 0 0 1-.534 0L.165 7.968a.299.299 0 0 1 0-.534l1.716-.858 5.317 2.659c.505.252 1.1.252 1.604 0z\"></path></svg>\n </a>\n </nav>`;\n\n const tmp = document.createElement('div');\n\n tmp.innerHTML = html;\n\n const nav = tmp.removeChild(tmp.lastChild);\n\n nav.addEventListener('mouseenter', function(event) {\n nav.classList.add('hovered');\n });\n\n nav.addEventListener('mouseleave', function(event) {\n nav.classList.remove('hovered');\n });\n\n nav.addEventListener('click', function(event) {\n\n event.preventDefault();\n\n let target = event.target;\n\n while (!target.matches('[data-navigate]')) {\n target = target.parentNode;\n }\n\n if (!target) {\n return;\n }\n\n dispatch(target.dataset.navigate);\n });\n\n container.appendChild(nav);\n\n return nav;\n}\n\n// eslint-disable-next-line no-unused-vars\nfunction pfwr(options) {\n\n const {\n container\n } = options;\n\n const slides = Array.from(container.querySelectorAll('.slide'));\n\n // mouse navigation controls\n const nav = addNavigationControls(container, dispatch);\n\n // event listeners ////////////////////////\n\n const listeners = [];\n\n function on(event, fn) {\n listeners.push([ event, fn ]);\n }\n\n function emit(event, data) {\n\n for (const [ eventType, fn ] of listeners) {\n if (event === eventType) {\n fn(data);\n }\n }\n }\n\n // slide life cycle ////////////////\n\n let slideIndex = -1;\n let overview = false;\n\n function emitState() {\n emit('change', { slide: slideIndex, overview });\n }\n\n function toggleOverview(value) {\n\n value = !!value;\n\n if (overview === value) {\n return;\n }\n\n overview = value;\n container.classList.toggle('overview', overview);\n\n if (overview) {\n const current = container.querySelector('.slide.current');\n\n current && current.scrollIntoView({ block: 'center' });\n }\n\n emitState();\n }\n\n function dispatch(action) {\n\n if (action === 'overview') {\n return toggleOverview(!overview);\n }\n\n goto(action);\n }\n\n function goto(next) {\n\n const slide = slides[slideIndex] || slides.find(s => s.dataset.name === slideIndex);\n\n const nextIndex = ((next, currentIndex, numberOfSlides) => {\n\n if (next === 'next') {\n return currentIndex + 1;\n }\n\n if (next === 'previous') {\n return currentIndex - 1;\n }\n\n if (next === 'first') {\n return 0;\n }\n\n if (next === 'last') {\n return numberOfSlides - 1;\n }\n\n if (next < 0) {\n return numberOfSlides + next;\n }\n\n return next;\n })(next, slides.indexOf(slide), slides.length);\n\n if (slideIndex === nextIndex) {\n return;\n }\n\n const nextSlide = slides[nextIndex] || slides.find(s => s.dataset.name === nextIndex);\n\n if (!nextSlide) {\n return;\n }\n\n slide && slide.classList.remove('current');\n nextSlide.classList.add('current');\n\n slideIndex = nextSlide.dataset.name || nextIndex;\n\n emitState();\n }\n\n // slide navigation\n\n function showNav() {\n nav && nav.classList.toggle('shown', true);\n }\n\n function hideNav() {\n nav && !nav.matches('.hovered') && nav.classList.toggle('shown', false);\n }\n\n let hideTimer;\n\n container.addEventListener('mousemove', function() {\n\n showNav();\n\n clearTimeout(hideTimer);\n\n hideTimer = setTimeout(hideNav, 2000);\n });\n\n // open a slide by clicking its tile in overview\n container.addEventListener('click', function(event) {\n\n if (!overview) {\n return;\n }\n\n const slide = event.target.closest('.slide');\n\n if (!slide) {\n return;\n }\n\n goto(slides.indexOf(slide));\n toggleOverview(false);\n });\n\n\n let initialTouch = null;\n\n function touchPosition(event) {\n return {\n x: event.touches[0].clientX,\n y: event.touches[0].clientY\n };\n }\n\n function handleTouchStart(event) {\n initialTouch = touchPosition(event);\n }\n\n function handleTouchMove(event) {\n\n if (!initialTouch) {\n return;\n }\n\n var currentTouch = touchPosition(event);\n\n var diff = {\n x: initialTouch.x - currentTouch.x,\n y: initialTouch.y - currentTouch.y\n };\n\n if (Math.abs(diff.x) > 30) {\n if (diff.x < 0) {\n goto('previous');\n } else {\n goto('next');\n }\n\n initialTouch = null;\n }\n }\n\n function handleKey(event) {\n\n const key = event.key;\n\n if (event.altKey || event.metaKey || event.ctrlKey) {\n return;\n }\n\n if (key === 'Home') {\n hideNav();\n goto('first');\n\n return false;\n }\n\n if (key === 'End') {\n hideNav();\n goto('last');\n\n return false;\n }\n\n if (key === 'ArrowRight' || key === 'Enter' || key === ' ') {\n hideNav();\n goto('next');\n\n return false;\n }\n\n if (key === 'ArrowLeft') {\n hideNav();\n goto('previous');\n\n return false;\n }\n\n if (key === 'o' || key === 'O') {\n toggleOverview(!overview);\n\n return false;\n }\n }\n\n function destroy() {\n document.removeEventListener('keydown', handleKey);\n\n document.removeEventListener('touchstart', handleTouchStart, false);\n document.removeEventListener('touchmove', handleTouchMove, false);\n }\n\n document.addEventListener('keydown', handleKey);\n\n document.addEventListener('touchstart', handleTouchStart, false);\n document.addEventListener('touchmove', handleTouchMove, false);\n\n return {\n on,\n goto,\n toggleOverview,\n destroy\n };\n}";
|
|
70784
|
+
var pfwrScript = "function addNavigationControls(container, dispatch) {\n\n const html = `<nav class=\"slide-navigation shown\">\n <a class=\"navigation-button\" data-navigate=\"first\" title=\"First slide\" href>\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M12 16.5a4.5 4.5 0 100-9 4.5 4.5 0 000 9zm0 1.5a6 6 0 100-12 6 6 0 000 12z\"></path></svg>\n </a>\n <a class=\"navigation-button\" data-navigate=\"previous\" title=\"Previous slide (Left Arrow)\" href>\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"currentColor\"><path d=\"M8.854 11.646l5.792-5.792a.5.5 0 01.854.353v11.586a.5.5 0 01-.854.353l-5.792-5.792a.5.5 0 010-.708z\"></path></svg>\n </a>\n <a class=\"navigation-button\" data-navigate=\"next\" title=\"Next slide (Enter/Spacebar/Right Arrow)\" href>\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"currentColor\"><path d=\"M15.146 12.354l-5.792 5.792a.5.5 0 01-.854-.353V6.207a.5.5 0 01.854-.353l5.792 5.792a.5.5 0 010 .708z\"></path></svg>\n </a>\n <a class=\"navigation-button\" data-navigate=\"last\" title=\"Last slide\" href>\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"currentColor\"><path d=\"M12 18a6 6 0 100-12 6 6 0 000 12z\"></path></svg>\n </a>\n <a class=\"navigation-button\" data-navigate=\"overview\" title=\"Toggle overview (O)\" href>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"currentColor\" viewBox=\"-4 -4 24 24\"><path d=\"m14.12 10.163 1.715.858c.22.11.22.424 0 .534L8.267 15.34a.6.6 0 0 1-.534 0L.165 11.555a.299.299 0 0 1 0-.534l1.716-.858 5.317 2.659c.505.252 1.1.252 1.604 0l5.317-2.66zM7.733.063a.6.6 0 0 1 .534 0l7.568 3.784a.3.3 0 0 1 0 .535L8.267 8.165a.6.6 0 0 1-.534 0L.165 4.382a.299.299 0 0 1 0-.535z\"></path><path d=\"m14.12 6.576 1.715.858c.22.11.22.424 0 .534l-7.568 3.784a.6.6 0 0 1-.534 0L.165 7.968a.299.299 0 0 1 0-.534l1.716-.858 5.317 2.659c.505.252 1.1.252 1.604 0z\"></path></svg>\n </a>\n </nav>`;\n\n const tmp = document.createElement('div');\n\n tmp.innerHTML = html;\n\n const nav = tmp.removeChild(tmp.lastChild);\n\n nav.addEventListener('mouseenter', function(event) {\n nav.classList.add('hovered');\n });\n\n nav.addEventListener('mouseleave', function(event) {\n nav.classList.remove('hovered');\n });\n\n nav.addEventListener('click', function(event) {\n\n event.preventDefault();\n\n let target = event.target;\n\n while (!target.matches('[data-navigate]')) {\n target = target.parentNode;\n }\n\n if (!target) {\n return;\n }\n\n dispatch(target.dataset.navigate);\n });\n\n container.appendChild(nav);\n\n return nav;\n}\n\n// eslint-disable-next-line no-unused-vars\nfunction pfwr(options) {\n\n const {\n container\n } = options;\n\n const slides = Array.from(container.querySelectorAll('.slide'));\n\n // mouse navigation controls\n const nav = addNavigationControls(container, dispatch);\n\n // event listeners ////////////////////////\n\n const listeners = [];\n\n function on(event, fn) {\n listeners.push([ event, fn ]);\n }\n\n function emit(event, data) {\n\n for (const [ eventType, fn ] of listeners) {\n if (event === eventType) {\n fn(data);\n }\n }\n }\n\n // slide life cycle ////////////////\n\n let slideIndex = -1;\n let overview = false;\n\n function emitState() {\n emit('change', { slide: slideIndex, overview });\n }\n\n function toggleOverview(value) {\n\n value = !!value;\n\n if (overview === value) {\n return;\n }\n\n overview = value;\n container.classList.toggle('overview', overview);\n\n if (overview) {\n const current = container.querySelector('.slide.current');\n\n current && current.scrollIntoView({ block: 'center' });\n }\n\n emitState();\n }\n\n function dispatch(action) {\n\n if (action === 'overview') {\n return toggleOverview(!overview);\n }\n\n goto(action);\n }\n\n function goto(next) {\n\n const slide = slides[slideIndex] || slides.find(s => s.dataset.name === slideIndex);\n\n const nextIndex = ((next, currentIndex, numberOfSlides) => {\n\n if (next === 'next') {\n return currentIndex + 1;\n }\n\n if (next === 'previous') {\n return currentIndex - 1;\n }\n\n if (next === 'first') {\n return 0;\n }\n\n if (next === 'last') {\n return numberOfSlides - 1;\n }\n\n if (next < 0) {\n return numberOfSlides + next;\n }\n\n return next;\n })(next, slides.indexOf(slide), slides.length);\n\n if (slideIndex === nextIndex) {\n return;\n }\n\n const nextSlide = slides[nextIndex] || slides.find(s => s.dataset.name === nextIndex);\n\n if (!nextSlide) {\n return;\n }\n\n slide && slide.classList.remove('current');\n nextSlide.classList.add('current');\n\n slideIndex = nextSlide.dataset.name || nextIndex;\n\n emitState();\n }\n\n // slide navigation\n\n function showNav() {\n nav && nav.classList.toggle('shown', true);\n }\n\n function hideNav() {\n nav && !nav.matches('.hovered') && nav.classList.toggle('shown', false);\n }\n\n let hideTimer;\n\n container.addEventListener('mousemove', function() {\n\n showNav();\n\n clearTimeout(hideTimer);\n\n hideTimer = setTimeout(hideNav, 2000);\n });\n\n // open a slide by clicking its tile in overview\n container.addEventListener('click', function(event) {\n\n if (!overview) {\n return;\n }\n\n const slide = event.target.closest('.slide');\n\n if (!slide) {\n return;\n }\n\n // prevent links (and other default actions) from\n // triggering while navigating via overview\n event.preventDefault();\n\n goto(slides.indexOf(slide));\n toggleOverview(false);\n });\n\n\n let initialTouch = null;\n\n function touchPosition(event) {\n return {\n x: event.touches[0].clientX,\n y: event.touches[0].clientY\n };\n }\n\n function handleTouchStart(event) {\n initialTouch = touchPosition(event);\n }\n\n function handleTouchMove(event) {\n\n if (!initialTouch) {\n return;\n }\n\n var currentTouch = touchPosition(event);\n\n var diff = {\n x: initialTouch.x - currentTouch.x,\n y: initialTouch.y - currentTouch.y\n };\n\n if (Math.abs(diff.x) > 30) {\n if (diff.x < 0) {\n goto('previous');\n } else {\n goto('next');\n }\n\n initialTouch = null;\n }\n }\n\n function handleKey(event) {\n\n const key = event.key;\n\n if (event.altKey || event.metaKey || event.ctrlKey) {\n return;\n }\n\n if (key === 'Home') {\n hideNav();\n goto('first');\n\n return false;\n }\n\n if (key === 'End') {\n hideNav();\n goto('last');\n\n return false;\n }\n\n if (key === 'ArrowRight' || key === 'Enter' || key === ' ') {\n hideNav();\n goto('next');\n\n return false;\n }\n\n if (key === 'ArrowLeft') {\n hideNav();\n goto('previous');\n\n return false;\n }\n\n if (key === 'o' || key === 'O') {\n toggleOverview(!overview);\n\n return false;\n }\n }\n\n function destroy() {\n document.removeEventListener('keydown', handleKey);\n\n document.removeEventListener('touchstart', handleTouchStart, false);\n document.removeEventListener('touchmove', handleTouchMove, false);\n }\n\n document.addEventListener('keydown', handleKey);\n\n document.addEventListener('touchstart', handleTouchStart, false);\n document.addEventListener('touchmove', handleTouchMove, false);\n\n return {\n on,\n goto,\n toggleOverview,\n destroy\n };\n}";
|
|
70785
70785
|
|
|
70786
70786
|
var prismScript = "/* PrismJS 1.23.0\nhttps://prismjs.com/download.html#themes=prism-okaidia&languages=markup+css+clike+javascript */\nvar _self=\"undefined\"!=typeof window?window:\"undefined\"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\\blang(?:uage)?-([\\w-]+)\\b/i,n=0,_={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof M?new M(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,\"&\").replace(/</g,\"<\").replace(/\\u00a0/g,\" \")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,\"__id\",{value:++n}),e.__id},clone:function t(e,r){var a,n;switch(r=r||{},_.util.type(e)){case\"Object\":if(n=_.util.objId(e),r[n])return r[n];for(var i in a={},r[n]=a,e)e.hasOwnProperty(i)&&(a[i]=t(e[i],r));return a;case\"Array\":return n=_.util.objId(e),r[n]?r[n]:(a=[],r[n]=a,e.forEach(function(e,n){a[n]=t(e,r)}),a);default:return e}},getLanguage:function(e){for(;e&&!c.test(e.className);)e=e.parentElement;return e?(e.className.match(c)||[,\"none\"])[1].toLowerCase():\"none\"},currentScript:function(){if(\"undefined\"==typeof document)return null;if(\"currentScript\"in document)return document.currentScript;try{throw new Error}catch(e){var n=(/at [^(\\r\\n]*\\((.*):.+:.+\\)$/i.exec(e.stack)||[])[1];if(n){var t=document.getElementsByTagName(\"script\");for(var r in t)if(t[r].src==n)return t[r]}return null}},isActive:function(e,n,t){for(var r=\"no-\"+n;e;){var a=e.classList;if(a.contains(n))return!0;if(a.contains(r))return!1;e=e.parentElement}return!!t}},languages:{extend:function(e,n){var t=_.util.clone(_.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(t,e,n,r){var a=(r=r||_.languages)[t],i={};for(var l in a)if(a.hasOwnProperty(l)){if(l==e)for(var o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);n.hasOwnProperty(l)||(i[l]=a[l])}var s=r[t];return r[t]=i,_.languages.DFS(_.languages,function(e,n){n===s&&e!=t&&(this[e]=i)}),i},DFS:function e(n,t,r,a){a=a||{};var i=_.util.objId;for(var l in n)if(n.hasOwnProperty(l)){t.call(n,l,n[l],r||l);var o=n[l],s=_.util.type(o);\"Object\"!==s||a[i(o)]?\"Array\"!==s||a[i(o)]||(a[i(o)]=!0,e(o,t,l,a)):(a[i(o)]=!0,e(o,t,null,a))}}},plugins:{},highlightAll:function(e,n){_.highlightAllUnder(document,e,n)},highlightAllUnder:function(e,n,t){var r={callback:t,container:e,selector:'code[class*=\"language-\"], [class*=\"language-\"] code, code[class*=\"lang-\"], [class*=\"lang-\"] code'};_.hooks.run(\"before-highlightall\",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),_.hooks.run(\"before-all-elements-highlight\",r);for(var a,i=0;a=r.elements[i++];)_.highlightElement(a,!0===n,r.callback)},highlightElement:function(e,n,t){var r=_.util.getLanguage(e),a=_.languages[r];e.className=e.className.replace(c,\"\").replace(/\\s+/g,\" \")+\" language-\"+r;var i=e.parentElement;i&&\"pre\"===i.nodeName.toLowerCase()&&(i.className=i.className.replace(c,\"\").replace(/\\s+/g,\" \")+\" language-\"+r);var l={element:e,language:r,grammar:a,code:e.textContent};function o(e){l.highlightedCode=e,_.hooks.run(\"before-insert\",l),l.element.innerHTML=l.highlightedCode,_.hooks.run(\"after-highlight\",l),_.hooks.run(\"complete\",l),t&&t.call(l.element)}if(_.hooks.run(\"before-sanity-check\",l),!l.code)return _.hooks.run(\"complete\",l),void(t&&t.call(l.element));if(_.hooks.run(\"before-highlight\",l),l.grammar)if(n&&u.Worker){var s=new Worker(_.filename);s.onmessage=function(e){o(e.data)},s.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else o(_.highlight(l.code,l.grammar,l.language));else o(_.util.encode(l.code))},highlight:function(e,n,t){var r={code:e,grammar:n,language:t};return _.hooks.run(\"before-tokenize\",r),r.tokens=_.tokenize(r.code,r.grammar),_.hooks.run(\"after-tokenize\",r),M.stringify(_.util.encode(r.tokens),r.language)},tokenize:function(e,n){var t=n.rest;if(t){for(var r in t)n[r]=t[r];delete n.rest}var a=new i;return z(a,a.head,e),function e(n,t,r,a,i,l){for(var o in r)if(r.hasOwnProperty(o)&&r[o]){var s=r[o];s=Array.isArray(s)?s:[s];for(var u=0;u<s.length;++u){if(l&&l.cause==o+\",\"+u)return;var c=s[u],g=c.inside,f=!!c.lookbehind,h=!!c.greedy,d=c.alias;if(h&&!c.pattern.global){var v=c.pattern.toString().match(/[imsuy]*$/)[0];c.pattern=RegExp(c.pattern.source,v+\"g\")}for(var p=c.pattern||c,m=a.next,y=i;m!==t.tail&&!(l&&y>=l.reach);y+=m.value.length,m=m.next){var k=m.value;if(t.length>n.length)return;if(!(k instanceof M)){var b,x=1;if(h){if(!(b=W(p,y,n,f)))break;var w=b.index,A=b.index+b[0].length,P=y;for(P+=m.value.length;P<=w;)m=m.next,P+=m.value.length;if(P-=m.value.length,y=P,m.value instanceof M)continue;for(var S=m;S!==t.tail&&(P<A||\"string\"==typeof S.value);S=S.next)x++,P+=S.value.length;x--,k=n.slice(y,P),b.index-=y}else if(!(b=W(p,0,k,f)))continue;var w=b.index,E=b[0],O=k.slice(0,w),L=k.slice(w+E.length),N=y+k.length;l&&N>l.reach&&(l.reach=N);var j=m.prev;O&&(j=z(t,j,O),y+=O.length),I(t,j,x);var C=new M(o,g?_.tokenize(E,g):E,d,E);m=z(t,j,C),L&&z(t,m,L),1<x&&e(n,t,r,m.prev,y,{cause:o+\",\"+u,reach:N})}}}}}(e,a,n,a.head,0),function(e){var n=[],t=e.head.next;for(;t!==e.tail;)n.push(t.value),t=t.next;return n}(a)},hooks:{all:{},add:function(e,n){var t=_.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=_.hooks.all[e];if(t&&t.length)for(var r,a=0;r=t[a++];)r(n)}},Token:M};function M(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=0|(r||\"\").length}function W(e,n,t,r){e.lastIndex=n;var a=e.exec(t);if(a&&r&&a[1]){var i=a[1].length;a.index+=i,a[0]=a[0].slice(i)}return a}function i(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function z(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function I(e,n,t){for(var r=n.next,a=0;a<t&&r!==e.tail;a++)r=r.next;(n.next=r).prev=n,e.length-=a}if(u.Prism=_,M.stringify=function n(e,t){if(\"string\"==typeof e)return e;if(Array.isArray(e)){var r=\"\";return e.forEach(function(e){r+=n(e,t)}),r}var a={type:e.type,content:n(e.content,t),tag:\"span\",classes:[\"token\",e.type],attributes:{},language:t},i=e.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(a.classes,i):a.classes.push(i)),_.hooks.run(\"wrap\",a);var l=\"\";for(var o in a.attributes)l+=\" \"+o+'=\"'+(a.attributes[o]||\"\").replace(/\"/g,\""\")+'\"';return\"<\"+a.tag+' class=\"'+a.classes.join(\" \")+'\"'+l+\">\"+a.content+\"</\"+a.tag+\">\"},!u.document)return u.addEventListener&&(_.disableWorkerMessageHandler||u.addEventListener(\"message\",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(_.highlight(r,_.languages[t],t)),a&&u.close()},!1)),_;var e=_.util.currentScript();function t(){_.manual||_.highlightAll()}if(e&&(_.filename=e.src,e.hasAttribute(\"data-manual\")&&(_.manual=!0)),!_.manual){var r=document.readyState;\"loading\"===r||\"interactive\"===r&&e&&e.defer?document.addEventListener(\"DOMContentLoaded\",t):window.requestAnimationFrame?window.requestAnimationFrame(t):window.setTimeout(t,16)}return _}(_self);\"undefined\"!=typeof module&&module.exports&&(module.exports=Prism),\"undefined\"!=typeof global&&(global.Prism=Prism);\nPrism.languages.markup={comment:/<!--[\\s\\S]*?-->/,prolog:/<\\?[\\s\\S]+?\\?>/,doctype:{pattern:/<!DOCTYPE(?:[^>\"'[\\]]|\"[^\"]*\"|'[^']*')+(?:\\[(?:[^<\"'\\]]|\"[^\"]*\"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\\]\\s*)?>/i,greedy:!0,inside:{\"internal-subset\":{pattern:/(\\[)[\\s\\S]+(?=\\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/\"[^\"]*\"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\\]]/,\"doctype-tag\":/^DOCTYPE/,name:/[^\\s<>'\"]+/}},cdata:/<!\\[CDATA\\[[\\s\\S]*?]]>/i,tag:{pattern:/<\\/?(?!\\d)[^\\s>\\/=$<%]+(?:\\s(?:\\s*[^\\s>\\/=]+(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))|(?=[\\s/>])))+)?\\s*\\/?>/,greedy:!0,inside:{tag:{pattern:/^<\\/?[^\\s>\\/]+/,inside:{punctuation:/^<\\/?/,namespace:/^[^\\s>\\/:]+:/}},\"attr-value\":{pattern:/=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:\"attr-equals\"},/\"|'/]}},punctuation:/\\/?>/,\"attr-name\":{pattern:/[^\\s>\\/]+/,inside:{namespace:/^[^\\s>\\/:]+:/}}}},entity:[{pattern:/&[\\da-z]{1,8};/i,alias:\"named-entity\"},/&#x?[\\da-f]{1,8};/i]},Prism.languages.markup.tag.inside[\"attr-value\"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside[\"internal-subset\"].inside=Prism.languages.markup,Prism.hooks.add(\"wrap\",function(a){\"entity\"===a.type&&(a.attributes.title=a.content.replace(/&/,\"&\"))}),Object.defineProperty(Prism.languages.markup.tag,\"addInlined\",{value:function(a,e){var s={};s[\"language-\"+e]={pattern:/(^<!\\[CDATA\\[)[\\s\\S]+?(?=\\]\\]>$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^<!\\[CDATA\\[|\\]\\]>$/i;var n={\"included-cdata\":{pattern:/<!\\[CDATA\\[[\\s\\S]*?\\]\\]>/i,inside:s}};n[\"language-\"+e]={pattern:/[\\s\\S]+/,inside:Prism.languages[e]};var t={};t[a]={pattern:RegExp(\"(<__[^>]*>)(?:<!\\\\[CDATA\\\\[(?:[^\\\\]]|\\\\](?!\\\\]>))*\\\\]\\\\]>|(?!<!\\\\[CDATA\\\\[)[^])*?(?=</__>)\".replace(/__/g,function(){return a}),\"i\"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore(\"markup\",\"cdata\",t)}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend(\"markup\",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml;\n!function(s){var e=/(\"|')(?:\\\\(?:\\r\\n|[\\s\\S])|(?!\\1)[^\\\\\\r\\n])*\\1/;s.languages.css={comment:/\\/\\*[\\s\\S]*?\\*\\//,atrule:{pattern:/@[\\w-](?:[^;{\\s]|\\s+(?![\\s{]))*(?:;|(?=\\s*\\{))/,inside:{rule:/^@[\\w-]+/,\"selector-function-argument\":{pattern:/(\\bselector\\s*\\(\\s*(?![\\s)]))(?:[^()\\s]|\\s+(?![\\s)])|\\((?:[^()]|\\([^()]*\\))*\\))+(?=\\s*\\))/,lookbehind:!0,alias:\"selector\"},keyword:{pattern:/(^|[^\\w-])(?:and|not|only|or)(?![\\w-])/,lookbehind:!0}}},url:{pattern:RegExp(\"\\\\burl\\\\((?:\"+e.source+\"|(?:[^\\\\\\\\\\r\\n()\\\"']|\\\\\\\\[^])*)\\\\)\",\"i\"),greedy:!0,inside:{function:/^url/i,punctuation:/^\\(|\\)$/,string:{pattern:RegExp(\"^\"+e.source+\"$\"),alias:\"url\"}}},selector:RegExp(\"[^{}\\\\s](?:[^{};\\\"'\\\\s]|\\\\s+(?![\\\\s{])|\"+e.source+\")*(?=\\\\s*\\\\{)\"),string:{pattern:e,greedy:!0},property:/(?!\\s)[-_a-z\\xA0-\\uFFFF](?:(?!\\s)[-\\w\\xA0-\\uFFFF])*(?=\\s*:)/i,important:/!important\\b/i,function:/[-a-z0-9]+(?=\\()/i,punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var t=s.languages.markup;t&&(t.tag.addInlined(\"style\",\"css\"),s.languages.insertBefore(\"inside\",\"attr-value\",{\"style-attr\":{pattern:/(^|[\"'\\s])style\\s*=\\s*(?:\"[^\"]*\"|'[^']*')/i,lookbehind:!0,inside:{\"attr-value\":{pattern:/=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+)/,inside:{style:{pattern:/([\"'])[\\s\\S]+(?=[\"']$)/,lookbehind:!0,alias:\"language-css\",inside:s.languages.css},punctuation:[{pattern:/^=/,alias:\"attr-equals\"},/\"|'/]}},\"attr-name\":/^style/i}}},t.tag))}(Prism);\nPrism.languages.clike={comment:[{pattern:/(^|[^\\\\])\\/\\*[\\s\\S]*?(?:\\*\\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\\\:])\\/\\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/([\"'])(?:\\\\(?:\\r\\n|[\\s\\S])|(?!\\1)[^\\\\\\r\\n])*\\1/,greedy:!0},\"class-name\":{pattern:/(\\b(?:class|interface|extends|implements|trait|instanceof|new)\\s+|\\bcatch\\s+\\()[\\w.\\\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\\\]/}},keyword:/\\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\\b/,boolean:/\\b(?:true|false)\\b/,function:/\\w+(?=\\()/,number:/\\b0x[\\da-f]+\\b|(?:\\b\\d+(?:\\.\\d*)?|\\B\\.\\d+)(?:e[+-]?\\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\\+\\+?|&&?|\\|\\|?|[?*/~^%]/,punctuation:/[{}[\\];(),.:]/};\nPrism.languages.javascript=Prism.languages.extend(\"clike\",{\"class-name\":[Prism.languages.clike[\"class-name\"],{pattern:/(^|[^$\\w\\xA0-\\uFFFF])(?!\\s)[_$A-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?=\\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\\s*)(?:catch|finally)\\b/,lookbehind:!0},{pattern:/(^|[^.]|\\.\\.\\.\\s*)\\b(?:as|async(?=\\s*(?:function\\b|\\(|[$\\w\\xA0-\\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\\s*[\\[$\\w\\xA0-\\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\\b/,lookbehind:!0}],function:/#?(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?=\\s*(?:\\.\\s*(?:apply|bind|call)\\s*)?\\()/,number:/\\b(?:(?:0[xX](?:[\\dA-Fa-f](?:_[\\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\\d(?:_\\d)?)+n|NaN|Infinity)\\b|(?:\\b(?:\\d(?:_\\d)?)+\\.?(?:\\d(?:_\\d)?)*|\\B\\.(?:\\d(?:_\\d)?)+)(?:[Ee][+-]?(?:\\d(?:_\\d)?)+)?/,operator:/--|\\+\\+|\\*\\*=?|=>|&&=?|\\|\\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\\.{3}|\\?\\?=?|\\?\\.?|[~:]/}),Prism.languages.javascript[\"class-name\"][0].pattern=/(\\b(?:class|interface|extends|implements|instanceof|new)\\s+)[\\w.\\\\]+/,Prism.languages.insertBefore(\"javascript\",\"keyword\",{regex:{pattern:/((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[gimyus]{0,6}(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))/,lookbehind:!0,greedy:!0,inside:{\"regex-source\":{pattern:/^(\\/)[\\s\\S]+(?=\\/[a-z]*$)/,lookbehind:!0,alias:\"language-regex\",inside:Prism.languages.regex},\"regex-flags\":/[a-z]+$/,\"regex-delimiter\":/^\\/|\\/$/}},\"function-variable\":{pattern:/#?(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?=\\s*[=:]\\s*(?:async\\s*)?(?:\\bfunction\\b|(?:\\((?:[^()]|\\([^()]*\\))*\\)|(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*)\\s*=>))/,alias:\"function\"},parameter:[{pattern:/(function(?:\\s+(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*)?\\s*\\(\\s*)(?!\\s)(?:[^()\\s]|\\s+(?![\\s)])|\\([^()]*\\))+(?=\\s*\\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?=\\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\\(\\s*)(?!\\s)(?:[^()\\s]|\\s+(?![\\s)])|\\([^()]*\\))+(?=\\s*\\)\\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\\b|\\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\\w\\xA0-\\uFFFF]))(?:(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*\\s*)\\(\\s*|\\]\\s*\\(\\s*)(?!\\s)(?:[^()\\s]|\\s+(?![\\s)])|\\([^()]*\\))+(?=\\s*\\)\\s*\\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\\b[A-Z](?:[A-Z_]|\\dx?)*\\b/}),Prism.languages.insertBefore(\"javascript\",\"string\",{\"template-string\":{pattern:/`(?:\\\\[\\s\\S]|\\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\\${)[^\\\\`])*`/,greedy:!0,inside:{\"template-punctuation\":{pattern:/^`|`$/,alias:\"string\"},interpolation:{pattern:/((?:^|[^\\\\])(?:\\\\{2})*)\\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{\"interpolation-punctuation\":{pattern:/^\\${|}$/,alias:\"punctuation\"},rest:Prism.languages.javascript}},string:/[\\s\\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined(\"script\",\"javascript\"),Prism.languages.js=Prism.languages.javascript;\n";
|
|
70787
70787
|
|