Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • alexis.durgnat/homepage
  • orestis.malaspin/homepage
2 results
Show changes
Showing
with 0 additions and 2561 deletions
/*!
* The reveal.js markdown plugin. Handles parsing of
* markdown inside of presentations as well as loading
* of external markdown documents.
*/
import marked from 'marked'
const DEFAULT_SLIDE_SEPARATOR = '^\r?\n---\r?\n$',
DEFAULT_NOTES_SEPARATOR = 'notes?:',
DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR = '\\\.element\\\s*?(.+?)$',
DEFAULT_SLIDE_ATTRIBUTES_SEPARATOR = '\\\.slide:\\\s*?(\\\S.+?)$';
const SCRIPT_END_PLACEHOLDER = '__SCRIPT_END__';
const CODE_LINE_NUMBER_REGEX = /\[([\s\d,|-]*)\]/;
const HTML_ESCAPE_MAP = {
'&': '&',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
"'": '&#39;'
};
const Plugin = () => {
// The reveal.js instance this plugin is attached to
let deck;
/**
* Retrieves the markdown contents of a slide section
* element. Normalizes leading tabs/whitespace.
*/
function getMarkdownFromSlide( section ) {
// look for a <script> or <textarea data-template> wrapper
var template = section.querySelector( '[data-template]' ) || section.querySelector( 'script' );
// strip leading whitespace so it isn't evaluated as code
var text = ( template || section ).textContent;
// restore script end tags
text = text.replace( new RegExp( SCRIPT_END_PLACEHOLDER, 'g' ), '</script>' );
var leadingWs = text.match( /^\n?(\s*)/ )[1].length,
leadingTabs = text.match( /^\n?(\t*)/ )[1].length;
if( leadingTabs > 0 ) {
text = text.replace( new RegExp('\\n?\\t{' + leadingTabs + '}','g'), '\n' );
}
else if( leadingWs > 1 ) {
text = text.replace( new RegExp('\\n? {' + leadingWs + '}', 'g'), '\n' );
}
return text;
}
/**
* Given a markdown slide section element, this will
* return all arguments that aren't related to markdown
* parsing. Used to forward any other user-defined arguments
* to the output markdown slide.
*/
function getForwardedAttributes( section ) {
var attributes = section.attributes;
var result = [];
for( var i = 0, len = attributes.length; i < len; i++ ) {
var name = attributes[i].name,
value = attributes[i].value;
// disregard attributes that are used for markdown loading/parsing
if( /data\-(markdown|separator|vertical|notes)/gi.test( name ) ) continue;
if( value ) {
result.push( name + '="' + value + '"' );
}
else {
result.push( name );
}
}
return result.join( ' ' );
}
/**
* Inspects the given options and fills out default
* values for what's not defined.
*/
function getSlidifyOptions( options ) {
options = options || {};
options.separator = options.separator || DEFAULT_SLIDE_SEPARATOR;
options.notesSeparator = options.notesSeparator || DEFAULT_NOTES_SEPARATOR;
options.attributes = options.attributes || '';
return options;
}
/**
* Helper function for constructing a markdown slide.
*/
function createMarkdownSlide( content, options ) {
options = getSlidifyOptions( options );
var notesMatch = content.split( new RegExp( options.notesSeparator, 'mgi' ) );
if( notesMatch.length === 2 ) {
content = notesMatch[0] + '<aside class="notes">' + marked(notesMatch[1].trim()) + '</aside>';
}
// prevent script end tags in the content from interfering
// with parsing
content = content.replace( /<\/script>/g, SCRIPT_END_PLACEHOLDER );
return '<script type="text/template">' + content + '</script>';
}
/**
* Parses a data string into multiple slides based
* on the passed in separator arguments.
*/
function slidify( markdown, options ) {
options = getSlidifyOptions( options );
var separatorRegex = new RegExp( options.separator + ( options.verticalSeparator ? '|' + options.verticalSeparator : '' ), 'mg' ),
horizontalSeparatorRegex = new RegExp( options.separator );
var matches,
lastIndex = 0,
isHorizontal,
wasHorizontal = true,
content,
sectionStack = [];
// iterate until all blocks between separators are stacked up
while( matches = separatorRegex.exec( markdown ) ) {
var notes = null;
// determine direction (horizontal by default)
isHorizontal = horizontalSeparatorRegex.test( matches[0] );
if( !isHorizontal && wasHorizontal ) {
// create vertical stack
sectionStack.push( [] );
}
// pluck slide content from markdown input
content = markdown.substring( lastIndex, matches.index );
if( isHorizontal && wasHorizontal ) {
// add to horizontal stack
sectionStack.push( content );
}
else {
// add to vertical stack
sectionStack[sectionStack.length-1].push( content );
}
lastIndex = separatorRegex.lastIndex;
wasHorizontal = isHorizontal;
}
// add the remaining slide
( wasHorizontal ? sectionStack : sectionStack[sectionStack.length-1] ).push( markdown.substring( lastIndex ) );
var markdownSections = '';
// flatten the hierarchical stack, and insert <section data-markdown> tags
for( var i = 0, len = sectionStack.length; i < len; i++ ) {
// vertical
if( sectionStack[i] instanceof Array ) {
markdownSections += '<section '+ options.attributes +'>';
sectionStack[i].forEach( function( child ) {
markdownSections += '<section data-markdown>' + createMarkdownSlide( child, options ) + '</section>';
} );
markdownSections += '</section>';
}
else {
markdownSections += '<section '+ options.attributes +' data-markdown>' + createMarkdownSlide( sectionStack[i], options ) + '</section>';
}
}
return markdownSections;
}
/**
* Parses any current data-markdown slides, splits
* multi-slide markdown into separate sections and
* handles loading of external markdown.
*/
function processSlides( scope ) {
return new Promise( function( resolve ) {
var externalPromises = [];
[].slice.call( scope.querySelectorAll( '[data-markdown]:not([data-markdown-parsed])') ).forEach( function( section, i ) {
if( section.getAttribute( 'data-markdown' ).length ) {
externalPromises.push( loadExternalMarkdown( section ).then(
// Finished loading external file
function( xhr, url ) {
section.outerHTML = slidify( xhr.responseText, {
separator: section.getAttribute( 'data-separator' ),
verticalSeparator: section.getAttribute( 'data-separator-vertical' ),
notesSeparator: section.getAttribute( 'data-separator-notes' ),
attributes: getForwardedAttributes( section )
});
},
// Failed to load markdown
function( xhr, url ) {
section.outerHTML = '<section data-state="alert">' +
'ERROR: The attempt to fetch ' + url + ' failed with HTTP status ' + xhr.status + '.' +
'Check your browser\'s JavaScript console for more details.' +
'<p>Remember that you need to serve the presentation HTML from a HTTP server.</p>' +
'</section>';
}
) );
}
else if( section.getAttribute( 'data-separator' ) || section.getAttribute( 'data-separator-vertical' ) || section.getAttribute( 'data-separator-notes' ) ) {
section.outerHTML = slidify( getMarkdownFromSlide( section ), {
separator: section.getAttribute( 'data-separator' ),
verticalSeparator: section.getAttribute( 'data-separator-vertical' ),
notesSeparator: section.getAttribute( 'data-separator-notes' ),
attributes: getForwardedAttributes( section )
});
}
else {
section.innerHTML = createMarkdownSlide( getMarkdownFromSlide( section ) );
}
});
Promise.all( externalPromises ).then( resolve );
} );
}
function loadExternalMarkdown( section ) {
return new Promise( function( resolve, reject ) {
var xhr = new XMLHttpRequest(),
url = section.getAttribute( 'data-markdown' );
var datacharset = section.getAttribute( 'data-charset' );
// see https://developer.mozilla.org/en-US/docs/Web/API/element.getAttribute#Notes
if( datacharset != null && datacharset != '' ) {
xhr.overrideMimeType( 'text/html; charset=' + datacharset );
}
xhr.onreadystatechange = function( section, xhr ) {
if( xhr.readyState === 4 ) {
// file protocol yields status code 0 (useful for local debug, mobile applications etc.)
if ( ( xhr.status >= 200 && xhr.status < 300 ) || xhr.status === 0 ) {
resolve( xhr, url );
}
else {
reject( xhr, url );
}
}
}.bind( this, section, xhr );
xhr.open( 'GET', url, true );
try {
xhr.send();
}
catch ( e ) {
console.warn( 'Failed to get the Markdown file ' + url + '. Make sure that the presentation and the file are served by a HTTP server and the file can be found there. ' + e );
resolve( xhr, url );
}
} );
}
/**
* Check if a node value has the attributes pattern.
* If yes, extract it and add that value as one or several attributes
* to the target element.
*
* You need Cache Killer on Chrome to see the effect on any FOM transformation
* directly on refresh (F5)
* http://stackoverflow.com/questions/5690269/disabling-chrome-cache-for-website-development/7000899#answer-11786277
*/
function addAttributeInElement( node, elementTarget, separator ) {
var mardownClassesInElementsRegex = new RegExp( separator, 'mg' );
var mardownClassRegex = new RegExp( "([^\"= ]+?)=\"([^\"]+?)\"|(data-[^\"= ]+?)(?=[\" ])", 'mg' );
var nodeValue = node.nodeValue;
var matches,
matchesClass;
if( matches = mardownClassesInElementsRegex.exec( nodeValue ) ) {
var classes = matches[1];
nodeValue = nodeValue.substring( 0, matches.index ) + nodeValue.substring( mardownClassesInElementsRegex.lastIndex );
node.nodeValue = nodeValue;
while( matchesClass = mardownClassRegex.exec( classes ) ) {
if( matchesClass[2] ) {
elementTarget.setAttribute( matchesClass[1], matchesClass[2] );
} else {
elementTarget.setAttribute( matchesClass[3], "" );
}
}
return true;
}
return false;
}
/**
* Add attributes to the parent element of a text node,
* or the element of an attribute node.
*/
function addAttributes( section, element, previousElement, separatorElementAttributes, separatorSectionAttributes ) {
if ( element != null && element.childNodes != undefined && element.childNodes.length > 0 ) {
var previousParentElement = element;
for( var i = 0; i < element.childNodes.length; i++ ) {
var childElement = element.childNodes[i];
if ( i > 0 ) {
var j = i - 1;
while ( j >= 0 ) {
var aPreviousChildElement = element.childNodes[j];
if ( typeof aPreviousChildElement.setAttribute == 'function' && aPreviousChildElement.tagName != "BR" ) {
previousParentElement = aPreviousChildElement;
break;
}
j = j - 1;
}
}
var parentSection = section;
if( childElement.nodeName == "section" ) {
parentSection = childElement ;
previousParentElement = childElement ;
}
if ( typeof childElement.setAttribute == 'function' || childElement.nodeType == Node.COMMENT_NODE ) {
addAttributes( parentSection, childElement, previousParentElement, separatorElementAttributes, separatorSectionAttributes );
}
}
}
if ( element.nodeType == Node.COMMENT_NODE ) {
if ( addAttributeInElement( element, previousElement, separatorElementAttributes ) == false ) {
addAttributeInElement( element, section, separatorSectionAttributes );
}
}
}
/**
* Converts any current data-markdown slides in the
* DOM to HTML.
*/
function convertSlides() {
var sections = deck.getRevealElement().querySelectorAll( '[data-markdown]:not([data-markdown-parsed])');
[].slice.call( sections ).forEach( function( section ) {
section.setAttribute( 'data-markdown-parsed', true )
var notes = section.querySelector( 'aside.notes' );
var markdown = getMarkdownFromSlide( section );
section.innerHTML = marked( markdown );
addAttributes( section, section, null, section.getAttribute( 'data-element-attributes' ) ||
section.parentNode.getAttribute( 'data-element-attributes' ) ||
DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR,
section.getAttribute( 'data-attributes' ) ||
section.parentNode.getAttribute( 'data-attributes' ) ||
DEFAULT_SLIDE_ATTRIBUTES_SEPARATOR);
// If there were notes, we need to re-add them after
// having overwritten the section's HTML
if( notes ) {
section.appendChild( notes );
}
} );
return Promise.resolve();
}
function escapeForHTML( input ) {
return input.replace( /([&<>'"])/g, char => HTML_ESCAPE_MAP[char] );
}
return {
id: 'markdown',
/**
* Starts processing and converting Markdown within the
* current reveal.js deck.
*/
init: function( reveal ) {
deck = reveal;
let renderer = new marked.Renderer();
renderer.code = ( code, language ) => {
// Off by default
let lineNumbers = '';
// Users can opt in to show line numbers and highlight
// specific lines.
// ```javascript [] show line numbers
// ```javascript [1,4-8] highlights lines 1 and 4-8
if( CODE_LINE_NUMBER_REGEX.test( language ) ) {
lineNumbers = language.match( CODE_LINE_NUMBER_REGEX )[1].trim();
lineNumbers = `data-line-numbers="${lineNumbers}"`;
language = language.replace( CODE_LINE_NUMBER_REGEX, '' ).trim();
}
// Escape before this gets injected into the DOM to
// avoid having the HTML parser alter our code before
// highlight.js is able to read it
code = escapeForHTML( code );
return `<pre><code ${lineNumbers} class="${language}">${code}</code></pre>`;
};
marked.setOptions( {
renderer,
...deck.getConfig().markdown
} );
return processSlides( deck.getRevealElement() ).then( convertSlides );
},
// TODO: Do these belong in the API?
processSlides: processSlides,
convertSlides: convertSlides,
slidify: slidify,
marked: marked
}
};
export default Plugin;
function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(n){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?t(Object(a),!0).forEach((function(t){e(n,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(a,e))}))}return n}export default function(){var e,t={messageStyle:"none",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]],skipTags:["script","noscript","style","textarea","pre"]},skipStartupTypeset:!0};return{id:"math",init:function(r){var a=(e=r).getConfig().math||{},o=n(n({},t),a),c=(o.mathjax||"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js")+"?config="+(o.config||"TeX-AMS_HTML-full");o.tex2jax=n(n({},t.tex2jax),a.tex2jax),o.mathjax=o.config=null,function(e,t){var n=this,r=document.querySelector("head"),a=document.createElement("script");a.type="text/javascript",a.src=e;var o=function(){"function"==typeof t&&(t.call(),t=null)};a.onload=o,a.onreadystatechange=function(){"loaded"===n.readyState&&o()},r.appendChild(a)}(c,(function(){MathJax.Hub.Config(o),MathJax.Hub.Queue(["Typeset",MathJax.Hub,e.getRevealElement()]),MathJax.Hub.Queue(e.layout),e.on("slidechanged",(function(e){MathJax.Hub.Queue(["Typeset",MathJax.Hub,e.currentSlide])}))}))}}}
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).RevealMath=t()}(this,(function(){"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(n){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?t(Object(a),!0).forEach((function(t){e(n,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(a,e))}))}return n}return function(){var e,t={messageStyle:"none",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]],skipTags:["script","noscript","style","textarea","pre"]},skipStartupTypeset:!0};return{id:"math",init:function(r){var a=(e=r).getConfig().math||{},o=n(n({},t),a),i=(o.mathjax||"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js")+"?config="+(o.config||"TeX-AMS_HTML-full");o.tex2jax=n(n({},t.tex2jax),a.tex2jax),o.mathjax=o.config=null,function(e,t){var n=this,r=document.querySelector("head"),a=document.createElement("script");a.type="text/javascript",a.src=e;var o=function(){"function"==typeof t&&(t.call(),t=null)};a.onload=o,a.onreadystatechange=function(){"loaded"===n.readyState&&o()},r.appendChild(a)}(i,(function(){MathJax.Hub.Config(o),MathJax.Hub.Queue(["Typeset",MathJax.Hub,e.getRevealElement()]),MathJax.Hub.Queue(e.layout),e.on("slidechanged",(function(e){MathJax.Hub.Queue(["Typeset",MathJax.Hub,e.currentSlide])}))}))}}}}));
/**
* A plugin which enables rendering of math equations inside
* of reveal.js slides. Essentially a thin wrapper for MathJax.
*
* @author Hakim El Hattab
*/
const Plugin = () => {
// The reveal.js instance this plugin is attached to
let deck;
let defaultOptions = {
messageStyle: 'none',
tex2jax: {
inlineMath: [ [ '$', '$' ], [ '\\(', '\\)' ] ],
skipTags: [ 'script', 'noscript', 'style', 'textarea', 'pre' ]
},
skipStartupTypeset: true
};
function loadScript( url, callback ) {
let head = document.querySelector( 'head' );
let script = document.createElement( 'script' );
script.type = 'text/javascript';
script.src = url;
// Wrapper for callback to make sure it only fires once
let finish = () => {
if( typeof callback === 'function' ) {
callback.call();
callback = null;
}
}
script.onload = finish;
// IE
script.onreadystatechange = () => {
if ( this.readyState === 'loaded' ) {
finish();
}
}
// Normal browsers
head.appendChild( script );
}
return {
id: 'math',
init: function( reveal ) {
deck = reveal;
let revealOptions = deck.getConfig().math || {};
let options = { ...defaultOptions, ...revealOptions };
let mathjax = options.mathjax || 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js';
let config = options.config || 'TeX-AMS_HTML-full';
let url = mathjax + '?config=' + config;
options.tex2jax = { ...defaultOptions.tex2jax, ...revealOptions.tex2jax };
options.mathjax = options.config = null;
loadScript( url, function() {
MathJax.Hub.Config( options );
// Typeset followed by an immediate reveal.js layout since
// the typesetting process could affect slide height
MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub, deck.getRevealElement() ] );
MathJax.Hub.Queue( deck.layout );
// Reprocess equations in slides when they turn visible
deck.on( 'slidechanged', function( event ) {
MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub, event.currentSlide ] );
} );
} );
}
}
};
export default Plugin;
var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e,n){return t(n={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&n.path)}},n.exports),n.exports}var n=function(t){return t&&t.Math==Math&&t},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")(),i=function(t){try{return!!t()}catch(t){return!0}},a=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),o={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,s={f:l&&!o.call({1:2},1)?function(t){var e=l(this,t);return!!e&&e.enumerable}:o},u=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},c={}.toString,p=function(t){return c.call(t).slice(8,-1)},d="".split,f=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==p(t)?d.call(t,""):Object(t)}:Object,h=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},g=function(t){return f(h(t))},m=function(t){return"object"==typeof t?null!==t:"function"==typeof t},v=function(t,e){if(!m(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!m(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!m(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!m(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},k={}.hasOwnProperty,y=function(t,e){return k.call(t,e)},b=r.document,x=m(b)&&m(b.createElement),w=function(t){return x?b.createElement(t):{}},S=!a&&!i((function(){return 7!=Object.defineProperty(w("div"),"a",{get:function(){return 7}}).a})),_=Object.getOwnPropertyDescriptor,E={f:a?_:function(t,e){if(t=g(t),e=v(e,!0),S)try{return _(t,e)}catch(t){}if(y(t,e))return u(!s.f.call(t,e),t[e])}},T=function(t){if(!m(t))throw TypeError(String(t)+" is not an object");return t},A=Object.defineProperty,z={f:a?A:function(t,e,n){if(T(t),e=v(e,!0),T(n),S)try{return A(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},R=a?function(t,e,n){return z.f(t,e,u(1,n))}:function(t,e,n){return t[e]=n,t},O=function(t,e){try{R(r,t,e)}catch(n){r[t]=e}return e},I=r["__core-js_shared__"]||O("__core-js_shared__",{}),$=Function.toString;"function"!=typeof I.inspectSource&&(I.inspectSource=function(t){return $.call(t)});var C,P,L,j=I.inspectSource,M=r.WeakMap,N="function"==typeof M&&/native code/.test(j(M)),U=e((function(t){(t.exports=function(t,e){return I[t]||(I[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.7.0",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),q=0,D=Math.random(),Z=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++q+D).toString(36)},W=U("keys"),K=function(t){return W[t]||(W[t]=Z(t))},F={},J=r.WeakMap;if(N){var H=I.state||(I.state=new J),B=H.get,Y=H.has,V=H.set;C=function(t,e){return e.facade=t,V.call(H,t,e),e},P=function(t){return B.call(H,t)||{}},L=function(t){return Y.call(H,t)}}else{var X=K("state");F[X]=!0,C=function(t,e){return e.facade=t,R(t,X,e),e},P=function(t){return y(t,X)?t[X]:{}},L=function(t){return y(t,X)}}var G={set:C,get:P,has:L,enforce:function(t){return L(t)?P(t):C(t,{})},getterFor:function(t){return function(e){var n;if(!m(e)||(n=P(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},Q=e((function(t){var e=G.get,n=G.enforce,i=String(String).split("String");(t.exports=function(t,e,a,o){var l,s=!!o&&!!o.unsafe,u=!!o&&!!o.enumerable,c=!!o&&!!o.noTargetGet;"function"==typeof a&&("string"!=typeof e||y(a,"name")||R(a,"name",e),(l=n(a)).source||(l.source=i.join("string"==typeof e?e:""))),t!==r?(s?!c&&t[e]&&(u=!0):delete t[e],u?t[e]=a:R(t,e,a)):u?t[e]=a:O(e,a)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||j(this)}))})),tt=r,et=function(t){return"function"==typeof t?t:void 0},nt=function(t,e){return arguments.length<2?et(tt[t])||et(r[t]):tt[t]&&tt[t][e]||r[t]&&r[t][e]},rt=Math.ceil,it=Math.floor,at=function(t){return isNaN(t=+t)?0:(t>0?it:rt)(t)},ot=Math.min,lt=function(t){return t>0?ot(at(t),9007199254740991):0},st=Math.max,ut=Math.min,ct=function(t,e){var n=at(t);return n<0?st(n+e,0):ut(n,e)},pt=function(t){return function(e,n,r){var i,a=g(e),o=lt(a.length),l=ct(r,o);if(t&&n!=n){for(;o>l;)if((i=a[l++])!=i)return!0}else for(;o>l;l++)if((t||l in a)&&a[l]===n)return t||l||0;return!t&&-1}},dt={includes:pt(!0),indexOf:pt(!1)},ft=dt.indexOf,ht=function(t,e){var n,r=g(t),i=0,a=[];for(n in r)!y(F,n)&&y(r,n)&&a.push(n);for(;e.length>i;)y(r,n=e[i++])&&(~ft(a,n)||a.push(n));return a},gt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],mt=gt.concat("length","prototype"),vt={f:Object.getOwnPropertyNames||function(t){return ht(t,mt)}},kt={f:Object.getOwnPropertySymbols},yt=nt("Reflect","ownKeys")||function(t){var e=vt.f(T(t)),n=kt.f;return n?e.concat(n(t)):e},bt=function(t,e){for(var n=yt(e),r=z.f,i=E.f,a=0;a<n.length;a++){var o=n[a];y(t,o)||r(t,o,i(e,o))}},xt=/#|\.prototype\./,wt=function(t,e){var n=_t[St(t)];return n==Tt||n!=Et&&("function"==typeof e?i(e):!!e)},St=wt.normalize=function(t){return String(t).replace(xt,".").toLowerCase()},_t=wt.data={},Et=wt.NATIVE="N",Tt=wt.POLYFILL="P",At=wt,zt=E.f,Rt=function(t,e){var n,i,a,o,l,s=t.target,u=t.global,c=t.stat;if(n=u?r:c?r[s]||O(s,{}):(r[s]||{}).prototype)for(i in e){if(o=e[i],a=t.noTargetGet?(l=zt(n,i))&&l.value:n[i],!At(u?i:s+(c?".":"#")+i,t.forced)&&void 0!==a){if(typeof o==typeof a)continue;bt(o,a)}(t.sham||a&&a.sham)&&R(o,"sham",!0),Q(n,i,o,t)}},Ot=function(){var t=T(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e};function It(t,e){return RegExp(t,e)}var $t={UNSUPPORTED_Y:i((function(){var t=It("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),BROKEN_CARET:i((function(){var t=It("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},Ct=RegExp.prototype.exec,Pt=String.prototype.replace,Lt=Ct,jt=function(){var t=/a/,e=/b*/g;return Ct.call(t,"a"),Ct.call(e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),Mt=$t.UNSUPPORTED_Y||$t.BROKEN_CARET,Nt=void 0!==/()??/.exec("")[1];(jt||Nt||Mt)&&(Lt=function(t){var e,n,r,i,a=this,o=Mt&&a.sticky,l=Ot.call(a),s=a.source,u=0,c=t;return o&&(-1===(l=l.replace("y","")).indexOf("g")&&(l+="g"),c=String(t).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==t[a.lastIndex-1])&&(s="(?: "+s+")",c=" "+c,u++),n=new RegExp("^(?:"+s+")",l)),Nt&&(n=new RegExp("^"+s+"$(?!\\s)",l)),jt&&(e=a.lastIndex),r=Ct.call(o?n:a,c),o?r?(r.input=r.input.slice(u),r[0]=r[0].slice(u),r.index=a.lastIndex,a.lastIndex+=r[0].length):a.lastIndex=0:jt&&r&&(a.lastIndex=a.global?r.index+r[0].length:e),Nt&&r&&r.length>1&&Pt.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r});var Ut=Lt;Rt({target:"RegExp",proto:!0,forced:/./.exec!==Ut},{exec:Ut});var qt=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())})),Dt=qt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Zt=U("wks"),Wt=r.Symbol,Kt=Dt?Wt:Wt&&Wt.withoutSetter||Z,Ft=function(t){return y(Zt,t)||(qt&&y(Wt,t)?Zt[t]=Wt[t]:Zt[t]=Kt("Symbol."+t)),Zt[t]},Jt=Ft("species"),Ht=!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),Bt="$0"==="a".replace(/./,"$0"),Yt=Ft("replace"),Vt=!!/./[Yt]&&""===/./[Yt]("a","$0"),Xt=!i((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),Gt=function(t,e,n,r){var a=Ft(t),o=!i((function(){var e={};return e[a]=function(){return 7},7!=""[t](e)})),l=o&&!i((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[Jt]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return e=!0,null},n[a](""),!e}));if(!o||!l||"replace"===t&&(!Ht||!Bt||Vt)||"split"===t&&!Xt){var s=/./[a],u=n(a,""[t],(function(t,e,n,r,i){return e.exec===Ut?o&&!i?{done:!0,value:s.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:Bt,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Vt}),c=u[0],p=u[1];Q(String.prototype,t,c),Q(RegExp.prototype,a,2==e?function(t,e){return p.call(t,this,e)}:function(t){return p.call(t,this)})}r&&R(RegExp.prototype[a],"sham",!0)},Qt=function(t){return function(e,n){var r,i,a=String(h(e)),o=at(n),l=a.length;return o<0||o>=l?t?"":void 0:(r=a.charCodeAt(o))<55296||r>56319||o+1===l||(i=a.charCodeAt(o+1))<56320||i>57343?t?a.charAt(o):r:t?a.slice(o,o+2):i-56320+(r-55296<<10)+65536}},te={codeAt:Qt(!1),charAt:Qt(!0)}.charAt,ee=function(t,e,n){return e+(n?te(t,e).length:1)},ne=function(t,e){var n=t.exec;if("function"==typeof n){var r=n.call(t,e);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==p(t))throw TypeError("RegExp#exec called on incompatible receiver");return Ut.call(t,e)};Gt("match",1,(function(t,e,n){return[function(e){var n=h(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var i=T(t),a=String(this);if(!i.global)return ne(i,a);var o=i.unicode;i.lastIndex=0;for(var l,s=[],u=0;null!==(l=ne(i,a));){var c=String(l[0]);s[u]=c,""===c&&(i.lastIndex=ee(a,lt(i.lastIndex),o)),u++}return 0===u?null:s}]}));var re=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e};Gt("search",1,(function(t,e,n){return[function(e){var n=h(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var i=T(t),a=String(this),o=i.lastIndex;re(o,0)||(i.lastIndex=0);var l=ne(i,a);return re(i.lastIndex,o)||(i.lastIndex=o),null===l?-1:l.index}]}));var ie={};ie[Ft("toStringTag")]="z";var ae="[object z]"===String(ie),oe=Ft("toStringTag"),le="Arguments"==p(function(){return arguments}()),se=ae?p:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),oe))?n:le?p(e):"Object"==(r=p(e))&&"function"==typeof e.callee?"Arguments":r},ue=ae?{}.toString:function(){return"[object "+se(this)+"]"};ae||Q(Object.prototype,"toString",ue,{unsafe:!0});var ce=RegExp.prototype,pe=ce.toString,de=i((function(){return"/a/b"!=pe.call({source:"a",flags:"b"})})),fe="toString"!=pe.name;function he(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ge(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function me(t,e,n){return e&&ge(t.prototype,e),n&&ge(t,n),t}function ve(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,l=t[Symbol.iterator]();!(r=(o=l.next()).done)&&(n.push(o.value),!e||n.length!==e);r=!0);}catch(t){i=!0,a=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw a}}return n}(t,e)||ke(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ke(t,e){if(t){if("string"==typeof t)return ye(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ye(t,e):void 0}}function ye(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function be(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=ke(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){l=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw a}}}}(de||fe)&&Q(RegExp.prototype,"toString",(function(){var t=T(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(void 0===n&&t instanceof RegExp&&!("flags"in ce)?Ot.call(t):n)}),{unsafe:!0});var xe,we=Object.keys||function(t){return ht(t,gt)},Se=a?Object.defineProperties:function(t,e){T(t);for(var n,r=we(e),i=r.length,a=0;i>a;)z.f(t,n=r[a++],e[n]);return t},_e=nt("document","documentElement"),Ee=K("IE_PROTO"),Te=function(){},Ae=function(t){return"<script>"+t+"<\/script>"},ze=function(){try{xe=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;ze=xe?function(t){t.write(Ae("")),t.close();var e=t.parentWindow.Object;return t=null,e}(xe):((e=w("iframe")).style.display="none",_e.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Ae("document.F=Object")),t.close(),t.F);for(var n=gt.length;n--;)delete ze.prototype[gt[n]];return ze()};F[Ee]=!0;var Re=Object.create||function(t,e){var n;return null!==t?(Te.prototype=T(t),n=new Te,Te.prototype=null,n[Ee]=t):n=ze(),void 0===e?n:Se(n,e)},Oe=Ft("unscopables"),Ie=Array.prototype;null==Ie[Oe]&&z.f(Ie,Oe,{configurable:!0,value:Re(null)});var $e,Ce=Object.defineProperty,Pe={},Le=function(t){throw t},je=function(t,e){if(y(Pe,t))return Pe[t];e||(e={});var n=[][t],r=!!y(e,"ACCESSORS")&&e.ACCESSORS,o=y(e,0)?e[0]:Le,l=y(e,1)?e[1]:void 0;return Pe[t]=!!n&&!i((function(){if(r&&!a)return!0;var t={length:-1};r?Ce(t,1,{enumerable:!0,get:Le}):t[1]=1,n.call(t,o,l)}))},Me=dt.includes;Rt({target:"Array",proto:!0,forced:!je("indexOf",{ACCESSORS:!0,1:0})},{includes:function(t){return Me(this,t,arguments.length>1?arguments[1]:void 0)}}),$e="includes",Ie[Oe][$e]=!0;var Ne=function(t,e){var n=[][t];return!!n&&i((function(){n.call(null,e||function(){throw 1},1)}))},Ue=Math.min,qe=[].lastIndexOf,De=!!qe&&1/[1].lastIndexOf(1,-0)<0,Ze=Ne("lastIndexOf"),We=je("indexOf",{ACCESSORS:!0,1:0}),Ke=De||!Ze||!We?function(t){if(De)return qe.apply(this,arguments)||0;var e=g(this),n=lt(e.length),r=n-1;for(arguments.length>1&&(r=Ue(r,at(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}:qe;Rt({target:"Array",proto:!0,forced:Ke!==[].lastIndexOf},{lastIndexOf:Ke});var Fe,Je,He=Array.isArray||function(t){return"Array"==p(t)},Be=function(t,e,n){var r=v(e);r in t?z.f(t,r,u(0,n)):t[r]=n},Ye=nt("navigator","userAgent")||"",Ve=r.process,Xe=Ve&&Ve.versions,Ge=Xe&&Xe.v8;Ge?Je=(Fe=Ge.split("."))[0]+Fe[1]:Ye&&(!(Fe=Ye.match(/Edge\/(\d+)/))||Fe[1]>=74)&&(Fe=Ye.match(/Chrome\/(\d+)/))&&(Je=Fe[1]);var Qe=Je&&+Je,tn=Ft("species"),en=function(t){return Qe>=51||!i((function(){var e=[];return(e.constructor={})[tn]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},nn=en("slice"),rn=je("slice",{ACCESSORS:!0,0:0,1:2}),an=Ft("species"),on=[].slice,ln=Math.max;Rt({target:"Array",proto:!0,forced:!nn||!rn},{slice:function(t,e){var n,r,i,a=g(this),o=lt(a.length),l=ct(t,o),s=ct(void 0===e?o:e,o);if(He(a)&&("function"!=typeof(n=a.constructor)||n!==Array&&!He(n.prototype)?m(n)&&null===(n=n[an])&&(n=void 0):n=void 0,n===Array||void 0===n))return on.call(a,l,s);for(r=new(void 0===n?Array:n)(ln(s-l,0)),i=0;l<s;l++,i++)l in a&&Be(r,i,a[l]);return r.length=i,r}});var sn=function(t){return Object(h(t))};Rt({target:"Object",stat:!0,forced:i((function(){we(1)}))},{keys:function(t){return we(sn(t))}});var un=Ft("match"),cn=function(t){var e;return m(t)&&(void 0!==(e=t[un])?!!e:"RegExp"==p(t))},pn=function(t){if(cn(t))throw TypeError("The method doesn't accept regular expressions");return t},dn=Ft("match"),fn=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[dn]=!1,"/./"[t](e)}catch(t){}}return!1};Rt({target:"String",proto:!0,forced:!fn("includes")},{includes:function(t){return!!~String(h(this)).indexOf(pn(t),arguments.length>1?arguments[1]:void 0)}});var hn=Math.max,gn=Math.min,mn=Math.floor,vn=/\$([$&'`]|\d\d?|<[^>]*>)/g,kn=/\$([$&'`]|\d\d?)/g;Gt("replace",2,(function(t,e,n,r){var i=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,a=r.REPLACE_KEEPS_$0,o=i?"$":"$0";return[function(n,r){var i=h(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,i,r):e.call(String(i),n,r)},function(t,r){if(!i&&a||"string"==typeof r&&-1===r.indexOf(o)){var s=n(e,t,this,r);if(s.done)return s.value}var u=T(t),c=String(this),p="function"==typeof r;p||(r=String(r));var d=u.global;if(d){var f=u.unicode;u.lastIndex=0}for(var h=[];;){var g=ne(u,c);if(null===g)break;if(h.push(g),!d)break;""===String(g[0])&&(u.lastIndex=ee(c,lt(u.lastIndex),f))}for(var m,v="",k=0,y=0;y<h.length;y++){g=h[y];for(var b=String(g[0]),x=hn(gn(at(g.index),c.length),0),w=[],S=1;S<g.length;S++)w.push(void 0===(m=g[S])?m:String(m));var _=g.groups;if(p){var E=[b].concat(w,x,c);void 0!==_&&E.push(_);var A=String(r.apply(void 0,E))}else A=l(b,c,x,w,_,r);x>=k&&(v+=c.slice(k,x)+A,k=x+b.length)}return v+c.slice(k)}];function l(t,n,r,i,a,o){var l=r+t.length,s=i.length,u=kn;return void 0!==a&&(a=sn(a),u=vn),e.call(o,u,(function(e,o){var u;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(l);case"<":u=a[o.slice(1,-1)];break;default:var c=+o;if(0===c)return e;if(c>s){var p=mn(c/10);return 0===p?e:p<=s?void 0===i[p-1]?o.charAt(1):i[p-1]+o.charAt(1):e}u=i[c-1]}return void 0===u?"":u}))}}));var yn,bn=/"/g;Rt({target:"String",proto:!0,forced:(yn="link",i((function(){var t=""[yn]('"');return t!==t.toLowerCase()||t.split('"').length>3})))},{link:function(t){return e="a",n="href",r=t,i=String(h(this)),a="<"+e,""!==n&&(a+=" "+n+'="'+String(r).replace(bn,"&quot;")+'"'),a+">"+i+"</"+e+">";var e,n,r,i,a}});var xn=dt.indexOf,wn=[].indexOf,Sn=!!wn&&1/[1].indexOf(1,-0)<0,_n=Ne("indexOf"),En=je("indexOf",{ACCESSORS:!0,1:0});Rt({target:"Array",proto:!0,forced:Sn||!_n||!En},{indexOf:function(t){return Sn?wn.apply(this,arguments)||0:xn(this,t,arguments.length>1?arguments[1]:void 0)}});var Tn=[].join,An=f!=Object,zn=Ne("join",",");Rt({target:"Array",proto:!0,forced:An||!zn},{join:function(t){return Tn.call(g(this),void 0===t?",":t)}});var Rn=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},On=Ft("species"),In=function(t,e){var n;return He(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!He(n.prototype)?m(n)&&null===(n=n[On])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)},$n=[].push,Cn=function(t){var e=1==t,n=2==t,r=3==t,i=4==t,a=6==t,o=5==t||a;return function(l,s,u,c){for(var p,d,h=sn(l),g=f(h),m=function(t,e,n){if(Rn(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}(s,u,3),v=lt(g.length),k=0,y=c||In,b=e?y(l,v):n?y(l,0):void 0;v>k;k++)if((o||k in g)&&(d=m(p=g[k],k,h),t))if(e)b[k]=d;else if(d)switch(t){case 3:return!0;case 5:return p;case 6:return k;case 2:$n.call(b,p)}else if(i)return!1;return a?-1:r||i?i:b}},Pn={forEach:Cn(0),map:Cn(1),filter:Cn(2),some:Cn(3),every:Cn(4),find:Cn(5),findIndex:Cn(6)}.map,Ln=en("map"),jn=je("map");Rt({target:"Array",proto:!0,forced:!Ln||!jn},{map:function(t){return Pn(this,t,arguments.length>1?arguments[1]:void 0)}});var Mn=en("splice"),Nn=je("splice",{ACCESSORS:!0,0:0,1:2}),Un=Math.max,qn=Math.min;Rt({target:"Array",proto:!0,forced:!Mn||!Nn},{splice:function(t,e){var n,r,i,a,o,l,s=sn(this),u=lt(s.length),c=ct(t,u),p=arguments.length;if(0===p?n=r=0:1===p?(n=0,r=u-c):(n=p-2,r=qn(Un(at(e),0),u-c)),u+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(i=In(s,r),a=0;a<r;a++)(o=c+a)in s&&Be(i,a,s[o]);if(i.length=r,n<r){for(a=c;a<u-r;a++)l=a+n,(o=a+r)in s?s[l]=s[o]:delete s[l];for(a=u;a>u-r+n;a--)delete s[a-1]}else if(n>r)for(a=u-r;a>c;a--)l=a+n-1,(o=a+r-1)in s?s[l]=s[o]:delete s[l];for(a=0;a<n;a++)s[a+c]=arguments[a+2];return s.length=u-r+n,i}});var Dn=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return T(n),function(t){if(!m(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(r),e?t.call(n,r):n.__proto__=r,n}}():void 0),Zn=Ft("species"),Wn=z.f,Kn=vt.f,Fn=G.set,Jn=Ft("match"),Hn=r.RegExp,Bn=Hn.prototype,Yn=/a/g,Vn=/a/g,Xn=new Hn(Yn)!==Yn,Gn=$t.UNSUPPORTED_Y;if(a&&At("RegExp",!Xn||Gn||i((function(){return Vn[Jn]=!1,Hn(Yn)!=Yn||Hn(Vn)==Vn||"/a/i"!=Hn(Yn,"i")})))){for(var Qn=function(t,e){var n,r=this instanceof Qn,i=cn(t),a=void 0===e;if(!r&&i&&t.constructor===Qn&&a)return t;Xn?i&&!a&&(t=t.source):t instanceof Qn&&(a&&(e=Ot.call(t)),t=t.source),Gn&&(n=!!e&&e.indexOf("y")>-1)&&(e=e.replace(/y/g,""));var o,l,s,u,c,p=(o=Xn?new Hn(t,e):Hn(t,e),l=r?this:Bn,s=Qn,Dn&&"function"==typeof(u=l.constructor)&&u!==s&&m(c=u.prototype)&&c!==s.prototype&&Dn(o,c),o);return Gn&&n&&Fn(p,{sticky:n}),p},tr=function(t){t in Qn||Wn(Qn,t,{configurable:!0,get:function(){return Hn[t]},set:function(e){Hn[t]=e}})},er=Kn(Hn),nr=0;er.length>nr;)tr(er[nr++]);Bn.constructor=Qn,Qn.prototype=Bn,Q(r,"RegExp",Qn)}!function(t){var e=nt(t),n=z.f;a&&e&&!e[Zn]&&n(e,Zn,{configurable:!0,get:function(){return this}})}("RegExp");var rr,ir=E.f,ar="".endsWith,or=Math.min,lr=fn("endsWith");Rt({target:"String",proto:!0,forced:!!(lr||(rr=ir(String.prototype,"endsWith"),!rr||rr.writable))&&!lr},{endsWith:function(t){var e=String(h(this));pn(t);var n=arguments.length>1?arguments[1]:void 0,r=lt(e.length),i=void 0===n?r:or(lt(n),r),a=String(t);return ar?ar.call(e,a,i):e.slice(i-a.length,i)===a}});var sr=Ft("species"),ur=[].push,cr=Math.min,pr=!i((function(){return!RegExp(4294967295,"y")}));Gt("split",2,(function(t,e,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var r=String(h(this)),i=void 0===n?4294967295:n>>>0;if(0===i)return[];if(void 0===t)return[r];if(!cn(t))return e.call(r,t,i);for(var a,o,l,s=[],u=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),c=0,p=new RegExp(t.source,u+"g");(a=Ut.call(p,r))&&!((o=p.lastIndex)>c&&(s.push(r.slice(c,a.index)),a.length>1&&a.index<r.length&&ur.apply(s,a.slice(1)),l=a[0].length,c=o,s.length>=i));)p.lastIndex===a.index&&p.lastIndex++;return c===r.length?!l&&p.test("")||s.push(""):s.push(r.slice(c)),s.length>i?s.slice(0,i):s}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var i=h(this),a=null==e?void 0:e[t];return void 0!==a?a.call(e,i,n):r.call(String(i),e,n)},function(t,i){var a=n(r,t,this,i,r!==e);if(a.done)return a.value;var o=T(t),l=String(this),s=function(t,e){var n,r=T(t).constructor;return void 0===r||null==(n=T(r)[sr])?e:Rn(n)}(o,RegExp),u=o.unicode,c=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(pr?"y":"g"),p=new s(pr?o:"^(?:"+o.source+")",c),d=void 0===i?4294967295:i>>>0;if(0===d)return[];if(0===l.length)return null===ne(p,l)?[l]:[];for(var f=0,h=0,g=[];h<l.length;){p.lastIndex=pr?h:0;var m,v=ne(p,pr?l:l.slice(h));if(null===v||(m=cr(lt(p.lastIndex+(pr?0:h)),l.length))===f)h=ee(l,h,u);else{if(g.push(l.slice(f,h)),g.length===d)return g;for(var k=1;k<=v.length-1;k++)if(g.push(v[k]),g.length===d)return g;h=f=m}}return g.push(l.slice(f)),g}]}),!pr);var dr=E.f,fr="".startsWith,hr=Math.min,gr=fn("startsWith");Rt({target:"String",proto:!0,forced:!(!gr&&!!function(){var t=dr(String.prototype,"startsWith");return t&&!t.writable}())&&!gr},{startsWith:function(t){var e=String(h(this));pn(t);var n=lt(hr(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return fr?fr.call(e,r,n):e.slice(n,n+r.length)===r}});var mr="\t\n\v\f\r \u2028\u2029\ufeff",vr="["+mr+"]",kr=RegExp("^"+vr+vr+"*"),yr=RegExp(vr+vr+"*$"),br=function(t){return function(e){var n=String(h(e));return 1&t&&(n=n.replace(kr,"")),2&t&&(n=n.replace(yr,"")),n}},xr={start:br(1),end:br(2),trim:br(3)},wr=function(t){return i((function(){return!!mr[t]()||"​…᠎"!="​…᠎"[t]()||mr[t].name!==t}))},Sr=xr.trim;Rt({target:"String",proto:!0,forced:wr("trim")},{trim:function(){return Sr(this)}});var _r=xr.end,Er=wr("trimEnd"),Tr=Er?function(){return _r(this)}:"".trimEnd;Rt({target:"String",proto:!0,forced:Er},{trimEnd:Tr,trimRight:Tr});var Ar=e((function(t){function e(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}t.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:e,changeDefaults:function(e){t.exports.defaults=e}}})),zr=/[&<>"']/,Rr=/[&<>"']/g,Or=/[<>"']|&(?!#?\w+;)/,Ir=/[<>"']|&(?!#?\w+;)/g,$r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Cr=function(t){return $r[t]};var Pr=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Lr(t){return t.replace(Pr,(function(t,e){return"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""}))}var jr=/(^|[^\[])\^/g;var Mr=/[^\w:]/g,Nr=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;var Ur={},qr=/^[^:]+:\/*[^/]*$/,Dr=/^([^:]+:)[\s\S]*$/,Zr=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Wr(t,e){Ur[" "+t]||(qr.test(t)?Ur[" "+t]=t+"/":Ur[" "+t]=Kr(t,"/",!0));var n=-1===(t=Ur[" "+t]).indexOf(":");return"//"===e.substring(0,2)?n?e:t.replace(Dr,"$1")+e:"/"===e.charAt(0)?n?e:t.replace(Zr,"$1")+e:t+e}function Kr(t,e,n){var r=t.length;if(0===r)return"";for(var i=0;i<r;){var a=t.charAt(r-i-1);if(a!==e||n){if(a===e||!n)break;i++}else i++}return t.substr(0,r-i)}var Fr=function(t,e){if(e){if(zr.test(t))return t.replace(Rr,Cr)}else if(Or.test(t))return t.replace(Ir,Cr);return t},Jr=Lr,Hr=function(t,e){t=t.source||t,e=e||"";var n={replace:function(e,r){return r=(r=r.source||r).replace(jr,"$1"),t=t.replace(e,r),n},getRegex:function(){return new RegExp(t,e)}};return n},Br=function(t,e,n){if(t){var r;try{r=decodeURIComponent(Lr(n)).replace(Mr,"").toLowerCase()}catch(t){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}e&&!Nr.test(n)&&(n=Wr(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(t){return null}return n},Yr={exec:function(){}},Vr=function(t){for(var e,n,r=1;r<arguments.length;r++)for(n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},Xr=function(t,e){var n=t.replace(/\|/g,(function(t,e,n){for(var r=!1,i=e;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n},Gr=Kr,Qr=function(t,e){if(-1===t.indexOf(e[1]))return-1;for(var n=t.length,r=0,i=0;i<n;i++)if("\\"===t[i])i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&--r<0)return i;return-1},ti=function(t){t&&t.sanitize&&!t.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")},ei=function(t,e){if(e<1)return"";for(var n="";e>1;)1&e&&(n+=t),e>>=1,t+=t;return n+t},ni=Ar.defaults,ri=Gr,ii=Xr,ai=Fr,oi=Qr;function li(t,e,n){var r=e.href,i=e.title?ai(e.title):null,a=t[1].replace(/\\([\[\]])/g,"$1");return"!"!==t[0].charAt(0)?{type:"link",raw:n,href:r,title:i,text:a}:{type:"image",raw:n,href:r,title:i,text:ai(a)}}var si=function(){function t(e){he(this,t),this.options=e||ni}return me(t,[{key:"space",value:function(t){var e=this.rules.block.newline.exec(t);if(e)return e[0].length>1?{type:"space",raw:e[0]}:{raw:"\n"}}},{key:"code",value:function(t,e){var n=this.rules.block.code.exec(t);if(n){var r=e[e.length-1];if(r&&"paragraph"===r.type)return{raw:n[0],text:n[0].trimRight()};var i=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:ri(i,"\n")}}}},{key:"fences",value:function(t){var e=this.rules.block.fences.exec(t);if(e){var n=e[0],r=function(t,e){var n=t.match(/^(\s+)(?:```)/);if(null===n)return e;var r=n[1];return e.split("\n").map((function(t){var e=t.match(/^\s+/);return null===e?t:ve(e,1)[0].length>=r.length?t.slice(r.length):t})).join("\n")}(n,e[3]||"");return{type:"code",raw:n,lang:e[2]?e[2].trim():e[2],text:r}}}},{key:"heading",value:function(t){var e=this.rules.block.heading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[1].length,text:e[2]}}},{key:"nptable",value:function(t){var e=this.rules.block.nptable.exec(t);if(e){var n={type:"table",header:ii(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[],raw:e[0]};if(n.header.length===n.align.length){var r,i=n.align.length;for(r=0;r<i;r++)/^ *-+: *$/.test(n.align[r])?n.align[r]="right":/^ *:-+: *$/.test(n.align[r])?n.align[r]="center":/^ *:-+ *$/.test(n.align[r])?n.align[r]="left":n.align[r]=null;for(i=n.cells.length,r=0;r<i;r++)n.cells[r]=ii(n.cells[r],n.header.length);return n}}}},{key:"hr",value:function(t){var e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:e[0]}}},{key:"blockquote",value:function(t){var e=this.rules.block.blockquote.exec(t);if(e){var n=e[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:e[0],text:n}}}},{key:"list",value:function(t){var e=this.rules.block.list.exec(t);if(e){var n,r,i,a,o,l,s,u,c=e[0],p=e[2],d=p.length>1,f={type:"list",raw:c,ordered:d,start:d?+p.slice(0,-1):"",loose:!1,items:[]},h=e[0].match(this.rules.block.item),g=!1,m=h.length;i=this.rules.block.listItemStart.exec(h[0]);for(var v=0;v<m;v++){if(c=n=h[v],v!==m-1){if((a=this.rules.block.listItemStart.exec(h[v+1]))[1].length>i[0].length||a[1].length>3){h.splice(v,2,h[v]+"\n"+h[v+1]),v--,m--;continue}(!this.options.pedantic||this.options.smartLists?a[2][a[2].length-1]!==p[p.length-1]:d===(1===a[2].length))&&(o=h.slice(v+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-o.length),v=m-1),i=a}r=n.length,~(n=n.replace(/^ *([*+-]|\d+[.)]) ?/,"")).indexOf("\n ")&&(r-=n.length,n=this.options.pedantic?n.replace(/^ {1,4}/gm,""):n.replace(new RegExp("^ {1,"+r+"}","gm"),"")),l=g||/\n\n(?!\s*$)/.test(n),v!==m-1&&(g="\n"===n.charAt(n.length-1),l||(l=g)),l&&(f.loose=!0),u=void 0,(s=/^\[[ xX]\] /.test(n))&&(u=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:c,task:s,checked:u,loose:l,text:n})}return f}}},{key:"html",value:function(t){var e=this.rules.block.html.exec(t);if(e)return{type:this.options.sanitize?"paragraph":"html",raw:e[0],pre:!this.options.sanitizer&&("pre"===e[1]||"script"===e[1]||"style"===e[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):ai(e[0]):e[0]}}},{key:"def",value:function(t){var e=this.rules.block.def.exec(t);if(e)return e[3]&&(e[3]=e[3].substring(1,e[3].length-1)),{tag:e[1].toLowerCase().replace(/\s+/g," "),raw:e[0],href:e[2],title:e[3]}}},{key:"table",value:function(t){var e=this.rules.block.table.exec(t);if(e){var n={type:"table",header:ii(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=e[0];var r,i=n.align.length;for(r=0;r<i;r++)/^ *-+: *$/.test(n.align[r])?n.align[r]="right":/^ *:-+: *$/.test(n.align[r])?n.align[r]="center":/^ *:-+ *$/.test(n.align[r])?n.align[r]="left":n.align[r]=null;for(i=n.cells.length,r=0;r<i;r++)n.cells[r]=ii(n.cells[r].replace(/^ *\| *| *\| *$/g,""),n.header.length);return n}}}},{key:"lheading",value:function(t){var e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1]}}},{key:"paragraph",value:function(t){var e=this.rules.block.paragraph.exec(t);if(e)return{type:"paragraph",raw:e[0],text:"\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1]}}},{key:"text",value:function(t,e){var n=this.rules.block.text.exec(t);if(n){var r=e[e.length-1];return r&&"text"===r.type?{raw:n[0],text:n[0]}:{type:"text",raw:n[0],text:n[0]}}}},{key:"escape",value:function(t){var e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:ai(e[1])}}},{key:"tag",value:function(t,e,n){var r=this.rules.inline.tag.exec(t);if(r)return!e&&/^<a /i.test(r[0])?e=!0:e&&/^<\/a>/i.test(r[0])&&(e=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:e,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):ai(r[0]):r[0]}}},{key:"link",value:function(t){var e=this.rules.inline.link.exec(t);if(e){var n=oi(e[2],"()");if(n>-1){var r=(0===e[0].indexOf("!")?5:4)+e[1].length+n;e[2]=e[2].substring(0,n),e[0]=e[0].substring(0,r).trim(),e[3]=""}var i=e[2],a="";if(this.options.pedantic){var o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);o?(i=o[1],a=o[3]):a=""}else a=e[3]?e[3].slice(1,-1):"";return li(e,{href:(i=i.trim().replace(/^<([\s\S]*)>$/,"$1"))?i.replace(this.rules.inline._escapes,"$1"):i,title:a?a.replace(this.rules.inline._escapes,"$1"):a},e[0])}}},{key:"reflink",value:function(t,e){var n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=e[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return li(n,r,n[0])}}},{key:"strong",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.strong.start.exec(t);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){e=e.slice(-1*t.length);var i,a="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(a.lastIndex=0;null!=(r=a.exec(e));)if(i=this.rules.inline.strong.middle.exec(e.slice(0,r.index+3)))return{type:"strong",raw:t.slice(0,i[0].length),text:t.slice(2,i[0].length-2)}}}},{key:"em",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.em.start.exec(t);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){e=e.slice(-1*t.length);var i,a="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(a.lastIndex=0;null!=(r=a.exec(e));)if(i=this.rules.inline.em.middle.exec(e.slice(0,r.index+2)))return{type:"em",raw:t.slice(0,i[0].length),text:t.slice(1,i[0].length-1)}}}},{key:"codespan",value:function(t){var e=this.rules.inline.code.exec(t);if(e){var n=e[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=n.startsWith(" ")&&n.endsWith(" ");return r&&i&&(n=n.substring(1,n.length-1)),n=ai(n,!0),{type:"codespan",raw:e[0],text:n}}}},{key:"br",value:function(t){var e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}},{key:"del",value:function(t){var e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[1]}}},{key:"autolink",value:function(t,e){var n,r,i=this.rules.inline.autolink.exec(t);if(i)return r="@"===i[2]?"mailto:"+(n=ai(this.options.mangle?e(i[1]):i[1])):n=ai(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}},{key:"url",value:function(t,e){var n;if(n=this.rules.inline.url.exec(t)){var r,i;if("@"===n[2])i="mailto:"+(r=ai(this.options.mangle?e(n[0]):n[0]));else{var a;do{a=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(a!==n[0]);r=ai(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}},{key:"inlineText",value:function(t,e,n){var r,i=this.rules.inline.text.exec(t);if(i)return r=e?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):ai(i[0]):i[0]:ai(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}}}]),t}(),ui=Yr,ci=Hr,pi=Vr,di={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:ui,table:ui,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};di.def=ci(di.def).replace("label",di._label).replace("title",di._title).getRegex(),di.bullet=/(?:[*+-]|\d{1,9}[.)])/,di.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,di.item=ci(di.item,"gm").replace(/bull/g,di.bullet).getRegex(),di.listItemStart=ci(/^( *)(bull)/).replace("bull",di.bullet).getRegex(),di.list=ci(di.list).replace(/bull/g,di.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+di.def.source+")").getRegex(),di._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",di._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,di.html=ci(di.html,"i").replace("comment",di._comment).replace("tag",di._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),di.paragraph=ci(di._paragraph).replace("hr",di.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",di._tag).getRegex(),di.blockquote=ci(di.blockquote).replace("paragraph",di.paragraph).getRegex(),di.normal=pi({},di),di.gfm=pi({},di.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),di.gfm.nptable=ci(di.gfm.nptable).replace("hr",di.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",di._tag).getRegex(),di.gfm.table=ci(di.gfm.table).replace("hr",di.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",di._tag).getRegex(),di.pedantic=pi({},di.normal,{html:ci("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",di._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:ui,paragraph:ci(di.normal._paragraph).replace("hr",di.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",di.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var fi={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ui,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation*\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation*\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ui,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\s*punctuation])/,_punctuation:"!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~"};fi.punctuation=ci(fi.punctuation).replace(/punctuation/g,fi._punctuation).getRegex(),fi._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",fi._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",fi._comment=ci(di._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),fi.em.start=ci(fi.em.start).replace(/punctuation/g,fi._punctuation).getRegex(),fi.em.middle=ci(fi.em.middle).replace(/punctuation/g,fi._punctuation).replace(/overlapSkip/g,fi._overlapSkip).getRegex(),fi.em.endAst=ci(fi.em.endAst,"g").replace(/punctuation/g,fi._punctuation).getRegex(),fi.em.endUnd=ci(fi.em.endUnd,"g").replace(/punctuation/g,fi._punctuation).getRegex(),fi.strong.start=ci(fi.strong.start).replace(/punctuation/g,fi._punctuation).getRegex(),fi.strong.middle=ci(fi.strong.middle).replace(/punctuation/g,fi._punctuation).replace(/overlapSkip/g,fi._overlapSkip).getRegex(),fi.strong.endAst=ci(fi.strong.endAst,"g").replace(/punctuation/g,fi._punctuation).getRegex(),fi.strong.endUnd=ci(fi.strong.endUnd,"g").replace(/punctuation/g,fi._punctuation).getRegex(),fi.blockSkip=ci(fi._blockSkip,"g").getRegex(),fi.overlapSkip=ci(fi._overlapSkip,"g").getRegex(),fi._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,fi._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,fi._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,fi.autolink=ci(fi.autolink).replace("scheme",fi._scheme).replace("email",fi._email).getRegex(),fi._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,fi.tag=ci(fi.tag).replace("comment",fi._comment).replace("attribute",fi._attribute).getRegex(),fi._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,fi._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,fi._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,fi.link=ci(fi.link).replace("label",fi._label).replace("href",fi._href).replace("title",fi._title).getRegex(),fi.reflink=ci(fi.reflink).replace("label",fi._label).getRegex(),fi.reflinkSearch=ci(fi.reflinkSearch,"g").replace("reflink",fi.reflink).replace("nolink",fi.nolink).getRegex(),fi.normal=pi({},fi),fi.pedantic=pi({},fi.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:ci(/^!?\[(label)\]\((.*?)\)/).replace("label",fi._label).getRegex(),reflink:ci(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",fi._label).getRegex()}),fi.gfm=pi({},fi.normal,{escape:ci(fi.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),fi.gfm.url=ci(fi.gfm.url,"i").replace("email",fi.gfm._extended_email).getRegex(),fi.breaks=pi({},fi.gfm,{br:ci(fi.br).replace("{2,}","*").getRegex(),text:ci(fi.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var hi={block:di,inline:fi},gi=Ar.defaults,mi=hi.block,vi=hi.inline,ki=ei;function yi(t){return t.replace(/---/g,"").replace(/--/g,"").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"").replace(/\.{3}/g,"")}function bi(t){var e,n,r="",i=t.length;for(e=0;e<i;e++)n=t.charCodeAt(e),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var xi=function(){function t(e){he(this,t),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||gi,this.options.tokenizer=this.options.tokenizer||new si,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var n={block:mi.normal,inline:vi.normal};this.options.pedantic?(n.block=mi.pedantic,n.inline=vi.pedantic):this.options.gfm&&(n.block=mi.gfm,this.options.breaks?n.inline=vi.breaks:n.inline=vi.gfm),this.tokenizer.rules=n}return me(t,[{key:"lex",value:function(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(t,this.tokens,!0),this.inline(this.tokens),this.tokens}},{key:"blockTokens",value:function(t){var e,n,r,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];for(t=t.replace(/^ +$/gm,"");t;)if(e=this.tokenizer.space(t))t=t.substring(e.raw.length),e.type&&a.push(e);else if(e=this.tokenizer.code(t,a))t=t.substring(e.raw.length),e.type?a.push(e):((i=a[a.length-1]).raw+="\n"+e.raw,i.text+="\n"+e.text);else if(e=this.tokenizer.fences(t))t=t.substring(e.raw.length),a.push(e);else if(e=this.tokenizer.heading(t))t=t.substring(e.raw.length),a.push(e);else if(e=this.tokenizer.nptable(t))t=t.substring(e.raw.length),a.push(e);else if(e=this.tokenizer.hr(t))t=t.substring(e.raw.length),a.push(e);else if(e=this.tokenizer.blockquote(t))t=t.substring(e.raw.length),e.tokens=this.blockTokens(e.text,[],o),a.push(e);else if(e=this.tokenizer.list(t)){for(t=t.substring(e.raw.length),r=e.items.length,n=0;n<r;n++)e.items[n].tokens=this.blockTokens(e.items[n].text,[],!1);a.push(e)}else if(e=this.tokenizer.html(t))t=t.substring(e.raw.length),a.push(e);else if(o&&(e=this.tokenizer.def(t)))t=t.substring(e.raw.length),this.tokens.links[e.tag]||(this.tokens.links[e.tag]={href:e.href,title:e.title});else if(e=this.tokenizer.table(t))t=t.substring(e.raw.length),a.push(e);else if(e=this.tokenizer.lheading(t))t=t.substring(e.raw.length),a.push(e);else if(o&&(e=this.tokenizer.paragraph(t)))t=t.substring(e.raw.length),a.push(e);else if(e=this.tokenizer.text(t,a))t=t.substring(e.raw.length),e.type?a.push(e):((i=a[a.length-1]).raw+="\n"+e.raw,i.text+="\n"+e.text);else if(t){var l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}throw new Error(l)}return a}},{key:"inline",value:function(t){var e,n,r,i,a,o,l=t.length;for(e=0;e<l;e++)switch((o=t[e]).type){case"paragraph":case"text":case"heading":o.tokens=[],this.inlineTokens(o.text,o.tokens);break;case"table":for(o.tokens={header:[],cells:[]},i=o.header.length,n=0;n<i;n++)o.tokens.header[n]=[],this.inlineTokens(o.header[n],o.tokens.header[n]);for(i=o.cells.length,n=0;n<i;n++)for(a=o.cells[n],o.tokens.cells[n]=[],r=0;r<a.length;r++)o.tokens.cells[n][r]=[],this.inlineTokens(a[r],o.tokens.cells[n][r]);break;case"blockquote":this.inline(o.tokens);break;case"list":for(i=o.items.length,n=0;n<i;n++)this.inline(o.items[n].tokens)}return t}},{key:"inlineTokens",value:function(t){var e,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",l=t;if(this.tokens.links){var s=Object.keys(this.tokens.links);if(s.length>0)for(;null!=(n=this.tokenizer.rules.inline.reflinkSearch.exec(l));)s.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,n.index)+"["+ki("a",n[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(n=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,n.index)+"["+ki("a",n[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;t;)if(e=this.tokenizer.escape(t))t=t.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.tag(t,i,a))t=t.substring(e.raw.length),i=e.inLink,a=e.inRawBlock,r.push(e);else if(e=this.tokenizer.link(t))t=t.substring(e.raw.length),"link"===e.type&&(e.tokens=this.inlineTokens(e.text,[],!0,a)),r.push(e);else if(e=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(e.raw.length),"link"===e.type&&(e.tokens=this.inlineTokens(e.text,[],!0,a)),r.push(e);else if(e=this.tokenizer.strong(t,l,o))t=t.substring(e.raw.length),e.tokens=this.inlineTokens(e.text,[],i,a),r.push(e);else if(e=this.tokenizer.em(t,l,o))t=t.substring(e.raw.length),e.tokens=this.inlineTokens(e.text,[],i,a),r.push(e);else if(e=this.tokenizer.codespan(t))t=t.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.br(t))t=t.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.del(t))t=t.substring(e.raw.length),e.tokens=this.inlineTokens(e.text,[],i,a),r.push(e);else if(e=this.tokenizer.autolink(t,bi))t=t.substring(e.raw.length),r.push(e);else if(i||!(e=this.tokenizer.url(t,bi))){if(e=this.tokenizer.inlineText(t,a,yi))t=t.substring(e.raw.length),o=e.raw.slice(-1),r.push(e);else if(t){var u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}throw new Error(u)}}else t=t.substring(e.raw.length),r.push(e);return r}}],[{key:"lex",value:function(e,n){return new t(n).lex(e)}},{key:"lexInline",value:function(e,n){return new t(n).inlineTokens(e)}},{key:"rules",get:function(){return{block:mi,inline:vi}}}]),t}(),wi=Ar.defaults,Si=Br,_i=Fr,Ei=function(){function t(e){he(this,t),this.options=e||wi}return me(t,[{key:"code",value:function(t,e,n){var r=(e||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(t,r);null!=i&&i!==t&&(n=!0,t=i)}return r?'<pre><code class="'+this.options.langPrefix+_i(r,!0)+'">'+(n?t:_i(t,!0))+"</code></pre>\n":"<pre><code>"+(n?t:_i(t,!0))+"</code></pre>\n"}},{key:"blockquote",value:function(t){return"<blockquote>\n"+t+"</blockquote>\n"}},{key:"html",value:function(t){return t}},{key:"heading",value:function(t,e,n,r){return this.options.headerIds?"<h"+e+' id="'+this.options.headerPrefix+r.slug(n)+'">'+t+"</h"+e+">\n":"<h"+e+">"+t+"</h"+e+">\n"}},{key:"hr",value:function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}},{key:"list",value:function(t,e,n){var r=e?"ol":"ul";return"<"+r+(e&&1!==n?' start="'+n+'"':"")+">\n"+t+"</"+r+">\n"}},{key:"listitem",value:function(t){return"<li>"+t+"</li>\n"}},{key:"checkbox",value:function(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}},{key:"paragraph",value:function(t){return"<p>"+t+"</p>\n"}},{key:"table",value:function(t,e){return e&&(e="<tbody>"+e+"</tbody>"),"<table>\n<thead>\n"+t+"</thead>\n"+e+"</table>\n"}},{key:"tablerow",value:function(t){return"<tr>\n"+t+"</tr>\n"}},{key:"tablecell",value:function(t,e){var n=e.header?"th":"td";return(e.align?"<"+n+' align="'+e.align+'">':"<"+n+">")+t+"</"+n+">\n"}},{key:"strong",value:function(t){return"<strong>"+t+"</strong>"}},{key:"em",value:function(t){return"<em>"+t+"</em>"}},{key:"codespan",value:function(t){return"<code>"+t+"</code>"}},{key:"br",value:function(){return this.options.xhtml?"<br/>":"<br>"}},{key:"del",value:function(t){return"<del>"+t+"</del>"}},{key:"link",value:function(t,e,n){if(null===(t=Si(this.options.sanitize,this.options.baseUrl,t)))return n;var r='<a href="'+_i(t)+'"';return e&&(r+=' title="'+e+'"'),r+=">"+n+"</a>"}},{key:"image",value:function(t,e,n){if(null===(t=Si(this.options.sanitize,this.options.baseUrl,t)))return n;var r='<img src="'+t+'" alt="'+n+'"';return e&&(r+=' title="'+e+'"'),r+=this.options.xhtml?"/>":">"}},{key:"text",value:function(t){return t}}]),t}(),Ti=function(){function t(){he(this,t)}return me(t,[{key:"strong",value:function(t){return t}},{key:"em",value:function(t){return t}},{key:"codespan",value:function(t){return t}},{key:"del",value:function(t){return t}},{key:"html",value:function(t){return t}},{key:"text",value:function(t){return t}},{key:"link",value:function(t,e,n){return""+n}},{key:"image",value:function(t,e,n){return""+n}},{key:"br",value:function(){return""}}]),t}(),Ai=function(){function t(){he(this,t),this.seen={}}return me(t,[{key:"serialize",value:function(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}},{key:"getNextSafeSlug",value:function(t,e){var n=t,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[t];do{n=t+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return e||(this.seen[t]=r,this.seen[n]=0),n}},{key:"slug",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serialize(t);return this.getNextSafeSlug(n,e.dryrun)}}]),t}(),zi=Ar.defaults,Ri=Jr,Oi=function(){function t(e){he(this,t),this.options=e||zi,this.options.renderer=this.options.renderer||new Ei,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ti,this.slugger=new Ai}return me(t,[{key:"parse",value:function(t){var e,n,r,i,a,o,l,s,u,c,p,d,f,h,g,m,v,k,y=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],b="",x=t.length;for(e=0;e<x;e++)switch((c=t[e]).type){case"space":continue;case"hr":b+=this.renderer.hr();continue;case"heading":b+=this.renderer.heading(this.parseInline(c.tokens),c.depth,Ri(this.parseInline(c.tokens,this.textRenderer)),this.slugger);continue;case"code":b+=this.renderer.code(c.text,c.lang,c.escaped);continue;case"table":for(s="",l="",i=c.header.length,n=0;n<i;n++)l+=this.renderer.tablecell(this.parseInline(c.tokens.header[n]),{header:!0,align:c.align[n]});for(s+=this.renderer.tablerow(l),u="",i=c.cells.length,n=0;n<i;n++){for(l="",a=(o=c.tokens.cells[n]).length,r=0;r<a;r++)l+=this.renderer.tablecell(this.parseInline(o[r]),{header:!1,align:c.align[r]});u+=this.renderer.tablerow(l)}b+=this.renderer.table(s,u);continue;case"blockquote":u=this.parse(c.tokens),b+=this.renderer.blockquote(u);continue;case"list":for(p=c.ordered,d=c.start,f=c.loose,i=c.items.length,u="",n=0;n<i;n++)m=(g=c.items[n]).checked,v=g.task,h="",g.task&&(k=this.renderer.checkbox(m),f?g.tokens.length>0&&"text"===g.tokens[0].type?(g.tokens[0].text=k+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=k+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:k}):h+=k),h+=this.parse(g.tokens,f),u+=this.renderer.listitem(h,v,m);b+=this.renderer.list(u,p,d);continue;case"html":b+=this.renderer.html(c.text);continue;case"paragraph":b+=this.renderer.paragraph(this.parseInline(c.tokens));continue;case"text":for(u=c.tokens?this.parseInline(c.tokens):c.text;e+1<x&&"text"===t[e+1].type;)u+="\n"+((c=t[++e]).tokens?this.parseInline(c.tokens):c.text);b+=y?this.renderer.paragraph(u):u;continue;default:var w='Token with "'+c.type+'" type was not found.';if(this.options.silent)return void console.error(w);throw new Error(w)}return b}},{key:"parseInline",value:function(t,e){e=e||this.renderer;var n,r,i="",a=t.length;for(n=0;n<a;n++)switch((r=t[n]).type){case"escape":i+=e.text(r.text);break;case"html":i+=e.html(r.text);break;case"link":i+=e.link(r.href,r.title,this.parseInline(r.tokens,e));break;case"image":i+=e.image(r.href,r.title,r.text);break;case"strong":i+=e.strong(this.parseInline(r.tokens,e));break;case"em":i+=e.em(this.parseInline(r.tokens,e));break;case"codespan":i+=e.codespan(r.text);break;case"br":i+=e.br();break;case"del":i+=e.del(this.parseInline(r.tokens,e));break;case"text":i+=e.text(r.text);break;default:var o='Token with "'+r.type+'" type was not found.';if(this.options.silent)return void console.error(o);throw new Error(o)}return i}}],[{key:"parse",value:function(e,n){return new t(n).parse(e)}},{key:"parseInline",value:function(e,n){return new t(n).parseInline(e)}}]),t}(),Ii=Vr,$i=ti,Ci=Fr,Pi=Ar.getDefaults,Li=Ar.changeDefaults,ji=Ar.defaults;function Mi(t,e,n){if(null==t)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof t)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected");if("function"==typeof e&&(n=e,e=null),e=Ii({},Mi.defaults,e||{}),$i(e),n){var r,i=e.highlight;try{r=xi.lex(t,e)}catch(t){return n(t)}var a=function(t){var a;if(!t)try{a=Oi.parse(r,e)}catch(e){t=e}return e.highlight=i,t?n(t):n(null,a)};if(!i||i.length<3)return a();if(delete e.highlight,!r.length)return a();var o=0;return Mi.walkTokens(r,(function(t){"code"===t.type&&(o++,setTimeout((function(){i(t.text,t.lang,(function(e,n){if(e)return a(e);null!=n&&n!==t.text&&(t.text=n,t.escaped=!0),0===--o&&a()}))}),0))})),void(0===o&&a())}try{var l=xi.lex(t,e);return e.walkTokens&&Mi.walkTokens(l,e.walkTokens),Oi.parse(l,e)}catch(t){if(t.message+="\nPlease report this to https://github.com/markedjs/marked.",e.silent)return"<p>An error occurred:</p><pre>"+Ci(t.message+"",!0)+"</pre>";throw t}}Mi.options=Mi.setOptions=function(t){return Ii(Mi.defaults,t),Li(Mi.defaults),Mi},Mi.getDefaults=Pi,Mi.defaults=ji,Mi.use=function(t){var e=Ii({},t);if(t.renderer&&function(){var n=Mi.defaults.renderer||new Ei,r=function(e){var r=n[e];n[e]=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var l=t.renderer[e].apply(n,a);return!1===l&&(l=r.apply(n,a)),l}};for(var i in t.renderer)r(i);e.renderer=n}(),t.tokenizer&&function(){var n=Mi.defaults.tokenizer||new si,r=function(e){var r=n[e];n[e]=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var l=t.tokenizer[e].apply(n,a);return!1===l&&(l=r.apply(n,a)),l}};for(var i in t.tokenizer)r(i);e.tokenizer=n}(),t.walkTokens){var n=Mi.defaults.walkTokens;e.walkTokens=function(e){t.walkTokens(e),n&&n(e)}}Mi.setOptions(e)},Mi.walkTokens=function(t,e){var n,r=be(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;switch(e(i),i.type){case"table":var a,o=be(i.tokens.header);try{for(o.s();!(a=o.n()).done;){var l=a.value;Mi.walkTokens(l,e)}}catch(t){o.e(t)}finally{o.f()}var s,u=be(i.tokens.cells);try{for(u.s();!(s=u.n()).done;){var c,p=be(s.value);try{for(p.s();!(c=p.n()).done;){var d=c.value;Mi.walkTokens(d,e)}}catch(t){p.e(t)}finally{p.f()}}}catch(t){u.e(t)}finally{u.f()}break;case"list":Mi.walkTokens(i.items,e);break;default:i.tokens&&Mi.walkTokens(i.tokens,e)}}}catch(t){r.e(t)}finally{r.f()}},Mi.parseInline=function(t,e){if(null==t)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof t)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected");e=Ii({},Mi.defaults,e||{}),$i(e);try{var n=xi.lexInline(t,e);return e.walkTokens&&Mi.walkTokens(n,e.walkTokens),Oi.parseInline(n,e)}catch(t){if(t.message+="\nPlease report this to https://github.com/markedjs/marked.",e.silent)return"<p>An error occurred:</p><pre>"+Ci(t.message+"",!0)+"</pre>";throw t}},Mi.Parser=Oi,Mi.parser=Oi.parse,Mi.Renderer=Ei,Mi.TextRenderer=Ti,Mi.Lexer=xi,Mi.lexer=xi.lex,Mi.Tokenizer=si,Mi.Slugger=Ai,Mi.parse=Mi;var Ni=Mi;export default function(){var t,e=null;function n(){var n;!e||e.closed?((e=window.open("about:blank","reveal.js - Notes","width=1100,height=700")).marked=Ni,e.document.write("<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\n\t\t<title>reveal.js - Speaker View</title>\n\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tfont-family: Helvetica;\n\t\t\t\tfont-size: 18px;\n\t\t\t}\n\n\t\t\t#current-slide,\n\t\t\t#upcoming-slide,\n\t\t\t#speaker-controls {\n\t\t\t\tpadding: 6px;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\t-moz-box-sizing: border-box;\n\t\t\t}\n\n\t\t\t#current-slide iframe,\n\t\t\t#upcoming-slide iframe {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tborder: 1px solid #ddd;\n\t\t\t}\n\n\t\t\t#current-slide .label,\n\t\t\t#upcoming-slide .label {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 10px;\n\t\t\t\tleft: 10px;\n\t\t\t\tz-index: 2;\n\t\t\t}\n\n\t\t\t#connection-status {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tz-index: 20;\n\t\t\t\tpadding: 30% 20% 20% 20%;\n\t\t\t\tfont-size: 18px;\n\t\t\t\tcolor: #222;\n\t\t\t\tbackground: #fff;\n\t\t\t\ttext-align: center;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tline-height: 1.4;\n\t\t\t}\n\n\t\t\t.overlay-element {\n\t\t\t\theight: 34px;\n\t\t\t\tline-height: 34px;\n\t\t\t\tpadding: 0 10px;\n\t\t\t\ttext-shadow: none;\n\t\t\t\tbackground: rgba( 220, 220, 220, 0.8 );\n\t\t\t\tcolor: #222;\n\t\t\t\tfont-size: 14px;\n\t\t\t}\n\n\t\t\t.overlay-element.interactive:hover {\n\t\t\t\tbackground: rgba( 220, 220, 220, 1 );\n\t\t\t}\n\n\t\t\t#current-slide {\n\t\t\t\tposition: absolute;\n\t\t\t\twidth: 60%;\n\t\t\t\theight: 100%;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\tpadding-right: 0;\n\t\t\t}\n\n\t\t\t#upcoming-slide {\n\t\t\t\tposition: absolute;\n\t\t\t\twidth: 40%;\n\t\t\t\theight: 40%;\n\t\t\t\tright: 0;\n\t\t\t\ttop: 0;\n\t\t\t}\n\n\t\t\t/* Speaker controls */\n\t\t\t#speaker-controls {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 40%;\n\t\t\t\tright: 0;\n\t\t\t\twidth: 40%;\n\t\t\t\theight: 60%;\n\t\t\t\toverflow: auto;\n\t\t\t\tfont-size: 18px;\n\t\t\t}\n\n\t\t\t\t.speaker-controls-time.hidden,\n\t\t\t\t.speaker-controls-notes.hidden {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time .label,\n\t\t\t\t.speaker-controls-pace .label,\n\t\t\t\t.speaker-controls-notes .label {\n\t\t\t\t\ttext-transform: uppercase;\n\t\t\t\t\tfont-weight: normal;\n\t\t\t\t\tfont-size: 0.66em;\n\t\t\t\t\tcolor: #666;\n\t\t\t\t\tmargin: 0;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time, .speaker-controls-pace {\n\t\t\t\t\tborder-bottom: 1px solid rgba( 200, 200, 200, 0.5 );\n\t\t\t\t\tmargin-bottom: 10px;\n\t\t\t\t\tpadding: 10px 16px;\n\t\t\t\t\tpadding-bottom: 20px;\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time .reset-button {\n\t\t\t\t\topacity: 0;\n\t\t\t\t\tfloat: right;\n\t\t\t\t\tcolor: #666;\n\t\t\t\t\ttext-decoration: none;\n\t\t\t\t}\n\t\t\t\t.speaker-controls-time:hover .reset-button {\n\t\t\t\t\topacity: 1;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time .timer,\n\t\t\t\t.speaker-controls-time .clock {\n\t\t\t\t\twidth: 50%;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time .timer,\n\t\t\t\t.speaker-controls-time .clock,\n\t\t\t\t.speaker-controls-time .pacing .hours-value,\n\t\t\t\t.speaker-controls-time .pacing .minutes-value,\n\t\t\t\t.speaker-controls-time .pacing .seconds-value {\n\t\t\t\t\tfont-size: 1.9em;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time .timer {\n\t\t\t\t\tfloat: left;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time .clock {\n\t\t\t\t\tfloat: right;\n\t\t\t\t\ttext-align: right;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time span.mute {\n\t\t\t\t\topacity: 0.3;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time .pacing-title {\n\t\t\t\t\tmargin-top: 5px;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time .pacing.ahead {\n\t\t\t\t\tcolor: blue;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time .pacing.on-track {\n\t\t\t\t\tcolor: green;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time .pacing.behind {\n\t\t\t\t\tcolor: red;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-notes {\n\t\t\t\t\tpadding: 10px 16px;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-notes .value {\n\t\t\t\t\tmargin-top: 5px;\n\t\t\t\t\tline-height: 1.4;\n\t\t\t\t\tfont-size: 1.2em;\n\t\t\t\t}\n\n\t\t\t/* Layout selector */\n\t\t\t#speaker-layout {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 10px;\n\t\t\t\tright: 10px;\n\t\t\t\tcolor: #222;\n\t\t\t\tz-index: 10;\n\t\t\t}\n\t\t\t\t#speaker-layout select {\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\ttop: 0;\n\t\t\t\t\tleft: 0;\n\t\t\t\t\tborder: 0;\n\t\t\t\t\tbox-shadow: 0;\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\topacity: 0;\n\n\t\t\t\t\tfont-size: 1em;\n\t\t\t\t\tbackground-color: transparent;\n\n\t\t\t\t\t-moz-appearance: none;\n\t\t\t\t\t-webkit-appearance: none;\n\t\t\t\t\t-webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n\t\t\t\t}\n\n\t\t\t\t#speaker-layout select:focus {\n\t\t\t\t\toutline: none;\n\t\t\t\t\tbox-shadow: none;\n\t\t\t\t}\n\n\t\t\t.clear {\n\t\t\t\tclear: both;\n\t\t\t}\n\n\t\t\t/* Speaker layout: Wide */\n\t\t\tbody[data-speaker-layout=\"wide\"] #current-slide,\n\t\t\tbody[data-speaker-layout=\"wide\"] #upcoming-slide {\n\t\t\t\twidth: 50%;\n\t\t\t\theight: 45%;\n\t\t\t\tpadding: 6px;\n\t\t\t}\n\n\t\t\tbody[data-speaker-layout=\"wide\"] #current-slide {\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t}\n\n\t\t\tbody[data-speaker-layout=\"wide\"] #upcoming-slide {\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 50%;\n\t\t\t}\n\n\t\t\tbody[data-speaker-layout=\"wide\"] #speaker-controls {\n\t\t\t\ttop: 45%;\n\t\t\t\tleft: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 50%;\n\t\t\t\tfont-size: 1.25em;\n\t\t\t}\n\n\t\t\t/* Speaker layout: Tall */\n\t\t\tbody[data-speaker-layout=\"tall\"] #current-slide,\n\t\t\tbody[data-speaker-layout=\"tall\"] #upcoming-slide {\n\t\t\t\twidth: 45%;\n\t\t\t\theight: 50%;\n\t\t\t\tpadding: 6px;\n\t\t\t}\n\n\t\t\tbody[data-speaker-layout=\"tall\"] #current-slide {\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t}\n\n\t\t\tbody[data-speaker-layout=\"tall\"] #upcoming-slide {\n\t\t\t\ttop: 50%;\n\t\t\t\tleft: 0;\n\t\t\t}\n\n\t\t\tbody[data-speaker-layout=\"tall\"] #speaker-controls {\n\t\t\t\tpadding-top: 40px;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 45%;\n\t\t\t\twidth: 55%;\n\t\t\t\theight: 100%;\n\t\t\t\tfont-size: 1.25em;\n\t\t\t}\n\n\t\t\t/* Speaker layout: Notes only */\n\t\t\tbody[data-speaker-layout=\"notes-only\"] #current-slide,\n\t\t\tbody[data-speaker-layout=\"notes-only\"] #upcoming-slide {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\n\t\t\tbody[data-speaker-layout=\"notes-only\"] #speaker-controls {\n\t\t\t\tpadding-top: 40px;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tfont-size: 1.25em;\n\t\t\t}\n\n\t\t\t@media screen and (max-width: 1080px) {\n\t\t\t\tbody[data-speaker-layout=\"default\"] #speaker-controls {\n\t\t\t\t\tfont-size: 16px;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@media screen and (max-width: 900px) {\n\t\t\t\tbody[data-speaker-layout=\"default\"] #speaker-controls {\n\t\t\t\t\tfont-size: 14px;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@media screen and (max-width: 800px) {\n\t\t\t\tbody[data-speaker-layout=\"default\"] #speaker-controls {\n\t\t\t\t\tfont-size: 12px;\n\t\t\t\t}\n\t\t\t}\n\n\t\t</style>\n\t</head>\n\n\t<body>\n\n\t\t<div id=\"connection-status\">Loading speaker view...</div>\n\n\t\t<div id=\"current-slide\"></div>\n\t\t<div id=\"upcoming-slide\"><span class=\"overlay-element label\">Upcoming</span></div>\n\t\t<div id=\"speaker-controls\">\n\t\t\t<div class=\"speaker-controls-time\">\n\t\t\t\t<h4 class=\"label\">Time <span class=\"reset-button\">Click to Reset</span></h4>\n\t\t\t\t<div class=\"clock\">\n\t\t\t\t\t<span class=\"clock-value\">0:00 AM</span>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"timer\">\n\t\t\t\t\t<span class=\"hours-value\">00</span><span class=\"minutes-value\">:00</span><span class=\"seconds-value\">:00</span>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"clear\"></div>\n\n\t\t\t\t<h4 class=\"label pacing-title\" style=\"display: none\">Pacing – Time to finish current slide</h4>\n\t\t\t\t<div class=\"pacing\" style=\"display: none\">\n\t\t\t\t\t<span class=\"hours-value\">00</span><span class=\"minutes-value\">:00</span><span class=\"seconds-value\">:00</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class=\"speaker-controls-notes hidden\">\n\t\t\t\t<h4 class=\"label\">Notes</h4>\n\t\t\t\t<div class=\"value\"></div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div id=\"speaker-layout\" class=\"overlay-element interactive\">\n\t\t\t<span class=\"speaker-layout-label\"></span>\n\t\t\t<select class=\"speaker-layout-dropdown\"></select>\n\t\t</div>\n\n\t\t<script>\n\n\t\t\t(function() {\n\n\t\t\t\tvar notes,\n\t\t\t\t\tnotesValue,\n\t\t\t\t\tcurrentState,\n\t\t\t\t\tcurrentSlide,\n\t\t\t\t\tupcomingSlide,\n\t\t\t\t\tlayoutLabel,\n\t\t\t\t\tlayoutDropdown,\n\t\t\t\t\tpendingCalls = {},\n\t\t\t\t\tlastRevealApiCallId = 0,\n\t\t\t\t\tconnected = false;\n\n\t\t\t\tvar SPEAKER_LAYOUTS = {\n\t\t\t\t\t'default': 'Default',\n\t\t\t\t\t'wide': 'Wide',\n\t\t\t\t\t'tall': 'Tall',\n\t\t\t\t\t'notes-only': 'Notes only'\n\t\t\t\t};\n\n\t\t\t\tsetupLayout();\n\n\t\t\t\tvar connectionStatus = document.querySelector( '#connection-status' );\n\t\t\t\tvar connectionTimeout = setTimeout( function() {\n\t\t\t\t\tconnectionStatus.innerHTML = 'Error connecting to main window.<br>Please try closing and reopening the speaker view.';\n\t\t\t\t}, 5000 );\n\n\t\t\t\twindow.addEventListener( 'message', function( event ) {\n\n\t\t\t\t\tclearTimeout( connectionTimeout );\n\t\t\t\t\tconnectionStatus.style.display = 'none';\n\n\t\t\t\t\tvar data = JSON.parse( event.data );\n\n\t\t\t\t\t// The overview mode is only useful to the reveal.js instance\n\t\t\t\t\t// where navigation occurs so we don't sync it\n\t\t\t\t\tif( data.state ) delete data.state.overview;\n\n\t\t\t\t\t// Messages sent by the notes plugin inside of the main window\n\t\t\t\t\tif( data && data.namespace === 'reveal-notes' ) {\n\t\t\t\t\t\tif( data.type === 'connect' ) {\n\t\t\t\t\t\t\thandleConnectMessage( data );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( data.type === 'state' ) {\n\t\t\t\t\t\t\thandleStateMessage( data );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( data.type === 'return' ) {\n\t\t\t\t\t\t\tpendingCalls[data.callId](data.result);\n\t\t\t\t\t\t\tdelete pendingCalls[data.callId];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Messages sent by the reveal.js inside of the current slide preview\n\t\t\t\t\telse if( data && data.namespace === 'reveal' ) {\n\t\t\t\t\t\tif( /ready/.test( data.eventName ) ) {\n\t\t\t\t\t\t\t// Send a message back to notify that the handshake is complete\n\t\t\t\t\t\t\twindow.opener.postMessage( JSON.stringify({ namespace: 'reveal-notes', type: 'connected'} ), '*' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( /slidechanged|fragmentshown|fragmenthidden|paused|resumed/.test( data.eventName ) && currentState !== JSON.stringify( data.state ) ) {\n\n\t\t\t\t\t\t\twindow.opener.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ]} ), '*' );\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} );\n\n\t\t\t\t/**\n\t\t\t\t * Asynchronously calls the Reveal.js API of the main frame.\n\t\t\t\t */\n\t\t\t\tfunction callRevealApi( methodName, methodArguments, callback ) {\n\n\t\t\t\t\tvar callId = ++lastRevealApiCallId;\n\t\t\t\t\tpendingCalls[callId] = callback;\n\t\t\t\t\twindow.opener.postMessage( JSON.stringify( {\n\t\t\t\t\t\tnamespace: 'reveal-notes',\n\t\t\t\t\t\ttype: 'call',\n\t\t\t\t\t\tcallId: callId,\n\t\t\t\t\t\tmethodName: methodName,\n\t\t\t\t\t\targuments: methodArguments\n\t\t\t\t\t} ), '*' );\n\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Called when the main window is trying to establish a\n\t\t\t\t * connection.\n\t\t\t\t */\n\t\t\t\tfunction handleConnectMessage( data ) {\n\n\t\t\t\t\tif( connected === false ) {\n\t\t\t\t\t\tconnected = true;\n\n\t\t\t\t\t\tsetupIframes( data );\n\t\t\t\t\t\tsetupKeyboard();\n\t\t\t\t\t\tsetupNotes();\n\t\t\t\t\t\tsetupTimer();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Called when the main window sends an updated state.\n\t\t\t\t */\n\t\t\t\tfunction handleStateMessage( data ) {\n\n\t\t\t\t\t// Store the most recently set state to avoid circular loops\n\t\t\t\t\t// applying the same state\n\t\t\t\t\tcurrentState = JSON.stringify( data.state );\n\n\t\t\t\t\t// No need for updating the notes in case of fragment changes\n\t\t\t\t\tif ( data.notes ) {\n\t\t\t\t\t\tnotes.classList.remove( 'hidden' );\n\t\t\t\t\t\tnotesValue.style.whiteSpace = data.whitespace;\n\t\t\t\t\t\tif( data.markdown ) {\n\t\t\t\t\t\t\tnotesValue.innerHTML = marked( data.notes );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tnotesValue.innerHTML = data.notes;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tnotes.classList.add( 'hidden' );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Update the note slides\n\t\t\t\t\tcurrentSlide.contentWindow.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ] }), '*' );\n\t\t\t\t\tupcomingSlide.contentWindow.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ] }), '*' );\n\t\t\t\t\tupcomingSlide.contentWindow.postMessage( JSON.stringify({ method: 'next' }), '*' );\n\n\t\t\t\t}\n\n\t\t\t\t// Limit to max one state update per X ms\n\t\t\t\thandleStateMessage = debounce( handleStateMessage, 200 );\n\n\t\t\t\t/**\n\t\t\t\t * Forward keyboard events to the current slide window.\n\t\t\t\t * This enables keyboard events to work even if focus\n\t\t\t\t * isn't set on the current slide iframe.\n\t\t\t\t *\n\t\t\t\t * Block F5 default handling, it reloads and disconnects\n\t\t\t\t * the speaker notes window.\n\t\t\t\t */\n\t\t\t\tfunction setupKeyboard() {\n\n\t\t\t\t\tdocument.addEventListener( 'keydown', function( event ) {\n\t\t\t\t\t\tif( event.keyCode === 116 || ( event.metaKey && event.keyCode === 82 ) ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentSlide.contentWindow.postMessage( JSON.stringify({ method: 'triggerKey', args: [ event.keyCode ] }), '*' );\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Creates the preview iframes.\n\t\t\t\t */\n\t\t\t\tfunction setupIframes( data ) {\n\n\t\t\t\t\tvar params = [\n\t\t\t\t\t\t'receiver',\n\t\t\t\t\t\t'progress=false',\n\t\t\t\t\t\t'history=false',\n\t\t\t\t\t\t'transition=none',\n\t\t\t\t\t\t'autoSlide=0',\n\t\t\t\t\t\t'backgroundTransition=none'\n\t\t\t\t\t].join( '&' );\n\n\t\t\t\t\tvar urlSeparator = /\\?/.test(data.url) ? '&' : '?';\n\t\t\t\t\tvar hash = '#/' + data.state.indexh + '/' + data.state.indexv;\n\t\t\t\t\tvar currentURL = data.url + urlSeparator + params + '&postMessageEvents=true' + hash;\n\t\t\t\t\tvar upcomingURL = data.url + urlSeparator + params + '&controls=false' + hash;\n\n\t\t\t\t\tcurrentSlide = document.createElement( 'iframe' );\n\t\t\t\t\tcurrentSlide.setAttribute( 'width', 1280 );\n\t\t\t\t\tcurrentSlide.setAttribute( 'height', 1024 );\n\t\t\t\t\tcurrentSlide.setAttribute( 'src', currentURL );\n\t\t\t\t\tdocument.querySelector( '#current-slide' ).appendChild( currentSlide );\n\n\t\t\t\t\tupcomingSlide = document.createElement( 'iframe' );\n\t\t\t\t\tupcomingSlide.setAttribute( 'width', 640 );\n\t\t\t\t\tupcomingSlide.setAttribute( 'height', 512 );\n\t\t\t\t\tupcomingSlide.setAttribute( 'src', upcomingURL );\n\t\t\t\t\tdocument.querySelector( '#upcoming-slide' ).appendChild( upcomingSlide );\n\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Setup the notes UI.\n\t\t\t\t */\n\t\t\t\tfunction setupNotes() {\n\n\t\t\t\t\tnotes = document.querySelector( '.speaker-controls-notes' );\n\t\t\t\t\tnotesValue = document.querySelector( '.speaker-controls-notes .value' );\n\n\t\t\t\t}\n\n\t\t\t\tfunction getTimings( callback ) {\n\n\t\t\t\t\tcallRevealApi( 'getSlidesAttributes', [], function ( slideAttributes ) {\n\t\t\t\t\t\tcallRevealApi( 'getConfig', [], function ( config ) {\n\t\t\t\t\t\t\tvar totalTime = config.totalTime;\n\t\t\t\t\t\t\tvar minTimePerSlide = config.minimumTimePerSlide || 0;\n\t\t\t\t\t\t\tvar defaultTiming = config.defaultTiming;\n\t\t\t\t\t\t\tif ((defaultTiming == null) && (totalTime == null)) {\n\t\t\t\t\t\t\t\tcallback(null);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Setting totalTime overrides defaultTiming\n\t\t\t\t\t\t\tif (totalTime) {\n\t\t\t\t\t\t\t\tdefaultTiming = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar timings = [];\n\t\t\t\t\t\t\tfor ( var i in slideAttributes ) {\n\t\t\t\t\t\t\t\tvar slide = slideAttributes[ i ];\n\t\t\t\t\t\t\t\tvar timing = defaultTiming;\n\t\t\t\t\t\t\t\tif( slide.hasOwnProperty( 'data-timing' )) {\n\t\t\t\t\t\t\t\t\tvar t = slide[ 'data-timing' ];\n\t\t\t\t\t\t\t\t\ttiming = parseInt(t);\n\t\t\t\t\t\t\t\t\tif( isNaN(timing) ) {\n\t\t\t\t\t\t\t\t\t\tconsole.warn(\"Could not parse timing '\" + t + \"' of slide \" + i + \"; using default of \" + defaultTiming);\n\t\t\t\t\t\t\t\t\t\ttiming = defaultTiming;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\ttimings.push(timing);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( totalTime ) {\n\t\t\t\t\t\t\t\t// After we've allocated time to individual slides, we summarize it and\n\t\t\t\t\t\t\t\t// subtract it from the total time\n\t\t\t\t\t\t\t\tvar remainingTime = totalTime - timings.reduce( function(a, b) { return a + b; }, 0 );\n\t\t\t\t\t\t\t\t// The remaining time is divided by the number of slides that have 0 seconds\n\t\t\t\t\t\t\t\t// allocated at the moment, giving the average time-per-slide on the remaining slides\n\t\t\t\t\t\t\t\tvar remainingSlides = (timings.filter( function(x) { return x == 0 }) ).length\n\t\t\t\t\t\t\t\tvar timePerSlide = Math.round( remainingTime / remainingSlides, 0 )\n\t\t\t\t\t\t\t\t// And now we replace every zero-value timing with that average\n\t\t\t\t\t\t\t\ttimings = timings.map( function(x) { return (x==0 ? timePerSlide : x) } );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar slidesUnderMinimum = timings.filter( function(x) { return (x < minTimePerSlide) } ).length\n\t\t\t\t\t\t\tif ( slidesUnderMinimum ) {\n\t\t\t\t\t\t\t\tmessage = \"The pacing time for \" + slidesUnderMinimum + \" slide(s) is under the configured minimum of \" + minTimePerSlide + \" seconds. Check the data-timing attribute on individual slides, or consider increasing the totalTime or minimumTimePerSlide configuration options (or removing some slides).\";\n\t\t\t\t\t\t\t\talert(message);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcallback( timings );\n\t\t\t\t\t\t} );\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Return the number of seconds allocated for presenting\n\t\t\t\t * all slides up to and including this one.\n\t\t\t\t */\n\t\t\t\tfunction getTimeAllocated( timings, callback ) {\n\n\t\t\t\t\tcallRevealApi( 'getSlidePastCount', [], function ( currentSlide ) {\n\t\t\t\t\t\tvar allocated = 0;\n\t\t\t\t\t\tfor (var i in timings.slice(0, currentSlide + 1)) {\n\t\t\t\t\t\t\tallocated += timings[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcallback( allocated );\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Create the timer and clock and start updating them\n\t\t\t\t * at an interval.\n\t\t\t\t */\n\t\t\t\tfunction setupTimer() {\n\n\t\t\t\t\tvar start = new Date(),\n\t\t\t\t\ttimeEl = document.querySelector( '.speaker-controls-time' ),\n\t\t\t\t\tclockEl = timeEl.querySelector( '.clock-value' ),\n\t\t\t\t\thoursEl = timeEl.querySelector( '.hours-value' ),\n\t\t\t\t\tminutesEl = timeEl.querySelector( '.minutes-value' ),\n\t\t\t\t\tsecondsEl = timeEl.querySelector( '.seconds-value' ),\n\t\t\t\t\tpacingTitleEl = timeEl.querySelector( '.pacing-title' ),\n\t\t\t\t\tpacingEl = timeEl.querySelector( '.pacing' ),\n\t\t\t\t\tpacingHoursEl = pacingEl.querySelector( '.hours-value' ),\n\t\t\t\t\tpacingMinutesEl = pacingEl.querySelector( '.minutes-value' ),\n\t\t\t\t\tpacingSecondsEl = pacingEl.querySelector( '.seconds-value' );\n\n\t\t\t\t\tvar timings = null;\n\t\t\t\t\tgetTimings( function ( _timings ) {\n\n\t\t\t\t\t\ttimings = _timings;\n\t\t\t\t\t\tif (_timings !== null) {\n\t\t\t\t\t\t\tpacingTitleEl.style.removeProperty('display');\n\t\t\t\t\t\t\tpacingEl.style.removeProperty('display');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Update once directly\n\t\t\t\t\t\t_updateTimer();\n\n\t\t\t\t\t\t// Then update every second\n\t\t\t\t\t\tsetInterval( _updateTimer, 1000 );\n\n\t\t\t\t\t} );\n\n\n\t\t\t\t\tfunction _resetTimer() {\n\n\t\t\t\t\t\tif (timings == null) {\n\t\t\t\t\t\t\tstart = new Date();\n\t\t\t\t\t\t\t_updateTimer();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// Reset timer to beginning of current slide\n\t\t\t\t\t\t\tgetTimeAllocated( timings, function ( slideEndTimingSeconds ) {\n\t\t\t\t\t\t\t\tvar slideEndTiming = slideEndTimingSeconds * 1000;\n\t\t\t\t\t\t\t\tcallRevealApi( 'getSlidePastCount', [], function ( currentSlide ) {\n\t\t\t\t\t\t\t\t\tvar currentSlideTiming = timings[currentSlide] * 1000;\n\t\t\t\t\t\t\t\t\tvar previousSlidesTiming = slideEndTiming - currentSlideTiming;\n\t\t\t\t\t\t\t\t\tvar now = new Date();\n\t\t\t\t\t\t\t\t\tstart = new Date(now.getTime() - previousSlidesTiming);\n\t\t\t\t\t\t\t\t\t_updateTimer();\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttimeEl.addEventListener( 'click', function() {\n\t\t\t\t\t\t_resetTimer();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} );\n\n\t\t\t\t\tfunction _displayTime( hrEl, minEl, secEl, time) {\n\n\t\t\t\t\t\tvar sign = Math.sign(time) == -1 ? \"-\" : \"\";\n\t\t\t\t\t\ttime = Math.abs(Math.round(time / 1000));\n\t\t\t\t\t\tvar seconds = time % 60;\n\t\t\t\t\t\tvar minutes = Math.floor( time / 60 ) % 60 ;\n\t\t\t\t\t\tvar hours = Math.floor( time / ( 60 * 60 )) ;\n\t\t\t\t\t\thrEl.innerHTML = sign + zeroPadInteger( hours );\n\t\t\t\t\t\tif (hours == 0) {\n\t\t\t\t\t\t\thrEl.classList.add( 'mute' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\thrEl.classList.remove( 'mute' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tminEl.innerHTML = ':' + zeroPadInteger( minutes );\n\t\t\t\t\t\tif (hours == 0 && minutes == 0) {\n\t\t\t\t\t\t\tminEl.classList.add( 'mute' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tminEl.classList.remove( 'mute' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsecEl.innerHTML = ':' + zeroPadInteger( seconds );\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction _updateTimer() {\n\n\t\t\t\t\t\tvar diff, hours, minutes, seconds,\n\t\t\t\t\t\tnow = new Date();\n\n\t\t\t\t\t\tdiff = now.getTime() - start.getTime();\n\n\t\t\t\t\t\tclockEl.innerHTML = now.toLocaleTimeString( 'en-US', { hour12: true, hour: '2-digit', minute:'2-digit' } );\n\t\t\t\t\t\t_displayTime( hoursEl, minutesEl, secondsEl, diff );\n\t\t\t\t\t\tif (timings !== null) {\n\t\t\t\t\t\t\t_updatePacing(diff);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction _updatePacing(diff) {\n\n\t\t\t\t\t\tgetTimeAllocated( timings, function ( slideEndTimingSeconds ) {\n\t\t\t\t\t\t\tvar slideEndTiming = slideEndTimingSeconds * 1000;\n\n\t\t\t\t\t\t\tcallRevealApi( 'getSlidePastCount', [], function ( currentSlide ) {\n\t\t\t\t\t\t\t\tvar currentSlideTiming = timings[currentSlide] * 1000;\n\t\t\t\t\t\t\t\tvar timeLeftCurrentSlide = slideEndTiming - diff;\n\t\t\t\t\t\t\t\tif (timeLeftCurrentSlide < 0) {\n\t\t\t\t\t\t\t\t\tpacingEl.className = 'pacing behind';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (timeLeftCurrentSlide < currentSlideTiming) {\n\t\t\t\t\t\t\t\t\tpacingEl.className = 'pacing on-track';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tpacingEl.className = 'pacing ahead';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t_displayTime( pacingHoursEl, pacingMinutesEl, pacingSecondsEl, timeLeftCurrentSlide );\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Sets up the speaker view layout and layout selector.\n\t\t\t\t */\n\t\t\t\tfunction setupLayout() {\n\n\t\t\t\t\tlayoutDropdown = document.querySelector( '.speaker-layout-dropdown' );\n\t\t\t\t\tlayoutLabel = document.querySelector( '.speaker-layout-label' );\n\n\t\t\t\t\t// Render the list of available layouts\n\t\t\t\t\tfor( var id in SPEAKER_LAYOUTS ) {\n\t\t\t\t\t\tvar option = document.createElement( 'option' );\n\t\t\t\t\t\toption.setAttribute( 'value', id );\n\t\t\t\t\t\toption.textContent = SPEAKER_LAYOUTS[ id ];\n\t\t\t\t\t\tlayoutDropdown.appendChild( option );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Monitor the dropdown for changes\n\t\t\t\t\tlayoutDropdown.addEventListener( 'change', function( event ) {\n\n\t\t\t\t\t\tsetLayout( layoutDropdown.value );\n\n\t\t\t\t\t}, false );\n\n\t\t\t\t\t// Restore any currently persisted layout\n\t\t\t\t\tsetLayout( getLayout() );\n\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Sets a new speaker view layout. The layout is persisted\n\t\t\t\t * in local storage.\n\t\t\t\t */\n\t\t\t\tfunction setLayout( value ) {\n\n\t\t\t\t\tvar title = SPEAKER_LAYOUTS[ value ];\n\n\t\t\t\t\tlayoutLabel.innerHTML = 'Layout' + ( title ? ( ': ' + title ) : '' );\n\t\t\t\t\tlayoutDropdown.value = value;\n\n\t\t\t\t\tdocument.body.setAttribute( 'data-speaker-layout', value );\n\n\t\t\t\t\t// Persist locally\n\t\t\t\t\tif( supportsLocalStorage() ) {\n\t\t\t\t\t\twindow.localStorage.setItem( 'reveal-speaker-layout', value );\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Returns the ID of the most recently set speaker layout\n\t\t\t\t * or our default layout if none has been set.\n\t\t\t\t */\n\t\t\t\tfunction getLayout() {\n\n\t\t\t\t\tif( supportsLocalStorage() ) {\n\t\t\t\t\t\tvar layout = window.localStorage.getItem( 'reveal-speaker-layout' );\n\t\t\t\t\t\tif( layout ) {\n\t\t\t\t\t\t\treturn layout;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Default to the first record in the layouts hash\n\t\t\t\t\tfor( var id in SPEAKER_LAYOUTS ) {\n\t\t\t\t\t\treturn id;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tfunction supportsLocalStorage() {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlocalStorage.setItem('test', 'test');\n\t\t\t\t\t\tlocalStorage.removeItem('test');\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tcatch( e ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tfunction zeroPadInteger( num ) {\n\n\t\t\t\t\tvar str = '00' + parseInt( num );\n\t\t\t\t\treturn str.substring( str.length - 2 );\n\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Limits the frequency at which a function can be called.\n\t\t\t\t */\n\t\t\t\tfunction debounce( fn, ms ) {\n\n\t\t\t\t\tvar lastTime = 0,\n\t\t\t\t\t\ttimeout;\n\n\t\t\t\t\treturn function() {\n\n\t\t\t\t\t\tvar args = arguments;\n\t\t\t\t\t\tvar context = this;\n\n\t\t\t\t\t\tclearTimeout( timeout );\n\n\t\t\t\t\t\tvar timeSinceLastCall = Date.now() - lastTime;\n\t\t\t\t\t\tif( timeSinceLastCall > ms ) {\n\t\t\t\t\t\t\tfn.apply( context, args );\n\t\t\t\t\t\t\tlastTime = Date.now();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttimeout = setTimeout( function() {\n\t\t\t\t\t\t\t\tfn.apply( context, args );\n\t\t\t\t\t\t\t\tlastTime = Date.now();\n\t\t\t\t\t\t\t}, ms - timeSinceLastCall );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t})();\n\n\t\t<\/script>\n\t</body>\n</html>"),e?(n=setInterval((function(){e.postMessage(JSON.stringify({namespace:"reveal-notes",type:"connect",url:window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,state:t.getState()}),"*")}),500),window.addEventListener("message",(function(i){var a,o,l,s,u=JSON.parse(i.data);u&&"reveal-notes"===u.namespace&&"connected"===u.type&&(clearInterval(n),t.on("slidechanged",r),t.on("fragmentshown",r),t.on("fragmenthidden",r),t.on("overviewhidden",r),t.on("overviewshown",r),t.on("paused",r),t.on("resumed",r),r()),u&&"reveal-notes"===u.namespace&&"call"===u.type&&(a=u.methodName,o=u.arguments,l=u.callId,s=t[a].apply(t,o),e.postMessage(JSON.stringify({namespace:"reveal-notes",type:"return",result:s,callId:l}),"*"))}))):alert("Speaker view popup failed to open. Please make sure popups are allowed and reopen the speaker view.")):e.focus();function r(n){var r=t.getCurrentSlide(),i=r.querySelector("aside.notes"),a=r.querySelector(".current-fragment"),o={namespace:"reveal-notes",type:"state",notes:"",markdown:!1,whitespace:"normal",state:t.getState()};if(r.hasAttribute("data-notes")&&(o.notes=r.getAttribute("data-notes"),o.whitespace="pre-wrap"),a){var l=a.querySelector("aside.notes");l?i=l:a.hasAttribute("data-notes")&&(o.notes=a.getAttribute("data-notes"),o.whitespace="pre-wrap",i=null)}i&&(o.notes=i.innerHTML,o.markdown="string"==typeof i.getAttribute("data-markdown")),e.postMessage(JSON.stringify(o),"*")}}return{id:"notes",init:function(e){t=e,/receiver/i.test(window.location.search)||(null!==window.location.search.match(/(\?|\&)notes/gi)&&n(),t.addKeyBinding({keyCode:83,key:"S",description:"Speaker notes view"},(function(){n()})))},open:n}}
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).RevealNotes=e()}(this,(function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e,n){return t(n={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&n.path)}},n.exports),n.exports}var n=function(t){return t&&t.Math==Math&&t},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")(),i=function(t){try{return!!t()}catch(t){return!0}},a=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),o={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,s={f:l&&!o.call({1:2},1)?function(t){var e=l(this,t);return!!e&&e.enumerable}:o},u=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},c={}.toString,p=function(t){return c.call(t).slice(8,-1)},d="".split,f=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==p(t)?d.call(t,""):Object(t)}:Object,h=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},g=function(t){return f(h(t))},m=function(t){return"object"==typeof t?null!==t:"function"==typeof t},v=function(t,e){if(!m(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!m(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!m(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!m(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},y={}.hasOwnProperty,k=function(t,e){return y.call(t,e)},b=r.document,x=m(b)&&m(b.createElement),w=function(t){return x?b.createElement(t):{}},S=!a&&!i((function(){return 7!=Object.defineProperty(w("div"),"a",{get:function(){return 7}}).a})),_=Object.getOwnPropertyDescriptor,T={f:a?_:function(t,e){if(t=g(t),e=v(e,!0),S)try{return _(t,e)}catch(t){}if(k(t,e))return u(!s.f.call(t,e),t[e])}},E=function(t){if(!m(t))throw TypeError(String(t)+" is not an object");return t},A=Object.defineProperty,z={f:a?A:function(t,e,n){if(E(t),e=v(e,!0),E(n),S)try{return A(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},R=a?function(t,e,n){return z.f(t,e,u(1,n))}:function(t,e,n){return t[e]=n,t},O=function(t,e){try{R(r,t,e)}catch(n){r[t]=e}return e},I="__core-js_shared__",$=r[I]||O(I,{}),C=Function.toString;"function"!=typeof $.inspectSource&&($.inspectSource=function(t){return C.call(t)});var P,L,j,M=$.inspectSource,N=r.WeakMap,U="function"==typeof N&&/native code/.test(M(N)),q=e((function(t){(t.exports=function(t,e){return $[t]||($[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.7.0",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),D=0,Z=Math.random(),W=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++D+Z).toString(36)},K=q("keys"),F=function(t){return K[t]||(K[t]=W(t))},J={},H=r.WeakMap;if(U){var B=$.state||($.state=new H),Y=B.get,V=B.has,X=B.set;P=function(t,e){return e.facade=t,X.call(B,t,e),e},L=function(t){return Y.call(B,t)||{}},j=function(t){return V.call(B,t)}}else{var G=F("state");J[G]=!0,P=function(t,e){return e.facade=t,R(t,G,e),e},L=function(t){return k(t,G)?t[G]:{}},j=function(t){return k(t,G)}}var Q={set:P,get:L,has:j,enforce:function(t){return j(t)?L(t):P(t,{})},getterFor:function(t){return function(e){var n;if(!m(e)||(n=L(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},tt=e((function(t){var e=Q.get,n=Q.enforce,i=String(String).split("String");(t.exports=function(t,e,a,o){var l,s=!!o&&!!o.unsafe,u=!!o&&!!o.enumerable,c=!!o&&!!o.noTargetGet;"function"==typeof a&&("string"!=typeof e||k(a,"name")||R(a,"name",e),(l=n(a)).source||(l.source=i.join("string"==typeof e?e:""))),t!==r?(s?!c&&t[e]&&(u=!0):delete t[e],u?t[e]=a:R(t,e,a)):u?t[e]=a:O(e,a)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||M(this)}))})),et=r,nt=function(t){return"function"==typeof t?t:void 0},rt=function(t,e){return arguments.length<2?nt(et[t])||nt(r[t]):et[t]&&et[t][e]||r[t]&&r[t][e]},it=Math.ceil,at=Math.floor,ot=function(t){return isNaN(t=+t)?0:(t>0?at:it)(t)},lt=Math.min,st=function(t){return t>0?lt(ot(t),9007199254740991):0},ut=Math.max,ct=Math.min,pt=function(t,e){var n=ot(t);return n<0?ut(n+e,0):ct(n,e)},dt=function(t){return function(e,n,r){var i,a=g(e),o=st(a.length),l=pt(r,o);if(t&&n!=n){for(;o>l;)if((i=a[l++])!=i)return!0}else for(;o>l;l++)if((t||l in a)&&a[l]===n)return t||l||0;return!t&&-1}},ft={includes:dt(!0),indexOf:dt(!1)},ht=ft.indexOf,gt=function(t,e){var n,r=g(t),i=0,a=[];for(n in r)!k(J,n)&&k(r,n)&&a.push(n);for(;e.length>i;)k(r,n=e[i++])&&(~ht(a,n)||a.push(n));return a},mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],vt=mt.concat("length","prototype"),yt={f:Object.getOwnPropertyNames||function(t){return gt(t,vt)}},kt={f:Object.getOwnPropertySymbols},bt=rt("Reflect","ownKeys")||function(t){var e=yt.f(E(t)),n=kt.f;return n?e.concat(n(t)):e},xt=function(t,e){for(var n=bt(e),r=z.f,i=T.f,a=0;a<n.length;a++){var o=n[a];k(t,o)||r(t,o,i(e,o))}},wt=/#|\.prototype\./,St=function(t,e){var n=Tt[_t(t)];return n==At||n!=Et&&("function"==typeof e?i(e):!!e)},_t=St.normalize=function(t){return String(t).replace(wt,".").toLowerCase()},Tt=St.data={},Et=St.NATIVE="N",At=St.POLYFILL="P",zt=St,Rt=T.f,Ot=function(t,e){var n,i,a,o,l,s=t.target,u=t.global,c=t.stat;if(n=u?r:c?r[s]||O(s,{}):(r[s]||{}).prototype)for(i in e){if(o=e[i],a=t.noTargetGet?(l=Rt(n,i))&&l.value:n[i],!zt(u?i:s+(c?".":"#")+i,t.forced)&&void 0!==a){if(typeof o==typeof a)continue;xt(o,a)}(t.sham||a&&a.sham)&&R(o,"sham",!0),tt(n,i,o,t)}},It=function(){var t=E(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e};function $t(t,e){return RegExp(t,e)}var Ct={UNSUPPORTED_Y:i((function(){var t=$t("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),BROKEN_CARET:i((function(){var t=$t("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},Pt=RegExp.prototype.exec,Lt=String.prototype.replace,jt=Pt,Mt=function(){var t=/a/,e=/b*/g;return Pt.call(t,"a"),Pt.call(e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),Nt=Ct.UNSUPPORTED_Y||Ct.BROKEN_CARET,Ut=void 0!==/()??/.exec("")[1];(Mt||Ut||Nt)&&(jt=function(t){var e,n,r,i,a=this,o=Nt&&a.sticky,l=It.call(a),s=a.source,u=0,c=t;return o&&(-1===(l=l.replace("y","")).indexOf("g")&&(l+="g"),c=String(t).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==t[a.lastIndex-1])&&(s="(?: "+s+")",c=" "+c,u++),n=new RegExp("^(?:"+s+")",l)),Ut&&(n=new RegExp("^"+s+"$(?!\\s)",l)),Mt&&(e=a.lastIndex),r=Pt.call(o?n:a,c),o?r?(r.input=r.input.slice(u),r[0]=r[0].slice(u),r.index=a.lastIndex,a.lastIndex+=r[0].length):a.lastIndex=0:Mt&&r&&(a.lastIndex=a.global?r.index+r[0].length:e),Ut&&r&&r.length>1&&Lt.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r});var qt=jt;Ot({target:"RegExp",proto:!0,forced:/./.exec!==qt},{exec:qt});var Dt=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())})),Zt=Dt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Wt=q("wks"),Kt=r.Symbol,Ft=Zt?Kt:Kt&&Kt.withoutSetter||W,Jt=function(t){return k(Wt,t)||(Dt&&k(Kt,t)?Wt[t]=Kt[t]:Wt[t]=Ft("Symbol."+t)),Wt[t]},Ht=Jt("species"),Bt=!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),Yt="$0"==="a".replace(/./,"$0"),Vt=Jt("replace"),Xt=!!/./[Vt]&&""===/./[Vt]("a","$0"),Gt=!i((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),Qt=function(t,e,n,r){var a=Jt(t),o=!i((function(){var e={};return e[a]=function(){return 7},7!=""[t](e)})),l=o&&!i((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[Ht]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return e=!0,null},n[a](""),!e}));if(!o||!l||"replace"===t&&(!Bt||!Yt||Xt)||"split"===t&&!Gt){var s=/./[a],u=n(a,""[t],(function(t,e,n,r,i){return e.exec===qt?o&&!i?{done:!0,value:s.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:Yt,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Xt}),c=u[0],p=u[1];tt(String.prototype,t,c),tt(RegExp.prototype,a,2==e?function(t,e){return p.call(t,this,e)}:function(t){return p.call(t,this)})}r&&R(RegExp.prototype[a],"sham",!0)},te=function(t){return function(e,n){var r,i,a=String(h(e)),o=ot(n),l=a.length;return o<0||o>=l?t?"":void 0:(r=a.charCodeAt(o))<55296||r>56319||o+1===l||(i=a.charCodeAt(o+1))<56320||i>57343?t?a.charAt(o):r:t?a.slice(o,o+2):i-56320+(r-55296<<10)+65536}},ee={codeAt:te(!1),charAt:te(!0)}.charAt,ne=function(t,e,n){return e+(n?ee(t,e).length:1)},re=function(t,e){var n=t.exec;if("function"==typeof n){var r=n.call(t,e);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==p(t))throw TypeError("RegExp#exec called on incompatible receiver");return qt.call(t,e)};Qt("match",1,(function(t,e,n){return[function(e){var n=h(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var i=E(t),a=String(this);if(!i.global)return re(i,a);var o=i.unicode;i.lastIndex=0;for(var l,s=[],u=0;null!==(l=re(i,a));){var c=String(l[0]);s[u]=c,""===c&&(i.lastIndex=ne(a,st(i.lastIndex),o)),u++}return 0===u?null:s}]}));var ie=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e};Qt("search",1,(function(t,e,n){return[function(e){var n=h(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var i=E(t),a=String(this),o=i.lastIndex;ie(o,0)||(i.lastIndex=0);var l=re(i,a);return ie(i.lastIndex,o)||(i.lastIndex=o),null===l?-1:l.index}]}));var ae={};ae[Jt("toStringTag")]="z";var oe="[object z]"===String(ae),le=Jt("toStringTag"),se="Arguments"==p(function(){return arguments}()),ue=oe?p:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),le))?n:se?p(e):"Object"==(r=p(e))&&"function"==typeof e.callee?"Arguments":r},ce=oe?{}.toString:function(){return"[object "+ue(this)+"]"};oe||tt(Object.prototype,"toString",ce,{unsafe:!0});var pe="toString",de=RegExp.prototype,fe=de.toString,he=i((function(){return"/a/b"!=fe.call({source:"a",flags:"b"})})),ge=fe.name!=pe;function me(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ve(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ye(t,e,n){return e&&ve(t.prototype,e),n&&ve(t,n),t}function ke(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,l=t[Symbol.iterator]();!(r=(o=l.next()).done)&&(n.push(o.value),!e||n.length!==e);r=!0);}catch(t){i=!0,a=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw a}}return n}(t,e)||be(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function be(t,e){if(t){if("string"==typeof t)return xe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xe(t,e):void 0}}function xe(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function we(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=be(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){l=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw a}}}}(he||ge)&&tt(RegExp.prototype,pe,(function(){var t=E(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(void 0===n&&t instanceof RegExp&&!("flags"in de)?It.call(t):n)}),{unsafe:!0});var Se,_e=Object.keys||function(t){return gt(t,mt)},Te=a?Object.defineProperties:function(t,e){E(t);for(var n,r=_e(e),i=r.length,a=0;i>a;)z.f(t,n=r[a++],e[n]);return t},Ee=rt("document","documentElement"),Ae=F("IE_PROTO"),ze=function(){},Re=function(t){return"<script>"+t+"</"+"script>"},Oe=function(){try{Se=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;Oe=Se?function(t){t.write(Re("")),t.close();var e=t.parentWindow.Object;return t=null,e}(Se):((e=w("iframe")).style.display="none",Ee.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Re("document.F=Object")),t.close(),t.F);for(var n=mt.length;n--;)delete Oe.prototype[mt[n]];return Oe()};J[Ae]=!0;var Ie=Object.create||function(t,e){var n;return null!==t?(ze.prototype=E(t),n=new ze,ze.prototype=null,n[Ae]=t):n=Oe(),void 0===e?n:Te(n,e)},$e=Jt("unscopables"),Ce=Array.prototype;null==Ce[$e]&&z.f(Ce,$e,{configurable:!0,value:Ie(null)});var Pe,Le=Object.defineProperty,je={},Me=function(t){throw t},Ne=function(t,e){if(k(je,t))return je[t];e||(e={});var n=[][t],r=!!k(e,"ACCESSORS")&&e.ACCESSORS,o=k(e,0)?e[0]:Me,l=k(e,1)?e[1]:void 0;return je[t]=!!n&&!i((function(){if(r&&!a)return!0;var t={length:-1};r?Le(t,1,{enumerable:!0,get:Me}):t[1]=1,n.call(t,o,l)}))},Ue=ft.includes;Ot({target:"Array",proto:!0,forced:!Ne("indexOf",{ACCESSORS:!0,1:0})},{includes:function(t){return Ue(this,t,arguments.length>1?arguments[1]:void 0)}}),Pe="includes",Ce[$e][Pe]=!0;var qe=function(t,e){var n=[][t];return!!n&&i((function(){n.call(null,e||function(){throw 1},1)}))},De=Math.min,Ze=[].lastIndexOf,We=!!Ze&&1/[1].lastIndexOf(1,-0)<0,Ke=qe("lastIndexOf"),Fe=Ne("indexOf",{ACCESSORS:!0,1:0}),Je=We||!Ke||!Fe?function(t){if(We)return Ze.apply(this,arguments)||0;var e=g(this),n=st(e.length),r=n-1;for(arguments.length>1&&(r=De(r,ot(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}:Ze;Ot({target:"Array",proto:!0,forced:Je!==[].lastIndexOf},{lastIndexOf:Je});var He,Be,Ye=Array.isArray||function(t){return"Array"==p(t)},Ve=function(t,e,n){var r=v(e);r in t?z.f(t,r,u(0,n)):t[r]=n},Xe=rt("navigator","userAgent")||"",Ge=r.process,Qe=Ge&&Ge.versions,tn=Qe&&Qe.v8;tn?Be=(He=tn.split("."))[0]+He[1]:Xe&&(!(He=Xe.match(/Edge\/(\d+)/))||He[1]>=74)&&(He=Xe.match(/Chrome\/(\d+)/))&&(Be=He[1]);var en=Be&&+Be,nn=Jt("species"),rn=function(t){return en>=51||!i((function(){var e=[];return(e.constructor={})[nn]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},an=rn("slice"),on=Ne("slice",{ACCESSORS:!0,0:0,1:2}),ln=Jt("species"),sn=[].slice,un=Math.max;Ot({target:"Array",proto:!0,forced:!an||!on},{slice:function(t,e){var n,r,i,a=g(this),o=st(a.length),l=pt(t,o),s=pt(void 0===e?o:e,o);if(Ye(a)&&("function"!=typeof(n=a.constructor)||n!==Array&&!Ye(n.prototype)?m(n)&&null===(n=n[ln])&&(n=void 0):n=void 0,n===Array||void 0===n))return sn.call(a,l,s);for(r=new(void 0===n?Array:n)(un(s-l,0)),i=0;l<s;l++,i++)l in a&&Ve(r,i,a[l]);return r.length=i,r}});var cn=function(t){return Object(h(t))};Ot({target:"Object",stat:!0,forced:i((function(){_e(1)}))},{keys:function(t){return _e(cn(t))}});var pn=Jt("match"),dn=function(t){var e;return m(t)&&(void 0!==(e=t[pn])?!!e:"RegExp"==p(t))},fn=function(t){if(dn(t))throw TypeError("The method doesn't accept regular expressions");return t},hn=Jt("match"),gn=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[hn]=!1,"/./"[t](e)}catch(t){}}return!1};Ot({target:"String",proto:!0,forced:!gn("includes")},{includes:function(t){return!!~String(h(this)).indexOf(fn(t),arguments.length>1?arguments[1]:void 0)}});var mn=Math.max,vn=Math.min,yn=Math.floor,kn=/\$([$&'`]|\d\d?|<[^>]*>)/g,bn=/\$([$&'`]|\d\d?)/g;Qt("replace",2,(function(t,e,n,r){var i=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,a=r.REPLACE_KEEPS_$0,o=i?"$":"$0";return[function(n,r){var i=h(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,i,r):e.call(String(i),n,r)},function(t,r){if(!i&&a||"string"==typeof r&&-1===r.indexOf(o)){var s=n(e,t,this,r);if(s.done)return s.value}var u=E(t),c=String(this),p="function"==typeof r;p||(r=String(r));var d=u.global;if(d){var f=u.unicode;u.lastIndex=0}for(var h=[];;){var g=re(u,c);if(null===g)break;if(h.push(g),!d)break;""===String(g[0])&&(u.lastIndex=ne(c,st(u.lastIndex),f))}for(var m,v="",y=0,k=0;k<h.length;k++){g=h[k];for(var b=String(g[0]),x=mn(vn(ot(g.index),c.length),0),w=[],S=1;S<g.length;S++)w.push(void 0===(m=g[S])?m:String(m));var _=g.groups;if(p){var T=[b].concat(w,x,c);void 0!==_&&T.push(_);var A=String(r.apply(void 0,T))}else A=l(b,c,x,w,_,r);x>=y&&(v+=c.slice(y,x)+A,y=x+b.length)}return v+c.slice(y)}];function l(t,n,r,i,a,o){var l=r+t.length,s=i.length,u=bn;return void 0!==a&&(a=cn(a),u=kn),e.call(o,u,(function(e,o){var u;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(l);case"<":u=a[o.slice(1,-1)];break;default:var c=+o;if(0===c)return e;if(c>s){var p=yn(c/10);return 0===p?e:p<=s?void 0===i[p-1]?o.charAt(1):i[p-1]+o.charAt(1):e}u=i[c-1]}return void 0===u?"":u}))}}));var xn,wn=/"/g;Ot({target:"String",proto:!0,forced:(xn="link",i((function(){var t=""[xn]('"');return t!==t.toLowerCase()||t.split('"').length>3})))},{link:function(t){return e="a",n="href",r=t,i=String(h(this)),a="<"+e,""!==n&&(a+=" "+n+'="'+String(r).replace(wn,"&quot;")+'"'),a+">"+i+"</"+e+">";var e,n,r,i,a}});var Sn=ft.indexOf,_n=[].indexOf,Tn=!!_n&&1/[1].indexOf(1,-0)<0,En=qe("indexOf"),An=Ne("indexOf",{ACCESSORS:!0,1:0});Ot({target:"Array",proto:!0,forced:Tn||!En||!An},{indexOf:function(t){return Tn?_n.apply(this,arguments)||0:Sn(this,t,arguments.length>1?arguments[1]:void 0)}});var zn=[].join,Rn=f!=Object,On=qe("join",",");Ot({target:"Array",proto:!0,forced:Rn||!On},{join:function(t){return zn.call(g(this),void 0===t?",":t)}});var In=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},$n=Jt("species"),Cn=function(t,e){var n;return Ye(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!Ye(n.prototype)?m(n)&&null===(n=n[$n])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)},Pn=[].push,Ln=function(t){var e=1==t,n=2==t,r=3==t,i=4==t,a=6==t,o=5==t||a;return function(l,s,u,c){for(var p,d,h=cn(l),g=f(h),m=function(t,e,n){if(In(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}(s,u,3),v=st(g.length),y=0,k=c||Cn,b=e?k(l,v):n?k(l,0):void 0;v>y;y++)if((o||y in g)&&(d=m(p=g[y],y,h),t))if(e)b[y]=d;else if(d)switch(t){case 3:return!0;case 5:return p;case 6:return y;case 2:Pn.call(b,p)}else if(i)return!1;return a?-1:r||i?i:b}},jn={forEach:Ln(0),map:Ln(1),filter:Ln(2),some:Ln(3),every:Ln(4),find:Ln(5),findIndex:Ln(6)}.map,Mn=rn("map"),Nn=Ne("map");Ot({target:"Array",proto:!0,forced:!Mn||!Nn},{map:function(t){return jn(this,t,arguments.length>1?arguments[1]:void 0)}});var Un=rn("splice"),qn=Ne("splice",{ACCESSORS:!0,0:0,1:2}),Dn=Math.max,Zn=Math.min,Wn=9007199254740991,Kn="Maximum allowed length exceeded";Ot({target:"Array",proto:!0,forced:!Un||!qn},{splice:function(t,e){var n,r,i,a,o,l,s=cn(this),u=st(s.length),c=pt(t,u),p=arguments.length;if(0===p?n=r=0:1===p?(n=0,r=u-c):(n=p-2,r=Zn(Dn(ot(e),0),u-c)),u+n-r>Wn)throw TypeError(Kn);for(i=Cn(s,r),a=0;a<r;a++)(o=c+a)in s&&Ve(i,a,s[o]);if(i.length=r,n<r){for(a=c;a<u-r;a++)l=a+n,(o=a+r)in s?s[l]=s[o]:delete s[l];for(a=u;a>u-r+n;a--)delete s[a-1]}else if(n>r)for(a=u-r;a>c;a--)l=a+n-1,(o=a+r-1)in s?s[l]=s[o]:delete s[l];for(a=0;a<n;a++)s[a+c]=arguments[a+2];return s.length=u-r+n,i}});var Fn=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return E(n),function(t){if(!m(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(r),e?t.call(n,r):n.__proto__=r,n}}():void 0),Jn=Jt("species"),Hn=z.f,Bn=yt.f,Yn=Q.set,Vn=Jt("match"),Xn=r.RegExp,Gn=Xn.prototype,Qn=/a/g,tr=/a/g,er=new Xn(Qn)!==Qn,nr=Ct.UNSUPPORTED_Y;if(a&&zt("RegExp",!er||nr||i((function(){return tr[Vn]=!1,Xn(Qn)!=Qn||Xn(tr)==tr||"/a/i"!=Xn(Qn,"i")})))){for(var rr=function(t,e){var n,r=this instanceof rr,i=dn(t),a=void 0===e;if(!r&&i&&t.constructor===rr&&a)return t;er?i&&!a&&(t=t.source):t instanceof rr&&(a&&(e=It.call(t)),t=t.source),nr&&(n=!!e&&e.indexOf("y")>-1)&&(e=e.replace(/y/g,""));var o,l,s,u,c,p=(o=er?new Xn(t,e):Xn(t,e),l=r?this:Gn,s=rr,Fn&&"function"==typeof(u=l.constructor)&&u!==s&&m(c=u.prototype)&&c!==s.prototype&&Fn(o,c),o);return nr&&n&&Yn(p,{sticky:n}),p},ir=function(t){t in rr||Hn(rr,t,{configurable:!0,get:function(){return Xn[t]},set:function(e){Xn[t]=e}})},ar=Bn(Xn),or=0;ar.length>or;)ir(ar[or++]);Gn.constructor=rr,rr.prototype=Gn,tt(r,"RegExp",rr)}!function(t){var e=rt(t),n=z.f;a&&e&&!e[Jn]&&n(e,Jn,{configurable:!0,get:function(){return this}})}("RegExp");var lr,sr=T.f,ur="".endsWith,cr=Math.min,pr=gn("endsWith");Ot({target:"String",proto:!0,forced:!!(pr||(lr=sr(String.prototype,"endsWith"),!lr||lr.writable))&&!pr},{endsWith:function(t){var e=String(h(this));fn(t);var n=arguments.length>1?arguments[1]:void 0,r=st(e.length),i=void 0===n?r:cr(st(n),r),a=String(t);return ur?ur.call(e,a,i):e.slice(i-a.length,i)===a}});var dr=Jt("species"),fr=[].push,hr=Math.min,gr=4294967295,mr=!i((function(){return!RegExp(gr,"y")}));Qt("split",2,(function(t,e,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var r=String(h(this)),i=void 0===n?gr:n>>>0;if(0===i)return[];if(void 0===t)return[r];if(!dn(t))return e.call(r,t,i);for(var a,o,l,s=[],u=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),c=0,p=new RegExp(t.source,u+"g");(a=qt.call(p,r))&&!((o=p.lastIndex)>c&&(s.push(r.slice(c,a.index)),a.length>1&&a.index<r.length&&fr.apply(s,a.slice(1)),l=a[0].length,c=o,s.length>=i));)p.lastIndex===a.index&&p.lastIndex++;return c===r.length?!l&&p.test("")||s.push(""):s.push(r.slice(c)),s.length>i?s.slice(0,i):s}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var i=h(this),a=null==e?void 0:e[t];return void 0!==a?a.call(e,i,n):r.call(String(i),e,n)},function(t,i){var a=n(r,t,this,i,r!==e);if(a.done)return a.value;var o=E(t),l=String(this),s=function(t,e){var n,r=E(t).constructor;return void 0===r||null==(n=E(r)[dr])?e:In(n)}(o,RegExp),u=o.unicode,c=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(mr?"y":"g"),p=new s(mr?o:"^(?:"+o.source+")",c),d=void 0===i?gr:i>>>0;if(0===d)return[];if(0===l.length)return null===re(p,l)?[l]:[];for(var f=0,h=0,g=[];h<l.length;){p.lastIndex=mr?h:0;var m,v=re(p,mr?l:l.slice(h));if(null===v||(m=hr(st(p.lastIndex+(mr?0:h)),l.length))===f)h=ne(l,h,u);else{if(g.push(l.slice(f,h)),g.length===d)return g;for(var y=1;y<=v.length-1;y++)if(g.push(v[y]),g.length===d)return g;h=f=m}}return g.push(l.slice(f)),g}]}),!mr);var vr=T.f,yr="".startsWith,kr=Math.min,br=gn("startsWith");Ot({target:"String",proto:!0,forced:!(!br&&!!function(){var t=vr(String.prototype,"startsWith");return t&&!t.writable}())&&!br},{startsWith:function(t){var e=String(h(this));fn(t);var n=st(kr(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return yr?yr.call(e,r,n):e.slice(n,n+r.length)===r}});var xr="\t\n\v\f\r \u2028\u2029\ufeff",wr="["+xr+"]",Sr=RegExp("^"+wr+wr+"*"),_r=RegExp(wr+wr+"*$"),Tr=function(t){return function(e){var n=String(h(e));return 1&t&&(n=n.replace(Sr,"")),2&t&&(n=n.replace(_r,"")),n}},Er={start:Tr(1),end:Tr(2),trim:Tr(3)},Ar=function(t){return i((function(){return!!xr[t]()||"​…᠎"!="​…᠎"[t]()||xr[t].name!==t}))},zr=Er.trim;Ot({target:"String",proto:!0,forced:Ar("trim")},{trim:function(){return zr(this)}});var Rr=Er.end,Or=Ar("trimEnd"),Ir=Or?function(){return Rr(this)}:"".trimEnd;Ot({target:"String",proto:!0,forced:Or},{trimEnd:Ir,trimRight:Ir});var $r=e((function(t){function e(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}t.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:e,changeDefaults:function(e){t.exports.defaults=e}}})),Cr=/[&<>"']/,Pr=/[&<>"']/g,Lr=/[<>"']|&(?!#?\w+;)/,jr=/[<>"']|&(?!#?\w+;)/g,Mr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Nr=function(t){return Mr[t]};var Ur=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function qr(t){return t.replace(Ur,(function(t,e){return"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""}))}var Dr=/(^|[^\[])\^/g;var Zr=/[^\w:]/g,Wr=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;var Kr={},Fr=/^[^:]+:\/*[^/]*$/,Jr=/^([^:]+:)[\s\S]*$/,Hr=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Br(t,e){Kr[" "+t]||(Fr.test(t)?Kr[" "+t]=t+"/":Kr[" "+t]=Yr(t,"/",!0));var n=-1===(t=Kr[" "+t]).indexOf(":");return"//"===e.substring(0,2)?n?e:t.replace(Jr,"$1")+e:"/"===e.charAt(0)?n?e:t.replace(Hr,"$1")+e:t+e}function Yr(t,e,n){var r=t.length;if(0===r)return"";for(var i=0;i<r;){var a=t.charAt(r-i-1);if(a!==e||n){if(a===e||!n)break;i++}else i++}return t.substr(0,r-i)}var Vr=function(t,e){if(e){if(Cr.test(t))return t.replace(Pr,Nr)}else if(Lr.test(t))return t.replace(jr,Nr);return t},Xr=qr,Gr=function(t,e){t=t.source||t,e=e||"";var n={replace:function(e,r){return r=(r=r.source||r).replace(Dr,"$1"),t=t.replace(e,r),n},getRegex:function(){return new RegExp(t,e)}};return n},Qr=function(t,e,n){if(t){var r;try{r=decodeURIComponent(qr(n)).replace(Zr,"").toLowerCase()}catch(t){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}e&&!Wr.test(n)&&(n=Br(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(t){return null}return n},ti={exec:function(){}},ei=function(t){for(var e,n,r=1;r<arguments.length;r++)for(n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},ni=function(t,e){var n=t.replace(/\|/g,(function(t,e,n){for(var r=!1,i=e;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n},ri=Yr,ii=function(t,e){if(-1===t.indexOf(e[1]))return-1;for(var n=t.length,r=0,i=0;i<n;i++)if("\\"===t[i])i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&--r<0)return i;return-1},ai=function(t){t&&t.sanitize&&!t.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")},oi=function(t,e){if(e<1)return"";for(var n="";e>1;)1&e&&(n+=t),e>>=1,t+=t;return n+t},li=$r.defaults,si=ri,ui=ni,ci=Vr,pi=ii;function di(t,e,n){var r=e.href,i=e.title?ci(e.title):null,a=t[1].replace(/\\([\[\]])/g,"$1");return"!"!==t[0].charAt(0)?{type:"link",raw:n,href:r,title:i,text:a}:{type:"image",raw:n,href:r,title:i,text:ci(a)}}var fi=function(){function t(e){me(this,t),this.options=e||li}return ye(t,[{key:"space",value:function(t){var e=this.rules.block.newline.exec(t);if(e)return e[0].length>1?{type:"space",raw:e[0]}:{raw:"\n"}}},{key:"code",value:function(t,e){var n=this.rules.block.code.exec(t);if(n){var r=e[e.length-1];if(r&&"paragraph"===r.type)return{raw:n[0],text:n[0].trimRight()};var i=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:si(i,"\n")}}}},{key:"fences",value:function(t){var e=this.rules.block.fences.exec(t);if(e){var n=e[0],r=function(t,e){var n=t.match(/^(\s+)(?:```)/);if(null===n)return e;var r=n[1];return e.split("\n").map((function(t){var e=t.match(/^\s+/);return null===e?t:ke(e,1)[0].length>=r.length?t.slice(r.length):t})).join("\n")}(n,e[3]||"");return{type:"code",raw:n,lang:e[2]?e[2].trim():e[2],text:r}}}},{key:"heading",value:function(t){var e=this.rules.block.heading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[1].length,text:e[2]}}},{key:"nptable",value:function(t){var e=this.rules.block.nptable.exec(t);if(e){var n={type:"table",header:ui(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[],raw:e[0]};if(n.header.length===n.align.length){var r,i=n.align.length;for(r=0;r<i;r++)/^ *-+: *$/.test(n.align[r])?n.align[r]="right":/^ *:-+: *$/.test(n.align[r])?n.align[r]="center":/^ *:-+ *$/.test(n.align[r])?n.align[r]="left":n.align[r]=null;for(i=n.cells.length,r=0;r<i;r++)n.cells[r]=ui(n.cells[r],n.header.length);return n}}}},{key:"hr",value:function(t){var e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:e[0]}}},{key:"blockquote",value:function(t){var e=this.rules.block.blockquote.exec(t);if(e){var n=e[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:e[0],text:n}}}},{key:"list",value:function(t){var e=this.rules.block.list.exec(t);if(e){var n,r,i,a,o,l,s,u,c=e[0],p=e[2],d=p.length>1,f={type:"list",raw:c,ordered:d,start:d?+p.slice(0,-1):"",loose:!1,items:[]},h=e[0].match(this.rules.block.item),g=!1,m=h.length;i=this.rules.block.listItemStart.exec(h[0]);for(var v=0;v<m;v++){if(c=n=h[v],v!==m-1){if((a=this.rules.block.listItemStart.exec(h[v+1]))[1].length>i[0].length||a[1].length>3){h.splice(v,2,h[v]+"\n"+h[v+1]),v--,m--;continue}(!this.options.pedantic||this.options.smartLists?a[2][a[2].length-1]!==p[p.length-1]:d===(1===a[2].length))&&(o=h.slice(v+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-o.length),v=m-1),i=a}r=n.length,~(n=n.replace(/^ *([*+-]|\d+[.)]) ?/,"")).indexOf("\n ")&&(r-=n.length,n=this.options.pedantic?n.replace(/^ {1,4}/gm,""):n.replace(new RegExp("^ {1,"+r+"}","gm"),"")),l=g||/\n\n(?!\s*$)/.test(n),v!==m-1&&(g="\n"===n.charAt(n.length-1),l||(l=g)),l&&(f.loose=!0),u=void 0,(s=/^\[[ xX]\] /.test(n))&&(u=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:c,task:s,checked:u,loose:l,text:n})}return f}}},{key:"html",value:function(t){var e=this.rules.block.html.exec(t);if(e)return{type:this.options.sanitize?"paragraph":"html",raw:e[0],pre:!this.options.sanitizer&&("pre"===e[1]||"script"===e[1]||"style"===e[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):ci(e[0]):e[0]}}},{key:"def",value:function(t){var e=this.rules.block.def.exec(t);if(e)return e[3]&&(e[3]=e[3].substring(1,e[3].length-1)),{tag:e[1].toLowerCase().replace(/\s+/g," "),raw:e[0],href:e[2],title:e[3]}}},{key:"table",value:function(t){var e=this.rules.block.table.exec(t);if(e){var n={type:"table",header:ui(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=e[0];var r,i=n.align.length;for(r=0;r<i;r++)/^ *-+: *$/.test(n.align[r])?n.align[r]="right":/^ *:-+: *$/.test(n.align[r])?n.align[r]="center":/^ *:-+ *$/.test(n.align[r])?n.align[r]="left":n.align[r]=null;for(i=n.cells.length,r=0;r<i;r++)n.cells[r]=ui(n.cells[r].replace(/^ *\| *| *\| *$/g,""),n.header.length);return n}}}},{key:"lheading",value:function(t){var e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1]}}},{key:"paragraph",value:function(t){var e=this.rules.block.paragraph.exec(t);if(e)return{type:"paragraph",raw:e[0],text:"\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1]}}},{key:"text",value:function(t,e){var n=this.rules.block.text.exec(t);if(n){var r=e[e.length-1];return r&&"text"===r.type?{raw:n[0],text:n[0]}:{type:"text",raw:n[0],text:n[0]}}}},{key:"escape",value:function(t){var e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:ci(e[1])}}},{key:"tag",value:function(t,e,n){var r=this.rules.inline.tag.exec(t);if(r)return!e&&/^<a /i.test(r[0])?e=!0:e&&/^<\/a>/i.test(r[0])&&(e=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:e,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):ci(r[0]):r[0]}}},{key:"link",value:function(t){var e=this.rules.inline.link.exec(t);if(e){var n=pi(e[2],"()");if(n>-1){var r=(0===e[0].indexOf("!")?5:4)+e[1].length+n;e[2]=e[2].substring(0,n),e[0]=e[0].substring(0,r).trim(),e[3]=""}var i=e[2],a="";if(this.options.pedantic){var o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);o?(i=o[1],a=o[3]):a=""}else a=e[3]?e[3].slice(1,-1):"";return di(e,{href:(i=i.trim().replace(/^<([\s\S]*)>$/,"$1"))?i.replace(this.rules.inline._escapes,"$1"):i,title:a?a.replace(this.rules.inline._escapes,"$1"):a},e[0])}}},{key:"reflink",value:function(t,e){var n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=e[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return di(n,r,n[0])}}},{key:"strong",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.strong.start.exec(t);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){e=e.slice(-1*t.length);var i,a="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(a.lastIndex=0;null!=(r=a.exec(e));)if(i=this.rules.inline.strong.middle.exec(e.slice(0,r.index+3)))return{type:"strong",raw:t.slice(0,i[0].length),text:t.slice(2,i[0].length-2)}}}},{key:"em",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.em.start.exec(t);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){e=e.slice(-1*t.length);var i,a="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(a.lastIndex=0;null!=(r=a.exec(e));)if(i=this.rules.inline.em.middle.exec(e.slice(0,r.index+2)))return{type:"em",raw:t.slice(0,i[0].length),text:t.slice(1,i[0].length-1)}}}},{key:"codespan",value:function(t){var e=this.rules.inline.code.exec(t);if(e){var n=e[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=n.startsWith(" ")&&n.endsWith(" ");return r&&i&&(n=n.substring(1,n.length-1)),n=ci(n,!0),{type:"codespan",raw:e[0],text:n}}}},{key:"br",value:function(t){var e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}},{key:"del",value:function(t){var e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[1]}}},{key:"autolink",value:function(t,e){var n,r,i=this.rules.inline.autolink.exec(t);if(i)return r="@"===i[2]?"mailto:"+(n=ci(this.options.mangle?e(i[1]):i[1])):n=ci(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}},{key:"url",value:function(t,e){var n;if(n=this.rules.inline.url.exec(t)){var r,i;if("@"===n[2])i="mailto:"+(r=ci(this.options.mangle?e(n[0]):n[0]));else{var a;do{a=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(a!==n[0]);r=ci(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}},{key:"inlineText",value:function(t,e,n){var r,i=this.rules.inline.text.exec(t);if(i)return r=e?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):ci(i[0]):i[0]:ci(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}}}]),t}(),hi=ti,gi=Gr,mi=ei,vi={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:hi,table:hi,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};vi.def=gi(vi.def).replace("label",vi._label).replace("title",vi._title).getRegex(),vi.bullet=/(?:[*+-]|\d{1,9}[.)])/,vi.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,vi.item=gi(vi.item,"gm").replace(/bull/g,vi.bullet).getRegex(),vi.listItemStart=gi(/^( *)(bull)/).replace("bull",vi.bullet).getRegex(),vi.list=gi(vi.list).replace(/bull/g,vi.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+vi.def.source+")").getRegex(),vi._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",vi._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,vi.html=gi(vi.html,"i").replace("comment",vi._comment).replace("tag",vi._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),vi.paragraph=gi(vi._paragraph).replace("hr",vi.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",vi._tag).getRegex(),vi.blockquote=gi(vi.blockquote).replace("paragraph",vi.paragraph).getRegex(),vi.normal=mi({},vi),vi.gfm=mi({},vi.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),vi.gfm.nptable=gi(vi.gfm.nptable).replace("hr",vi.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",vi._tag).getRegex(),vi.gfm.table=gi(vi.gfm.table).replace("hr",vi.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",vi._tag).getRegex(),vi.pedantic=mi({},vi.normal,{html:gi("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",vi._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:hi,paragraph:gi(vi.normal._paragraph).replace("hr",vi.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",vi.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var yi={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:hi,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation*\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation*\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:hi,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\s*punctuation])/,_punctuation:"!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~"};yi.punctuation=gi(yi.punctuation).replace(/punctuation/g,yi._punctuation).getRegex(),yi._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",yi._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",yi._comment=gi(vi._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),yi.em.start=gi(yi.em.start).replace(/punctuation/g,yi._punctuation).getRegex(),yi.em.middle=gi(yi.em.middle).replace(/punctuation/g,yi._punctuation).replace(/overlapSkip/g,yi._overlapSkip).getRegex(),yi.em.endAst=gi(yi.em.endAst,"g").replace(/punctuation/g,yi._punctuation).getRegex(),yi.em.endUnd=gi(yi.em.endUnd,"g").replace(/punctuation/g,yi._punctuation).getRegex(),yi.strong.start=gi(yi.strong.start).replace(/punctuation/g,yi._punctuation).getRegex(),yi.strong.middle=gi(yi.strong.middle).replace(/punctuation/g,yi._punctuation).replace(/overlapSkip/g,yi._overlapSkip).getRegex(),yi.strong.endAst=gi(yi.strong.endAst,"g").replace(/punctuation/g,yi._punctuation).getRegex(),yi.strong.endUnd=gi(yi.strong.endUnd,"g").replace(/punctuation/g,yi._punctuation).getRegex(),yi.blockSkip=gi(yi._blockSkip,"g").getRegex(),yi.overlapSkip=gi(yi._overlapSkip,"g").getRegex(),yi._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,yi._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,yi._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,yi.autolink=gi(yi.autolink).replace("scheme",yi._scheme).replace("email",yi._email).getRegex(),yi._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,yi.tag=gi(yi.tag).replace("comment",yi._comment).replace("attribute",yi._attribute).getRegex(),yi._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,yi._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,yi._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,yi.link=gi(yi.link).replace("label",yi._label).replace("href",yi._href).replace("title",yi._title).getRegex(),yi.reflink=gi(yi.reflink).replace("label",yi._label).getRegex(),yi.reflinkSearch=gi(yi.reflinkSearch,"g").replace("reflink",yi.reflink).replace("nolink",yi.nolink).getRegex(),yi.normal=mi({},yi),yi.pedantic=mi({},yi.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:gi(/^!?\[(label)\]\((.*?)\)/).replace("label",yi._label).getRegex(),reflink:gi(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",yi._label).getRegex()}),yi.gfm=mi({},yi.normal,{escape:gi(yi.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),yi.gfm.url=gi(yi.gfm.url,"i").replace("email",yi.gfm._extended_email).getRegex(),yi.breaks=mi({},yi.gfm,{br:gi(yi.br).replace("{2,}","*").getRegex(),text:gi(yi.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var ki={block:vi,inline:yi},bi=$r.defaults,xi=ki.block,wi=ki.inline,Si=oi;function _i(t){return t.replace(/---/g,"").replace(/--/g,"").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"").replace(/\.{3}/g,"")}function Ti(t){var e,n,r="",i=t.length;for(e=0;e<i;e++)n=t.charCodeAt(e),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var Ei=function(){function t(e){me(this,t),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||bi,this.options.tokenizer=this.options.tokenizer||new fi,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var n={block:xi.normal,inline:wi.normal};this.options.pedantic?(n.block=xi.pedantic,n.inline=wi.pedantic):this.options.gfm&&(n.block=xi.gfm,this.options.breaks?n.inline=wi.breaks:n.inline=wi.gfm),this.tokenizer.rules=n}return ye(t,[{key:"lex",value:function(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(t,this.tokens,!0),this.inline(this.tokens),this.tokens}},{key:"blockTokens",value:function(t){var e,n,r,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];for(t=t.replace(/^ +$/gm,"");t;)if(e=this.tokenizer.space(t))t=t.substring(e.raw.length),e.type&&a.push(e);else if(e=this.tokenizer.code(t,a))t=t.substring(e.raw.length),e.type?a.push(e):((i=a[a.length-1]).raw+="\n"+e.raw,i.text+="\n"+e.text);else if(e=this.tokenizer.fences(t))t=t.substring(e.raw.length),a.push(e);else if(e=this.tokenizer.heading(t))t=t.substring(e.raw.length),a.push(e);else if(e=this.tokenizer.nptable(t))t=t.substring(e.raw.length),a.push(e);else if(e=this.tokenizer.hr(t))t=t.substring(e.raw.length),a.push(e);else if(e=this.tokenizer.blockquote(t))t=t.substring(e.raw.length),e.tokens=this.blockTokens(e.text,[],o),a.push(e);else if(e=this.tokenizer.list(t)){for(t=t.substring(e.raw.length),r=e.items.length,n=0;n<r;n++)e.items[n].tokens=this.blockTokens(e.items[n].text,[],!1);a.push(e)}else if(e=this.tokenizer.html(t))t=t.substring(e.raw.length),a.push(e);else if(o&&(e=this.tokenizer.def(t)))t=t.substring(e.raw.length),this.tokens.links[e.tag]||(this.tokens.links[e.tag]={href:e.href,title:e.title});else if(e=this.tokenizer.table(t))t=t.substring(e.raw.length),a.push(e);else if(e=this.tokenizer.lheading(t))t=t.substring(e.raw.length),a.push(e);else if(o&&(e=this.tokenizer.paragraph(t)))t=t.substring(e.raw.length),a.push(e);else if(e=this.tokenizer.text(t,a))t=t.substring(e.raw.length),e.type?a.push(e):((i=a[a.length-1]).raw+="\n"+e.raw,i.text+="\n"+e.text);else if(t){var l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}throw new Error(l)}return a}},{key:"inline",value:function(t){var e,n,r,i,a,o,l=t.length;for(e=0;e<l;e++)switch((o=t[e]).type){case"paragraph":case"text":case"heading":o.tokens=[],this.inlineTokens(o.text,o.tokens);break;case"table":for(o.tokens={header:[],cells:[]},i=o.header.length,n=0;n<i;n++)o.tokens.header[n]=[],this.inlineTokens(o.header[n],o.tokens.header[n]);for(i=o.cells.length,n=0;n<i;n++)for(a=o.cells[n],o.tokens.cells[n]=[],r=0;r<a.length;r++)o.tokens.cells[n][r]=[],this.inlineTokens(a[r],o.tokens.cells[n][r]);break;case"blockquote":this.inline(o.tokens);break;case"list":for(i=o.items.length,n=0;n<i;n++)this.inline(o.items[n].tokens)}return t}},{key:"inlineTokens",value:function(t){var e,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",l=t;if(this.tokens.links){var s=Object.keys(this.tokens.links);if(s.length>0)for(;null!=(n=this.tokenizer.rules.inline.reflinkSearch.exec(l));)s.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,n.index)+"["+Si("a",n[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(n=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,n.index)+"["+Si("a",n[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;t;)if(e=this.tokenizer.escape(t))t=t.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.tag(t,i,a))t=t.substring(e.raw.length),i=e.inLink,a=e.inRawBlock,r.push(e);else if(e=this.tokenizer.link(t))t=t.substring(e.raw.length),"link"===e.type&&(e.tokens=this.inlineTokens(e.text,[],!0,a)),r.push(e);else if(e=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(e.raw.length),"link"===e.type&&(e.tokens=this.inlineTokens(e.text,[],!0,a)),r.push(e);else if(e=this.tokenizer.strong(t,l,o))t=t.substring(e.raw.length),e.tokens=this.inlineTokens(e.text,[],i,a),r.push(e);else if(e=this.tokenizer.em(t,l,o))t=t.substring(e.raw.length),e.tokens=this.inlineTokens(e.text,[],i,a),r.push(e);else if(e=this.tokenizer.codespan(t))t=t.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.br(t))t=t.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.del(t))t=t.substring(e.raw.length),e.tokens=this.inlineTokens(e.text,[],i,a),r.push(e);else if(e=this.tokenizer.autolink(t,Ti))t=t.substring(e.raw.length),r.push(e);else if(i||!(e=this.tokenizer.url(t,Ti))){if(e=this.tokenizer.inlineText(t,a,_i))t=t.substring(e.raw.length),o=e.raw.slice(-1),r.push(e);else if(t){var u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}throw new Error(u)}}else t=t.substring(e.raw.length),r.push(e);return r}}],[{key:"lex",value:function(e,n){return new t(n).lex(e)}},{key:"lexInline",value:function(e,n){return new t(n).inlineTokens(e)}},{key:"rules",get:function(){return{block:xi,inline:wi}}}]),t}(),Ai=$r.defaults,zi=Qr,Ri=Vr,Oi=function(){function t(e){me(this,t),this.options=e||Ai}return ye(t,[{key:"code",value:function(t,e,n){var r=(e||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(t,r);null!=i&&i!==t&&(n=!0,t=i)}return r?'<pre><code class="'+this.options.langPrefix+Ri(r,!0)+'">'+(n?t:Ri(t,!0))+"</code></pre>\n":"<pre><code>"+(n?t:Ri(t,!0))+"</code></pre>\n"}},{key:"blockquote",value:function(t){return"<blockquote>\n"+t+"</blockquote>\n"}},{key:"html",value:function(t){return t}},{key:"heading",value:function(t,e,n,r){return this.options.headerIds?"<h"+e+' id="'+this.options.headerPrefix+r.slug(n)+'">'+t+"</h"+e+">\n":"<h"+e+">"+t+"</h"+e+">\n"}},{key:"hr",value:function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}},{key:"list",value:function(t,e,n){var r=e?"ol":"ul";return"<"+r+(e&&1!==n?' start="'+n+'"':"")+">\n"+t+"</"+r+">\n"}},{key:"listitem",value:function(t){return"<li>"+t+"</li>\n"}},{key:"checkbox",value:function(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}},{key:"paragraph",value:function(t){return"<p>"+t+"</p>\n"}},{key:"table",value:function(t,e){return e&&(e="<tbody>"+e+"</tbody>"),"<table>\n<thead>\n"+t+"</thead>\n"+e+"</table>\n"}},{key:"tablerow",value:function(t){return"<tr>\n"+t+"</tr>\n"}},{key:"tablecell",value:function(t,e){var n=e.header?"th":"td";return(e.align?"<"+n+' align="'+e.align+'">':"<"+n+">")+t+"</"+n+">\n"}},{key:"strong",value:function(t){return"<strong>"+t+"</strong>"}},{key:"em",value:function(t){return"<em>"+t+"</em>"}},{key:"codespan",value:function(t){return"<code>"+t+"</code>"}},{key:"br",value:function(){return this.options.xhtml?"<br/>":"<br>"}},{key:"del",value:function(t){return"<del>"+t+"</del>"}},{key:"link",value:function(t,e,n){if(null===(t=zi(this.options.sanitize,this.options.baseUrl,t)))return n;var r='<a href="'+Ri(t)+'"';return e&&(r+=' title="'+e+'"'),r+=">"+n+"</a>"}},{key:"image",value:function(t,e,n){if(null===(t=zi(this.options.sanitize,this.options.baseUrl,t)))return n;var r='<img src="'+t+'" alt="'+n+'"';return e&&(r+=' title="'+e+'"'),r+=this.options.xhtml?"/>":">"}},{key:"text",value:function(t){return t}}]),t}(),Ii=function(){function t(){me(this,t)}return ye(t,[{key:"strong",value:function(t){return t}},{key:"em",value:function(t){return t}},{key:"codespan",value:function(t){return t}},{key:"del",value:function(t){return t}},{key:"html",value:function(t){return t}},{key:"text",value:function(t){return t}},{key:"link",value:function(t,e,n){return""+n}},{key:"image",value:function(t,e,n){return""+n}},{key:"br",value:function(){return""}}]),t}(),$i=function(){function t(){me(this,t),this.seen={}}return ye(t,[{key:"serialize",value:function(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}},{key:"getNextSafeSlug",value:function(t,e){var n=t,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[t];do{n=t+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return e||(this.seen[t]=r,this.seen[n]=0),n}},{key:"slug",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serialize(t);return this.getNextSafeSlug(n,e.dryrun)}}]),t}(),Ci=$r.defaults,Pi=Xr,Li=function(){function t(e){me(this,t),this.options=e||Ci,this.options.renderer=this.options.renderer||new Oi,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ii,this.slugger=new $i}return ye(t,[{key:"parse",value:function(t){var e,n,r,i,a,o,l,s,u,c,p,d,f,h,g,m,v,y,k=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],b="",x=t.length;for(e=0;e<x;e++)switch((c=t[e]).type){case"space":continue;case"hr":b+=this.renderer.hr();continue;case"heading":b+=this.renderer.heading(this.parseInline(c.tokens),c.depth,Pi(this.parseInline(c.tokens,this.textRenderer)),this.slugger);continue;case"code":b+=this.renderer.code(c.text,c.lang,c.escaped);continue;case"table":for(s="",l="",i=c.header.length,n=0;n<i;n++)l+=this.renderer.tablecell(this.parseInline(c.tokens.header[n]),{header:!0,align:c.align[n]});for(s+=this.renderer.tablerow(l),u="",i=c.cells.length,n=0;n<i;n++){for(l="",a=(o=c.tokens.cells[n]).length,r=0;r<a;r++)l+=this.renderer.tablecell(this.parseInline(o[r]),{header:!1,align:c.align[r]});u+=this.renderer.tablerow(l)}b+=this.renderer.table(s,u);continue;case"blockquote":u=this.parse(c.tokens),b+=this.renderer.blockquote(u);continue;case"list":for(p=c.ordered,d=c.start,f=c.loose,i=c.items.length,u="",n=0;n<i;n++)m=(g=c.items[n]).checked,v=g.task,h="",g.task&&(y=this.renderer.checkbox(m),f?g.tokens.length>0&&"text"===g.tokens[0].type?(g.tokens[0].text=y+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=y+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:y}):h+=y),h+=this.parse(g.tokens,f),u+=this.renderer.listitem(h,v,m);b+=this.renderer.list(u,p,d);continue;case"html":b+=this.renderer.html(c.text);continue;case"paragraph":b+=this.renderer.paragraph(this.parseInline(c.tokens));continue;case"text":for(u=c.tokens?this.parseInline(c.tokens):c.text;e+1<x&&"text"===t[e+1].type;)u+="\n"+((c=t[++e]).tokens?this.parseInline(c.tokens):c.text);b+=k?this.renderer.paragraph(u):u;continue;default:var w='Token with "'+c.type+'" type was not found.';if(this.options.silent)return void console.error(w);throw new Error(w)}return b}},{key:"parseInline",value:function(t,e){e=e||this.renderer;var n,r,i="",a=t.length;for(n=0;n<a;n++)switch((r=t[n]).type){case"escape":i+=e.text(r.text);break;case"html":i+=e.html(r.text);break;case"link":i+=e.link(r.href,r.title,this.parseInline(r.tokens,e));break;case"image":i+=e.image(r.href,r.title,r.text);break;case"strong":i+=e.strong(this.parseInline(r.tokens,e));break;case"em":i+=e.em(this.parseInline(r.tokens,e));break;case"codespan":i+=e.codespan(r.text);break;case"br":i+=e.br();break;case"del":i+=e.del(this.parseInline(r.tokens,e));break;case"text":i+=e.text(r.text);break;default:var o='Token with "'+r.type+'" type was not found.';if(this.options.silent)return void console.error(o);throw new Error(o)}return i}}],[{key:"parse",value:function(e,n){return new t(n).parse(e)}},{key:"parseInline",value:function(e,n){return new t(n).parseInline(e)}}]),t}(),ji=ei,Mi=ai,Ni=Vr,Ui=$r.getDefaults,qi=$r.changeDefaults,Di=$r.defaults;function Zi(t,e,n){if(null==t)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof t)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected");if("function"==typeof e&&(n=e,e=null),e=ji({},Zi.defaults,e||{}),Mi(e),n){var r,i=e.highlight;try{r=Ei.lex(t,e)}catch(t){return n(t)}var a=function(t){var a;if(!t)try{a=Li.parse(r,e)}catch(e){t=e}return e.highlight=i,t?n(t):n(null,a)};if(!i||i.length<3)return a();if(delete e.highlight,!r.length)return a();var o=0;return Zi.walkTokens(r,(function(t){"code"===t.type&&(o++,setTimeout((function(){i(t.text,t.lang,(function(e,n){if(e)return a(e);null!=n&&n!==t.text&&(t.text=n,t.escaped=!0),0===--o&&a()}))}),0))})),void(0===o&&a())}try{var l=Ei.lex(t,e);return e.walkTokens&&Zi.walkTokens(l,e.walkTokens),Li.parse(l,e)}catch(t){if(t.message+="\nPlease report this to https://github.com/markedjs/marked.",e.silent)return"<p>An error occurred:</p><pre>"+Ni(t.message+"",!0)+"</pre>";throw t}}Zi.options=Zi.setOptions=function(t){return ji(Zi.defaults,t),qi(Zi.defaults),Zi},Zi.getDefaults=Ui,Zi.defaults=Di,Zi.use=function(t){var e=ji({},t);if(t.renderer&&function(){var n=Zi.defaults.renderer||new Oi,r=function(e){var r=n[e];n[e]=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var l=t.renderer[e].apply(n,a);return!1===l&&(l=r.apply(n,a)),l}};for(var i in t.renderer)r(i);e.renderer=n}(),t.tokenizer&&function(){var n=Zi.defaults.tokenizer||new fi,r=function(e){var r=n[e];n[e]=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var l=t.tokenizer[e].apply(n,a);return!1===l&&(l=r.apply(n,a)),l}};for(var i in t.tokenizer)r(i);e.tokenizer=n}(),t.walkTokens){var n=Zi.defaults.walkTokens;e.walkTokens=function(e){t.walkTokens(e),n&&n(e)}}Zi.setOptions(e)},Zi.walkTokens=function(t,e){var n,r=we(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;switch(e(i),i.type){case"table":var a,o=we(i.tokens.header);try{for(o.s();!(a=o.n()).done;){var l=a.value;Zi.walkTokens(l,e)}}catch(t){o.e(t)}finally{o.f()}var s,u=we(i.tokens.cells);try{for(u.s();!(s=u.n()).done;){var c,p=we(s.value);try{for(p.s();!(c=p.n()).done;){var d=c.value;Zi.walkTokens(d,e)}}catch(t){p.e(t)}finally{p.f()}}}catch(t){u.e(t)}finally{u.f()}break;case"list":Zi.walkTokens(i.items,e);break;default:i.tokens&&Zi.walkTokens(i.tokens,e)}}}catch(t){r.e(t)}finally{r.f()}},Zi.parseInline=function(t,e){if(null==t)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof t)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected");e=ji({},Zi.defaults,e||{}),Mi(e);try{var n=Ei.lexInline(t,e);return e.walkTokens&&Zi.walkTokens(n,e.walkTokens),Li.parseInline(n,e)}catch(t){if(t.message+="\nPlease report this to https://github.com/markedjs/marked.",e.silent)return"<p>An error occurred:</p><pre>"+Ni(t.message+"",!0)+"</pre>";throw t}},Zi.Parser=Li,Zi.parser=Li.parse,Zi.Renderer=Oi,Zi.TextRenderer=Ii,Zi.Lexer=Ei,Zi.lexer=Ei.lex,Zi.Tokenizer=fi,Zi.Slugger=$i,Zi.parse=Zi;var Wi=Zi;return function(){var t,e=null;function n(){var n;!e||e.closed?((e=window.open("about:blank","reveal.js - Notes","width=1100,height=700")).marked=Wi,e.document.write("<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\n\t\t<title>reveal.js - Speaker View</title>\n\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tfont-family: Helvetica;\n\t\t\t\tfont-size: 18px;\n\t\t\t}\n\n\t\t\t#current-slide,\n\t\t\t#upcoming-slide,\n\t\t\t#speaker-controls {\n\t\t\t\tpadding: 6px;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\t-moz-box-sizing: border-box;\n\t\t\t}\n\n\t\t\t#current-slide iframe,\n\t\t\t#upcoming-slide iframe {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tborder: 1px solid #ddd;\n\t\t\t}\n\n\t\t\t#current-slide .label,\n\t\t\t#upcoming-slide .label {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 10px;\n\t\t\t\tleft: 10px;\n\t\t\t\tz-index: 2;\n\t\t\t}\n\n\t\t\t#connection-status {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tz-index: 20;\n\t\t\t\tpadding: 30% 20% 20% 20%;\n\t\t\t\tfont-size: 18px;\n\t\t\t\tcolor: #222;\n\t\t\t\tbackground: #fff;\n\t\t\t\ttext-align: center;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tline-height: 1.4;\n\t\t\t}\n\n\t\t\t.overlay-element {\n\t\t\t\theight: 34px;\n\t\t\t\tline-height: 34px;\n\t\t\t\tpadding: 0 10px;\n\t\t\t\ttext-shadow: none;\n\t\t\t\tbackground: rgba( 220, 220, 220, 0.8 );\n\t\t\t\tcolor: #222;\n\t\t\t\tfont-size: 14px;\n\t\t\t}\n\n\t\t\t.overlay-element.interactive:hover {\n\t\t\t\tbackground: rgba( 220, 220, 220, 1 );\n\t\t\t}\n\n\t\t\t#current-slide {\n\t\t\t\tposition: absolute;\n\t\t\t\twidth: 60%;\n\t\t\t\theight: 100%;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\tpadding-right: 0;\n\t\t\t}\n\n\t\t\t#upcoming-slide {\n\t\t\t\tposition: absolute;\n\t\t\t\twidth: 40%;\n\t\t\t\theight: 40%;\n\t\t\t\tright: 0;\n\t\t\t\ttop: 0;\n\t\t\t}\n\n\t\t\t/* Speaker controls */\n\t\t\t#speaker-controls {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 40%;\n\t\t\t\tright: 0;\n\t\t\t\twidth: 40%;\n\t\t\t\theight: 60%;\n\t\t\t\toverflow: auto;\n\t\t\t\tfont-size: 18px;\n\t\t\t}\n\n\t\t\t\t.speaker-controls-time.hidden,\n\t\t\t\t.speaker-controls-notes.hidden {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time .label,\n\t\t\t\t.speaker-controls-pace .label,\n\t\t\t\t.speaker-controls-notes .label {\n\t\t\t\t\ttext-transform: uppercase;\n\t\t\t\t\tfont-weight: normal;\n\t\t\t\t\tfont-size: 0.66em;\n\t\t\t\t\tcolor: #666;\n\t\t\t\t\tmargin: 0;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time, .speaker-controls-pace {\n\t\t\t\t\tborder-bottom: 1px solid rgba( 200, 200, 200, 0.5 );\n\t\t\t\t\tmargin-bottom: 10px;\n\t\t\t\t\tpadding: 10px 16px;\n\t\t\t\t\tpadding-bottom: 20px;\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time .reset-button {\n\t\t\t\t\topacity: 0;\n\t\t\t\t\tfloat: right;\n\t\t\t\t\tcolor: #666;\n\t\t\t\t\ttext-decoration: none;\n\t\t\t\t}\n\t\t\t\t.speaker-controls-time:hover .reset-button {\n\t\t\t\t\topacity: 1;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time .timer,\n\t\t\t\t.speaker-controls-time .clock {\n\t\t\t\t\twidth: 50%;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time .timer,\n\t\t\t\t.speaker-controls-time .clock,\n\t\t\t\t.speaker-controls-time .pacing .hours-value,\n\t\t\t\t.speaker-controls-time .pacing .minutes-value,\n\t\t\t\t.speaker-controls-time .pacing .seconds-value {\n\t\t\t\t\tfont-size: 1.9em;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time .timer {\n\t\t\t\t\tfloat: left;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time .clock {\n\t\t\t\t\tfloat: right;\n\t\t\t\t\ttext-align: right;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time span.mute {\n\t\t\t\t\topacity: 0.3;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time .pacing-title {\n\t\t\t\t\tmargin-top: 5px;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time .pacing.ahead {\n\t\t\t\t\tcolor: blue;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time .pacing.on-track {\n\t\t\t\t\tcolor: green;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-time .pacing.behind {\n\t\t\t\t\tcolor: red;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-notes {\n\t\t\t\t\tpadding: 10px 16px;\n\t\t\t\t}\n\n\t\t\t\t.speaker-controls-notes .value {\n\t\t\t\t\tmargin-top: 5px;\n\t\t\t\t\tline-height: 1.4;\n\t\t\t\t\tfont-size: 1.2em;\n\t\t\t\t}\n\n\t\t\t/* Layout selector */\n\t\t\t#speaker-layout {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 10px;\n\t\t\t\tright: 10px;\n\t\t\t\tcolor: #222;\n\t\t\t\tz-index: 10;\n\t\t\t}\n\t\t\t\t#speaker-layout select {\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\ttop: 0;\n\t\t\t\t\tleft: 0;\n\t\t\t\t\tborder: 0;\n\t\t\t\t\tbox-shadow: 0;\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\topacity: 0;\n\n\t\t\t\t\tfont-size: 1em;\n\t\t\t\t\tbackground-color: transparent;\n\n\t\t\t\t\t-moz-appearance: none;\n\t\t\t\t\t-webkit-appearance: none;\n\t\t\t\t\t-webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n\t\t\t\t}\n\n\t\t\t\t#speaker-layout select:focus {\n\t\t\t\t\toutline: none;\n\t\t\t\t\tbox-shadow: none;\n\t\t\t\t}\n\n\t\t\t.clear {\n\t\t\t\tclear: both;\n\t\t\t}\n\n\t\t\t/* Speaker layout: Wide */\n\t\t\tbody[data-speaker-layout=\"wide\"] #current-slide,\n\t\t\tbody[data-speaker-layout=\"wide\"] #upcoming-slide {\n\t\t\t\twidth: 50%;\n\t\t\t\theight: 45%;\n\t\t\t\tpadding: 6px;\n\t\t\t}\n\n\t\t\tbody[data-speaker-layout=\"wide\"] #current-slide {\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t}\n\n\t\t\tbody[data-speaker-layout=\"wide\"] #upcoming-slide {\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 50%;\n\t\t\t}\n\n\t\t\tbody[data-speaker-layout=\"wide\"] #speaker-controls {\n\t\t\t\ttop: 45%;\n\t\t\t\tleft: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 50%;\n\t\t\t\tfont-size: 1.25em;\n\t\t\t}\n\n\t\t\t/* Speaker layout: Tall */\n\t\t\tbody[data-speaker-layout=\"tall\"] #current-slide,\n\t\t\tbody[data-speaker-layout=\"tall\"] #upcoming-slide {\n\t\t\t\twidth: 45%;\n\t\t\t\theight: 50%;\n\t\t\t\tpadding: 6px;\n\t\t\t}\n\n\t\t\tbody[data-speaker-layout=\"tall\"] #current-slide {\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t}\n\n\t\t\tbody[data-speaker-layout=\"tall\"] #upcoming-slide {\n\t\t\t\ttop: 50%;\n\t\t\t\tleft: 0;\n\t\t\t}\n\n\t\t\tbody[data-speaker-layout=\"tall\"] #speaker-controls {\n\t\t\t\tpadding-top: 40px;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 45%;\n\t\t\t\twidth: 55%;\n\t\t\t\theight: 100%;\n\t\t\t\tfont-size: 1.25em;\n\t\t\t}\n\n\t\t\t/* Speaker layout: Notes only */\n\t\t\tbody[data-speaker-layout=\"notes-only\"] #current-slide,\n\t\t\tbody[data-speaker-layout=\"notes-only\"] #upcoming-slide {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\n\t\t\tbody[data-speaker-layout=\"notes-only\"] #speaker-controls {\n\t\t\t\tpadding-top: 40px;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tfont-size: 1.25em;\n\t\t\t}\n\n\t\t\t@media screen and (max-width: 1080px) {\n\t\t\t\tbody[data-speaker-layout=\"default\"] #speaker-controls {\n\t\t\t\t\tfont-size: 16px;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@media screen and (max-width: 900px) {\n\t\t\t\tbody[data-speaker-layout=\"default\"] #speaker-controls {\n\t\t\t\t\tfont-size: 14px;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@media screen and (max-width: 800px) {\n\t\t\t\tbody[data-speaker-layout=\"default\"] #speaker-controls {\n\t\t\t\t\tfont-size: 12px;\n\t\t\t\t}\n\t\t\t}\n\n\t\t</style>\n\t</head>\n\n\t<body>\n\n\t\t<div id=\"connection-status\">Loading speaker view...</div>\n\n\t\t<div id=\"current-slide\"></div>\n\t\t<div id=\"upcoming-slide\"><span class=\"overlay-element label\">Upcoming</span></div>\n\t\t<div id=\"speaker-controls\">\n\t\t\t<div class=\"speaker-controls-time\">\n\t\t\t\t<h4 class=\"label\">Time <span class=\"reset-button\">Click to Reset</span></h4>\n\t\t\t\t<div class=\"clock\">\n\t\t\t\t\t<span class=\"clock-value\">0:00 AM</span>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"timer\">\n\t\t\t\t\t<span class=\"hours-value\">00</span><span class=\"minutes-value\">:00</span><span class=\"seconds-value\">:00</span>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"clear\"></div>\n\n\t\t\t\t<h4 class=\"label pacing-title\" style=\"display: none\">Pacing – Time to finish current slide</h4>\n\t\t\t\t<div class=\"pacing\" style=\"display: none\">\n\t\t\t\t\t<span class=\"hours-value\">00</span><span class=\"minutes-value\">:00</span><span class=\"seconds-value\">:00</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class=\"speaker-controls-notes hidden\">\n\t\t\t\t<h4 class=\"label\">Notes</h4>\n\t\t\t\t<div class=\"value\"></div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div id=\"speaker-layout\" class=\"overlay-element interactive\">\n\t\t\t<span class=\"speaker-layout-label\"></span>\n\t\t\t<select class=\"speaker-layout-dropdown\"></select>\n\t\t</div>\n\n\t\t<script>\n\n\t\t\t(function() {\n\n\t\t\t\tvar notes,\n\t\t\t\t\tnotesValue,\n\t\t\t\t\tcurrentState,\n\t\t\t\t\tcurrentSlide,\n\t\t\t\t\tupcomingSlide,\n\t\t\t\t\tlayoutLabel,\n\t\t\t\t\tlayoutDropdown,\n\t\t\t\t\tpendingCalls = {},\n\t\t\t\t\tlastRevealApiCallId = 0,\n\t\t\t\t\tconnected = false;\n\n\t\t\t\tvar SPEAKER_LAYOUTS = {\n\t\t\t\t\t'default': 'Default',\n\t\t\t\t\t'wide': 'Wide',\n\t\t\t\t\t'tall': 'Tall',\n\t\t\t\t\t'notes-only': 'Notes only'\n\t\t\t\t};\n\n\t\t\t\tsetupLayout();\n\n\t\t\t\tvar connectionStatus = document.querySelector( '#connection-status' );\n\t\t\t\tvar connectionTimeout = setTimeout( function() {\n\t\t\t\t\tconnectionStatus.innerHTML = 'Error connecting to main window.<br>Please try closing and reopening the speaker view.';\n\t\t\t\t}, 5000 );\n\n\t\t\t\twindow.addEventListener( 'message', function( event ) {\n\n\t\t\t\t\tclearTimeout( connectionTimeout );\n\t\t\t\t\tconnectionStatus.style.display = 'none';\n\n\t\t\t\t\tvar data = JSON.parse( event.data );\n\n\t\t\t\t\t// The overview mode is only useful to the reveal.js instance\n\t\t\t\t\t// where navigation occurs so we don't sync it\n\t\t\t\t\tif( data.state ) delete data.state.overview;\n\n\t\t\t\t\t// Messages sent by the notes plugin inside of the main window\n\t\t\t\t\tif( data && data.namespace === 'reveal-notes' ) {\n\t\t\t\t\t\tif( data.type === 'connect' ) {\n\t\t\t\t\t\t\thandleConnectMessage( data );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( data.type === 'state' ) {\n\t\t\t\t\t\t\thandleStateMessage( data );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( data.type === 'return' ) {\n\t\t\t\t\t\t\tpendingCalls[data.callId](data.result);\n\t\t\t\t\t\t\tdelete pendingCalls[data.callId];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Messages sent by the reveal.js inside of the current slide preview\n\t\t\t\t\telse if( data && data.namespace === 'reveal' ) {\n\t\t\t\t\t\tif( /ready/.test( data.eventName ) ) {\n\t\t\t\t\t\t\t// Send a message back to notify that the handshake is complete\n\t\t\t\t\t\t\twindow.opener.postMessage( JSON.stringify({ namespace: 'reveal-notes', type: 'connected'} ), '*' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( /slidechanged|fragmentshown|fragmenthidden|paused|resumed/.test( data.eventName ) && currentState !== JSON.stringify( data.state ) ) {\n\n\t\t\t\t\t\t\twindow.opener.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ]} ), '*' );\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} );\n\n\t\t\t\t/**\n\t\t\t\t * Asynchronously calls the Reveal.js API of the main frame.\n\t\t\t\t */\n\t\t\t\tfunction callRevealApi( methodName, methodArguments, callback ) {\n\n\t\t\t\t\tvar callId = ++lastRevealApiCallId;\n\t\t\t\t\tpendingCalls[callId] = callback;\n\t\t\t\t\twindow.opener.postMessage( JSON.stringify( {\n\t\t\t\t\t\tnamespace: 'reveal-notes',\n\t\t\t\t\t\ttype: 'call',\n\t\t\t\t\t\tcallId: callId,\n\t\t\t\t\t\tmethodName: methodName,\n\t\t\t\t\t\targuments: methodArguments\n\t\t\t\t\t} ), '*' );\n\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Called when the main window is trying to establish a\n\t\t\t\t * connection.\n\t\t\t\t */\n\t\t\t\tfunction handleConnectMessage( data ) {\n\n\t\t\t\t\tif( connected === false ) {\n\t\t\t\t\t\tconnected = true;\n\n\t\t\t\t\t\tsetupIframes( data );\n\t\t\t\t\t\tsetupKeyboard();\n\t\t\t\t\t\tsetupNotes();\n\t\t\t\t\t\tsetupTimer();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Called when the main window sends an updated state.\n\t\t\t\t */\n\t\t\t\tfunction handleStateMessage( data ) {\n\n\t\t\t\t\t// Store the most recently set state to avoid circular loops\n\t\t\t\t\t// applying the same state\n\t\t\t\t\tcurrentState = JSON.stringify( data.state );\n\n\t\t\t\t\t// No need for updating the notes in case of fragment changes\n\t\t\t\t\tif ( data.notes ) {\n\t\t\t\t\t\tnotes.classList.remove( 'hidden' );\n\t\t\t\t\t\tnotesValue.style.whiteSpace = data.whitespace;\n\t\t\t\t\t\tif( data.markdown ) {\n\t\t\t\t\t\t\tnotesValue.innerHTML = marked( data.notes );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tnotesValue.innerHTML = data.notes;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tnotes.classList.add( 'hidden' );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Update the note slides\n\t\t\t\t\tcurrentSlide.contentWindow.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ] }), '*' );\n\t\t\t\t\tupcomingSlide.contentWindow.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ] }), '*' );\n\t\t\t\t\tupcomingSlide.contentWindow.postMessage( JSON.stringify({ method: 'next' }), '*' );\n\n\t\t\t\t}\n\n\t\t\t\t// Limit to max one state update per X ms\n\t\t\t\thandleStateMessage = debounce( handleStateMessage, 200 );\n\n\t\t\t\t/**\n\t\t\t\t * Forward keyboard events to the current slide window.\n\t\t\t\t * This enables keyboard events to work even if focus\n\t\t\t\t * isn't set on the current slide iframe.\n\t\t\t\t *\n\t\t\t\t * Block F5 default handling, it reloads and disconnects\n\t\t\t\t * the speaker notes window.\n\t\t\t\t */\n\t\t\t\tfunction setupKeyboard() {\n\n\t\t\t\t\tdocument.addEventListener( 'keydown', function( event ) {\n\t\t\t\t\t\tif( event.keyCode === 116 || ( event.metaKey && event.keyCode === 82 ) ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentSlide.contentWindow.postMessage( JSON.stringify({ method: 'triggerKey', args: [ event.keyCode ] }), '*' );\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Creates the preview iframes.\n\t\t\t\t */\n\t\t\t\tfunction setupIframes( data ) {\n\n\t\t\t\t\tvar params = [\n\t\t\t\t\t\t'receiver',\n\t\t\t\t\t\t'progress=false',\n\t\t\t\t\t\t'history=false',\n\t\t\t\t\t\t'transition=none',\n\t\t\t\t\t\t'autoSlide=0',\n\t\t\t\t\t\t'backgroundTransition=none'\n\t\t\t\t\t].join( '&' );\n\n\t\t\t\t\tvar urlSeparator = /\\?/.test(data.url) ? '&' : '?';\n\t\t\t\t\tvar hash = '#/' + data.state.indexh + '/' + data.state.indexv;\n\t\t\t\t\tvar currentURL = data.url + urlSeparator + params + '&postMessageEvents=true' + hash;\n\t\t\t\t\tvar upcomingURL = data.url + urlSeparator + params + '&controls=false' + hash;\n\n\t\t\t\t\tcurrentSlide = document.createElement( 'iframe' );\n\t\t\t\t\tcurrentSlide.setAttribute( 'width', 1280 );\n\t\t\t\t\tcurrentSlide.setAttribute( 'height', 1024 );\n\t\t\t\t\tcurrentSlide.setAttribute( 'src', currentURL );\n\t\t\t\t\tdocument.querySelector( '#current-slide' ).appendChild( currentSlide );\n\n\t\t\t\t\tupcomingSlide = document.createElement( 'iframe' );\n\t\t\t\t\tupcomingSlide.setAttribute( 'width', 640 );\n\t\t\t\t\tupcomingSlide.setAttribute( 'height', 512 );\n\t\t\t\t\tupcomingSlide.setAttribute( 'src', upcomingURL );\n\t\t\t\t\tdocument.querySelector( '#upcoming-slide' ).appendChild( upcomingSlide );\n\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Setup the notes UI.\n\t\t\t\t */\n\t\t\t\tfunction setupNotes() {\n\n\t\t\t\t\tnotes = document.querySelector( '.speaker-controls-notes' );\n\t\t\t\t\tnotesValue = document.querySelector( '.speaker-controls-notes .value' );\n\n\t\t\t\t}\n\n\t\t\t\tfunction getTimings( callback ) {\n\n\t\t\t\t\tcallRevealApi( 'getSlidesAttributes', [], function ( slideAttributes ) {\n\t\t\t\t\t\tcallRevealApi( 'getConfig', [], function ( config ) {\n\t\t\t\t\t\t\tvar totalTime = config.totalTime;\n\t\t\t\t\t\t\tvar minTimePerSlide = config.minimumTimePerSlide || 0;\n\t\t\t\t\t\t\tvar defaultTiming = config.defaultTiming;\n\t\t\t\t\t\t\tif ((defaultTiming == null) && (totalTime == null)) {\n\t\t\t\t\t\t\t\tcallback(null);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Setting totalTime overrides defaultTiming\n\t\t\t\t\t\t\tif (totalTime) {\n\t\t\t\t\t\t\t\tdefaultTiming = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar timings = [];\n\t\t\t\t\t\t\tfor ( var i in slideAttributes ) {\n\t\t\t\t\t\t\t\tvar slide = slideAttributes[ i ];\n\t\t\t\t\t\t\t\tvar timing = defaultTiming;\n\t\t\t\t\t\t\t\tif( slide.hasOwnProperty( 'data-timing' )) {\n\t\t\t\t\t\t\t\t\tvar t = slide[ 'data-timing' ];\n\t\t\t\t\t\t\t\t\ttiming = parseInt(t);\n\t\t\t\t\t\t\t\t\tif( isNaN(timing) ) {\n\t\t\t\t\t\t\t\t\t\tconsole.warn(\"Could not parse timing '\" + t + \"' of slide \" + i + \"; using default of \" + defaultTiming);\n\t\t\t\t\t\t\t\t\t\ttiming = defaultTiming;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\ttimings.push(timing);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( totalTime ) {\n\t\t\t\t\t\t\t\t// After we've allocated time to individual slides, we summarize it and\n\t\t\t\t\t\t\t\t// subtract it from the total time\n\t\t\t\t\t\t\t\tvar remainingTime = totalTime - timings.reduce( function(a, b) { return a + b; }, 0 );\n\t\t\t\t\t\t\t\t// The remaining time is divided by the number of slides that have 0 seconds\n\t\t\t\t\t\t\t\t// allocated at the moment, giving the average time-per-slide on the remaining slides\n\t\t\t\t\t\t\t\tvar remainingSlides = (timings.filter( function(x) { return x == 0 }) ).length\n\t\t\t\t\t\t\t\tvar timePerSlide = Math.round( remainingTime / remainingSlides, 0 )\n\t\t\t\t\t\t\t\t// And now we replace every zero-value timing with that average\n\t\t\t\t\t\t\t\ttimings = timings.map( function(x) { return (x==0 ? timePerSlide : x) } );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar slidesUnderMinimum = timings.filter( function(x) { return (x < minTimePerSlide) } ).length\n\t\t\t\t\t\t\tif ( slidesUnderMinimum ) {\n\t\t\t\t\t\t\t\tmessage = \"The pacing time for \" + slidesUnderMinimum + \" slide(s) is under the configured minimum of \" + minTimePerSlide + \" seconds. Check the data-timing attribute on individual slides, or consider increasing the totalTime or minimumTimePerSlide configuration options (or removing some slides).\";\n\t\t\t\t\t\t\t\talert(message);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcallback( timings );\n\t\t\t\t\t\t} );\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Return the number of seconds allocated for presenting\n\t\t\t\t * all slides up to and including this one.\n\t\t\t\t */\n\t\t\t\tfunction getTimeAllocated( timings, callback ) {\n\n\t\t\t\t\tcallRevealApi( 'getSlidePastCount', [], function ( currentSlide ) {\n\t\t\t\t\t\tvar allocated = 0;\n\t\t\t\t\t\tfor (var i in timings.slice(0, currentSlide + 1)) {\n\t\t\t\t\t\t\tallocated += timings[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcallback( allocated );\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Create the timer and clock and start updating them\n\t\t\t\t * at an interval.\n\t\t\t\t */\n\t\t\t\tfunction setupTimer() {\n\n\t\t\t\t\tvar start = new Date(),\n\t\t\t\t\ttimeEl = document.querySelector( '.speaker-controls-time' ),\n\t\t\t\t\tclockEl = timeEl.querySelector( '.clock-value' ),\n\t\t\t\t\thoursEl = timeEl.querySelector( '.hours-value' ),\n\t\t\t\t\tminutesEl = timeEl.querySelector( '.minutes-value' ),\n\t\t\t\t\tsecondsEl = timeEl.querySelector( '.seconds-value' ),\n\t\t\t\t\tpacingTitleEl = timeEl.querySelector( '.pacing-title' ),\n\t\t\t\t\tpacingEl = timeEl.querySelector( '.pacing' ),\n\t\t\t\t\tpacingHoursEl = pacingEl.querySelector( '.hours-value' ),\n\t\t\t\t\tpacingMinutesEl = pacingEl.querySelector( '.minutes-value' ),\n\t\t\t\t\tpacingSecondsEl = pacingEl.querySelector( '.seconds-value' );\n\n\t\t\t\t\tvar timings = null;\n\t\t\t\t\tgetTimings( function ( _timings ) {\n\n\t\t\t\t\t\ttimings = _timings;\n\t\t\t\t\t\tif (_timings !== null) {\n\t\t\t\t\t\t\tpacingTitleEl.style.removeProperty('display');\n\t\t\t\t\t\t\tpacingEl.style.removeProperty('display');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Update once directly\n\t\t\t\t\t\t_updateTimer();\n\n\t\t\t\t\t\t// Then update every second\n\t\t\t\t\t\tsetInterval( _updateTimer, 1000 );\n\n\t\t\t\t\t} );\n\n\n\t\t\t\t\tfunction _resetTimer() {\n\n\t\t\t\t\t\tif (timings == null) {\n\t\t\t\t\t\t\tstart = new Date();\n\t\t\t\t\t\t\t_updateTimer();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// Reset timer to beginning of current slide\n\t\t\t\t\t\t\tgetTimeAllocated( timings, function ( slideEndTimingSeconds ) {\n\t\t\t\t\t\t\t\tvar slideEndTiming = slideEndTimingSeconds * 1000;\n\t\t\t\t\t\t\t\tcallRevealApi( 'getSlidePastCount', [], function ( currentSlide ) {\n\t\t\t\t\t\t\t\t\tvar currentSlideTiming = timings[currentSlide] * 1000;\n\t\t\t\t\t\t\t\t\tvar previousSlidesTiming = slideEndTiming - currentSlideTiming;\n\t\t\t\t\t\t\t\t\tvar now = new Date();\n\t\t\t\t\t\t\t\t\tstart = new Date(now.getTime() - previousSlidesTiming);\n\t\t\t\t\t\t\t\t\t_updateTimer();\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttimeEl.addEventListener( 'click', function() {\n\t\t\t\t\t\t_resetTimer();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} );\n\n\t\t\t\t\tfunction _displayTime( hrEl, minEl, secEl, time) {\n\n\t\t\t\t\t\tvar sign = Math.sign(time) == -1 ? \"-\" : \"\";\n\t\t\t\t\t\ttime = Math.abs(Math.round(time / 1000));\n\t\t\t\t\t\tvar seconds = time % 60;\n\t\t\t\t\t\tvar minutes = Math.floor( time / 60 ) % 60 ;\n\t\t\t\t\t\tvar hours = Math.floor( time / ( 60 * 60 )) ;\n\t\t\t\t\t\thrEl.innerHTML = sign + zeroPadInteger( hours );\n\t\t\t\t\t\tif (hours == 0) {\n\t\t\t\t\t\t\thrEl.classList.add( 'mute' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\thrEl.classList.remove( 'mute' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tminEl.innerHTML = ':' + zeroPadInteger( minutes );\n\t\t\t\t\t\tif (hours == 0 && minutes == 0) {\n\t\t\t\t\t\t\tminEl.classList.add( 'mute' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tminEl.classList.remove( 'mute' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsecEl.innerHTML = ':' + zeroPadInteger( seconds );\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction _updateTimer() {\n\n\t\t\t\t\t\tvar diff, hours, minutes, seconds,\n\t\t\t\t\t\tnow = new Date();\n\n\t\t\t\t\t\tdiff = now.getTime() - start.getTime();\n\n\t\t\t\t\t\tclockEl.innerHTML = now.toLocaleTimeString( 'en-US', { hour12: true, hour: '2-digit', minute:'2-digit' } );\n\t\t\t\t\t\t_displayTime( hoursEl, minutesEl, secondsEl, diff );\n\t\t\t\t\t\tif (timings !== null) {\n\t\t\t\t\t\t\t_updatePacing(diff);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction _updatePacing(diff) {\n\n\t\t\t\t\t\tgetTimeAllocated( timings, function ( slideEndTimingSeconds ) {\n\t\t\t\t\t\t\tvar slideEndTiming = slideEndTimingSeconds * 1000;\n\n\t\t\t\t\t\t\tcallRevealApi( 'getSlidePastCount', [], function ( currentSlide ) {\n\t\t\t\t\t\t\t\tvar currentSlideTiming = timings[currentSlide] * 1000;\n\t\t\t\t\t\t\t\tvar timeLeftCurrentSlide = slideEndTiming - diff;\n\t\t\t\t\t\t\t\tif (timeLeftCurrentSlide < 0) {\n\t\t\t\t\t\t\t\t\tpacingEl.className = 'pacing behind';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (timeLeftCurrentSlide < currentSlideTiming) {\n\t\t\t\t\t\t\t\t\tpacingEl.className = 'pacing on-track';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tpacingEl.className = 'pacing ahead';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t_displayTime( pacingHoursEl, pacingMinutesEl, pacingSecondsEl, timeLeftCurrentSlide );\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Sets up the speaker view layout and layout selector.\n\t\t\t\t */\n\t\t\t\tfunction setupLayout() {\n\n\t\t\t\t\tlayoutDropdown = document.querySelector( '.speaker-layout-dropdown' );\n\t\t\t\t\tlayoutLabel = document.querySelector( '.speaker-layout-label' );\n\n\t\t\t\t\t// Render the list of available layouts\n\t\t\t\t\tfor( var id in SPEAKER_LAYOUTS ) {\n\t\t\t\t\t\tvar option = document.createElement( 'option' );\n\t\t\t\t\t\toption.setAttribute( 'value', id );\n\t\t\t\t\t\toption.textContent = SPEAKER_LAYOUTS[ id ];\n\t\t\t\t\t\tlayoutDropdown.appendChild( option );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Monitor the dropdown for changes\n\t\t\t\t\tlayoutDropdown.addEventListener( 'change', function( event ) {\n\n\t\t\t\t\t\tsetLayout( layoutDropdown.value );\n\n\t\t\t\t\t}, false );\n\n\t\t\t\t\t// Restore any currently persisted layout\n\t\t\t\t\tsetLayout( getLayout() );\n\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Sets a new speaker view layout. The layout is persisted\n\t\t\t\t * in local storage.\n\t\t\t\t */\n\t\t\t\tfunction setLayout( value ) {\n\n\t\t\t\t\tvar title = SPEAKER_LAYOUTS[ value ];\n\n\t\t\t\t\tlayoutLabel.innerHTML = 'Layout' + ( title ? ( ': ' + title ) : '' );\n\t\t\t\t\tlayoutDropdown.value = value;\n\n\t\t\t\t\tdocument.body.setAttribute( 'data-speaker-layout', value );\n\n\t\t\t\t\t// Persist locally\n\t\t\t\t\tif( supportsLocalStorage() ) {\n\t\t\t\t\t\twindow.localStorage.setItem( 'reveal-speaker-layout', value );\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Returns the ID of the most recently set speaker layout\n\t\t\t\t * or our default layout if none has been set.\n\t\t\t\t */\n\t\t\t\tfunction getLayout() {\n\n\t\t\t\t\tif( supportsLocalStorage() ) {\n\t\t\t\t\t\tvar layout = window.localStorage.getItem( 'reveal-speaker-layout' );\n\t\t\t\t\t\tif( layout ) {\n\t\t\t\t\t\t\treturn layout;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Default to the first record in the layouts hash\n\t\t\t\t\tfor( var id in SPEAKER_LAYOUTS ) {\n\t\t\t\t\t\treturn id;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tfunction supportsLocalStorage() {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlocalStorage.setItem('test', 'test');\n\t\t\t\t\t\tlocalStorage.removeItem('test');\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tcatch( e ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tfunction zeroPadInteger( num ) {\n\n\t\t\t\t\tvar str = '00' + parseInt( num );\n\t\t\t\t\treturn str.substring( str.length - 2 );\n\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Limits the frequency at which a function can be called.\n\t\t\t\t */\n\t\t\t\tfunction debounce( fn, ms ) {\n\n\t\t\t\t\tvar lastTime = 0,\n\t\t\t\t\t\ttimeout;\n\n\t\t\t\t\treturn function() {\n\n\t\t\t\t\t\tvar args = arguments;\n\t\t\t\t\t\tvar context = this;\n\n\t\t\t\t\t\tclearTimeout( timeout );\n\n\t\t\t\t\t\tvar timeSinceLastCall = Date.now() - lastTime;\n\t\t\t\t\t\tif( timeSinceLastCall > ms ) {\n\t\t\t\t\t\t\tfn.apply( context, args );\n\t\t\t\t\t\t\tlastTime = Date.now();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttimeout = setTimeout( function() {\n\t\t\t\t\t\t\t\tfn.apply( context, args );\n\t\t\t\t\t\t\t\tlastTime = Date.now();\n\t\t\t\t\t\t\t}, ms - timeSinceLastCall );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t})();\n\n\t\t<\/script>\n\t</body>\n</html>"),e?(n=setInterval((function(){e.postMessage(JSON.stringify({namespace:"reveal-notes",type:"connect",url:window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,state:t.getState()}),"*")}),500),window.addEventListener("message",(function(i){var a,o,l,s,u=JSON.parse(i.data);u&&"reveal-notes"===u.namespace&&"connected"===u.type&&(clearInterval(n),t.on("slidechanged",r),t.on("fragmentshown",r),t.on("fragmenthidden",r),t.on("overviewhidden",r),t.on("overviewshown",r),t.on("paused",r),t.on("resumed",r),r()),u&&"reveal-notes"===u.namespace&&"call"===u.type&&(a=u.methodName,o=u.arguments,l=u.callId,s=t[a].apply(t,o),e.postMessage(JSON.stringify({namespace:"reveal-notes",type:"return",result:s,callId:l}),"*"))}))):alert("Speaker view popup failed to open. Please make sure popups are allowed and reopen the speaker view.")):e.focus();function r(n){var r=t.getCurrentSlide(),i=r.querySelector("aside.notes"),a=r.querySelector(".current-fragment"),o={namespace:"reveal-notes",type:"state",notes:"",markdown:!1,whitespace:"normal",state:t.getState()};if(r.hasAttribute("data-notes")&&(o.notes=r.getAttribute("data-notes"),o.whitespace="pre-wrap"),a){var l=a.querySelector("aside.notes");l?i=l:a.hasAttribute("data-notes")&&(o.notes=a.getAttribute("data-notes"),o.whitespace="pre-wrap",i=null)}i&&(o.notes=i.innerHTML,o.markdown="string"==typeof i.getAttribute("data-markdown")),e.postMessage(JSON.stringify(o),"*")}}return{id:"notes",init:function(e){t=e,/receiver/i.test(window.location.search)||(null!==window.location.search.match(/(\?|\&)notes/gi)&&n(),t.addKeyBinding({keyCode:83,key:"S",description:"Speaker notes view"},(function(){n()})))},open:n}}}));
import speakerViewHTML from './speaker-view.html';
import marked from 'marked';
/**
* Handles opening of and synchronization with the reveal.js
* notes window.
*
* Handshake process:
* 1. This window posts 'connect' to notes window
* - Includes URL of presentation to show
* 2. Notes window responds with 'connected' when it is available
* 3. This window proceeds to send the current presentation state
* to the notes window
*/
const Plugin = () => {
let popup = null;
let deck;
function openNotes() {
if (popup && !popup.closed) {
popup.focus();
return;
}
popup = window.open( 'about:blank', 'reveal.js - Notes', 'width=1100,height=700' );
popup.marked = marked;
popup.document.write( speakerViewHTML );
if( !popup ) {
alert( 'Speaker view popup failed to open. Please make sure popups are allowed and reopen the speaker view.' );
return;
}
/**
* Connect to the notes window through a postmessage handshake.
* Using postmessage enables us to work in situations where the
* origins differ, such as a presentation being opened from the
* file system.
*/
function connect() {
// Keep trying to connect until we get a 'connected' message back
let connectInterval = setInterval( function() {
popup.postMessage( JSON.stringify( {
namespace: 'reveal-notes',
type: 'connect',
url: window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search,
state: deck.getState()
} ), '*' );
}, 500 );
window.addEventListener( 'message', function( event ) {
let data = JSON.parse( event.data );
if( data && data.namespace === 'reveal-notes' && data.type === 'connected' ) {
clearInterval( connectInterval );
onConnected();
}
if( data && data.namespace === 'reveal-notes' && data.type === 'call' ) {
callRevealApi( data.methodName, data.arguments, data.callId );
}
} );
}
/**
* Calls the specified Reveal.js method with the provided argument
* and then pushes the result to the notes frame.
*/
function callRevealApi( methodName, methodArguments, callId ) {
let result = deck[methodName].apply( deck, methodArguments );
popup.postMessage( JSON.stringify( {
namespace: 'reveal-notes',
type: 'return',
result: result,
callId: callId
} ), '*' );
}
/**
* Posts the current slide data to the notes window
*/
function post( event ) {
let slideElement = deck.getCurrentSlide(),
notesElement = slideElement.querySelector( 'aside.notes' ),
fragmentElement = slideElement.querySelector( '.current-fragment' );
let messageData = {
namespace: 'reveal-notes',
type: 'state',
notes: '',
markdown: false,
whitespace: 'normal',
state: deck.getState()
};
// Look for notes defined in a slide attribute
if( slideElement.hasAttribute( 'data-notes' ) ) {
messageData.notes = slideElement.getAttribute( 'data-notes' );
messageData.whitespace = 'pre-wrap';
}
// Look for notes defined in a fragment
if( fragmentElement ) {
let fragmentNotes = fragmentElement.querySelector( 'aside.notes' );
if( fragmentNotes ) {
notesElement = fragmentNotes;
}
else if( fragmentElement.hasAttribute( 'data-notes' ) ) {
messageData.notes = fragmentElement.getAttribute( 'data-notes' );
messageData.whitespace = 'pre-wrap';
// In case there are slide notes
notesElement = null;
}
}
// Look for notes defined in an aside element
if( notesElement ) {
messageData.notes = notesElement.innerHTML;
messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string';
}
popup.postMessage( JSON.stringify( messageData ), '*' );
}
/**
* Called once we have established a connection to the notes
* window.
*/
function onConnected() {
// Monitor events that trigger a change in state
deck.on( 'slidechanged', post );
deck.on( 'fragmentshown', post );
deck.on( 'fragmenthidden', post );
deck.on( 'overviewhidden', post );
deck.on( 'overviewshown', post );
deck.on( 'paused', post );
deck.on( 'resumed', post );
// Post the initial state
post();
}
connect();
}
return {
id: 'notes',
init: function( reveal ) {
deck = reveal;
if( !/receiver/i.test( window.location.search ) ) {
// If the there's a 'notes' query set, open directly
if( window.location.search.match( /(\?|\&)notes/gi ) !== null ) {
openNotes();
}
// Open the notes when the 's' key is hit
deck.addKeyBinding({keyCode: 83, key: 'S', description: 'Speaker notes view'}, function() {
openNotes();
} );
}
},
open: openNotes
};
};
export default Plugin;
<html lang="en">
<head>
<meta charset="utf-8">
<title>reveal.js - Speaker View</title>
<style>
body {
font-family: Helvetica;
font-size: 18px;
}
#current-slide,
#upcoming-slide,
#speaker-controls {
padding: 6px;
box-sizing: border-box;
-moz-box-sizing: border-box;
}
#current-slide iframe,
#upcoming-slide iframe {
width: 100%;
height: 100%;
border: 1px solid #ddd;
}
#current-slide .label,
#upcoming-slide .label {
position: absolute;
top: 10px;
left: 10px;
z-index: 2;
}
#connection-status {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 20;
padding: 30% 20% 20% 20%;
font-size: 18px;
color: #222;
background: #fff;
text-align: center;
box-sizing: border-box;
line-height: 1.4;
}
.overlay-element {
height: 34px;
line-height: 34px;
padding: 0 10px;
text-shadow: none;
background: rgba( 220, 220, 220, 0.8 );
color: #222;
font-size: 14px;
}
.overlay-element.interactive:hover {
background: rgba( 220, 220, 220, 1 );
}
#current-slide {
position: absolute;
width: 60%;
height: 100%;
top: 0;
left: 0;
padding-right: 0;
}
#upcoming-slide {
position: absolute;
width: 40%;
height: 40%;
right: 0;
top: 0;
}
/* Speaker controls */
#speaker-controls {
position: absolute;
top: 40%;
right: 0;
width: 40%;
height: 60%;
overflow: auto;
font-size: 18px;
}
.speaker-controls-time.hidden,
.speaker-controls-notes.hidden {
display: none;
}
.speaker-controls-time .label,
.speaker-controls-pace .label,
.speaker-controls-notes .label {
text-transform: uppercase;
font-weight: normal;
font-size: 0.66em;
color: #666;
margin: 0;
}
.speaker-controls-time, .speaker-controls-pace {
border-bottom: 1px solid rgba( 200, 200, 200, 0.5 );
margin-bottom: 10px;
padding: 10px 16px;
padding-bottom: 20px;
cursor: pointer;
}
.speaker-controls-time .reset-button {
opacity: 0;
float: right;
color: #666;
text-decoration: none;
}
.speaker-controls-time:hover .reset-button {
opacity: 1;
}
.speaker-controls-time .timer,
.speaker-controls-time .clock {
width: 50%;
}
.speaker-controls-time .timer,
.speaker-controls-time .clock,
.speaker-controls-time .pacing .hours-value,
.speaker-controls-time .pacing .minutes-value,
.speaker-controls-time .pacing .seconds-value {
font-size: 1.9em;
}
.speaker-controls-time .timer {
float: left;
}
.speaker-controls-time .clock {
float: right;
text-align: right;
}
.speaker-controls-time span.mute {
opacity: 0.3;
}
.speaker-controls-time .pacing-title {
margin-top: 5px;
}
.speaker-controls-time .pacing.ahead {
color: blue;
}
.speaker-controls-time .pacing.on-track {
color: green;
}
.speaker-controls-time .pacing.behind {
color: red;
}
.speaker-controls-notes {
padding: 10px 16px;
}
.speaker-controls-notes .value {
margin-top: 5px;
line-height: 1.4;
font-size: 1.2em;
}
/* Layout selector */
#speaker-layout {
position: absolute;
top: 10px;
right: 10px;
color: #222;
z-index: 10;
}
#speaker-layout select {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
border: 0;
box-shadow: 0;
cursor: pointer;
opacity: 0;
font-size: 1em;
background-color: transparent;
-moz-appearance: none;
-webkit-appearance: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
#speaker-layout select:focus {
outline: none;
box-shadow: none;
}
.clear {
clear: both;
}
/* Speaker layout: Wide */
body[data-speaker-layout="wide"] #current-slide,
body[data-speaker-layout="wide"] #upcoming-slide {
width: 50%;
height: 45%;
padding: 6px;
}
body[data-speaker-layout="wide"] #current-slide {
top: 0;
left: 0;
}
body[data-speaker-layout="wide"] #upcoming-slide {
top: 0;
left: 50%;
}
body[data-speaker-layout="wide"] #speaker-controls {
top: 45%;
left: 0;
width: 100%;
height: 50%;
font-size: 1.25em;
}
/* Speaker layout: Tall */
body[data-speaker-layout="tall"] #current-slide,
body[data-speaker-layout="tall"] #upcoming-slide {
width: 45%;
height: 50%;
padding: 6px;
}
body[data-speaker-layout="tall"] #current-slide {
top: 0;
left: 0;
}
body[data-speaker-layout="tall"] #upcoming-slide {
top: 50%;
left: 0;
}
body[data-speaker-layout="tall"] #speaker-controls {
padding-top: 40px;
top: 0;
left: 45%;
width: 55%;
height: 100%;
font-size: 1.25em;
}
/* Speaker layout: Notes only */
body[data-speaker-layout="notes-only"] #current-slide,
body[data-speaker-layout="notes-only"] #upcoming-slide {
display: none;
}
body[data-speaker-layout="notes-only"] #speaker-controls {
padding-top: 40px;
top: 0;
left: 0;
width: 100%;
height: 100%;
font-size: 1.25em;
}
@media screen and (max-width: 1080px) {
body[data-speaker-layout="default"] #speaker-controls {
font-size: 16px;
}
}
@media screen and (max-width: 900px) {
body[data-speaker-layout="default"] #speaker-controls {
font-size: 14px;
}
}
@media screen and (max-width: 800px) {
body[data-speaker-layout="default"] #speaker-controls {
font-size: 12px;
}
}
</style>
</head>
<body>
<div id="connection-status">Loading speaker view...</div>
<div id="current-slide"></div>
<div id="upcoming-slide"><span class="overlay-element label">Upcoming</span></div>
<div id="speaker-controls">
<div class="speaker-controls-time">
<h4 class="label">Time <span class="reset-button">Click to Reset</span></h4>
<div class="clock">
<span class="clock-value">0:00 AM</span>
</div>
<div class="timer">
<span class="hours-value">00</span><span class="minutes-value">:00</span><span class="seconds-value">:00</span>
</div>
<div class="clear"></div>
<h4 class="label pacing-title" style="display: none">Pacing – Time to finish current slide</h4>
<div class="pacing" style="display: none">
<span class="hours-value">00</span><span class="minutes-value">:00</span><span class="seconds-value">:00</span>
</div>
</div>
<div class="speaker-controls-notes hidden">
<h4 class="label">Notes</h4>
<div class="value"></div>
</div>
</div>
<div id="speaker-layout" class="overlay-element interactive">
<span class="speaker-layout-label"></span>
<select class="speaker-layout-dropdown"></select>
</div>
<script>
(function() {
var notes,
notesValue,
currentState,
currentSlide,
upcomingSlide,
layoutLabel,
layoutDropdown,
pendingCalls = {},
lastRevealApiCallId = 0,
connected = false;
var SPEAKER_LAYOUTS = {
'default': 'Default',
'wide': 'Wide',
'tall': 'Tall',
'notes-only': 'Notes only'
};
setupLayout();
var connectionStatus = document.querySelector( '#connection-status' );
var connectionTimeout = setTimeout( function() {
connectionStatus.innerHTML = 'Error connecting to main window.<br>Please try closing and reopening the speaker view.';
}, 5000 );
window.addEventListener( 'message', function( event ) {
clearTimeout( connectionTimeout );
connectionStatus.style.display = 'none';
var data = JSON.parse( event.data );
// The overview mode is only useful to the reveal.js instance
// where navigation occurs so we don't sync it
if( data.state ) delete data.state.overview;
// Messages sent by the notes plugin inside of the main window
if( data && data.namespace === 'reveal-notes' ) {
if( data.type === 'connect' ) {
handleConnectMessage( data );
}
else if( data.type === 'state' ) {
handleStateMessage( data );
}
else if( data.type === 'return' ) {
pendingCalls[data.callId](data.result);
delete pendingCalls[data.callId];
}
}
// Messages sent by the reveal.js inside of the current slide preview
else if( data && data.namespace === 'reveal' ) {
if( /ready/.test( data.eventName ) ) {
// Send a message back to notify that the handshake is complete
window.opener.postMessage( JSON.stringify({ namespace: 'reveal-notes', type: 'connected'} ), '*' );
}
else if( /slidechanged|fragmentshown|fragmenthidden|paused|resumed/.test( data.eventName ) && currentState !== JSON.stringify( data.state ) ) {
window.opener.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ]} ), '*' );
}
}
} );
/**
* Asynchronously calls the Reveal.js API of the main frame.
*/
function callRevealApi( methodName, methodArguments, callback ) {
var callId = ++lastRevealApiCallId;
pendingCalls[callId] = callback;
window.opener.postMessage( JSON.stringify( {
namespace: 'reveal-notes',
type: 'call',
callId: callId,
methodName: methodName,
arguments: methodArguments
} ), '*' );
}
/**
* Called when the main window is trying to establish a
* connection.
*/
function handleConnectMessage( data ) {
if( connected === false ) {
connected = true;
setupIframes( data );
setupKeyboard();
setupNotes();
setupTimer();
}
}
/**
* Called when the main window sends an updated state.
*/
function handleStateMessage( data ) {
// Store the most recently set state to avoid circular loops
// applying the same state
currentState = JSON.stringify( data.state );
// No need for updating the notes in case of fragment changes
if ( data.notes ) {
notes.classList.remove( 'hidden' );
notesValue.style.whiteSpace = data.whitespace;
if( data.markdown ) {
notesValue.innerHTML = marked( data.notes );
}
else {
notesValue.innerHTML = data.notes;
}
}
else {
notes.classList.add( 'hidden' );
}
// Update the note slides
currentSlide.contentWindow.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ] }), '*' );
upcomingSlide.contentWindow.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ] }), '*' );
upcomingSlide.contentWindow.postMessage( JSON.stringify({ method: 'next' }), '*' );
}
// Limit to max one state update per X ms
handleStateMessage = debounce( handleStateMessage, 200 );
/**
* Forward keyboard events to the current slide window.
* This enables keyboard events to work even if focus
* isn't set on the current slide iframe.
*
* Block F5 default handling, it reloads and disconnects
* the speaker notes window.
*/
function setupKeyboard() {
document.addEventListener( 'keydown', function( event ) {
if( event.keyCode === 116 || ( event.metaKey && event.keyCode === 82 ) ) {
event.preventDefault();
return false;
}
currentSlide.contentWindow.postMessage( JSON.stringify({ method: 'triggerKey', args: [ event.keyCode ] }), '*' );
} );
}
/**
* Creates the preview iframes.
*/
function setupIframes( data ) {
var params = [
'receiver',
'progress=false',
'history=false',
'transition=none',
'autoSlide=0',
'backgroundTransition=none'
].join( '&' );
var urlSeparator = /\?/.test(data.url) ? '&' : '?';
var hash = '#/' + data.state.indexh + '/' + data.state.indexv;
var currentURL = data.url + urlSeparator + params + '&postMessageEvents=true' + hash;
var upcomingURL = data.url + urlSeparator + params + '&controls=false' + hash;
currentSlide = document.createElement( 'iframe' );
currentSlide.setAttribute( 'width', 1280 );
currentSlide.setAttribute( 'height', 1024 );
currentSlide.setAttribute( 'src', currentURL );
document.querySelector( '#current-slide' ).appendChild( currentSlide );
upcomingSlide = document.createElement( 'iframe' );
upcomingSlide.setAttribute( 'width', 640 );
upcomingSlide.setAttribute( 'height', 512 );
upcomingSlide.setAttribute( 'src', upcomingURL );
document.querySelector( '#upcoming-slide' ).appendChild( upcomingSlide );
}
/**
* Setup the notes UI.
*/
function setupNotes() {
notes = document.querySelector( '.speaker-controls-notes' );
notesValue = document.querySelector( '.speaker-controls-notes .value' );
}
function getTimings( callback ) {
callRevealApi( 'getSlidesAttributes', [], function ( slideAttributes ) {
callRevealApi( 'getConfig', [], function ( config ) {
var totalTime = config.totalTime;
var minTimePerSlide = config.minimumTimePerSlide || 0;
var defaultTiming = config.defaultTiming;
if ((defaultTiming == null) && (totalTime == null)) {
callback(null);
return;
}
// Setting totalTime overrides defaultTiming
if (totalTime) {
defaultTiming = 0;
}
var timings = [];
for ( var i in slideAttributes ) {
var slide = slideAttributes[ i ];
var timing = defaultTiming;
if( slide.hasOwnProperty( 'data-timing' )) {
var t = slide[ 'data-timing' ];
timing = parseInt(t);
if( isNaN(timing) ) {
console.warn("Could not parse timing '" + t + "' of slide " + i + "; using default of " + defaultTiming);
timing = defaultTiming;
}
}
timings.push(timing);
}
if ( totalTime ) {
// After we've allocated time to individual slides, we summarize it and
// subtract it from the total time
var remainingTime = totalTime - timings.reduce( function(a, b) { return a + b; }, 0 );
// The remaining time is divided by the number of slides that have 0 seconds
// allocated at the moment, giving the average time-per-slide on the remaining slides
var remainingSlides = (timings.filter( function(x) { return x == 0 }) ).length
var timePerSlide = Math.round( remainingTime / remainingSlides, 0 )
// And now we replace every zero-value timing with that average
timings = timings.map( function(x) { return (x==0 ? timePerSlide : x) } );
}
var slidesUnderMinimum = timings.filter( function(x) { return (x < minTimePerSlide) } ).length
if ( slidesUnderMinimum ) {
message = "The pacing time for " + slidesUnderMinimum + " slide(s) is under the configured minimum of " + minTimePerSlide + " seconds. Check the data-timing attribute on individual slides, or consider increasing the totalTime or minimumTimePerSlide configuration options (or removing some slides).";
alert(message);
}
callback( timings );
} );
} );
}
/**
* Return the number of seconds allocated for presenting
* all slides up to and including this one.
*/
function getTimeAllocated( timings, callback ) {
callRevealApi( 'getSlidePastCount', [], function ( currentSlide ) {
var allocated = 0;
for (var i in timings.slice(0, currentSlide + 1)) {
allocated += timings[i];
}
callback( allocated );
} );
}
/**
* Create the timer and clock and start updating them
* at an interval.
*/
function setupTimer() {
var start = new Date(),
timeEl = document.querySelector( '.speaker-controls-time' ),
clockEl = timeEl.querySelector( '.clock-value' ),
hoursEl = timeEl.querySelector( '.hours-value' ),
minutesEl = timeEl.querySelector( '.minutes-value' ),
secondsEl = timeEl.querySelector( '.seconds-value' ),
pacingTitleEl = timeEl.querySelector( '.pacing-title' ),
pacingEl = timeEl.querySelector( '.pacing' ),
pacingHoursEl = pacingEl.querySelector( '.hours-value' ),
pacingMinutesEl = pacingEl.querySelector( '.minutes-value' ),
pacingSecondsEl = pacingEl.querySelector( '.seconds-value' );
var timings = null;
getTimings( function ( _timings ) {
timings = _timings;
if (_timings !== null) {
pacingTitleEl.style.removeProperty('display');
pacingEl.style.removeProperty('display');
}
// Update once directly
_updateTimer();
// Then update every second
setInterval( _updateTimer, 1000 );
} );
function _resetTimer() {
if (timings == null) {
start = new Date();
_updateTimer();
}
else {
// Reset timer to beginning of current slide
getTimeAllocated( timings, function ( slideEndTimingSeconds ) {
var slideEndTiming = slideEndTimingSeconds * 1000;
callRevealApi( 'getSlidePastCount', [], function ( currentSlide ) {
var currentSlideTiming = timings[currentSlide] * 1000;
var previousSlidesTiming = slideEndTiming - currentSlideTiming;
var now = new Date();
start = new Date(now.getTime() - previousSlidesTiming);
_updateTimer();
} );
} );
}
}
timeEl.addEventListener( 'click', function() {
_resetTimer();
return false;
} );
function _displayTime( hrEl, minEl, secEl, time) {
var sign = Math.sign(time) == -1 ? "-" : "";
time = Math.abs(Math.round(time / 1000));
var seconds = time % 60;
var minutes = Math.floor( time / 60 ) % 60 ;
var hours = Math.floor( time / ( 60 * 60 )) ;
hrEl.innerHTML = sign + zeroPadInteger( hours );
if (hours == 0) {
hrEl.classList.add( 'mute' );
}
else {
hrEl.classList.remove( 'mute' );
}
minEl.innerHTML = ':' + zeroPadInteger( minutes );
if (hours == 0 && minutes == 0) {
minEl.classList.add( 'mute' );
}
else {
minEl.classList.remove( 'mute' );
}
secEl.innerHTML = ':' + zeroPadInteger( seconds );
}
function _updateTimer() {
var diff, hours, minutes, seconds,
now = new Date();
diff = now.getTime() - start.getTime();
clockEl.innerHTML = now.toLocaleTimeString( 'en-US', { hour12: true, hour: '2-digit', minute:'2-digit' } );
_displayTime( hoursEl, minutesEl, secondsEl, diff );
if (timings !== null) {
_updatePacing(diff);
}
}
function _updatePacing(diff) {
getTimeAllocated( timings, function ( slideEndTimingSeconds ) {
var slideEndTiming = slideEndTimingSeconds * 1000;
callRevealApi( 'getSlidePastCount', [], function ( currentSlide ) {
var currentSlideTiming = timings[currentSlide] * 1000;
var timeLeftCurrentSlide = slideEndTiming - diff;
if (timeLeftCurrentSlide < 0) {
pacingEl.className = 'pacing behind';
}
else if (timeLeftCurrentSlide < currentSlideTiming) {
pacingEl.className = 'pacing on-track';
}
else {
pacingEl.className = 'pacing ahead';
}
_displayTime( pacingHoursEl, pacingMinutesEl, pacingSecondsEl, timeLeftCurrentSlide );
} );
} );
}
}
/**
* Sets up the speaker view layout and layout selector.
*/
function setupLayout() {
layoutDropdown = document.querySelector( '.speaker-layout-dropdown' );
layoutLabel = document.querySelector( '.speaker-layout-label' );
// Render the list of available layouts
for( var id in SPEAKER_LAYOUTS ) {
var option = document.createElement( 'option' );
option.setAttribute( 'value', id );
option.textContent = SPEAKER_LAYOUTS[ id ];
layoutDropdown.appendChild( option );
}
// Monitor the dropdown for changes
layoutDropdown.addEventListener( 'change', function( event ) {
setLayout( layoutDropdown.value );
}, false );
// Restore any currently persisted layout
setLayout( getLayout() );
}
/**
* Sets a new speaker view layout. The layout is persisted
* in local storage.
*/
function setLayout( value ) {
var title = SPEAKER_LAYOUTS[ value ];
layoutLabel.innerHTML = 'Layout' + ( title ? ( ': ' + title ) : '' );
layoutDropdown.value = value;
document.body.setAttribute( 'data-speaker-layout', value );
// Persist locally
if( supportsLocalStorage() ) {
window.localStorage.setItem( 'reveal-speaker-layout', value );
}
}
/**
* Returns the ID of the most recently set speaker layout
* or our default layout if none has been set.
*/
function getLayout() {
if( supportsLocalStorage() ) {
var layout = window.localStorage.getItem( 'reveal-speaker-layout' );
if( layout ) {
return layout;
}
}
// Default to the first record in the layouts hash
for( var id in SPEAKER_LAYOUTS ) {
return id;
}
}
function supportsLocalStorage() {
try {
localStorage.setItem('test', 'test');
localStorage.removeItem('test');
return true;
}
catch( e ) {
return false;
}
}
function zeroPadInteger( num ) {
var str = '00' + parseInt( num );
return str.substring( str.length - 2 );
}
/**
* Limits the frequency at which a function can be called.
*/
function debounce( fn, ms ) {
var lastTime = 0,
timeout;
return function() {
var args = arguments;
var context = this;
clearTimeout( timeout );
var timeSinceLastCall = Date.now() - lastTime;
if( timeSinceLastCall > ms ) {
fn.apply( context, args );
lastTime = Date.now();
}
else {
timeout = setTimeout( function() {
fn.apply( context, args );
lastTime = Date.now();
}, ms - timeSinceLastCall );
}
}
}
})();
</script>
</body>
</html>
\ No newline at end of file
/*!
* Handles finding a text string anywhere in the slides and showing the next occurrence to the user
* by navigatating to that slide and highlighting it.
*
* @author Jon Snyder <snyder.jon@gmail.com>, February 2013
*/
const Plugin = () => {
// The reveal.js instance this plugin is attached to
let deck;
let searchElement;
let searchButton;
let searchInput;
let matchedSlides;
let currentMatchedIndex;
let searchboxDirty;
let hilitor;
function render() {
searchElement = document.createElement( 'div' );
searchElement.classList.add( 'searchbox' );
searchElement.style.position = 'absolute';
searchElement.style.top = '10px';
searchElement.style.right = '10px';
searchElement.style.zIndex = 10;
//embedded base64 search icon Designed by Sketchdock - http://www.sketchdock.com/:
searchElement.innerHTML = `<input type="search" class="searchinput" placeholder="Search..." style="vertical-align: top;"/>
</span>`;
searchInput = searchElement.querySelector( '.searchinput' );
searchInput.style.width = '240px';
searchInput.style.fontSize = '14px';
searchInput.style.padding = '4px 6px';
searchInput.style.color = '#000';
searchInput.style.background = '#fff';
searchInput.style.borderRadius = '2px';
searchInput.style.border = '0';
searchInput.style.outline = '0';
searchInput.style.boxShadow = '0 2px 18px rgba(0, 0, 0, 0.2)';
searchInput.style['-webkit-appearance'] = 'none';
deck.getRevealElement().appendChild( searchElement );
// searchButton.addEventListener( 'click', function(event) {
// doSearch();
// }, false );
searchInput.addEventListener( 'keyup', function( event ) {
switch (event.keyCode) {
case 13:
event.preventDefault();
doSearch();
searchboxDirty = false;
break;
default:
searchboxDirty = true;
}
}, false );
closeSearch();
}
function openSearch() {
if( !searchElement ) render();
searchElement.style.display = 'inline';
searchInput.focus();
searchInput.select();
}
function closeSearch() {
if( !searchElement ) render();
searchElement.style.display = 'none';
if(hilitor) hilitor.remove();
}
function toggleSearch() {
if( !searchElement ) render();
if (searchElement.style.display !== 'inline') {
openSearch();
}
else {
closeSearch();
}
}
function doSearch() {
//if there's been a change in the search term, perform a new search:
if (searchboxDirty) {
var searchstring = searchInput.value;
if (searchstring === '') {
if(hilitor) hilitor.remove();
matchedSlides = null;
}
else {
//find the keyword amongst the slides
hilitor = new Hilitor("slidecontent");
matchedSlides = hilitor.apply(searchstring);
currentMatchedIndex = 0;
}
}
if (matchedSlides) {
//navigate to the next slide that has the keyword, wrapping to the first if necessary
if (matchedSlides.length && (matchedSlides.length <= currentMatchedIndex)) {
currentMatchedIndex = 0;
}
if (matchedSlides.length > currentMatchedIndex) {
deck.slide(matchedSlides[currentMatchedIndex].h, matchedSlides[currentMatchedIndex].v);
currentMatchedIndex++;
}
}
}
// Original JavaScript code by Chirp Internet: www.chirp.com.au
// Please acknowledge use of this code by including this header.
// 2/2013 jon: modified regex to display any match, not restricted to word boundaries.
function Hilitor(id, tag) {
var targetNode = document.getElementById(id) || document.body;
var hiliteTag = tag || "EM";
var skipTags = new RegExp("^(?:" + hiliteTag + "|SCRIPT|FORM)$");
var colors = ["#ff6", "#a0ffff", "#9f9", "#f99", "#f6f"];
var wordColor = [];
var colorIdx = 0;
var matchRegex = "";
var matchingSlides = [];
this.setRegex = function(input)
{
input = input.replace(/^[^\w]+|[^\w]+$/g, "").replace(/[^\w'-]+/g, "|");
matchRegex = new RegExp("(" + input + ")","i");
}
this.getRegex = function()
{
return matchRegex.toString().replace(/^\/\\b\(|\)\\b\/i$/g, "").replace(/\|/g, " ");
}
// recursively apply word highlighting
this.hiliteWords = function(node)
{
if(node == undefined || !node) return;
if(!matchRegex) return;
if(skipTags.test(node.nodeName)) return;
if(node.hasChildNodes()) {
for(var i=0; i < node.childNodes.length; i++)
this.hiliteWords(node.childNodes[i]);
}
if(node.nodeType == 3) { // NODE_TEXT
var nv, regs;
if((nv = node.nodeValue) && (regs = matchRegex.exec(nv))) {
//find the slide's section element and save it in our list of matching slides
var secnode = node;
while (secnode != null && secnode.nodeName != 'SECTION') {
secnode = secnode.parentNode;
}
var slideIndex = deck.getIndices(secnode);
var slidelen = matchingSlides.length;
var alreadyAdded = false;
for (var i=0; i < slidelen; i++) {
if ( (matchingSlides[i].h === slideIndex.h) && (matchingSlides[i].v === slideIndex.v) ) {
alreadyAdded = true;
}
}
if (! alreadyAdded) {
matchingSlides.push(slideIndex);
}
if(!wordColor[regs[0].toLowerCase()]) {
wordColor[regs[0].toLowerCase()] = colors[colorIdx++ % colors.length];
}
var match = document.createElement(hiliteTag);
match.appendChild(document.createTextNode(regs[0]));
match.style.backgroundColor = wordColor[regs[0].toLowerCase()];
match.style.fontStyle = "inherit";
match.style.color = "#000";
var after = node.splitText(regs.index);
after.nodeValue = after.nodeValue.substring(regs[0].length);
node.parentNode.insertBefore(match, after);
}
}
};
// remove highlighting
this.remove = function()
{
var arr = document.getElementsByTagName(hiliteTag);
var el;
while(arr.length && (el = arr[0])) {
el.parentNode.replaceChild(el.firstChild, el);
}
};
// start highlighting at target node
this.apply = function(input)
{
if(input == undefined || !input) return;
this.remove();
this.setRegex(input);
this.hiliteWords(targetNode);
return matchingSlides;
};
}
return {
id: 'search',
init: reveal => {
deck = reveal;
deck.registerKeyboardShortcut( 'CTRL + Shift + F', 'Search' );
document.addEventListener( 'keydown', function( event ) {
if( event.key == "F" && (event.ctrlKey || event.metaKey) ) { //Control+Shift+f
event.preventDefault();
toggleSearch();
}
}, false );
},
open: openSearch
}
};
export default Plugin;
\ No newline at end of file
var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e,n){return t(n={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&n.path)}},n.exports),n.exports}var n=function(t){return t&&t.Math==Math&&t},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")(),o=function(t){try{return!!t()}catch(t){return!0}},i=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c=function(t){return"object"==typeof t?null!==t:"function"==typeof t},u=r.document,a=c(u)&&c(u.createElement),l=!i&&!o((function(){return 7!=Object.defineProperty((t="div",a?u.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),f=function(t){if(!c(t))throw TypeError(String(t)+" is not an object");return t},s=function(t,e){if(!c(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!c(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!c(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!c(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},p=Object.defineProperty,g={f:i?p:function(t,e,n){if(f(t),e=s(e,!0),f(n),l)try{return p(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},d=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},h=i?function(t,e,n){return g.f(t,e,d(1,n))}:function(t,e,n){return t[e]=n,t},y=function(t,e){try{h(r,t,e)}catch(n){r[t]=e}return e},v=r["__core-js_shared__"]||y("__core-js_shared__",{}),b=e((function(t){(t.exports=function(t,e){return v[t]||(v[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.7.0",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),x={}.hasOwnProperty,E=function(t,e){return x.call(t,e)},m=0,S=Math.random(),w=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++m+S).toString(36)},O=!!Object.getOwnPropertySymbols&&!o((function(){return!String(Symbol())})),R=O&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,_=b("wks"),T=r.Symbol,j=R?T:T&&T.withoutSetter||w,P=function(t){return E(_,t)||(O&&E(T,t)?_[t]=T[t]:_[t]=j("Symbol."+t)),_[t]},I={};I[P("toStringTag")]="z";var C="[object z]"===String(I),N=Function.toString;"function"!=typeof v.inspectSource&&(v.inspectSource=function(t){return N.call(t)});var A,k,$,L,M=v.inspectSource,U=r.WeakMap,D="function"==typeof U&&/native code/.test(M(U)),F=b("keys"),K={},z=r.WeakMap;if(D){var B=v.state||(v.state=new z),W=B.get,q=B.has,G=B.set;A=function(t,e){return e.facade=t,G.call(B,t,e),e},k=function(t){return W.call(B,t)||{}},$=function(t){return q.call(B,t)}}else{var V=F[L="state"]||(F[L]=w(L));K[V]=!0,A=function(t,e){return e.facade=t,h(t,V,e),e},k=function(t){return E(t,V)?t[V]:{}},$=function(t){return E(t,V)}}var Y={set:A,get:k,has:$,enforce:function(t){return $(t)?k(t):A(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=k(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},X=e((function(t){var e=Y.get,n=Y.enforce,o=String(String).split("String");(t.exports=function(t,e,i,c){var u,a=!!c&&!!c.unsafe,l=!!c&&!!c.enumerable,f=!!c&&!!c.noTargetGet;"function"==typeof i&&("string"!=typeof e||E(i,"name")||h(i,"name",e),(u=n(i)).source||(u.source=o.join("string"==typeof e?e:""))),t!==r?(a?!f&&t[e]&&(l=!0):delete t[e],l?t[e]=i:h(t,e,i)):l?t[e]=i:y(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||M(this)}))})),H={}.toString,J=function(t){return H.call(t).slice(8,-1)},Q=P("toStringTag"),Z="Arguments"==J(function(){return arguments}()),tt=C?J:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Q))?n:Z?J(e):"Object"==(r=J(e))&&"function"==typeof e.callee?"Arguments":r},et=C?{}.toString:function(){return"[object "+tt(this)+"]"};C||X(Object.prototype,"toString",et,{unsafe:!0});var nt=/#|\.prototype\./,rt=function(t,e){var n=it[ot(t)];return n==ut||n!=ct&&("function"==typeof e?o(e):!!e)},ot=rt.normalize=function(t){return String(t).replace(nt,".").toLowerCase()},it=rt.data={},ct=rt.NATIVE="N",ut=rt.POLYFILL="P",at=rt,lt=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return f(n),function(t){if(!c(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(r),e?t.call(n,r):n.__proto__=r,n}}():void 0),ft="".split,st=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==J(t)?ft.call(t,""):Object(t)}:Object,pt=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},gt=function(t){return st(pt(t))},dt=Math.ceil,ht=Math.floor,yt=function(t){return isNaN(t=+t)?0:(t>0?ht:dt)(t)},vt=Math.min,bt=function(t){return t>0?vt(yt(t),9007199254740991):0},xt=Math.max,Et=Math.min,mt=function(t){return function(e,n,r){var o,i=gt(e),c=bt(i.length),u=function(t,e){var n=yt(t);return n<0?xt(n+e,0):Et(n,e)}(r,c);if(t&&n!=n){for(;c>u;)if((o=i[u++])!=o)return!0}else for(;c>u;u++)if((t||u in i)&&i[u]===n)return t||u||0;return!t&&-1}},St={includes:mt(!0),indexOf:mt(!1)}.indexOf,wt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),Ot={f:Object.getOwnPropertyNames||function(t){return function(t,e){var n,r=gt(t),o=0,i=[];for(n in r)!E(K,n)&&E(r,n)&&i.push(n);for(;e.length>o;)E(r,n=e[o++])&&(~St(i,n)||i.push(n));return i}(t,wt)}},Rt=P("match"),_t=function(){var t=f(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e};function Tt(t,e){return RegExp(t,e)}var jt={UNSUPPORTED_Y:o((function(){var t=Tt("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),BROKEN_CARET:o((function(){var t=Tt("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},Pt=r,It=function(t){return"function"==typeof t?t:void 0},Ct=function(t,e){return arguments.length<2?It(Pt[t])||It(r[t]):Pt[t]&&Pt[t][e]||r[t]&&r[t][e]},Nt=P("species"),At=g.f,kt=Ot.f,$t=Y.set,Lt=P("match"),Mt=r.RegExp,Ut=Mt.prototype,Dt=/a/g,Ft=/a/g,Kt=new Mt(Dt)!==Dt,zt=jt.UNSUPPORTED_Y;if(i&&at("RegExp",!Kt||zt||o((function(){return Ft[Lt]=!1,Mt(Dt)!=Dt||Mt(Ft)==Ft||"/a/i"!=Mt(Dt,"i")})))){for(var Bt=function(t,e){var n,r,o,i=this instanceof Bt,u=c(n=t)&&(void 0!==(r=n[Rt])?!!r:"RegExp"==J(n)),a=void 0===e;if(!i&&u&&t.constructor===Bt&&a)return t;Kt?u&&!a&&(t=t.source):t instanceof Bt&&(a&&(e=_t.call(t)),t=t.source),zt&&(o=!!e&&e.indexOf("y")>-1)&&(e=e.replace(/y/g,""));var l,f,s,p,g,d=(l=Kt?new Mt(t,e):Mt(t,e),f=i?this:Ut,s=Bt,lt&&"function"==typeof(p=f.constructor)&&p!==s&&c(g=p.prototype)&&g!==s.prototype&&lt(l,g),l);return zt&&o&&$t(d,{sticky:o}),d},Wt=function(t){t in Bt||At(Bt,t,{configurable:!0,get:function(){return Mt[t]},set:function(e){Mt[t]=e}})},qt=kt(Mt),Gt=0;qt.length>Gt;)Wt(qt[Gt++]);Ut.constructor=Bt,Bt.prototype=Ut,X(r,"RegExp",Bt)}!function(t){var e=Ct(t),n=g.f;i&&e&&!e[Nt]&&n(e,Nt,{configurable:!0,get:function(){return this}})}("RegExp");var Vt={}.propertyIsEnumerable,Yt=Object.getOwnPropertyDescriptor,Xt={f:Yt&&!Vt.call({1:2},1)?function(t){var e=Yt(this,t);return!!e&&e.enumerable}:Vt},Ht=Object.getOwnPropertyDescriptor,Jt={f:i?Ht:function(t,e){if(t=gt(t),e=s(e,!0),l)try{return Ht(t,e)}catch(t){}if(E(t,e))return d(!Xt.f.call(t,e),t[e])}},Qt={f:Object.getOwnPropertySymbols},Zt=Ct("Reflect","ownKeys")||function(t){var e=Ot.f(f(t)),n=Qt.f;return n?e.concat(n(t)):e},te=function(t,e){for(var n=Zt(e),r=g.f,o=Jt.f,i=0;i<n.length;i++){var c=n[i];E(t,c)||r(t,c,o(e,c))}},ee=Jt.f,ne=RegExp.prototype.exec,re=String.prototype.replace,oe=ne,ie=function(){var t=/a/,e=/b*/g;return ne.call(t,"a"),ne.call(e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),ce=jt.UNSUPPORTED_Y||jt.BROKEN_CARET,ue=void 0!==/()??/.exec("")[1];(ie||ue||ce)&&(oe=function(t){var e,n,r,o,i=this,c=ce&&i.sticky,u=_t.call(i),a=i.source,l=0,f=t;return c&&(-1===(u=u.replace("y","")).indexOf("g")&&(u+="g"),f=String(t).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==t[i.lastIndex-1])&&(a="(?: "+a+")",f=" "+f,l++),n=new RegExp("^(?:"+a+")",u)),ue&&(n=new RegExp("^"+a+"$(?!\\s)",u)),ie&&(e=i.lastIndex),r=ne.call(c?n:i,f),c?r?(r.input=r.input.slice(l),r[0]=r[0].slice(l),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:ie&&r&&(i.lastIndex=i.global?r.index+r[0].length:e),ue&&r&&r.length>1&&re.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r});var ae=oe;!function(t,e){var n,o,i,c,u,a=t.target,l=t.global,f=t.stat;if(n=l?r:f?r[a]||y(a,{}):(r[a]||{}).prototype)for(o in e){if(c=e[o],i=t.noTargetGet?(u=ee(n,o))&&u.value:n[o],!at(l?o:a+(f?".":"#")+o,t.forced)&&void 0!==i){if(typeof c==typeof i)continue;te(c,i)}(t.sham||i&&i.sham)&&h(c,"sham",!0),X(n,o,c,t)}}({target:"RegExp",proto:!0,forced:/./.exec!==ae},{exec:ae});var le=RegExp.prototype,fe=le.toString,se=o((function(){return"/a/b"!=fe.call({source:"a",flags:"b"})})),pe="toString"!=fe.name;(se||pe)&&X(RegExp.prototype,"toString",(function(){var t=f(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(void 0===n&&t instanceof RegExp&&!("flags"in le)?_t.call(t):n)}),{unsafe:!0});var ge=P("species"),de=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),he="$0"==="a".replace(/./,"$0"),ye=P("replace"),ve=!!/./[ye]&&""===/./[ye]("a","$0"),be=!o((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),xe=function(t){return function(e,n){var r,o,i=String(pt(e)),c=yt(n),u=i.length;return c<0||c>=u?t?"":void 0:(r=i.charCodeAt(c))<55296||r>56319||c+1===u||(o=i.charCodeAt(c+1))<56320||o>57343?t?i.charAt(c):r:t?i.slice(c,c+2):o-56320+(r-55296<<10)+65536}},Ee={codeAt:xe(!1),charAt:xe(!0)}.charAt,me=function(t,e,n){return e+(n?Ee(t,e).length:1)},Se=function(t,e){var n=t.exec;if("function"==typeof n){var r=n.call(t,e);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==J(t))throw TypeError("RegExp#exec called on incompatible receiver");return ae.call(t,e)},we=Math.max,Oe=Math.min,Re=Math.floor,_e=/\$([$&'`]|\d\d?|<[^>]*>)/g,Te=/\$([$&'`]|\d\d?)/g;!function(t,e,n,r){var i=P(t),c=!o((function(){var e={};return e[i]=function(){return 7},7!=""[t](e)})),u=c&&!o((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[ge]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return e=!0,null},n[i](""),!e}));if(!c||!u||"replace"===t&&(!de||!he||ve)||"split"===t&&!be){var a=/./[i],l=n(i,""[t],(function(t,e,n,r,o){return e.exec===ae?c&&!o?{done:!0,value:a.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:he,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:ve}),f=l[0],s=l[1];X(String.prototype,t,f),X(RegExp.prototype,i,2==e?function(t,e){return s.call(t,this,e)}:function(t){return s.call(t,this)})}r&&h(RegExp.prototype[i],"sham",!0)}("replace",2,(function(t,e,n,r){var o=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,c=o?"$":"$0";return[function(n,r){var o=pt(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,o,r):e.call(String(o),n,r)},function(t,r){if(!o&&i||"string"==typeof r&&-1===r.indexOf(c)){var a=n(e,t,this,r);if(a.done)return a.value}var l=f(t),s=String(this),p="function"==typeof r;p||(r=String(r));var g=l.global;if(g){var d=l.unicode;l.lastIndex=0}for(var h=[];;){var y=Se(l,s);if(null===y)break;if(h.push(y),!g)break;""===String(y[0])&&(l.lastIndex=me(s,bt(l.lastIndex),d))}for(var v,b="",x=0,E=0;E<h.length;E++){y=h[E];for(var m=String(y[0]),S=we(Oe(yt(y.index),s.length),0),w=[],O=1;O<y.length;O++)w.push(void 0===(v=y[O])?v:String(v));var R=y.groups;if(p){var _=[m].concat(w,S,s);void 0!==R&&_.push(R);var T=String(r.apply(void 0,_))}else T=u(m,s,S,w,R,r);S>=x&&(b+=s.slice(x,S)+T,x=S+m.length)}return b+s.slice(x)}];function u(t,n,r,o,i,c){var u=r+t.length,a=o.length,l=Te;return void 0!==i&&(i=Object(pt(i)),l=_e),e.call(c,l,(function(e,c){var l;switch(c.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(u);case"<":l=i[c.slice(1,-1)];break;default:var f=+c;if(0===f)return e;if(f>a){var s=Re(f/10);return 0===s?e:s<=a?void 0===o[s-1]?c.charAt(1):o[s-1]+c.charAt(1):e}l=o[f-1]}return void 0===l?"":l}))}}));export default function(){var t,e,n,r,o,i,c;function u(){(e=document.createElement("div")).classList.add("searchbox"),e.style.position="absolute",e.style.top="10px",e.style.right="10px",e.style.zIndex=10,e.innerHTML='<input type="search" class="searchinput" placeholder="Search..." style="vertical-align: top;"/>\n\t\t</span>',(n=e.querySelector(".searchinput")).style.width="240px",n.style.fontSize="14px",n.style.padding="4px 6px",n.style.color="#000",n.style.background="#fff",n.style.borderRadius="2px",n.style.border="0",n.style.outline="0",n.style.boxShadow="0 2px 18px rgba(0, 0, 0, 0.2)",n.style["-webkit-appearance"]="none",t.getRevealElement().appendChild(e),n.addEventListener("keyup",(function(e){switch(e.keyCode){case 13:e.preventDefault(),function(){if(i){var e=n.value;""===e?(c&&c.remove(),r=null):(c=new f("slidecontent"),r=c.apply(e),o=0)}r&&(r.length&&r.length<=o&&(o=0),r.length>o&&(t.slide(r[o].h,r[o].v),o++))}(),i=!1;break;default:i=!0}}),!1),l()}function a(){e||u(),e.style.display="inline",n.focus(),n.select()}function l(){e||u(),e.style.display="none",c&&c.remove()}function f(e,n){var r=document.getElementById(e)||document.body,o=n||"EM",i=new RegExp("^(?:"+o+"|SCRIPT|FORM)$"),c=["#ff6","#a0ffff","#9f9","#f99","#f6f"],u=[],a=0,l="",f=[];this.setRegex=function(t){t=t.replace(/^[^\w]+|[^\w]+$/g,"").replace(/[^\w'-]+/g,"|"),l=new RegExp("("+t+")","i")},this.getRegex=function(){return l.toString().replace(/^\/\\b\(|\)\\b\/i$/g,"").replace(/\|/g," ")},this.hiliteWords=function(e){if(null!=e&&e&&l&&!i.test(e.nodeName)){if(e.hasChildNodes())for(var n=0;n<e.childNodes.length;n++)this.hiliteWords(e.childNodes[n]);var r,s;if(3==e.nodeType)if((r=e.nodeValue)&&(s=l.exec(r))){for(var p=e;null!=p&&"SECTION"!=p.nodeName;)p=p.parentNode;var g=t.getIndices(p),d=f.length,h=!1;for(n=0;n<d;n++)f[n].h===g.h&&f[n].v===g.v&&(h=!0);h||f.push(g),u[s[0].toLowerCase()]||(u[s[0].toLowerCase()]=c[a++%c.length]);var y=document.createElement(o);y.appendChild(document.createTextNode(s[0])),y.style.backgroundColor=u[s[0].toLowerCase()],y.style.fontStyle="inherit",y.style.color="#000";var v=e.splitText(s.index);v.nodeValue=v.nodeValue.substring(s[0].length),e.parentNode.insertBefore(y,v)}}},this.remove=function(){for(var t,e=document.getElementsByTagName(o);e.length&&(t=e[0]);)t.parentNode.replaceChild(t.firstChild,t)},this.apply=function(t){if(null!=t&&t)return this.remove(),this.setRegex(t),this.hiliteWords(r),f}}return{id:"search",init:function(n){(t=n).registerKeyboardShortcut("CTRL + Shift + F","Search"),document.addEventListener("keydown",(function(t){"F"==t.key&&(t.ctrlKey||t.metaKey)&&(t.preventDefault(),e||u(),"inline"!==e.style.display?a():l())}),!1)},open:a}}
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).RevealSearch=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var n=function(e){return e&&e.Math==Math&&e},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")(),o=function(e){try{return!!e()}catch(e){return!0}},i=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c=function(e){return"object"==typeof e?null!==e:"function"==typeof e},u=r.document,a=c(u)&&c(u.createElement),l=!i&&!o((function(){return 7!=Object.defineProperty((e="div",a?u.createElement(e):{}),"a",{get:function(){return 7}}).a;var e})),f=function(e){if(!c(e))throw TypeError(String(e)+" is not an object");return e},s=function(e,t){if(!c(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!c(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!c(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!c(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},p=Object.defineProperty,d={f:i?p:function(e,t,n){if(f(e),t=s(t,!0),f(n),l)try{return p(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},g=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},h=i?function(e,t,n){return d.f(e,t,g(1,n))}:function(e,t,n){return e[t]=n,e},y=function(e,t){try{h(r,e,t)}catch(n){r[e]=t}return t},v="__core-js_shared__",b=r[v]||y(v,{}),x=t((function(e){(e.exports=function(e,t){return b[e]||(b[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.7.0",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),m={}.hasOwnProperty,E=function(e,t){return m.call(e,t)},S=0,w=Math.random(),R=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++S+w).toString(36)},O=!!Object.getOwnPropertySymbols&&!o((function(){return!String(Symbol())})),T=O&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,_=x("wks"),j=r.Symbol,P=T?j:j&&j.withoutSetter||R,I=function(e){return E(_,e)||(O&&E(j,e)?_[e]=j[e]:_[e]=P("Symbol."+e)),_[e]},C={};C[I("toStringTag")]="z";var N="[object z]"===String(C),A=Function.toString;"function"!=typeof b.inspectSource&&(b.inspectSource=function(e){return A.call(e)});var k,$,L,M,U=b.inspectSource,D=r.WeakMap,F="function"==typeof D&&/native code/.test(U(D)),K=x("keys"),z={},B=r.WeakMap;if(F){var W=b.state||(b.state=new B),q=W.get,G=W.has,V=W.set;k=function(e,t){return t.facade=e,V.call(W,e,t),t},$=function(e){return q.call(W,e)||{}},L=function(e){return G.call(W,e)}}else{var Y=K[M="state"]||(K[M]=R(M));z[Y]=!0,k=function(e,t){return t.facade=e,h(e,Y,t),t},$=function(e){return E(e,Y)?e[Y]:{}},L=function(e){return E(e,Y)}}var X={set:k,get:$,has:L,enforce:function(e){return L(e)?$(e):k(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=$(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},H=t((function(e){var t=X.get,n=X.enforce,o=String(String).split("String");(e.exports=function(e,t,i,c){var u,a=!!c&&!!c.unsafe,l=!!c&&!!c.enumerable,f=!!c&&!!c.noTargetGet;"function"==typeof i&&("string"!=typeof t||E(i,"name")||h(i,"name",t),(u=n(i)).source||(u.source=o.join("string"==typeof t?t:""))),e!==r?(a?!f&&e[t]&&(l=!0):delete e[t],l?e[t]=i:h(e,t,i)):l?e[t]=i:y(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||U(this)}))})),J={}.toString,Q=function(e){return J.call(e).slice(8,-1)},Z=I("toStringTag"),ee="Arguments"==Q(function(){return arguments}()),te=N?Q:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),Z))?n:ee?Q(t):"Object"==(r=Q(t))&&"function"==typeof t.callee?"Arguments":r},ne=N?{}.toString:function(){return"[object "+te(this)+"]"};N||H(Object.prototype,"toString",ne,{unsafe:!0});var re=/#|\.prototype\./,oe=function(e,t){var n=ce[ie(e)];return n==ae||n!=ue&&("function"==typeof t?o(t):!!t)},ie=oe.normalize=function(e){return String(e).replace(re,".").toLowerCase()},ce=oe.data={},ue=oe.NATIVE="N",ae=oe.POLYFILL="P",le=oe,fe=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return f(n),function(e){if(!c(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype")}(r),t?e.call(n,r):n.__proto__=r,n}}():void 0),se="".split,pe=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==Q(e)?se.call(e,""):Object(e)}:Object,de=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},ge=function(e){return pe(de(e))},he=Math.ceil,ye=Math.floor,ve=function(e){return isNaN(e=+e)?0:(e>0?ye:he)(e)},be=Math.min,xe=function(e){return e>0?be(ve(e),9007199254740991):0},me=Math.max,Ee=Math.min,Se=function(e){return function(t,n,r){var o,i=ge(t),c=xe(i.length),u=function(e,t){var n=ve(e);return n<0?me(n+t,0):Ee(n,t)}(r,c);if(e&&n!=n){for(;c>u;)if((o=i[u++])!=o)return!0}else for(;c>u;u++)if((e||u in i)&&i[u]===n)return e||u||0;return!e&&-1}},we={includes:Se(!0),indexOf:Se(!1)}.indexOf,Re=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),Oe={f:Object.getOwnPropertyNames||function(e){return function(e,t){var n,r=ge(e),o=0,i=[];for(n in r)!E(z,n)&&E(r,n)&&i.push(n);for(;t.length>o;)E(r,n=t[o++])&&(~we(i,n)||i.push(n));return i}(e,Re)}},Te=I("match"),_e=function(){var e=f(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};function je(e,t){return RegExp(e,t)}var Pe={UNSUPPORTED_Y:o((function(){var e=je("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET:o((function(){var e=je("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},Ie=r,Ce=function(e){return"function"==typeof e?e:void 0},Ne=function(e,t){return arguments.length<2?Ce(Ie[e])||Ce(r[e]):Ie[e]&&Ie[e][t]||r[e]&&r[e][t]},Ae=I("species"),ke=d.f,$e=Oe.f,Le=X.set,Me=I("match"),Ue=r.RegExp,De=Ue.prototype,Fe=/a/g,Ke=/a/g,ze=new Ue(Fe)!==Fe,Be=Pe.UNSUPPORTED_Y;if(i&&le("RegExp",!ze||Be||o((function(){return Ke[Me]=!1,Ue(Fe)!=Fe||Ue(Ke)==Ke||"/a/i"!=Ue(Fe,"i")})))){for(var We=function(e,t){var n,r,o,i=this instanceof We,u=c(n=e)&&(void 0!==(r=n[Te])?!!r:"RegExp"==Q(n)),a=void 0===t;if(!i&&u&&e.constructor===We&&a)return e;ze?u&&!a&&(e=e.source):e instanceof We&&(a&&(t=_e.call(e)),e=e.source),Be&&(o=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var l,f,s,p,d,g=(l=ze?new Ue(e,t):Ue(e,t),f=i?this:De,s=We,fe&&"function"==typeof(p=f.constructor)&&p!==s&&c(d=p.prototype)&&d!==s.prototype&&fe(l,d),l);return Be&&o&&Le(g,{sticky:o}),g},qe=function(e){e in We||ke(We,e,{configurable:!0,get:function(){return Ue[e]},set:function(t){Ue[e]=t}})},Ge=$e(Ue),Ve=0;Ge.length>Ve;)qe(Ge[Ve++]);De.constructor=We,We.prototype=De,H(r,"RegExp",We)}!function(e){var t=Ne(e),n=d.f;i&&t&&!t[Ae]&&n(t,Ae,{configurable:!0,get:function(){return this}})}("RegExp");var Ye={}.propertyIsEnumerable,Xe=Object.getOwnPropertyDescriptor,He={f:Xe&&!Ye.call({1:2},1)?function(e){var t=Xe(this,e);return!!t&&t.enumerable}:Ye},Je=Object.getOwnPropertyDescriptor,Qe={f:i?Je:function(e,t){if(e=ge(e),t=s(t,!0),l)try{return Je(e,t)}catch(e){}if(E(e,t))return g(!He.f.call(e,t),e[t])}},Ze={f:Object.getOwnPropertySymbols},et=Ne("Reflect","ownKeys")||function(e){var t=Oe.f(f(e)),n=Ze.f;return n?t.concat(n(e)):t},tt=function(e,t){for(var n=et(t),r=d.f,o=Qe.f,i=0;i<n.length;i++){var c=n[i];E(e,c)||r(e,c,o(t,c))}},nt=Qe.f,rt=RegExp.prototype.exec,ot=String.prototype.replace,it=rt,ct=function(){var e=/a/,t=/b*/g;return rt.call(e,"a"),rt.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),ut=Pe.UNSUPPORTED_Y||Pe.BROKEN_CARET,at=void 0!==/()??/.exec("")[1];(ct||at||ut)&&(it=function(e){var t,n,r,o,i=this,c=ut&&i.sticky,u=_e.call(i),a=i.source,l=0,f=e;return c&&(-1===(u=u.replace("y","")).indexOf("g")&&(u+="g"),f=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(a="(?: "+a+")",f=" "+f,l++),n=new RegExp("^(?:"+a+")",u)),at&&(n=new RegExp("^"+a+"$(?!\\s)",u)),ct&&(t=i.lastIndex),r=rt.call(c?n:i,f),c?r?(r.input=r.input.slice(l),r[0]=r[0].slice(l),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:ct&&r&&(i.lastIndex=i.global?r.index+r[0].length:t),at&&r&&r.length>1&&ot.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r});var lt=it;!function(e,t){var n,o,i,c,u,a=e.target,l=e.global,f=e.stat;if(n=l?r:f?r[a]||y(a,{}):(r[a]||{}).prototype)for(o in t){if(c=t[o],i=e.noTargetGet?(u=nt(n,o))&&u.value:n[o],!le(l?o:a+(f?".":"#")+o,e.forced)&&void 0!==i){if(typeof c==typeof i)continue;tt(c,i)}(e.sham||i&&i.sham)&&h(c,"sham",!0),H(n,o,c,e)}}({target:"RegExp",proto:!0,forced:/./.exec!==lt},{exec:lt});var ft="toString",st=RegExp.prototype,pt=st.toString,dt=o((function(){return"/a/b"!=pt.call({source:"a",flags:"b"})})),gt=pt.name!=ft;(dt||gt)&&H(RegExp.prototype,ft,(function(){var e=f(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in st)?_e.call(e):n)}),{unsafe:!0});var ht=I("species"),yt=!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),vt="$0"==="a".replace(/./,"$0"),bt=I("replace"),xt=!!/./[bt]&&""===/./[bt]("a","$0"),mt=!o((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),Et=function(e){return function(t,n){var r,o,i=String(de(t)),c=ve(n),u=i.length;return c<0||c>=u?e?"":void 0:(r=i.charCodeAt(c))<55296||r>56319||c+1===u||(o=i.charCodeAt(c+1))<56320||o>57343?e?i.charAt(c):r:e?i.slice(c,c+2):o-56320+(r-55296<<10)+65536}},St={codeAt:Et(!1),charAt:Et(!0)}.charAt,wt=function(e,t,n){return t+(n?St(e,t).length:1)},Rt=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==Q(e))throw TypeError("RegExp#exec called on incompatible receiver");return lt.call(e,t)},Ot=Math.max,Tt=Math.min,_t=Math.floor,jt=/\$([$&'`]|\d\d?|<[^>]*>)/g,Pt=/\$([$&'`]|\d\d?)/g;!function(e,t,n,r){var i=I(e),c=!o((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),u=c&&!o((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[ht]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!c||!u||"replace"===e&&(!yt||!vt||xt)||"split"===e&&!mt){var a=/./[i],l=n(i,""[e],(function(e,t,n,r,o){return t.exec===lt?c&&!o?{done:!0,value:a.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:vt,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:xt}),f=l[0],s=l[1];H(String.prototype,e,f),H(RegExp.prototype,i,2==t?function(e,t){return s.call(e,this,t)}:function(e){return s.call(e,this)})}r&&h(RegExp.prototype[i],"sham",!0)}("replace",2,(function(e,t,n,r){var o=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,c=o?"$":"$0";return[function(n,r){var o=de(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):t.call(String(o),n,r)},function(e,r){if(!o&&i||"string"==typeof r&&-1===r.indexOf(c)){var a=n(t,e,this,r);if(a.done)return a.value}var l=f(e),s=String(this),p="function"==typeof r;p||(r=String(r));var d=l.global;if(d){var g=l.unicode;l.lastIndex=0}for(var h=[];;){var y=Rt(l,s);if(null===y)break;if(h.push(y),!d)break;""===String(y[0])&&(l.lastIndex=wt(s,xe(l.lastIndex),g))}for(var v,b="",x=0,m=0;m<h.length;m++){y=h[m];for(var E=String(y[0]),S=Ot(Tt(ve(y.index),s.length),0),w=[],R=1;R<y.length;R++)w.push(void 0===(v=y[R])?v:String(v));var O=y.groups;if(p){var T=[E].concat(w,S,s);void 0!==O&&T.push(O);var _=String(r.apply(void 0,T))}else _=u(E,s,S,w,O,r);S>=x&&(b+=s.slice(x,S)+_,x=S+E.length)}return b+s.slice(x)}];function u(e,n,r,o,i,c){var u=r+e.length,a=o.length,l=Pt;return void 0!==i&&(i=Object(de(i)),l=jt),t.call(c,l,(function(t,c){var l;switch(c.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(u);case"<":l=i[c.slice(1,-1)];break;default:var f=+c;if(0===f)return t;if(f>a){var s=_t(f/10);return 0===s?t:s<=a?void 0===o[s-1]?c.charAt(1):o[s-1]+c.charAt(1):t}l=o[f-1]}return void 0===l?"":l}))}}));return function(){var e,t,n,r,o,i,c;function u(){(t=document.createElement("div")).classList.add("searchbox"),t.style.position="absolute",t.style.top="10px",t.style.right="10px",t.style.zIndex=10,t.innerHTML='<input type="search" class="searchinput" placeholder="Search..." style="vertical-align: top;"/>\n\t\t</span>',(n=t.querySelector(".searchinput")).style.width="240px",n.style.fontSize="14px",n.style.padding="4px 6px",n.style.color="#000",n.style.background="#fff",n.style.borderRadius="2px",n.style.border="0",n.style.outline="0",n.style.boxShadow="0 2px 18px rgba(0, 0, 0, 0.2)",n.style["-webkit-appearance"]="none",e.getRevealElement().appendChild(t),n.addEventListener("keyup",(function(t){switch(t.keyCode){case 13:t.preventDefault(),function(){if(i){var t=n.value;""===t?(c&&c.remove(),r=null):(c=new f("slidecontent"),r=c.apply(t),o=0)}r&&(r.length&&r.length<=o&&(o=0),r.length>o&&(e.slide(r[o].h,r[o].v),o++))}(),i=!1;break;default:i=!0}}),!1),l()}function a(){t||u(),t.style.display="inline",n.focus(),n.select()}function l(){t||u(),t.style.display="none",c&&c.remove()}function f(t,n){var r=document.getElementById(t)||document.body,o=n||"EM",i=new RegExp("^(?:"+o+"|SCRIPT|FORM)$"),c=["#ff6","#a0ffff","#9f9","#f99","#f6f"],u=[],a=0,l="",f=[];this.setRegex=function(e){e=e.replace(/^[^\w]+|[^\w]+$/g,"").replace(/[^\w'-]+/g,"|"),l=new RegExp("("+e+")","i")},this.getRegex=function(){return l.toString().replace(/^\/\\b\(|\)\\b\/i$/g,"").replace(/\|/g," ")},this.hiliteWords=function(t){if(null!=t&&t&&l&&!i.test(t.nodeName)){if(t.hasChildNodes())for(var n=0;n<t.childNodes.length;n++)this.hiliteWords(t.childNodes[n]);var r,s;if(3==t.nodeType)if((r=t.nodeValue)&&(s=l.exec(r))){for(var p=t;null!=p&&"SECTION"!=p.nodeName;)p=p.parentNode;var d=e.getIndices(p),g=f.length,h=!1;for(n=0;n<g;n++)f[n].h===d.h&&f[n].v===d.v&&(h=!0);h||f.push(d),u[s[0].toLowerCase()]||(u[s[0].toLowerCase()]=c[a++%c.length]);var y=document.createElement(o);y.appendChild(document.createTextNode(s[0])),y.style.backgroundColor=u[s[0].toLowerCase()],y.style.fontStyle="inherit",y.style.color="#000";var v=t.splitText(s.index);v.nodeValue=v.nodeValue.substring(s[0].length),t.parentNode.insertBefore(y,v)}}},this.remove=function(){for(var e,t=document.getElementsByTagName(o);t.length&&(e=t[0]);)e.parentNode.replaceChild(e.firstChild,e)},this.apply=function(e){if(null!=e&&e)return this.remove(),this.setRegex(e),this.hiliteWords(r),f}}return{id:"search",init:function(n){(e=n).registerKeyboardShortcut("CTRL + Shift + F","Search"),document.addEventListener("keydown",(function(e){"F"==e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),t||u(),"inline"!==t.style.display?a():l())}),!1)},open:a}}}));
/*!
* reveal.js Zoom plugin
*/
const Plugin = {
id: 'zoom',
init: function( reveal ) {
reveal.getRevealElement().addEventListener( 'mousedown', function( event ) {
var defaultModifier = /Linux/.test( window.navigator.platform ) ? 'ctrl' : 'alt';
var modifier = ( reveal.getConfig().zoomKey ? reveal.getConfig().zoomKey : defaultModifier ) + 'Key';
var zoomLevel = ( reveal.getConfig().zoomLevel ? reveal.getConfig().zoomLevel : 2 );
if( event[ modifier ] && !reveal.isOverview() ) {
event.preventDefault();
zoom.to({
x: event.clientX,
y: event.clientY,
scale: zoomLevel,
pan: false
});
}
} );
}
};
export default () => Plugin;
/*!
* zoom.js 0.3 (modified for use with reveal.js)
* http://lab.hakim.se/zoom-js
* MIT licensed
*
* Copyright (C) 2011-2014 Hakim El Hattab, http://hakim.se
*/
var zoom = (function(){
// The current zoom level (scale)
var level = 1;
// The current mouse position, used for panning
var mouseX = 0,
mouseY = 0;
// Timeout before pan is activated
var panEngageTimeout = -1,
panUpdateInterval = -1;
// Check for transform support so that we can fallback otherwise
var supportsTransforms = 'WebkitTransform' in document.body.style ||
'MozTransform' in document.body.style ||
'msTransform' in document.body.style ||
'OTransform' in document.body.style ||
'transform' in document.body.style;
if( supportsTransforms ) {
// The easing that will be applied when we zoom in/out
document.body.style.transition = 'transform 0.8s ease';
document.body.style.OTransition = '-o-transform 0.8s ease';
document.body.style.msTransition = '-ms-transform 0.8s ease';
document.body.style.MozTransition = '-moz-transform 0.8s ease';
document.body.style.WebkitTransition = '-webkit-transform 0.8s ease';
}
// Zoom out if the user hits escape
document.addEventListener( 'keyup', function( event ) {
if( level !== 1 && event.keyCode === 27 ) {
zoom.out();
}
} );
// Monitor mouse movement for panning
document.addEventListener( 'mousemove', function( event ) {
if( level !== 1 ) {
mouseX = event.clientX;
mouseY = event.clientY;
}
} );
/**
* Applies the CSS required to zoom in, prefers the use of CSS3
* transforms but falls back on zoom for IE.
*
* @param {Object} rect
* @param {Number} scale
*/
function magnify( rect, scale ) {
var scrollOffset = getScrollOffset();
// Ensure a width/height is set
rect.width = rect.width || 1;
rect.height = rect.height || 1;
// Center the rect within the zoomed viewport
rect.x -= ( window.innerWidth - ( rect.width * scale ) ) / 2;
rect.y -= ( window.innerHeight - ( rect.height * scale ) ) / 2;
if( supportsTransforms ) {
// Reset
if( scale === 1 ) {
document.body.style.transform = '';
document.body.style.OTransform = '';
document.body.style.msTransform = '';
document.body.style.MozTransform = '';
document.body.style.WebkitTransform = '';
}
// Scale
else {
var origin = scrollOffset.x +'px '+ scrollOffset.y +'px',
transform = 'translate('+ -rect.x +'px,'+ -rect.y +'px) scale('+ scale +')';
document.body.style.transformOrigin = origin;
document.body.style.OTransformOrigin = origin;
document.body.style.msTransformOrigin = origin;
document.body.style.MozTransformOrigin = origin;
document.body.style.WebkitTransformOrigin = origin;
document.body.style.transform = transform;
document.body.style.OTransform = transform;
document.body.style.msTransform = transform;
document.body.style.MozTransform = transform;
document.body.style.WebkitTransform = transform;
}
}
else {
// Reset
if( scale === 1 ) {
document.body.style.position = '';
document.body.style.left = '';
document.body.style.top = '';
document.body.style.width = '';
document.body.style.height = '';
document.body.style.zoom = '';
}
// Scale
else {
document.body.style.position = 'relative';
document.body.style.left = ( - ( scrollOffset.x + rect.x ) / scale ) + 'px';
document.body.style.top = ( - ( scrollOffset.y + rect.y ) / scale ) + 'px';
document.body.style.width = ( scale * 100 ) + '%';
document.body.style.height = ( scale * 100 ) + '%';
document.body.style.zoom = scale;
}
}
level = scale;
if( document.documentElement.classList ) {
if( level !== 1 ) {
document.documentElement.classList.add( 'zoomed' );
}
else {
document.documentElement.classList.remove( 'zoomed' );
}
}
}
/**
* Pan the document when the mosue cursor approaches the edges
* of the window.
*/
function pan() {
var range = 0.12,
rangeX = window.innerWidth * range,
rangeY = window.innerHeight * range,
scrollOffset = getScrollOffset();
// Up
if( mouseY < rangeY ) {
window.scroll( scrollOffset.x, scrollOffset.y - ( 1 - ( mouseY / rangeY ) ) * ( 14 / level ) );
}
// Down
else if( mouseY > window.innerHeight - rangeY ) {
window.scroll( scrollOffset.x, scrollOffset.y + ( 1 - ( window.innerHeight - mouseY ) / rangeY ) * ( 14 / level ) );
}
// Left
if( mouseX < rangeX ) {
window.scroll( scrollOffset.x - ( 1 - ( mouseX / rangeX ) ) * ( 14 / level ), scrollOffset.y );
}
// Right
else if( mouseX > window.innerWidth - rangeX ) {
window.scroll( scrollOffset.x + ( 1 - ( window.innerWidth - mouseX ) / rangeX ) * ( 14 / level ), scrollOffset.y );
}
}
function getScrollOffset() {
return {
x: window.scrollX !== undefined ? window.scrollX : window.pageXOffset,
y: window.scrollY !== undefined ? window.scrollY : window.pageYOffset
}
}
return {
/**
* Zooms in on either a rectangle or HTML element.
*
* @param {Object} options
* - element: HTML element to zoom in on
* OR
* - x/y: coordinates in non-transformed space to zoom in on
* - width/height: the portion of the screen to zoom in on
* - scale: can be used instead of width/height to explicitly set scale
*/
to: function( options ) {
// Due to an implementation limitation we can't zoom in
// to another element without zooming out first
if( level !== 1 ) {
zoom.out();
}
else {
options.x = options.x || 0;
options.y = options.y || 0;
// If an element is set, that takes precedence
if( !!options.element ) {
// Space around the zoomed in element to leave on screen
var padding = 20;
var bounds = options.element.getBoundingClientRect();
options.x = bounds.left - padding;
options.y = bounds.top - padding;
options.width = bounds.width + ( padding * 2 );
options.height = bounds.height + ( padding * 2 );
}
// If width/height values are set, calculate scale from those values
if( options.width !== undefined && options.height !== undefined ) {
options.scale = Math.max( Math.min( window.innerWidth / options.width, window.innerHeight / options.height ), 1 );
}
if( options.scale > 1 ) {
options.x *= options.scale;
options.y *= options.scale;
magnify( options, options.scale );
if( options.pan !== false ) {
// Wait with engaging panning as it may conflict with the
// zoom transition
panEngageTimeout = setTimeout( function() {
panUpdateInterval = setInterval( pan, 1000 / 60 );
}, 800 );
}
}
}
},
/**
* Resets the document zoom state to its default.
*/
out: function() {
clearTimeout( panEngageTimeout );
clearInterval( panUpdateInterval );
magnify( { x: 0, y: 0 }, 1 );
level = 1;
},
// Alias
magnify: function( options ) { this.to( options ) },
reset: function() { this.out() },
zoomLevel: function() {
return level;
}
}
})();
/*!
* reveal.js Zoom plugin
*/
var e={id:"zoom",init:function(e){e.getRevealElement().addEventListener("mousedown",(function(o){var n=/Linux/.test(window.navigator.platform)?"ctrl":"alt",i=(e.getConfig().zoomKey?e.getConfig().zoomKey:n)+"Key",d=e.getConfig().zoomLevel?e.getConfig().zoomLevel:2;o[i]&&!e.isOverview()&&(o.preventDefault(),t.to({x:o.clientX,y:o.clientY,scale:d,pan:!1}))}))}},t=function(){var e=1,o=0,n=0,i=-1,d=-1,s="WebkitTransform"in document.body.style||"MozTransform"in document.body.style||"msTransform"in document.body.style||"OTransform"in document.body.style||"transform"in document.body.style;function r(t,o){var n=y();if(t.width=t.width||1,t.height=t.height||1,t.x-=(window.innerWidth-t.width*o)/2,t.y-=(window.innerHeight-t.height*o)/2,s)if(1===o)document.body.style.transform="",document.body.style.OTransform="",document.body.style.msTransform="",document.body.style.MozTransform="",document.body.style.WebkitTransform="";else{var i=n.x+"px "+n.y+"px",d="translate("+-t.x+"px,"+-t.y+"px) scale("+o+")";document.body.style.transformOrigin=i,document.body.style.OTransformOrigin=i,document.body.style.msTransformOrigin=i,document.body.style.MozTransformOrigin=i,document.body.style.WebkitTransformOrigin=i,document.body.style.transform=d,document.body.style.OTransform=d,document.body.style.msTransform=d,document.body.style.MozTransform=d,document.body.style.WebkitTransform=d}else 1===o?(document.body.style.position="",document.body.style.left="",document.body.style.top="",document.body.style.width="",document.body.style.height="",document.body.style.zoom=""):(document.body.style.position="relative",document.body.style.left=-(n.x+t.x)/o+"px",document.body.style.top=-(n.y+t.y)/o+"px",document.body.style.width=100*o+"%",document.body.style.height=100*o+"%",document.body.style.zoom=o);e=o,document.documentElement.classList&&(1!==e?document.documentElement.classList.add("zoomed"):document.documentElement.classList.remove("zoomed"))}function m(){var t=.12*window.innerWidth,i=.12*window.innerHeight,d=y();n<i?window.scroll(d.x,d.y-14/e*(1-n/i)):n>window.innerHeight-i&&window.scroll(d.x,d.y+(1-(window.innerHeight-n)/i)*(14/e)),o<t?window.scroll(d.x-14/e*(1-o/t),d.y):o>window.innerWidth-t&&window.scroll(d.x+(1-(window.innerWidth-o)/t)*(14/e),d.y)}function y(){return{x:void 0!==window.scrollX?window.scrollX:window.pageXOffset,y:void 0!==window.scrollY?window.scrollY:window.pageYOffset}}return s&&(document.body.style.transition="transform 0.8s ease",document.body.style.OTransition="-o-transform 0.8s ease",document.body.style.msTransition="-ms-transform 0.8s ease",document.body.style.MozTransition="-moz-transform 0.8s ease",document.body.style.WebkitTransition="-webkit-transform 0.8s ease"),document.addEventListener("keyup",(function(o){1!==e&&27===o.keyCode&&t.out()})),document.addEventListener("mousemove",(function(t){1!==e&&(o=t.clientX,n=t.clientY)})),{to:function(o){if(1!==e)t.out();else{if(o.x=o.x||0,o.y=o.y||0,o.element){var n=o.element.getBoundingClientRect();o.x=n.left-20,o.y=n.top-20,o.width=n.width+40,o.height=n.height+40}void 0!==o.width&&void 0!==o.height&&(o.scale=Math.max(Math.min(window.innerWidth/o.width,window.innerHeight/o.height),1)),o.scale>1&&(o.x*=o.scale,o.y*=o.scale,r(o,o.scale),!1!==o.pan&&(i=setTimeout((function(){d=setInterval(m,1e3/60)}),800)))}},out:function(){clearTimeout(i),clearInterval(d),r({x:0,y:0},1),e=1},magnify:function(e){this.to(e)},reset:function(){this.out()},zoomLevel:function(){return e}}}();export default function(){return e}
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e="undefined"!=typeof globalThis?globalThis:e||self).RevealZoom=o()}(this,(function(){"use strict";
/*!
* reveal.js Zoom plugin
*/var e={id:"zoom",init:function(e){e.getRevealElement().addEventListener("mousedown",(function(t){var n=/Linux/.test(window.navigator.platform)?"ctrl":"alt",i=(e.getConfig().zoomKey?e.getConfig().zoomKey:n)+"Key",d=e.getConfig().zoomLevel?e.getConfig().zoomLevel:2;t[i]&&!e.isOverview()&&(t.preventDefault(),o.to({x:t.clientX,y:t.clientY,scale:d,pan:!1}))}))}},o=function(){var e=1,t=0,n=0,i=-1,d=-1,s="WebkitTransform"in document.body.style||"MozTransform"in document.body.style||"msTransform"in document.body.style||"OTransform"in document.body.style||"transform"in document.body.style;function r(o,t){var n=l();if(o.width=o.width||1,o.height=o.height||1,o.x-=(window.innerWidth-o.width*t)/2,o.y-=(window.innerHeight-o.height*t)/2,s)if(1===t)document.body.style.transform="",document.body.style.OTransform="",document.body.style.msTransform="",document.body.style.MozTransform="",document.body.style.WebkitTransform="";else{var i=n.x+"px "+n.y+"px",d="translate("+-o.x+"px,"+-o.y+"px) scale("+t+")";document.body.style.transformOrigin=i,document.body.style.OTransformOrigin=i,document.body.style.msTransformOrigin=i,document.body.style.MozTransformOrigin=i,document.body.style.WebkitTransformOrigin=i,document.body.style.transform=d,document.body.style.OTransform=d,document.body.style.msTransform=d,document.body.style.MozTransform=d,document.body.style.WebkitTransform=d}else 1===t?(document.body.style.position="",document.body.style.left="",document.body.style.top="",document.body.style.width="",document.body.style.height="",document.body.style.zoom=""):(document.body.style.position="relative",document.body.style.left=-(n.x+o.x)/t+"px",document.body.style.top=-(n.y+o.y)/t+"px",document.body.style.width=100*t+"%",document.body.style.height=100*t+"%",document.body.style.zoom=t);e=t,document.documentElement.classList&&(1!==e?document.documentElement.classList.add("zoomed"):document.documentElement.classList.remove("zoomed"))}function m(){var o=.12*window.innerWidth,i=.12*window.innerHeight,d=l();n<i?window.scroll(d.x,d.y-14/e*(1-n/i)):n>window.innerHeight-i&&window.scroll(d.x,d.y+(1-(window.innerHeight-n)/i)*(14/e)),t<o?window.scroll(d.x-14/e*(1-t/o),d.y):t>window.innerWidth-o&&window.scroll(d.x+(1-(window.innerWidth-t)/o)*(14/e),d.y)}function l(){return{x:void 0!==window.scrollX?window.scrollX:window.pageXOffset,y:void 0!==window.scrollY?window.scrollY:window.pageYOffset}}return s&&(document.body.style.transition="transform 0.8s ease",document.body.style.OTransition="-o-transform 0.8s ease",document.body.style.msTransition="-ms-transform 0.8s ease",document.body.style.MozTransition="-moz-transform 0.8s ease",document.body.style.WebkitTransition="-webkit-transform 0.8s ease"),document.addEventListener("keyup",(function(t){1!==e&&27===t.keyCode&&o.out()})),document.addEventListener("mousemove",(function(o){1!==e&&(t=o.clientX,n=o.clientY)})),{to:function(t){if(1!==e)o.out();else{if(t.x=t.x||0,t.y=t.y||0,t.element){var n=t.element.getBoundingClientRect();t.x=n.left-20,t.y=n.top-20,t.width=n.width+40,t.height=n.height+40}void 0!==t.width&&void 0!==t.height&&(t.scale=Math.max(Math.min(window.innerWidth/t.width,window.innerHeight/t.height),1)),t.scale>1&&(t.x*=t.scale,t.y*=t.scale,r(t,t.scale),!1!==t.pan&&(i=setTimeout((function(){d=setInterval(m,1e3/60)}),800)))}},out:function(){clearTimeout(i),clearInterval(d),r({x:0,y:0},1),e=1},magnify:function(e){this.to(e)},reset:function(){this.out()},zoomLevel:function(){return e}}}();return function(){return e}}));
hakyll-bootstrap/sample.png

46.9 KiB

# This file was automatically generated by 'stack init'
#
# Some commonly used options have been documented as comments in this file.
# For advanced use and comprehensive documentation of the format, please see:
# https://docs.haskellstack.org/en/stable/yaml_configuration/
# Resolver to choose a 'specific' stackage snapshot or a compiler version.
# A snapshot resolver dictates the compiler version and the set of packages
# to be used for project dependencies. For example:
#
# resolver: lts-3.5
# resolver: nightly-2015-09-21
# resolver: ghc-7.10.2
#
# The location of a snapshot can be provided as a file or url. Stack assumes
# a snapshot provided as a file might change, whereas a url resource does not.
#
# resolver: ./custom-snapshot.yaml
# resolver: https://example.com/snapshots/2018-01-01.yaml
resolver: nightly-2020-04-18
# User packages to be built.
# Various formats can be used as shown in the example below.
#
# packages:
# - some-directory
# - https://example.com/foo/bar/baz-0.0.2.tar.gz
# subdirs:
# - auto-update
# - wai
packages:
- .
# Dependency packages to be pulled from upstream that are not in the resolver.
# These entries can reference officially published versions as well as
# forks / in-progress versions pinned to a git hash. For example:
#
# extra-deps:
# - acme-missiles-0.3
# - git: https://github.com/commercialhaskell/stack.git
# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
#
extra-deps:
- pandoc-crossref-0.3.6.2
- data-accessor-template-0.2.1.16
- roman-numerals-0.5.1.5
- hakyll-images-0.4.4
- process-1.6.8.0
- text-1.2.4.0
- filepath-1.4.2.1
# Override default flag values for local packages and extra-deps
# flags: {}
# Extra package databases containing global packages
# extra-package-dbs: []
# Control whether we use the GHC we find on the path
# system-ghc: true
#
# Require a specific version of stack, using version ranges
# require-stack-version: -any # Default
# require-stack-version: ">=2.2"
#
# Override the architecture used by stack, especially useful on Windows
# arch: i386
# arch: x86_64
#
# Extra directories used by stack for building
# extra-include-dirs: [/path/to/dir]
# extra-lib-dirs: [/path/to/dir]
#
# Allow a newer minor version of GHC than the snapshot specifies
# compiler-check: newer-minor
allow-newer: true
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>$title$</title>
<link href="/css/bootstrap.css" rel="stylesheet">
<link href="/css/syntax.css" rel="stylesheet">
<link href="/css/carousel.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<style>
body {
font-family: 'Open Sans', sans-serif;
}
body { margin-top: 80px; }
footer { margin-top: 80px; }
</style>
</head>
<body>
$partial("templates/nav.html")$
<div class="container">
<h1>$title$</h1>
<h3><a href="$pdfurl$">Le polycopié en entier [pdf]</a></h3>
<h2>Les chapitres</h2>
<ul>
$for(posts)$
<li>
<a href="$url$">$title$</a> - $date$
</li>
$endfor$
</ul>
$partial("templates/footer.html")$
</div>
</div><!-- /.container -->
<script src="/js/jquery.js"></script>
<script src="/js/bootstrap.js"></script>
<script src="/js/holder.js"></script>
</body>
</html>
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content=$title$>
<meta name="author" content="">
<title>$title$</title>
<link href="/css/bootstrap.css" rel="stylesheet">
<link href="/css/syntax.css" rel="stylesheet">
<link href="/css/carousel.css" rel="stylesheet">
<link href="/css/prism.css" rel="stylesheet">
<!-- <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'> -->
$mathjax$
<style>
body {
font-family: 'Open Sans', sans-serif;
}
body { margin-top: 80px; }
</style>
</head>
<body>
$partial("templates/nav.html")$
<div class="container">
$body$
$partial("templates/footer.html")$
</div>
</div><!-- /.container -->
<script src="/js/prism.js"></script>
<script src="/js/jquery.js"></script>
<script src="/js/bootstrap.js"></script>
<script src="/js/holder.js"></script>
</body>
</html>
\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$if(classoption)$$for(classoption)$$classoption$$sep$,$endfor$,$endif$]{$documentclass$}
$if(beamerarticle)$
\usepackage{beamerarticle} % needs to be loaded first
$endif$
$if(fontfamily)$
\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
$else$
\usepackage{lmodern}
$endif$
$if(linestretch)$
\usepackage{setspace}
\setstretch{$linestretch$}
$endif$
\renewcommand{\linethickness}{0.05em}
\usepackage{amssymb,amsmath,bm}
\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc}
\usepackage[utf8]{inputenc}
$if(euro)$
\usepackage{eurosym}
$endif$
\else % if luatex or xelatex
$if(mathspec)$
\ifxetex
\usepackage{mathspec}
\else
\usepackage{unicode-math}
\fi
$else$
\usepackage{unicode-math}
$endif$
\defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
$if(fontfamilies)$
$for(fontfamilies)$
\newfontfamily{$fontfamilies.name$}[$fontfamilies.options$]{$fontfamilies.font$}
$endfor$
$endif$
$if(euro)$
\newcommand{\euro}{}
$endif$
$if(mainfont)$
\setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
$endif$
$if(sansfont)$
\setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$}
$endif$
$if(monofont)$
\setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$}
$endif$
$if(mathfont)$
$if(mathspec)$
\ifxetex
\setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
\else
\setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
\fi
$else$
\setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
$endif$
$endif$
$if(CJKmainfont)$
\usepackage{xeCJK}
\setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
$endif$
\fi
% use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
% use microtype if available
$if(microtypeoptions)$
\IfFileExists{microtype.sty}{%
\usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
$endif$
\PassOptionsToPackage{hyphens}{url} % url is loaded by hyperref
$if(verbatim-in-note)$
\usepackage{fancyvrb}
$endif$
\usepackage[unicode=true]{hyperref}
$if(colorlinks)$
\PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref
$endif$
\urlstyle{same} % don't use monospace font for urls
$if(verbatim-in-note)$
\VerbatimFootnotes % allows verbatim text in footnotes
$endif$
$if(geometry)$
\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
$endif$
$if(lang)$
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[shorthands=off,$if(babel-otherlangs)$$for(babel-otherlangs)$$babel-otherlangs$,$endfor$$endif$main=$babel-lang$]{babel}
\fi
$endif$
$if(natbib)$
\usepackage{natbib}
\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
$endif$
$if(biblatex)$
\usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex}
$for(bibliography)$
\addbibresource{$bibliography$}
$endfor$
$endif$
$if(listings)$
\usepackage{listings}
$endif$
$if(lhs)$
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
$endif$
$if(highlighting-macros)$
$highlighting-macros$
$endif$
$if(tables)$
\usepackage{longtable,booktabs}
% Fix footnotes in tables (requires footnote package)
\IfFileExists{footnote.sty}{\usepackage{footnote}\makesavenoteenv{long table}}{}
$endif$
$if(graphics)$
\usepackage{graphicx,grffile}
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
\makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
$endif$
$if(links-as-notes)$
% Make links footnotes instead of hotlinks:
\renewcommand{\href}[2]{#2\footnote{\url{#1}}}
$endif$
$if(strikeout)$
\usepackage[normalem]{ulem}
% avoid problems with \sout in headers with hyperref:
\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
$endif$
$if(indent)$
$else$
\IfFileExists{parskip.sty}{%
\usepackage{parskip}
}{% else
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
}
$endif$
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
$if(numbersections)$
\setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$}
$else$
\setcounter{secnumdepth}{0}
$endif$
$if(subparagraph)$
$else$
% Redefines (sub)paragraphs to behave more like sections
\ifx\paragraph\undefined\else
\let\oldparagraph\paragraph
\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
\fi
\ifx\subparagraph\undefined\else
\let\oldsubparagraph\subparagraph
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi
$endif$
$if(dir)$
\ifxetex
% load bidi as late as possible as it modifies e.g. graphicx
$if(latex-dir-rtl)$
\usepackage[RTLdocument]{bidi}
$else$
\usepackage{bidi}
$endif$
\fi
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\TeXXeTstate=1
\newcommand{\RL}[1]{\beginR #1\endR}
\newcommand{\LR}[1]{\beginL #1\endL}
\newenvironment{RTL}{\beginR}{\endR}
\newenvironment{LTR}{\beginL}{\endL}
\fi
$endif$
% set default figure placement to htbp
\makeatletter
\def\fps@figure{htbp}
\makeatother
$if(header-includes)$
$for(header-includes)$
$header-includes$
$endfor$
$endif$
$if(title)$
\title{$title$$if(thanks)$\thanks{$thanks$}$endif$}
$endif$
$if(subtitle)$
\providecommand{\subtitle}[1]{}
\subtitle{$subtitle$}
$endif$
$if(author)$
\author{$for(author)$$author$$sep$ \and $endfor$}
$endif$
$if(institute)$
\providecommand{\institute}[1]{}
\institute{$for(institute)$$institute$$sep$ \and $endfor$}
$endif$
\date{$date$}
\begin{document}
$if(title)$
\maketitle
$endif$
$if(abstract)$
\begin{abstract}
$abstract$
\end{abstract}
$endif$
$if(include-before)$
$for(include-before)$
$include-before$
$endfor$
$endif$
$if(toc)$
{
$if(colorlinks)$
\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$}
$endif$
\setcounter{tocdepth}{$toc-depth$}
\tableofcontents
}
$endif$
$if(lot)$
\listoftables
$endif$
$if(lof)$
\listoffigures
$endif$
$body$
$if(natbib)$
$if(bibliography)$
$if(biblio-title)$
$if(book-class)$
\renewcommand\bibname{$biblio-title$}
$else$
\renewcommand\refname{$biblio-title$}
$endif$
$endif$
\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
$endif$
$endif$
$if(biblatex)$
\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$
$endif$
$if(include-after)$
$for(include-after)$
$include-after$
$endfor$
$endif$
\end{document}
<footer>
<p class="pull-right"><a href="#">Back to top</a></p>
<!-- <p>&copy; 2013 My Company &middot; <a href="/pages/privacy.html">Privacy</a> &middot; <a href="/pages/tos.html">Terms</a></p> -->
</footer>