diff --git a/demo/assets/css/demo.css b/demo/assets/css/demo.css index c145589..b1ba821 100644 --- a/demo/assets/css/demo.css +++ b/demo/assets/css/demo.css @@ -52,10 +52,6 @@ p code { font-size: 0.7em; } -:root { - --r-code-font: "JetBrains Mono", monospace; -} - .reveal code.hljs { background: var(--code-full-bg); border-radius: 0.5em; @@ -63,7 +59,7 @@ p code { white-space: pre-wrap; } .reveal code.hljs td { - line-height: 1.5; + line-height: 1.4; } p.code, p code, small code, .small code, li code { @@ -85,7 +81,8 @@ p.code, p code, small code, .small code, li code { } :root { - --r-heading-text-transform: none ; + --r-background-color: #051525; + --r-heading-text-transform: none; --r-heading1-size: 2.7em; --r-main-font-size: 36px; --r-block-margin: 1.8rem; @@ -128,24 +125,30 @@ a.github-corner:hover { opacity: 1; } +img { + border-radius: 5%; + box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.25); + width: 3.5em; + height: 3.5em; + max-width: 100%; + max-height: 100%; +} + .row.fivegrid { display: grid; - width: 90%; + width: 82%; margin: auto; - margin-top: 0.25em; + margin: var(--r-block-margin) auto; grid-template-columns: 1fr 1fr 1fr 1fr 1fr; grid-gap: 1em; } -.row.fivegrid img { - border-radius: 5%; -} .reveal img.demoimg { width: 3.5em; height: 3.5em; max-width: 100%; max-height: 100%; - margin: 0.2em; + margin: 0.4em; border-radius: 5%; } .reveal img.demoimg.smallcircle { @@ -156,9 +159,15 @@ a.github-corner:hover { } .row.smallcircles { - grid-gap: 1em; - width: 70%; + grid-gap: 0.5em; + width: 75%; } -.row.smallcircles img { - border-radius: 50%; + +.title { + font-size: 3em; + font-weight: bold; +} + +.subtitle { + font-size: 1.5em; } \ No newline at end of file diff --git a/demo/demo-markdown.html b/demo/demo-markdown.html index 4699510..2196d94 100644 --- a/demo/demo-markdown.html +++ b/demo/demo-markdown.html @@ -12,12 +12,6 @@ -
diff --git a/demo/demo.html b/demo/demo.html index 08daf5d..bc069e1 100644 --- a/demo/demo.html +++ b/demo/demo.html @@ -12,12 +12,6 @@ -
@@ -28,7 +22,7 @@

Appearance

for Reveal.js

-
+
@@ -59,7 +53,7 @@

 or… +

diff --git a/demo/plugin/appearance/appearance.css b/demo/plugin/appearance/appearance.css index 18f0d4c..19cbf94 100644 --- a/demo/plugin/appearance/appearance.css +++ b/demo/plugin/appearance/appearance.css @@ -2,7 +2,7 @@ /***************************************************************** * * Appearance for Reveal.js - * Version 1.3.0 + * Version 1.3.1 * * @author: Martijn De Jongh (Martino), martijn.de.jongh@gmail.com * https://github.com/martinomagnifico @@ -148,6 +148,16 @@ } /* Animate.css overrides */ +section:not(.stack):not([data-appearance-can-start]) .animate__animated, section:not(.stack):not([data-appearance-can-start]) .animated { + opacity: 0; + animation: none; +} + +section:not(.stack)[data-appearance-can-start] .animate__animated:not(.fragment), section:not(.stack)[data-appearance-can-start] .animated:not(.fragment) { + opacity: 1; +} + +/* Animations inside fragments */ section:not(.stack):not([data-appearance-can-start]) .animate__animated, section:not(.stack):not([data-appearance-can-start]) .animated, .fragment:not(.visible) .animate__animated, @@ -165,25 +175,33 @@ section:not(.stack):not([data-appearance-can-start]) .animated, opacity: 1; } -.fragment.animate__animated:not(.visible), .fragment.animated:not(.visible) { - transition: opacity 0.3s ease-in-out !important; +/* Animations which are also fragments */ +.reveal .fragment.animate__animated:not(.visible), .reveal .fragment.animated:not(.visible) { + transition: all 0.2s ease; opacity: 0; animation: none; will-change: animation; } -.fragment.animate__animated.visible.animate__animated, .fragment.animate__animated.visible.animated, .fragment.animated.visible.animate__animated, .fragment.animated.visible.animated { +.reveal .fragment.animate__animated.visible:not(.animationended), .reveal .fragment.animated.visible:not(.animationended) { transition: none; } +.reveal .fragment.animate__animated.visible.animationended, .reveal .fragment.animated.visible.animationended { + animation: none; + transition: all 0.2s ease; +} i.animate__animated, i.animated, span.animate__animated, span.animated { display: inline-block; } -.animate__animated.animationended, -.animated.animationended { +.animate__animated[data-auto-animate-target]:not([data-auto-animate-target=unmatched]) { animation: none; } +[data-auto-animate=running] .animate__animated[data-auto-animate-target]:not([data-auto-animate-target=unmatched]) { + opacity: 1 !important; +} + .fast, .animate__fast { animation-duration: calc(var(--animate-duration) * 0.8); } diff --git a/demo/plugin/appearance/appearance.esm.js b/demo/plugin/appearance/appearance.esm.js index 44f60fe..f7444cd 100644 --- a/demo/plugin/appearance/appearance.esm.js +++ b/demo/plugin/appearance/appearance.esm.js @@ -1,8 +1,7 @@ - /***************************************************************** * * Appearance for Reveal.js - * Version 1.3.0 + * Version 1.3.1 * * @author: Martijn De Jongh (Martino), martijn.de.jongh@gmail.com * https://github.com/martinomagnifico @@ -13,695 +12,5 @@ * Copyright (C) 2023 Martijn De Jongh (Martino) * ******************************************************************/ - -/** - * Check if a given string is valid JSON. - * @param {string} str - The string to be checked. - * @returns {boolean} `true` if the string is valid JSON, otherwise `false`. - */ -const isJSON = str => { - try { - return JSON.parse(str) && !!str; - } catch (e) { - return false; - } -}; - -/** - * Check if an element has child nodes that are `SECTION` elements. - * @param {Object} param0 - Object with childNodes property. - * @param {NodeListOf} param0.childNodes - List of child nodes of the element. - * @returns {boolean} `true` if the element contains `SECTION` child nodes, otherwise `false`. - */ -const isStack = _ref => { - let { - childNodes - } = _ref; - let isStack = false; - for (let i = 0; i < childNodes.length; i++) { - if (childNodes[i].tagName == "SECTION") { - isStack = true; - break; - } - } - return isStack; -}; - -/** - * Copy data attributes from a source element to a target element with an optional exception. - * @param {Object} param0 - Object with attributes property. - * @param {NamedNodeMap} param0.attributes - Map of attributes of the source element. - * @param {Element} target - Target element to copy attributes to. - * @param {string} [not] - Optional attribute name to exclude from copying. - */ -const copyDataAttributes = (_ref2, target, not) => { - let { - attributes - } = _ref2; - [...attributes].filter(_ref3 => { - let { - nodeName - } = _ref3; - return nodeName.includes('data'); - }).forEach(_ref4 => { - let { - nodeName, - nodeValue - } = _ref4; - if (not && nodeName !== not || !not) { - target.setAttribute(nodeName, nodeValue); - } - }); -}; - -/** - * Check if the given item is an object and not an array. - * @param {*} item - The item to be checked. - * @returns {boolean} `true` if the item is an object and not an array, otherwise `false`. - */ -const isObject = item => { - return item && typeof item === 'object' && !Array.isArray(item); -}; - -/** - * Deep merge multiple objects into a target object. - * @param {Object} target - Target object to merge values into. - * @param {...Object} sources - Source objects to merge from. - * @returns {Object} The merged object. - */ -const mergeDeep = function (target) { - for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - sources[_key - 1] = arguments[_key]; - } - if (!sources.length) return target; - const source = sources.shift(); - if (isObject(target) && isObject(source)) { - for (const key in source) { - if (isObject(source[key])) { - if (!target[key]) Object.assign(target, { - [key]: {} - }); - mergeDeep(target[key], source[key]); - } else { - Object.assign(target, { - [key]: source[key] - }); - } - } - } - return mergeDeep(target, ...sources); -}; - -/** - * Resolves the given Promise immediately using setTimeout. - * @param {Function} resolve - The resolve function of a Promise. - * @returns {number} The ID value of the timer that is set. - */ -const doneLoading = resolve => { - return setTimeout(resolve, 0); -}; - -/** - * Converts a JavaScript object or a JSON-formatted string to a JSON string. - * - * @param {Object|string} str - The input string or object to be converted to a JSON string. - * @returns {string} The JSON string. - */ -const toJSONString = str => { - let JSONString = ''; - if (typeof str === "string") str = str.replace(/[“”]/g, '"').replace(/[‘’]/g, "'"); - if (isJSON(str)) { - JSONString = str; - } else { - if (typeof str === "object") { - JSONString = JSON.stringify(str, null, 2); - } else { - JSONString = str.trim().replace(/'/g, '"').charAt(0) === "{" ? str.trim().replace(/'/g, '"') : `{${str.trim().replace(/'/g, '"')}}`; - } - } - return JSONString; -}; - -/** - * Dynamically loads a stylesheet from the specified URL and calls a callback function when it's loaded. - * - * @param {string} url - The URL of the stylesheet to load. - * @param {Function} callback - A callback function to be called when the stylesheet is loaded. - */ -const loadStyle = (url, callback) => { - const head = document.querySelector('head'); - const style = document.createElement('link'); - style.rel = 'stylesheet'; - style.href = url; - style.onload = () => { - if (typeof callback === 'function') { - callback.call(); - callback = null; - } - }; - style.onreadystatechange = () => { - if (style.readyState === 'loaded') { - style.onload(); - } - }; - head.appendChild(style); -}; - -/** - * Retrieves the path of a JavaScript file based on its filename. - * - * @param {string} fileName - The filename of the script. - * @returns {string} The path to the plugin's location. - */ -const pluginPath = fileName => { - let path; - let pluginScript = document.querySelector(`script[src$="${fileName}"]`); - if (pluginScript) { - path = pluginScript.getAttribute("src").slice(0, -1 * fileName.length); - } else { - path = import.meta.url.slice(0, import.meta.url.lastIndexOf('/') + 1); - } - return path; -}; -const debugLog = (options, text) => { - if (options.debug) console.log(text); -}; - -/** - * Retrieves and loads CSS stylesheets based on the provided options and ES5 filename. - * - * @param {Object} options - Configuration options for loading CSS. - * @param {string} fileName - The filename of the script. - */ - -const getAndLoadCSS = (options, fileName) => { - let thePath = pluginPath(fileName); - let pluginBaseName = fileName.replace(/\.[^/.]+$/, ""); - let AppearanceStylePath = options.csspath.appearance ? options.csspath.appearance : `${thePath}${pluginBaseName}.css` || `plugin/${pluginBaseName}/${pluginBaseName}.css`; - let AnimateCSSPath = !options.compatibility ? options.animatecsspath.link : options.animatecsspath.compat; - if (options.debug) { - console.log(`Paths:`); - console.log(` - Plugin path = ${thePath}`); - console.log(` - Appearance CSS path = ${AppearanceStylePath}`); - console.log(` - AnimateCSS CSS path = ${AnimateCSSPath}`); - } - loadStyle(AnimateCSSPath, function () { - loadStyle(AppearanceStylePath); - }); -}; - -/** - * Adds automatic animations to elements within a section based on specified criteria. - * - * This function examines the provided section for attributes and options to determine - * which classes should be added to its elements to enable automatic animations. - * - * @param {HTMLElement} section - The section element to which automatic animations will be applied. - * @param {Object} options - The existing user options object - * @param {Object} vars - The existing vars object - * @returns {undefined} - */ -const addAutoAnimation = (section, options, vars) => { - let sectionAutoSelectors = null; - if (section.hasAttribute("data-autoappear")) { - let sectDataAppear = section.dataset.autoappear; - if (sectDataAppear == "auto" || sectDataAppear == "" || sectDataAppear.length < 1 || sectDataAppear == "true") { - // This section should get the global autoappear classes on its objects - sectionAutoSelectors = options.autoelements ? options.autoelements : null; - } else { - // This section should get the local autoappear classes on its objects - sectionAutoSelectors = sectDataAppear; - } - } else if (options.autoappear && options.autoelements) { - // This section should get the global autoappear classes on its objects - sectionAutoSelectors = options.autoelements; - } - if (sectionAutoSelectors) { - let elementsToAnimate = JSON.parse(toJSONString(sectionAutoSelectors)); - Object.entries(elementsToAnimate).forEach(_ref => { - let [selector, assignables] = _ref; - // Exclude the elements from vars.appearances - let elements = Array.from(section.querySelectorAll(selector)).filter(element => !vars.appearances.includes(element)); - if (elements.length) { - elements.forEach(element => { - vars.appearances.push(element); - let newClasses = [], - newDelay = null, - speedClass = false, - elementSplit = null, - containerDelay = null; - if (Array.isArray(assignables)) { - newClasses = assignables[0].split(/[ ,]+/); - newDelay = assignables[1]; - } else if (typeof assignables == "string") { - newClasses = assignables.split(/[ ,]+/); - } else if (assignables.constructor === Object) { - if (assignables.class || assignables.animation) { - let animationClass = assignables.animation ? assignables.animation : assignables.class; - newClasses = animationClass.split(/[ ,]+/); - } - if (assignables.speed) { - speedClass = String(assignables.speed); - if (!speedClass.includes("animate__")) { - speedClass = `animate__${speedClass}`; - } - } - if (assignables.delay) { - newDelay = String(assignables.delay); - } - if (assignables.split) { - elementSplit = String(assignables.split); - } - if (assignables["container-delay"]) { - containerDelay = String(assignables["container-delay"]); - } - } - element.classList.add(...newClasses); - if (speedClass) { - element.classList.add(speedClass); - } - if (newDelay) { - element.dataset.delay = newDelay; - } - if (elementSplit) { - element.dataset.split = elementSplit; - } - if (containerDelay) { - element.dataset.containerDelay = containerDelay; - } - }); - } - }); - } -}; - -/** - * Hoist a list item's appearance to its parent element's appearance. - * - * @param {HTMLElement} from - The list item element. - * @returns {undefined} - */ -const hoistAppearance = (from, baseclass) => { - let to = from.parentNode; - if (!to) return; - for (const sibling of to.children) { - if (sibling !== from && sibling.dataset.appearParent) return; - } - to.classList = from.classList; - copyDataAttributes(from, to, "data-appear-parent"); - to.innerHTML = from.innerHTML; - to.classList.add(baseclass); -}; - -/** - * Fix list items that were changed by Quarto. - * - * This function is designed for use with Quarto and handles the conversion of list items - * with Appearance classes to their parent elements when a manual attribute is present. - * It also provides automatic conversion for list items that directly contain spans, which - * is related to Quarto's wrapping of list content in a span. - * - * @param {HTMLElement} appearance - The list item element whose appearance will be converted. - * @param {Object} options - An options object that controls the conversion behavior. - * @param {boolean} options.appearparents - If `true`, automatic conversion of list items with spans is enabled. - * @returns {undefined} - */ -const fixListItem = (appearance, options, names) => { - let baseclass = names.baseclass; - if (appearance.hasAttribute("data-appear-parent")) { - hoistAppearance(appearance, baseclass); - } - if (options.appearparents) { - if (appearance.parentNode && appearance.parentNode.tagName) { - if (appearance.tagName == "SPAN" && appearance.parentNode.tagName == "LI") { - let spanLength = String(appearance.outerHTML).length; - let liContentLength = String(appearance.parentNode.innerHTML).length; - if (spanLength == liContentLength) { - hoistAppearance(appearance); - } - } - } - } -}; - -/** - * Adds a base class to an HTML element if it doesn't already have it. - * - * This function checks if the specified HTML element has the specified base class, - * and if not, it adds the base class to the element's class list. - * - * @param {HTMLElement} appearance - The HTML element to which the base class should be added. - * @param {Object} names - The existing 'names' object - * @returns {undefined} - */ - -const addBaseClass = (appearance, names) => { - if (!appearance.classList.contains(names.baseclass)) { - appearance.classList.add(names.baseclass); - } - if (appearance.classList.contains(names.fragmentClass)) { - appearance.classList.add('custom'); - } -}; - -const addDelay = (appearanceArray, options, names) => { - let delay = 0; - appearanceArray.forEach((appearance, index) => { - if (index == 0 && appearance.dataset.delay || index != 0) { - let elementDelay = options.delay; - if (appearance.dataset && appearance.dataset.delay) { - elementDelay = parseInt(appearance.dataset.delay); - } - delay = delay + elementDelay; - appearance.style.setProperty('animation-delay', delay + "ms"); - appearance.removeAttribute('data-delay'); - } - }); -}; - -/** - * Selects elements with a specified class that are not nested inside an element with another specified class. - * @param {string} targetClass - The class name to select elements. - * @param {string} excludeClass - The class name to exclude elements nested inside it. - * @param {Element} el - The element to find the target elements in. - * @returns {Element[]} - Array of selected elements. - */ -const elemsNotInClass = (targetClass, excludeClass, el) => Array.from(el.querySelectorAll(`.${targetClass}`)).filter(s => !s.closest(`.${excludeClass}`)); - -/** - * Selects elements with a specified class that are nested inside an element with another specified class. - * @param {string} targetClass - The class name to select elements. - * @param {string} parentClass - The class name of the parent to find elements in. - * @param {Element} el - The element to find the target elements in. - * @returns {Element[]} - Array of selected elements. - */ -const elemsInClass = (targetClass, parentClass, el) => Array.from(el.querySelectorAll(`.${targetClass}`)).filter(s => s.closest(`.${parentClass}`) === el); - -/** - * Extracts groups of elements with a specified class from the provided section element. - * Groups are formed based on nesting inside elements with another specified class. - * @param {Element} section - The section to extract data from. - * @returns {Element[][]} - Nested arrays of selected elements. - */ - -/** - * Extracts groups of elements with a specified class from the provided section element. - * Groups are formed based on nesting inside elements with another specified class. - * @param {Element} section - The section to extract data from. - * @param {string} targetClass - The class name to select elements. - * @param {string} groupClass - The class name of the parent to find elements in. - * @returns {Element[][]} - Nested arrays of selected elements. - */ -const getAppearanceArrays = (section, targetClass, groupClass) => { - const result = [elemsNotInClass(targetClass, groupClass, section), ...Array.from(section.querySelectorAll(`.${groupClass}`)).map(frag => elemsInClass(targetClass, groupClass, frag))]; - if (result.some(group => group.length > 0)) { - return result; - } else { - return false; - } -}; - -const convertToSpans = (parent, kind) => { - let splitElements = false; - let joinChar = ' '; - if (kind == "words") { - splitElements = parent.textContent.trim().split(/\s+/); - } else if (kind == "letters") { - splitElements = parent.textContent.trim().split(''); - joinChar = ''; - } - if (splitElements) { - const parentAnimateClasses = Array.from(parent.classList).filter(className => className.startsWith('animate__')); - const newHtml = splitElements.map((element, index) => { - const span = document.createElement('span'); - span.textContent = element; - if (element == " ") { - span.textContent = "\u00A0"; - } - if (parent.dataset.delay && index !== 0) { - span.dataset.delay = parent.dataset.delay; - } - if (parent.dataset.containerDelay && index === 0) { - span.dataset.delay = parent.dataset.containerDelay; - } - parent.classList.forEach(className => className.startsWith('animate__') && span.classList.add(className)); - return span.outerHTML; - }).join(joinChar); - parentAnimateClasses.forEach(className => parent.classList.remove(className)); - parent.removeAttribute('data-delay'); - parent.removeAttribute('data-split'); - parent.removeAttribute('data-container-delay'); - parent.innerHTML = newHtml; - } -}; - -/** - * Derives slide from and to from the event object. - * - * @param {Object} event - The event object containing slide transition details. - * @returns {Object} - An object containing references to the "from" and "to" slides. - */ -const fromTo = event => { - let slides = {}; - slides.from = event.fromSlide || event.previousSlide || null; - slides.to = event.toSlide || event.currentSlide || null; - return slides; -}; - -/** - * A function that determines the appearance event for a given slide. - * - * This function checks the `data-appearevent` attribute of the slide and the `options.appearevent` parameter. - * If `data-appearevent` is set to "auto", it is converted to "autoanimate". If `options.appearevent` is "auto", it is also converted to "autoanimate". - * The function returns the appearance event, prioritizing `data-appearevent` over `options.appearevent`. - * - * @param {HTMLElement} toSlide - The slide for which the appearance event is determined. - * @param {Object} options - An object containing options for the appearance event. - * @param {string} options.appearevent - The appearance event option provided in the `options` object. - * - * @returns {string} - The determined appearance event for the slide, either from `data-appearevent` or `options.appearevent`. - */ -const slideAppearevent = (toSlide, options) => { - if (toSlide.dataset.appearevent && toSlide.dataset.appearevent === "auto") { - toSlide.dataset.appearevent = "autoanimate"; - } - if (options.appearevent == "auto") { - options.appearevent = "autoanimate"; - } - return toSlide.dataset.appearevent ? toSlide.dataset.appearevent : options.appearevent; -}; - -/** - * Remove the 'data-appearance-can-start' attribute from the 'from' slide if the 'hideagain' option is enabled. - * - * @param {HTMLElement} slides - The container element for the slides. - * @param {Object} options - An object containing configuration options. - * @param {boolean} options.hideagain - A flag indicating whether to remove the attribute when 'hideagain' is true. - */ -const removeStartAttribute = (slides, options) => { - if (options.hideagain) { - if (slides.from && slides.from.dataset.appearanceCanStart) { - slides.from.removeAttribute('data-appearance-can-start'); - } - } -}; - -/** - * Turn off slide appearances when transitioning from one slide to another if the 'hideagain' option is enabled. - * - * @param {HTMLElement} slides - The container element for the slides. - * @param {Object} options - An object containing configuration options. - * @param {string} names.animatecss - The CSS selector for animated elements. - */ -const turnOffSlideAppearances = (slides, options, names) => { - if (options.hideagain) { - let fromAppearances = slides.from.querySelectorAll(names.animatecss); - fromAppearances.forEach(appearance => { - appearance.classList.remove('animationended'); - }); - // Remove visible class from fragments when moving away from that slide - let fromFragments = slides.from.querySelectorAll(`.fragment.visible`); - if (fromFragments) { - fromFragments.forEach(fragment => { - fragment.classList.remove('visible'); - }); - } - } -}; - -/** - * Handles the showing and hiding of slides based on the provided event and options. - * - * @param {Object} event - The event object containing slide transition details. - * @param {Object} options - An object containing configurations for slide appearance management. - */ -const showHideSlide = (event, options, names, vars) => { - let view = vars.deck.getConfig().view; - let etype = event.type; - let slides = fromTo(event); - if (slides.to) { - if (etype == "ready") { - slides.to.dataset.appearanceCanStart = true; - } - let appearevent = slideAppearevent(slides.to, options); - if (etype == appearevent || etype == "slidetransitionend" && appearevent == "autoanimate") { - slides.to.dataset.appearanceCanStart = true; - } - - // Add experimental Reader mode compatibility, does not have a slidetransitionend event yet - if (view == "scroll" && etype == 'slidechanged') { - removeStartAttribute(slides, options); - turnOffSlideAppearances(slides, options, names); - - // Add delay to allow for scroll animation to finish - setTimeout(() => { - slides.to.dataset.appearanceCanStart = true; - }, options.delay); - } - if (etype == "slidetransitionend") { - removeStartAttribute(slides, options); - turnOffSlideAppearances(slides, options, names); - } - if (etype == 'slidechanged' && document.body.dataset.exitoverview) { - removeStartAttribute(slides, options); - slides.to.dataset.appearanceCanStart = true; - } else if (etype == 'overviewhidden') { - document.body.dataset.exitoverview = true; - setTimeout(() => { - document.body.removeAttribute('data-exitoverview'); - }, 500); - if (event.currentSlide) { - removeStartAttribute(slides, options); - slides.to.dataset.appearanceCanStart = true; - } - } - } -}; - -const Plugin = () => { - const vars = {}; - vars.names = {}; - let options = {}; - - /** - * Prepare the plugin to find Appearance elements - * @param {Object} vars - The variables to be prepared. - * @param {Object} names - The names to be prepared. - * @param {Function} resolve - The callback function to be called when preparation is complete. - * @throws {Error} Throws an error if the 'options' object is not defined. - */ - const prepare = (options, vars, resolve) => { - debugLog(options, "------------- Preloading -------------"); - let names = vars.names; - getAndLoadCSS(options, names.es5Filename); - if (options.compatibility) { - names.animatecss = '.backInDown, .backInLeft, .backInRight, .backInUp, .bounceIn, .bounceInDown, .bounceInLeft, .bounceInRight, .bounceInUp, .fadeIn, .fadeInDown, .fadeInDownBig, .fadeInLeft, .fadeInLeftBig, .fadeInRight, .fadeInRightBig, .fadeInUp, .fadeInUpBig, .fadeInTopLeft, .fadeInTopRight, .fadeInBottomLeft, .fadeInBottomRight, .flipInX, .flipInY, .lightSpeedInRight, .lightSpeedInLeft, .rotateIn, .rotateInDownLeft, .rotateInDownRight, .rotateInUpLeft, .rotateInUpRight, .jackInTheBox, .rollIn, .zoomIn, .zoomInDown, .zoomInLeft, .zoomInRight, .zoomInUp, .slideInDown, .slideInLeft, .slideInRight, .slideInUp, .skidLeft, .skidLeftBig, .skidRight, .skidRightBig, .shrinkIn, .shrinkInBlur'; - names.baseclass = options.compatibilitybaseclass; - } - vars.appearances = Array.from(vars.slides.querySelectorAll(names.animatecss)); - - // Go through each section to see if there are any (auto) selectors that need animation classes - vars.regularSections.forEach(theSection => addAutoAnimation(theSection, options, vars)); - vars.appearances.forEach((theAppearance, index) => { - // Fix any list item where the Appearance classes were moved to the span (Quarto does this) - fixListItem(theAppearance, options, names); - - // Go through each appearance element and add the baseclass if it doesn't have it - addBaseClass(theAppearance, names); - if (theAppearance.hasAttribute('data-split')) { - convertToSpans(theAppearance, theAppearance.dataset.split); - } - }); - vars.regularSections.forEach((theSection, index) => { - // Get all the Appearances in the section as separate arrays per delay loop - let appearanceArrays = getAppearanceArrays(theSection, names.baseclass, names.fragmentClass); - if (appearanceArrays) { - appearanceArrays.forEach(appearanceArray => { - // Add the delays to each appearance in the array - addDelay(appearanceArray, options); - }); - } - }); - doneLoading(resolve); - }; - - /** - * The main function of the plugin - * @param {object} deck - The deck object - * @param {object} options - The options object - * @param {string} es5Filename - The name of the file that will be used - */ - const Appear = function (deck, options, es5Filename) { - let names = vars.names; - - // Set up names - names.baseclass = options.baseclass; - names.compatibilitybaseclass = options.compatibilitybaseclass; - names.fragmentSelector = ".fragment"; - names.fragmentClass = "fragment"; - names.speedClasses = ['slower', 'slow', 'fast', 'faster']; - names.speedClasses.push(...names.speedClasses.map(speed => `animate__${speed}`)); - names.animatecss = '[class^="animate__"],[class*=" animate__"]'; - names.es5Filename = es5Filename; - names.eventnames = ['ready', 'slidechanged', 'slidetransitionend', 'autoanimate', 'overviewhidden', 'scrolle']; - - // Set up variables - vars.deck = deck; - vars.dom = deck.getRevealElement(); - vars.viewport = deck.getViewportElement(); - vars.slides = deck.getSlidesElement(); - vars.sections = vars.slides.querySelectorAll('section'); - vars.fragments = vars.slides.querySelectorAll(names.fragmentSelector); - vars.regularSections = Array.from(vars.sections).filter(section => !isStack(section)); - if (/receiver/i.test(window.location.search)) vars.viewport.classList.add('sv'); - names.eventnames.forEach(eventname => deck.on(eventname, event => { - showHideSlide(event, options, names, vars); - })); - vars.viewport.addEventListener("animationend", event => { - event.target.classList.add('animationended'); - }); - vars.viewport.addEventListener("fragmenthidden", event => { - event.fragment.classList.remove('animationended'); - event.fragment.querySelectorAll('.animationended').forEach(el => { - el.classList.remove('animationended'); - }); - }); - return new Promise(resolve => { - prepare(options, vars, resolve); - debugLog(options, "---------- Done preloading ----------"); - }); - }; - - /** - * Initialize the plugin - * @param {object} deck - The deck object - */ - const init = function (deck) { - let defaultOptions = { - baseclass: 'animate__animated', - hideagain: true, - delay: 300, - debug: false, - appearevent: 'slidetransitionend', - autoappear: false, - autoelements: false, - appearparents: false, - csspath: '', - animatecsspath: { - link: 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css', - compat: 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.compat.css' - }, - compatibility: false, - compatibilitybaseclass: 'animated' - }; - options = mergeDeep(defaultOptions, deck.getConfig().appearance || {}); - return Appear(deck, options, "appearance.js"); - }; - return { - id: 'appearance', - init: init - }; -}; - -export { Plugin as default }; +const e=e=>e&&"object"==typeof e&&!Array.isArray(e),t=(a,...n)=>{if(!n.length)return a;const s=n.shift();if(e(a)&&e(s))for(const n in s)e(s[n])?(a[n]||Object.assign(a,{[n]:{}}),t(a[n],s[n])):Object.assign(a,{[n]:s[n]});return t(a,...n)},a=e=>{let t="";return"string"==typeof e&&(e=e.replace(/[“”]/g,'"').replace(/[‘’]/g,"'")),t=(e=>{try{return JSON.parse(e)&&!!e}catch(e){return!1}})(e)?e:"object"==typeof e?JSON.stringify(e,null,2):"{"===e.trim().replace(/'/g,'"').charAt(0)?e.trim().replace(/'/g,'"'):`{${e.trim().replace(/'/g,'"')}}`,t},n=(e,t,a)=>{let n,s=document.querySelector("head");"script"===t?(n=document.createElement("script"),n.type="text/javascript",n.src=e):"stylesheet"===t&&(n=document.createElement("link"),n.rel="stylesheet",n.href=e);const r=()=>{"function"==typeof a&&(a.call(),a=null)};n.onload=r,n.onreadystatechange=function(){"loaded"===this.readyState&&r()},s.appendChild(n)},s=(e,t)=>{e.debug&&console.log(t)},r=(e,t)=>{let a=(e=>{let t,a=document.querySelector(`script[src$="${e}"]`);return t=a?a.getAttribute("src").slice(0,-1*e.length):import.meta.url.slice(0,import.meta.url.lastIndexOf("/")+1),t})(t),s=t.replace(/\.[^/.]+$/,""),r=e.csspath.appearance?e.csspath.appearance:`${a}${s}.css`||`plugin/${s}/${s}.css`,i=e.compatibility?e.animatecsspath.compat:e.animatecsspath.link;e.debug&&(console.log("Paths:"),console.log(` - Plugin path = ${a}`),console.log(` - Appearance CSS path = ${r}`),console.log(` - AnimateCSS CSS path = ${i}`)),n(i,"stylesheet",(function(){n(r,"stylesheet")}))},i=(e,t)=>{let a=e.parentNode;if(a){for(const t of a.children)if(t!==e&&t.dataset.appearParent)return;a.classList=e.classList,(({attributes:e},t,a)=>{[...e].filter((({nodeName:e})=>e.includes("data"))).forEach((({nodeName:e,nodeValue:n})=>{(a&&e!==a||!a)&&t.setAttribute(e,n)}))})(e,a,"data-appear-parent"),a.innerHTML=e.innerHTML,a.classList.add(t)}},l=(e,t,a)=>Array.from(a.querySelectorAll(`.${e}`)).filter((e=>!e.closest(`.${t}`))),o=(e,t,a)=>{const n=[l(t,a,e),...Array.from(e.querySelectorAll(`.${a}`)).map((e=>((e,t,a)=>Array.from(a.querySelectorAll(`.${e}`)).filter((e=>e.closest(`.${t}`)===a)))(t,a,e)))];return!!n.some((e=>e.length>0))&&n},c=(e,t)=>{t.hideagain&&e.from&&e.from.dataset.appearanceCanStart&&e.from.removeAttribute("data-appearance-can-start")},d=(e,t,a)=>{if(t.hideagain){e.from.querySelectorAll(a.animatecss).forEach((e=>{e.classList.remove("animationended")}));let t=e.from.querySelectorAll(".fragment.visible");t&&t.forEach((e=>{e.classList.remove("visible")}))}},p=()=>{const e={names:{}};let n={};const l=(e,t,n)=>{s(e,"------------- Preloading -------------");let l=t.names;r(e,l.es5Filename),e.compatibility&&(l.animatecss=".backInDown, .backInLeft, .backInRight, .backInUp, .bounceIn, .bounceInDown, .bounceInLeft, .bounceInRight, .bounceInUp, .fadeIn, .fadeInDown, .fadeInDownBig, .fadeInLeft, .fadeInLeftBig, .fadeInRight, .fadeInRightBig, .fadeInUp, .fadeInUpBig, .fadeInTopLeft, .fadeInTopRight, .fadeInBottomLeft, .fadeInBottomRight, .flipInX, .flipInY, .lightSpeedInRight, .lightSpeedInLeft, .rotateIn, .rotateInDownLeft, .rotateInDownRight, .rotateInUpLeft, .rotateInUpRight, .jackInTheBox, .rollIn, .zoomIn, .zoomInDown, .zoomInLeft, .zoomInRight, .zoomInUp, .slideInDown, .slideInLeft, .slideInRight, .slideInUp, .skidLeft, .skidLeftBig, .skidRight, .skidRightBig, .shrinkIn, .shrinkInBlur",l.baseclass=e.compatibilitybaseclass),t.appearances=Array.from(t.slides.querySelectorAll(l.animatecss)),t.regularSections.forEach((n=>((e,t,n)=>{let s=null;if(e.hasAttribute("data-autoappear")){let a=e.dataset.autoappear;s="auto"==a||""==a||a.length<1||"true"==a?t.autoelements?t.autoelements:null:a}else t.autoappear&&t.autoelements&&(s=t.autoelements);if(s){let t=JSON.parse(a(s));Object.entries(t).forEach((([t,a])=>{let s=Array.from(e.querySelectorAll(t)).filter((e=>!n.appearances.includes(e)));s.length&&s.forEach((e=>{n.appearances.push(e);let t=[],s=null,r=!1,i=null,l=null;Array.isArray(a)?(t=a[0].split(/[ ,]+/),s=a[1]):"string"==typeof a?t=a.split(/[ ,]+/):a.constructor===Object&&((a.class||a.animation)&&(t=(a.animation?a.animation:a.class).split(/[ ,]+/)),a.speed&&(r=String(a.speed),r.includes("animate__")||(r=`animate__${r}`)),a.delay&&(s=String(a.delay)),a.split&&(i=String(a.split)),a["container-delay"]&&(l=String(a["container-delay"]))),e.classList.add(...t),r&&e.classList.add(r),s&&(e.dataset.delay=s),i&&(e.dataset.split=i),l&&(e.dataset.containerDelay=l)}))}))}})(n,e,t))),t.appearances.forEach(((t,a)=>{((e,t,a)=>{let n=a.baseclass;e.hasAttribute("data-appear-parent")&&i(e,n),t.appearparents&&e.parentNode&&e.parentNode.tagName&&"SPAN"==e.tagName&&"LI"==e.parentNode.tagName&&String(e.outerHTML).length==String(e.parentNode.innerHTML).length&&i(e)})(t,e,l),((e,t)=>{e.classList.contains(t.baseclass)||e.classList.add(t.baseclass),e.classList.contains(t.fragmentClass)&&e.classList.add("custom")})(t,l),t.hasAttribute("data-split")&&((e,t)=>{let a=!1,n=" ";if("words"==t?a=e.textContent.trim().split(/\s+/):"letters"==t&&(a=e.textContent.trim().split(""),n=""),a){const t=Array.from(e.classList).filter((e=>e.startsWith("animate__"))),s=a.map(((t,a)=>{const n=document.createElement("span");return n.textContent=t," "==t&&(n.textContent=" "),e.dataset.delay&&0!==a&&(n.dataset.delay=e.dataset.delay),e.dataset.containerDelay&&0===a&&(n.dataset.delay=e.dataset.containerDelay),e.classList.forEach((e=>e.startsWith("animate__")&&n.classList.add(e))),n.outerHTML})).join(n);t.forEach((t=>e.classList.remove(t))),e.removeAttribute("data-delay"),e.removeAttribute("data-split"),e.removeAttribute("data-container-delay"),e.innerHTML=s}})(t,t.dataset.split)})),t.regularSections.forEach(((t,a)=>{let n=o(t,l.baseclass,l.fragmentClass);n&&n.forEach((t=>{((e,t,a)=>{let n=0;e.forEach(((e,a)=>{if(0==a&&e.dataset.delay||0!=a){let a=t.delay;e.dataset&&e.dataset.delay&&(a=parseInt(e.dataset.delay)),n+=a,e.style.setProperty("animation-delay",n+"ms"),e.removeAttribute("data-delay")}}))})(t,e)}))})),(e=>{setTimeout(e,0)})(n)},p=function(t,a,n){let r=e.names;return r.baseclass=a.baseclass,r.compatibilitybaseclass=a.compatibilitybaseclass,r.fragmentSelector=".fragment",r.fragmentClass="fragment",r.speedClasses=["slower","slow","fast","faster"],r.speedClasses.push(...r.speedClasses.map((e=>`animate__${e}`))),r.animatecss='[class^="animate__"],[class*=" animate__"]',r.es5Filename=n,r.eventnames=["ready","slidechanged","slidetransitionend","autoanimate","overviewhidden","scrolle"],e.deck=t,e.dom=t.getRevealElement(),e.viewport=t.getViewportElement(),e.slides=t.getSlidesElement(),e.sections=e.slides.querySelectorAll("section"),e.fragments=e.slides.querySelectorAll(r.fragmentSelector),e.regularSections=Array.from(e.sections).filter((e=>!(({childNodes:e})=>{let t=!1;for(let a=0;at.on(n,(t=>{((e,t,a,n)=>{let s=n.deck.getConfig().view,r=e.type,i=(e=>{let t={};return t.from=e.fromSlide||e.previousSlide||null,t.to=e.toSlide||e.currentSlide||null,t})(e);if(i.to){"ready"==r&&(i.to.dataset.appearanceCanStart=!0);let n=((e,t)=>(e.dataset.appearevent&&"auto"===e.dataset.appearevent&&(e.dataset.appearevent="autoanimate"),"auto"==t.appearevent&&(t.appearevent="autoanimate"),e.dataset.appearevent?e.dataset.appearevent:t.appearevent))(i.to,t);(r==n||"slidetransitionend"==r&&"autoanimate"==n)&&(i.to.dataset.appearanceCanStart=!0),"scroll"==s&&"slidechanged"==r&&(c(i,t),d(i,t,a),setTimeout((()=>{i.to.dataset.appearanceCanStart=!0}),t.delay)),"slidetransitionend"==r&&(c(i,t),d(i,t,a)),"slidechanged"==r&&document.body.dataset.exitoverview?(c(i,t),i.to.dataset.appearanceCanStart=!0):"overviewhidden"==r&&(document.body.dataset.exitoverview=!0,setTimeout((()=>{document.body.removeAttribute("data-exitoverview")}),500),e.currentSlide&&(c(i,t),i.to.dataset.appearanceCanStart=!0))}})(t,a,r,e)})))),e.viewport.addEventListener("animationend",(e=>{e.target.classList.add("animationended")})),e.viewport.addEventListener("fragmenthidden",(e=>{e.fragment.classList.remove("animationended"),e.fragment.querySelectorAll(".animationended").forEach((e=>{e.classList.remove("animationended")}))})),new Promise((t=>{l(a,e,t),s(a,"---------- Done preloading ----------")}))};return{id:"appearance",init:function(e){return n=t({baseclass:"animate__animated",hideagain:!0,delay:300,debug:!1,appearevent:"slidetransitionend",autoappear:!1,autoelements:!1,appearparents:!1,csspath:"",animatecsspath:{link:"https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css",compat:"https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.compat.css"},compatibility:!1,compatibilitybaseclass:"animated"},e.getConfig().appearance||{}),p(e,n,"appearance.js")}}};export{p as default}; //# sourceMappingURL=appearance.esm.js.map diff --git a/demo/plugin/appearance/appearance.esm.js.map b/demo/plugin/appearance/appearance.esm.js.map index 1659cc2..42a9fcb 100644 --- a/demo/plugin/appearance/appearance.esm.js.map +++ b/demo/plugin/appearance/appearance.esm.js.map @@ -1 +1 @@ -{"version":3,"file":"appearance.esm.js","sources":["../../../src/plugin/js/helpers.js","../../../src/plugin/js/functions/get-load-css.js","../../../src/plugin/js/functions/add-auto-animation.js","../../../src/plugin/js/functions/fix-list-item.js","../../../src/plugin/js/functions/add-base-class.js","../../../src/plugin/js/functions/add-delay.js","../../../src/plugin/js/functions/get-appearance-arrays.js","../../../src/plugin/js/functions/convert-to-spans.js","../../../src/plugin/js/functions/show-hide-slide.js","../../../src/plugin/js/plugin.js"],"sourcesContent":["/**\n * Check if a given string is valid JSON.\n * @param {string} str - The string to be checked.\n * @returns {boolean} `true` if the string is valid JSON, otherwise `false`.\n */\nexport const isJSON = str => {\n\ttry {\n\t\treturn (JSON.parse(str) && !!str);\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\n/**\n * Convert a NodeList into an array based on provided selectors.\n * @param {Element} container - The root element to begin querying.\n * @param {string} selectors - A string containing one or more CSS selectors separated by commas.\n * @returns {Element[]} Array of elements that match the given selectors.\n */\nexport const selectionArray = (container, selectors) => {\n\tlet selections = container.querySelectorAll(selectors);\n\tlet selectionarray = Array.prototype.slice.call(selections);\n\treturn selectionarray;\n};\n\n/**\n * Check if an element has child nodes that are `SECTION` elements.\n * @param {Object} param0 - Object with childNodes property.\n * @param {NodeListOf} param0.childNodes - List of child nodes of the element.\n * @returns {boolean} `true` if the element contains `SECTION` child nodes, otherwise `false`.\n */\nexport const isStack = ({childNodes}) => {\n\tlet isStack = false;\n\tfor (let i = 0; i < childNodes.length; i++) {\n\t\tif (childNodes[i].tagName == \"SECTION\") {\n\t\t\tisStack = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn isStack;\n};\n\n/**\n * Copy data attributes from a source element to a target element with an optional exception.\n * @param {Object} param0 - Object with attributes property.\n * @param {NamedNodeMap} param0.attributes - Map of attributes of the source element.\n * @param {Element} target - Target element to copy attributes to.\n * @param {string} [not] - Optional attribute name to exclude from copying.\n */\nexport const copyDataAttributes = ({attributes}, target, not) => {\n\t[...attributes].filter(({nodeName}) => nodeName.includes('data')).forEach(({nodeName, nodeValue}) => {\n\t\tif ((not && nodeName !== not) || !not) {\n\t\t\ttarget.setAttribute(nodeName, nodeValue);\n\t\t}\n\t});\n};\n\n/**\n * Check if the given item is an object and not an array.\n * @param {*} item - The item to be checked.\n * @returns {boolean} `true` if the item is an object and not an array, otherwise `false`.\n */\nconst isObject = (item) => {\n\treturn (item && typeof item === 'object' && !Array.isArray(item));\n}\n\n/**\n * Deep merge multiple objects into a target object.\n * @param {Object} target - Target object to merge values into.\n * @param {...Object} sources - Source objects to merge from.\n * @returns {Object} The merged object.\n */\nexport const mergeDeep = (target, ...sources) => {\n\tif (!sources.length) return target;\n\tconst source = sources.shift();\n\n\tif (isObject(target) && isObject(source)) {\n\t\tfor (const key in source) {\n\t\t\tif (isObject(source[key])) {\n\t\t\t\tif (!target[key]) Object.assign(target, { [key]: {} });\n\t\t\t\tmergeDeep(target[key], source[key]);\n\t\t\t} else {\n\t\t\t\tObject.assign(target, { [key]: source[key] });\n\t\t\t}\n\t\t}\n\t}\n\treturn mergeDeep(target, ...sources);\n}\n\n/**\n * Resolves the given Promise immediately using setTimeout.\n * @param {Function} resolve - The resolve function of a Promise.\n * @returns {number} The ID value of the timer that is set.\n */\nexport const doneLoading = (resolve) => {\n\treturn setTimeout(resolve, 0);\n}\n\n\n/**\n * Converts a JavaScript object or a JSON-formatted string to a JSON string.\n *\n * @param {Object|string} str - The input string or object to be converted to a JSON string.\n * @returns {string} The JSON string.\n */\nexport const toJSONString = (str) => {\n\tlet JSONString = ''\n\n\tif (typeof str === \"string\") str = str.replace(/[“”]/g,'\"').replace(/[‘’]/g,\"'\");\n\n\tif (isJSON(str)) {\n\t\tJSONString = str\n\t} else {\n\t\tif (typeof str === \"object\") {\n\t\t\tJSONString = JSON.stringify(str, null, 2)\n\t\t} else {\n\t\t\tJSONString = str.trim().replace(/'/g, '\"').charAt(0) === \"{\" ? str.trim().replace(/'/g, '\"') : `{${str.trim().replace(/'/g, '\"')}}`;\n\t\t}\n\t}\n\treturn JSONString;\n}\n\n/**\n * Dynamically loads a stylesheet from the specified URL and calls a callback function when it's loaded.\n *\n * @param {string} url - The URL of the stylesheet to load.\n * @param {Function} callback - A callback function to be called when the stylesheet is loaded.\n */\nexport const loadStyle = (url, callback) => {\n\tconst head = document.querySelector('head');\n\tconst style = document.createElement('link');\n\tstyle.rel = 'stylesheet';\n\tstyle.href = url;\n\tstyle.onload = () => {\n\t\tif (typeof callback === 'function') {\n\t\t\tcallback.call();\n\t\t\tcallback = null;\n\t\t}\n\t};\n\tstyle.onreadystatechange = () => {\n\t\tif (style.readyState === 'loaded') {\n\t\t\tstyle.onload();\n\t\t}\n\t};\n\thead.appendChild(style);\n};\n\n/**\n * Retrieves the path of a JavaScript file based on its filename.\n *\n * @param {string} fileName - The filename of the script.\n * @returns {string} The path to the plugin's location.\n */\nexport const pluginPath = (fileName) => {\n\tlet path;\n\tlet pluginScript = document.querySelector(`script[src$=\"${fileName}\"]`);\n\tif (pluginScript) {\n\t\tpath = pluginScript.getAttribute(\"src\").slice(0, -1 * (fileName.length));\n\t} else {\n\t\tpath = import.meta.url.slice(0, import.meta.url.lastIndexOf('/') + 1);\n\t}\n\treturn path;\n}\n\n\n\nexport const debugLog = (options, text) => {\n\tif (options.debug) console.log(text);\n}\n","import { loadStyle } from '../helpers';\nimport { pluginPath } from '../helpers';\n\n/**\n * Retrieves and loads CSS stylesheets based on the provided options and ES5 filename.\n *\n * @param {Object} options - Configuration options for loading CSS.\n * @param {string} fileName - The filename of the script.\n */\n\nexport const getAndLoadCSS = (options, fileName) => {\n\tlet thePath = pluginPath(fileName);\n\tlet pluginBaseName = fileName.replace(/\\.[^/.]+$/, \"\");\n\n\tlet AppearanceStylePath = options.csspath.appearance ? options.csspath.appearance : null || `${thePath}${pluginBaseName}.css` || `plugin/${pluginBaseName}/${pluginBaseName}.css`\n\tlet AnimateCSSPath = !options.compatibility ? options.animatecsspath.link : options.animatecsspath.compat;\n\n\tif (options.debug) {\n\t\tconsole.log(`Paths:`);\n\t\tconsole.log(` - Plugin path = ${thePath}`);\n\t\tconsole.log(` - Appearance CSS path = ${AppearanceStylePath}`);\n\t\tconsole.log(` - AnimateCSS CSS path = ${AnimateCSSPath}`);\n\t}\n\n\tloadStyle(AnimateCSSPath, function () {\n\t\tloadStyle(AppearanceStylePath);\n\t});\n\n}","import { toJSONString } from '../helpers';\n\n\n/**\n * Adds automatic animations to elements within a section based on specified criteria.\n *\n * This function examines the provided section for attributes and options to determine\n * which classes should be added to its elements to enable automatic animations.\n *\n * @param {HTMLElement} section - The section element to which automatic animations will be applied.\n * @param {Object} options - The existing user options object\n * @param {Object} vars - The existing vars object\n * @returns {undefined}\n */\nexport const addAutoAnimation = (section, options, vars) => {\n\n\tlet sectionAutoSelectors = null;\n\n\tif (section.hasAttribute(\"data-autoappear\")) {\n\n\t\tlet sectDataAppear = section.dataset.autoappear;\n\n\t\tif (sectDataAppear == \"auto\" || sectDataAppear == \"\" || sectDataAppear.length < 1 || sectDataAppear == \"true\") {\n\t\t\t// This section should get the global autoappear classes on its objects\n\t\t\tsectionAutoSelectors = options.autoelements ? options.autoelements : null;\n\t\t} else {\n\t\t\t// This section should get the local autoappear classes on its objects\n\t\t\tsectionAutoSelectors = sectDataAppear;\n\t\t}\n\n\t} else if ( options.autoappear && options.autoelements ) {\n\t\t// This section should get the global autoappear classes on its objects\n\t\tsectionAutoSelectors = options.autoelements;\n\t}\n\n\tif (sectionAutoSelectors) {\n\n\t\tlet elementsToAnimate = JSON.parse(toJSONString(sectionAutoSelectors));\n\n\t\tObject.entries(elementsToAnimate).forEach(([selector, assignables]) => {\n\n\n\t\t\t// Exclude the elements from vars.appearances\n\t\t\tlet elements = Array.from(section.querySelectorAll(selector)).filter( element => !vars.appearances.includes(element) );\n\n\t\t\tif (elements.length) {\n\n\t\t\t\telements.forEach((element) => {\n\n\t\t\t\t\tvars.appearances.push(element)\n\n\t\t\t\t\tlet newClasses = [], newDelay = null, speedClass = false, elementSplit = null, containerDelay = null;\n\n\t\t\t\t\tif (Array.isArray(assignables)) {\n\n\t\t\t\t\t\tnewClasses = assignables[0].split(/[ ,]+/);\n\t\t\t\t\t\tnewDelay = assignables[1];\n\n\t\t\t\t\t} else if (typeof assignables == \"string\"){\n\n\t\t\t\t\t\tnewClasses = assignables.split(/[ ,]+/);\n\n\t\t\t\t\t} else if (assignables.constructor === Object) {\n\n\t\t\t\t\t\tif (assignables.class || assignables.animation) {\n\t\t\t\t\t\t\tlet animationClass = assignables.animation ? assignables.animation : assignables.class;\n\t\t\t\t\t\t\tnewClasses = animationClass.split(/[ ,]+/);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.speed) {\n\t\t\t\t\t\t\tspeedClass = String(assignables.speed);\n\t\t\t\t\t\t\tif (!speedClass.includes(\"animate__\")) {\n\t\t\t\t\t\t\t\tspeedClass = `animate__${speedClass}`\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.delay) {\n\t\t\t\t\t\t\tnewDelay = String(assignables.delay);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.split) {\n\t\t\t\t\t\t\telementSplit = String(assignables.split);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables[\"container-delay\"]) {\n\t\t\t\t\t\t\tcontainerDelay = String(assignables[\"container-delay\"]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telement.classList.add(...newClasses);\n\t\t\t\t\tif (speedClass) { element.classList.add(speedClass)}\n\t\t\t\t\tif (newDelay) {element.dataset.delay = newDelay};\n\t\t\t\t\tif (elementSplit) {element.dataset.split = elementSplit};\n\t\t\t\t\tif (containerDelay) {element.dataset.containerDelay = containerDelay};\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n","import { copyDataAttributes } from '../helpers';\n\n/**\n * Hoist a list item's appearance to its parent element's appearance.\n *\n * @param {HTMLElement} from - The list item element.\n * @returns {undefined}\n */\nconst hoistAppearance = (from, baseclass) => {\n\tlet to = from.parentNode;\n\tif (!to) return;\n \n\tfor (const sibling of to.children) {\n\t if (sibling !== from && sibling.dataset.appearParent) return;\n\t}\n \n\tto.classList = from.classList;\n\tcopyDataAttributes(from, to, \"data-appear-parent\");\n\tto.innerHTML = from.innerHTML;\n\tto.classList.add(baseclass);\n};\n\n\n/**\n * Fix list items that were changed by Quarto.\n *\n * This function is designed for use with Quarto and handles the conversion of list items\n * with Appearance classes to their parent elements when a manual attribute is present.\n * It also provides automatic conversion for list items that directly contain spans, which\n * is related to Quarto's wrapping of list content in a span.\n *\n * @param {HTMLElement} appearance - The list item element whose appearance will be converted.\n * @param {Object} options - An options object that controls the conversion behavior.\n * @param {boolean} options.appearparents - If `true`, automatic conversion of list items with spans is enabled.\n * @returns {undefined}\n */\nexport const fixListItem = (appearance, options, names) => {\n\n\tlet baseclass = names.baseclass\n\tif (appearance.hasAttribute(\"data-appear-parent\")) {\n\t\thoistAppearance(appearance, baseclass);\n\t}\n\n\tif (options.appearparents) {\n\t\tif (appearance.parentNode && appearance.parentNode.tagName) {\n\t\t\tif (appearance.tagName == \"SPAN\" && appearance.parentNode.tagName == \"LI\") {\n\t\t\t\tlet spanLength = String(appearance.outerHTML).length;\n\t\t\t\tlet liContentLength = String(appearance.parentNode.innerHTML).length;\n\t\t\t\tif (spanLength == liContentLength) {\n\t\t\t\t\thoistAppearance(appearance);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","/**\n * Adds a base class to an HTML element if it doesn't already have it.\n *\n * This function checks if the specified HTML element has the specified base class,\n * and if not, it adds the base class to the element's class list.\n *\n * @param {HTMLElement} appearance - The HTML element to which the base class should be added.\n * @param {Object} names - The existing 'names' object\n * @returns {undefined}\n */\n\nexport const addBaseClass = (appearance, names) => {\n\tif (!appearance.classList.contains(names.baseclass)) {\n\t\tappearance.classList.add(names.baseclass);\n\t}\n\tif (appearance.classList.contains(names.fragmentClass)) {\n\t\tappearance.classList.add('custom');\n\t}\n}\n","export const addDelay = (appearanceArray, options, names) => {\n\n let delay = 0;\n appearanceArray.forEach((appearance, index) => {\n\n if ((index == 0 && appearance.dataset.delay) || index !=0) {\n\n let elementDelay = options.delay;\n\n if (appearance.dataset && appearance.dataset.delay) {\n elementDelay = parseInt(appearance.dataset.delay);\n }\n\n delay = delay + elementDelay;\n\n appearance.style.setProperty('animation-delay', delay + \"ms\");\n appearance.removeAttribute('data-delay');\n }\n\n })\n\n}\n","/**\n * Selects elements with a specified class that are not nested inside an element with another specified class.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} excludeClass - The class name to exclude elements nested inside it.\n * @param {Element} el - The element to find the target elements in.\n * @returns {Element[]} - Array of selected elements.\n */\nconst elemsNotInClass = (targetClass, excludeClass, el) => \n Array.from(el.querySelectorAll(`.${targetClass}`))\n .filter(s => !s.closest(`.${excludeClass}`));\n\n/**\n * Selects elements with a specified class that are nested inside an element with another specified class.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} parentClass - The class name of the parent to find elements in.\n * @param {Element} el - The element to find the target elements in.\n * @returns {Element[]} - Array of selected elements.\n */\nconst elemsInClass = (targetClass, parentClass, el) =>\n Array.from(el.querySelectorAll(`.${targetClass}`))\n .filter(s => s.closest(`.${parentClass}`) === el);\n\n/**\n * Extracts groups of elements with a specified class from the provided section element.\n * Groups are formed based on nesting inside elements with another specified class.\n * @param {Element} section - The section to extract data from.\n * @returns {Element[][]} - Nested arrays of selected elements.\n */\n\n\n/**\n * Extracts groups of elements with a specified class from the provided section element.\n * Groups are formed based on nesting inside elements with another specified class.\n * @param {Element} section - The section to extract data from.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} groupClass - The class name of the parent to find elements in.\n * @returns {Element[][]} - Nested arrays of selected elements.\n */\nexport const getAppearanceArrays = (section, targetClass, groupClass) => {\n const result = [\n elemsNotInClass(targetClass, groupClass, section), \n ...Array.from(section.querySelectorAll(`.${groupClass}`))\n .map(frag => elemsInClass(targetClass, groupClass, frag))\n ];\n\n\tif (result.some(group => group.length > 0)) {\n return result;\n } else {\n\t\treturn false;\n\t}\n};\n","export const convertToSpans = (parent, kind) => {\n\n\tlet splitElements = false;\n\tlet joinChar = ' ';\n\n\tif (kind == \"words\") {\n\t\tsplitElements = parent.textContent.trim().split(/\\s+/);\n\t\t\n\t} else if (kind == \"letters\") {\n\t\tsplitElements = parent.textContent.trim().split('');\n\t\tjoinChar = '';\n\t}\n\n\tif (splitElements) {\n\t\tconst parentAnimateClasses = Array.from(parent.classList).filter(className => className.startsWith('animate__'));\n\t\n\t\tconst newHtml = splitElements.map((element, index) => {\n\t\t\tconst span = document.createElement('span');\n\t\t\tspan.textContent = element;\n\t\t\tif (element == \" \") {span.textContent = \"\\u00A0\"}\n\t\n\t\t\tif (parent.dataset.delay && index !== 0) {\n\t\t\t\tspan.dataset.delay = parent.dataset.delay\n\t\t\t}\n\n\t\t\tif (parent.dataset.containerDelay && index === 0) {\n\t\t\t\tspan.dataset.delay = parent.dataset.containerDelay\n\t\t\t}\n\t\n\t\t\tparent.classList.forEach(className => className.startsWith('animate__') && span.classList.add(className));\n\t\t\treturn span.outerHTML;\n\t\t\t\n\t\t}).join(joinChar);\n\t\n\t\tparentAnimateClasses.forEach(className => parent.classList.remove(className));\n\t\tparent.removeAttribute('data-delay');\n\t\tparent.removeAttribute('data-split');\n\t\tparent.removeAttribute('data-container-delay');\n\t\n\t\tparent.innerHTML = newHtml;\n\t}\n\n\n};","/**\n * Derives slide from and to from the event object.\n *\n * @param {Object} event - The event object containing slide transition details.\n * @returns {Object} - An object containing references to the \"from\" and \"to\" slides.\n */\nconst fromTo = (event) => {\n\tlet slides = {};\n\tslides.from = event.fromSlide || event.previousSlide || null;\n\tslides.to = event.toSlide || event.currentSlide || null;\n\treturn slides;\n};\n\n/**\n * A function that determines the appearance event for a given slide.\n *\n * This function checks the `data-appearevent` attribute of the slide and the `options.appearevent` parameter.\n * If `data-appearevent` is set to \"auto\", it is converted to \"autoanimate\". If `options.appearevent` is \"auto\", it is also converted to \"autoanimate\".\n * The function returns the appearance event, prioritizing `data-appearevent` over `options.appearevent`.\n *\n * @param {HTMLElement} toSlide - The slide for which the appearance event is determined.\n * @param {Object} options - An object containing options for the appearance event.\n * @param {string} options.appearevent - The appearance event option provided in the `options` object.\n *\n * @returns {string} - The determined appearance event for the slide, either from `data-appearevent` or `options.appearevent`.\n */\nconst slideAppearevent = (toSlide, options) => {\n\n\tif (toSlide.dataset.appearevent && toSlide.dataset.appearevent === \"auto\" ) {\n\t\ttoSlide.dataset.appearevent = \"autoanimate\"\n\t}\n\tif (options.appearevent == \"auto\") {options.appearevent = \"autoanimate\"}\n\treturn toSlide.dataset.appearevent ? toSlide.dataset.appearevent : options.appearevent;\n};\n\n/**\n * Remove the 'data-appearance-can-start' attribute from the 'from' slide if the 'hideagain' option is enabled.\n *\n * @param {HTMLElement} slides - The container element for the slides.\n * @param {Object} options - An object containing configuration options.\n * @param {boolean} options.hideagain - A flag indicating whether to remove the attribute when 'hideagain' is true.\n */\nconst removeStartAttribute = (slides, options) => {\n\tif (options.hideagain) {\n\t\tif (slides.from && slides.from.dataset.appearanceCanStart ) {\n\t\t\tslides.from.removeAttribute('data-appearance-can-start');\n\t\t}\n\t}\n};\n\n\n/**\n * Turn off slide appearances when transitioning from one slide to another if the 'hideagain' option is enabled.\n *\n * @param {HTMLElement} slides - The container element for the slides.\n * @param {Object} options - An object containing configuration options.\n * @param {string} names.animatecss - The CSS selector for animated elements.\n */\nconst turnOffSlideAppearances = (slides, options, names) => {\n\tif (options.hideagain) {\n\t\tlet fromAppearances = slides.from.querySelectorAll(names.animatecss);\n\t\tfromAppearances.forEach( appearance => {\n\t\t\tappearance.classList.remove('animationended');\n\t\t} );\n\t\t// Remove visible class from fragments when moving away from that slide\n\t\tlet fromFragments = slides.from.querySelectorAll(`.fragment.visible`);\n\t\tif (fromFragments) {\n\t\t\tfromFragments.forEach(fragment => {\n\t\t\t\tfragment.classList.remove('visible');\n\t\t\t})\n\t\t}\n\t}\n};\n\n\n/**\n * Handles the showing and hiding of slides based on the provided event and options.\n *\n * @param {Object} event - The event object containing slide transition details.\n * @param {Object} options - An object containing configurations for slide appearance management.\n */\nexport const showHideSlide = (event, options, names, vars) => {\n\n\tlet view = vars.deck.getConfig().view;\n\tlet etype = event.type;\n\tlet slides = fromTo(event);\n\n\tif (slides.to) {\n\n\t\tif (etype == \"ready\") {\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t}\n\n\t\tlet appearevent = slideAppearevent(slides.to, options)\n\n\t\tif (etype == appearevent || (etype == \"slidetransitionend\" && appearevent == \"autoanimate\")) {\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t}\n\n\t\t// Add experimental Reader mode compatibility, does not have a slidetransitionend event yet\n\t\tif (view == \"scroll\" && etype == 'slidechanged' ) {\n\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tturnOffSlideAppearances(slides, options, names);\n\n\t\t\t// Add delay to allow for scroll animation to finish\n\t\t\tsetTimeout(() => {\n\t\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t\t}, options.delay)\n\t\t}\n\n\n\t\tif (etype == \"slidetransitionend\" ) {\n\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tturnOffSlideAppearances(slides, options, names);\n\t\t}\n\t\t\n\t\tif (etype == 'slidechanged' && document.body.dataset.exitoverview) {\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\n\t\t} else if (etype == 'overviewhidden' ) {\n\n\t\t\tdocument.body.dataset.exitoverview = true;\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tdocument.body.removeAttribute('data-exitoverview')\n\t\t\t}, 500)\n\n\t\t\tif (event.currentSlide ) {\n\t\t\t\tremoveStartAttribute(slides, options);\n\t\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t\t}\n\t\t}\n\t}\n}","import { debugLog, mergeDeep, doneLoading, isStack } from './helpers';\n\nimport {getAndLoadCSS} from './functions/get-load-css.js';\nimport {addAutoAnimation} from './functions/add-auto-animation.js';\nimport {fixListItem} from './functions/fix-list-item';\nimport {addBaseClass} from './functions/add-base-class.js';\nimport {addDelay} from './functions/add-delay.js';\nimport {getAppearanceArrays} from './functions/get-appearance-arrays.js';\nimport {convertToSpans} from './functions/convert-to-spans';\nimport {showHideSlide} from './functions/show-hide-slide.js';\n\n\nconst Plugin = () => {\n\n\tconst vars = {};\n\tvars.names = {};\n\tlet options = {};\n\n\t/**\n\t* Prepare the plugin to find Appearance elements\n\t* @param {Object} vars - The variables to be prepared.\n\t* @param {Object} names - The names to be prepared.\n\t* @param {Function} resolve - The callback function to be called when preparation is complete.\n\t* @throws {Error} Throws an error if the 'options' object is not defined.\n\t*/\n\tconst prepare = (options, vars, resolve) => {\n\n\t\tdebugLog(options, \"------------- Preloading -------------\");\n\n\t\tlet names = vars.names;\n\n\t\tgetAndLoadCSS(options, names.es5Filename);\n\n\t\tif (options.compatibility) {\n\t\t\tnames.animatecss = '.backInDown, .backInLeft, .backInRight, .backInUp, .bounceIn, .bounceInDown, .bounceInLeft, .bounceInRight, .bounceInUp, .fadeIn, .fadeInDown, .fadeInDownBig, .fadeInLeft, .fadeInLeftBig, .fadeInRight, .fadeInRightBig, .fadeInUp, .fadeInUpBig, .fadeInTopLeft, .fadeInTopRight, .fadeInBottomLeft, .fadeInBottomRight, .flipInX, .flipInY, .lightSpeedInRight, .lightSpeedInLeft, .rotateIn, .rotateInDownLeft, .rotateInDownRight, .rotateInUpLeft, .rotateInUpRight, .jackInTheBox, .rollIn, .zoomIn, .zoomInDown, .zoomInLeft, .zoomInRight, .zoomInUp, .slideInDown, .slideInLeft, .slideInRight, .slideInUp, .skidLeft, .skidLeftBig, .skidRight, .skidRightBig, .shrinkIn, .shrinkInBlur';\n\t\t\tnames.baseclass = options.compatibilitybaseclass\n\t\t}\n\n\t\tvars.appearances = Array.from(vars.slides.querySelectorAll(names.animatecss));\n\n\t\t// Go through each section to see if there are any (auto) selectors that need animation classes\n\t\tvars.regularSections.forEach(theSection => addAutoAnimation(theSection, options, vars));\n\n\t\tvars.appearances.forEach((theAppearance, index) => {\n\t\t\t// Fix any list item where the Appearance classes were moved to the span (Quarto does this)\n\t\t\tfixListItem(theAppearance, options, names);\n\n\t\t\t// Go through each appearance element and add the baseclass if it doesn't have it\n\t\t\taddBaseClass(theAppearance, names);\n\n\t\t\tif (theAppearance.hasAttribute('data-split')) {\n\t\t\t\tconvertToSpans(theAppearance, theAppearance.dataset.split);\n\t\t\t}\n\t\t});\n\n\t\tvars.regularSections.forEach((theSection, index) => {\n\t\t\t// Get all the Appearances in the section as separate arrays per delay loop\n\t\t\tlet appearanceArrays = getAppearanceArrays(theSection, names.baseclass, names.fragmentClass);\n\n\t\t\tif (appearanceArrays) {\n\t\t\t\tappearanceArrays.forEach((appearanceArray) => {\n\t\t\t\t\t// Add the delays to each appearance in the array\n\t\t\t\t\taddDelay(appearanceArray, options, names)\n\t\t\t\t})\n\t\t\t}\n\t\t});\n\n\t\tdoneLoading(resolve);\n\t}\n\n\t/**\n\t* The main function of the plugin\n\t* @param {object} deck - The deck object\n\t* @param {object} options - The options object\n\t* @param {string} es5Filename - The name of the file that will be used\n\t*/\n\tconst Appear = function (deck, options, es5Filename) {\n\n\t\tlet names = vars.names;\n\n\t\t// Set up names\n\t\tnames.baseclass = options.baseclass;\n\t\tnames.compatibilitybaseclass = options.compatibilitybaseclass;\n\t\tnames.fragmentSelector = \".fragment\";\n\t\tnames.fragmentClass = \"fragment\";\n\t\tnames.speedClasses = ['slower', 'slow', 'fast', 'faster'];\n\t\tnames.speedClasses.push(...names.speedClasses.map(speed => `animate__${speed}`));\n\t\tnames.animatecss = '[class^=\"animate__\"],[class*=\" animate__\"]';\n\t\tnames.es5Filename = es5Filename;\n\t\tnames.eventnames = ['ready', 'slidechanged', 'slidetransitionend', 'autoanimate', 'overviewhidden', 'scrolle'];\n\t\n\t\t// Set up variables\n\t\tvars.deck = deck;\n\t\tvars.dom = deck.getRevealElement();\n\t\tvars.viewport = deck.getViewportElement();\n\t\tvars.slides = deck.getSlidesElement();\n\n\t\tvars.sections = vars.slides.querySelectorAll('section');\n\t\tvars.fragments = vars.slides.querySelectorAll(names.fragmentSelector);\n\t\tvars.regularSections = Array.from(vars.sections).filter( section => !isStack(section));\n\n\t\tif( /receiver/i.test( window.location.search ) ) vars.viewport.classList.add('sv');\n\n\t\tnames.eventnames.forEach( (eventname) => deck.on( eventname, event => { showHideSlide(event, options, names, vars) } ) );\n\n\t\tvars.viewport.addEventListener(\"animationend\", (event) => {\n\t\t\tevent.target.classList.add('animationended');\n\t\t});\n\t\tvars.viewport.addEventListener(\"fragmenthidden\", (event) => {\n\t\t\tevent.fragment.classList.remove('animationended');\n\t\t\tevent.fragment.querySelectorAll('.animationended').forEach(el => {\n\t\t\t\tel.classList.remove('animationended');\n\t\t\t});\n\t\t});\n\n\t\treturn new Promise(resolve => {\n\t\t\tprepare(options, vars, resolve);\n\t\t\tdebugLog(options, \"---------- Done preloading ----------\");\n\t\t});\n\t};\n\n\n\t/**\n\t* Initialize the plugin\n\t* @param {object} deck - The deck object\n\t*/\n\tconst init = function (deck) {\n\n\t\tlet defaultOptions = {\n\t\t\tbaseclass: 'animate__animated',\n\t\t\thideagain: true,\n\t\t\tdelay: 300,\n\t\t\tdebug: false,\n\t\t\tappearevent: 'slidetransitionend',\n\t\t\tautoappear: false,\n\t\t\tautoelements: false,\n\t\t\tappearparents: false,\n\t\t\tcsspath: '',\n\t\t\tanimatecsspath: {\n\t\t\t\tlink : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css',\n\t\t\t\tcompat : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.compat.css',\n\t\t\t},\n\t\t\tcompatibility: false,\n\t\t\tcompatibilitybaseclass: 'animated'\n\t\t};\n\n\t\toptions = mergeDeep(defaultOptions, deck.getConfig().appearance || {});\n\n\t\treturn Appear(deck, options, \"appearance.js\");\n\t};\n\n\treturn { id: 'appearance', init: init };\n};\n\nexport default Plugin;"],"names":["isJSON","str","JSON","parse","e","isStack","_ref","childNodes","i","length","tagName","copyDataAttributes","_ref2","target","not","attributes","filter","_ref3","nodeName","includes","forEach","_ref4","nodeValue","setAttribute","isObject","item","Array","isArray","mergeDeep","_len","arguments","sources","_key","source","shift","key","Object","assign","doneLoading","resolve","setTimeout","toJSONString","JSONString","replace","stringify","trim","charAt","loadStyle","url","callback","head","document","querySelector","style","createElement","rel","href","onload","call","onreadystatechange","readyState","appendChild","pluginPath","fileName","path","pluginScript","getAttribute","slice","import","meta","lastIndexOf","debugLog","options","text","debug","console","log","getAndLoadCSS","thePath","pluginBaseName","AppearanceStylePath","csspath","appearance","AnimateCSSPath","compatibility","animatecsspath","link","compat","addAutoAnimation","section","vars","sectionAutoSelectors","hasAttribute","sectDataAppear","dataset","autoappear","autoelements","elementsToAnimate","entries","selector","assignables","elements","from","querySelectorAll","element","appearances","push","newClasses","newDelay","speedClass","elementSplit","containerDelay","split","constructor","class","animation","animationClass","speed","String","delay","classList","add","hoistAppearance","baseclass","to","parentNode","sibling","children","appearParent","innerHTML","fixListItem","names","appearparents","spanLength","outerHTML","liContentLength","addBaseClass","contains","fragmentClass","addDelay","appearanceArray","index","elementDelay","parseInt","setProperty","removeAttribute","elemsNotInClass","targetClass","excludeClass","el","s","closest","elemsInClass","parentClass","getAppearanceArrays","groupClass","result","map","frag","some","group","convertToSpans","parent","kind","splitElements","joinChar","textContent","parentAnimateClasses","className","startsWith","newHtml","span","join","remove","fromTo","event","slides","fromSlide","previousSlide","toSlide","currentSlide","slideAppearevent","appearevent","removeStartAttribute","hideagain","appearanceCanStart","turnOffSlideAppearances","fromAppearances","animatecss","fromFragments","fragment","showHideSlide","view","deck","getConfig","etype","type","body","exitoverview","Plugin","prepare","es5Filename","compatibilitybaseclass","regularSections","theSection","theAppearance","appearanceArrays","Appear","fragmentSelector","speedClasses","eventnames","dom","getRevealElement","viewport","getViewportElement","getSlidesElement","sections","fragments","test","window","location","search","eventname","on","addEventListener","Promise","init","defaultOptions","id"],"mappings":";;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACO,MAAMA,MAAM,GAAGC,GAAG,IAAI;EAC5B,IAAI;IACH,OAAQC,IAAI,CAACC,KAAK,CAACF,GAAG,CAAC,IAAI,CAAC,CAACA,GAAG,CAAA;GAChC,CAAC,OAAOG,CAAC,EAAE;AACX,IAAA,OAAO,KAAK,CAAA;AACb,GAAA;AACD,CAAC,CAAA;;AAcD;AAC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CAA2C,CAAC,CAAA;AAC/D,KAAC,CAAC,CAAA;GACF,CAAA;;AAGD;AACD;AACA;AACA;AACC,EAAA,MAAM0J,IAAI,GAAG,UAAUjC,IAAI,EAAE;AAE5B,IAAA,IAAIkC,cAAc,GAAG;AACpBxG,MAAAA,SAAS,EAAE,mBAAmB;AAC9B6D,MAAAA,SAAS,EAAE,IAAI;AACfjE,MAAAA,KAAK,EAAE,GAAG;AACV7C,MAAAA,KAAK,EAAE,KAAK;AACZ4G,MAAAA,WAAW,EAAE,oBAAoB;AACjCvF,MAAAA,UAAU,EAAE,KAAK;AACjBC,MAAAA,YAAY,EAAE,KAAK;AACnBoC,MAAAA,aAAa,EAAE,KAAK;AACpBnD,MAAAA,OAAO,EAAE,EAAE;AACXI,MAAAA,cAAc,EAAE;AACfC,QAAAA,IAAI,EAAG,0EAA0E;AACjFC,QAAAA,MAAM,EAAG,6EAAA;OACT;AACDH,MAAAA,aAAa,EAAE,KAAK;AACpBsH,MAAAA,sBAAsB,EAAE,UAAA;KACxB,CAAA;AAEDlI,IAAAA,OAAO,GAAG5C,SAAS,CAACuM,cAAc,EAAElC,IAAI,CAACC,SAAS,EAAE,CAAChH,UAAU,IAAI,EAAE,CAAC,CAAA;AAEtE,IAAA,OAAO6H,MAAM,CAACd,IAAI,EAAEzH,OAAO,EAAE,eAAe,CAAC,CAAA;GAC7C,CAAA;EAED,OAAO;AAAE4J,IAAAA,EAAE,EAAE,YAAY;AAAEF,IAAAA,IAAI,EAAEA,IAAAA;GAAM,CAAA;AACxC;;;;"} \ No newline at end of file +{"version":3,"file":"appearance.esm.js","sources":["../../../src/plugin/js/helpers.js","../../../src/plugin/js/functions/get-load-css.js","../../../src/plugin/js/functions/fix-list-item.js","../../../src/plugin/js/functions/get-appearance-arrays.js","../../../src/plugin/js/functions/show-hide-slide.js","../../../src/plugin/js/plugin.js","../../../src/plugin/js/functions/add-auto-animation.js","../../../src/plugin/js/functions/add-base-class.js","../../../src/plugin/js/functions/convert-to-spans.js","../../../src/plugin/js/functions/add-delay.js"],"sourcesContent":["/**\n * Check if a given string is valid JSON.\n * @param {string} str - The string to be checked.\n * @returns {boolean} `true` if the string is valid JSON, otherwise `false`.\n */\nexport const isJSON = str => {\n\ttry {\n\t\treturn (JSON.parse(str) && !!str);\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\n/**\n * Convert a NodeList into an array based on provided selectors.\n * @param {Element} container - The root element to begin querying.\n * @param {string} selectors - A string containing one or more CSS selectors separated by commas.\n * @returns {Element[]} Array of elements that match the given selectors.\n */\nexport const selectionArray = (container, selectors) => {\n\tlet selections = container.querySelectorAll(selectors);\n\tlet selectionarray = Array.prototype.slice.call(selections);\n\treturn selectionarray;\n};\n\n/**\n * Check if an element has child nodes that are `SECTION` elements.\n * @param {Object} param0 - Object with childNodes property.\n * @param {NodeListOf} param0.childNodes - List of child nodes of the element.\n * @returns {boolean} `true` if the element contains `SECTION` child nodes, otherwise `false`.\n */\nexport const isStack = ({childNodes}) => {\n\tlet isStack = false;\n\tfor (let i = 0; i < childNodes.length; i++) {\n\t\tif (childNodes[i].tagName == \"SECTION\") {\n\t\t\tisStack = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn isStack;\n};\n\n/**\n * Copy data attributes from a source element to a target element with an optional exception.\n * @param {Object} param0 - Object with attributes property.\n * @param {NamedNodeMap} param0.attributes - Map of attributes of the source element.\n * @param {Element} target - Target element to copy attributes to.\n * @param {string} [not] - Optional attribute name to exclude from copying.\n */\nexport const copyDataAttributes = ({attributes}, target, not) => {\n\t[...attributes].filter(({nodeName}) => nodeName.includes('data')).forEach(({nodeName, nodeValue}) => {\n\t\tif ((not && nodeName !== not) || !not) {\n\t\t\ttarget.setAttribute(nodeName, nodeValue);\n\t\t}\n\t});\n};\n\n/**\n * Check if the given item is an object and not an array.\n * @param {*} item - The item to be checked.\n * @returns {boolean} `true` if the item is an object and not an array, otherwise `false`.\n */\nconst isObject = (item) => {\n\treturn (item && typeof item === 'object' && !Array.isArray(item));\n}\n\n/**\n * Deep merge multiple objects into a target object.\n * @param {Object} target - Target object to merge values into.\n * @param {...Object} sources - Source objects to merge from.\n * @returns {Object} The merged object.\n */\nexport const mergeDeep = (target, ...sources) => {\n\tif (!sources.length) return target;\n\tconst source = sources.shift();\n\n\tif (isObject(target) && isObject(source)) {\n\t\tfor (const key in source) {\n\t\t\tif (isObject(source[key])) {\n\t\t\t\tif (!target[key]) Object.assign(target, { [key]: {} });\n\t\t\t\tmergeDeep(target[key], source[key]);\n\t\t\t} else {\n\t\t\t\tObject.assign(target, { [key]: source[key] });\n\t\t\t}\n\t\t}\n\t}\n\treturn mergeDeep(target, ...sources);\n}\n\n/**\n * Resolves the given Promise immediately using setTimeout.\n * @param {Function} resolve - The resolve function of a Promise.\n * @returns {number} The ID value of the timer that is set.\n */\nexport const doneLoading = (resolve) => {\n\treturn setTimeout(resolve, 0);\n}\n\n\n/**\n * Converts a JavaScript object or a JSON-formatted string to a JSON string.\n *\n * @param {Object|string} str - The input string or object to be converted to a JSON string.\n * @returns {string} The JSON string.\n */\nexport const toJSONString = (str) => {\n\tlet JSONString = ''\n\n\tif (typeof str === \"string\") str = str.replace(/[“”]/g,'\"').replace(/[‘’]/g,\"'\");\n\n\tif (isJSON(str)) {\n\t\tJSONString = str\n\t} else {\n\t\tif (typeof str === \"object\") {\n\t\t\tJSONString = JSON.stringify(str, null, 2)\n\t\t} else {\n\t\t\tJSONString = str.trim().replace(/'/g, '\"').charAt(0) === \"{\" ? str.trim().replace(/'/g, '\"') : `{${str.trim().replace(/'/g, '\"')}}`;\n\t\t}\n\t}\n\treturn JSONString;\n}\n\n\n/**\n * Dynamically loads a resource from the specified URL and calls a callback function when it's loaded.\n *\n * @param {string} url - The URL of the resource to load.\n * @param {string} type - The type of resource to load.\n * @param {Function} callback - A callback function to be called when the resource is loaded.\n */\nexport const loadResource = (url, type, callback) => {\n\tlet head = document.querySelector('head');\n\tlet resource;\n\n\tif (type === 'script') {\n\t resource = document.createElement('script');\n\t resource.type = 'text/javascript';\n\t resource.src = url;\n\t} else if (type === 'stylesheet') {\n\t resource = document.createElement('link');\n\t resource.rel = 'stylesheet';\n\t resource.href = url;\n\t}\n\tconst finish = () => {\n\t if (typeof callback === 'function') {\n\t\tcallback.call();\n\t\tcallback = null;\n\t }\n\t};\n\tresource.onload = finish;\n\tresource.onreadystatechange = function () {\n\t\tif (this.readyState === 'loaded') {\n\t\t finish();\n\t\t}\n\t};\n\thead.appendChild(resource);\n}\n\n\n/**\n * Retrieves the path of a JavaScript file based on its filename.\n *\n * @param {string} fileName - The filename of the script.\n * @returns {string} The path to the plugin's location.\n */\nexport const pluginPath = (fileName) => {\n\tlet path;\n\tlet pluginScript = document.querySelector(`script[src$=\"${fileName}\"]`);\n\tif (pluginScript) {\n\t\tpath = pluginScript.getAttribute(\"src\").slice(0, -1 * (fileName.length));\n\t} else {\n\t\tpath = import.meta.url.slice(0, import.meta.url.lastIndexOf('/') + 1);\n\t}\n\treturn path;\n}\n\n\n/**\n * Check if element 'a' appears before element 'b' in the DOM tree.\n *\n * @param {HTMLElement} a - The first HTML element to compare.\n * @param {HTMLElement} b - The second HTML element to compare.\n * @returns {boolean|undefined} - Returns `true` if element 'a' appears before element 'b', `false` if 'b' appears before 'a', and `undefined` if the elements have no relative position in the DOM tree.\n */\nexport const isBefore = (a, b) => {\n var all = document.getElementsByTagName('*');\n\n for (var i = 0; i < all.length; ++i) {\n if (all[i] === a) {\n return true;\n } else if (all[i] === b) {\n return false;\n }\n }\n // If the elements have no relative position in the DOM tree\n return undefined;\n};\n\n\n/**\n * Check the number of occurrences of a specific element in an array.\n *\n * @param {Array} array - The array in which occurrences are to be counted.\n * @param {*} element - The element to be counted within the array.\n * @returns {number} - The count of occurrences of the specified element in the array.\n */\nexport const checkOccurrence = (array, element) => {\n let counter = 0;\n for (let i = 0; i < array.length; i++) {\n if (array[i] == element) {\n counter++;\n }\n }\n return counter;\n};\n\n\n/**\n * Create an HTML element from a string of HTML.\n *\n * @param {string} thehtml - The string of HTML to be converted into an HTML element.\n * @returns {HTMLElement | null} - The HTML element created from the provided HTML string. Returns `null` if the element couldn't be created.\n */\nexport const createNode = (thehtml) => {\n const fragment = document.createRange().createContextualFragment(thehtml);\n return fragment.firstElementChild;\n};\n\n\n\nexport const debugLog = (options, text) => {\n\tif (options.debug) console.log(text);\n}\n\n","import { loadResource } from '../helpers';\nimport { pluginPath } from '../helpers';\n\n/**\n * Retrieves and loads CSS stylesheets based on the provided options and ES5 filename.\n *\n * @param {Object} options - Configuration options for loading CSS.\n * @param {string} fileName - The filename of the script.\n */\n\nexport const getAndLoadCSS = (options, fileName) => {\n\tlet thePath = pluginPath(fileName);\n\tlet pluginBaseName = fileName.replace(/\\.[^/.]+$/, \"\");\n\n\tlet AppearanceStylePath = options.csspath.appearance ? options.csspath.appearance : null || `${thePath}${pluginBaseName}.css` || `plugin/${pluginBaseName}/${pluginBaseName}.css`\n\tlet AnimateCSSPath = !options.compatibility ? options.animatecsspath.link : options.animatecsspath.compat;\n\n\tif (options.debug) {\n\t\tconsole.log(`Paths:`);\n\t\tconsole.log(` - Plugin path = ${thePath}`);\n\t\tconsole.log(` - Appearance CSS path = ${AppearanceStylePath}`);\n\t\tconsole.log(` - AnimateCSS CSS path = ${AnimateCSSPath}`);\n\t}\n\n\tloadResource(AnimateCSSPath, 'stylesheet', function () {\n\t\tloadResource(AppearanceStylePath, 'stylesheet');\n\t});\n\n}","import { copyDataAttributes } from '../helpers';\n\n/**\n * Hoist a list item's appearance to its parent element's appearance.\n *\n * @param {HTMLElement} from - The list item element.\n * @returns {undefined}\n */\nconst hoistAppearance = (from, baseclass) => {\n\tlet to = from.parentNode;\n\tif (!to) return;\n \n\tfor (const sibling of to.children) {\n\t if (sibling !== from && sibling.dataset.appearParent) return;\n\t}\n \n\tto.classList = from.classList;\n\tcopyDataAttributes(from, to, \"data-appear-parent\");\n\tto.innerHTML = from.innerHTML;\n\tto.classList.add(baseclass);\n};\n\n\n/**\n * Fix list items that were changed by Quarto.\n *\n * This function is designed for use with Quarto and handles the conversion of list items\n * with Appearance classes to their parent elements when a manual attribute is present.\n * It also provides automatic conversion for list items that directly contain spans, which\n * is related to Quarto's wrapping of list content in a span.\n *\n * @param {HTMLElement} appearance - The list item element whose appearance will be converted.\n * @param {Object} options - An options object that controls the conversion behavior.\n * @param {boolean} options.appearparents - If `true`, automatic conversion of list items with spans is enabled.\n * @returns {undefined}\n */\nexport const fixListItem = (appearance, options, names) => {\n\n\tlet baseclass = names.baseclass\n\tif (appearance.hasAttribute(\"data-appear-parent\")) {\n\t\thoistAppearance(appearance, baseclass);\n\t}\n\n\tif (options.appearparents) {\n\t\tif (appearance.parentNode && appearance.parentNode.tagName) {\n\t\t\tif (appearance.tagName == \"SPAN\" && appearance.parentNode.tagName == \"LI\") {\n\t\t\t\tlet spanLength = String(appearance.outerHTML).length;\n\t\t\t\tlet liContentLength = String(appearance.parentNode.innerHTML).length;\n\t\t\t\tif (spanLength == liContentLength) {\n\t\t\t\t\thoistAppearance(appearance);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","/**\n * Selects elements with a specified class that are not nested inside an element with another specified class.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} excludeClass - The class name to exclude elements nested inside it.\n * @param {Element} el - The element to find the target elements in.\n * @returns {Element[]} - Array of selected elements.\n */\nconst elemsNotInClass = (targetClass, excludeClass, el) => \n Array.from(el.querySelectorAll(`.${targetClass}`))\n .filter(s => !s.closest(`.${excludeClass}`));\n\n/**\n * Selects elements with a specified class that are nested inside an element with another specified class.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} parentClass - The class name of the parent to find elements in.\n * @param {Element} el - The element to find the target elements in.\n * @returns {Element[]} - Array of selected elements.\n */\nconst elemsInClass = (targetClass, parentClass, el) =>\n Array.from(el.querySelectorAll(`.${targetClass}`))\n .filter(s => s.closest(`.${parentClass}`) === el);\n\n/**\n * Extracts groups of elements with a specified class from the provided section element.\n * Groups are formed based on nesting inside elements with another specified class.\n * @param {Element} section - The section to extract data from.\n * @returns {Element[][]} - Nested arrays of selected elements.\n */\n\n\n/**\n * Extracts groups of elements with a specified class from the provided section element.\n * Groups are formed based on nesting inside elements with another specified class.\n * @param {Element} section - The section to extract data from.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} groupClass - The class name of the parent to find elements in.\n * @returns {Element[][]} - Nested arrays of selected elements.\n */\nexport const getAppearanceArrays = (section, targetClass, groupClass) => {\n const result = [\n elemsNotInClass(targetClass, groupClass, section), \n ...Array.from(section.querySelectorAll(`.${groupClass}`))\n .map(frag => elemsInClass(targetClass, groupClass, frag))\n ];\n\n\tif (result.some(group => group.length > 0)) {\n return result;\n } else {\n\t\treturn false;\n\t}\n};\n","/**\n * Derives slide from and to from the event object.\n *\n * @param {Object} event - The event object containing slide transition details.\n * @returns {Object} - An object containing references to the \"from\" and \"to\" slides.\n */\nconst fromTo = (event) => {\n\tlet slides = {};\n\tslides.from = event.fromSlide || event.previousSlide || null;\n\tslides.to = event.toSlide || event.currentSlide || null;\n\treturn slides;\n};\n\n/**\n * A function that determines the appearance event for a given slide.\n *\n * This function checks the `data-appearevent` attribute of the slide and the `options.appearevent` parameter.\n * If `data-appearevent` is set to \"auto\", it is converted to \"autoanimate\". If `options.appearevent` is \"auto\", it is also converted to \"autoanimate\".\n * The function returns the appearance event, prioritizing `data-appearevent` over `options.appearevent`.\n *\n * @param {HTMLElement} toSlide - The slide for which the appearance event is determined.\n * @param {Object} options - An object containing options for the appearance event.\n * @param {string} options.appearevent - The appearance event option provided in the `options` object.\n *\n * @returns {string} - The determined appearance event for the slide, either from `data-appearevent` or `options.appearevent`.\n */\nconst slideAppearevent = (toSlide, options) => {\n\n\tif (toSlide.dataset.appearevent && toSlide.dataset.appearevent === \"auto\" ) {\n\t\ttoSlide.dataset.appearevent = \"autoanimate\"\n\t}\n\tif (options.appearevent == \"auto\") {options.appearevent = \"autoanimate\"}\n\treturn toSlide.dataset.appearevent ? toSlide.dataset.appearevent : options.appearevent;\n};\n\n/**\n * Remove the 'data-appearance-can-start' attribute from the 'from' slide if the 'hideagain' option is enabled.\n *\n * @param {HTMLElement} slides - The container element for the slides.\n * @param {Object} options - An object containing configuration options.\n * @param {boolean} options.hideagain - A flag indicating whether to remove the attribute when 'hideagain' is true.\n */\nconst removeStartAttribute = (slides, options) => {\n\tif (options.hideagain) {\n\t\tif (slides.from && slides.from.dataset.appearanceCanStart ) {\n\t\t\tslides.from.removeAttribute('data-appearance-can-start');\n\t\t}\n\t}\n};\n\n\n/**\n * Turn off slide appearances when transitioning from one slide to another if the 'hideagain' option is enabled.\n *\n * @param {HTMLElement} slides - The container element for the slides.\n * @param {Object} options - An object containing configuration options.\n * @param {string} names.animatecss - The CSS selector for animated elements.\n */\nconst turnOffSlideAppearances = (slides, options, names) => {\n\tif (options.hideagain) {\n\t\tlet fromAppearances = slides.from.querySelectorAll(names.animatecss);\n\t\tfromAppearances.forEach( appearance => {\n\t\t\tappearance.classList.remove('animationended');\n\t\t} );\n\t\t// Remove visible class from fragments when moving away from that slide\n\t\tlet fromFragments = slides.from.querySelectorAll(`.fragment.visible`);\n\t\tif (fromFragments) {\n\t\t\tfromFragments.forEach(fragment => {\n\t\t\t\tfragment.classList.remove('visible');\n\t\t\t})\n\t\t}\n\t}\n};\n\n\n/**\n * Handles the showing and hiding of slides based on the provided event and options.\n *\n * @param {Object} event - The event object containing slide transition details.\n * @param {Object} options - An object containing configurations for slide appearance management.\n */\nexport const showHideSlide = (event, options, names, vars) => {\n\n\tlet view = vars.deck.getConfig().view;\n\tlet etype = event.type;\n\tlet slides = fromTo(event);\n\n\tif (slides.to) {\n\n\t\tif (etype == \"ready\") {\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t}\n\n\t\tlet appearevent = slideAppearevent(slides.to, options)\n\n\t\tif (etype == appearevent || (etype == \"slidetransitionend\" && appearevent == \"autoanimate\")) {\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t}\n\n\t\t// Add experimental Reader mode compatibility, does not have a slidetransitionend event yet\n\t\tif (view == \"scroll\" && etype == 'slidechanged' ) {\n\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tturnOffSlideAppearances(slides, options, names);\n\n\t\t\t// Add delay to allow for scroll animation to finish\n\t\t\tsetTimeout(() => {\n\t\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t\t}, options.delay)\n\t\t}\n\n\n\t\tif (etype == \"slidetransitionend\" ) {\n\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tturnOffSlideAppearances(slides, options, names);\n\t\t}\n\t\t\n\t\tif (etype == 'slidechanged' && document.body.dataset.exitoverview) {\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\n\t\t} else if (etype == 'overviewhidden' ) {\n\n\t\t\tdocument.body.dataset.exitoverview = true;\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tdocument.body.removeAttribute('data-exitoverview')\n\t\t\t}, 500)\n\n\t\t\tif (event.currentSlide ) {\n\t\t\t\tremoveStartAttribute(slides, options);\n\t\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t\t}\n\t\t}\n\t}\n}","import { debugLog, mergeDeep, doneLoading, isStack } from './helpers';\n\nimport {getAndLoadCSS} from './functions/get-load-css.js';\nimport {addAutoAnimation} from './functions/add-auto-animation.js';\nimport {fixListItem} from './functions/fix-list-item';\nimport {addBaseClass} from './functions/add-base-class.js';\nimport {addDelay} from './functions/add-delay.js';\nimport {getAppearanceArrays} from './functions/get-appearance-arrays.js';\nimport {convertToSpans} from './functions/convert-to-spans';\nimport {showHideSlide} from './functions/show-hide-slide.js';\n\n\nconst Plugin = () => {\n\n\tconst vars = {};\n\tvars.names = {};\n\tlet options = {};\n\n\t/**\n\t* Prepare the plugin to find Appearance elements\n\t* @param {Object} vars - The variables to be prepared.\n\t* @param {Object} names - The names to be prepared.\n\t* @param {Function} resolve - The callback function to be called when preparation is complete.\n\t* @throws {Error} Throws an error if the 'options' object is not defined.\n\t*/\n\tconst prepare = (options, vars, resolve) => {\n\n\t\tdebugLog(options, \"------------- Preloading -------------\");\n\n\t\tlet names = vars.names;\n\n\t\tgetAndLoadCSS(options, names.es5Filename);\n\n\t\tif (options.compatibility) {\n\t\t\tnames.animatecss = '.backInDown, .backInLeft, .backInRight, .backInUp, .bounceIn, .bounceInDown, .bounceInLeft, .bounceInRight, .bounceInUp, .fadeIn, .fadeInDown, .fadeInDownBig, .fadeInLeft, .fadeInLeftBig, .fadeInRight, .fadeInRightBig, .fadeInUp, .fadeInUpBig, .fadeInTopLeft, .fadeInTopRight, .fadeInBottomLeft, .fadeInBottomRight, .flipInX, .flipInY, .lightSpeedInRight, .lightSpeedInLeft, .rotateIn, .rotateInDownLeft, .rotateInDownRight, .rotateInUpLeft, .rotateInUpRight, .jackInTheBox, .rollIn, .zoomIn, .zoomInDown, .zoomInLeft, .zoomInRight, .zoomInUp, .slideInDown, .slideInLeft, .slideInRight, .slideInUp, .skidLeft, .skidLeftBig, .skidRight, .skidRightBig, .shrinkIn, .shrinkInBlur';\n\t\t\tnames.baseclass = options.compatibilitybaseclass\n\t\t}\n\n\t\tvars.appearances = Array.from(vars.slides.querySelectorAll(names.animatecss));\n\n\t\t// Go through each section to see if there are any (auto) selectors that need animation classes\n\t\tvars.regularSections.forEach(theSection => addAutoAnimation(theSection, options, vars));\n\n\t\tvars.appearances.forEach((theAppearance, index) => {\n\t\t\t// Fix any list item where the Appearance classes were moved to the span (Quarto does this)\n\t\t\tfixListItem(theAppearance, options, names);\n\n\t\t\t// Go through each appearance element and add the baseclass if it doesn't have it\n\t\t\taddBaseClass(theAppearance, names);\n\n\t\t\tif (theAppearance.hasAttribute('data-split')) {\n\t\t\t\tconvertToSpans(theAppearance, theAppearance.dataset.split);\n\t\t\t}\n\t\t});\n\n\t\tvars.regularSections.forEach((theSection, index) => {\n\t\t\t// Get all the Appearances in the section as separate arrays per delay loop\n\t\t\tlet appearanceArrays = getAppearanceArrays(theSection, names.baseclass, names.fragmentClass);\n\n\t\t\tif (appearanceArrays) {\n\t\t\t\tappearanceArrays.forEach((appearanceArray) => {\n\t\t\t\t\t// Add the delays to each appearance in the array\n\t\t\t\t\taddDelay(appearanceArray, options, names)\n\t\t\t\t})\n\t\t\t}\n\t\t});\n\n\t\tdoneLoading(resolve);\n\t}\n\n\t/**\n\t* The main function of the plugin\n\t* @param {object} deck - The deck object\n\t* @param {object} options - The options object\n\t* @param {string} es5Filename - The name of the file that will be used\n\t*/\n\tconst Appear = function (deck, options, es5Filename) {\n\n\t\tlet names = vars.names;\n\n\t\t// Set up names\n\t\tnames.baseclass = options.baseclass;\n\t\tnames.compatibilitybaseclass = options.compatibilitybaseclass;\n\t\tnames.fragmentSelector = \".fragment\";\n\t\tnames.fragmentClass = \"fragment\";\n\t\tnames.speedClasses = ['slower', 'slow', 'fast', 'faster'];\n\t\tnames.speedClasses.push(...names.speedClasses.map(speed => `animate__${speed}`));\n\t\tnames.animatecss = '[class^=\"animate__\"],[class*=\" animate__\"]';\n\t\tnames.es5Filename = es5Filename;\n\t\tnames.eventnames = ['ready', 'slidechanged', 'slidetransitionend', 'autoanimate', 'overviewhidden', 'scrolle'];\n\t\n\t\t// Set up variables\n\t\tvars.deck = deck;\n\t\tvars.dom = deck.getRevealElement();\n\t\tvars.viewport = deck.getViewportElement();\n\t\tvars.slides = deck.getSlidesElement();\n\n\t\tvars.sections = vars.slides.querySelectorAll('section');\n\t\tvars.fragments = vars.slides.querySelectorAll(names.fragmentSelector);\n\t\tvars.regularSections = Array.from(vars.sections).filter( section => !isStack(section));\n\n\t\tif( /receiver/i.test( window.location.search ) ) vars.viewport.classList.add('sv');\n\n\t\tnames.eventnames.forEach( (eventname) => deck.on( eventname, event => { showHideSlide(event, options, names, vars) } ) );\n\n\t\tvars.viewport.addEventListener(\"animationend\", (event) => {\n\t\t\tevent.target.classList.add('animationended');\n\t\t});\n\t\tvars.viewport.addEventListener(\"fragmenthidden\", (event) => {\n\t\t\tevent.fragment.classList.remove('animationended');\n\t\t\tevent.fragment.querySelectorAll('.animationended').forEach(el => {\n\t\t\t\tel.classList.remove('animationended');\n\t\t\t});\n\t\t});\n\n\t\treturn new Promise(resolve => {\n\t\t\tprepare(options, vars, resolve);\n\t\t\tdebugLog(options, \"---------- Done preloading ----------\");\n\t\t});\n\t};\n\n\n\t/**\n\t* Initialize the plugin\n\t* @param {object} deck - The deck object\n\t*/\n\tconst init = function (deck) {\n\n\t\tlet defaultOptions = {\n\t\t\tbaseclass: 'animate__animated',\n\t\t\thideagain: true,\n\t\t\tdelay: 300,\n\t\t\tdebug: false,\n\t\t\tappearevent: 'slidetransitionend',\n\t\t\tautoappear: false,\n\t\t\tautoelements: false,\n\t\t\tappearparents: false,\n\t\t\tcsspath: '',\n\t\t\tanimatecsspath: {\n\t\t\t\tlink : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css',\n\t\t\t\tcompat : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.compat.css',\n\t\t\t},\n\t\t\tcompatibility: false,\n\t\t\tcompatibilitybaseclass: 'animated'\n\t\t};\n\n\t\toptions = mergeDeep(defaultOptions, deck.getConfig().appearance || {});\n\n\t\treturn Appear(deck, options, \"appearance.js\");\n\t};\n\n\treturn { id: 'appearance', init: init };\n};\n\nexport default Plugin;","import { toJSONString } from '../helpers';\n\n\n/**\n * Adds automatic animations to elements within a section based on specified criteria.\n *\n * This function examines the provided section for attributes and options to determine\n * which classes should be added to its elements to enable automatic animations.\n *\n * @param {HTMLElement} section - The section element to which automatic animations will be applied.\n * @param {Object} options - The existing user options object\n * @param {Object} vars - The existing vars object\n * @returns {undefined}\n */\nexport const addAutoAnimation = (section, options, vars) => {\n\n\tlet sectionAutoSelectors = null;\n\n\tif (section.hasAttribute(\"data-autoappear\")) {\n\n\t\tlet sectDataAppear = section.dataset.autoappear;\n\n\t\tif (sectDataAppear == \"auto\" || sectDataAppear == \"\" || sectDataAppear.length < 1 || sectDataAppear == \"true\") {\n\t\t\t// This section should get the global autoappear classes on its objects\n\t\t\tsectionAutoSelectors = options.autoelements ? options.autoelements : null;\n\t\t} else {\n\t\t\t// This section should get the local autoappear classes on its objects\n\t\t\tsectionAutoSelectors = sectDataAppear;\n\t\t}\n\n\t} else if ( options.autoappear && options.autoelements ) {\n\t\t// This section should get the global autoappear classes on its objects\n\t\tsectionAutoSelectors = options.autoelements;\n\t}\n\n\tif (sectionAutoSelectors) {\n\n\t\tlet elementsToAnimate = JSON.parse(toJSONString(sectionAutoSelectors));\n\n\t\tObject.entries(elementsToAnimate).forEach(([selector, assignables]) => {\n\n\n\t\t\t// Exclude the elements from vars.appearances\n\t\t\tlet elements = Array.from(section.querySelectorAll(selector)).filter( element => !vars.appearances.includes(element) );\n\n\t\t\tif (elements.length) {\n\n\t\t\t\telements.forEach((element) => {\n\n\t\t\t\t\tvars.appearances.push(element)\n\n\t\t\t\t\tlet newClasses = [], newDelay = null, speedClass = false, elementSplit = null, containerDelay = null;\n\n\t\t\t\t\tif (Array.isArray(assignables)) {\n\n\t\t\t\t\t\tnewClasses = assignables[0].split(/[ ,]+/);\n\t\t\t\t\t\tnewDelay = assignables[1];\n\n\t\t\t\t\t} else if (typeof assignables == \"string\"){\n\n\t\t\t\t\t\tnewClasses = assignables.split(/[ ,]+/);\n\n\t\t\t\t\t} else if (assignables.constructor === Object) {\n\n\t\t\t\t\t\tif (assignables.class || assignables.animation) {\n\t\t\t\t\t\t\tlet animationClass = assignables.animation ? assignables.animation : assignables.class;\n\t\t\t\t\t\t\tnewClasses = animationClass.split(/[ ,]+/);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.speed) {\n\t\t\t\t\t\t\tspeedClass = String(assignables.speed);\n\t\t\t\t\t\t\tif (!speedClass.includes(\"animate__\")) {\n\t\t\t\t\t\t\t\tspeedClass = `animate__${speedClass}`\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.delay) {\n\t\t\t\t\t\t\tnewDelay = String(assignables.delay);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.split) {\n\t\t\t\t\t\t\telementSplit = String(assignables.split);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables[\"container-delay\"]) {\n\t\t\t\t\t\t\tcontainerDelay = String(assignables[\"container-delay\"]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telement.classList.add(...newClasses);\n\t\t\t\t\tif (speedClass) { element.classList.add(speedClass)}\n\t\t\t\t\tif (newDelay) {element.dataset.delay = newDelay};\n\t\t\t\t\tif (elementSplit) {element.dataset.split = elementSplit};\n\t\t\t\t\tif (containerDelay) {element.dataset.containerDelay = containerDelay};\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n","/**\n * Adds a base class to an HTML element if it doesn't already have it.\n *\n * This function checks if the specified HTML element has the specified base class,\n * and if not, it adds the base class to the element's class list.\n *\n * @param {HTMLElement} appearance - The HTML element to which the base class should be added.\n * @param {Object} names - The existing 'names' object\n * @returns {undefined}\n */\n\nexport const addBaseClass = (appearance, names) => {\n\tif (!appearance.classList.contains(names.baseclass)) {\n\t\tappearance.classList.add(names.baseclass);\n\t}\n\tif (appearance.classList.contains(names.fragmentClass)) {\n\t\tappearance.classList.add('custom');\n\t}\n}\n","export const convertToSpans = (parent, kind) => {\n\n\tlet splitElements = false;\n\tlet joinChar = ' ';\n\n\tif (kind == \"words\") {\n\t\tsplitElements = parent.textContent.trim().split(/\\s+/);\n\t\t\n\t} else if (kind == \"letters\") {\n\t\tsplitElements = parent.textContent.trim().split('');\n\t\tjoinChar = '';\n\t}\n\n\tif (splitElements) {\n\t\tconst parentAnimateClasses = Array.from(parent.classList).filter(className => className.startsWith('animate__'));\n\t\n\t\tconst newHtml = splitElements.map((element, index) => {\n\t\t\tconst span = document.createElement('span');\n\t\t\tspan.textContent = element;\n\t\t\tif (element == \" \") {span.textContent = \"\\u00A0\"}\n\t\n\t\t\tif (parent.dataset.delay && index !== 0) {\n\t\t\t\tspan.dataset.delay = parent.dataset.delay\n\t\t\t}\n\n\t\t\tif (parent.dataset.containerDelay && index === 0) {\n\t\t\t\tspan.dataset.delay = parent.dataset.containerDelay\n\t\t\t}\n\t\n\t\t\tparent.classList.forEach(className => className.startsWith('animate__') && span.classList.add(className));\n\t\t\treturn span.outerHTML;\n\t\t\t\n\t\t}).join(joinChar);\n\t\n\t\tparentAnimateClasses.forEach(className => parent.classList.remove(className));\n\t\tparent.removeAttribute('data-delay');\n\t\tparent.removeAttribute('data-split');\n\t\tparent.removeAttribute('data-container-delay');\n\t\n\t\tparent.innerHTML = newHtml;\n\t}\n\n\n};","export const addDelay = (appearanceArray, options, names) => {\n\n let delay = 0;\n appearanceArray.forEach((appearance, index) => {\n\n if ((index == 0 && appearance.dataset.delay) || index !=0) {\n\n let elementDelay = options.delay;\n\n if (appearance.dataset && appearance.dataset.delay) {\n elementDelay = parseInt(appearance.dataset.delay);\n }\n\n delay = delay + elementDelay;\n\n appearance.style.setProperty('animation-delay', delay + \"ms\");\n appearance.removeAttribute('data-delay');\n }\n\n })\n\n}\n"],"names":["isObject","item","Array","isArray","mergeDeep","target","sources","length","source","shift","key","Object","assign","toJSONString","str","JSONString","replace","JSON","parse","e","isJSON","stringify","trim","charAt","loadResource","url","type","callback","resource","head","document","querySelector","createElement","src","rel","href","finish","call","onload","onreadystatechange","this","readyState","appendChild","debugLog","options","text","debug","console","log","getAndLoadCSS","fileName","thePath","path","pluginScript","getAttribute","slice","lastIndexOf","pluginPath","pluginBaseName","AppearanceStylePath","csspath","appearance","AnimateCSSPath","compatibility","animatecsspath","compat","link","hoistAppearance","from","baseclass","to","parentNode","sibling","children","dataset","appearParent","classList","copyDataAttributes","attributes","not","filter","nodeName","includes","forEach","nodeValue","setAttribute","innerHTML","add","elemsNotInClass","targetClass","excludeClass","el","querySelectorAll","s","closest","getAppearanceArrays","section","groupClass","result","map","frag","elemsInClass","parentClass","some","group","removeStartAttribute","slides","hideagain","appearanceCanStart","removeAttribute","turnOffSlideAppearances","names","animatecss","remove","fromFragments","fragment","Plugin","vars","prepare","resolve","es5Filename","compatibilitybaseclass","appearances","regularSections","theSection","addAutoAnimation","sectionAutoSelectors","hasAttribute","sectDataAppear","autoappear","autoelements","elementsToAnimate","entries","selector","assignables","elements","element","push","newClasses","newDelay","speedClass","elementSplit","containerDelay","split","constructor","class","animation","speed","String","delay","theAppearance","index","fixListItem","appearparents","tagName","outerHTML","addBaseClass","contains","fragmentClass","convertToSpans","parent","kind","splitElements","joinChar","textContent","parentAnimateClasses","className","startsWith","newHtml","span","join","appearanceArrays","appearanceArray","addDelay","elementDelay","parseInt","style","setProperty","setTimeout","doneLoading","Appear","deck","fragmentSelector","speedClasses","eventnames","dom","getRevealElement","viewport","getViewportElement","getSlidesElement","sections","fragments","isStack","childNodes","i","test","window","location","search","eventname","on","event","showHideSlide","view","getConfig","etype","fromSlide","previousSlide","toSlide","currentSlide","fromTo","appearevent","slideAppearevent","body","exitoverview","addEventListener","Promise","id","init"],"mappings":";;;;;;;;;;;;;;AAKO,MAyDDA,EAAYC,GACTA,GAAwB,iBAATA,IAAsBC,MAAMC,QAAQF,GAS/CG,EAAYA,CAACC,KAAWC,KACpC,IAAKA,EAAQC,OAAQ,OAAOF,EAC5B,MAAMG,EAASF,EAAQG,QAEvB,GAAIT,EAASK,IAAWL,EAASQ,GAChC,IAAK,MAAME,KAAOF,EACbR,EAASQ,EAAOE,KACdL,EAAOK,IAAMC,OAAOC,OAAOP,EAAQ,CAAEK,CAACA,GAAM,CAAC,IAClDN,EAAUC,EAAOK,GAAMF,EAAOE,KAE9BC,OAAOC,OAAOP,EAAQ,CAAEK,CAACA,GAAMF,EAAOE,KAIzC,OAAON,EAAUC,KAAWC,EAAQ,EAmBxBO,EAAgBC,IAC5B,IAAIC,EAAa,GAajB,MAXmB,iBAARD,IAAkBA,EAAMA,EAAIE,QAAQ,QAAQ,KAAKA,QAAQ,QAAQ,MAG3ED,E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fE,KAAO,2EACPD,OAAS,+EAEVF,eAAe,EACf0D,uBAAwB,YAGW4D,EAAKuB,YAAY/I,YAAc,CAAA,GAE5DuH,EAAOC,EAAMzI,EAAS,kBAGS"} \ No newline at end of file diff --git a/demo/plugin/appearance/appearance.js b/demo/plugin/appearance/appearance.js index 2ae3ba3..52e5bc3 100644 --- a/demo/plugin/appearance/appearance.js +++ b/demo/plugin/appearance/appearance.js @@ -1,8 +1,7 @@ - /***************************************************************** * * Appearance for Reveal.js - * Version 1.3.0 + * Version 1.3.1 * * @author: Martijn De Jongh (Martino), martijn.de.jongh@gmail.com * https://github.com/martinomagnifico @@ -13,703 +12,5 @@ * Copyright (C) 2023 Martijn De Jongh (Martino) * ******************************************************************/ - -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Appearance = factory()); -})(this, (function () { 'use strict'; - - /** - * Check if a given string is valid JSON. - * @param {string} str - The string to be checked. - * @returns {boolean} `true` if the string is valid JSON, otherwise `false`. - */ - const isJSON = str => { - try { - return JSON.parse(str) && !!str; - } catch (e) { - return false; - } - }; - - /** - * Check if an element has child nodes that are `SECTION` elements. - * @param {Object} param0 - Object with childNodes property. - * @param {NodeListOf} param0.childNodes - List of child nodes of the element. - * @returns {boolean} `true` if the element contains `SECTION` child nodes, otherwise `false`. - */ - const isStack = _ref => { - let { - childNodes - } = _ref; - let isStack = false; - for (let i = 0; i < childNodes.length; i++) { - if (childNodes[i].tagName == "SECTION") { - isStack = true; - break; - } - } - return isStack; - }; - - /** - * Copy data attributes from a source element to a target element with an optional exception. - * @param {Object} param0 - Object with attributes property. - * @param {NamedNodeMap} param0.attributes - Map of attributes of the source element. - * @param {Element} target - Target element to copy attributes to. - * @param {string} [not] - Optional attribute name to exclude from copying. - */ - const copyDataAttributes = (_ref2, target, not) => { - let { - attributes - } = _ref2; - [...attributes].filter(_ref3 => { - let { - nodeName - } = _ref3; - return nodeName.includes('data'); - }).forEach(_ref4 => { - let { - nodeName, - nodeValue - } = _ref4; - if (not && nodeName !== not || !not) { - target.setAttribute(nodeName, nodeValue); - } - }); - }; - - /** - * Check if the given item is an object and not an array. - * @param {*} item - The item to be checked. - * @returns {boolean} `true` if the item is an object and not an array, otherwise `false`. - */ - const isObject = item => { - return item && typeof item === 'object' && !Array.isArray(item); - }; - - /** - * Deep merge multiple objects into a target object. - * @param {Object} target - Target object to merge values into. - * @param {...Object} sources - Source objects to merge from. - * @returns {Object} The merged object. - */ - const mergeDeep = function (target) { - for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - sources[_key - 1] = arguments[_key]; - } - if (!sources.length) return target; - const source = sources.shift(); - if (isObject(target) && isObject(source)) { - for (const key in source) { - if (isObject(source[key])) { - if (!target[key]) Object.assign(target, { - [key]: {} - }); - mergeDeep(target[key], source[key]); - } else { - Object.assign(target, { - [key]: source[key] - }); - } - } - } - return mergeDeep(target, ...sources); - }; - - /** - * Resolves the given Promise immediately using setTimeout. - * @param {Function} resolve - The resolve function of a Promise. - * @returns {number} The ID value of the timer that is set. - */ - const doneLoading = resolve => { - return setTimeout(resolve, 0); - }; - - /** - * Converts a JavaScript object or a JSON-formatted string to a JSON string. - * - * @param {Object|string} str - The input string or object to be converted to a JSON string. - * @returns {string} The JSON string. - */ - const toJSONString = str => { - let JSONString = ''; - if (typeof str === "string") str = str.replace(/[“”]/g, '"').replace(/[‘’]/g, "'"); - if (isJSON(str)) { - JSONString = str; - } else { - if (typeof str === "object") { - JSONString = JSON.stringify(str, null, 2); - } else { - JSONString = str.trim().replace(/'/g, '"').charAt(0) === "{" ? str.trim().replace(/'/g, '"') : `{${str.trim().replace(/'/g, '"')}}`; - } - } - return JSONString; - }; - - /** - * Dynamically loads a stylesheet from the specified URL and calls a callback function when it's loaded. - * - * @param {string} url - The URL of the stylesheet to load. - * @param {Function} callback - A callback function to be called when the stylesheet is loaded. - */ - const loadStyle = (url, callback) => { - const head = document.querySelector('head'); - const style = document.createElement('link'); - style.rel = 'stylesheet'; - style.href = url; - style.onload = () => { - if (typeof callback === 'function') { - callback.call(); - callback = null; - } - }; - style.onreadystatechange = () => { - if (style.readyState === 'loaded') { - style.onload(); - } - }; - head.appendChild(style); - }; - - /** - * Retrieves the path of a JavaScript file based on its filename. - * - * @param {string} fileName - The filename of the script. - * @returns {string} The path to the plugin's location. - */ - const pluginPath = fileName => { - let path; - let pluginScript = document.querySelector(`script[src$="${fileName}"]`); - if (pluginScript) { - path = pluginScript.getAttribute("src").slice(0, -1 * fileName.length); - } else { - path = (typeof document === 'undefined' && typeof location === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : typeof document === 'undefined' ? location.href : (document.currentScript && document.currentScript.src || new URL('appearance.js', document.baseURI).href)).slice(0, (typeof document === 'undefined' && typeof location === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : typeof document === 'undefined' ? location.href : (document.currentScript && document.currentScript.src || new URL('appearance.js', document.baseURI).href)).lastIndexOf('/') + 1); - } - return path; - }; - const debugLog = (options, text) => { - if (options.debug) console.log(text); - }; - - /** - * Retrieves and loads CSS stylesheets based on the provided options and ES5 filename. - * - * @param {Object} options - Configuration options for loading CSS. - * @param {string} fileName - The filename of the script. - */ - - const getAndLoadCSS = (options, fileName) => { - let thePath = pluginPath(fileName); - let pluginBaseName = fileName.replace(/\.[^/.]+$/, ""); - let AppearanceStylePath = options.csspath.appearance ? options.csspath.appearance : `${thePath}${pluginBaseName}.css` || `plugin/${pluginBaseName}/${pluginBaseName}.css`; - let AnimateCSSPath = !options.compatibility ? options.animatecsspath.link : options.animatecsspath.compat; - if (options.debug) { - console.log(`Paths:`); - console.log(` - Plugin path = ${thePath}`); - console.log(` - Appearance CSS path = ${AppearanceStylePath}`); - console.log(` - AnimateCSS CSS path = ${AnimateCSSPath}`); - } - loadStyle(AnimateCSSPath, function () { - loadStyle(AppearanceStylePath); - }); - }; - - /** - * Adds automatic animations to elements within a section based on specified criteria. - * - * This function examines the provided section for attributes and options to determine - * which classes should be added to its elements to enable automatic animations. - * - * @param {HTMLElement} section - The section element to which automatic animations will be applied. - * @param {Object} options - The existing user options object - * @param {Object} vars - The existing vars object - * @returns {undefined} - */ - const addAutoAnimation = (section, options, vars) => { - let sectionAutoSelectors = null; - if (section.hasAttribute("data-autoappear")) { - let sectDataAppear = section.dataset.autoappear; - if (sectDataAppear == "auto" || sectDataAppear == "" || sectDataAppear.length < 1 || sectDataAppear == "true") { - // This section should get the global autoappear classes on its objects - sectionAutoSelectors = options.autoelements ? options.autoelements : null; - } else { - // This section should get the local autoappear classes on its objects - sectionAutoSelectors = sectDataAppear; - } - } else if (options.autoappear && options.autoelements) { - // This section should get the global autoappear classes on its objects - sectionAutoSelectors = options.autoelements; - } - if (sectionAutoSelectors) { - let elementsToAnimate = JSON.parse(toJSONString(sectionAutoSelectors)); - Object.entries(elementsToAnimate).forEach(_ref => { - let [selector, assignables] = _ref; - // Exclude the elements from vars.appearances - let elements = Array.from(section.querySelectorAll(selector)).filter(element => !vars.appearances.includes(element)); - if (elements.length) { - elements.forEach(element => { - vars.appearances.push(element); - let newClasses = [], - newDelay = null, - speedClass = false, - elementSplit = null, - containerDelay = null; - if (Array.isArray(assignables)) { - newClasses = assignables[0].split(/[ ,]+/); - newDelay = assignables[1]; - } else if (typeof assignables == "string") { - newClasses = assignables.split(/[ ,]+/); - } else if (assignables.constructor === Object) { - if (assignables.class || assignables.animation) { - let animationClass = assignables.animation ? assignables.animation : assignables.class; - newClasses = animationClass.split(/[ ,]+/); - } - if (assignables.speed) { - speedClass = String(assignables.speed); - if (!speedClass.includes("animate__")) { - speedClass = `animate__${speedClass}`; - } - } - if (assignables.delay) { - newDelay = String(assignables.delay); - } - if (assignables.split) { - elementSplit = String(assignables.split); - } - if (assignables["container-delay"]) { - containerDelay = String(assignables["container-delay"]); - } - } - element.classList.add(...newClasses); - if (speedClass) { - element.classList.add(speedClass); - } - if (newDelay) { - element.dataset.delay = newDelay; - } - if (elementSplit) { - element.dataset.split = elementSplit; - } - if (containerDelay) { - element.dataset.containerDelay = containerDelay; - } - }); - } - }); - } - }; - - /** - * Hoist a list item's appearance to its parent element's appearance. - * - * @param {HTMLElement} from - The list item element. - * @returns {undefined} - */ - const hoistAppearance = (from, baseclass) => { - let to = from.parentNode; - if (!to) return; - for (const sibling of to.children) { - if (sibling !== from && sibling.dataset.appearParent) return; - } - to.classList = from.classList; - copyDataAttributes(from, to, "data-appear-parent"); - to.innerHTML = from.innerHTML; - to.classList.add(baseclass); - }; - - /** - * Fix list items that were changed by Quarto. - * - * This function is designed for use with Quarto and handles the conversion of list items - * with Appearance classes to their parent elements when a manual attribute is present. - * It also provides automatic conversion for list items that directly contain spans, which - * is related to Quarto's wrapping of list content in a span. - * - * @param {HTMLElement} appearance - The list item element whose appearance will be converted. - * @param {Object} options - An options object that controls the conversion behavior. - * @param {boolean} options.appearparents - If `true`, automatic conversion of list items with spans is enabled. - * @returns {undefined} - */ - const fixListItem = (appearance, options, names) => { - let baseclass = names.baseclass; - if (appearance.hasAttribute("data-appear-parent")) { - hoistAppearance(appearance, baseclass); - } - if (options.appearparents) { - if (appearance.parentNode && appearance.parentNode.tagName) { - if (appearance.tagName == "SPAN" && appearance.parentNode.tagName == "LI") { - let spanLength = String(appearance.outerHTML).length; - let liContentLength = String(appearance.parentNode.innerHTML).length; - if (spanLength == liContentLength) { - hoistAppearance(appearance); - } - } - } - } - }; - - /** - * Adds a base class to an HTML element if it doesn't already have it. - * - * This function checks if the specified HTML element has the specified base class, - * and if not, it adds the base class to the element's class list. - * - * @param {HTMLElement} appearance - The HTML element to which the base class should be added. - * @param {Object} names - The existing 'names' object - * @returns {undefined} - */ - - const addBaseClass = (appearance, names) => { - if (!appearance.classList.contains(names.baseclass)) { - appearance.classList.add(names.baseclass); - } - if (appearance.classList.contains(names.fragmentClass)) { - appearance.classList.add('custom'); - } - }; - - const addDelay = (appearanceArray, options, names) => { - let delay = 0; - appearanceArray.forEach((appearance, index) => { - if (index == 0 && appearance.dataset.delay || index != 0) { - let elementDelay = options.delay; - if (appearance.dataset && appearance.dataset.delay) { - elementDelay = parseInt(appearance.dataset.delay); - } - delay = delay + elementDelay; - appearance.style.setProperty('animation-delay', delay + "ms"); - appearance.removeAttribute('data-delay'); - } - }); - }; - - /** - * Selects elements with a specified class that are not nested inside an element with another specified class. - * @param {string} targetClass - The class name to select elements. - * @param {string} excludeClass - The class name to exclude elements nested inside it. - * @param {Element} el - The element to find the target elements in. - * @returns {Element[]} - Array of selected elements. - */ - const elemsNotInClass = (targetClass, excludeClass, el) => Array.from(el.querySelectorAll(`.${targetClass}`)).filter(s => !s.closest(`.${excludeClass}`)); - - /** - * Selects elements with a specified class that are nested inside an element with another specified class. - * @param {string} targetClass - The class name to select elements. - * @param {string} parentClass - The class name of the parent to find elements in. - * @param {Element} el - The element to find the target elements in. - * @returns {Element[]} - Array of selected elements. - */ - const elemsInClass = (targetClass, parentClass, el) => Array.from(el.querySelectorAll(`.${targetClass}`)).filter(s => s.closest(`.${parentClass}`) === el); - - /** - * Extracts groups of elements with a specified class from the provided section element. - * Groups are formed based on nesting inside elements with another specified class. - * @param {Element} section - The section to extract data from. - * @returns {Element[][]} - Nested arrays of selected elements. - */ - - /** - * Extracts groups of elements with a specified class from the provided section element. - * Groups are formed based on nesting inside elements with another specified class. - * @param {Element} section - The section to extract data from. - * @param {string} targetClass - The class name to select elements. - * @param {string} groupClass - The class name of the parent to find elements in. - * @returns {Element[][]} - Nested arrays of selected elements. - */ - const getAppearanceArrays = (section, targetClass, groupClass) => { - const result = [elemsNotInClass(targetClass, groupClass, section), ...Array.from(section.querySelectorAll(`.${groupClass}`)).map(frag => elemsInClass(targetClass, groupClass, frag))]; - if (result.some(group => group.length > 0)) { - return result; - } else { - return false; - } - }; - - const convertToSpans = (parent, kind) => { - let splitElements = false; - let joinChar = ' '; - if (kind == "words") { - splitElements = parent.textContent.trim().split(/\s+/); - } else if (kind == "letters") { - splitElements = parent.textContent.trim().split(''); - joinChar = ''; - } - if (splitElements) { - const parentAnimateClasses = Array.from(parent.classList).filter(className => className.startsWith('animate__')); - const newHtml = splitElements.map((element, index) => { - const span = document.createElement('span'); - span.textContent = element; - if (element == " ") { - span.textContent = "\u00A0"; - } - if (parent.dataset.delay && index !== 0) { - span.dataset.delay = parent.dataset.delay; - } - if (parent.dataset.containerDelay && index === 0) { - span.dataset.delay = parent.dataset.containerDelay; - } - parent.classList.forEach(className => className.startsWith('animate__') && span.classList.add(className)); - return span.outerHTML; - }).join(joinChar); - parentAnimateClasses.forEach(className => parent.classList.remove(className)); - parent.removeAttribute('data-delay'); - parent.removeAttribute('data-split'); - parent.removeAttribute('data-container-delay'); - parent.innerHTML = newHtml; - } - }; - - /** - * Derives slide from and to from the event object. - * - * @param {Object} event - The event object containing slide transition details. - * @returns {Object} - An object containing references to the "from" and "to" slides. - */ - const fromTo = event => { - let slides = {}; - slides.from = event.fromSlide || event.previousSlide || null; - slides.to = event.toSlide || event.currentSlide || null; - return slides; - }; - - /** - * A function that determines the appearance event for a given slide. - * - * This function checks the `data-appearevent` attribute of the slide and the `options.appearevent` parameter. - * If `data-appearevent` is set to "auto", it is converted to "autoanimate". If `options.appearevent` is "auto", it is also converted to "autoanimate". - * The function returns the appearance event, prioritizing `data-appearevent` over `options.appearevent`. - * - * @param {HTMLElement} toSlide - The slide for which the appearance event is determined. - * @param {Object} options - An object containing options for the appearance event. - * @param {string} options.appearevent - The appearance event option provided in the `options` object. - * - * @returns {string} - The determined appearance event for the slide, either from `data-appearevent` or `options.appearevent`. - */ - const slideAppearevent = (toSlide, options) => { - if (toSlide.dataset.appearevent && toSlide.dataset.appearevent === "auto") { - toSlide.dataset.appearevent = "autoanimate"; - } - if (options.appearevent == "auto") { - options.appearevent = "autoanimate"; - } - return toSlide.dataset.appearevent ? toSlide.dataset.appearevent : options.appearevent; - }; - - /** - * Remove the 'data-appearance-can-start' attribute from the 'from' slide if the 'hideagain' option is enabled. - * - * @param {HTMLElement} slides - The container element for the slides. - * @param {Object} options - An object containing configuration options. - * @param {boolean} options.hideagain - A flag indicating whether to remove the attribute when 'hideagain' is true. - */ - const removeStartAttribute = (slides, options) => { - if (options.hideagain) { - if (slides.from && slides.from.dataset.appearanceCanStart) { - slides.from.removeAttribute('data-appearance-can-start'); - } - } - }; - - /** - * Turn off slide appearances when transitioning from one slide to another if the 'hideagain' option is enabled. - * - * @param {HTMLElement} slides - The container element for the slides. - * @param {Object} options - An object containing configuration options. - * @param {string} names.animatecss - The CSS selector for animated elements. - */ - const turnOffSlideAppearances = (slides, options, names) => { - if (options.hideagain) { - let fromAppearances = slides.from.querySelectorAll(names.animatecss); - fromAppearances.forEach(appearance => { - appearance.classList.remove('animationended'); - }); - // Remove visible class from fragments when moving away from that slide - let fromFragments = slides.from.querySelectorAll(`.fragment.visible`); - if (fromFragments) { - fromFragments.forEach(fragment => { - fragment.classList.remove('visible'); - }); - } - } - }; - - /** - * Handles the showing and hiding of slides based on the provided event and options. - * - * @param {Object} event - The event object containing slide transition details. - * @param {Object} options - An object containing configurations for slide appearance management. - */ - const showHideSlide = (event, options, names, vars) => { - let view = vars.deck.getConfig().view; - let etype = event.type; - let slides = fromTo(event); - if (slides.to) { - if (etype == "ready") { - slides.to.dataset.appearanceCanStart = true; - } - let appearevent = slideAppearevent(slides.to, options); - if (etype == appearevent || etype == "slidetransitionend" && appearevent == "autoanimate") { - slides.to.dataset.appearanceCanStart = true; - } - - // Add experimental Reader mode compatibility, does not have a slidetransitionend event yet - if (view == "scroll" && etype == 'slidechanged') { - removeStartAttribute(slides, options); - turnOffSlideAppearances(slides, options, names); - - // Add delay to allow for scroll animation to finish - setTimeout(() => { - slides.to.dataset.appearanceCanStart = true; - }, options.delay); - } - if (etype == "slidetransitionend") { - removeStartAttribute(slides, options); - turnOffSlideAppearances(slides, options, names); - } - if (etype == 'slidechanged' && document.body.dataset.exitoverview) { - removeStartAttribute(slides, options); - slides.to.dataset.appearanceCanStart = true; - } else if (etype == 'overviewhidden') { - document.body.dataset.exitoverview = true; - setTimeout(() => { - document.body.removeAttribute('data-exitoverview'); - }, 500); - if (event.currentSlide) { - removeStartAttribute(slides, options); - slides.to.dataset.appearanceCanStart = true; - } - } - } - }; - - const Plugin = () => { - const vars = {}; - vars.names = {}; - let options = {}; - - /** - * Prepare the plugin to find Appearance elements - * @param {Object} vars - The variables to be prepared. - * @param {Object} names - The names to be prepared. - * @param {Function} resolve - The callback function to be called when preparation is complete. - * @throws {Error} Throws an error if the 'options' object is not defined. - */ - const prepare = (options, vars, resolve) => { - debugLog(options, "------------- Preloading -------------"); - let names = vars.names; - getAndLoadCSS(options, names.es5Filename); - if (options.compatibility) { - names.animatecss = '.backInDown, .backInLeft, .backInRight, .backInUp, .bounceIn, .bounceInDown, .bounceInLeft, .bounceInRight, .bounceInUp, .fadeIn, .fadeInDown, .fadeInDownBig, .fadeInLeft, .fadeInLeftBig, .fadeInRight, .fadeInRightBig, .fadeInUp, .fadeInUpBig, .fadeInTopLeft, .fadeInTopRight, .fadeInBottomLeft, .fadeInBottomRight, .flipInX, .flipInY, .lightSpeedInRight, .lightSpeedInLeft, .rotateIn, .rotateInDownLeft, .rotateInDownRight, .rotateInUpLeft, .rotateInUpRight, .jackInTheBox, .rollIn, .zoomIn, .zoomInDown, .zoomInLeft, .zoomInRight, .zoomInUp, .slideInDown, .slideInLeft, .slideInRight, .slideInUp, .skidLeft, .skidLeftBig, .skidRight, .skidRightBig, .shrinkIn, .shrinkInBlur'; - names.baseclass = options.compatibilitybaseclass; - } - vars.appearances = Array.from(vars.slides.querySelectorAll(names.animatecss)); - - // Go through each section to see if there are any (auto) selectors that need animation classes - vars.regularSections.forEach(theSection => addAutoAnimation(theSection, options, vars)); - vars.appearances.forEach((theAppearance, index) => { - // Fix any list item where the Appearance classes were moved to the span (Quarto does this) - fixListItem(theAppearance, options, names); - - // Go through each appearance element and add the baseclass if it doesn't have it - addBaseClass(theAppearance, names); - if (theAppearance.hasAttribute('data-split')) { - convertToSpans(theAppearance, theAppearance.dataset.split); - } - }); - vars.regularSections.forEach((theSection, index) => { - // Get all the Appearances in the section as separate arrays per delay loop - let appearanceArrays = getAppearanceArrays(theSection, names.baseclass, names.fragmentClass); - if (appearanceArrays) { - appearanceArrays.forEach(appearanceArray => { - // Add the delays to each appearance in the array - addDelay(appearanceArray, options); - }); - } - }); - doneLoading(resolve); - }; - - /** - * The main function of the plugin - * @param {object} deck - The deck object - * @param {object} options - The options object - * @param {string} es5Filename - The name of the file that will be used - */ - const Appear = function (deck, options, es5Filename) { - let names = vars.names; - - // Set up names - names.baseclass = options.baseclass; - names.compatibilitybaseclass = options.compatibilitybaseclass; - names.fragmentSelector = ".fragment"; - names.fragmentClass = "fragment"; - names.speedClasses = ['slower', 'slow', 'fast', 'faster']; - names.speedClasses.push(...names.speedClasses.map(speed => `animate__${speed}`)); - names.animatecss = '[class^="animate__"],[class*=" animate__"]'; - names.es5Filename = es5Filename; - names.eventnames = ['ready', 'slidechanged', 'slidetransitionend', 'autoanimate', 'overviewhidden', 'scrolle']; - - // Set up variables - vars.deck = deck; - vars.dom = deck.getRevealElement(); - vars.viewport = deck.getViewportElement(); - vars.slides = deck.getSlidesElement(); - vars.sections = vars.slides.querySelectorAll('section'); - vars.fragments = vars.slides.querySelectorAll(names.fragmentSelector); - vars.regularSections = Array.from(vars.sections).filter(section => !isStack(section)); - if (/receiver/i.test(window.location.search)) vars.viewport.classList.add('sv'); - names.eventnames.forEach(eventname => deck.on(eventname, event => { - showHideSlide(event, options, names, vars); - })); - vars.viewport.addEventListener("animationend", event => { - event.target.classList.add('animationended'); - }); - vars.viewport.addEventListener("fragmenthidden", event => { - event.fragment.classList.remove('animationended'); - event.fragment.querySelectorAll('.animationended').forEach(el => { - el.classList.remove('animationended'); - }); - }); - return new Promise(resolve => { - prepare(options, vars, resolve); - debugLog(options, "---------- Done preloading ----------"); - }); - }; - - /** - * Initialize the plugin - * @param {object} deck - The deck object - */ - const init = function (deck) { - let defaultOptions = { - baseclass: 'animate__animated', - hideagain: true, - delay: 300, - debug: false, - appearevent: 'slidetransitionend', - autoappear: false, - autoelements: false, - appearparents: false, - csspath: '', - animatecsspath: { - link: 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css', - compat: 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.compat.css' - }, - compatibility: false, - compatibilitybaseclass: 'animated' - }; - options = mergeDeep(defaultOptions, deck.getConfig().appearance || {}); - return Appear(deck, options, "appearance.js"); - }; - return { - id: 'appearance', - init: init - }; - }; - - return Plugin; - -})); +!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).Appearance=t()}(this,(function(){"use strict";var e="undefined"!=typeof document?document.currentScript:null;const t=e=>e&&"object"==typeof e&&!Array.isArray(e),a=(e,...n)=>{if(!n.length)return e;const s=n.shift();if(t(e)&&t(s))for(const n in s)t(s[n])?(e[n]||Object.assign(e,{[n]:{}}),a(e[n],s[n])):Object.assign(e,{[n]:s[n]});return a(e,...n)},n=e=>{let t="";return"string"==typeof e&&(e=e.replace(/[“”]/g,'"').replace(/[‘’]/g,"'")),t=(e=>{try{return JSON.parse(e)&&!!e}catch(e){return!1}})(e)?e:"object"==typeof e?JSON.stringify(e,null,2):"{"===e.trim().replace(/'/g,'"').charAt(0)?e.trim().replace(/'/g,'"'):`{${e.trim().replace(/'/g,'"')}}`,t},s=(e,t,a)=>{let n,s=document.querySelector("head");"script"===t?(n=document.createElement("script"),n.type="text/javascript",n.src=e):"stylesheet"===t&&(n=document.createElement("link"),n.rel="stylesheet",n.href=e);const r=()=>{"function"==typeof a&&(a.call(),a=null)};n.onload=r,n.onreadystatechange=function(){"loaded"===this.readyState&&r()},s.appendChild(n)},r=(e,t)=>{e.debug&&console.log(t)},i=(t,a)=>{let n=(t=>{let a,n=document.querySelector(`script[src$="${t}"]`);return a=n?n.getAttribute("src").slice(0,-1*t.length):("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:e&&e.src||new URL("appearance.js",document.baseURI).href).slice(0,("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:e&&e.src||new URL("appearance.js",document.baseURI).href).lastIndexOf("/")+1),a})(a),r=a.replace(/\.[^/.]+$/,""),i=t.csspath.appearance?t.csspath.appearance:`${n}${r}.css`||`plugin/${r}/${r}.css`,o=t.compatibility?t.animatecsspath.compat:t.animatecsspath.link;t.debug&&(console.log("Paths:"),console.log(` - Plugin path = ${n}`),console.log(` - Appearance CSS path = ${i}`),console.log(` - AnimateCSS CSS path = ${o}`)),s(o,"stylesheet",(function(){s(i,"stylesheet")}))},o=(e,t)=>{let a=e.parentNode;if(a){for(const t of a.children)if(t!==e&&t.dataset.appearParent)return;a.classList=e.classList,(({attributes:e},t,a)=>{[...e].filter((({nodeName:e})=>e.includes("data"))).forEach((({nodeName:e,nodeValue:n})=>{(a&&e!==a||!a)&&t.setAttribute(e,n)}))})(e,a,"data-appear-parent"),a.innerHTML=e.innerHTML,a.classList.add(t)}},l=(e,t,a)=>Array.from(a.querySelectorAll(`.${e}`)).filter((e=>!e.closest(`.${t}`))),c=(e,t,a)=>{const n=[l(t,a,e),...Array.from(e.querySelectorAll(`.${a}`)).map((e=>((e,t,a)=>Array.from(a.querySelectorAll(`.${e}`)).filter((e=>e.closest(`.${t}`)===a)))(t,a,e)))];return!!n.some((e=>e.length>0))&&n},d=(e,t)=>{t.hideagain&&e.from&&e.from.dataset.appearanceCanStart&&e.from.removeAttribute("data-appearance-can-start")},p=(e,t,a)=>{if(t.hideagain){e.from.querySelectorAll(a.animatecss).forEach((e=>{e.classList.remove("animationended")}));let t=e.from.querySelectorAll(".fragment.visible");t&&t.forEach((e=>{e.classList.remove("visible")}))}};return()=>{const e={names:{}};let t={};const s=(e,t,a)=>{r(e,"------------- Preloading -------------");let s=t.names;i(e,s.es5Filename),e.compatibility&&(s.animatecss=".backInDown, .backInLeft, .backInRight, .backInUp, .bounceIn, .bounceInDown, .bounceInLeft, .bounceInRight, .bounceInUp, .fadeIn, .fadeInDown, .fadeInDownBig, .fadeInLeft, .fadeInLeftBig, .fadeInRight, .fadeInRightBig, .fadeInUp, .fadeInUpBig, .fadeInTopLeft, .fadeInTopRight, .fadeInBottomLeft, .fadeInBottomRight, .flipInX, .flipInY, .lightSpeedInRight, .lightSpeedInLeft, .rotateIn, .rotateInDownLeft, .rotateInDownRight, .rotateInUpLeft, .rotateInUpRight, .jackInTheBox, .rollIn, .zoomIn, .zoomInDown, .zoomInLeft, .zoomInRight, .zoomInUp, .slideInDown, .slideInLeft, .slideInRight, .slideInUp, .skidLeft, .skidLeftBig, .skidRight, .skidRightBig, .shrinkIn, .shrinkInBlur",s.baseclass=e.compatibilitybaseclass),t.appearances=Array.from(t.slides.querySelectorAll(s.animatecss)),t.regularSections.forEach((a=>((e,t,a)=>{let s=null;if(e.hasAttribute("data-autoappear")){let a=e.dataset.autoappear;s="auto"==a||""==a||a.length<1||"true"==a?t.autoelements?t.autoelements:null:a}else t.autoappear&&t.autoelements&&(s=t.autoelements);if(s){let t=JSON.parse(n(s));Object.entries(t).forEach((([t,n])=>{let s=Array.from(e.querySelectorAll(t)).filter((e=>!a.appearances.includes(e)));s.length&&s.forEach((e=>{a.appearances.push(e);let t=[],s=null,r=!1,i=null,o=null;Array.isArray(n)?(t=n[0].split(/[ ,]+/),s=n[1]):"string"==typeof n?t=n.split(/[ ,]+/):n.constructor===Object&&((n.class||n.animation)&&(t=(n.animation?n.animation:n.class).split(/[ ,]+/)),n.speed&&(r=String(n.speed),r.includes("animate__")||(r=`animate__${r}`)),n.delay&&(s=String(n.delay)),n.split&&(i=String(n.split)),n["container-delay"]&&(o=String(n["container-delay"]))),e.classList.add(...t),r&&e.classList.add(r),s&&(e.dataset.delay=s),i&&(e.dataset.split=i),o&&(e.dataset.containerDelay=o)}))}))}})(a,e,t))),t.appearances.forEach(((t,a)=>{((e,t,a)=>{let n=a.baseclass;e.hasAttribute("data-appear-parent")&&o(e,n),t.appearparents&&e.parentNode&&e.parentNode.tagName&&"SPAN"==e.tagName&&"LI"==e.parentNode.tagName&&String(e.outerHTML).length==String(e.parentNode.innerHTML).length&&o(e)})(t,e,s),((e,t)=>{e.classList.contains(t.baseclass)||e.classList.add(t.baseclass),e.classList.contains(t.fragmentClass)&&e.classList.add("custom")})(t,s),t.hasAttribute("data-split")&&((e,t)=>{let a=!1,n=" ";if("words"==t?a=e.textContent.trim().split(/\s+/):"letters"==t&&(a=e.textContent.trim().split(""),n=""),a){const t=Array.from(e.classList).filter((e=>e.startsWith("animate__"))),s=a.map(((t,a)=>{const n=document.createElement("span");return n.textContent=t," "==t&&(n.textContent=" "),e.dataset.delay&&0!==a&&(n.dataset.delay=e.dataset.delay),e.dataset.containerDelay&&0===a&&(n.dataset.delay=e.dataset.containerDelay),e.classList.forEach((e=>e.startsWith("animate__")&&n.classList.add(e))),n.outerHTML})).join(n);t.forEach((t=>e.classList.remove(t))),e.removeAttribute("data-delay"),e.removeAttribute("data-split"),e.removeAttribute("data-container-delay"),e.innerHTML=s}})(t,t.dataset.split)})),t.regularSections.forEach(((t,a)=>{let n=c(t,s.baseclass,s.fragmentClass);n&&n.forEach((t=>{((e,t,a)=>{let n=0;e.forEach(((e,a)=>{if(0==a&&e.dataset.delay||0!=a){let a=t.delay;e.dataset&&e.dataset.delay&&(a=parseInt(e.dataset.delay)),n+=a,e.style.setProperty("animation-delay",n+"ms"),e.removeAttribute("data-delay")}}))})(t,e)}))})),(e=>{setTimeout(e,0)})(a)},l=function(t,a,n){let i=e.names;return i.baseclass=a.baseclass,i.compatibilitybaseclass=a.compatibilitybaseclass,i.fragmentSelector=".fragment",i.fragmentClass="fragment",i.speedClasses=["slower","slow","fast","faster"],i.speedClasses.push(...i.speedClasses.map((e=>`animate__${e}`))),i.animatecss='[class^="animate__"],[class*=" animate__"]',i.es5Filename=n,i.eventnames=["ready","slidechanged","slidetransitionend","autoanimate","overviewhidden","scrolle"],e.deck=t,e.dom=t.getRevealElement(),e.viewport=t.getViewportElement(),e.slides=t.getSlidesElement(),e.sections=e.slides.querySelectorAll("section"),e.fragments=e.slides.querySelectorAll(i.fragmentSelector),e.regularSections=Array.from(e.sections).filter((e=>!(({childNodes:e})=>{let t=!1;for(let a=0;at.on(n,(t=>{((e,t,a,n)=>{let s=n.deck.getConfig().view,r=e.type,i=(e=>{let t={};return t.from=e.fromSlide||e.previousSlide||null,t.to=e.toSlide||e.currentSlide||null,t})(e);if(i.to){"ready"==r&&(i.to.dataset.appearanceCanStart=!0);let n=((e,t)=>(e.dataset.appearevent&&"auto"===e.dataset.appearevent&&(e.dataset.appearevent="autoanimate"),"auto"==t.appearevent&&(t.appearevent="autoanimate"),e.dataset.appearevent?e.dataset.appearevent:t.appearevent))(i.to,t);(r==n||"slidetransitionend"==r&&"autoanimate"==n)&&(i.to.dataset.appearanceCanStart=!0),"scroll"==s&&"slidechanged"==r&&(d(i,t),p(i,t,a),setTimeout((()=>{i.to.dataset.appearanceCanStart=!0}),t.delay)),"slidetransitionend"==r&&(d(i,t),p(i,t,a)),"slidechanged"==r&&document.body.dataset.exitoverview?(d(i,t),i.to.dataset.appearanceCanStart=!0):"overviewhidden"==r&&(document.body.dataset.exitoverview=!0,setTimeout((()=>{document.body.removeAttribute("data-exitoverview")}),500),e.currentSlide&&(d(i,t),i.to.dataset.appearanceCanStart=!0))}})(t,a,i,e)})))),e.viewport.addEventListener("animationend",(e=>{e.target.classList.add("animationended")})),e.viewport.addEventListener("fragmenthidden",(e=>{e.fragment.classList.remove("animationended"),e.fragment.querySelectorAll(".animationended").forEach((e=>{e.classList.remove("animationended")}))})),new Promise((t=>{s(a,e,t),r(a,"---------- Done preloading ----------")}))};return{id:"appearance",init:function(e){return t=a({baseclass:"animate__animated",hideagain:!0,delay:300,debug:!1,appearevent:"slidetransitionend",autoappear:!1,autoelements:!1,appearparents:!1,csspath:"",animatecsspath:{link:"https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css",compat:"https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.compat.css"},compatibility:!1,compatibilitybaseclass:"animated"},e.getConfig().appearance||{}),l(e,t,"appearance.js")}}}})); //# sourceMappingURL=appearance.js.map diff --git a/demo/plugin/appearance/appearance.js.map b/demo/plugin/appearance/appearance.js.map index 50f5489..62511ec 100644 --- a/demo/plugin/appearance/appearance.js.map +++ b/demo/plugin/appearance/appearance.js.map @@ -1 +1 @@ -{"version":3,"file":"appearance.js","sources":["../../../src/plugin/js/helpers.js","../../../src/plugin/js/functions/get-load-css.js","../../../src/plugin/js/functions/add-auto-animation.js","../../../src/plugin/js/functions/fix-list-item.js","../../../src/plugin/js/functions/add-base-class.js","../../../src/plugin/js/functions/add-delay.js","../../../src/plugin/js/functions/get-appearance-arrays.js","../../../src/plugin/js/functions/convert-to-spans.js","../../../src/plugin/js/functions/show-hide-slide.js","../../../src/plugin/js/plugin.js"],"sourcesContent":["/**\n * Check if a given string is valid JSON.\n * @param {string} str - The string to be checked.\n * @returns {boolean} `true` if the string is valid JSON, otherwise `false`.\n */\nexport const isJSON = str => {\n\ttry {\n\t\treturn (JSON.parse(str) && !!str);\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\n/**\n * Convert a NodeList into an array based on provided selectors.\n * @param {Element} container - The root element to begin querying.\n * @param {string} selectors - A string containing one or more CSS selectors separated by commas.\n * @returns {Element[]} Array of elements that match the given selectors.\n */\nexport const selectionArray = (container, selectors) => {\n\tlet selections = container.querySelectorAll(selectors);\n\tlet selectionarray = Array.prototype.slice.call(selections);\n\treturn selectionarray;\n};\n\n/**\n * Check if an element has child nodes that are `SECTION` elements.\n * @param {Object} param0 - Object with childNodes property.\n * @param {NodeListOf} param0.childNodes - List of child nodes of the element.\n * @returns {boolean} `true` if the element contains `SECTION` child nodes, otherwise `false`.\n */\nexport const isStack = ({childNodes}) => {\n\tlet isStack = false;\n\tfor (let i = 0; i < childNodes.length; i++) {\n\t\tif (childNodes[i].tagName == \"SECTION\") {\n\t\t\tisStack = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn isStack;\n};\n\n/**\n * Copy data attributes from a source element to a target element with an optional exception.\n * @param {Object} param0 - Object with attributes property.\n * @param {NamedNodeMap} param0.attributes - Map of attributes of the source element.\n * @param {Element} target - Target element to copy attributes to.\n * @param {string} [not] - Optional attribute name to exclude from copying.\n */\nexport const copyDataAttributes = ({attributes}, target, not) => {\n\t[...attributes].filter(({nodeName}) => nodeName.includes('data')).forEach(({nodeName, nodeValue}) => {\n\t\tif ((not && nodeName !== not) || !not) {\n\t\t\ttarget.setAttribute(nodeName, nodeValue);\n\t\t}\n\t});\n};\n\n/**\n * Check if the given item is an object and not an array.\n * @param {*} item - The item to be checked.\n * @returns {boolean} `true` if the item is an object and not an array, otherwise `false`.\n */\nconst isObject = (item) => {\n\treturn (item && typeof item === 'object' && !Array.isArray(item));\n}\n\n/**\n * Deep merge multiple objects into a target object.\n * @param {Object} target - Target object to merge values into.\n * @param {...Object} sources - Source objects to merge from.\n * @returns {Object} The merged object.\n */\nexport const mergeDeep = (target, ...sources) => {\n\tif (!sources.length) return target;\n\tconst source = sources.shift();\n\n\tif (isObject(target) && isObject(source)) {\n\t\tfor (const key in source) {\n\t\t\tif (isObject(source[key])) {\n\t\t\t\tif (!target[key]) Object.assign(target, { [key]: {} });\n\t\t\t\tmergeDeep(target[key], source[key]);\n\t\t\t} else {\n\t\t\t\tObject.assign(target, { [key]: source[key] });\n\t\t\t}\n\t\t}\n\t}\n\treturn mergeDeep(target, ...sources);\n}\n\n/**\n * Resolves the given Promise immediately using setTimeout.\n * @param {Function} resolve - The resolve function of a Promise.\n * @returns {number} The ID value of the timer that is set.\n */\nexport const doneLoading = (resolve) => {\n\treturn setTimeout(resolve, 0);\n}\n\n\n/**\n * Converts a JavaScript object or a JSON-formatted string to a JSON string.\n *\n * @param {Object|string} str - The input string or object to be converted to a JSON string.\n * @returns {string} The JSON string.\n */\nexport const toJSONString = (str) => {\n\tlet JSONString = ''\n\n\tif (typeof str === \"string\") str = str.replace(/[“”]/g,'\"').replace(/[‘’]/g,\"'\");\n\n\tif (isJSON(str)) {\n\t\tJSONString = str\n\t} else {\n\t\tif (typeof str === \"object\") {\n\t\t\tJSONString = JSON.stringify(str, null, 2)\n\t\t} else {\n\t\t\tJSONString = str.trim().replace(/'/g, '\"').charAt(0) === \"{\" ? str.trim().replace(/'/g, '\"') : `{${str.trim().replace(/'/g, '\"')}}`;\n\t\t}\n\t}\n\treturn JSONString;\n}\n\n/**\n * Dynamically loads a stylesheet from the specified URL and calls a callback function when it's loaded.\n *\n * @param {string} url - The URL of the stylesheet to load.\n * @param {Function} callback - A callback function to be called when the stylesheet is loaded.\n */\nexport const loadStyle = (url, callback) => {\n\tconst head = document.querySelector('head');\n\tconst style = document.createElement('link');\n\tstyle.rel = 'stylesheet';\n\tstyle.href = url;\n\tstyle.onload = () => {\n\t\tif (typeof callback === 'function') {\n\t\t\tcallback.call();\n\t\t\tcallback = null;\n\t\t}\n\t};\n\tstyle.onreadystatechange = () => {\n\t\tif (style.readyState === 'loaded') {\n\t\t\tstyle.onload();\n\t\t}\n\t};\n\thead.appendChild(style);\n};\n\n/**\n * Retrieves the path of a JavaScript file based on its filename.\n *\n * @param {string} fileName - The filename of the script.\n * @returns {string} The path to the plugin's location.\n */\nexport const pluginPath = (fileName) => {\n\tlet path;\n\tlet pluginScript = document.querySelector(`script[src$=\"${fileName}\"]`);\n\tif (pluginScript) {\n\t\tpath = pluginScript.getAttribute(\"src\").slice(0, -1 * (fileName.length));\n\t} else {\n\t\tpath = import.meta.url.slice(0, import.meta.url.lastIndexOf('/') + 1);\n\t}\n\treturn path;\n}\n\n\n\nexport const debugLog = (options, text) => {\n\tif (options.debug) console.log(text);\n}\n","import { loadStyle } from '../helpers';\nimport { pluginPath } from '../helpers';\n\n/**\n * Retrieves and loads CSS stylesheets based on the provided options and ES5 filename.\n *\n * @param {Object} options - Configuration options for loading CSS.\n * @param {string} fileName - The filename of the script.\n */\n\nexport const getAndLoadCSS = (options, fileName) => {\n\tlet thePath = pluginPath(fileName);\n\tlet pluginBaseName = fileName.replace(/\\.[^/.]+$/, \"\");\n\n\tlet AppearanceStylePath = options.csspath.appearance ? options.csspath.appearance : null || `${thePath}${pluginBaseName}.css` || `plugin/${pluginBaseName}/${pluginBaseName}.css`\n\tlet AnimateCSSPath = !options.compatibility ? options.animatecsspath.link : options.animatecsspath.compat;\n\n\tif (options.debug) {\n\t\tconsole.log(`Paths:`);\n\t\tconsole.log(` - Plugin path = ${thePath}`);\n\t\tconsole.log(` - Appearance CSS path = ${AppearanceStylePath}`);\n\t\tconsole.log(` - AnimateCSS CSS path = ${AnimateCSSPath}`);\n\t}\n\n\tloadStyle(AnimateCSSPath, function () {\n\t\tloadStyle(AppearanceStylePath);\n\t});\n\n}","import { toJSONString } from '../helpers';\n\n\n/**\n * Adds automatic animations to elements within a section based on specified criteria.\n *\n * This function examines the provided section for attributes and options to determine\n * which classes should be added to its elements to enable automatic animations.\n *\n * @param {HTMLElement} section - The section element to which automatic animations will be applied.\n * @param {Object} options - The existing user options object\n * @param {Object} vars - The existing vars object\n * @returns {undefined}\n */\nexport const addAutoAnimation = (section, options, vars) => {\n\n\tlet sectionAutoSelectors = null;\n\n\tif (section.hasAttribute(\"data-autoappear\")) {\n\n\t\tlet sectDataAppear = section.dataset.autoappear;\n\n\t\tif (sectDataAppear == \"auto\" || sectDataAppear == \"\" || sectDataAppear.length < 1 || sectDataAppear == \"true\") {\n\t\t\t// This section should get the global autoappear classes on its objects\n\t\t\tsectionAutoSelectors = options.autoelements ? options.autoelements : null;\n\t\t} else {\n\t\t\t// This section should get the local autoappear classes on its objects\n\t\t\tsectionAutoSelectors = sectDataAppear;\n\t\t}\n\n\t} else if ( options.autoappear && options.autoelements ) {\n\t\t// This section should get the global autoappear classes on its objects\n\t\tsectionAutoSelectors = options.autoelements;\n\t}\n\n\tif (sectionAutoSelectors) {\n\n\t\tlet elementsToAnimate = JSON.parse(toJSONString(sectionAutoSelectors));\n\n\t\tObject.entries(elementsToAnimate).forEach(([selector, assignables]) => {\n\n\n\t\t\t// Exclude the elements from vars.appearances\n\t\t\tlet elements = Array.from(section.querySelectorAll(selector)).filter( element => !vars.appearances.includes(element) );\n\n\t\t\tif (elements.length) {\n\n\t\t\t\telements.forEach((element) => {\n\n\t\t\t\t\tvars.appearances.push(element)\n\n\t\t\t\t\tlet newClasses = [], newDelay = null, speedClass = false, elementSplit = null, containerDelay = null;\n\n\t\t\t\t\tif (Array.isArray(assignables)) {\n\n\t\t\t\t\t\tnewClasses = assignables[0].split(/[ ,]+/);\n\t\t\t\t\t\tnewDelay = assignables[1];\n\n\t\t\t\t\t} else if (typeof assignables == \"string\"){\n\n\t\t\t\t\t\tnewClasses = assignables.split(/[ ,]+/);\n\n\t\t\t\t\t} else if (assignables.constructor === Object) {\n\n\t\t\t\t\t\tif (assignables.class || assignables.animation) {\n\t\t\t\t\t\t\tlet animationClass = assignables.animation ? assignables.animation : assignables.class;\n\t\t\t\t\t\t\tnewClasses = animationClass.split(/[ ,]+/);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.speed) {\n\t\t\t\t\t\t\tspeedClass = String(assignables.speed);\n\t\t\t\t\t\t\tif (!speedClass.includes(\"animate__\")) {\n\t\t\t\t\t\t\t\tspeedClass = `animate__${speedClass}`\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.delay) {\n\t\t\t\t\t\t\tnewDelay = String(assignables.delay);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.split) {\n\t\t\t\t\t\t\telementSplit = String(assignables.split);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables[\"container-delay\"]) {\n\t\t\t\t\t\t\tcontainerDelay = String(assignables[\"container-delay\"]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telement.classList.add(...newClasses);\n\t\t\t\t\tif (speedClass) { element.classList.add(speedClass)}\n\t\t\t\t\tif (newDelay) {element.dataset.delay = newDelay};\n\t\t\t\t\tif (elementSplit) {element.dataset.split = elementSplit};\n\t\t\t\t\tif (containerDelay) {element.dataset.containerDelay = containerDelay};\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n","import { copyDataAttributes } from '../helpers';\n\n/**\n * Hoist a list item's appearance to its parent element's appearance.\n *\n * @param {HTMLElement} from - The list item element.\n * @returns {undefined}\n */\nconst hoistAppearance = (from, baseclass) => {\n\tlet to = from.parentNode;\n\tif (!to) return;\n \n\tfor (const sibling of to.children) {\n\t if (sibling !== from && sibling.dataset.appearParent) return;\n\t}\n \n\tto.classList = from.classList;\n\tcopyDataAttributes(from, to, \"data-appear-parent\");\n\tto.innerHTML = from.innerHTML;\n\tto.classList.add(baseclass);\n};\n\n\n/**\n * Fix list items that were changed by Quarto.\n *\n * This function is designed for use with Quarto and handles the conversion of list items\n * with Appearance classes to their parent elements when a manual attribute is present.\n * It also provides automatic conversion for list items that directly contain spans, which\n * is related to Quarto's wrapping of list content in a span.\n *\n * @param {HTMLElement} appearance - The list item element whose appearance will be converted.\n * @param {Object} options - An options object that controls the conversion behavior.\n * @param {boolean} options.appearparents - If `true`, automatic conversion of list items with spans is enabled.\n * @returns {undefined}\n */\nexport const fixListItem = (appearance, options, names) => {\n\n\tlet baseclass = names.baseclass\n\tif (appearance.hasAttribute(\"data-appear-parent\")) {\n\t\thoistAppearance(appearance, baseclass);\n\t}\n\n\tif (options.appearparents) {\n\t\tif (appearance.parentNode && appearance.parentNode.tagName) {\n\t\t\tif (appearance.tagName == \"SPAN\" && appearance.parentNode.tagName == \"LI\") {\n\t\t\t\tlet spanLength = String(appearance.outerHTML).length;\n\t\t\t\tlet liContentLength = String(appearance.parentNode.innerHTML).length;\n\t\t\t\tif (spanLength == liContentLength) {\n\t\t\t\t\thoistAppearance(appearance);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","/**\n * Adds a base class to an HTML element if it doesn't already have it.\n *\n * This function checks if the specified HTML element has the specified base class,\n * and if not, it adds the base class to the element's class list.\n *\n * @param {HTMLElement} appearance - The HTML element to which the base class should be added.\n * @param {Object} names - The existing 'names' object\n * @returns {undefined}\n */\n\nexport const addBaseClass = (appearance, names) => {\n\tif (!appearance.classList.contains(names.baseclass)) {\n\t\tappearance.classList.add(names.baseclass);\n\t}\n\tif (appearance.classList.contains(names.fragmentClass)) {\n\t\tappearance.classList.add('custom');\n\t}\n}\n","export const addDelay = (appearanceArray, options, names) => {\n\n let delay = 0;\n appearanceArray.forEach((appearance, index) => {\n\n if ((index == 0 && appearance.dataset.delay) || index !=0) {\n\n let elementDelay = options.delay;\n\n if (appearance.dataset && appearance.dataset.delay) {\n elementDelay = parseInt(appearance.dataset.delay);\n }\n\n delay = delay + elementDelay;\n\n appearance.style.setProperty('animation-delay', delay + \"ms\");\n appearance.removeAttribute('data-delay');\n }\n\n })\n\n}\n","/**\n * Selects elements with a specified class that are not nested inside an element with another specified class.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} excludeClass - The class name to exclude elements nested inside it.\n * @param {Element} el - The element to find the target elements in.\n * @returns {Element[]} - Array of selected elements.\n */\nconst elemsNotInClass = (targetClass, excludeClass, el) => \n Array.from(el.querySelectorAll(`.${targetClass}`))\n .filter(s => !s.closest(`.${excludeClass}`));\n\n/**\n * Selects elements with a specified class that are nested inside an element with another specified class.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} parentClass - The class name of the parent to find elements in.\n * @param {Element} el - The element to find the target elements in.\n * @returns {Element[]} - Array of selected elements.\n */\nconst elemsInClass = (targetClass, parentClass, el) =>\n Array.from(el.querySelectorAll(`.${targetClass}`))\n .filter(s => s.closest(`.${parentClass}`) === el);\n\n/**\n * Extracts groups of elements with a specified class from the provided section element.\n * Groups are formed based on nesting inside elements with another specified class.\n * @param {Element} section - The section to extract data from.\n * @returns {Element[][]} - Nested arrays of selected elements.\n */\n\n\n/**\n * Extracts groups of elements with a specified class from the provided section element.\n * Groups are formed based on nesting inside elements with another specified class.\n * @param {Element} section - The section to extract data from.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} groupClass - The class name of the parent to find elements in.\n * @returns {Element[][]} - Nested arrays of selected elements.\n */\nexport const getAppearanceArrays = (section, targetClass, groupClass) => {\n const result = [\n elemsNotInClass(targetClass, groupClass, section), \n ...Array.from(section.querySelectorAll(`.${groupClass}`))\n .map(frag => elemsInClass(targetClass, groupClass, frag))\n ];\n\n\tif (result.some(group => group.length > 0)) {\n return result;\n } else {\n\t\treturn false;\n\t}\n};\n","export const convertToSpans = (parent, kind) => {\n\n\tlet splitElements = false;\n\tlet joinChar = ' ';\n\n\tif (kind == \"words\") {\n\t\tsplitElements = parent.textContent.trim().split(/\\s+/);\n\t\t\n\t} else if (kind == \"letters\") {\n\t\tsplitElements = parent.textContent.trim().split('');\n\t\tjoinChar = '';\n\t}\n\n\tif (splitElements) {\n\t\tconst parentAnimateClasses = Array.from(parent.classList).filter(className => className.startsWith('animate__'));\n\t\n\t\tconst newHtml = splitElements.map((element, index) => {\n\t\t\tconst span = document.createElement('span');\n\t\t\tspan.textContent = element;\n\t\t\tif (element == \" \") {span.textContent = \"\\u00A0\"}\n\t\n\t\t\tif (parent.dataset.delay && index !== 0) {\n\t\t\t\tspan.dataset.delay = parent.dataset.delay\n\t\t\t}\n\n\t\t\tif (parent.dataset.containerDelay && index === 0) {\n\t\t\t\tspan.dataset.delay = parent.dataset.containerDelay\n\t\t\t}\n\t\n\t\t\tparent.classList.forEach(className => className.startsWith('animate__') && span.classList.add(className));\n\t\t\treturn span.outerHTML;\n\t\t\t\n\t\t}).join(joinChar);\n\t\n\t\tparentAnimateClasses.forEach(className => parent.classList.remove(className));\n\t\tparent.removeAttribute('data-delay');\n\t\tparent.removeAttribute('data-split');\n\t\tparent.removeAttribute('data-container-delay');\n\t\n\t\tparent.innerHTML = newHtml;\n\t}\n\n\n};","/**\n * Derives slide from and to from the event object.\n *\n * @param {Object} event - The event object containing slide transition details.\n * @returns {Object} - An object containing references to the \"from\" and \"to\" slides.\n */\nconst fromTo = (event) => {\n\tlet slides = {};\n\tslides.from = event.fromSlide || event.previousSlide || null;\n\tslides.to = event.toSlide || event.currentSlide || null;\n\treturn slides;\n};\n\n/**\n * A function that determines the appearance event for a given slide.\n *\n * This function checks the `data-appearevent` attribute of the slide and the `options.appearevent` parameter.\n * If `data-appearevent` is set to \"auto\", it is converted to \"autoanimate\". If `options.appearevent` is \"auto\", it is also converted to \"autoanimate\".\n * The function returns the appearance event, prioritizing `data-appearevent` over `options.appearevent`.\n *\n * @param {HTMLElement} toSlide - The slide for which the appearance event is determined.\n * @param {Object} options - An object containing options for the appearance event.\n * @param {string} options.appearevent - The appearance event option provided in the `options` object.\n *\n * @returns {string} - The determined appearance event for the slide, either from `data-appearevent` or `options.appearevent`.\n */\nconst slideAppearevent = (toSlide, options) => {\n\n\tif (toSlide.dataset.appearevent && toSlide.dataset.appearevent === \"auto\" ) {\n\t\ttoSlide.dataset.appearevent = \"autoanimate\"\n\t}\n\tif (options.appearevent == \"auto\") {options.appearevent = \"autoanimate\"}\n\treturn toSlide.dataset.appearevent ? toSlide.dataset.appearevent : options.appearevent;\n};\n\n/**\n * Remove the 'data-appearance-can-start' attribute from the 'from' slide if the 'hideagain' option is enabled.\n *\n * @param {HTMLElement} slides - The container element for the slides.\n * @param {Object} options - An object containing configuration options.\n * @param {boolean} options.hideagain - A flag indicating whether to remove the attribute when 'hideagain' is true.\n */\nconst removeStartAttribute = (slides, options) => {\n\tif (options.hideagain) {\n\t\tif (slides.from && slides.from.dataset.appearanceCanStart ) {\n\t\t\tslides.from.removeAttribute('data-appearance-can-start');\n\t\t}\n\t}\n};\n\n\n/**\n * Turn off slide appearances when transitioning from one slide to another if the 'hideagain' option is enabled.\n *\n * @param {HTMLElement} slides - The container element for the slides.\n * @param {Object} options - An object containing configuration options.\n * @param {string} names.animatecss - The CSS selector for animated elements.\n */\nconst turnOffSlideAppearances = (slides, options, names) => {\n\tif (options.hideagain) {\n\t\tlet fromAppearances = slides.from.querySelectorAll(names.animatecss);\n\t\tfromAppearances.forEach( appearance => {\n\t\t\tappearance.classList.remove('animationended');\n\t\t} );\n\t\t// Remove visible class from fragments when moving away from that slide\n\t\tlet fromFragments = slides.from.querySelectorAll(`.fragment.visible`);\n\t\tif (fromFragments) {\n\t\t\tfromFragments.forEach(fragment => {\n\t\t\t\tfragment.classList.remove('visible');\n\t\t\t})\n\t\t}\n\t}\n};\n\n\n/**\n * Handles the showing and hiding of slides based on the provided event and options.\n *\n * @param {Object} event - The event object containing slide transition details.\n * @param {Object} options - An object containing configurations for slide appearance management.\n */\nexport const showHideSlide = (event, options, names, vars) => {\n\n\tlet view = vars.deck.getConfig().view;\n\tlet etype = event.type;\n\tlet slides = fromTo(event);\n\n\tif (slides.to) {\n\n\t\tif (etype == \"ready\") {\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t}\n\n\t\tlet appearevent = slideAppearevent(slides.to, options)\n\n\t\tif (etype == appearevent || (etype == \"slidetransitionend\" && appearevent == \"autoanimate\")) {\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t}\n\n\t\t// Add experimental Reader mode compatibility, does not have a slidetransitionend event yet\n\t\tif (view == \"scroll\" && etype == 'slidechanged' ) {\n\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tturnOffSlideAppearances(slides, options, names);\n\n\t\t\t// Add delay to allow for scroll animation to finish\n\t\t\tsetTimeout(() => {\n\t\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t\t}, options.delay)\n\t\t}\n\n\n\t\tif (etype == \"slidetransitionend\" ) {\n\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tturnOffSlideAppearances(slides, options, names);\n\t\t}\n\t\t\n\t\tif (etype == 'slidechanged' && document.body.dataset.exitoverview) {\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\n\t\t} else if (etype == 'overviewhidden' ) {\n\n\t\t\tdocument.body.dataset.exitoverview = true;\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tdocument.body.removeAttribute('data-exitoverview')\n\t\t\t}, 500)\n\n\t\t\tif (event.currentSlide ) {\n\t\t\t\tremoveStartAttribute(slides, options);\n\t\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t\t}\n\t\t}\n\t}\n}","import { debugLog, mergeDeep, doneLoading, isStack } from './helpers';\n\nimport {getAndLoadCSS} from './functions/get-load-css.js';\nimport {addAutoAnimation} from './functions/add-auto-animation.js';\nimport {fixListItem} from './functions/fix-list-item';\nimport {addBaseClass} from './functions/add-base-class.js';\nimport {addDelay} from './functions/add-delay.js';\nimport {getAppearanceArrays} from './functions/get-appearance-arrays.js';\nimport {convertToSpans} from './functions/convert-to-spans';\nimport {showHideSlide} from './functions/show-hide-slide.js';\n\n\nconst Plugin = () => {\n\n\tconst vars = {};\n\tvars.names = {};\n\tlet options = {};\n\n\t/**\n\t* Prepare the plugin to find Appearance elements\n\t* @param {Object} vars - The variables to be prepared.\n\t* @param {Object} names - The names to be prepared.\n\t* @param {Function} resolve - The callback function to be called when preparation is complete.\n\t* @throws {Error} Throws an error if the 'options' object is not defined.\n\t*/\n\tconst prepare = (options, vars, resolve) => {\n\n\t\tdebugLog(options, \"------------- Preloading -------------\");\n\n\t\tlet names = vars.names;\n\n\t\tgetAndLoadCSS(options, names.es5Filename);\n\n\t\tif (options.compatibility) {\n\t\t\tnames.animatecss = '.backInDown, .backInLeft, .backInRight, .backInUp, .bounceIn, .bounceInDown, .bounceInLeft, .bounceInRight, .bounceInUp, .fadeIn, .fadeInDown, .fadeInDownBig, .fadeInLeft, .fadeInLeftBig, .fadeInRight, .fadeInRightBig, .fadeInUp, .fadeInUpBig, .fadeInTopLeft, .fadeInTopRight, .fadeInBottomLeft, .fadeInBottomRight, .flipInX, .flipInY, .lightSpeedInRight, .lightSpeedInLeft, .rotateIn, .rotateInDownLeft, .rotateInDownRight, .rotateInUpLeft, .rotateInUpRight, .jackInTheBox, .rollIn, .zoomIn, .zoomInDown, .zoomInLeft, .zoomInRight, .zoomInUp, .slideInDown, .slideInLeft, .slideInRight, .slideInUp, .skidLeft, .skidLeftBig, .skidRight, .skidRightBig, .shrinkIn, .shrinkInBlur';\n\t\t\tnames.baseclass = options.compatibilitybaseclass\n\t\t}\n\n\t\tvars.appearances = Array.from(vars.slides.querySelectorAll(names.animatecss));\n\n\t\t// Go through each section to see if there are any (auto) selectors that need animation classes\n\t\tvars.regularSections.forEach(theSection => addAutoAnimation(theSection, options, vars));\n\n\t\tvars.appearances.forEach((theAppearance, index) => {\n\t\t\t// Fix any list item where the Appearance classes were moved to the span (Quarto does this)\n\t\t\tfixListItem(theAppearance, options, names);\n\n\t\t\t// Go through each appearance element and add the baseclass if it doesn't have it\n\t\t\taddBaseClass(theAppearance, names);\n\n\t\t\tif (theAppearance.hasAttribute('data-split')) {\n\t\t\t\tconvertToSpans(theAppearance, theAppearance.dataset.split);\n\t\t\t}\n\t\t});\n\n\t\tvars.regularSections.forEach((theSection, index) => {\n\t\t\t// Get all the Appearances in the section as separate arrays per delay loop\n\t\t\tlet appearanceArrays = getAppearanceArrays(theSection, names.baseclass, names.fragmentClass);\n\n\t\t\tif (appearanceArrays) {\n\t\t\t\tappearanceArrays.forEach((appearanceArray) => {\n\t\t\t\t\t// Add the delays to each appearance in the array\n\t\t\t\t\taddDelay(appearanceArray, options, names)\n\t\t\t\t})\n\t\t\t}\n\t\t});\n\n\t\tdoneLoading(resolve);\n\t}\n\n\t/**\n\t* The main function of the plugin\n\t* @param {object} deck - The deck object\n\t* @param {object} options - The options object\n\t* @param {string} es5Filename - The name of the file that will be used\n\t*/\n\tconst Appear = function (deck, options, es5Filename) {\n\n\t\tlet names = vars.names;\n\n\t\t// Set up names\n\t\tnames.baseclass = options.baseclass;\n\t\tnames.compatibilitybaseclass = options.compatibilitybaseclass;\n\t\tnames.fragmentSelector = \".fragment\";\n\t\tnames.fragmentClass = \"fragment\";\n\t\tnames.speedClasses = ['slower', 'slow', 'fast', 'faster'];\n\t\tnames.speedClasses.push(...names.speedClasses.map(speed => `animate__${speed}`));\n\t\tnames.animatecss = '[class^=\"animate__\"],[class*=\" animate__\"]';\n\t\tnames.es5Filename = es5Filename;\n\t\tnames.eventnames = ['ready', 'slidechanged', 'slidetransitionend', 'autoanimate', 'overviewhidden', 'scrolle'];\n\t\n\t\t// Set up variables\n\t\tvars.deck = deck;\n\t\tvars.dom = deck.getRevealElement();\n\t\tvars.viewport = deck.getViewportElement();\n\t\tvars.slides = deck.getSlidesElement();\n\n\t\tvars.sections = vars.slides.querySelectorAll('section');\n\t\tvars.fragments = vars.slides.querySelectorAll(names.fragmentSelector);\n\t\tvars.regularSections = Array.from(vars.sections).filter( section => !isStack(section));\n\n\t\tif( /receiver/i.test( window.location.search ) ) vars.viewport.classList.add('sv');\n\n\t\tnames.eventnames.forEach( (eventname) => deck.on( eventname, event => { showHideSlide(event, options, names, vars) } ) );\n\n\t\tvars.viewport.addEventListener(\"animationend\", (event) => {\n\t\t\tevent.target.classList.add('animationended');\n\t\t});\n\t\tvars.viewport.addEventListener(\"fragmenthidden\", (event) => {\n\t\t\tevent.fragment.classList.remove('animationended');\n\t\t\tevent.fragment.querySelectorAll('.animationended').forEach(el => {\n\t\t\t\tel.classList.remove('animationended');\n\t\t\t});\n\t\t});\n\n\t\treturn new Promise(resolve => {\n\t\t\tprepare(options, vars, resolve);\n\t\t\tdebugLog(options, \"---------- Done preloading ----------\");\n\t\t});\n\t};\n\n\n\t/**\n\t* Initialize the plugin\n\t* @param {object} deck - The deck object\n\t*/\n\tconst init = function (deck) {\n\n\t\tlet defaultOptions = {\n\t\t\tbaseclass: 'animate__animated',\n\t\t\thideagain: true,\n\t\t\tdelay: 300,\n\t\t\tdebug: false,\n\t\t\tappearevent: 'slidetransitionend',\n\t\t\tautoappear: false,\n\t\t\tautoelements: false,\n\t\t\tappearparents: false,\n\t\t\tcsspath: '',\n\t\t\tanimatecsspath: {\n\t\t\t\tlink : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css',\n\t\t\t\tcompat : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.compat.css',\n\t\t\t},\n\t\t\tcompatibility: false,\n\t\t\tcompatibilitybaseclass: 'animated'\n\t\t};\n\n\t\toptions = mergeDeep(defaultOptions, deck.getConfig().appearance || {});\n\n\t\treturn Appear(deck, options, \"appearance.js\");\n\t};\n\n\treturn { id: 'appearance', init: init };\n};\n\nexport default Plugin;"],"names":["isJSON","str","JSON","parse","e","isStack","_ref","childNodes","i","length","tagName","copyDataAttributes","_ref2","target","not","attributes","filter","_ref3","nodeName","includes","forEach","_ref4","nodeValue","setAttribute","isObject","item","Array","isArray","mergeDeep","_len","arguments","sources","_key","source","shift","key","Object","assign","doneLoading","resolve","setTimeout","toJSONString","JSONString","replace","stringify","trim","charAt","loadStyle","url","callback","head","document","querySelector","style","createElement","rel","href","onload","call","onreadystatechange","readyState","appendChild","pluginPath","fileName","path","pluginScript","getAttribute","slice","import","lastIndexOf","debugLog","options","text","debug","console","log","getAndLoadCSS","thePath","pluginBaseName","AppearanceStylePath","csspath","appearance","AnimateCSSPath","compatibility","animatecsspath","link","compat","addAutoAnimation","section","vars","sectionAutoSelectors","hasAttribute","sectDataAppear","dataset","autoappear","autoelements","elementsToAnimate","entries","selector","assignables","elements","from","querySelectorAll","element","appearances","push","newClasses","newDelay","speedClass","elementSplit","containerDelay","split","constructor","class","animation","animationClass","speed","String","delay","classList","add","hoistAppearance","baseclass","to","parentNode","sibling","children","appearParent","innerHTML","fixListItem","names","appearparents","spanLength","outerHTML","liContentLength","addBaseClass","contains","fragmentClass","addDelay","appearanceArray","index","elementDelay","parseInt","setProperty","removeAttribute","elemsNotInClass","targetClass","excludeClass","el","s","closest","elemsInClass","parentClass","getAppearanceArrays","groupClass","result","map","frag","some","group","convertToSpans","parent","kind","splitElements","joinChar","textContent","parentAnimateClasses","className","startsWith","newHtml","span","join","remove","fromTo","event","slides","fromSlide","previousSlide","toSlide","currentSlide","slideAppearevent","appearevent","removeStartAttribute","hideagain","appearanceCanStart","turnOffSlideAppearances","fromAppearances","animatecss","fromFragments","fragment","showHideSlide","view","deck","getConfig","etype","type","body","exitoverview","Plugin","prepare","es5Filename","compatibilitybaseclass","regularSections","theSection","theAppearance","appearanceArrays","Appear","fragmentSelector","speedClasses","eventnames","dom","getRevealElement","viewport","getViewportElement","getSlidesElement","sections","fragments","test","window","location","search","eventname","on","addEventListener","Promise","init","defaultOptions","id"],"mappings":";;;;;;;;;;;;;;;;;;;;;;CAAA;CACA;CACA;CACA;CACA;CACO,MAAMA,MAAM,GAAGC,GAAG,IAAI;GAC5B,IAAI;KACH,OAAQC,IAAI,CAACC,KAAK,CAACF,GAAG,CAAC,IAAI,CAAC,CAACA,GAAG,CAAA;IAChC,CAAC,OAAOG,CAAC,EAAE;CACX,IAAA,OAAO,KAAK,CAAA;CACb,GAAA;CACD,CAAC,CAAA;;CAcD;CACA;CACA;CACA;CACA;CACA;CACO,MAAMC,OAAO,GAAGC,IAAA,IAAkB;GAAA,IAAjB;CAACC,IAAAA,UAAAA;CAAU,GAAC,GAAAD,IAAA,CAAA;GACnC,IAAID,OAAO,GAAG,KAAK,CAAA;CACnB,EAAA,KAAK,IAAIG,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGD,UAAU,CAACE,MAAM,EAAED,CAAC,EAAE,EAAE;KAC3C,IAAID,UAAU,CAACC,CAAC,CAAC,CAACE,OAAO,IAAI,SAAS,EAAE;CACvCL,MAAAA,OAAO,GAAG,IAAI,CAAA;CACd,MAAA,MAAA;CACD,KAAA;CACD,GAAA;CACA,EAAA,OAAOA,OAAO,CAAA;CACf,CAAC,CAAA;;CAED;CACA;CACA;CACA;CACA;CACA;CACA;CACO,MAAMM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CACDH,MAAAA,aAAa,EAAE,KAAK;CACpBsH,MAAAA,sBAAsB,EAAE,UAAA;MACxB,CAAA;CAEDlI,IAAAA,OAAO,GAAG3C,SAAS,CAACsM,cAAc,EAAElC,IAAI,CAACC,SAAS,EAAE,CAAChH,UAAU,IAAI,EAAE,CAAC,CAAA;CAEtE,IAAA,OAAO6H,MAAM,CAACd,IAAI,EAAEzH,OAAO,EAAE,eAAe,CAAC,CAAA;IAC7C,CAAA;GAED,OAAO;CAAE4J,IAAAA,EAAE,EAAE,YAAY;CAAEF,IAAAA,IAAI,EAAEA,IAAAA;IAAM,CAAA;CACxC;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"appearance.js","sources":["../../../src/plugin/js/helpers.js","../../../src/plugin/js/functions/get-load-css.js","../../../src/plugin/js/functions/fix-list-item.js","../../../src/plugin/js/functions/get-appearance-arrays.js","../../../src/plugin/js/functions/show-hide-slide.js","../../../src/plugin/js/plugin.js","../../../src/plugin/js/functions/add-auto-animation.js","../../../src/plugin/js/functions/add-base-class.js","../../../src/plugin/js/functions/convert-to-spans.js","../../../src/plugin/js/functions/add-delay.js"],"sourcesContent":["/**\n * Check if a given string is valid JSON.\n * @param {string} str - The string to be checked.\n * @returns {boolean} `true` if the string is valid JSON, otherwise `false`.\n */\nexport const isJSON = str => {\n\ttry {\n\t\treturn (JSON.parse(str) && !!str);\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\n/**\n * Convert a NodeList into an array based on provided selectors.\n * @param {Element} container - The root element to begin querying.\n * @param {string} selectors - A string containing one or more CSS selectors separated by commas.\n * @returns {Element[]} Array of elements that match the given selectors.\n */\nexport const selectionArray = (container, selectors) => {\n\tlet selections = container.querySelectorAll(selectors);\n\tlet selectionarray = Array.prototype.slice.call(selections);\n\treturn selectionarray;\n};\n\n/**\n * Check if an element has child nodes that are `SECTION` elements.\n * @param {Object} param0 - Object with childNodes property.\n * @param {NodeListOf} param0.childNodes - List of child nodes of the element.\n * @returns {boolean} `true` if the element contains `SECTION` child nodes, otherwise `false`.\n */\nexport const isStack = ({childNodes}) => {\n\tlet isStack = false;\n\tfor (let i = 0; i < childNodes.length; i++) {\n\t\tif (childNodes[i].tagName == \"SECTION\") {\n\t\t\tisStack = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn isStack;\n};\n\n/**\n * Copy data attributes from a source element to a target element with an optional exception.\n * @param {Object} param0 - Object with attributes property.\n * @param {NamedNodeMap} param0.attributes - Map of attributes of the source element.\n * @param {Element} target - Target element to copy attributes to.\n * @param {string} [not] - Optional attribute name to exclude from copying.\n */\nexport const copyDataAttributes = ({attributes}, target, not) => {\n\t[...attributes].filter(({nodeName}) => nodeName.includes('data')).forEach(({nodeName, nodeValue}) => {\n\t\tif ((not && nodeName !== not) || !not) {\n\t\t\ttarget.setAttribute(nodeName, nodeValue);\n\t\t}\n\t});\n};\n\n/**\n * Check if the given item is an object and not an array.\n * @param {*} item - The item to be checked.\n * @returns {boolean} `true` if the item is an object and not an array, otherwise `false`.\n */\nconst isObject = (item) => {\n\treturn (item && typeof item === 'object' && !Array.isArray(item));\n}\n\n/**\n * Deep merge multiple objects into a target object.\n * @param {Object} target - Target object to merge values into.\n * @param {...Object} sources - Source objects to merge from.\n * @returns {Object} The merged object.\n */\nexport const mergeDeep = (target, ...sources) => {\n\tif (!sources.length) return target;\n\tconst source = sources.shift();\n\n\tif (isObject(target) && isObject(source)) {\n\t\tfor (const key in source) {\n\t\t\tif (isObject(source[key])) {\n\t\t\t\tif (!target[key]) Object.assign(target, { [key]: {} });\n\t\t\t\tmergeDeep(target[key], source[key]);\n\t\t\t} else {\n\t\t\t\tObject.assign(target, { [key]: source[key] });\n\t\t\t}\n\t\t}\n\t}\n\treturn mergeDeep(target, ...sources);\n}\n\n/**\n * Resolves the given Promise immediately using setTimeout.\n * @param {Function} resolve - The resolve function of a Promise.\n * @returns {number} The ID value of the timer that is set.\n */\nexport const doneLoading = (resolve) => {\n\treturn setTimeout(resolve, 0);\n}\n\n\n/**\n * Converts a JavaScript object or a JSON-formatted string to a JSON string.\n *\n * @param {Object|string} str - The input string or object to be converted to a JSON string.\n * @returns {string} The JSON string.\n */\nexport const toJSONString = (str) => {\n\tlet JSONString = ''\n\n\tif (typeof str === \"string\") str = str.replace(/[“”]/g,'\"').replace(/[‘’]/g,\"'\");\n\n\tif (isJSON(str)) {\n\t\tJSONString = str\n\t} else {\n\t\tif (typeof str === \"object\") {\n\t\t\tJSONString = JSON.stringify(str, null, 2)\n\t\t} else {\n\t\t\tJSONString = str.trim().replace(/'/g, '\"').charAt(0) === \"{\" ? str.trim().replace(/'/g, '\"') : `{${str.trim().replace(/'/g, '\"')}}`;\n\t\t}\n\t}\n\treturn JSONString;\n}\n\n\n/**\n * Dynamically loads a resource from the specified URL and calls a callback function when it's loaded.\n *\n * @param {string} url - The URL of the resource to load.\n * @param {string} type - The type of resource to load.\n * @param {Function} callback - A callback function to be called when the resource is loaded.\n */\nexport const loadResource = (url, type, callback) => {\n\tlet head = document.querySelector('head');\n\tlet resource;\n\n\tif (type === 'script') {\n\t resource = document.createElement('script');\n\t resource.type = 'text/javascript';\n\t resource.src = url;\n\t} else if (type === 'stylesheet') {\n\t resource = document.createElement('link');\n\t resource.rel = 'stylesheet';\n\t resource.href = url;\n\t}\n\tconst finish = () => {\n\t if (typeof callback === 'function') {\n\t\tcallback.call();\n\t\tcallback = null;\n\t }\n\t};\n\tresource.onload = finish;\n\tresource.onreadystatechange = function () {\n\t\tif (this.readyState === 'loaded') {\n\t\t finish();\n\t\t}\n\t};\n\thead.appendChild(resource);\n}\n\n\n/**\n * Retrieves the path of a JavaScript file based on its filename.\n *\n * @param {string} fileName - The filename of the script.\n * @returns {string} The path to the plugin's location.\n */\nexport const pluginPath = (fileName) => {\n\tlet path;\n\tlet pluginScript = document.querySelector(`script[src$=\"${fileName}\"]`);\n\tif (pluginScript) {\n\t\tpath = pluginScript.getAttribute(\"src\").slice(0, -1 * (fileName.length));\n\t} else {\n\t\tpath = import.meta.url.slice(0, import.meta.url.lastIndexOf('/') + 1);\n\t}\n\treturn path;\n}\n\n\n/**\n * Check if element 'a' appears before element 'b' in the DOM tree.\n *\n * @param {HTMLElement} a - The first HTML element to compare.\n * @param {HTMLElement} b - The second HTML element to compare.\n * @returns {boolean|undefined} - Returns `true` if element 'a' appears before element 'b', `false` if 'b' appears before 'a', and `undefined` if the elements have no relative position in the DOM tree.\n */\nexport const isBefore = (a, b) => {\n var all = document.getElementsByTagName('*');\n\n for (var i = 0; i < all.length; ++i) {\n if (all[i] === a) {\n return true;\n } else if (all[i] === b) {\n return false;\n }\n }\n // If the elements have no relative position in the DOM tree\n return undefined;\n};\n\n\n/**\n * Check the number of occurrences of a specific element in an array.\n *\n * @param {Array} array - The array in which occurrences are to be counted.\n * @param {*} element - The element to be counted within the array.\n * @returns {number} - The count of occurrences of the specified element in the array.\n */\nexport const checkOccurrence = (array, element) => {\n let counter = 0;\n for (let i = 0; i < array.length; i++) {\n if (array[i] == element) {\n counter++;\n }\n }\n return counter;\n};\n\n\n/**\n * Create an HTML element from a string of HTML.\n *\n * @param {string} thehtml - The string of HTML to be converted into an HTML element.\n * @returns {HTMLElement | null} - The HTML element created from the provided HTML string. Returns `null` if the element couldn't be created.\n */\nexport const createNode = (thehtml) => {\n const fragment = document.createRange().createContextualFragment(thehtml);\n return fragment.firstElementChild;\n};\n\n\n\nexport const debugLog = (options, text) => {\n\tif (options.debug) console.log(text);\n}\n\n","import { loadResource } from '../helpers';\nimport { pluginPath } from '../helpers';\n\n/**\n * Retrieves and loads CSS stylesheets based on the provided options and ES5 filename.\n *\n * @param {Object} options - Configuration options for loading CSS.\n * @param {string} fileName - The filename of the script.\n */\n\nexport const getAndLoadCSS = (options, fileName) => {\n\tlet thePath = pluginPath(fileName);\n\tlet pluginBaseName = fileName.replace(/\\.[^/.]+$/, \"\");\n\n\tlet AppearanceStylePath = options.csspath.appearance ? options.csspath.appearance : null || `${thePath}${pluginBaseName}.css` || `plugin/${pluginBaseName}/${pluginBaseName}.css`\n\tlet AnimateCSSPath = !options.compatibility ? options.animatecsspath.link : options.animatecsspath.compat;\n\n\tif (options.debug) {\n\t\tconsole.log(`Paths:`);\n\t\tconsole.log(` - Plugin path = ${thePath}`);\n\t\tconsole.log(` - Appearance CSS path = ${AppearanceStylePath}`);\n\t\tconsole.log(` - AnimateCSS CSS path = ${AnimateCSSPath}`);\n\t}\n\n\tloadResource(AnimateCSSPath, 'stylesheet', function () {\n\t\tloadResource(AppearanceStylePath, 'stylesheet');\n\t});\n\n}","import { copyDataAttributes } from '../helpers';\n\n/**\n * Hoist a list item's appearance to its parent element's appearance.\n *\n * @param {HTMLElement} from - The list item element.\n * @returns {undefined}\n */\nconst hoistAppearance = (from, baseclass) => {\n\tlet to = from.parentNode;\n\tif (!to) return;\n \n\tfor (const sibling of to.children) {\n\t if (sibling !== from && sibling.dataset.appearParent) return;\n\t}\n \n\tto.classList = from.classList;\n\tcopyDataAttributes(from, to, \"data-appear-parent\");\n\tto.innerHTML = from.innerHTML;\n\tto.classList.add(baseclass);\n};\n\n\n/**\n * Fix list items that were changed by Quarto.\n *\n * This function is designed for use with Quarto and handles the conversion of list items\n * with Appearance classes to their parent elements when a manual attribute is present.\n * It also provides automatic conversion for list items that directly contain spans, which\n * is related to Quarto's wrapping of list content in a span.\n *\n * @param {HTMLElement} appearance - The list item element whose appearance will be converted.\n * @param {Object} options - An options object that controls the conversion behavior.\n * @param {boolean} options.appearparents - If `true`, automatic conversion of list items with spans is enabled.\n * @returns {undefined}\n */\nexport const fixListItem = (appearance, options, names) => {\n\n\tlet baseclass = names.baseclass\n\tif (appearance.hasAttribute(\"data-appear-parent\")) {\n\t\thoistAppearance(appearance, baseclass);\n\t}\n\n\tif (options.appearparents) {\n\t\tif (appearance.parentNode && appearance.parentNode.tagName) {\n\t\t\tif (appearance.tagName == \"SPAN\" && appearance.parentNode.tagName == \"LI\") {\n\t\t\t\tlet spanLength = String(appearance.outerHTML).length;\n\t\t\t\tlet liContentLength = String(appearance.parentNode.innerHTML).length;\n\t\t\t\tif (spanLength == liContentLength) {\n\t\t\t\t\thoistAppearance(appearance);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","/**\n * Selects elements with a specified class that are not nested inside an element with another specified class.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} excludeClass - The class name to exclude elements nested inside it.\n * @param {Element} el - The element to find the target elements in.\n * @returns {Element[]} - Array of selected elements.\n */\nconst elemsNotInClass = (targetClass, excludeClass, el) => \n Array.from(el.querySelectorAll(`.${targetClass}`))\n .filter(s => !s.closest(`.${excludeClass}`));\n\n/**\n * Selects elements with a specified class that are nested inside an element with another specified class.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} parentClass - The class name of the parent to find elements in.\n * @param {Element} el - The element to find the target elements in.\n * @returns {Element[]} - Array of selected elements.\n */\nconst elemsInClass = (targetClass, parentClass, el) =>\n Array.from(el.querySelectorAll(`.${targetClass}`))\n .filter(s => s.closest(`.${parentClass}`) === el);\n\n/**\n * Extracts groups of elements with a specified class from the provided section element.\n * Groups are formed based on nesting inside elements with another specified class.\n * @param {Element} section - The section to extract data from.\n * @returns {Element[][]} - Nested arrays of selected elements.\n */\n\n\n/**\n * Extracts groups of elements with a specified class from the provided section element.\n * Groups are formed based on nesting inside elements with another specified class.\n * @param {Element} section - The section to extract data from.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} groupClass - The class name of the parent to find elements in.\n * @returns {Element[][]} - Nested arrays of selected elements.\n */\nexport const getAppearanceArrays = (section, targetClass, groupClass) => {\n const result = [\n elemsNotInClass(targetClass, groupClass, section), \n ...Array.from(section.querySelectorAll(`.${groupClass}`))\n .map(frag => elemsInClass(targetClass, groupClass, frag))\n ];\n\n\tif (result.some(group => group.length > 0)) {\n return result;\n } else {\n\t\treturn false;\n\t}\n};\n","/**\n * Derives slide from and to from the event object.\n *\n * @param {Object} event - The event object containing slide transition details.\n * @returns {Object} - An object containing references to the \"from\" and \"to\" slides.\n */\nconst fromTo = (event) => {\n\tlet slides = {};\n\tslides.from = event.fromSlide || event.previousSlide || null;\n\tslides.to = event.toSlide || event.currentSlide || null;\n\treturn slides;\n};\n\n/**\n * A function that determines the appearance event for a given slide.\n *\n * This function checks the `data-appearevent` attribute of the slide and the `options.appearevent` parameter.\n * If `data-appearevent` is set to \"auto\", it is converted to \"autoanimate\". If `options.appearevent` is \"auto\", it is also converted to \"autoanimate\".\n * The function returns the appearance event, prioritizing `data-appearevent` over `options.appearevent`.\n *\n * @param {HTMLElement} toSlide - The slide for which the appearance event is determined.\n * @param {Object} options - An object containing options for the appearance event.\n * @param {string} options.appearevent - The appearance event option provided in the `options` object.\n *\n * @returns {string} - The determined appearance event for the slide, either from `data-appearevent` or `options.appearevent`.\n */\nconst slideAppearevent = (toSlide, options) => {\n\n\tif (toSlide.dataset.appearevent && toSlide.dataset.appearevent === \"auto\" ) {\n\t\ttoSlide.dataset.appearevent = \"autoanimate\"\n\t}\n\tif (options.appearevent == \"auto\") {options.appearevent = \"autoanimate\"}\n\treturn toSlide.dataset.appearevent ? toSlide.dataset.appearevent : options.appearevent;\n};\n\n/**\n * Remove the 'data-appearance-can-start' attribute from the 'from' slide if the 'hideagain' option is enabled.\n *\n * @param {HTMLElement} slides - The container element for the slides.\n * @param {Object} options - An object containing configuration options.\n * @param {boolean} options.hideagain - A flag indicating whether to remove the attribute when 'hideagain' is true.\n */\nconst removeStartAttribute = (slides, options) => {\n\tif (options.hideagain) {\n\t\tif (slides.from && slides.from.dataset.appearanceCanStart ) {\n\t\t\tslides.from.removeAttribute('data-appearance-can-start');\n\t\t}\n\t}\n};\n\n\n/**\n * Turn off slide appearances when transitioning from one slide to another if the 'hideagain' option is enabled.\n *\n * @param {HTMLElement} slides - The container element for the slides.\n * @param {Object} options - An object containing configuration options.\n * @param {string} names.animatecss - The CSS selector for animated elements.\n */\nconst turnOffSlideAppearances = (slides, options, names) => {\n\tif (options.hideagain) {\n\t\tlet fromAppearances = slides.from.querySelectorAll(names.animatecss);\n\t\tfromAppearances.forEach( appearance => {\n\t\t\tappearance.classList.remove('animationended');\n\t\t} );\n\t\t// Remove visible class from fragments when moving away from that slide\n\t\tlet fromFragments = slides.from.querySelectorAll(`.fragment.visible`);\n\t\tif (fromFragments) {\n\t\t\tfromFragments.forEach(fragment => {\n\t\t\t\tfragment.classList.remove('visible');\n\t\t\t})\n\t\t}\n\t}\n};\n\n\n/**\n * Handles the showing and hiding of slides based on the provided event and options.\n *\n * @param {Object} event - The event object containing slide transition details.\n * @param {Object} options - An object containing configurations for slide appearance management.\n */\nexport const showHideSlide = (event, options, names, vars) => {\n\n\tlet view = vars.deck.getConfig().view;\n\tlet etype = event.type;\n\tlet slides = fromTo(event);\n\n\tif (slides.to) {\n\n\t\tif (etype == \"ready\") {\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t}\n\n\t\tlet appearevent = slideAppearevent(slides.to, options)\n\n\t\tif (etype == appearevent || (etype == \"slidetransitionend\" && appearevent == \"autoanimate\")) {\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t}\n\n\t\t// Add experimental Reader mode compatibility, does not have a slidetransitionend event yet\n\t\tif (view == \"scroll\" && etype == 'slidechanged' ) {\n\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tturnOffSlideAppearances(slides, options, names);\n\n\t\t\t// Add delay to allow for scroll animation to finish\n\t\t\tsetTimeout(() => {\n\t\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t\t}, options.delay)\n\t\t}\n\n\n\t\tif (etype == \"slidetransitionend\" ) {\n\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tturnOffSlideAppearances(slides, options, names);\n\t\t}\n\t\t\n\t\tif (etype == 'slidechanged' && document.body.dataset.exitoverview) {\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\n\t\t} else if (etype == 'overviewhidden' ) {\n\n\t\t\tdocument.body.dataset.exitoverview = true;\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tdocument.body.removeAttribute('data-exitoverview')\n\t\t\t}, 500)\n\n\t\t\tif (event.currentSlide ) {\n\t\t\t\tremoveStartAttribute(slides, options);\n\t\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t\t}\n\t\t}\n\t}\n}","import { debugLog, mergeDeep, doneLoading, isStack } from './helpers';\n\nimport {getAndLoadCSS} from './functions/get-load-css.js';\nimport {addAutoAnimation} from './functions/add-auto-animation.js';\nimport {fixListItem} from './functions/fix-list-item';\nimport {addBaseClass} from './functions/add-base-class.js';\nimport {addDelay} from './functions/add-delay.js';\nimport {getAppearanceArrays} from './functions/get-appearance-arrays.js';\nimport {convertToSpans} from './functions/convert-to-spans';\nimport {showHideSlide} from './functions/show-hide-slide.js';\n\n\nconst Plugin = () => {\n\n\tconst vars = {};\n\tvars.names = {};\n\tlet options = {};\n\n\t/**\n\t* Prepare the plugin to find Appearance elements\n\t* @param {Object} vars - The variables to be prepared.\n\t* @param {Object} names - The names to be prepared.\n\t* @param {Function} resolve - The callback function to be called when preparation is complete.\n\t* @throws {Error} Throws an error if the 'options' object is not defined.\n\t*/\n\tconst prepare = (options, vars, resolve) => {\n\n\t\tdebugLog(options, \"------------- Preloading -------------\");\n\n\t\tlet names = vars.names;\n\n\t\tgetAndLoadCSS(options, names.es5Filename);\n\n\t\tif (options.compatibility) {\n\t\t\tnames.animatecss = '.backInDown, .backInLeft, .backInRight, .backInUp, .bounceIn, .bounceInDown, .bounceInLeft, .bounceInRight, .bounceInUp, .fadeIn, .fadeInDown, .fadeInDownBig, .fadeInLeft, .fadeInLeftBig, .fadeInRight, .fadeInRightBig, .fadeInUp, .fadeInUpBig, .fadeInTopLeft, .fadeInTopRight, .fadeInBottomLeft, .fadeInBottomRight, .flipInX, .flipInY, .lightSpeedInRight, .lightSpeedInLeft, .rotateIn, .rotateInDownLeft, .rotateInDownRight, .rotateInUpLeft, .rotateInUpRight, .jackInTheBox, .rollIn, .zoomIn, .zoomInDown, .zoomInLeft, .zoomInRight, .zoomInUp, .slideInDown, .slideInLeft, .slideInRight, .slideInUp, .skidLeft, .skidLeftBig, .skidRight, .skidRightBig, .shrinkIn, .shrinkInBlur';\n\t\t\tnames.baseclass = options.compatibilitybaseclass\n\t\t}\n\n\t\tvars.appearances = Array.from(vars.slides.querySelectorAll(names.animatecss));\n\n\t\t// Go through each section to see if there are any (auto) selectors that need animation classes\n\t\tvars.regularSections.forEach(theSection => addAutoAnimation(theSection, options, vars));\n\n\t\tvars.appearances.forEach((theAppearance, index) => {\n\t\t\t// Fix any list item where the Appearance classes were moved to the span (Quarto does this)\n\t\t\tfixListItem(theAppearance, options, names);\n\n\t\t\t// Go through each appearance element and add the baseclass if it doesn't have it\n\t\t\taddBaseClass(theAppearance, names);\n\n\t\t\tif (theAppearance.hasAttribute('data-split')) {\n\t\t\t\tconvertToSpans(theAppearance, theAppearance.dataset.split);\n\t\t\t}\n\t\t});\n\n\t\tvars.regularSections.forEach((theSection, index) => {\n\t\t\t// Get all the Appearances in the section as separate arrays per delay loop\n\t\t\tlet appearanceArrays = getAppearanceArrays(theSection, names.baseclass, names.fragmentClass);\n\n\t\t\tif (appearanceArrays) {\n\t\t\t\tappearanceArrays.forEach((appearanceArray) => {\n\t\t\t\t\t// Add the delays to each appearance in the array\n\t\t\t\t\taddDelay(appearanceArray, options, names)\n\t\t\t\t})\n\t\t\t}\n\t\t});\n\n\t\tdoneLoading(resolve);\n\t}\n\n\t/**\n\t* The main function of the plugin\n\t* @param {object} deck - The deck object\n\t* @param {object} options - The options object\n\t* @param {string} es5Filename - The name of the file that will be used\n\t*/\n\tconst Appear = function (deck, options, es5Filename) {\n\n\t\tlet names = vars.names;\n\n\t\t// Set up names\n\t\tnames.baseclass = options.baseclass;\n\t\tnames.compatibilitybaseclass = options.compatibilitybaseclass;\n\t\tnames.fragmentSelector = \".fragment\";\n\t\tnames.fragmentClass = \"fragment\";\n\t\tnames.speedClasses = ['slower', 'slow', 'fast', 'faster'];\n\t\tnames.speedClasses.push(...names.speedClasses.map(speed => `animate__${speed}`));\n\t\tnames.animatecss = '[class^=\"animate__\"],[class*=\" animate__\"]';\n\t\tnames.es5Filename = es5Filename;\n\t\tnames.eventnames = ['ready', 'slidechanged', 'slidetransitionend', 'autoanimate', 'overviewhidden', 'scrolle'];\n\t\n\t\t// Set up variables\n\t\tvars.deck = deck;\n\t\tvars.dom = deck.getRevealElement();\n\t\tvars.viewport = deck.getViewportElement();\n\t\tvars.slides = deck.getSlidesElement();\n\n\t\tvars.sections = vars.slides.querySelectorAll('section');\n\t\tvars.fragments = vars.slides.querySelectorAll(names.fragmentSelector);\n\t\tvars.regularSections = Array.from(vars.sections).filter( section => !isStack(section));\n\n\t\tif( /receiver/i.test( window.location.search ) ) vars.viewport.classList.add('sv');\n\n\t\tnames.eventnames.forEach( (eventname) => deck.on( eventname, event => { showHideSlide(event, options, names, vars) } ) );\n\n\t\tvars.viewport.addEventListener(\"animationend\", (event) => {\n\t\t\tevent.target.classList.add('animationended');\n\t\t});\n\t\tvars.viewport.addEventListener(\"fragmenthidden\", (event) => {\n\t\t\tevent.fragment.classList.remove('animationended');\n\t\t\tevent.fragment.querySelectorAll('.animationended').forEach(el => {\n\t\t\t\tel.classList.remove('animationended');\n\t\t\t});\n\t\t});\n\n\t\treturn new Promise(resolve => {\n\t\t\tprepare(options, vars, resolve);\n\t\t\tdebugLog(options, \"---------- Done preloading ----------\");\n\t\t});\n\t};\n\n\n\t/**\n\t* Initialize the plugin\n\t* @param {object} deck - The deck object\n\t*/\n\tconst init = function (deck) {\n\n\t\tlet defaultOptions = {\n\t\t\tbaseclass: 'animate__animated',\n\t\t\thideagain: true,\n\t\t\tdelay: 300,\n\t\t\tdebug: false,\n\t\t\tappearevent: 'slidetransitionend',\n\t\t\tautoappear: false,\n\t\t\tautoelements: false,\n\t\t\tappearparents: false,\n\t\t\tcsspath: '',\n\t\t\tanimatecsspath: {\n\t\t\t\tlink : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css',\n\t\t\t\tcompat : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.compat.css',\n\t\t\t},\n\t\t\tcompatibility: false,\n\t\t\tcompatibilitybaseclass: 'animated'\n\t\t};\n\n\t\toptions = mergeDeep(defaultOptions, deck.getConfig().appearance || {});\n\n\t\treturn Appear(deck, options, \"appearance.js\");\n\t};\n\n\treturn { id: 'appearance', init: init };\n};\n\nexport default Plugin;","import { toJSONString } from '../helpers';\n\n\n/**\n * Adds automatic animations to elements within a section based on specified criteria.\n *\n * This function examines the provided section for attributes and options to determine\n * which classes should be added to its elements to enable automatic animations.\n *\n * @param {HTMLElement} section - The section element to which automatic animations will be applied.\n * @param {Object} options - The existing user options object\n * @param {Object} vars - The existing vars object\n * @returns {undefined}\n */\nexport const addAutoAnimation = (section, options, vars) => {\n\n\tlet sectionAutoSelectors = null;\n\n\tif (section.hasAttribute(\"data-autoappear\")) {\n\n\t\tlet sectDataAppear = section.dataset.autoappear;\n\n\t\tif (sectDataAppear == \"auto\" || sectDataAppear == \"\" || sectDataAppear.length < 1 || sectDataAppear == \"true\") {\n\t\t\t// This section should get the global autoappear classes on its objects\n\t\t\tsectionAutoSelectors = options.autoelements ? options.autoelements : null;\n\t\t} else {\n\t\t\t// This section should get the local autoappear classes on its objects\n\t\t\tsectionAutoSelectors = sectDataAppear;\n\t\t}\n\n\t} else if ( options.autoappear && options.autoelements ) {\n\t\t// This section should get the global autoappear classes on its objects\n\t\tsectionAutoSelectors = options.autoelements;\n\t}\n\n\tif (sectionAutoSelectors) {\n\n\t\tlet elementsToAnimate = JSON.parse(toJSONString(sectionAutoSelectors));\n\n\t\tObject.entries(elementsToAnimate).forEach(([selector, assignables]) => {\n\n\n\t\t\t// Exclude the elements from vars.appearances\n\t\t\tlet elements = Array.from(section.querySelectorAll(selector)).filter( element => !vars.appearances.includes(element) );\n\n\t\t\tif (elements.length) {\n\n\t\t\t\telements.forEach((element) => {\n\n\t\t\t\t\tvars.appearances.push(element)\n\n\t\t\t\t\tlet newClasses = [], newDelay = null, speedClass = false, elementSplit = null, containerDelay = null;\n\n\t\t\t\t\tif (Array.isArray(assignables)) {\n\n\t\t\t\t\t\tnewClasses = assignables[0].split(/[ ,]+/);\n\t\t\t\t\t\tnewDelay = assignables[1];\n\n\t\t\t\t\t} else if (typeof assignables == \"string\"){\n\n\t\t\t\t\t\tnewClasses = assignables.split(/[ ,]+/);\n\n\t\t\t\t\t} else if (assignables.constructor === Object) {\n\n\t\t\t\t\t\tif (assignables.class || assignables.animation) {\n\t\t\t\t\t\t\tlet animationClass = assignables.animation ? assignables.animation : assignables.class;\n\t\t\t\t\t\t\tnewClasses = animationClass.split(/[ ,]+/);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.speed) {\n\t\t\t\t\t\t\tspeedClass = String(assignables.speed);\n\t\t\t\t\t\t\tif (!speedClass.includes(\"animate__\")) {\n\t\t\t\t\t\t\t\tspeedClass = `animate__${speedClass}`\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.delay) {\n\t\t\t\t\t\t\tnewDelay = String(assignables.delay);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.split) {\n\t\t\t\t\t\t\telementSplit = String(assignables.split);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables[\"container-delay\"]) {\n\t\t\t\t\t\t\tcontainerDelay = String(assignables[\"container-delay\"]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telement.classList.add(...newClasses);\n\t\t\t\t\tif (speedClass) { element.classList.add(speedClass)}\n\t\t\t\t\tif (newDelay) {element.dataset.delay = newDelay};\n\t\t\t\t\tif (elementSplit) {element.dataset.split = elementSplit};\n\t\t\t\t\tif (containerDelay) {element.dataset.containerDelay = containerDelay};\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n","/**\n * Adds a base class to an HTML element if it doesn't already have it.\n *\n * This function checks if the specified HTML element has the specified base class,\n * and if not, it adds the base class to the element's class list.\n *\n * @param {HTMLElement} appearance - The HTML element to which the base class should be added.\n * @param {Object} names - The existing 'names' object\n * @returns {undefined}\n */\n\nexport const addBaseClass = (appearance, names) => {\n\tif (!appearance.classList.contains(names.baseclass)) {\n\t\tappearance.classList.add(names.baseclass);\n\t}\n\tif (appearance.classList.contains(names.fragmentClass)) {\n\t\tappearance.classList.add('custom');\n\t}\n}\n","export const convertToSpans = (parent, kind) => {\n\n\tlet splitElements = false;\n\tlet joinChar = ' ';\n\n\tif (kind == \"words\") {\n\t\tsplitElements = parent.textContent.trim().split(/\\s+/);\n\t\t\n\t} else if (kind == \"letters\") {\n\t\tsplitElements = parent.textContent.trim().split('');\n\t\tjoinChar = '';\n\t}\n\n\tif (splitElements) {\n\t\tconst parentAnimateClasses = Array.from(parent.classList).filter(className => className.startsWith('animate__'));\n\t\n\t\tconst newHtml = splitElements.map((element, index) => {\n\t\t\tconst span = document.createElement('span');\n\t\t\tspan.textContent = element;\n\t\t\tif (element == \" \") {span.textContent = \"\\u00A0\"}\n\t\n\t\t\tif (parent.dataset.delay && index !== 0) {\n\t\t\t\tspan.dataset.delay = parent.dataset.delay\n\t\t\t}\n\n\t\t\tif (parent.dataset.containerDelay && index === 0) {\n\t\t\t\tspan.dataset.delay = parent.dataset.containerDelay\n\t\t\t}\n\t\n\t\t\tparent.classList.forEach(className => className.startsWith('animate__') && span.classList.add(className));\n\t\t\treturn span.outerHTML;\n\t\t\t\n\t\t}).join(joinChar);\n\t\n\t\tparentAnimateClasses.forEach(className => parent.classList.remove(className));\n\t\tparent.removeAttribute('data-delay');\n\t\tparent.removeAttribute('data-split');\n\t\tparent.removeAttribute('data-container-delay');\n\t\n\t\tparent.innerHTML = newHtml;\n\t}\n\n\n};","export const addDelay = (appearanceArray, options, names) => {\n\n let delay = 0;\n appearanceArray.forEach((appearance, index) => {\n\n if ((index == 0 && appearance.dataset.delay) || index !=0) {\n\n let elementDelay = options.delay;\n\n if (appearance.dataset && appearance.dataset.delay) {\n elementDelay = parseInt(appearance.dataset.delay);\n }\n\n delay = delay + elementDelay;\n\n appearance.style.setProperty('animation-delay', delay + \"ms\");\n appearance.removeAttribute('data-delay');\n }\n\n })\n\n}\n"],"names":["isObject","item","Array","isArray","mergeDeep","target","sources","length","source","shift","key","Object","assign","toJSONString","str","JSONString","replace","JSON","parse","e","isJSON","stringify","trim","charAt","loadResource","url","type","callback","resource","head","document","querySelector","createElement","src","rel","href","finish","call","onload","onreadystatechange","this","readyState","appendChild","debugLog","options","text","debug","console","log","getAndLoadCSS","fileName","thePath","path","pluginScript","getAttribute","slice","import","location","require","pathToFileURL","__filename","_documentCurrentScript","URL","baseURI","lastIndexOf","pluginPath","pluginBaseName","AppearanceStylePath","csspath","appearance","AnimateCSSPath","compatibility","animatecsspath","compat","link","hoistAppearance","from","baseclass","to","parentNode","sibling","children","dataset","appearParent","classList","copyDataAttributes","attributes","not","filter","nodeName","includes","forEach","nodeValue","setAttribute","innerHTML","add","elemsNotInClass","targetClass","excludeClass","el","querySelectorAll","s","closest","getAppearanceArrays","section","groupClass","result","map","frag","elemsInClass","parentClass","some","group","removeStartAttribute","slides","hideagain","appearanceCanStart","removeAttribute","turnOffSlideAppearances","names","animatecss","remove","fromFragments","fragment","Plugin","vars","prepare","resolve","es5Filename","compatibilitybaseclass","appearances","regularSections","theSection","addAutoAnimation","sectionAutoSelectors","hasAttribute","sectDataAppear","autoappear","autoelements","elementsToAnimate","entries","selector","assignables","elements","element","push","newClasses","newDelay","speedClass","elementSplit","containerDelay","split","constructor","class","animation","speed","String","delay","theAppearance","index","fixListItem","appearparents","tagName","outerHTML","addBaseClass","contains","fragmentClass","convertToSpans","parent","kind","splitElements","joinChar","textContent","parentAnimateClasses","className","startsWith","newHtml","span","join","appearanceArrays","appearanceArray","addDelay","elementDelay","parseInt","style","setProperty","setTimeout","doneLoading","Appear","deck","fragmentSelector","speedClasses","eventnames","dom","getRevealElement","viewport","getViewportElement","getSlidesElement","sections","fragments","isStack","childNodes","i","test","window","search","eventname","on","event","showHideSlide","view","getConfig","etype","fromSlide","previousSlide","toSlide","currentSlide","fromTo","appearevent","slideAppearevent","body","exitoverview","addEventListener","Promise","id","init"],"mappings":";;;;;;;;;;;;;;0SAKO,MAyDDA,EAAYC,GACTA,GAAwB,iBAATA,IAAsBC,MAAMC,QAAQF,GAS/CG,EAAYA,CAACC,KAAWC,KACpC,IAAKA,EAAQC,OAAQ,OAAOF,EAC5B,MAAMG,EAASF,EAAQG,QAEvB,GAAIT,EAASK,IAAWL,EAASQ,GAChC,IAAK,MAAME,KAAOF,EACbR,EAASQ,EAAOE,KACdL,EAAOK,IAAMC,OAAOC,OAAOP,EAAQ,CAAEK,CAACA,GAAM,CAAC,IAClDN,EAAUC,EAAOK,GAAMF,EAAOE,KAE9BC,OAAOC,OAAOP,EAAQ,CAAEK,CAACA,GAAMF,EAAOE,KAIzC,OAAON,EAAUC,KAAWC,EAAQ,EAmBxBO,EAAgBC,IAC5B,IAAIC,EAAa,GAajB,MAXmB,iBAARD,IAAkBA,EAAMA,EAAIE,QAAQ,QAAQ,KAAKA,QAAQ,QAAQ,MAG3ED,EA1GoBD,KACrB,IACC,OAAQG,KAAKC,MAAMJ,MAAUA,CAC7B,CAAC,MAAOK,GACR,OAAO,CACR,GAoGIC,CAAON,GACGA,EAEM,iBAARA,EACGG,KAAKI,UAAUP,EAAK,KAAM,GAEkB,MAA5CA,EAAIQ,OAAON,QAAQ,KAAM,KAAKO,OAAO,GAAaT,EAAIQ,OAAON,QAAQ,KAAM,KAAQ,IAAGF,EAAIQ,OAAON,QAAQ,KAAM,QAGvHD,CAAU,EAWLS,EAAeA,CAACC,EAAKC,EAAMC,KACvC,IACIC,EADAC,EAAOC,SAASC,cAAc,QAGrB,WAATL,GACFE,EAAWE,SAASE,cAAc,UAClCJ,EAASF,KAAO,kBAChBE,EAASK,IAAMR,GACG,eAATC,IACTE,EAAWE,SAASE,cAAc,QAClCJ,EAASM,IAAM,aACfN,EAASO,K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b7bbb7c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,21 +1,25 @@ "use strict"; -const { src, dest, watch, series, parallel } = require('gulp'), - pkg = require('./package.json'), - fs = require('fs'), - sass = require('gulp-sass')(require('sass')), - pug = require('gulp-pug'), - plumber = require('gulp-plumber'), - autoprefixer = require('gulp-autoprefixer'), - browserSync = require('browser-sync').create(), - {rollup} = require('rollup'), - babel = require('@rollup/plugin-babel').default, - commonjs = require('@rollup/plugin-commonjs'), - resolve = require('@rollup/plugin-node-resolve').default, - rename = require("gulp-rename"), - merge = require('merge-stream'), - header = require('gulp-header'), - del = require('del'); +const { src, dest, watch, series, parallel } = require('gulp'); + +const pkg = require('./package.json'); +const sass = require('gulp-sass')(require('sass')); + +const pug = require('gulp-pug'); +const plumber = require('gulp-plumber'); +const autoprefixer = require('gulp-autoprefixer'); +const browserSync = require('browser-sync').create(); + +const {rollup} = require('rollup'); +const babel = require('@rollup/plugin-babel').default; +const commonjs = require('@rollup/plugin-commonjs'); +const resolve = require('@rollup/plugin-node-resolve').default; +const terser = require('@rollup/plugin-terser'); + +const rename = require("gulp-rename"); +const merge = require('merge-stream'); +const header = require('gulp-header'); +const del = require('del'); const isProduction = process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'prod'; @@ -100,7 +104,7 @@ const cleandev = () => { const copydeps = () => { // Get the dependencies from package.json - let copydependencies = (JSON.parse(fs.readFileSync('./package.json'))).copydependencies; + let copydependencies = pkg.copydependencies; if ( JSON.stringify(copydependencies) === "{}" || JSON.stringify(copydependencies) === "[]" || !copydependencies ) { return src('.', {allowEmpty: true}); @@ -129,7 +133,8 @@ const pluginjs = () => { plugins: [ babel( babelConfig ), resolve(), - commonjs() + commonjs(), + terser() ] }).then( bundle => { cache.umd = bundle.cache; @@ -150,8 +155,6 @@ const pluginjs = () => { }); } - - const pluginstyles = () => { return ( src(`${sourcefolder}/plugin/css/plugin.scss`) @@ -214,7 +217,6 @@ const demofonts = () => { ) }; - // Browsersync Tasks const serve = (callback) => { browserSync.init({ @@ -227,7 +229,6 @@ const serve = (callback) => { callback(); } - const watchtask = (done) => { watch(`${sourcefolder}/**/*.pug`, demoviews); watch(`${sourcefolder}/demo/css/**/*.scss`, demostyles); diff --git a/package-lock.json b/package-lock.json index ac1c610..e37cb92 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,12 +13,12 @@ "reveal.js": "^4.6.0" }, "devDependencies": { - "@babel/preset-env": "^7.22.5", - "@rollup/plugin-babel": "^6.0.3", - "@rollup/plugin-commonjs": "^25.0.2", - "@rollup/plugin-node-resolve": "^15.1.0", + "@babel/preset-env": "^7.23.2", + "@rollup/plugin-babel": "^6.0.4", + "@rollup/plugin-commonjs": "^25.0.7", + "@rollup/plugin-node-resolve": "^15.2.3", + "@rollup/plugin-terser": "^0.4.4", "browser-sync": "^2.29.3", - "core-js": "^3.31.0", "del": "^5.1.0", "gulp": "^4.0.2", "gulp-autoprefixer": "^8.0.0", @@ -28,7 +28,7 @@ "gulp-rename": "^2.0.0", "gulp-sass": "^5.1.0", "merge-stream": "^2.0.0", - "rollup": "^2.79.1", + "rollup": "^4.2.0", "sass": "^1.63.6" } }, @@ -60,9 +60,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.5.tgz", - "integrity": "sha512-4Jc/YuIaYqKnDDz892kPIledykKg12Aw1PYX5i/TY28anJtacvM1Rrr8wbieB9GfEJwlzqT0hUEao0CxEebiDA==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.2.tgz", + "integrity": "sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ==", "dev": true, "engines": { "node": ">=6.9.0" @@ -104,6 +104,7 @@ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, + "peer": true, "dependencies": { "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", @@ -139,39 +140,36 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.5.tgz", - "integrity": "sha512-Ji+ywpHeuqxB8WDxraCiqR0xfhYjiDE/e6k7FuIaANnoOFxAHskHChz4vA1mJC9Lbm01s1PVAGhQY4FUKSkGZw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", + "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.22.5", - "@babel/helper-validator-option": "^7.22.5", - "browserslist": "^4.21.3", + "@babel/compat-data": "^7.22.9", + "@babel/helper-validator-option": "^7.22.15", + "browserslist": "^4.21.9", "lru-cache": "^5.1.1", - "semver": "^6.3.0" + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.5.tgz", - "integrity": "sha512-xkb58MyOYIslxu3gKmVXmjTtUPvBU4odYzbiIQbWwLKIHCsx6UGZGX6F1IznMFVnDdirseUZopzN+ZRt8Xb33Q==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.15.tgz", + "integrity": "sha512-jKkwA59IXcvSaiK2UN45kKwSC9o+KuoXsBDvHvU/7BecYIp8GQ2UwrVvFgJASUT+hBnwJx6MhvMCuMzwZZ7jlg==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", "@babel/helper-environment-visitor": "^7.22.5", "@babel/helper-function-name": "^7.22.5", - "@babel/helper-member-expression-to-functions": "^7.22.5", + "@babel/helper-member-expression-to-functions": "^7.22.15", "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.9", "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.5", - "semver": "^6.3.0" + "@babel/helper-split-export-declaration": "^7.22.6", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -198,20 +196,19 @@ } }, "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.0.tgz", - "integrity": "sha512-RnanLx5ETe6aybRi1cO/edaRH+bNYWaryCEmjDDYyNr4wnSzyOp8T0dWipmqVHKEY3AbVKUom50AKSlj1zmKbg==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.3.tgz", + "integrity": "sha512-WBrLmuPP47n7PNwsZ57pqam6G/RGo1vw/87b0Blc53tZNGZ4x7YvZ6HgQe2vo1W/FR20OgjeZuGXzudPiXHFug==", "dev": true, "dependencies": { - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-plugin-utils": "^7.22.5", "debug": "^4.1.1", "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" + "resolve": "^1.14.2" }, "peerDependencies": { - "@babel/core": "^7.4.0-0" + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "node_modules/@babel/helper-environment-visitor": { @@ -249,46 +246,46 @@ } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.22.5.tgz", - "integrity": "sha512-aBiH1NKMG0H2cGZqspNvsaBe6wNGjbJjuLy29aU+eDZjSbbN53BaxlpB02xm9v34pLTZ1nIQPFYn2qMZoa5BQQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz", + "integrity": "sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", - "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.5.tgz", - "integrity": "sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz", + "integrity": "sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.20" }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-optimise-call-expression": { @@ -313,15 +310,14 @@ } }, "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.5.tgz", - "integrity": "sha512-cU0Sq1Rf4Z55fgz7haOakIyM7+x/uCFwXpLPaeRzfoUtAEAuUZjZvFPjL/rk5rW693dIgn2hng1W7xbT7lWT4g==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz", + "integrity": "sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-wrap-function": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-wrap-function": "^7.22.20" }, "engines": { "node": ">=6.9.0" @@ -331,20 +327,20 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.5.tgz", - "integrity": "sha512-aLdNM5I3kdI/V9xGNyKSF3X/gTyMUBohTZ+/3QdQKAA9vxIiy12E+8E2HoOP1/DjeqU+g6as35QHJNMDDYpuCg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz", + "integrity": "sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-member-expression-to-functions": "^7.22.5", - "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-member-expression-to-functions": "^7.22.15", + "@babel/helper-optimise-call-expression": "^7.22.5" }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-simple-access": { @@ -402,24 +398,23 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", - "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", + "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.5.tgz", - "integrity": "sha512-bYqLIBSEshYcYQyfks8ewYA8S30yaGSeRslcvKMvoUk6HHPySbxHq9YRi6ghhzEU+yhQv9bP/jXnygkStOcqZw==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.20.tgz", + "integrity": "sha512-pms/UwkOpnQe/PDAEdV/d7dVCoBbB+R4FvYoHGZz+4VPcg7RtYy2KP7S2lbuWM6FCSgob5wshfGESbC/hzNXZw==", "dev": true, "dependencies": { "@babel/helper-function-name": "^7.22.5", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/types": "^7.22.19" }, "engines": { "node": ">=6.9.0" @@ -467,9 +462,9 @@ } }, "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.22.5.tgz", - "integrity": "sha512-NP1M5Rf+u2Gw9qfSO4ihjcTGW5zXTi36ITLd4/EoAcEhIZ0yjMqmftDNl3QC19CX7olhrjpyU454g/2W7X0jvQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.22.15.tgz", + "integrity": "sha512-FB9iYlz7rURmRJyXRKEnalYPPdn87H5no108cyuQQyMwlpJ2SJtpIUBI27kdTin956pz+LPypkPVPUTlxOmrsg==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5" @@ -482,14 +477,14 @@ } }, "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.22.5.tgz", - "integrity": "sha512-31Bb65aZaUwqCbWMnZPduIZxCBngHFlzyN6Dq6KAJjtx+lx6ohKHubc61OomYi7XwVD4Ol0XCVz4h+pYFR048g==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.22.15.tgz", + "integrity": "sha512-Hyph9LseGvAeeXzikV88bczhsrLrIZqDPxO+sSmAunMPaGrBGhfMWzCPYTtiW9t+HzSE2wtV8e5cc5P6r1xMDQ==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/plugin-transform-optional-chaining": "^7.22.5" + "@babel/plugin-transform-optional-chaining": "^7.22.15" }, "engines": { "node": ">=6.9.0" @@ -510,22 +505,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-unicode-property-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", - "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-async-generators": { "version": "7.8.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", @@ -777,14 +756,14 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.22.5.tgz", - "integrity": "sha512-gGOEvFzm3fWoyD5uZq7vVTD57pPJ3PczPUD/xCFGjzBpUosnklmXyKnGQbbbGs1NPNPskFex0j93yKbHt0cHyg==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.2.tgz", + "integrity": "sha512-BBYVGxbDVHfoeXbOwcagAkOQAm9NxoTdMGfTqghu1GrvadSaw6iW3Je6IcL5PNOw8VwjxqBECXy50/iCQSY/lQ==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-remap-async-to-generator": "^7.22.5", + "@babel/helper-remap-async-to-generator": "^7.22.20", "@babel/plugin-syntax-async-generators": "^7.8.4" }, "engines": { @@ -827,9 +806,9 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.22.5.tgz", - "integrity": "sha512-EcACl1i5fSQ6bt+YGuU/XGCeZKStLmyVGytWkpyhCLeQVA0eu6Wtiw92V+I1T/hnezUv7j74dA/Ro69gWcU+hg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.0.tgz", + "integrity": "sha512-cOsrbmIOXmf+5YbL99/S49Y3j46k/T16b9ml8bm9lP6N9US5iQ2yBK7gpui1pg0V/WMcXdkfKbTb7HXq9u+v4g==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5" @@ -858,12 +837,12 @@ } }, "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.22.5.tgz", - "integrity": "sha512-SPToJ5eYZLxlnp1UzdARpOGeC2GbHvr9d/UV0EukuVx8atktg194oe+C5BqQ8jRTkgLRVOPYeXRSBg1IlMoVRA==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.22.11.tgz", + "integrity": "sha512-GMM8gGmqI7guS/llMFk1bJDkKfn3v3C4KHK9Yg1ey5qcHcOlKb0QvcMrgzvxo+T03/4szNh5lghY+fEC98Kq9g==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-create-class-features-plugin": "^7.22.11", "@babel/helper-plugin-utils": "^7.22.5", "@babel/plugin-syntax-class-static-block": "^7.14.5" }, @@ -875,19 +854,19 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.22.5.tgz", - "integrity": "sha512-2edQhLfibpWpsVBx2n/GKOz6JdGQvLruZQfGr9l1qes2KQaWswjBzhQF7UDUZMNaMMQeYnQzxwOMPsbYF7wqPQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.22.15.tgz", + "integrity": "sha512-VbbC3PGjBdE0wAWDdHM9G8Gm977pnYI0XpqMd6LrKISj8/DJXEsWqgRuTYaNE9Bv0JGhTZUzHDlMk18IpOuoqw==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-compilation-targets": "^7.22.5", + "@babel/helper-compilation-targets": "^7.22.15", "@babel/helper-environment-visitor": "^7.22.5", "@babel/helper-function-name": "^7.22.5", "@babel/helper-optimise-call-expression": "^7.22.5", "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.9", + "@babel/helper-split-export-declaration": "^7.22.6", "globals": "^11.1.0" }, "engines": { @@ -914,9 +893,9 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.22.5.tgz", - "integrity": "sha512-GfqcFuGW8vnEqTUBM7UtPd5A4q797LTvvwKxXTgRsFjoqaJiEg9deBG6kWeQYkVEL569NpnmpC0Pkr/8BLKGnQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.0.tgz", + "integrity": "sha512-vaMdgNXFkYrB+8lbgniSYWHsgqK5gjaMNcc84bMIOMRLH0L9AqYq3hwMdvnyqj1OPqea8UtjPEuS/DCenah1wg==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5" @@ -960,9 +939,9 @@ } }, "node_modules/@babel/plugin-transform-dynamic-import": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.22.5.tgz", - "integrity": "sha512-0MC3ppTB1AMxd8fXjSrbPa7LT9hrImt+/fcj+Pg5YMD7UQyWp/02+JWpdnCymmsXwIx5Z+sYn1bwCn4ZJNvhqQ==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.22.11.tgz", + "integrity": "sha512-g/21plo58sfteWjaO0ZNVb+uEOkJNjAaHhbejrnBmu011l/eNDScmkbjCC3l4FKb10ViaGU4aOkFznSu2zRHgA==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -992,9 +971,9 @@ } }, "node_modules/@babel/plugin-transform-export-namespace-from": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.22.5.tgz", - "integrity": "sha512-X4hhm7FRnPgd4nDA4b/5V280xCx6oL7Oob5+9qVS5C13Zq4bh1qq7LU0GgRU6b5dBWBvhGaXYVB4AcN6+ol6vg==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.22.11.tgz", + "integrity": "sha512-xa7aad7q7OiT8oNZ1mU7NrISjlSkVdMbNxn9IuLZyL9AJEhs1Apba3I+u5riX1dIkdptP5EKDG5XDPByWxtehw==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1008,9 +987,9 @@ } }, "node_modules/@babel/plugin-transform-for-of": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.22.5.tgz", - "integrity": "sha512-3kxQjX1dU9uudwSshyLeEipvrLjBCVthCgeTp6CzE/9JYrlAIaeekVxRpCWsDDfYTfRZRoCeZatCQvwo+wvK8A==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.22.15.tgz", + "integrity": "sha512-me6VGeHsx30+xh9fbDLLPi0J1HzmeIIyenoOQHuw2D4m2SAU3NrspX5XxJLBpqn5yrLzrlw2Iy3RA//Bx27iOA==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5" @@ -1040,9 +1019,9 @@ } }, "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.22.5.tgz", - "integrity": "sha512-DuCRB7fu8MyTLbEQd1ew3R85nx/88yMoqo2uPSjevMj3yoN7CDM8jkgrY0wmVxfJZyJ/B9fE1iq7EQppWQmR5A==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.22.11.tgz", + "integrity": "sha512-CxT5tCqpA9/jXFlme9xIBCc5RPtdDq3JpkkhgHQqtDdiTnTI0jtZ0QzXhr5DILeYifDPp2wvY2ad+7+hLMW5Pw==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1071,9 +1050,9 @@ } }, "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.22.5.tgz", - "integrity": "sha512-MQQOUW1KL8X0cDWfbwYP+TbVbZm16QmQXJQ+vndPtH/BoO0lOKpVoEDMI7+PskYxH+IiE0tS8xZye0qr1lGzSA==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.22.11.tgz", + "integrity": "sha512-qQwRTP4+6xFCDV5k7gZBF3C31K34ut0tbEcTKxlX/0KXxm9GLcO14p570aWxFvVzx6QAfPgq7gaeIHXJC8LswQ==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1102,12 +1081,12 @@ } }, "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.22.5.tgz", - "integrity": "sha512-R+PTfLTcYEmb1+kK7FNkhQ1gP4KgjpSO6HfH9+f8/yfp2Nt3ggBjiVpRwmwTlfqZLafYKJACy36yDXlEmI9HjQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.23.0.tgz", + "integrity": "sha512-xWT5gefv2HGSm4QHtgc1sYPbseOyf+FFDo2JbpE25GWl5BqTGO9IMwTYJRoIdjsF85GE+VegHxSCUt5EvoYTAw==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-module-transforms": "^7.23.0", "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { @@ -1118,12 +1097,12 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.22.5.tgz", - "integrity": "sha512-B4pzOXj+ONRmuaQTg05b3y/4DuFz3WcCNAXPLb2Q0GT0TrGKGxNKV4jwsXts+StaM0LQczZbOpj8o1DLPDJIiA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.0.tgz", + "integrity": "sha512-32Xzss14/UVc7k9g775yMIvkVK8xwKE0DPdP5JTapr3+Z9w4tzeOuLNY6BXDQR6BdnzIlXnCGAzsk/ICHBLVWQ==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-module-transforms": "^7.23.0", "@babel/helper-plugin-utils": "^7.22.5", "@babel/helper-simple-access": "^7.22.5" }, @@ -1135,15 +1114,15 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.22.5.tgz", - "integrity": "sha512-emtEpoaTMsOs6Tzz+nbmcePl6AKVtS1yC4YNAeMun9U8YCsgadPNxnOPQ8GhHFB2qdx+LZu9LgoC0Lthuu05DQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.0.tgz", + "integrity": "sha512-qBej6ctXZD2f+DhlOC9yO47yEYgUh5CZNz/aBoH4j/3NOlRfJXJbY7xDQCqQVf9KbrqGzIWER1f23doHGrIHFg==", "dev": true, "dependencies": { "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-module-transforms": "^7.23.0", "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5" + "@babel/helper-validator-identifier": "^7.22.20" }, "engines": { "node": ">=6.9.0" @@ -1200,9 +1179,9 @@ } }, "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.22.5.tgz", - "integrity": "sha512-6CF8g6z1dNYZ/VXok5uYkkBBICHZPiGEl7oDnAx2Mt1hlHVHOSIKWJaXHjQJA5VB43KZnXZDIexMchY4y2PGdA==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.22.11.tgz", + "integrity": "sha512-YZWOw4HxXrotb5xsjMJUDlLgcDXSfO9eCmdl1bgW4+/lAGdkjaEvOnQ4p5WKKdUgSzO39dgPl0pTnfxm0OAXcg==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1216,9 +1195,9 @@ } }, "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.22.5.tgz", - "integrity": "sha512-NbslED1/6M+sXiwwtcAB/nieypGw02Ejf4KtDeMkCEpP6gWFMX1wI9WKYua+4oBneCCEmulOkRpwywypVZzs/g==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.22.11.tgz", + "integrity": "sha512-3dzU4QGPsILdJbASKhF/V2TVP+gJya1PsueQCxIPCEcerqF21oEcrob4mzjsp2Py/1nLfF5m+xYNMDpmA8vffg==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1232,16 +1211,16 @@ } }, "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.22.5.tgz", - "integrity": "sha512-Kk3lyDmEslH9DnvCDA1s1kkd3YWQITiBOHngOtDL9Pt6BZjzqb6hiOlb8VfjiiQJ2unmegBqZu0rx5RxJb5vmQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.22.15.tgz", + "integrity": "sha512-fEB+I1+gAmfAyxZcX1+ZUwLeAuuf8VIg67CTznZE0MqVFumWkh8xWtn58I4dxdVf080wn7gzWoF8vndOViJe9Q==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.22.5", - "@babel/helper-compilation-targets": "^7.22.5", + "@babel/compat-data": "^7.22.9", + "@babel/helper-compilation-targets": "^7.22.15", "@babel/helper-plugin-utils": "^7.22.5", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.22.5" + "@babel/plugin-transform-parameters": "^7.22.15" }, "engines": { "node": ">=6.9.0" @@ -1267,9 +1246,9 @@ } }, "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.22.5.tgz", - "integrity": "sha512-pH8orJahy+hzZje5b8e2QIlBWQvGpelS76C63Z+jhZKsmzfNaPQ+LaW6dcJ9bxTpo1mtXbgHwy765Ro3jftmUg==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.22.11.tgz", + "integrity": "sha512-rli0WxesXUeCJnMYhzAglEjLWVDF6ahb45HuprcmQuLidBJFWjNnOzssk2kuc6e33FlLaiZhG/kUIzUMWdBKaQ==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1283,9 +1262,9 @@ } }, "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.22.5.tgz", - "integrity": "sha512-AconbMKOMkyG+xCng2JogMCDcqW8wedQAqpVIL4cOSescZ7+iW8utC6YDZLMCSUIReEA733gzRSaOSXMAt/4WQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.0.tgz", + "integrity": "sha512-sBBGXbLJjxTzLBF5rFWaikMnOGOk/BmK6vVByIdEggZ7Vn6CvWXZyRkkLFK6WE0IF8jSliyOkUN6SScFgzCM0g==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1300,9 +1279,9 @@ } }, "node_modules/@babel/plugin-transform-parameters": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.22.5.tgz", - "integrity": "sha512-AVkFUBurORBREOmHRKo06FjHYgjrabpdqRSwq6+C7R5iTCZOsM4QbcB27St0a4U6fffyAOqh3s/qEfybAhfivg==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.22.15.tgz", + "integrity": "sha512-hjk7qKIqhyzhhUvRT683TYQOFa/4cQKwQy7ALvTpODswN40MljzNDa0YldevS6tGbxwaEKVn502JmY0dP7qEtQ==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5" @@ -1331,13 +1310,13 @@ } }, "node_modules/@babel/plugin-transform-private-property-in-object": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.22.5.tgz", - "integrity": "sha512-/9xnaTTJcVoBtSSmrVyhtSvO3kbqS2ODoh2juEU72c3aYonNF0OMGiaz2gjukyKM2wBBYJP38S4JiE0Wfb5VMQ==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.22.11.tgz", + "integrity": "sha512-sSCbqZDBKHetvjSwpyWzhuHkmW5RummxJBVbYLkGkaiTOWGxml7SXt0iWa03bzxFIx7wOj3g/ILRd0RcJKBeSQ==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-create-class-features-plugin": "^7.22.11", "@babel/helper-plugin-utils": "^7.22.5", "@babel/plugin-syntax-private-property-in-object": "^7.14.5" }, @@ -1364,13 +1343,13 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.22.5.tgz", - "integrity": "sha512-rR7KePOE7gfEtNTh9Qw+iO3Q/e4DEsoQ+hdvM6QUDH7JRJ5qxq5AA52ZzBWbI5i9lfNuvySgOGP8ZN7LAmaiPw==", + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.22.10.tgz", + "integrity": "sha512-F28b1mDt8KcT5bUyJc/U9nwzw6cV+UmTeRlXYIl2TNqMMJif0Jeey9/RQ3C4NOd2zp0/TRsDns9ttj2L523rsw==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", - "regenerator-transform": "^0.15.1" + "regenerator-transform": "^0.15.2" }, "engines": { "node": ">=6.9.0" @@ -1471,9 +1450,9 @@ } }, "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.22.5.tgz", - "integrity": "sha512-biEmVg1IYB/raUO5wT1tgfacCef15Fbzhkx493D3urBI++6hpJ+RFG4SrWMn0NEZLfvilqKf3QDrRVZHo08FYg==", + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.22.10.tgz", + "integrity": "sha512-lRfaRKGZCBqDlRU3UIFovdp9c9mEvlylmpod0/OatICsSfuQ9YFthRo1tpTkGsklEefZdqlEFdY4A2dwTb6ohg==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5" @@ -1534,17 +1513,17 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.22.5.tgz", - "integrity": "sha512-fj06hw89dpiZzGZtxn+QybifF07nNiZjZ7sazs2aVDcysAZVGjW7+7iFYxg6GLNM47R/thYfLdrXc+2f11Vi9A==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.2.tgz", + "integrity": "sha512-BW3gsuDD+rvHL2VO2SjAUNTBe5YrjsTiDyqamPDWY723na3/yPQ65X5oQkFVJZ0o50/2d+svm1rkPoJeR1KxVQ==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.22.5", - "@babel/helper-compilation-targets": "^7.22.5", + "@babel/compat-data": "^7.23.2", + "@babel/helper-compilation-targets": "^7.22.15", "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-option": "^7.22.5", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.22.5", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.22.5", + "@babel/helper-validator-option": "^7.22.15", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.22.15", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.22.15", "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", @@ -1565,60 +1544,60 @@ "@babel/plugin-syntax-top-level-await": "^7.14.5", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", "@babel/plugin-transform-arrow-functions": "^7.22.5", - "@babel/plugin-transform-async-generator-functions": "^7.22.5", + "@babel/plugin-transform-async-generator-functions": "^7.23.2", "@babel/plugin-transform-async-to-generator": "^7.22.5", "@babel/plugin-transform-block-scoped-functions": "^7.22.5", - "@babel/plugin-transform-block-scoping": "^7.22.5", + "@babel/plugin-transform-block-scoping": "^7.23.0", "@babel/plugin-transform-class-properties": "^7.22.5", - "@babel/plugin-transform-class-static-block": "^7.22.5", - "@babel/plugin-transform-classes": "^7.22.5", + "@babel/plugin-transform-class-static-block": "^7.22.11", + "@babel/plugin-transform-classes": "^7.22.15", "@babel/plugin-transform-computed-properties": "^7.22.5", - "@babel/plugin-transform-destructuring": "^7.22.5", + "@babel/plugin-transform-destructuring": "^7.23.0", "@babel/plugin-transform-dotall-regex": "^7.22.5", "@babel/plugin-transform-duplicate-keys": "^7.22.5", - "@babel/plugin-transform-dynamic-import": "^7.22.5", + "@babel/plugin-transform-dynamic-import": "^7.22.11", "@babel/plugin-transform-exponentiation-operator": "^7.22.5", - "@babel/plugin-transform-export-namespace-from": "^7.22.5", - "@babel/plugin-transform-for-of": "^7.22.5", + "@babel/plugin-transform-export-namespace-from": "^7.22.11", + "@babel/plugin-transform-for-of": "^7.22.15", "@babel/plugin-transform-function-name": "^7.22.5", - "@babel/plugin-transform-json-strings": "^7.22.5", + "@babel/plugin-transform-json-strings": "^7.22.11", "@babel/plugin-transform-literals": "^7.22.5", - "@babel/plugin-transform-logical-assignment-operators": "^7.22.5", + "@babel/plugin-transform-logical-assignment-operators": "^7.22.11", "@babel/plugin-transform-member-expression-literals": "^7.22.5", - "@babel/plugin-transform-modules-amd": "^7.22.5", - "@babel/plugin-transform-modules-commonjs": "^7.22.5", - "@babel/plugin-transform-modules-systemjs": "^7.22.5", + "@babel/plugin-transform-modules-amd": "^7.23.0", + "@babel/plugin-transform-modules-commonjs": "^7.23.0", + "@babel/plugin-transform-modules-systemjs": "^7.23.0", "@babel/plugin-transform-modules-umd": "^7.22.5", "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5", "@babel/plugin-transform-new-target": "^7.22.5", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.22.5", - "@babel/plugin-transform-numeric-separator": "^7.22.5", - "@babel/plugin-transform-object-rest-spread": "^7.22.5", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.22.11", + "@babel/plugin-transform-numeric-separator": "^7.22.11", + "@babel/plugin-transform-object-rest-spread": "^7.22.15", "@babel/plugin-transform-object-super": "^7.22.5", - "@babel/plugin-transform-optional-catch-binding": "^7.22.5", - "@babel/plugin-transform-optional-chaining": "^7.22.5", - "@babel/plugin-transform-parameters": "^7.22.5", + "@babel/plugin-transform-optional-catch-binding": "^7.22.11", + "@babel/plugin-transform-optional-chaining": "^7.23.0", + "@babel/plugin-transform-parameters": "^7.22.15", "@babel/plugin-transform-private-methods": "^7.22.5", - "@babel/plugin-transform-private-property-in-object": "^7.22.5", + "@babel/plugin-transform-private-property-in-object": "^7.22.11", "@babel/plugin-transform-property-literals": "^7.22.5", - "@babel/plugin-transform-regenerator": "^7.22.5", + "@babel/plugin-transform-regenerator": "^7.22.10", "@babel/plugin-transform-reserved-words": "^7.22.5", "@babel/plugin-transform-shorthand-properties": "^7.22.5", "@babel/plugin-transform-spread": "^7.22.5", "@babel/plugin-transform-sticky-regex": "^7.22.5", "@babel/plugin-transform-template-literals": "^7.22.5", "@babel/plugin-transform-typeof-symbol": "^7.22.5", - "@babel/plugin-transform-unicode-escapes": "^7.22.5", + "@babel/plugin-transform-unicode-escapes": "^7.22.10", "@babel/plugin-transform-unicode-property-regex": "^7.22.5", "@babel/plugin-transform-unicode-regex": "^7.22.5", "@babel/plugin-transform-unicode-sets-regex": "^7.22.5", - "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.22.5", - "babel-plugin-polyfill-corejs2": "^0.4.3", - "babel-plugin-polyfill-corejs3": "^0.8.1", - "babel-plugin-polyfill-regenerator": "^0.5.0", - "core-js-compat": "^3.30.2", - "semver": "^6.3.0" + "@babel/preset-modules": "0.1.6-no-external-plugins", + "@babel/types": "^7.23.0", + "babel-plugin-polyfill-corejs2": "^0.4.6", + "babel-plugin-polyfill-corejs3": "^0.8.5", + "babel-plugin-polyfill-regenerator": "^0.5.3", + "core-js-compat": "^3.31.0", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -1628,19 +1607,17 @@ } }, "node_modules/@babel/preset-modules": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", - "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", + "version": "0.1.6-no-external-plugins", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", + "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/plugin-transform-dotall-regex": "^7.4.4", "@babel/types": "^7.4.4", "esutils": "^2.0.2" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0" } }, "node_modules/@babel/regjsgen": { @@ -1650,12 +1627,12 @@ "dev": true }, "node_modules/@babel/runtime": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.5.tgz", - "integrity": "sha512-ecjvYlnAaZ/KVneE/OdKYBYfgXV3Ptu6zQWmgEF7vwKhQnvVS6bjMD2XYgj+SNvQ1GfK/pjgokfPkC/2CO8CuA==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz", + "integrity": "sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==", "dev": true, "dependencies": { - "regenerator-runtime": "^0.13.11" + "regenerator-runtime": "^0.14.0" }, "engines": { "node": ">=6.9.0" @@ -1680,6 +1657,7 @@ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, + "peer": true, "dependencies": { "@babel/code-frame": "^7.22.13", "@babel/generator": "^7.23.0", @@ -1742,6 +1720,16 @@ "node": ">=6.0.0" } }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", + "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", @@ -1800,9 +1788,9 @@ } }, "node_modules/@rollup/plugin-babel": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-6.0.3.tgz", - "integrity": "sha512-fKImZKppa1A/gX73eg4JGo+8kQr/q1HBQaCGKECZ0v4YBBv3lFqi14+7xyApECzvkLTHCifx+7ntcrvtBIRcpg==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-6.0.4.tgz", + "integrity": "sha512-YF7Y52kFdFT/xVSuVdjkV5ZdX/3YtmX0QulG+x0taQOtJdHYzVU61aSSkAgVJ7NOv6qPkIYiJSgSWWN/DM5sGw==", "dev": true, "dependencies": { "@babel/helper-module-imports": "^7.18.6", @@ -1814,7 +1802,7 @@ "peerDependencies": { "@babel/core": "^7.0.0", "@types/babel__core": "^7.1.9", - "rollup": "^1.20.0||^2.0.0||^3.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" }, "peerDependenciesMeta": { "@types/babel__core": { @@ -1826,9 +1814,9 @@ } }, "node_modules/@rollup/plugin-commonjs": { - "version": "25.0.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.2.tgz", - "integrity": "sha512-NGTwaJxIO0klMs+WSFFtBP7b9TdTJ3K76HZkewT8/+yHzMiUGVQgaPtLQxNVYIgT5F7lxkEyVID+yS3K7bhCow==", + "version": "25.0.7", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.7.tgz", + "integrity": "sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==", "dev": true, "dependencies": { "@rollup/pluginutils": "^5.0.1", @@ -1836,13 +1824,13 @@ "estree-walker": "^2.0.2", "glob": "^8.0.3", "is-reference": "1.2.1", - "magic-string": "^0.27.0" + "magic-string": "^0.30.3" }, "engines": { "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^2.68.0||^3.0.0" + "rollup": "^2.68.0||^3.0.0||^4.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -1851,9 +1839,9 @@ } }, "node_modules/@rollup/plugin-node-resolve": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.1.0.tgz", - "integrity": "sha512-xeZHCgsiZ9pzYVgAo9580eCGqwh/XCEUM9q6iQfGNocjgkufHAqC3exA+45URvhiYV8sBF9RlBai650eNs7AsA==", + "version": "15.2.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz", + "integrity": "sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==", "dev": true, "dependencies": { "@rollup/pluginutils": "^5.0.1", @@ -1867,7 +1855,29 @@ "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^2.78.0||^3.0.0" + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-terser": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz", + "integrity": "sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==", + "dev": true, + "dependencies": { + "serialize-javascript": "^6.0.1", + "smob": "^1.0.0", + "terser": "^5.17.4" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.0.0||^3.0.0||^4.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -1876,9 +1886,9 @@ } }, "node_modules/@rollup/pluginutils": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz", - "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.5.tgz", + "integrity": "sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==", "dev": true, "dependencies": { "@types/estree": "^1.0.0", @@ -1889,7 +1899,7 @@ "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -1897,6 +1907,162 @@ } } }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.2.0.tgz", + "integrity": "sha512-8PlggAxGxavr+pkCNeV1TM2wTb2o+cUWDg9M1cm9nR27Dsn287uZtSLYXoQqQcmq+sYfF7lHfd3sWJJinH9GmA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.2.0.tgz", + "integrity": "sha512-+71T85hbMFrJI+zKQULNmSYBeIhru55PYoF/u75MyeN2FcxE4HSPw20319b+FcZ4lWx2Nx/Ql9tN+hoaD3GH/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.2.0.tgz", + "integrity": "sha512-IIIQLuG43QIElT1JZqUP/zqIdiJl4t9U/boa0GZnQTw9m1X0k3mlBuysbgYXeloLT1RozdL7bgw4lpSaI8GOXw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.2.0.tgz", + "integrity": "sha512-BXcXvnLaea1Xz900omrGJhxHFJfH9jZ0CpJuVsbjjhpniJ6qiLXz3xA8Lekaa4MuhFcJd4f0r+Ky1G4VFbYhWw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.2.0.tgz", + "integrity": "sha512-f4K3MKw9Y4AKi4ANGnmPIglr+S+8tO858YrGVuqAHXxJdVghBmz9CPU9kDpOnGvT4g4vg5uNyIFpOOFvffXyMA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.2.0.tgz", + "integrity": "sha512-bNsTYQBgp4H7w6cT7FZhesxpcUPahsSIy4NgdZjH1ZwEoZHxi4XKglj+CsSEkhsKi+x6toVvMylhjRKhEMYfnA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.2.0.tgz", + "integrity": "sha512-Jp1NxBJpGLuxRU2ihrQk4IZ+ia5nffobG6sOFUPW5PMYkF0kQtxEbeDuCa69Xif211vUOcxlOnf5IOEIpTEySA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.2.0.tgz", + "integrity": "sha512-3p3iRtQmv2aXw+vtKNyZMLOQ+LSRsqArXjKAh2Oj9cqwfIRe7OXvdkOzWfZOIp1F/x5KJzVAxGxnniF4cMbnsQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.2.0.tgz", + "integrity": "sha512-atih7IF/reUZe4LBLC5Izd44hth2tfDIG8LaPp4/cQXdHh9jabcZEvIeRPrpDq0i/Uu487Qu5gl5KwyAnWajnw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.2.0.tgz", + "integrity": "sha512-vYxF3tKJeUE4ceYzpNe2p84RXk/fGK30I8frpRfv/MyPStej/mRlojztkN7Jtd1014HHVeq/tYaMBz/3IxkxZw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.2.0.tgz", + "integrity": "sha512-1LZJ6zpl93SaPQvas618bMFarVwufWTaczH4ESAbFcwiC4OtznA6Ym+hFPyIGaJaGEB8uMWWac0uXGPXOg5FGA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.2.0.tgz", + "integrity": "sha512-dgQfFdHCNg08nM5zBmqxqc9vrm0DVzhWotpavbPa0j4//MAOKZEB75yGAfzQE9fUJ+4pvM1239Y4IhL8f6sSog==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@socket.io/component-emitter": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", @@ -2369,42 +2535,42 @@ } }, "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.3.tgz", - "integrity": "sha512-bM3gHc337Dta490gg+/AseNB9L4YLHxq1nGKZZSHbhXv4aTYU2MD2cjza1Ru4S6975YLTaL1K8uJf6ukJhhmtw==", + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.6.tgz", + "integrity": "sha512-jhHiWVZIlnPbEUKSSNb9YoWcQGdlTLq7z1GHL4AjFxaoOUMuuEVJ+Y4pAaQUGOGk93YsVCKPbqbfw3m0SM6H8Q==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.17.7", - "@babel/helper-define-polyfill-provider": "^0.4.0", - "semver": "^6.1.1" + "@babel/compat-data": "^7.22.6", + "@babel/helper-define-polyfill-provider": "^0.4.3", + "semver": "^6.3.1" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.1.tgz", - "integrity": "sha512-ikFrZITKg1xH6pLND8zT14UPgjKHiGLqex7rGEZCH2EvhsneJaJPemmpQaIZV5AL03II+lXylw3UmddDK8RU5Q==", + "version": "0.8.6", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.6.tgz", + "integrity": "sha512-leDIc4l4tUgU7str5BWLS2h8q2N4Nf6lGZP6UrNDxdtfF2g69eJ5L0H7S8A5Ln/arfFAfHor5InAdZuIOwZdgQ==", "dev": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.4.0", - "core-js-compat": "^3.30.1" + "@babel/helper-define-polyfill-provider": "^0.4.3", + "core-js-compat": "^3.33.1" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.0.tgz", - "integrity": "sha512-hDJtKjMLVa7Z+LwnTCxoDLQj6wdc+B8dun7ayF2fYieI6OzfuvcLMB32ihJZ4UhCBwNYGl5bg/x/P9cMdnkc2g==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.3.tgz", + "integrity": "sha512-8sHeDOmXC8csczMrYEOf0UTNa4yE2SxV5JGeT/LP1n0OYVDUUFPxG9vdk2AlDlIit4t+Kf0xCtpgXPBwnn/9pw==", "dev": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.4.0" + "@babel/helper-define-polyfill-provider": "^0.4.3" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "node_modules/babel-walk": { @@ -2756,9 +2922,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.9", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", - "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", + "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==", "dev": true, "funding": [ { @@ -2775,10 +2941,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" + "caniuse-lite": "^1.0.30001541", + "electron-to-chromium": "^1.4.535", + "node-releases": "^2.0.13", + "update-browserslist-db": "^1.0.13" }, "bin": { "browserslist": "cli.js" @@ -2875,9 +3041,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001509", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001509.tgz", - "integrity": "sha512-2uDDk+TRiTX5hMcUYT/7CSyzMZxjfGu0vAUjS2g0LSD8UoXOv0LtpH4LxGMemsiPq6LCVIUjNwVM0erkOkGCDA==", + "version": "1.0.30001559", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001559.tgz", + "integrity": "sha512-cPiMKZgqgkg5LY3/ntGeLFUpi6tzddBNS58A4tnTgQw1zON7u2sZMU7SzOeVH4tj20++9ggL+V6FDOFMTaFFYA==", "dev": true, "funding": [ { @@ -3291,24 +3457,13 @@ "is-plain-object": "^5.0.0" } }, - "node_modules/core-js": { - "version": "3.31.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.31.0.tgz", - "integrity": "sha512-NIp2TQSGfR6ba5aalZD+ZQ1fSxGhDo/s1w0nx3RYzf2pnJxt7YynxFlFScP6eV7+GZsKO95NSjGxyJsU3DZgeQ==", - "dev": true, - "hasInstallScript": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, "node_modules/core-js-compat": { - "version": "3.31.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.31.0.tgz", - "integrity": "sha512-hM7YCu1cU6Opx7MXNu0NuumM0ezNeAeRKadixyiQELWY3vT3De9S4J5ZBMraWV2vZnrE1Cirl0GtFtDtMUXzPw==", + "version": "3.33.2", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.33.2.tgz", + "integrity": "sha512-axfo+wxFVxnqf8RvxTzoAlzW4gRoacrHeoFlc9n0x50+7BEyZL/Rt3hicaED1/CEd7I6tPCPVUYcJwCMO5XUYw==", "dev": true, "dependencies": { - "browserslist": "^4.21.5" + "browserslist": "^4.22.1" }, "funding": { "type": "opencollective", @@ -3646,9 +3801,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.447", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.447.tgz", - "integrity": "sha512-sxX0LXh+uL41hSJsujAN86PjhrV/6c79XmpY0TvjZStV6VxIgarf8SRkUoUTuYmFcZQTemsoqo8qXOGw5npWfw==", + "version": "1.4.572", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.572.tgz", + "integrity": "sha512-RlFobl4D3ieetbnR+2EpxdzFl9h0RAJkPK3pfiwMug2nhBin2ZCsGIAJWdpNniLz43sgXam/CgipOmvTA+rUiA==", "dev": true }, "node_modules/emoji-regex": { @@ -6015,6 +6170,7 @@ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true, + "peer": true, "bin": { "jsesc": "bin/jsesc" }, @@ -6309,12 +6465,12 @@ } }, "node_modules/magic-string": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz", - "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==", + "version": "0.30.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", + "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", "dev": true, "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.13" + "@jridgewell/sourcemap-codec": "^1.4.15" }, "engines": { "node": ">=12" @@ -6718,9 +6874,9 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz", - "integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", "dev": true }, "node_modules/normalize-package-data": { @@ -7469,6 +7625,15 @@ } ] }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, "node_modules/range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -7592,15 +7757,15 @@ } }, "node_modules/regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", + "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==", "dev": true }, "node_modules/regenerator-transform": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.1.tgz", - "integrity": "sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==", + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz", + "integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==", "dev": true, "dependencies": { "@babel/runtime": "^7.8.4" @@ -7946,17 +8111,30 @@ } }, "node_modules/rollup": { - "version": "2.79.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", - "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.2.0.tgz", + "integrity": "sha512-deaMa9Z+jPVeBD2dKXv+h7EbdKte9++V2potc/ADqvVgEr6DEJ3ia9u0joarjC2lX/ubaCRYz3QVx0TzuVqAJA==", "dev": true, "bin": { "rollup": "dist/bin/rollup" }, "engines": { - "node": ">=10.0.0" + "node": ">=18.0.0", + "npm": ">=8.0.0" }, "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.2.0", + "@rollup/rollup-android-arm64": "4.2.0", + "@rollup/rollup-darwin-arm64": "4.2.0", + "@rollup/rollup-darwin-x64": "4.2.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.2.0", + "@rollup/rollup-linux-arm64-gnu": "4.2.0", + "@rollup/rollup-linux-arm64-musl": "4.2.0", + "@rollup/rollup-linux-x64-gnu": "4.2.0", + "@rollup/rollup-linux-x64-musl": "4.2.0", + "@rollup/rollup-win32-arm64-msvc": "4.2.0", + "@rollup/rollup-win32-ia32-msvc": "4.2.0", + "@rollup/rollup-win32-x64-msvc": "4.2.0", "fsevents": "~2.3.2" } }, @@ -8138,6 +8316,15 @@ "node": ">= 0.6" } }, + "node_modules/serialize-javascript": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", + "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, "node_modules/serve-index": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", @@ -8306,6 +8493,12 @@ "node": ">=8" } }, + "node_modules/smob": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/smob/-/smob-1.4.1.tgz", + "integrity": "sha512-9LK+E7Hv5R9u4g4C3p+jjLstaLe11MDsL21UpYaCNmapvMkYhqCV4A/f/3gyH8QjMyh6l68q9xC85vihY9ahMQ==", + "dev": true + }, "node_modules/snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -8572,6 +8765,25 @@ "urix": "^0.1.0" } }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map-url": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", @@ -8846,6 +9058,36 @@ "es6-symbol": "^3.1.1" } }, + "node_modules/terser": { + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.24.0.tgz", + "integrity": "sha512-ZpGR4Hy3+wBEzVEnHvstMvqpD/nABNelQn/z2r0fjVWGQsN3bpOLzQlqDxmb4CDZnXq5lpjnQ+mHQLAOpfM5iw==", + "dev": true, + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser/node_modules/acorn": { + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", + "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/through2": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", @@ -9219,9 +9461,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "dev": true, "funding": [ { @@ -9653,9 +9895,9 @@ } }, "@babel/compat-data": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.5.tgz", - "integrity": "sha512-4Jc/YuIaYqKnDDz892kPIledykKg12Aw1PYX5i/TY28anJtacvM1Rrr8wbieB9GfEJwlzqT0hUEao0CxEebiDA==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.2.tgz", + "integrity": "sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ==", "dev": true }, "@babel/core": { @@ -9687,6 +9929,7 @@ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, + "peer": true, "requires": { "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", @@ -9713,33 +9956,33 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.5.tgz", - "integrity": "sha512-Ji+ywpHeuqxB8WDxraCiqR0xfhYjiDE/e6k7FuIaANnoOFxAHskHChz4vA1mJC9Lbm01s1PVAGhQY4FUKSkGZw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", + "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", "dev": true, "requires": { - "@babel/compat-data": "^7.22.5", - "@babel/helper-validator-option": "^7.22.5", - "browserslist": "^4.21.3", + "@babel/compat-data": "^7.22.9", + "@babel/helper-validator-option": "^7.22.15", + "browserslist": "^4.21.9", "lru-cache": "^5.1.1", - "semver": "^6.3.0" + "semver": "^6.3.1" } }, "@babel/helper-create-class-features-plugin": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.5.tgz", - "integrity": "sha512-xkb58MyOYIslxu3gKmVXmjTtUPvBU4odYzbiIQbWwLKIHCsx6UGZGX6F1IznMFVnDdirseUZopzN+ZRt8Xb33Q==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.15.tgz", + "integrity": "sha512-jKkwA59IXcvSaiK2UN45kKwSC9o+KuoXsBDvHvU/7BecYIp8GQ2UwrVvFgJASUT+hBnwJx6MhvMCuMzwZZ7jlg==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.22.5", "@babel/helper-environment-visitor": "^7.22.5", "@babel/helper-function-name": "^7.22.5", - "@babel/helper-member-expression-to-functions": "^7.22.5", + "@babel/helper-member-expression-to-functions": "^7.22.15", "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.9", "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.5", - "semver": "^6.3.0" + "@babel/helper-split-export-declaration": "^7.22.6", + "semver": "^6.3.1" } }, "@babel/helper-create-regexp-features-plugin": { @@ -9754,17 +9997,16 @@ } }, "@babel/helper-define-polyfill-provider": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.0.tgz", - "integrity": "sha512-RnanLx5ETe6aybRi1cO/edaRH+bNYWaryCEmjDDYyNr4wnSzyOp8T0dWipmqVHKEY3AbVKUom50AKSlj1zmKbg==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.3.tgz", + "integrity": "sha512-WBrLmuPP47n7PNwsZ57pqam6G/RGo1vw/87b0Blc53tZNGZ4x7YvZ6HgQe2vo1W/FR20OgjeZuGXzudPiXHFug==", "dev": true, "requires": { - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-plugin-utils": "^7.22.5", "debug": "^4.1.1", "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" + "resolve": "^1.14.2" } }, "@babel/helper-environment-visitor": { @@ -9793,37 +10035,34 @@ } }, "@babel/helper-member-expression-to-functions": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.22.5.tgz", - "integrity": "sha512-aBiH1NKMG0H2cGZqspNvsaBe6wNGjbJjuLy29aU+eDZjSbbN53BaxlpB02xm9v34pLTZ1nIQPFYn2qMZoa5BQQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz", + "integrity": "sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==", "dev": true, "requires": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.23.0" } }, "@babel/helper-module-imports": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", - "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", "dev": true, "requires": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.22.15" } }, "@babel/helper-module-transforms": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.5.tgz", - "integrity": "sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz", + "integrity": "sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==", "dev": true, "requires": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.20" } }, "@babel/helper-optimise-call-expression": { @@ -9842,29 +10081,25 @@ "dev": true }, "@babel/helper-remap-async-to-generator": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.5.tgz", - "integrity": "sha512-cU0Sq1Rf4Z55fgz7haOakIyM7+x/uCFwXpLPaeRzfoUtAEAuUZjZvFPjL/rk5rW693dIgn2hng1W7xbT7lWT4g==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz", + "integrity": "sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-wrap-function": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-wrap-function": "^7.22.20" } }, "@babel/helper-replace-supers": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.5.tgz", - "integrity": "sha512-aLdNM5I3kdI/V9xGNyKSF3X/gTyMUBohTZ+/3QdQKAA9vxIiy12E+8E2HoOP1/DjeqU+g6as35QHJNMDDYpuCg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz", + "integrity": "sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==", "dev": true, "requires": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-member-expression-to-functions": "^7.22.5", - "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-member-expression-to-functions": "^7.22.15", + "@babel/helper-optimise-call-expression": "^7.22.5" } }, "@babel/helper-simple-access": { @@ -9907,21 +10142,20 @@ "dev": true }, "@babel/helper-validator-option": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", - "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", + "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", "dev": true }, "@babel/helper-wrap-function": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.5.tgz", - "integrity": "sha512-bYqLIBSEshYcYQyfks8ewYA8S30yaGSeRslcvKMvoUk6HHPySbxHq9YRi6ghhzEU+yhQv9bP/jXnygkStOcqZw==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.20.tgz", + "integrity": "sha512-pms/UwkOpnQe/PDAEdV/d7dVCoBbB+R4FvYoHGZz+4VPcg7RtYy2KP7S2lbuWM6FCSgob5wshfGESbC/hzNXZw==", "dev": true, "requires": { "@babel/helper-function-name": "^7.22.5", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/types": "^7.22.19" } }, "@babel/helpers": { @@ -9954,23 +10188,23 @@ "dev": true }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.22.5.tgz", - "integrity": "sha512-NP1M5Rf+u2Gw9qfSO4ihjcTGW5zXTi36ITLd4/EoAcEhIZ0yjMqmftDNl3QC19CX7olhrjpyU454g/2W7X0jvQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.22.15.tgz", + "integrity": "sha512-FB9iYlz7rURmRJyXRKEnalYPPdn87H5no108cyuQQyMwlpJ2SJtpIUBI27kdTin956pz+LPypkPVPUTlxOmrsg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.22.5.tgz", - "integrity": "sha512-31Bb65aZaUwqCbWMnZPduIZxCBngHFlzyN6Dq6KAJjtx+lx6ohKHubc61OomYi7XwVD4Ol0XCVz4h+pYFR048g==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.22.15.tgz", + "integrity": "sha512-Hyph9LseGvAeeXzikV88bczhsrLrIZqDPxO+sSmAunMPaGrBGhfMWzCPYTtiW9t+HzSE2wtV8e5cc5P6r1xMDQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5", "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/plugin-transform-optional-chaining": "^7.22.5" + "@babel/plugin-transform-optional-chaining": "^7.22.15" } }, "@babel/plugin-proposal-private-property-in-object": { @@ -9980,16 +10214,6 @@ "dev": true, "requires": {} }, - "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", - "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - } - }, "@babel/plugin-syntax-async-generators": { "version": "7.8.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", @@ -10163,14 +10387,14 @@ } }, "@babel/plugin-transform-async-generator-functions": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.22.5.tgz", - "integrity": "sha512-gGOEvFzm3fWoyD5uZq7vVTD57pPJ3PczPUD/xCFGjzBpUosnklmXyKnGQbbbGs1NPNPskFex0j93yKbHt0cHyg==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.2.tgz", + "integrity": "sha512-BBYVGxbDVHfoeXbOwcagAkOQAm9NxoTdMGfTqghu1GrvadSaw6iW3Je6IcL5PNOw8VwjxqBECXy50/iCQSY/lQ==", "dev": true, "requires": { - "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-remap-async-to-generator": "^7.22.5", + "@babel/helper-remap-async-to-generator": "^7.22.20", "@babel/plugin-syntax-async-generators": "^7.8.4" } }, @@ -10195,9 +10419,9 @@ } }, "@babel/plugin-transform-block-scoping": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.22.5.tgz", - "integrity": "sha512-EcACl1i5fSQ6bt+YGuU/XGCeZKStLmyVGytWkpyhCLeQVA0eu6Wtiw92V+I1T/hnezUv7j74dA/Ro69gWcU+hg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.0.tgz", + "integrity": "sha512-cOsrbmIOXmf+5YbL99/S49Y3j46k/T16b9ml8bm9lP6N9US5iQ2yBK7gpui1pg0V/WMcXdkfKbTb7HXq9u+v4g==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5" @@ -10214,30 +10438,30 @@ } }, "@babel/plugin-transform-class-static-block": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.22.5.tgz", - "integrity": "sha512-SPToJ5eYZLxlnp1UzdARpOGeC2GbHvr9d/UV0EukuVx8atktg194oe+C5BqQ8jRTkgLRVOPYeXRSBg1IlMoVRA==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.22.11.tgz", + "integrity": "sha512-GMM8gGmqI7guS/llMFk1bJDkKfn3v3C4KHK9Yg1ey5qcHcOlKb0QvcMrgzvxo+T03/4szNh5lghY+fEC98Kq9g==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-create-class-features-plugin": "^7.22.11", "@babel/helper-plugin-utils": "^7.22.5", "@babel/plugin-syntax-class-static-block": "^7.14.5" } }, "@babel/plugin-transform-classes": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.22.5.tgz", - "integrity": "sha512-2edQhLfibpWpsVBx2n/GKOz6JdGQvLruZQfGr9l1qes2KQaWswjBzhQF7UDUZMNaMMQeYnQzxwOMPsbYF7wqPQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.22.15.tgz", + "integrity": "sha512-VbbC3PGjBdE0wAWDdHM9G8Gm977pnYI0XpqMd6LrKISj8/DJXEsWqgRuTYaNE9Bv0JGhTZUzHDlMk18IpOuoqw==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-compilation-targets": "^7.22.5", + "@babel/helper-compilation-targets": "^7.22.15", "@babel/helper-environment-visitor": "^7.22.5", "@babel/helper-function-name": "^7.22.5", "@babel/helper-optimise-call-expression": "^7.22.5", "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.9", + "@babel/helper-split-export-declaration": "^7.22.6", "globals": "^11.1.0" } }, @@ -10252,9 +10476,9 @@ } }, "@babel/plugin-transform-destructuring": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.22.5.tgz", - "integrity": "sha512-GfqcFuGW8vnEqTUBM7UtPd5A4q797LTvvwKxXTgRsFjoqaJiEg9deBG6kWeQYkVEL569NpnmpC0Pkr/8BLKGnQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.0.tgz", + "integrity": "sha512-vaMdgNXFkYrB+8lbgniSYWHsgqK5gjaMNcc84bMIOMRLH0L9AqYq3hwMdvnyqj1OPqea8UtjPEuS/DCenah1wg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5" @@ -10280,9 +10504,9 @@ } }, "@babel/plugin-transform-dynamic-import": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.22.5.tgz", - "integrity": "sha512-0MC3ppTB1AMxd8fXjSrbPa7LT9hrImt+/fcj+Pg5YMD7UQyWp/02+JWpdnCymmsXwIx5Z+sYn1bwCn4ZJNvhqQ==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.22.11.tgz", + "integrity": "sha512-g/21plo58sfteWjaO0ZNVb+uEOkJNjAaHhbejrnBmu011l/eNDScmkbjCC3l4FKb10ViaGU4aOkFznSu2zRHgA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5", @@ -10300,9 +10524,9 @@ } }, "@babel/plugin-transform-export-namespace-from": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.22.5.tgz", - "integrity": "sha512-X4hhm7FRnPgd4nDA4b/5V280xCx6oL7Oob5+9qVS5C13Zq4bh1qq7LU0GgRU6b5dBWBvhGaXYVB4AcN6+ol6vg==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.22.11.tgz", + "integrity": "sha512-xa7aad7q7OiT8oNZ1mU7NrISjlSkVdMbNxn9IuLZyL9AJEhs1Apba3I+u5riX1dIkdptP5EKDG5XDPByWxtehw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5", @@ -10310,9 +10534,9 @@ } }, "@babel/plugin-transform-for-of": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.22.5.tgz", - "integrity": "sha512-3kxQjX1dU9uudwSshyLeEipvrLjBCVthCgeTp6CzE/9JYrlAIaeekVxRpCWsDDfYTfRZRoCeZatCQvwo+wvK8A==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.22.15.tgz", + "integrity": "sha512-me6VGeHsx30+xh9fbDLLPi0J1HzmeIIyenoOQHuw2D4m2SAU3NrspX5XxJLBpqn5yrLzrlw2Iy3RA//Bx27iOA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5" @@ -10330,9 +10554,9 @@ } }, "@babel/plugin-transform-json-strings": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.22.5.tgz", - "integrity": "sha512-DuCRB7fu8MyTLbEQd1ew3R85nx/88yMoqo2uPSjevMj3yoN7CDM8jkgrY0wmVxfJZyJ/B9fE1iq7EQppWQmR5A==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.22.11.tgz", + "integrity": "sha512-CxT5tCqpA9/jXFlme9xIBCc5RPtdDq3JpkkhgHQqtDdiTnTI0jtZ0QzXhr5DILeYifDPp2wvY2ad+7+hLMW5Pw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5", @@ -10349,9 +10573,9 @@ } }, "@babel/plugin-transform-logical-assignment-operators": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.22.5.tgz", - "integrity": "sha512-MQQOUW1KL8X0cDWfbwYP+TbVbZm16QmQXJQ+vndPtH/BoO0lOKpVoEDMI7+PskYxH+IiE0tS8xZye0qr1lGzSA==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.22.11.tgz", + "integrity": "sha512-qQwRTP4+6xFCDV5k7gZBF3C31K34ut0tbEcTKxlX/0KXxm9GLcO14p570aWxFvVzx6QAfPgq7gaeIHXJC8LswQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5", @@ -10368,36 +10592,36 @@ } }, "@babel/plugin-transform-modules-amd": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.22.5.tgz", - "integrity": "sha512-R+PTfLTcYEmb1+kK7FNkhQ1gP4KgjpSO6HfH9+f8/yfp2Nt3ggBjiVpRwmwTlfqZLafYKJACy36yDXlEmI9HjQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.23.0.tgz", + "integrity": "sha512-xWT5gefv2HGSm4QHtgc1sYPbseOyf+FFDo2JbpE25GWl5BqTGO9IMwTYJRoIdjsF85GE+VegHxSCUt5EvoYTAw==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-module-transforms": "^7.23.0", "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.22.5.tgz", - "integrity": "sha512-B4pzOXj+ONRmuaQTg05b3y/4DuFz3WcCNAXPLb2Q0GT0TrGKGxNKV4jwsXts+StaM0LQczZbOpj8o1DLPDJIiA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.0.tgz", + "integrity": "sha512-32Xzss14/UVc7k9g775yMIvkVK8xwKE0DPdP5JTapr3+Z9w4tzeOuLNY6BXDQR6BdnzIlXnCGAzsk/ICHBLVWQ==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-module-transforms": "^7.23.0", "@babel/helper-plugin-utils": "^7.22.5", "@babel/helper-simple-access": "^7.22.5" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.22.5.tgz", - "integrity": "sha512-emtEpoaTMsOs6Tzz+nbmcePl6AKVtS1yC4YNAeMun9U8YCsgadPNxnOPQ8GhHFB2qdx+LZu9LgoC0Lthuu05DQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.0.tgz", + "integrity": "sha512-qBej6ctXZD2f+DhlOC9yO47yEYgUh5CZNz/aBoH4j/3NOlRfJXJbY7xDQCqQVf9KbrqGzIWER1f23doHGrIHFg==", "dev": true, "requires": { "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-module-transforms": "^7.23.0", "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5" + "@babel/helper-validator-identifier": "^7.22.20" } }, "@babel/plugin-transform-modules-umd": { @@ -10430,9 +10654,9 @@ } }, "@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.22.5.tgz", - "integrity": "sha512-6CF8g6z1dNYZ/VXok5uYkkBBICHZPiGEl7oDnAx2Mt1hlHVHOSIKWJaXHjQJA5VB43KZnXZDIexMchY4y2PGdA==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.22.11.tgz", + "integrity": "sha512-YZWOw4HxXrotb5xsjMJUDlLgcDXSfO9eCmdl1bgW4+/lAGdkjaEvOnQ4p5WKKdUgSzO39dgPl0pTnfxm0OAXcg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5", @@ -10440,9 +10664,9 @@ } }, "@babel/plugin-transform-numeric-separator": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.22.5.tgz", - "integrity": "sha512-NbslED1/6M+sXiwwtcAB/nieypGw02Ejf4KtDeMkCEpP6gWFMX1wI9WKYua+4oBneCCEmulOkRpwywypVZzs/g==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.22.11.tgz", + "integrity": "sha512-3dzU4QGPsILdJbASKhF/V2TVP+gJya1PsueQCxIPCEcerqF21oEcrob4mzjsp2Py/1nLfF5m+xYNMDpmA8vffg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5", @@ -10450,16 +10674,16 @@ } }, "@babel/plugin-transform-object-rest-spread": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.22.5.tgz", - "integrity": "sha512-Kk3lyDmEslH9DnvCDA1s1kkd3YWQITiBOHngOtDL9Pt6BZjzqb6hiOlb8VfjiiQJ2unmegBqZu0rx5RxJb5vmQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.22.15.tgz", + "integrity": "sha512-fEB+I1+gAmfAyxZcX1+ZUwLeAuuf8VIg67CTznZE0MqVFumWkh8xWtn58I4dxdVf080wn7gzWoF8vndOViJe9Q==", "dev": true, "requires": { - "@babel/compat-data": "^7.22.5", - "@babel/helper-compilation-targets": "^7.22.5", + "@babel/compat-data": "^7.22.9", + "@babel/helper-compilation-targets": "^7.22.15", "@babel/helper-plugin-utils": "^7.22.5", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.22.5" + "@babel/plugin-transform-parameters": "^7.22.15" } }, "@babel/plugin-transform-object-super": { @@ -10473,9 +10697,9 @@ } }, "@babel/plugin-transform-optional-catch-binding": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.22.5.tgz", - "integrity": "sha512-pH8orJahy+hzZje5b8e2QIlBWQvGpelS76C63Z+jhZKsmzfNaPQ+LaW6dcJ9bxTpo1mtXbgHwy765Ro3jftmUg==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.22.11.tgz", + "integrity": "sha512-rli0WxesXUeCJnMYhzAglEjLWVDF6ahb45HuprcmQuLidBJFWjNnOzssk2kuc6e33FlLaiZhG/kUIzUMWdBKaQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5", @@ -10483,9 +10707,9 @@ } }, "@babel/plugin-transform-optional-chaining": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.22.5.tgz", - "integrity": "sha512-AconbMKOMkyG+xCng2JogMCDcqW8wedQAqpVIL4cOSescZ7+iW8utC6YDZLMCSUIReEA733gzRSaOSXMAt/4WQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.0.tgz", + "integrity": "sha512-sBBGXbLJjxTzLBF5rFWaikMnOGOk/BmK6vVByIdEggZ7Vn6CvWXZyRkkLFK6WE0IF8jSliyOkUN6SScFgzCM0g==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5", @@ -10494,9 +10718,9 @@ } }, "@babel/plugin-transform-parameters": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.22.5.tgz", - "integrity": "sha512-AVkFUBurORBREOmHRKo06FjHYgjrabpdqRSwq6+C7R5iTCZOsM4QbcB27St0a4U6fffyAOqh3s/qEfybAhfivg==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.22.15.tgz", + "integrity": "sha512-hjk7qKIqhyzhhUvRT683TYQOFa/4cQKwQy7ALvTpODswN40MljzNDa0YldevS6tGbxwaEKVn502JmY0dP7qEtQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5" @@ -10513,13 +10737,13 @@ } }, "@babel/plugin-transform-private-property-in-object": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.22.5.tgz", - "integrity": "sha512-/9xnaTTJcVoBtSSmrVyhtSvO3kbqS2ODoh2juEU72c3aYonNF0OMGiaz2gjukyKM2wBBYJP38S4JiE0Wfb5VMQ==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.22.11.tgz", + "integrity": "sha512-sSCbqZDBKHetvjSwpyWzhuHkmW5RummxJBVbYLkGkaiTOWGxml7SXt0iWa03bzxFIx7wOj3g/ILRd0RcJKBeSQ==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-create-class-features-plugin": "^7.22.11", "@babel/helper-plugin-utils": "^7.22.5", "@babel/plugin-syntax-private-property-in-object": "^7.14.5" } @@ -10534,13 +10758,13 @@ } }, "@babel/plugin-transform-regenerator": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.22.5.tgz", - "integrity": "sha512-rR7KePOE7gfEtNTh9Qw+iO3Q/e4DEsoQ+hdvM6QUDH7JRJ5qxq5AA52ZzBWbI5i9lfNuvySgOGP8ZN7LAmaiPw==", + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.22.10.tgz", + "integrity": "sha512-F28b1mDt8KcT5bUyJc/U9nwzw6cV+UmTeRlXYIl2TNqMMJif0Jeey9/RQ3C4NOd2zp0/TRsDns9ttj2L523rsw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5", - "regenerator-transform": "^0.15.1" + "regenerator-transform": "^0.15.2" } }, "@babel/plugin-transform-reserved-words": { @@ -10599,9 +10823,9 @@ } }, "@babel/plugin-transform-unicode-escapes": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.22.5.tgz", - "integrity": "sha512-biEmVg1IYB/raUO5wT1tgfacCef15Fbzhkx493D3urBI++6hpJ+RFG4SrWMn0NEZLfvilqKf3QDrRVZHo08FYg==", + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.22.10.tgz", + "integrity": "sha512-lRfaRKGZCBqDlRU3UIFovdp9c9mEvlylmpod0/OatICsSfuQ9YFthRo1tpTkGsklEefZdqlEFdY4A2dwTb6ohg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.22.5" @@ -10638,17 +10862,17 @@ } }, "@babel/preset-env": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.22.5.tgz", - "integrity": "sha512-fj06hw89dpiZzGZtxn+QybifF07nNiZjZ7sazs2aVDcysAZVGjW7+7iFYxg6GLNM47R/thYfLdrXc+2f11Vi9A==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.2.tgz", + "integrity": "sha512-BW3gsuDD+rvHL2VO2SjAUNTBe5YrjsTiDyqamPDWY723na3/yPQ65X5oQkFVJZ0o50/2d+svm1rkPoJeR1KxVQ==", "dev": true, "requires": { - "@babel/compat-data": "^7.22.5", - "@babel/helper-compilation-targets": "^7.22.5", + "@babel/compat-data": "^7.23.2", + "@babel/helper-compilation-targets": "^7.22.15", "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-option": "^7.22.5", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.22.5", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.22.5", + "@babel/helper-validator-option": "^7.22.15", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.22.15", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.22.15", "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", @@ -10669,71 +10893,69 @@ "@babel/plugin-syntax-top-level-await": "^7.14.5", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", "@babel/plugin-transform-arrow-functions": "^7.22.5", - "@babel/plugin-transform-async-generator-functions": "^7.22.5", + "@babel/plugin-transform-async-generator-functions": "^7.23.2", "@babel/plugin-transform-async-to-generator": "^7.22.5", "@babel/plugin-transform-block-scoped-functions": "^7.22.5", - "@babel/plugin-transform-block-scoping": "^7.22.5", + "@babel/plugin-transform-block-scoping": "^7.23.0", "@babel/plugin-transform-class-properties": "^7.22.5", - "@babel/plugin-transform-class-static-block": "^7.22.5", - "@babel/plugin-transform-classes": "^7.22.5", + "@babel/plugin-transform-class-static-block": "^7.22.11", + "@babel/plugin-transform-classes": "^7.22.15", "@babel/plugin-transform-computed-properties": "^7.22.5", - "@babel/plugin-transform-destructuring": "^7.22.5", + "@babel/plugin-transform-destructuring": "^7.23.0", "@babel/plugin-transform-dotall-regex": "^7.22.5", "@babel/plugin-transform-duplicate-keys": "^7.22.5", - "@babel/plugin-transform-dynamic-import": "^7.22.5", + "@babel/plugin-transform-dynamic-import": "^7.22.11", "@babel/plugin-transform-exponentiation-operator": "^7.22.5", - "@babel/plugin-transform-export-namespace-from": "^7.22.5", - "@babel/plugin-transform-for-of": "^7.22.5", + "@babel/plugin-transform-export-namespace-from": "^7.22.11", + "@babel/plugin-transform-for-of": "^7.22.15", "@babel/plugin-transform-function-name": "^7.22.5", - "@babel/plugin-transform-json-strings": "^7.22.5", + "@babel/plugin-transform-json-strings": "^7.22.11", "@babel/plugin-transform-literals": "^7.22.5", - "@babel/plugin-transform-logical-assignment-operators": "^7.22.5", + "@babel/plugin-transform-logical-assignment-operators": "^7.22.11", "@babel/plugin-transform-member-expression-literals": "^7.22.5", - "@babel/plugin-transform-modules-amd": "^7.22.5", - "@babel/plugin-transform-modules-commonjs": "^7.22.5", - "@babel/plugin-transform-modules-systemjs": "^7.22.5", + "@babel/plugin-transform-modules-amd": "^7.23.0", + "@babel/plugin-transform-modules-commonjs": "^7.23.0", + "@babel/plugin-transform-modules-systemjs": "^7.23.0", "@babel/plugin-transform-modules-umd": "^7.22.5", "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5", "@babel/plugin-transform-new-target": "^7.22.5", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.22.5", - "@babel/plugin-transform-numeric-separator": "^7.22.5", - "@babel/plugin-transform-object-rest-spread": "^7.22.5", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.22.11", + "@babel/plugin-transform-numeric-separator": "^7.22.11", + "@babel/plugin-transform-object-rest-spread": "^7.22.15", "@babel/plugin-transform-object-super": "^7.22.5", - "@babel/plugin-transform-optional-catch-binding": "^7.22.5", - "@babel/plugin-transform-optional-chaining": "^7.22.5", - "@babel/plugin-transform-parameters": "^7.22.5", + "@babel/plugin-transform-optional-catch-binding": "^7.22.11", + "@babel/plugin-transform-optional-chaining": "^7.23.0", + "@babel/plugin-transform-parameters": "^7.22.15", "@babel/plugin-transform-private-methods": "^7.22.5", - "@babel/plugin-transform-private-property-in-object": "^7.22.5", + "@babel/plugin-transform-private-property-in-object": "^7.22.11", "@babel/plugin-transform-property-literals": "^7.22.5", - "@babel/plugin-transform-regenerator": "^7.22.5", + "@babel/plugin-transform-regenerator": "^7.22.10", "@babel/plugin-transform-reserved-words": "^7.22.5", "@babel/plugin-transform-shorthand-properties": "^7.22.5", "@babel/plugin-transform-spread": "^7.22.5", "@babel/plugin-transform-sticky-regex": "^7.22.5", "@babel/plugin-transform-template-literals": "^7.22.5", "@babel/plugin-transform-typeof-symbol": "^7.22.5", - "@babel/plugin-transform-unicode-escapes": "^7.22.5", + "@babel/plugin-transform-unicode-escapes": "^7.22.10", "@babel/plugin-transform-unicode-property-regex": "^7.22.5", "@babel/plugin-transform-unicode-regex": "^7.22.5", "@babel/plugin-transform-unicode-sets-regex": "^7.22.5", - "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.22.5", - "babel-plugin-polyfill-corejs2": "^0.4.3", - "babel-plugin-polyfill-corejs3": "^0.8.1", - "babel-plugin-polyfill-regenerator": "^0.5.0", - "core-js-compat": "^3.30.2", - "semver": "^6.3.0" + "@babel/preset-modules": "0.1.6-no-external-plugins", + "@babel/types": "^7.23.0", + "babel-plugin-polyfill-corejs2": "^0.4.6", + "babel-plugin-polyfill-corejs3": "^0.8.5", + "babel-plugin-polyfill-regenerator": "^0.5.3", + "core-js-compat": "^3.31.0", + "semver": "^6.3.1" } }, "@babel/preset-modules": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", - "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", + "version": "0.1.6-no-external-plugins", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", + "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/plugin-transform-dotall-regex": "^7.4.4", "@babel/types": "^7.4.4", "esutils": "^2.0.2" } @@ -10745,12 +10967,12 @@ "dev": true }, "@babel/runtime": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.5.tgz", - "integrity": "sha512-ecjvYlnAaZ/KVneE/OdKYBYfgXV3Ptu6zQWmgEF7vwKhQnvVS6bjMD2XYgj+SNvQ1GfK/pjgokfPkC/2CO8CuA==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz", + "integrity": "sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==", "dev": true, "requires": { - "regenerator-runtime": "^0.13.11" + "regenerator-runtime": "^0.14.0" } }, "@babel/template": { @@ -10769,6 +10991,7 @@ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, + "peer": true, "requires": { "@babel/code-frame": "^7.22.13", "@babel/generator": "^7.23.0", @@ -10816,6 +11039,16 @@ "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "dev": true }, + "@jridgewell/source-map": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", + "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, "@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", @@ -10867,9 +11100,9 @@ } }, "@rollup/plugin-babel": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-6.0.3.tgz", - "integrity": "sha512-fKImZKppa1A/gX73eg4JGo+8kQr/q1HBQaCGKECZ0v4YBBv3lFqi14+7xyApECzvkLTHCifx+7ntcrvtBIRcpg==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-6.0.4.tgz", + "integrity": "sha512-YF7Y52kFdFT/xVSuVdjkV5ZdX/3YtmX0QulG+x0taQOtJdHYzVU61aSSkAgVJ7NOv6qPkIYiJSgSWWN/DM5sGw==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.18.6", @@ -10877,9 +11110,9 @@ } }, "@rollup/plugin-commonjs": { - "version": "25.0.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.2.tgz", - "integrity": "sha512-NGTwaJxIO0klMs+WSFFtBP7b9TdTJ3K76HZkewT8/+yHzMiUGVQgaPtLQxNVYIgT5F7lxkEyVID+yS3K7bhCow==", + "version": "25.0.7", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.7.tgz", + "integrity": "sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==", "dev": true, "requires": { "@rollup/pluginutils": "^5.0.1", @@ -10887,13 +11120,13 @@ "estree-walker": "^2.0.2", "glob": "^8.0.3", "is-reference": "1.2.1", - "magic-string": "^0.27.0" + "magic-string": "^0.30.3" } }, "@rollup/plugin-node-resolve": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.1.0.tgz", - "integrity": "sha512-xeZHCgsiZ9pzYVgAo9580eCGqwh/XCEUM9q6iQfGNocjgkufHAqC3exA+45URvhiYV8sBF9RlBai650eNs7AsA==", + "version": "15.2.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz", + "integrity": "sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==", "dev": true, "requires": { "@rollup/pluginutils": "^5.0.1", @@ -10904,10 +11137,21 @@ "resolve": "^1.22.1" } }, + "@rollup/plugin-terser": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz", + "integrity": "sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==", + "dev": true, + "requires": { + "serialize-javascript": "^6.0.1", + "smob": "^1.0.0", + "terser": "^5.17.4" + } + }, "@rollup/pluginutils": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz", - "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.5.tgz", + "integrity": "sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==", "dev": true, "requires": { "@types/estree": "^1.0.0", @@ -10915,6 +11159,90 @@ "picomatch": "^2.3.1" } }, + "@rollup/rollup-android-arm-eabi": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.2.0.tgz", + "integrity": "sha512-8PlggAxGxavr+pkCNeV1TM2wTb2o+cUWDg9M1cm9nR27Dsn287uZtSLYXoQqQcmq+sYfF7lHfd3sWJJinH9GmA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-android-arm64": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.2.0.tgz", + "integrity": "sha512-+71T85hbMFrJI+zKQULNmSYBeIhru55PYoF/u75MyeN2FcxE4HSPw20319b+FcZ4lWx2Nx/Ql9tN+hoaD3GH/A==", + "dev": true, + "optional": true + }, + "@rollup/rollup-darwin-arm64": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.2.0.tgz", + "integrity": "sha512-IIIQLuG43QIElT1JZqUP/zqIdiJl4t9U/boa0GZnQTw9m1X0k3mlBuysbgYXeloLT1RozdL7bgw4lpSaI8GOXw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-darwin-x64": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.2.0.tgz", + "integrity": "sha512-BXcXvnLaea1Xz900omrGJhxHFJfH9jZ0CpJuVsbjjhpniJ6qiLXz3xA8Lekaa4MuhFcJd4f0r+Ky1G4VFbYhWw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.2.0.tgz", + "integrity": "sha512-f4K3MKw9Y4AKi4ANGnmPIglr+S+8tO858YrGVuqAHXxJdVghBmz9CPU9kDpOnGvT4g4vg5uNyIFpOOFvffXyMA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm64-gnu": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.2.0.tgz", + "integrity": "sha512-bNsTYQBgp4H7w6cT7FZhesxpcUPahsSIy4NgdZjH1ZwEoZHxi4XKglj+CsSEkhsKi+x6toVvMylhjRKhEMYfnA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm64-musl": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.2.0.tgz", + "integrity": "sha512-Jp1NxBJpGLuxRU2ihrQk4IZ+ia5nffobG6sOFUPW5PMYkF0kQtxEbeDuCa69Xif211vUOcxlOnf5IOEIpTEySA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-x64-gnu": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.2.0.tgz", + "integrity": "sha512-3p3iRtQmv2aXw+vtKNyZMLOQ+LSRsqArXjKAh2Oj9cqwfIRe7OXvdkOzWfZOIp1F/x5KJzVAxGxnniF4cMbnsQ==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-x64-musl": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.2.0.tgz", + "integrity": "sha512-atih7IF/reUZe4LBLC5Izd44hth2tfDIG8LaPp4/cQXdHh9jabcZEvIeRPrpDq0i/Uu487Qu5gl5KwyAnWajnw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-arm64-msvc": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.2.0.tgz", + "integrity": "sha512-vYxF3tKJeUE4ceYzpNe2p84RXk/fGK30I8frpRfv/MyPStej/mRlojztkN7Jtd1014HHVeq/tYaMBz/3IxkxZw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-ia32-msvc": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.2.0.tgz", + "integrity": "sha512-1LZJ6zpl93SaPQvas618bMFarVwufWTaczH4ESAbFcwiC4OtznA6Ym+hFPyIGaJaGEB8uMWWac0uXGPXOg5FGA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-x64-msvc": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.2.0.tgz", + "integrity": "sha512-dgQfFdHCNg08nM5zBmqxqc9vrm0DVzhWotpavbPa0j4//MAOKZEB75yGAfzQE9fUJ+4pvM1239Y4IhL8f6sSog==", + "dev": true, + "optional": true + }, "@socket.io/component-emitter": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", @@ -11273,33 +11601,33 @@ } }, "babel-plugin-polyfill-corejs2": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.3.tgz", - "integrity": "sha512-bM3gHc337Dta490gg+/AseNB9L4YLHxq1nGKZZSHbhXv4aTYU2MD2cjza1Ru4S6975YLTaL1K8uJf6ukJhhmtw==", + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.6.tgz", + "integrity": "sha512-jhHiWVZIlnPbEUKSSNb9YoWcQGdlTLq7z1GHL4AjFxaoOUMuuEVJ+Y4pAaQUGOGk93YsVCKPbqbfw3m0SM6H8Q==", "dev": true, "requires": { - "@babel/compat-data": "^7.17.7", - "@babel/helper-define-polyfill-provider": "^0.4.0", - "semver": "^6.1.1" + "@babel/compat-data": "^7.22.6", + "@babel/helper-define-polyfill-provider": "^0.4.3", + "semver": "^6.3.1" } }, "babel-plugin-polyfill-corejs3": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.1.tgz", - "integrity": "sha512-ikFrZITKg1xH6pLND8zT14UPgjKHiGLqex7rGEZCH2EvhsneJaJPemmpQaIZV5AL03II+lXylw3UmddDK8RU5Q==", + "version": "0.8.6", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.6.tgz", + "integrity": "sha512-leDIc4l4tUgU7str5BWLS2h8q2N4Nf6lGZP6UrNDxdtfF2g69eJ5L0H7S8A5Ln/arfFAfHor5InAdZuIOwZdgQ==", "dev": true, "requires": { - "@babel/helper-define-polyfill-provider": "^0.4.0", - "core-js-compat": "^3.30.1" + "@babel/helper-define-polyfill-provider": "^0.4.3", + "core-js-compat": "^3.33.1" } }, "babel-plugin-polyfill-regenerator": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.0.tgz", - "integrity": "sha512-hDJtKjMLVa7Z+LwnTCxoDLQj6wdc+B8dun7ayF2fYieI6OzfuvcLMB32ihJZ4UhCBwNYGl5bg/x/P9cMdnkc2g==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.3.tgz", + "integrity": "sha512-8sHeDOmXC8csczMrYEOf0UTNa4yE2SxV5JGeT/LP1n0OYVDUUFPxG9vdk2AlDlIit4t+Kf0xCtpgXPBwnn/9pw==", "dev": true, "requires": { - "@babel/helper-define-polyfill-provider": "^0.4.0" + "@babel/helper-define-polyfill-provider": "^0.4.3" } }, "babel-walk": { @@ -11584,15 +11912,15 @@ } }, "browserslist": { - "version": "4.21.9", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", - "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", + "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" + "caniuse-lite": "^1.0.30001541", + "electron-to-chromium": "^1.4.535", + "node-releases": "^2.0.13", + "update-browserslist-db": "^1.0.13" } }, "bs-recipes": { @@ -11659,9 +11987,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001509", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001509.tgz", - "integrity": "sha512-2uDDk+TRiTX5hMcUYT/7CSyzMZxjfGu0vAUjS2g0LSD8UoXOv0LtpH4LxGMemsiPq6LCVIUjNwVM0erkOkGCDA==", + "version": "1.0.30001559", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001559.tgz", + "integrity": "sha512-cPiMKZgqgkg5LY3/ntGeLFUpi6tzddBNS58A4tnTgQw1zON7u2sZMU7SzOeVH4tj20++9ggL+V6FDOFMTaFFYA==", "dev": true }, "chalk": { @@ -11994,19 +12322,13 @@ "is-plain-object": "^5.0.0" } }, - "core-js": { - "version": "3.31.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.31.0.tgz", - "integrity": "sha512-NIp2TQSGfR6ba5aalZD+ZQ1fSxGhDo/s1w0nx3RYzf2pnJxt7YynxFlFScP6eV7+GZsKO95NSjGxyJsU3DZgeQ==", - "dev": true - }, "core-js-compat": { - "version": "3.31.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.31.0.tgz", - "integrity": "sha512-hM7YCu1cU6Opx7MXNu0NuumM0ezNeAeRKadixyiQELWY3vT3De9S4J5ZBMraWV2vZnrE1Cirl0GtFtDtMUXzPw==", + "version": "3.33.2", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.33.2.tgz", + "integrity": "sha512-axfo+wxFVxnqf8RvxTzoAlzW4gRoacrHeoFlc9n0x50+7BEyZL/Rt3hicaED1/CEd7I6tPCPVUYcJwCMO5XUYw==", "dev": true, "requires": { - "browserslist": "^4.21.5" + "browserslist": "^4.22.1" } }, "core-util-is": { @@ -12261,9 +12583,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.4.447", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.447.tgz", - "integrity": "sha512-sxX0LXh+uL41hSJsujAN86PjhrV/6c79XmpY0TvjZStV6VxIgarf8SRkUoUTuYmFcZQTemsoqo8qXOGw5npWfw==", + "version": "1.4.572", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.572.tgz", + "integrity": "sha512-RlFobl4D3ieetbnR+2EpxdzFl9h0RAJkPK3pfiwMug2nhBin2ZCsGIAJWdpNniLz43sgXam/CgipOmvTA+rUiA==", "dev": true }, "emoji-regex": { @@ -14174,7 +14496,8 @@ "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true + "dev": true, + "peer": true }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -14417,12 +14740,12 @@ } }, "magic-string": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz", - "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==", + "version": "0.30.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", + "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", "dev": true, "requires": { - "@jridgewell/sourcemap-codec": "^1.4.13" + "@jridgewell/sourcemap-codec": "^1.4.15" } }, "make-iterator": { @@ -14739,9 +15062,9 @@ "dev": true }, "node-releases": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz", - "integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", "dev": true }, "normalize-package-data": { @@ -15329,6 +15652,15 @@ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -15430,15 +15762,15 @@ } }, "regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", + "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==", "dev": true }, "regenerator-transform": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.1.tgz", - "integrity": "sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==", + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz", + "integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==", "dev": true, "requires": { "@babel/runtime": "^7.8.4" @@ -15715,11 +16047,23 @@ } }, "rollup": { - "version": "2.79.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", - "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", - "dev": true, - "requires": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.2.0.tgz", + "integrity": "sha512-deaMa9Z+jPVeBD2dKXv+h7EbdKte9++V2potc/ADqvVgEr6DEJ3ia9u0joarjC2lX/ubaCRYz3QVx0TzuVqAJA==", + "dev": true, + "requires": { + "@rollup/rollup-android-arm-eabi": "4.2.0", + "@rollup/rollup-android-arm64": "4.2.0", + "@rollup/rollup-darwin-arm64": "4.2.0", + "@rollup/rollup-darwin-x64": "4.2.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.2.0", + "@rollup/rollup-linux-arm64-gnu": "4.2.0", + "@rollup/rollup-linux-arm64-musl": "4.2.0", + "@rollup/rollup-linux-x64-gnu": "4.2.0", + "@rollup/rollup-linux-x64-musl": "4.2.0", + "@rollup/rollup-win32-arm64-msvc": "4.2.0", + "@rollup/rollup-win32-ia32-msvc": "4.2.0", + "@rollup/rollup-win32-x64-msvc": "4.2.0", "fsevents": "~2.3.2" } }, @@ -15867,6 +16211,15 @@ } } }, + "serialize-javascript": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", + "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, "serve-index": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", @@ -16009,6 +16362,12 @@ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, + "smob": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/smob/-/smob-1.4.1.tgz", + "integrity": "sha512-9LK+E7Hv5R9u4g4C3p+jjLstaLe11MDsL21UpYaCNmapvMkYhqCV4A/f/3gyH8QjMyh6l68q9xC85vihY9ahMQ==", + "dev": true + }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -16230,6 +16589,24 @@ "urix": "^0.1.0" } }, + "source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "source-map-url": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", @@ -16452,6 +16829,26 @@ "es6-symbol": "^3.1.1" } }, + "terser": { + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.24.0.tgz", + "integrity": "sha512-ZpGR4Hy3+wBEzVEnHvstMvqpD/nABNelQn/z2r0fjVWGQsN3bpOLzQlqDxmb4CDZnXq5lpjnQ+mHQLAOpfM5iw==", + "dev": true, + "requires": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "dependencies": { + "acorn": { + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", + "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "dev": true + } + } + }, "through2": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", @@ -16751,9 +17148,9 @@ } }, "update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "dev": true, "requires": { "escalade": "^3.1.1", diff --git a/package.json b/package.json index a52db27..cccfbbc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "reveal.js-appearance", - "version": "1.3.0", + "version": "1.3.1", "description": "An animation plugin for Reveal.js that animates elements sequentially like in Powerpoint. Perfect for online portfolios or other presentations with images.", "keywords": [ "reveal", @@ -37,12 +37,12 @@ }, "browserslist": "> 2%, not dead", "devDependencies": { - "@babel/preset-env": "^7.22.5", - "@rollup/plugin-babel": "^6.0.3", - "@rollup/plugin-commonjs": "^25.0.2", - "@rollup/plugin-node-resolve": "^15.1.0", + "@babel/preset-env": "^7.23.2", + "@rollup/plugin-babel": "^6.0.4", + "@rollup/plugin-commonjs": "^25.0.7", + "@rollup/plugin-node-resolve": "^15.2.3", + "@rollup/plugin-terser": "^0.4.4", "browser-sync": "^2.29.3", - "core-js": "^3.31.0", "del": "^5.1.0", "gulp": "^4.0.2", "gulp-autoprefixer": "^8.0.0", @@ -52,7 +52,7 @@ "gulp-rename": "^2.0.0", "gulp-sass": "^5.1.0", "merge-stream": "^2.0.0", - "rollup": "^2.79.1", + "rollup": "^4.2.0", "sass": "^1.63.6" }, "dependencies": { diff --git a/plugin/appearance/appearance.css b/plugin/appearance/appearance.css index 18f0d4c..19cbf94 100644 --- a/plugin/appearance/appearance.css +++ b/plugin/appearance/appearance.css @@ -2,7 +2,7 @@ /***************************************************************** * * Appearance for Reveal.js - * Version 1.3.0 + * Version 1.3.1 * * @author: Martijn De Jongh (Martino), martijn.de.jongh@gmail.com * https://github.com/martinomagnifico @@ -148,6 +148,16 @@ } /* Animate.css overrides */ +section:not(.stack):not([data-appearance-can-start]) .animate__animated, section:not(.stack):not([data-appearance-can-start]) .animated { + opacity: 0; + animation: none; +} + +section:not(.stack)[data-appearance-can-start] .animate__animated:not(.fragment), section:not(.stack)[data-appearance-can-start] .animated:not(.fragment) { + opacity: 1; +} + +/* Animations inside fragments */ section:not(.stack):not([data-appearance-can-start]) .animate__animated, section:not(.stack):not([data-appearance-can-start]) .animated, .fragment:not(.visible) .animate__animated, @@ -165,25 +175,33 @@ section:not(.stack):not([data-appearance-can-start]) .animated, opacity: 1; } -.fragment.animate__animated:not(.visible), .fragment.animated:not(.visible) { - transition: opacity 0.3s ease-in-out !important; +/* Animations which are also fragments */ +.reveal .fragment.animate__animated:not(.visible), .reveal .fragment.animated:not(.visible) { + transition: all 0.2s ease; opacity: 0; animation: none; will-change: animation; } -.fragment.animate__animated.visible.animate__animated, .fragment.animate__animated.visible.animated, .fragment.animated.visible.animate__animated, .fragment.animated.visible.animated { +.reveal .fragment.animate__animated.visible:not(.animationended), .reveal .fragment.animated.visible:not(.animationended) { transition: none; } +.reveal .fragment.animate__animated.visible.animationended, .reveal .fragment.animated.visible.animationended { + animation: none; + transition: all 0.2s ease; +} i.animate__animated, i.animated, span.animate__animated, span.animated { display: inline-block; } -.animate__animated.animationended, -.animated.animationended { +.animate__animated[data-auto-animate-target]:not([data-auto-animate-target=unmatched]) { animation: none; } +[data-auto-animate=running] .animate__animated[data-auto-animate-target]:not([data-auto-animate-target=unmatched]) { + opacity: 1 !important; +} + .fast, .animate__fast { animation-duration: calc(var(--animate-duration) * 0.8); } diff --git a/plugin/appearance/appearance.esm.js b/plugin/appearance/appearance.esm.js index e9c38ae..f75162f 100644 --- a/plugin/appearance/appearance.esm.js +++ b/plugin/appearance/appearance.esm.js @@ -1,8 +1,7 @@ - /***************************************************************** * * Appearance for Reveal.js - * Version 1.3.0 + * Version 1.3.1 * * @author: Martijn De Jongh (Martino), martijn.de.jongh@gmail.com * https://github.com/martinomagnifico @@ -13,694 +12,4 @@ * Copyright (C) 2023 Martijn De Jongh (Martino) * ******************************************************************/ - -/** - * Check if a given string is valid JSON. - * @param {string} str - The string to be checked. - * @returns {boolean} `true` if the string is valid JSON, otherwise `false`. - */ -const isJSON = str => { - try { - return JSON.parse(str) && !!str; - } catch (e) { - return false; - } -}; - -/** - * Check if an element has child nodes that are `SECTION` elements. - * @param {Object} param0 - Object with childNodes property. - * @param {NodeListOf} param0.childNodes - List of child nodes of the element. - * @returns {boolean} `true` if the element contains `SECTION` child nodes, otherwise `false`. - */ -const isStack = _ref => { - let { - childNodes - } = _ref; - let isStack = false; - for (let i = 0; i < childNodes.length; i++) { - if (childNodes[i].tagName == "SECTION") { - isStack = true; - break; - } - } - return isStack; -}; - -/** - * Copy data attributes from a source element to a target element with an optional exception. - * @param {Object} param0 - Object with attributes property. - * @param {NamedNodeMap} param0.attributes - Map of attributes of the source element. - * @param {Element} target - Target element to copy attributes to. - * @param {string} [not] - Optional attribute name to exclude from copying. - */ -const copyDataAttributes = (_ref2, target, not) => { - let { - attributes - } = _ref2; - [...attributes].filter(_ref3 => { - let { - nodeName - } = _ref3; - return nodeName.includes('data'); - }).forEach(_ref4 => { - let { - nodeName, - nodeValue - } = _ref4; - if (not && nodeName !== not || !not) { - target.setAttribute(nodeName, nodeValue); - } - }); -}; - -/** - * Check if the given item is an object and not an array. - * @param {*} item - The item to be checked. - * @returns {boolean} `true` if the item is an object and not an array, otherwise `false`. - */ -const isObject = item => { - return item && typeof item === 'object' && !Array.isArray(item); -}; - -/** - * Deep merge multiple objects into a target object. - * @param {Object} target - Target object to merge values into. - * @param {...Object} sources - Source objects to merge from. - * @returns {Object} The merged object. - */ -const mergeDeep = function (target) { - for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - sources[_key - 1] = arguments[_key]; - } - if (!sources.length) return target; - const source = sources.shift(); - if (isObject(target) && isObject(source)) { - for (const key in source) { - if (isObject(source[key])) { - if (!target[key]) Object.assign(target, { - [key]: {} - }); - mergeDeep(target[key], source[key]); - } else { - Object.assign(target, { - [key]: source[key] - }); - } - } - } - return mergeDeep(target, ...sources); -}; - -/** - * Resolves the given Promise immediately using setTimeout. - * @param {Function} resolve - The resolve function of a Promise. - * @returns {number} The ID value of the timer that is set. - */ -const doneLoading = resolve => { - return setTimeout(resolve, 0); -}; - -/** - * Converts a JavaScript object or a JSON-formatted string to a JSON string. - * - * @param {Object|string} str - The input string or object to be converted to a JSON string. - * @returns {string} The JSON string. - */ -const toJSONString = str => { - let JSONString = ''; - if (typeof str === "string") str = str.replace(/[“”]/g, '"').replace(/[‘’]/g, "'"); - if (isJSON(str)) { - JSONString = str; - } else { - if (typeof str === "object") { - JSONString = JSON.stringify(str, null, 2); - } else { - JSONString = str.trim().replace(/'/g, '"').charAt(0) === "{" ? str.trim().replace(/'/g, '"') : `{${str.trim().replace(/'/g, '"')}}`; - } - } - return JSONString; -}; - -/** - * Dynamically loads a stylesheet from the specified URL and calls a callback function when it's loaded. - * - * @param {string} url - The URL of the stylesheet to load. - * @param {Function} callback - A callback function to be called when the stylesheet is loaded. - */ -const loadStyle = (url, callback) => { - const head = document.querySelector('head'); - const style = document.createElement('link'); - style.rel = 'stylesheet'; - style.href = url; - style.onload = () => { - if (typeof callback === 'function') { - callback.call(); - callback = null; - } - }; - style.onreadystatechange = () => { - if (style.readyState === 'loaded') { - style.onload(); - } - }; - head.appendChild(style); -}; - -/** - * Retrieves the path of a JavaScript file based on its filename. - * - * @param {string} fileName - The filename of the script. - * @returns {string} The path to the plugin's location. - */ -const pluginPath = fileName => { - let path; - let pluginScript = document.querySelector(`script[src$="${fileName}"]`); - if (pluginScript) { - path = pluginScript.getAttribute("src").slice(0, -1 * fileName.length); - } else { - path = import.meta.url.slice(0, import.meta.url.lastIndexOf('/') + 1); - } - return path; -}; -const debugLog = (options, text) => { - if (options.debug) console.log(text); -}; - -/** - * Retrieves and loads CSS stylesheets based on the provided options and ES5 filename. - * - * @param {Object} options - Configuration options for loading CSS. - * @param {string} fileName - The filename of the script. - */ - -const getAndLoadCSS = (options, fileName) => { - let thePath = pluginPath(fileName); - let pluginBaseName = fileName.replace(/\.[^/.]+$/, ""); - let AppearanceStylePath = options.csspath.appearance ? options.csspath.appearance : `${thePath}${pluginBaseName}.css` || `plugin/${pluginBaseName}/${pluginBaseName}.css`; - let AnimateCSSPath = !options.compatibility ? options.animatecsspath.link : options.animatecsspath.compat; - if (options.debug) { - console.log(`Paths:`); - console.log(` - Plugin path = ${thePath}`); - console.log(` - Appearance CSS path = ${AppearanceStylePath}`); - console.log(` - AnimateCSS CSS path = ${AnimateCSSPath}`); - } - loadStyle(AnimateCSSPath, function () { - loadStyle(AppearanceStylePath); - }); -}; - -/** - * Adds automatic animations to elements within a section based on specified criteria. - * - * This function examines the provided section for attributes and options to determine - * which classes should be added to its elements to enable automatic animations. - * - * @param {HTMLElement} section - The section element to which automatic animations will be applied. - * @param {Object} options - The existing user options object - * @param {Object} vars - The existing vars object - * @returns {undefined} - */ -const addAutoAnimation = (section, options, vars) => { - let sectionAutoSelectors = null; - if (section.hasAttribute("data-autoappear")) { - let sectDataAppear = section.dataset.autoappear; - if (sectDataAppear == "auto" || sectDataAppear == "" || sectDataAppear.length < 1 || sectDataAppear == "true") { - // This section should get the global autoappear classes on its objects - sectionAutoSelectors = options.autoelements ? options.autoelements : null; - } else { - // This section should get the local autoappear classes on its objects - sectionAutoSelectors = sectDataAppear; - } - } else if (options.autoappear && options.autoelements) { - // This section should get the global autoappear classes on its objects - sectionAutoSelectors = options.autoelements; - } - if (sectionAutoSelectors) { - let elementsToAnimate = JSON.parse(toJSONString(sectionAutoSelectors)); - Object.entries(elementsToAnimate).forEach(_ref => { - let [selector, assignables] = _ref; - // Exclude the elements from vars.appearances - let elements = Array.from(section.querySelectorAll(selector)).filter(element => !vars.appearances.includes(element)); - if (elements.length) { - elements.forEach(element => { - vars.appearances.push(element); - let newClasses = [], - newDelay = null, - speedClass = false, - elementSplit = null, - containerDelay = null; - if (Array.isArray(assignables)) { - newClasses = assignables[0].split(/[ ,]+/); - newDelay = assignables[1]; - } else if (typeof assignables == "string") { - newClasses = assignables.split(/[ ,]+/); - } else if (assignables.constructor === Object) { - if (assignables.class || assignables.animation) { - let animationClass = assignables.animation ? assignables.animation : assignables.class; - newClasses = animationClass.split(/[ ,]+/); - } - if (assignables.speed) { - speedClass = String(assignables.speed); - if (!speedClass.includes("animate__")) { - speedClass = `animate__${speedClass}`; - } - } - if (assignables.delay) { - newDelay = String(assignables.delay); - } - if (assignables.split) { - elementSplit = String(assignables.split); - } - if (assignables["container-delay"]) { - containerDelay = String(assignables["container-delay"]); - } - } - element.classList.add(...newClasses); - if (speedClass) { - element.classList.add(speedClass); - } - if (newDelay) { - element.dataset.delay = newDelay; - } - if (elementSplit) { - element.dataset.split = elementSplit; - } - if (containerDelay) { - element.dataset.containerDelay = containerDelay; - } - }); - } - }); - } -}; - -/** - * Hoist a list item's appearance to its parent element's appearance. - * - * @param {HTMLElement} from - The list item element. - * @returns {undefined} - */ -const hoistAppearance = (from, baseclass) => { - let to = from.parentNode; - if (!to) return; - for (const sibling of to.children) { - if (sibling !== from && sibling.dataset.appearParent) return; - } - to.classList = from.classList; - copyDataAttributes(from, to, "data-appear-parent"); - to.innerHTML = from.innerHTML; - to.classList.add(baseclass); -}; - -/** - * Fix list items that were changed by Quarto. - * - * This function is designed for use with Quarto and handles the conversion of list items - * with Appearance classes to their parent elements when a manual attribute is present. - * It also provides automatic conversion for list items that directly contain spans, which - * is related to Quarto's wrapping of list content in a span. - * - * @param {HTMLElement} appearance - The list item element whose appearance will be converted. - * @param {Object} options - An options object that controls the conversion behavior. - * @param {boolean} options.appearparents - If `true`, automatic conversion of list items with spans is enabled. - * @returns {undefined} - */ -const fixListItem = (appearance, options, names) => { - let baseclass = names.baseclass; - if (appearance.hasAttribute("data-appear-parent")) { - hoistAppearance(appearance, baseclass); - } - if (options.appearparents) { - if (appearance.parentNode && appearance.parentNode.tagName) { - if (appearance.tagName == "SPAN" && appearance.parentNode.tagName == "LI") { - let spanLength = String(appearance.outerHTML).length; - let liContentLength = String(appearance.parentNode.innerHTML).length; - if (spanLength == liContentLength) { - hoistAppearance(appearance); - } - } - } - } -}; - -/** - * Adds a base class to an HTML element if it doesn't already have it. - * - * This function checks if the specified HTML element has the specified base class, - * and if not, it adds the base class to the element's class list. - * - * @param {HTMLElement} appearance - The HTML element to which the base class should be added. - * @param {Object} names - The existing 'names' object - * @returns {undefined} - */ - -const addBaseClass = (appearance, names) => { - if (!appearance.classList.contains(names.baseclass)) { - appearance.classList.add(names.baseclass); - } - if (appearance.classList.contains(names.fragmentClass)) { - appearance.classList.add('custom'); - } -}; - -const addDelay = (appearanceArray, options, names) => { - let delay = 0; - appearanceArray.forEach((appearance, index) => { - if (index == 0 && appearance.dataset.delay || index != 0) { - let elementDelay = options.delay; - if (appearance.dataset && appearance.dataset.delay) { - elementDelay = parseInt(appearance.dataset.delay); - } - delay = delay + elementDelay; - appearance.style.setProperty('animation-delay', delay + "ms"); - appearance.removeAttribute('data-delay'); - } - }); -}; - -/** - * Selects elements with a specified class that are not nested inside an element with another specified class. - * @param {string} targetClass - The class name to select elements. - * @param {string} excludeClass - The class name to exclude elements nested inside it. - * @param {Element} el - The element to find the target elements in. - * @returns {Element[]} - Array of selected elements. - */ -const elemsNotInClass = (targetClass, excludeClass, el) => Array.from(el.querySelectorAll(`.${targetClass}`)).filter(s => !s.closest(`.${excludeClass}`)); - -/** - * Selects elements with a specified class that are nested inside an element with another specified class. - * @param {string} targetClass - The class name to select elements. - * @param {string} parentClass - The class name of the parent to find elements in. - * @param {Element} el - The element to find the target elements in. - * @returns {Element[]} - Array of selected elements. - */ -const elemsInClass = (targetClass, parentClass, el) => Array.from(el.querySelectorAll(`.${targetClass}`)).filter(s => s.closest(`.${parentClass}`) === el); - -/** - * Extracts groups of elements with a specified class from the provided section element. - * Groups are formed based on nesting inside elements with another specified class. - * @param {Element} section - The section to extract data from. - * @returns {Element[][]} - Nested arrays of selected elements. - */ - -/** - * Extracts groups of elements with a specified class from the provided section element. - * Groups are formed based on nesting inside elements with another specified class. - * @param {Element} section - The section to extract data from. - * @param {string} targetClass - The class name to select elements. - * @param {string} groupClass - The class name of the parent to find elements in. - * @returns {Element[][]} - Nested arrays of selected elements. - */ -const getAppearanceArrays = (section, targetClass, groupClass) => { - const result = [elemsNotInClass(targetClass, groupClass, section), ...Array.from(section.querySelectorAll(`.${groupClass}`)).map(frag => elemsInClass(targetClass, groupClass, frag))]; - if (result.some(group => group.length > 0)) { - return result; - } else { - return false; - } -}; - -const convertToSpans = (parent, kind) => { - let splitElements = false; - let joinChar = ' '; - if (kind == "words") { - splitElements = parent.textContent.trim().split(/\s+/); - } else if (kind == "letters") { - splitElements = parent.textContent.trim().split(''); - joinChar = ''; - } - if (splitElements) { - const parentAnimateClasses = Array.from(parent.classList).filter(className => className.startsWith('animate__')); - const newHtml = splitElements.map((element, index) => { - const span = document.createElement('span'); - span.textContent = element; - if (element == " ") { - span.textContent = "\u00A0"; - } - if (parent.dataset.delay && index !== 0) { - span.dataset.delay = parent.dataset.delay; - } - if (parent.dataset.containerDelay && index === 0) { - span.dataset.delay = parent.dataset.containerDelay; - } - parent.classList.forEach(className => className.startsWith('animate__') && span.classList.add(className)); - return span.outerHTML; - }).join(joinChar); - parentAnimateClasses.forEach(className => parent.classList.remove(className)); - parent.removeAttribute('data-delay'); - parent.removeAttribute('data-split'); - parent.removeAttribute('data-container-delay'); - parent.innerHTML = newHtml; - } -}; - -/** - * Derives slide from and to from the event object. - * - * @param {Object} event - The event object containing slide transition details. - * @returns {Object} - An object containing references to the "from" and "to" slides. - */ -const fromTo = event => { - let slides = {}; - slides.from = event.fromSlide || event.previousSlide || null; - slides.to = event.toSlide || event.currentSlide || null; - return slides; -}; - -/** - * A function that determines the appearance event for a given slide. - * - * This function checks the `data-appearevent` attribute of the slide and the `options.appearevent` parameter. - * If `data-appearevent` is set to "auto", it is converted to "autoanimate". If `options.appearevent` is "auto", it is also converted to "autoanimate". - * The function returns the appearance event, prioritizing `data-appearevent` over `options.appearevent`. - * - * @param {HTMLElement} toSlide - The slide for which the appearance event is determined. - * @param {Object} options - An object containing options for the appearance event. - * @param {string} options.appearevent - The appearance event option provided in the `options` object. - * - * @returns {string} - The determined appearance event for the slide, either from `data-appearevent` or `options.appearevent`. - */ -const slideAppearevent = (toSlide, options) => { - if (toSlide.dataset.appearevent && toSlide.dataset.appearevent === "auto") { - toSlide.dataset.appearevent = "autoanimate"; - } - if (options.appearevent == "auto") { - options.appearevent = "autoanimate"; - } - return toSlide.dataset.appearevent ? toSlide.dataset.appearevent : options.appearevent; -}; - -/** - * Remove the 'data-appearance-can-start' attribute from the 'from' slide if the 'hideagain' option is enabled. - * - * @param {HTMLElement} slides - The container element for the slides. - * @param {Object} options - An object containing configuration options. - * @param {boolean} options.hideagain - A flag indicating whether to remove the attribute when 'hideagain' is true. - */ -const removeStartAttribute = (slides, options) => { - if (options.hideagain) { - if (slides.from && slides.from.dataset.appearanceCanStart) { - slides.from.removeAttribute('data-appearance-can-start'); - } - } -}; - -/** - * Turn off slide appearances when transitioning from one slide to another if the 'hideagain' option is enabled. - * - * @param {HTMLElement} slides - The container element for the slides. - * @param {Object} options - An object containing configuration options. - * @param {string} names.animatecss - The CSS selector for animated elements. - */ -const turnOffSlideAppearances = (slides, options, names) => { - if (options.hideagain) { - let fromAppearances = slides.from.querySelectorAll(names.animatecss); - fromAppearances.forEach(appearance => { - appearance.classList.remove('animationended'); - }); - // Remove visible class from fragments when moving away from that slide - let fromFragments = slides.from.querySelectorAll(`.fragment.visible`); - if (fromFragments) { - fromFragments.forEach(fragment => { - fragment.classList.remove('visible'); - }); - } - } -}; - -/** - * Handles the showing and hiding of slides based on the provided event and options. - * - * @param {Object} event - The event object containing slide transition details. - * @param {Object} options - An object containing configurations for slide appearance management. - */ -const showHideSlide = (event, options, names, vars) => { - let view = vars.deck.getConfig().view; - let etype = event.type; - let slides = fromTo(event); - if (slides.to) { - if (etype == "ready") { - slides.to.dataset.appearanceCanStart = true; - } - let appearevent = slideAppearevent(slides.to, options); - if (etype == appearevent || etype == "slidetransitionend" && appearevent == "autoanimate") { - slides.to.dataset.appearanceCanStart = true; - } - - // Add experimental Reader mode compatibility, does not have a slidetransitionend event yet - if (view == "scroll" && etype == 'slidechanged') { - removeStartAttribute(slides, options); - turnOffSlideAppearances(slides, options, names); - - // Add delay to allow for scroll animation to finish - setTimeout(() => { - slides.to.dataset.appearanceCanStart = true; - }, options.delay); - } - if (etype == "slidetransitionend") { - removeStartAttribute(slides, options); - turnOffSlideAppearances(slides, options, names); - } - if (etype == 'slidechanged' && document.body.dataset.exitoverview) { - removeStartAttribute(slides, options); - slides.to.dataset.appearanceCanStart = true; - } else if (etype == 'overviewhidden') { - document.body.dataset.exitoverview = true; - setTimeout(() => { - document.body.removeAttribute('data-exitoverview'); - }, 500); - if (event.currentSlide) { - removeStartAttribute(slides, options); - slides.to.dataset.appearanceCanStart = true; - } - } - } -}; - -const Plugin = () => { - const vars = {}; - vars.names = {}; - let options = {}; - - /** - * Prepare the plugin to find Appearance elements - * @param {Object} vars - The variables to be prepared. - * @param {Object} names - The names to be prepared. - * @param {Function} resolve - The callback function to be called when preparation is complete. - * @throws {Error} Throws an error if the 'options' object is not defined. - */ - const prepare = (options, vars, resolve) => { - debugLog(options, "------------- Preloading -------------"); - let names = vars.names; - getAndLoadCSS(options, names.es5Filename); - if (options.compatibility) { - names.animatecss = '.backInDown, .backInLeft, .backInRight, .backInUp, .bounceIn, .bounceInDown, .bounceInLeft, .bounceInRight, .bounceInUp, .fadeIn, .fadeInDown, .fadeInDownBig, .fadeInLeft, .fadeInLeftBig, .fadeInRight, .fadeInRightBig, .fadeInUp, .fadeInUpBig, .fadeInTopLeft, .fadeInTopRight, .fadeInBottomLeft, .fadeInBottomRight, .flipInX, .flipInY, .lightSpeedInRight, .lightSpeedInLeft, .rotateIn, .rotateInDownLeft, .rotateInDownRight, .rotateInUpLeft, .rotateInUpRight, .jackInTheBox, .rollIn, .zoomIn, .zoomInDown, .zoomInLeft, .zoomInRight, .zoomInUp, .slideInDown, .slideInLeft, .slideInRight, .slideInUp, .skidLeft, .skidLeftBig, .skidRight, .skidRightBig, .shrinkIn, .shrinkInBlur'; - names.baseclass = options.compatibilitybaseclass; - } - vars.appearances = Array.from(vars.slides.querySelectorAll(names.animatecss)); - - // Go through each section to see if there are any (auto) selectors that need animation classes - vars.regularSections.forEach(theSection => addAutoAnimation(theSection, options, vars)); - vars.appearances.forEach((theAppearance, index) => { - // Fix any list item where the Appearance classes were moved to the span (Quarto does this) - fixListItem(theAppearance, options, names); - - // Go through each appearance element and add the baseclass if it doesn't have it - addBaseClass(theAppearance, names); - if (theAppearance.hasAttribute('data-split')) { - convertToSpans(theAppearance, theAppearance.dataset.split); - } - }); - vars.regularSections.forEach((theSection, index) => { - // Get all the Appearances in the section as separate arrays per delay loop - let appearanceArrays = getAppearanceArrays(theSection, names.baseclass, names.fragmentClass); - if (appearanceArrays) { - appearanceArrays.forEach(appearanceArray => { - // Add the delays to each appearance in the array - addDelay(appearanceArray, options); - }); - } - }); - doneLoading(resolve); - }; - - /** - * The main function of the plugin - * @param {object} deck - The deck object - * @param {object} options - The options object - * @param {string} es5Filename - The name of the file that will be used - */ - const Appear = function (deck, options, es5Filename) { - let names = vars.names; - - // Set up names - names.baseclass = options.baseclass; - names.compatibilitybaseclass = options.compatibilitybaseclass; - names.fragmentSelector = ".fragment"; - names.fragmentClass = "fragment"; - names.speedClasses = ['slower', 'slow', 'fast', 'faster']; - names.speedClasses.push(...names.speedClasses.map(speed => `animate__${speed}`)); - names.animatecss = '[class^="animate__"],[class*=" animate__"]'; - names.es5Filename = es5Filename; - names.eventnames = ['ready', 'slidechanged', 'slidetransitionend', 'autoanimate', 'overviewhidden', 'scrolle']; - - // Set up variables - vars.deck = deck; - vars.dom = deck.getRevealElement(); - vars.viewport = deck.getViewportElement(); - vars.slides = deck.getSlidesElement(); - vars.sections = vars.slides.querySelectorAll('section'); - vars.fragments = vars.slides.querySelectorAll(names.fragmentSelector); - vars.regularSections = Array.from(vars.sections).filter(section => !isStack(section)); - if (/receiver/i.test(window.location.search)) vars.viewport.classList.add('sv'); - names.eventnames.forEach(eventname => deck.on(eventname, event => { - showHideSlide(event, options, names, vars); - })); - vars.viewport.addEventListener("animationend", event => { - event.target.classList.add('animationended'); - }); - vars.viewport.addEventListener("fragmenthidden", event => { - event.fragment.classList.remove('animationended'); - event.fragment.querySelectorAll('.animationended').forEach(el => { - el.classList.remove('animationended'); - }); - }); - return new Promise(resolve => { - prepare(options, vars, resolve); - debugLog(options, "---------- Done preloading ----------"); - }); - }; - - /** - * Initialize the plugin - * @param {object} deck - The deck object - */ - const init = function (deck) { - let defaultOptions = { - baseclass: 'animate__animated', - hideagain: true, - delay: 300, - debug: false, - appearevent: 'slidetransitionend', - autoappear: false, - autoelements: false, - appearparents: false, - csspath: '', - animatecsspath: { - link: 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css', - compat: 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.compat.css' - }, - compatibility: false, - compatibilitybaseclass: 'animated' - }; - options = mergeDeep(defaultOptions, deck.getConfig().appearance || {}); - return Appear(deck, options, "appearance.js"); - }; - return { - id: 'appearance', - init: init - }; -}; - -export { Plugin as default }; +const e=e=>e&&"object"==typeof e&&!Array.isArray(e),t=(a,...n)=>{if(!n.length)return a;const s=n.shift();if(e(a)&&e(s))for(const n in s)e(s[n])?(a[n]||Object.assign(a,{[n]:{}}),t(a[n],s[n])):Object.assign(a,{[n]:s[n]});return t(a,...n)},a=e=>{let t="";return"string"==typeof e&&(e=e.replace(/[“”]/g,'"').replace(/[‘’]/g,"'")),t=(e=>{try{return JSON.parse(e)&&!!e}catch(e){return!1}})(e)?e:"object"==typeof e?JSON.stringify(e,null,2):"{"===e.trim().replace(/'/g,'"').charAt(0)?e.trim().replace(/'/g,'"'):`{${e.trim().replace(/'/g,'"')}}`,t},n=(e,t,a)=>{let n,s=document.querySelector("head");"script"===t?(n=document.createElement("script"),n.type="text/javascript",n.src=e):"stylesheet"===t&&(n=document.createElement("link"),n.rel="stylesheet",n.href=e);const r=()=>{"function"==typeof a&&(a.call(),a=null)};n.onload=r,n.onreadystatechange=function(){"loaded"===this.readyState&&r()},s.appendChild(n)},s=(e,t)=>{e.debug&&console.log(t)},r=(e,t)=>{let a=(e=>{let t,a=document.querySelector(`script[src$="${e}"]`);return t=a?a.getAttribute("src").slice(0,-1*e.length):import.meta.url.slice(0,import.meta.url.lastIndexOf("/")+1),t})(t),s=t.replace(/\.[^/.]+$/,""),r=e.csspath.appearance?e.csspath.appearance:`${a}${s}.css`||`plugin/${s}/${s}.css`,i=e.compatibility?e.animatecsspath.compat:e.animatecsspath.link;e.debug&&(console.log("Paths:"),console.log(` - Plugin path = ${a}`),console.log(` - Appearance CSS path = ${r}`),console.log(` - AnimateCSS CSS path = ${i}`)),n(i,"stylesheet",(function(){n(r,"stylesheet")}))},i=(e,t)=>{let a=e.parentNode;if(a){for(const t of a.children)if(t!==e&&t.dataset.appearParent)return;a.classList=e.classList,(({attributes:e},t,a)=>{[...e].filter((({nodeName:e})=>e.includes("data"))).forEach((({nodeName:e,nodeValue:n})=>{(a&&e!==a||!a)&&t.setAttribute(e,n)}))})(e,a,"data-appear-parent"),a.innerHTML=e.innerHTML,a.classList.add(t)}},l=(e,t,a)=>Array.from(a.querySelectorAll(`.${e}`)).filter((e=>!e.closest(`.${t}`))),o=(e,t,a)=>{const n=[l(t,a,e),...Array.from(e.querySelectorAll(`.${a}`)).map((e=>((e,t,a)=>Array.from(a.querySelectorAll(`.${e}`)).filter((e=>e.closest(`.${t}`)===a)))(t,a,e)))];return!!n.some((e=>e.length>0))&&n},c=(e,t)=>{t.hideagain&&e.from&&e.from.dataset.appearanceCanStart&&e.from.removeAttribute("data-appearance-can-start")},d=(e,t,a)=>{if(t.hideagain){e.from.querySelectorAll(a.animatecss).forEach((e=>{e.classList.remove("animationended")}));let t=e.from.querySelectorAll(".fragment.visible");t&&t.forEach((e=>{e.classList.remove("visible")}))}},p=()=>{const e={names:{}};let n={};const l=(e,t,n)=>{s(e,"------------- Preloading -------------");let l=t.names;r(e,l.es5Filename),e.compatibility&&(l.animatecss=".backInDown, .backInLeft, .backInRight, .backInUp, .bounceIn, .bounceInDown, .bounceInLeft, .bounceInRight, .bounceInUp, .fadeIn, .fadeInDown, .fadeInDownBig, .fadeInLeft, .fadeInLeftBig, .fadeInRight, .fadeInRightBig, .fadeInUp, .fadeInUpBig, .fadeInTopLeft, .fadeInTopRight, .fadeInBottomLeft, .fadeInBottomRight, .flipInX, .flipInY, .lightSpeedInRight, .lightSpeedInLeft, .rotateIn, .rotateInDownLeft, .rotateInDownRight, .rotateInUpLeft, .rotateInUpRight, .jackInTheBox, .rollIn, .zoomIn, .zoomInDown, .zoomInLeft, .zoomInRight, .zoomInUp, .slideInDown, .slideInLeft, .slideInRight, .slideInUp, .skidLeft, .skidLeftBig, .skidRight, .skidRightBig, .shrinkIn, .shrinkInBlur",l.baseclass=e.compatibilitybaseclass),t.appearances=Array.from(t.slides.querySelectorAll(l.animatecss)),t.regularSections.forEach((n=>((e,t,n)=>{let s=null;if(e.hasAttribute("data-autoappear")){let a=e.dataset.autoappear;s="auto"==a||""==a||a.length<1||"true"==a?t.autoelements?t.autoelements:null:a}else t.autoappear&&t.autoelements&&(s=t.autoelements);if(s){let t=JSON.parse(a(s));Object.entries(t).forEach((([t,a])=>{let s=Array.from(e.querySelectorAll(t)).filter((e=>!n.appearances.includes(e)));s.length&&s.forEach((e=>{n.appearances.push(e);let t=[],s=null,r=!1,i=null,l=null;Array.isArray(a)?(t=a[0].split(/[ ,]+/),s=a[1]):"string"==typeof a?t=a.split(/[ ,]+/):a.constructor===Object&&((a.class||a.animation)&&(t=(a.animation?a.animation:a.class).split(/[ ,]+/)),a.speed&&(r=String(a.speed),r.includes("animate__")||(r=`animate__${r}`)),a.delay&&(s=String(a.delay)),a.split&&(i=String(a.split)),a["container-delay"]&&(l=String(a["container-delay"]))),e.classList.add(...t),r&&e.classList.add(r),s&&(e.dataset.delay=s),i&&(e.dataset.split=i),l&&(e.dataset.containerDelay=l)}))}))}})(n,e,t))),t.appearances.forEach(((t,a)=>{((e,t,a)=>{let n=a.baseclass;e.hasAttribute("data-appear-parent")&&i(e,n),t.appearparents&&e.parentNode&&e.parentNode.tagName&&"SPAN"==e.tagName&&"LI"==e.parentNode.tagName&&String(e.outerHTML).length==String(e.parentNode.innerHTML).length&&i(e)})(t,e,l),((e,t)=>{e.classList.contains(t.baseclass)||e.classList.add(t.baseclass),e.classList.contains(t.fragmentClass)&&e.classList.add("custom")})(t,l),t.hasAttribute("data-split")&&((e,t)=>{let a=!1,n=" ";if("words"==t?a=e.textContent.trim().split(/\s+/):"letters"==t&&(a=e.textContent.trim().split(""),n=""),a){const t=Array.from(e.classList).filter((e=>e.startsWith("animate__"))),s=a.map(((t,a)=>{const n=document.createElement("span");return n.textContent=t," "==t&&(n.textContent=" "),e.dataset.delay&&0!==a&&(n.dataset.delay=e.dataset.delay),e.dataset.containerDelay&&0===a&&(n.dataset.delay=e.dataset.containerDelay),e.classList.forEach((e=>e.startsWith("animate__")&&n.classList.add(e))),n.outerHTML})).join(n);t.forEach((t=>e.classList.remove(t))),e.removeAttribute("data-delay"),e.removeAttribute("data-split"),e.removeAttribute("data-container-delay"),e.innerHTML=s}})(t,t.dataset.split)})),t.regularSections.forEach(((t,a)=>{let n=o(t,l.baseclass,l.fragmentClass);n&&n.forEach((t=>{((e,t,a)=>{let n=0;e.forEach(((e,a)=>{if(0==a&&e.dataset.delay||0!=a){let a=t.delay;e.dataset&&e.dataset.delay&&(a=parseInt(e.dataset.delay)),n+=a,e.style.setProperty("animation-delay",n+"ms"),e.removeAttribute("data-delay")}}))})(t,e)}))})),(e=>{setTimeout(e,0)})(n)},p=function(t,a,n){let r=e.names;return r.baseclass=a.baseclass,r.compatibilitybaseclass=a.compatibilitybaseclass,r.fragmentSelector=".fragment",r.fragmentClass="fragment",r.speedClasses=["slower","slow","fast","faster"],r.speedClasses.push(...r.speedClasses.map((e=>`animate__${e}`))),r.animatecss='[class^="animate__"],[class*=" animate__"]',r.es5Filename=n,r.eventnames=["ready","slidechanged","slidetransitionend","autoanimate","overviewhidden","scrolle"],e.deck=t,e.dom=t.getRevealElement(),e.viewport=t.getViewportElement(),e.slides=t.getSlidesElement(),e.sections=e.slides.querySelectorAll("section"),e.fragments=e.slides.querySelectorAll(r.fragmentSelector),e.regularSections=Array.from(e.sections).filter((e=>!(({childNodes:e})=>{let t=!1;for(let a=0;at.on(n,(t=>{((e,t,a,n)=>{let s=n.deck.getConfig().view,r=e.type,i=(e=>{let t={};return t.from=e.fromSlide||e.previousSlide||null,t.to=e.toSlide||e.currentSlide||null,t})(e);if(i.to){"ready"==r&&(i.to.dataset.appearanceCanStart=!0);let n=((e,t)=>(e.dataset.appearevent&&"auto"===e.dataset.appearevent&&(e.dataset.appearevent="autoanimate"),"auto"==t.appearevent&&(t.appearevent="autoanimate"),e.dataset.appearevent?e.dataset.appearevent:t.appearevent))(i.to,t);(r==n||"slidetransitionend"==r&&"autoanimate"==n)&&(i.to.dataset.appearanceCanStart=!0),"scroll"==s&&"slidechanged"==r&&(c(i,t),d(i,t,a),setTimeout((()=>{i.to.dataset.appearanceCanStart=!0}),t.delay)),"slidetransitionend"==r&&(c(i,t),d(i,t,a)),"slidechanged"==r&&document.body.dataset.exitoverview?(c(i,t),i.to.dataset.appearanceCanStart=!0):"overviewhidden"==r&&(document.body.dataset.exitoverview=!0,setTimeout((()=>{document.body.removeAttribute("data-exitoverview")}),500),e.currentSlide&&(c(i,t),i.to.dataset.appearanceCanStart=!0))}})(t,a,r,e)})))),e.viewport.addEventListener("animationend",(e=>{e.target.classList.add("animationended")})),e.viewport.addEventListener("fragmenthidden",(e=>{e.fragment.classList.remove("animationended"),e.fragment.querySelectorAll(".animationended").forEach((e=>{e.classList.remove("animationended")}))})),new Promise((t=>{l(a,e,t),s(a,"---------- Done preloading ----------")}))};return{id:"appearance",init:function(e){return n=t({baseclass:"animate__animated",hideagain:!0,delay:300,debug:!1,appearevent:"slidetransitionend",autoappear:!1,autoelements:!1,appearparents:!1,csspath:"",animatecsspath:{link:"https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css",compat:"https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.compat.css"},compatibility:!1,compatibilitybaseclass:"animated"},e.getConfig().appearance||{}),p(e,n,"appearance.js")}}};export{p as default}; diff --git a/plugin/appearance/appearance.js b/plugin/appearance/appearance.js index 45b5ce6..5c8933f 100644 --- a/plugin/appearance/appearance.js +++ b/plugin/appearance/appearance.js @@ -1,8 +1,7 @@ - /***************************************************************** * * Appearance for Reveal.js - * Version 1.3.0 + * Version 1.3.1 * * @author: Martijn De Jongh (Martino), martijn.de.jongh@gmail.com * https://github.com/martinomagnifico @@ -13,702 +12,4 @@ * Copyright (C) 2023 Martijn De Jongh (Martino) * ******************************************************************/ - -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Appearance = factory()); -})(this, (function () { 'use strict'; - - /** - * Check if a given string is valid JSON. - * @param {string} str - The string to be checked. - * @returns {boolean} `true` if the string is valid JSON, otherwise `false`. - */ - const isJSON = str => { - try { - return JSON.parse(str) && !!str; - } catch (e) { - return false; - } - }; - - /** - * Check if an element has child nodes that are `SECTION` elements. - * @param {Object} param0 - Object with childNodes property. - * @param {NodeListOf} param0.childNodes - List of child nodes of the element. - * @returns {boolean} `true` if the element contains `SECTION` child nodes, otherwise `false`. - */ - const isStack = _ref => { - let { - childNodes - } = _ref; - let isStack = false; - for (let i = 0; i < childNodes.length; i++) { - if (childNodes[i].tagName == "SECTION") { - isStack = true; - break; - } - } - return isStack; - }; - - /** - * Copy data attributes from a source element to a target element with an optional exception. - * @param {Object} param0 - Object with attributes property. - * @param {NamedNodeMap} param0.attributes - Map of attributes of the source element. - * @param {Element} target - Target element to copy attributes to. - * @param {string} [not] - Optional attribute name to exclude from copying. - */ - const copyDataAttributes = (_ref2, target, not) => { - let { - attributes - } = _ref2; - [...attributes].filter(_ref3 => { - let { - nodeName - } = _ref3; - return nodeName.includes('data'); - }).forEach(_ref4 => { - let { - nodeName, - nodeValue - } = _ref4; - if (not && nodeName !== not || !not) { - target.setAttribute(nodeName, nodeValue); - } - }); - }; - - /** - * Check if the given item is an object and not an array. - * @param {*} item - The item to be checked. - * @returns {boolean} `true` if the item is an object and not an array, otherwise `false`. - */ - const isObject = item => { - return item && typeof item === 'object' && !Array.isArray(item); - }; - - /** - * Deep merge multiple objects into a target object. - * @param {Object} target - Target object to merge values into. - * @param {...Object} sources - Source objects to merge from. - * @returns {Object} The merged object. - */ - const mergeDeep = function (target) { - for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - sources[_key - 1] = arguments[_key]; - } - if (!sources.length) return target; - const source = sources.shift(); - if (isObject(target) && isObject(source)) { - for (const key in source) { - if (isObject(source[key])) { - if (!target[key]) Object.assign(target, { - [key]: {} - }); - mergeDeep(target[key], source[key]); - } else { - Object.assign(target, { - [key]: source[key] - }); - } - } - } - return mergeDeep(target, ...sources); - }; - - /** - * Resolves the given Promise immediately using setTimeout. - * @param {Function} resolve - The resolve function of a Promise. - * @returns {number} The ID value of the timer that is set. - */ - const doneLoading = resolve => { - return setTimeout(resolve, 0); - }; - - /** - * Converts a JavaScript object or a JSON-formatted string to a JSON string. - * - * @param {Object|string} str - The input string or object to be converted to a JSON string. - * @returns {string} The JSON string. - */ - const toJSONString = str => { - let JSONString = ''; - if (typeof str === "string") str = str.replace(/[“”]/g, '"').replace(/[‘’]/g, "'"); - if (isJSON(str)) { - JSONString = str; - } else { - if (typeof str === "object") { - JSONString = JSON.stringify(str, null, 2); - } else { - JSONString = str.trim().replace(/'/g, '"').charAt(0) === "{" ? str.trim().replace(/'/g, '"') : `{${str.trim().replace(/'/g, '"')}}`; - } - } - return JSONString; - }; - - /** - * Dynamically loads a stylesheet from the specified URL and calls a callback function when it's loaded. - * - * @param {string} url - The URL of the stylesheet to load. - * @param {Function} callback - A callback function to be called when the stylesheet is loaded. - */ - const loadStyle = (url, callback) => { - const head = document.querySelector('head'); - const style = document.createElement('link'); - style.rel = 'stylesheet'; - style.href = url; - style.onload = () => { - if (typeof callback === 'function') { - callback.call(); - callback = null; - } - }; - style.onreadystatechange = () => { - if (style.readyState === 'loaded') { - style.onload(); - } - }; - head.appendChild(style); - }; - - /** - * Retrieves the path of a JavaScript file based on its filename. - * - * @param {string} fileName - The filename of the script. - * @returns {string} The path to the plugin's location. - */ - const pluginPath = fileName => { - let path; - let pluginScript = document.querySelector(`script[src$="${fileName}"]`); - if (pluginScript) { - path = pluginScript.getAttribute("src").slice(0, -1 * fileName.length); - } else { - path = (typeof document === 'undefined' && typeof location === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : typeof document === 'undefined' ? location.href : (document.currentScript && document.currentScript.src || new URL('appearance.js', document.baseURI).href)).slice(0, (typeof document === 'undefined' && typeof location === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : typeof document === 'undefined' ? location.href : (document.currentScript && document.currentScript.src || new URL('appearance.js', document.baseURI).href)).lastIndexOf('/') + 1); - } - return path; - }; - const debugLog = (options, text) => { - if (options.debug) console.log(text); - }; - - /** - * Retrieves and loads CSS stylesheets based on the provided options and ES5 filename. - * - * @param {Object} options - Configuration options for loading CSS. - * @param {string} fileName - The filename of the script. - */ - - const getAndLoadCSS = (options, fileName) => { - let thePath = pluginPath(fileName); - let pluginBaseName = fileName.replace(/\.[^/.]+$/, ""); - let AppearanceStylePath = options.csspath.appearance ? options.csspath.appearance : `${thePath}${pluginBaseName}.css` || `plugin/${pluginBaseName}/${pluginBaseName}.css`; - let AnimateCSSPath = !options.compatibility ? options.animatecsspath.link : options.animatecsspath.compat; - if (options.debug) { - console.log(`Paths:`); - console.log(` - Plugin path = ${thePath}`); - console.log(` - Appearance CSS path = ${AppearanceStylePath}`); - console.log(` - AnimateCSS CSS path = ${AnimateCSSPath}`); - } - loadStyle(AnimateCSSPath, function () { - loadStyle(AppearanceStylePath); - }); - }; - - /** - * Adds automatic animations to elements within a section based on specified criteria. - * - * This function examines the provided section for attributes and options to determine - * which classes should be added to its elements to enable automatic animations. - * - * @param {HTMLElement} section - The section element to which automatic animations will be applied. - * @param {Object} options - The existing user options object - * @param {Object} vars - The existing vars object - * @returns {undefined} - */ - const addAutoAnimation = (section, options, vars) => { - let sectionAutoSelectors = null; - if (section.hasAttribute("data-autoappear")) { - let sectDataAppear = section.dataset.autoappear; - if (sectDataAppear == "auto" || sectDataAppear == "" || sectDataAppear.length < 1 || sectDataAppear == "true") { - // This section should get the global autoappear classes on its objects - sectionAutoSelectors = options.autoelements ? options.autoelements : null; - } else { - // This section should get the local autoappear classes on its objects - sectionAutoSelectors = sectDataAppear; - } - } else if (options.autoappear && options.autoelements) { - // This section should get the global autoappear classes on its objects - sectionAutoSelectors = options.autoelements; - } - if (sectionAutoSelectors) { - let elementsToAnimate = JSON.parse(toJSONString(sectionAutoSelectors)); - Object.entries(elementsToAnimate).forEach(_ref => { - let [selector, assignables] = _ref; - // Exclude the elements from vars.appearances - let elements = Array.from(section.querySelectorAll(selector)).filter(element => !vars.appearances.includes(element)); - if (elements.length) { - elements.forEach(element => { - vars.appearances.push(element); - let newClasses = [], - newDelay = null, - speedClass = false, - elementSplit = null, - containerDelay = null; - if (Array.isArray(assignables)) { - newClasses = assignables[0].split(/[ ,]+/); - newDelay = assignables[1]; - } else if (typeof assignables == "string") { - newClasses = assignables.split(/[ ,]+/); - } else if (assignables.constructor === Object) { - if (assignables.class || assignables.animation) { - let animationClass = assignables.animation ? assignables.animation : assignables.class; - newClasses = animationClass.split(/[ ,]+/); - } - if (assignables.speed) { - speedClass = String(assignables.speed); - if (!speedClass.includes("animate__")) { - speedClass = `animate__${speedClass}`; - } - } - if (assignables.delay) { - newDelay = String(assignables.delay); - } - if (assignables.split) { - elementSplit = String(assignables.split); - } - if (assignables["container-delay"]) { - containerDelay = String(assignables["container-delay"]); - } - } - element.classList.add(...newClasses); - if (speedClass) { - element.classList.add(speedClass); - } - if (newDelay) { - element.dataset.delay = newDelay; - } - if (elementSplit) { - element.dataset.split = elementSplit; - } - if (containerDelay) { - element.dataset.containerDelay = containerDelay; - } - }); - } - }); - } - }; - - /** - * Hoist a list item's appearance to its parent element's appearance. - * - * @param {HTMLElement} from - The list item element. - * @returns {undefined} - */ - const hoistAppearance = (from, baseclass) => { - let to = from.parentNode; - if (!to) return; - for (const sibling of to.children) { - if (sibling !== from && sibling.dataset.appearParent) return; - } - to.classList = from.classList; - copyDataAttributes(from, to, "data-appear-parent"); - to.innerHTML = from.innerHTML; - to.classList.add(baseclass); - }; - - /** - * Fix list items that were changed by Quarto. - * - * This function is designed for use with Quarto and handles the conversion of list items - * with Appearance classes to their parent elements when a manual attribute is present. - * It also provides automatic conversion for list items that directly contain spans, which - * is related to Quarto's wrapping of list content in a span. - * - * @param {HTMLElement} appearance - The list item element whose appearance will be converted. - * @param {Object} options - An options object that controls the conversion behavior. - * @param {boolean} options.appearparents - If `true`, automatic conversion of list items with spans is enabled. - * @returns {undefined} - */ - const fixListItem = (appearance, options, names) => { - let baseclass = names.baseclass; - if (appearance.hasAttribute("data-appear-parent")) { - hoistAppearance(appearance, baseclass); - } - if (options.appearparents) { - if (appearance.parentNode && appearance.parentNode.tagName) { - if (appearance.tagName == "SPAN" && appearance.parentNode.tagName == "LI") { - let spanLength = String(appearance.outerHTML).length; - let liContentLength = String(appearance.parentNode.innerHTML).length; - if (spanLength == liContentLength) { - hoistAppearance(appearance); - } - } - } - } - }; - - /** - * Adds a base class to an HTML element if it doesn't already have it. - * - * This function checks if the specified HTML element has the specified base class, - * and if not, it adds the base class to the element's class list. - * - * @param {HTMLElement} appearance - The HTML element to which the base class should be added. - * @param {Object} names - The existing 'names' object - * @returns {undefined} - */ - - const addBaseClass = (appearance, names) => { - if (!appearance.classList.contains(names.baseclass)) { - appearance.classList.add(names.baseclass); - } - if (appearance.classList.contains(names.fragmentClass)) { - appearance.classList.add('custom'); - } - }; - - const addDelay = (appearanceArray, options, names) => { - let delay = 0; - appearanceArray.forEach((appearance, index) => { - if (index == 0 && appearance.dataset.delay || index != 0) { - let elementDelay = options.delay; - if (appearance.dataset && appearance.dataset.delay) { - elementDelay = parseInt(appearance.dataset.delay); - } - delay = delay + elementDelay; - appearance.style.setProperty('animation-delay', delay + "ms"); - appearance.removeAttribute('data-delay'); - } - }); - }; - - /** - * Selects elements with a specified class that are not nested inside an element with another specified class. - * @param {string} targetClass - The class name to select elements. - * @param {string} excludeClass - The class name to exclude elements nested inside it. - * @param {Element} el - The element to find the target elements in. - * @returns {Element[]} - Array of selected elements. - */ - const elemsNotInClass = (targetClass, excludeClass, el) => Array.from(el.querySelectorAll(`.${targetClass}`)).filter(s => !s.closest(`.${excludeClass}`)); - - /** - * Selects elements with a specified class that are nested inside an element with another specified class. - * @param {string} targetClass - The class name to select elements. - * @param {string} parentClass - The class name of the parent to find elements in. - * @param {Element} el - The element to find the target elements in. - * @returns {Element[]} - Array of selected elements. - */ - const elemsInClass = (targetClass, parentClass, el) => Array.from(el.querySelectorAll(`.${targetClass}`)).filter(s => s.closest(`.${parentClass}`) === el); - - /** - * Extracts groups of elements with a specified class from the provided section element. - * Groups are formed based on nesting inside elements with another specified class. - * @param {Element} section - The section to extract data from. - * @returns {Element[][]} - Nested arrays of selected elements. - */ - - /** - * Extracts groups of elements with a specified class from the provided section element. - * Groups are formed based on nesting inside elements with another specified class. - * @param {Element} section - The section to extract data from. - * @param {string} targetClass - The class name to select elements. - * @param {string} groupClass - The class name of the parent to find elements in. - * @returns {Element[][]} - Nested arrays of selected elements. - */ - const getAppearanceArrays = (section, targetClass, groupClass) => { - const result = [elemsNotInClass(targetClass, groupClass, section), ...Array.from(section.querySelectorAll(`.${groupClass}`)).map(frag => elemsInClass(targetClass, groupClass, frag))]; - if (result.some(group => group.length > 0)) { - return result; - } else { - return false; - } - }; - - const convertToSpans = (parent, kind) => { - let splitElements = false; - let joinChar = ' '; - if (kind == "words") { - splitElements = parent.textContent.trim().split(/\s+/); - } else if (kind == "letters") { - splitElements = parent.textContent.trim().split(''); - joinChar = ''; - } - if (splitElements) { - const parentAnimateClasses = Array.from(parent.classList).filter(className => className.startsWith('animate__')); - const newHtml = splitElements.map((element, index) => { - const span = document.createElement('span'); - span.textContent = element; - if (element == " ") { - span.textContent = "\u00A0"; - } - if (parent.dataset.delay && index !== 0) { - span.dataset.delay = parent.dataset.delay; - } - if (parent.dataset.containerDelay && index === 0) { - span.dataset.delay = parent.dataset.containerDelay; - } - parent.classList.forEach(className => className.startsWith('animate__') && span.classList.add(className)); - return span.outerHTML; - }).join(joinChar); - parentAnimateClasses.forEach(className => parent.classList.remove(className)); - parent.removeAttribute('data-delay'); - parent.removeAttribute('data-split'); - parent.removeAttribute('data-container-delay'); - parent.innerHTML = newHtml; - } - }; - - /** - * Derives slide from and to from the event object. - * - * @param {Object} event - The event object containing slide transition details. - * @returns {Object} - An object containing references to the "from" and "to" slides. - */ - const fromTo = event => { - let slides = {}; - slides.from = event.fromSlide || event.previousSlide || null; - slides.to = event.toSlide || event.currentSlide || null; - return slides; - }; - - /** - * A function that determines the appearance event for a given slide. - * - * This function checks the `data-appearevent` attribute of the slide and the `options.appearevent` parameter. - * If `data-appearevent` is set to "auto", it is converted to "autoanimate". If `options.appearevent` is "auto", it is also converted to "autoanimate". - * The function returns the appearance event, prioritizing `data-appearevent` over `options.appearevent`. - * - * @param {HTMLElement} toSlide - The slide for which the appearance event is determined. - * @param {Object} options - An object containing options for the appearance event. - * @param {string} options.appearevent - The appearance event option provided in the `options` object. - * - * @returns {string} - The determined appearance event for the slide, either from `data-appearevent` or `options.appearevent`. - */ - const slideAppearevent = (toSlide, options) => { - if (toSlide.dataset.appearevent && toSlide.dataset.appearevent === "auto") { - toSlide.dataset.appearevent = "autoanimate"; - } - if (options.appearevent == "auto") { - options.appearevent = "autoanimate"; - } - return toSlide.dataset.appearevent ? toSlide.dataset.appearevent : options.appearevent; - }; - - /** - * Remove the 'data-appearance-can-start' attribute from the 'from' slide if the 'hideagain' option is enabled. - * - * @param {HTMLElement} slides - The container element for the slides. - * @param {Object} options - An object containing configuration options. - * @param {boolean} options.hideagain - A flag indicating whether to remove the attribute when 'hideagain' is true. - */ - const removeStartAttribute = (slides, options) => { - if (options.hideagain) { - if (slides.from && slides.from.dataset.appearanceCanStart) { - slides.from.removeAttribute('data-appearance-can-start'); - } - } - }; - - /** - * Turn off slide appearances when transitioning from one slide to another if the 'hideagain' option is enabled. - * - * @param {HTMLElement} slides - The container element for the slides. - * @param {Object} options - An object containing configuration options. - * @param {string} names.animatecss - The CSS selector for animated elements. - */ - const turnOffSlideAppearances = (slides, options, names) => { - if (options.hideagain) { - let fromAppearances = slides.from.querySelectorAll(names.animatecss); - fromAppearances.forEach(appearance => { - appearance.classList.remove('animationended'); - }); - // Remove visible class from fragments when moving away from that slide - let fromFragments = slides.from.querySelectorAll(`.fragment.visible`); - if (fromFragments) { - fromFragments.forEach(fragment => { - fragment.classList.remove('visible'); - }); - } - } - }; - - /** - * Handles the showing and hiding of slides based on the provided event and options. - * - * @param {Object} event - The event object containing slide transition details. - * @param {Object} options - An object containing configurations for slide appearance management. - */ - const showHideSlide = (event, options, names, vars) => { - let view = vars.deck.getConfig().view; - let etype = event.type; - let slides = fromTo(event); - if (slides.to) { - if (etype == "ready") { - slides.to.dataset.appearanceCanStart = true; - } - let appearevent = slideAppearevent(slides.to, options); - if (etype == appearevent || etype == "slidetransitionend" && appearevent == "autoanimate") { - slides.to.dataset.appearanceCanStart = true; - } - - // Add experimental Reader mode compatibility, does not have a slidetransitionend event yet - if (view == "scroll" && etype == 'slidechanged') { - removeStartAttribute(slides, options); - turnOffSlideAppearances(slides, options, names); - - // Add delay to allow for scroll animation to finish - setTimeout(() => { - slides.to.dataset.appearanceCanStart = true; - }, options.delay); - } - if (etype == "slidetransitionend") { - removeStartAttribute(slides, options); - turnOffSlideAppearances(slides, options, names); - } - if (etype == 'slidechanged' && document.body.dataset.exitoverview) { - removeStartAttribute(slides, options); - slides.to.dataset.appearanceCanStart = true; - } else if (etype == 'overviewhidden') { - document.body.dataset.exitoverview = true; - setTimeout(() => { - document.body.removeAttribute('data-exitoverview'); - }, 500); - if (event.currentSlide) { - removeStartAttribute(slides, options); - slides.to.dataset.appearanceCanStart = true; - } - } - } - }; - - const Plugin = () => { - const vars = {}; - vars.names = {}; - let options = {}; - - /** - * Prepare the plugin to find Appearance elements - * @param {Object} vars - The variables to be prepared. - * @param {Object} names - The names to be prepared. - * @param {Function} resolve - The callback function to be called when preparation is complete. - * @throws {Error} Throws an error if the 'options' object is not defined. - */ - const prepare = (options, vars, resolve) => { - debugLog(options, "------------- Preloading -------------"); - let names = vars.names; - getAndLoadCSS(options, names.es5Filename); - if (options.compatibility) { - names.animatecss = '.backInDown, .backInLeft, .backInRight, .backInUp, .bounceIn, .bounceInDown, .bounceInLeft, .bounceInRight, .bounceInUp, .fadeIn, .fadeInDown, .fadeInDownBig, .fadeInLeft, .fadeInLeftBig, .fadeInRight, .fadeInRightBig, .fadeInUp, .fadeInUpBig, .fadeInTopLeft, .fadeInTopRight, .fadeInBottomLeft, .fadeInBottomRight, .flipInX, .flipInY, .lightSpeedInRight, .lightSpeedInLeft, .rotateIn, .rotateInDownLeft, .rotateInDownRight, .rotateInUpLeft, .rotateInUpRight, .jackInTheBox, .rollIn, .zoomIn, .zoomInDown, .zoomInLeft, .zoomInRight, .zoomInUp, .slideInDown, .slideInLeft, .slideInRight, .slideInUp, .skidLeft, .skidLeftBig, .skidRight, .skidRightBig, .shrinkIn, .shrinkInBlur'; - names.baseclass = options.compatibilitybaseclass; - } - vars.appearances = Array.from(vars.slides.querySelectorAll(names.animatecss)); - - // Go through each section to see if there are any (auto) selectors that need animation classes - vars.regularSections.forEach(theSection => addAutoAnimation(theSection, options, vars)); - vars.appearances.forEach((theAppearance, index) => { - // Fix any list item where the Appearance classes were moved to the span (Quarto does this) - fixListItem(theAppearance, options, names); - - // Go through each appearance element and add the baseclass if it doesn't have it - addBaseClass(theAppearance, names); - if (theAppearance.hasAttribute('data-split')) { - convertToSpans(theAppearance, theAppearance.dataset.split); - } - }); - vars.regularSections.forEach((theSection, index) => { - // Get all the Appearances in the section as separate arrays per delay loop - let appearanceArrays = getAppearanceArrays(theSection, names.baseclass, names.fragmentClass); - if (appearanceArrays) { - appearanceArrays.forEach(appearanceArray => { - // Add the delays to each appearance in the array - addDelay(appearanceArray, options); - }); - } - }); - doneLoading(resolve); - }; - - /** - * The main function of the plugin - * @param {object} deck - The deck object - * @param {object} options - The options object - * @param {string} es5Filename - The name of the file that will be used - */ - const Appear = function (deck, options, es5Filename) { - let names = vars.names; - - // Set up names - names.baseclass = options.baseclass; - names.compatibilitybaseclass = options.compatibilitybaseclass; - names.fragmentSelector = ".fragment"; - names.fragmentClass = "fragment"; - names.speedClasses = ['slower', 'slow', 'fast', 'faster']; - names.speedClasses.push(...names.speedClasses.map(speed => `animate__${speed}`)); - names.animatecss = '[class^="animate__"],[class*=" animate__"]'; - names.es5Filename = es5Filename; - names.eventnames = ['ready', 'slidechanged', 'slidetransitionend', 'autoanimate', 'overviewhidden', 'scrolle']; - - // Set up variables - vars.deck = deck; - vars.dom = deck.getRevealElement(); - vars.viewport = deck.getViewportElement(); - vars.slides = deck.getSlidesElement(); - vars.sections = vars.slides.querySelectorAll('section'); - vars.fragments = vars.slides.querySelectorAll(names.fragmentSelector); - vars.regularSections = Array.from(vars.sections).filter(section => !isStack(section)); - if (/receiver/i.test(window.location.search)) vars.viewport.classList.add('sv'); - names.eventnames.forEach(eventname => deck.on(eventname, event => { - showHideSlide(event, options, names, vars); - })); - vars.viewport.addEventListener("animationend", event => { - event.target.classList.add('animationended'); - }); - vars.viewport.addEventListener("fragmenthidden", event => { - event.fragment.classList.remove('animationended'); - event.fragment.querySelectorAll('.animationended').forEach(el => { - el.classList.remove('animationended'); - }); - }); - return new Promise(resolve => { - prepare(options, vars, resolve); - debugLog(options, "---------- Done preloading ----------"); - }); - }; - - /** - * Initialize the plugin - * @param {object} deck - The deck object - */ - const init = function (deck) { - let defaultOptions = { - baseclass: 'animate__animated', - hideagain: true, - delay: 300, - debug: false, - appearevent: 'slidetransitionend', - autoappear: false, - autoelements: false, - appearparents: false, - csspath: '', - animatecsspath: { - link: 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css', - compat: 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.compat.css' - }, - compatibility: false, - compatibilitybaseclass: 'animated' - }; - options = mergeDeep(defaultOptions, deck.getConfig().appearance || {}); - return Appear(deck, options, "appearance.js"); - }; - return { - id: 'appearance', - init: init - }; - }; - - return Plugin; - -})); +!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).Appearance=t()}(this,(function(){"use strict";var e="undefined"!=typeof document?document.currentScript:null;const t=e=>e&&"object"==typeof e&&!Array.isArray(e),a=(e,...n)=>{if(!n.length)return e;const s=n.shift();if(t(e)&&t(s))for(const n in s)t(s[n])?(e[n]||Object.assign(e,{[n]:{}}),a(e[n],s[n])):Object.assign(e,{[n]:s[n]});return a(e,...n)},n=e=>{let t="";return"string"==typeof e&&(e=e.replace(/[“”]/g,'"').replace(/[‘’]/g,"'")),t=(e=>{try{return JSON.parse(e)&&!!e}catch(e){return!1}})(e)?e:"object"==typeof e?JSON.stringify(e,null,2):"{"===e.trim().replace(/'/g,'"').charAt(0)?e.trim().replace(/'/g,'"'):`{${e.trim().replace(/'/g,'"')}}`,t},s=(e,t,a)=>{let n,s=document.querySelector("head");"script"===t?(n=document.createElement("script"),n.type="text/javascript",n.src=e):"stylesheet"===t&&(n=document.createElement("link"),n.rel="stylesheet",n.href=e);const r=()=>{"function"==typeof a&&(a.call(),a=null)};n.onload=r,n.onreadystatechange=function(){"loaded"===this.readyState&&r()},s.appendChild(n)},r=(e,t)=>{e.debug&&console.log(t)},i=(t,a)=>{let n=(t=>{let a,n=document.querySelector(`script[src$="${t}"]`);return a=n?n.getAttribute("src").slice(0,-1*t.length):("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:e&&e.src||new URL("appearance.js",document.baseURI).href).slice(0,("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:e&&e.src||new URL("appearance.js",document.baseURI).href).lastIndexOf("/")+1),a})(a),r=a.replace(/\.[^/.]+$/,""),i=t.csspath.appearance?t.csspath.appearance:`${n}${r}.css`||`plugin/${r}/${r}.css`,o=t.compatibility?t.animatecsspath.compat:t.animatecsspath.link;t.debug&&(console.log("Paths:"),console.log(` - Plugin path = ${n}`),console.log(` - Appearance CSS path = ${i}`),console.log(` - AnimateCSS CSS path = ${o}`)),s(o,"stylesheet",(function(){s(i,"stylesheet")}))},o=(e,t)=>{let a=e.parentNode;if(a){for(const t of a.children)if(t!==e&&t.dataset.appearParent)return;a.classList=e.classList,(({attributes:e},t,a)=>{[...e].filter((({nodeName:e})=>e.includes("data"))).forEach((({nodeName:e,nodeValue:n})=>{(a&&e!==a||!a)&&t.setAttribute(e,n)}))})(e,a,"data-appear-parent"),a.innerHTML=e.innerHTML,a.classList.add(t)}},l=(e,t,a)=>Array.from(a.querySelectorAll(`.${e}`)).filter((e=>!e.closest(`.${t}`))),c=(e,t,a)=>{const n=[l(t,a,e),...Array.from(e.querySelectorAll(`.${a}`)).map((e=>((e,t,a)=>Array.from(a.querySelectorAll(`.${e}`)).filter((e=>e.closest(`.${t}`)===a)))(t,a,e)))];return!!n.some((e=>e.length>0))&&n},d=(e,t)=>{t.hideagain&&e.from&&e.from.dataset.appearanceCanStart&&e.from.removeAttribute("data-appearance-can-start")},p=(e,t,a)=>{if(t.hideagain){e.from.querySelectorAll(a.animatecss).forEach((e=>{e.classList.remove("animationended")}));let t=e.from.querySelectorAll(".fragment.visible");t&&t.forEach((e=>{e.classList.remove("visible")}))}};return()=>{const e={names:{}};let t={};const s=(e,t,a)=>{r(e,"------------- Preloading -------------");let s=t.names;i(e,s.es5Filename),e.compatibility&&(s.animatecss=".backInDown, .backInLeft, .backInRight, .backInUp, .bounceIn, .bounceInDown, .bounceInLeft, .bounceInRight, .bounceInUp, .fadeIn, .fadeInDown, .fadeInDownBig, .fadeInLeft, .fadeInLeftBig, .fadeInRight, .fadeInRightBig, .fadeInUp, .fadeInUpBig, .fadeInTopLeft, .fadeInTopRight, .fadeInBottomLeft, .fadeInBottomRight, .flipInX, .flipInY, .lightSpeedInRight, .lightSpeedInLeft, .rotateIn, .rotateInDownLeft, .rotateInDownRight, .rotateInUpLeft, .rotateInUpRight, .jackInTheBox, .rollIn, .zoomIn, .zoomInDown, .zoomInLeft, .zoomInRight, .zoomInUp, .slideInDown, .slideInLeft, .slideInRight, .slideInUp, .skidLeft, .skidLeftBig, .skidRight, .skidRightBig, .shrinkIn, .shrinkInBlur",s.baseclass=e.compatibilitybaseclass),t.appearances=Array.from(t.slides.querySelectorAll(s.animatecss)),t.regularSections.forEach((a=>((e,t,a)=>{let s=null;if(e.hasAttribute("data-autoappear")){let a=e.dataset.autoappear;s="auto"==a||""==a||a.length<1||"true"==a?t.autoelements?t.autoelements:null:a}else t.autoappear&&t.autoelements&&(s=t.autoelements);if(s){let t=JSON.parse(n(s));Object.entries(t).forEach((([t,n])=>{let s=Array.from(e.querySelectorAll(t)).filter((e=>!a.appearances.includes(e)));s.length&&s.forEach((e=>{a.appearances.push(e);let t=[],s=null,r=!1,i=null,o=null;Array.isArray(n)?(t=n[0].split(/[ ,]+/),s=n[1]):"string"==typeof n?t=n.split(/[ ,]+/):n.constructor===Object&&((n.class||n.animation)&&(t=(n.animation?n.animation:n.class).split(/[ ,]+/)),n.speed&&(r=String(n.speed),r.includes("animate__")||(r=`animate__${r}`)),n.delay&&(s=String(n.delay)),n.split&&(i=String(n.split)),n["container-delay"]&&(o=String(n["container-delay"]))),e.classList.add(...t),r&&e.classList.add(r),s&&(e.dataset.delay=s),i&&(e.dataset.split=i),o&&(e.dataset.containerDelay=o)}))}))}})(a,e,t))),t.appearances.forEach(((t,a)=>{((e,t,a)=>{let n=a.baseclass;e.hasAttribute("data-appear-parent")&&o(e,n),t.appearparents&&e.parentNode&&e.parentNode.tagName&&"SPAN"==e.tagName&&"LI"==e.parentNode.tagName&&String(e.outerHTML).length==String(e.parentNode.innerHTML).length&&o(e)})(t,e,s),((e,t)=>{e.classList.contains(t.baseclass)||e.classList.add(t.baseclass),e.classList.contains(t.fragmentClass)&&e.classList.add("custom")})(t,s),t.hasAttribute("data-split")&&((e,t)=>{let a=!1,n=" ";if("words"==t?a=e.textContent.trim().split(/\s+/):"letters"==t&&(a=e.textContent.trim().split(""),n=""),a){const t=Array.from(e.classList).filter((e=>e.startsWith("animate__"))),s=a.map(((t,a)=>{const n=document.createElement("span");return n.textContent=t," "==t&&(n.textContent=" "),e.dataset.delay&&0!==a&&(n.dataset.delay=e.dataset.delay),e.dataset.containerDelay&&0===a&&(n.dataset.delay=e.dataset.containerDelay),e.classList.forEach((e=>e.startsWith("animate__")&&n.classList.add(e))),n.outerHTML})).join(n);t.forEach((t=>e.classList.remove(t))),e.removeAttribute("data-delay"),e.removeAttribute("data-split"),e.removeAttribute("data-container-delay"),e.innerHTML=s}})(t,t.dataset.split)})),t.regularSections.forEach(((t,a)=>{let n=c(t,s.baseclass,s.fragmentClass);n&&n.forEach((t=>{((e,t,a)=>{let n=0;e.forEach(((e,a)=>{if(0==a&&e.dataset.delay||0!=a){let a=t.delay;e.dataset&&e.dataset.delay&&(a=parseInt(e.dataset.delay)),n+=a,e.style.setProperty("animation-delay",n+"ms"),e.removeAttribute("data-delay")}}))})(t,e)}))})),(e=>{setTimeout(e,0)})(a)},l=function(t,a,n){let i=e.names;return i.baseclass=a.baseclass,i.compatibilitybaseclass=a.compatibilitybaseclass,i.fragmentSelector=".fragment",i.fragmentClass="fragment",i.speedClasses=["slower","slow","fast","faster"],i.speedClasses.push(...i.speedClasses.map((e=>`animate__${e}`))),i.animatecss='[class^="animate__"],[class*=" animate__"]',i.es5Filename=n,i.eventnames=["ready","slidechanged","slidetransitionend","autoanimate","overviewhidden","scrolle"],e.deck=t,e.dom=t.getRevealElement(),e.viewport=t.getViewportElement(),e.slides=t.getSlidesElement(),e.sections=e.slides.querySelectorAll("section"),e.fragments=e.slides.querySelectorAll(i.fragmentSelector),e.regularSections=Array.from(e.sections).filter((e=>!(({childNodes:e})=>{let t=!1;for(let a=0;at.on(n,(t=>{((e,t,a,n)=>{let s=n.deck.getConfig().view,r=e.type,i=(e=>{let t={};return t.from=e.fromSlide||e.previousSlide||null,t.to=e.toSlide||e.currentSlide||null,t})(e);if(i.to){"ready"==r&&(i.to.dataset.appearanceCanStart=!0);let n=((e,t)=>(e.dataset.appearevent&&"auto"===e.dataset.appearevent&&(e.dataset.appearevent="autoanimate"),"auto"==t.appearevent&&(t.appearevent="autoanimate"),e.dataset.appearevent?e.dataset.appearevent:t.appearevent))(i.to,t);(r==n||"slidetransitionend"==r&&"autoanimate"==n)&&(i.to.dataset.appearanceCanStart=!0),"scroll"==s&&"slidechanged"==r&&(d(i,t),p(i,t,a),setTimeout((()=>{i.to.dataset.appearanceCanStart=!0}),t.delay)),"slidetransitionend"==r&&(d(i,t),p(i,t,a)),"slidechanged"==r&&document.body.dataset.exitoverview?(d(i,t),i.to.dataset.appearanceCanStart=!0):"overviewhidden"==r&&(document.body.dataset.exitoverview=!0,setTimeout((()=>{document.body.removeAttribute("data-exitoverview")}),500),e.currentSlide&&(d(i,t),i.to.dataset.appearanceCanStart=!0))}})(t,a,i,e)})))),e.viewport.addEventListener("animationend",(e=>{e.target.classList.add("animationended")})),e.viewport.addEventListener("fragmenthidden",(e=>{e.fragment.classList.remove("animationended"),e.fragment.querySelectorAll(".animationended").forEach((e=>{e.classList.remove("animationended")}))})),new Promise((t=>{s(a,e,t),r(a,"---------- Done preloading ----------")}))};return{id:"appearance",init:function(e){return t=a({baseclass:"animate__animated",hideagain:!0,delay:300,debug:!1,appearevent:"slidetransitionend",autoappear:!1,autoelements:!1,appearparents:!1,csspath:"",animatecsspath:{link:"https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css",compat:"https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.compat.css"},compatibility:!1,compatibilitybaseclass:"animated"},e.getConfig().appearance||{}),l(e,t,"appearance.js")}}}})); diff --git a/src/demo/css/_base.scss b/src/demo/css/_base.scss index fc6bd43..5730dc3 100644 --- a/src/demo/css/_base.scss +++ b/src/demo/css/_base.scss @@ -3,7 +3,8 @@ @import 'base/_base-code'; :root { - --r-heading-text-transform: none ; + --r-background-color: #051525; + --r-heading-text-transform: none; --r-heading1-size: 2.7em; --r-main-font-size: 36px; --r-block-margin: 1.8rem; diff --git a/src/demo/css/base/_base-code.scss b/src/demo/css/base/_base-code.scss index 2d36d55..29e336a 100644 --- a/src/demo/css/base/_base-code.scss +++ b/src/demo/css/base/_base-code.scss @@ -1,11 +1,5 @@ // CODE -//-@import url('https://fonts.googleapis.com/css2?family=Bitter:wght@500&family=JetBrains+Mono:wght@400;700&family=Lato:wght@400;700&display=swap'); - -:root { - --r-code-font: 'JetBrains Mono', monospace; -} - .reveal code.hljs { background: var(--code-full-bg); border-radius: 0.5em; @@ -13,7 +7,7 @@ white-space: pre-wrap; td { - line-height: 1.5; + line-height: 1.4; } } diff --git a/src/demo/css/demo.scss b/src/demo/css/demo.scss index 5131012..99640f9 100644 --- a/src/demo/css/demo.scss +++ b/src/demo/css/demo.scss @@ -2,16 +2,22 @@ // APPEARANCE DEMO +img { + border-radius: 5%; + box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.25); + width: 3.5em; + height: 3.5em; + max-width: 100%; + max-height: 100%; +} + .row.fivegrid { display: grid; - width: 90%; + width: 82%; margin: auto; - margin-top: .25em; + margin: var(--r-block-margin) auto; grid-template-columns: 1fr 1fr 1fr 1fr 1fr; grid-gap: 1em; - img { - border-radius: 5%; - } } .reveal img.demoimg { @@ -19,7 +25,7 @@ height: 3.5em; max-width: 100%; max-height: 100%; - margin: 0.2em; + margin: 0.4em; border-radius: 5%; &.smallcircle { margin: 0.4em; @@ -30,9 +36,15 @@ } .row.smallcircles { - grid-gap: 1em; - width: 70%; - img { - border-radius: 50%; - } + grid-gap: .5em; + width: 75%; +} + + +.title { + font-size: 3em; + font-weight: bold; +} +.subtitle { + font-size: 1.5em } \ No newline at end of file diff --git a/src/demo/html/demo-markdown.pug b/src/demo/html/demo-markdown.pug index c5ee2c1..039bae0 100644 --- a/src/demo/html/demo-markdown.pug +++ b/src/demo/html/demo-markdown.pug @@ -3,12 +3,6 @@ extends /demo/html/_templates/layouts/_reveal.pug block slides include slides/_slides-markdown.pug -block append styles - style. - :root { - --r-background-color: #051525; - } - block append scripts script(src="plugin/highlight/highlight.js") script(src="plugin/markdown/markdown.js") diff --git a/src/demo/html/demo.pug b/src/demo/html/demo.pug index 86fbaf5..c9b83fc 100644 --- a/src/demo/html/demo.pug +++ b/src/demo/html/demo.pug @@ -2,12 +2,6 @@ extends /demo/html/_templates/layouts/_reveal.pug block slides include slides/_slides.pug - -block append styles - style. - :root { - --r-background-color: #051525; - } block append scripts script(src=`plugin/highlight/highlight.js`) diff --git a/src/demo/html/slides/_slides.pug b/src/demo/html/slides/_slides.pug index 0cdd8e2..657f8a2 100644 --- a/src/demo/html/slides/_slides.pug +++ b/src/demo/html/slides/_slides.pug @@ -3,9 +3,9 @@ section h3.animate__fadeInDown.animate__faster(data-delay="75", data-container-delay="700", data-split="letters") for Reveal.js .row.fivegrid.smallcircles - img.animate__shrinkIn(data-src="assets/img/1.jpg", data-delay="800") + img.demoimg.smallcircle.animate__shrinkIn(data-src="assets/img/1.jpg", data-delay="800") +iterate('4') - img.animate__shrinkIn(data-src=`assets/img/${nr + 1}.jpg`, data-delay="240" - (nr * 20)) + img.demoimg.smallcircle.animate__shrinkIn(data-src=`assets/img/${nr + 1}.jpg`, data-delay="240" - (nr * 20)) section section @@ -35,7 +35,7 @@ section h3 Let images appear .row.fivegrid +iterate('5') - img.animate__flipInX(data-src="assets/img/" + nr + ".jpg") + img.demoimg.animate__flipInX(data-src="assets/img/" + nr + ".jpg") section h3 Use with fragments diff --git a/src/plugin/css/_non-animated.scss b/src/plugin/css/_non-animated.scss index 73d36dc..c09473a 100644 --- a/src/plugin/css/_non-animated.scss +++ b/src/plugin/css/_non-animated.scss @@ -1,5 +1,18 @@ /* Animate.css overrides */ +section:not(.stack):not([data-appearance-can-start]) { + .animate__animated, .animated { + opacity: 0; + animation: none; + } +} +section:not(.stack)[data-appearance-can-start] { + .animate__animated:not(.fragment), .animated:not(.fragment) { + opacity: 1; + } +} + +/* Animations inside fragments */ section:not(.stack):not([data-appearance-can-start]), .fragment:not(.visible) { .animate__animated, @@ -19,22 +32,25 @@ section:not(.stack):not([data-appearance-can-start]), } } -.fragment { +/* Animations which are also fragments */ +.reveal .fragment { &.animate__animated, &.animated { &:not(.visible) { - transition: opacity .3s ease-in-out !important; + transition: all .2s ease; opacity: 0; animation: none; will-change: animation; } - &.visible { - &.animate__animated, - &.animated { - transition: none; - } + &.visible:not(.animationended) { + transition: none; } + &.visible.animationended { + animation: none; + transition: all .2s ease; + } + } } @@ -43,8 +59,11 @@ section:not(.stack):not([data-appearance-can-start]), @at-root #{selector-unify(&, i)}, #{selector-unify(&, span)} { display: inline-block; } +} - &.animationended { - animation: none; - } +.animate__animated[data-auto-animate-target]:not([data-auto-animate-target="unmatched"]) { + animation: none; } +[data-auto-animate="running"] .animate__animated[data-auto-animate-target]:not([data-auto-animate-target="unmatched"]) { + opacity: 1 !important; +} \ No newline at end of file diff --git a/src/plugin/js/functions/get-load-css.js b/src/plugin/js/functions/get-load-css.js index 7a2abe9..0ed6d78 100644 --- a/src/plugin/js/functions/get-load-css.js +++ b/src/plugin/js/functions/get-load-css.js @@ -1,4 +1,4 @@ -import { loadStyle } from '../helpers'; +import { loadResource } from '../helpers'; import { pluginPath } from '../helpers'; /** @@ -22,8 +22,8 @@ export const getAndLoadCSS = (options, fileName) => { console.log(` - AnimateCSS CSS path = ${AnimateCSSPath}`); } - loadStyle(AnimateCSSPath, function () { - loadStyle(AppearanceStylePath); + loadResource(AnimateCSSPath, 'stylesheet', function () { + loadResource(AppearanceStylePath, 'stylesheet'); }); } \ No newline at end of file diff --git a/src/plugin/js/helpers.js b/src/plugin/js/helpers.js index 1ba0b39..fd64aeb 100644 --- a/src/plugin/js/helpers.js +++ b/src/plugin/js/helpers.js @@ -120,30 +120,42 @@ export const toJSONString = (str) => { return JSONString; } + /** - * Dynamically loads a stylesheet from the specified URL and calls a callback function when it's loaded. + * Dynamically loads a resource from the specified URL and calls a callback function when it's loaded. * - * @param {string} url - The URL of the stylesheet to load. - * @param {Function} callback - A callback function to be called when the stylesheet is loaded. + * @param {string} url - The URL of the resource to load. + * @param {string} type - The type of resource to load. + * @param {Function} callback - A callback function to be called when the resource is loaded. */ -export const loadStyle = (url, callback) => { - const head = document.querySelector('head'); - const style = document.createElement('link'); - style.rel = 'stylesheet'; - style.href = url; - style.onload = () => { - if (typeof callback === 'function') { - callback.call(); - callback = null; - } +export const loadResource = (url, type, callback) => { + let head = document.querySelector('head'); + let resource; + + if (type === 'script') { + resource = document.createElement('script'); + resource.type = 'text/javascript'; + resource.src = url; + } else if (type === 'stylesheet') { + resource = document.createElement('link'); + resource.rel = 'stylesheet'; + resource.href = url; + } + const finish = () => { + if (typeof callback === 'function') { + callback.call(); + callback = null; + } }; - style.onreadystatechange = () => { - if (style.readyState === 'loaded') { - style.onload(); + resource.onload = finish; + resource.onreadystatechange = function () { + if (this.readyState === 'loaded') { + finish(); } }; - head.appendChild(style); -}; + head.appendChild(resource); +} + /** * Retrieves the path of a JavaScript file based on its filename. @@ -163,7 +175,60 @@ export const pluginPath = (fileName) => { } +/** + * Check if element 'a' appears before element 'b' in the DOM tree. + * + * @param {HTMLElement} a - The first HTML element to compare. + * @param {HTMLElement} b - The second HTML element to compare. + * @returns {boolean|undefined} - Returns `true` if element 'a' appears before element 'b', `false` if 'b' appears before 'a', and `undefined` if the elements have no relative position in the DOM tree. + */ +export const isBefore = (a, b) => { + var all = document.getElementsByTagName('*'); + + for (var i = 0; i < all.length; ++i) { + if (all[i] === a) { + return true; + } else if (all[i] === b) { + return false; + } + } + // If the elements have no relative position in the DOM tree + return undefined; +}; + + +/** + * Check the number of occurrences of a specific element in an array. + * + * @param {Array} array - The array in which occurrences are to be counted. + * @param {*} element - The element to be counted within the array. + * @returns {number} - The count of occurrences of the specified element in the array. + */ +export const checkOccurrence = (array, element) => { + let counter = 0; + for (let i = 0; i < array.length; i++) { + if (array[i] == element) { + counter++; + } + } + return counter; +}; + + +/** + * Create an HTML element from a string of HTML. + * + * @param {string} thehtml - The string of HTML to be converted into an HTML element. + * @returns {HTMLElement | null} - The HTML element created from the provided HTML string. Returns `null` if the element couldn't be created. + */ +export const createNode = (thehtml) => { + const fragment = document.createRange().createContextualFragment(thehtml); + return fragment.firstElementChild; +}; + + export const debugLog = (options, text) => { if (options.debug) console.log(text); } +