Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@appartmint/mint

Package Overview
Dependencies
Maintainers
2
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appartmint/mint - npm Package Compare versions

Comparing version 0.8.13 to 0.9.0

dist/css/noscript.css

21

dist/js/index.d.ts
/**
* A library for building responsive web applications.
*
* @packageDocumentation
*/
/**
* Exports
*/
export { n4vBar, n4vSelectors, n4vSettings } from '@appartmint/n4v';
export { mintUtil, mintSelectors, mintSettings, mintColor, mintDisplay, mintEvent, mintObject, mintText, mintWindow, mintSide } from '@appartmint/util';
export { mintSide } from './imports/enum';
export { mintHeader } from './imports/components/header';
export { mintColor } from './imports/models/color';
export { mintItem } from './imports/models/item';
export { mintDisplay } from './imports/util/display';
export { mintEvent } from './imports/util/event';
export { mintIcon } from './imports/util/icon';
export { mintMath } from './imports/util/math';
export { mintObject } from './imports/util/object';
export { mintText } from './imports/util/text';
export { mintWindow } from './imports/util/window';
export { mintSelectors } from './imports/util/selectors';
export { mintSettings } from './imports/util/settings';
export { mintUtil, default } from './util';
//# sourceMappingURL=index.d.ts.map

@@ -12,154 +12,1579 @@ (function webpackUniversalModuleDefinition(root, factory) {

return /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./node_modules/@appartmint/n4v/dist/js/index.min.js":
/*!***********************************************************!*\
!*** ./node_modules/@appartmint/n4v/dist/js/index.min.js ***!
\***********************************************************/
/***/ ((module) => {
/***/ "./src/ts/imports/components/header.ts":
/*!*********************************************!*\
!*** ./src/ts/imports/components/header.ts ***!
\*********************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
!function(e,t){ true?module.exports=t():0}(self,(()=>{return e={498:e=>{var t;self,t=()=>(()=>{"use strict";var e={64:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.mintSide=void 0,(i=t.mintSide||(t.mintSide={}))[i.Top=0]="Top",i[i.Right=1]="Right",i[i.Bottom=2]="Bottom",i[i.Left=3]="Left"},54:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintColor=void 0;class i{constructor(e){this.r="number"==typeof e.r?Math.max(Math.min(e.r,i.hexBase**2-1),0):0,this.g="number"==typeof e.g?Math.max(Math.min(e.g,i.hexBase**2-1),0):0,this.b="number"==typeof e.b?Math.max(Math.min(e.b,i.hexBase**2-1),0):0,this.a="number"==typeof e.a?Math.max(Math.min(e.a,1),0):1,"string"==typeof e.color&&this.stringConstructor(e.color)}stringConstructor(e){e.startsWith("#")?this.hexConstructor(e):(~e.indexOf("linear-gradient")&&(e=e.substring(e.indexOf("linear-gradient"),e.length)),this.rgbConstructor(e))}hexConstructor(e){switch(e.length){case 1:case 5:case 6:return;case 2:e="#"+e[1]+e[1]+e[1]+e[1]+e[1]+e[1]+i.hexMax;break;case 3:e="#"+e[1]+e[1]+e[1]+e[2]+e[2]+e[2]+i.hexMax;break;case 4:e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+i.hexMax;break;case 7:e+=i.hexMax;break;case 8:e+=e[e.length-1];break;default:e=e.substring(0,9)}this.r=parseInt(e.substring(1,3),i.hexBase),this.g=parseInt(e.substring(3,5),i.hexBase),this.b=parseInt(e.substring(5,7),i.hexBase),this.a=parseInt(e.substring(7,9),i.hexBase)/i.hexBase**2}rgbConstructor(e){let t=e.match(/rgba?\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)?(?:, ?(\d(?:\.\d*)?)\))?/);t&&(this.r=parseInt(t[1]),this.g=parseInt(t[2]),this.b=parseInt(t[3]),this.a=parseFloat(t[4]))}getBrightness(){return 0===this.a?262:isNaN(this.r)||isNaN(this.g)||isNaN(this.b)?-1:Math.round((299*this.r+587*this.g+144*this.b)/1e3)}}t.mintColor=i,i.hexBase=16,i.hexMax="FF",t.default=i},708:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintItem=void 0;class i{constructor(){this.version=0,this.priority=0,this.centered=!1,this.disabled=!1,this.queryParams={},this.attributes={},this.classes=[],this.buttons=[],this.images=[],this.children=[]}}t.mintItem=i,t.default=i},139:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintDisplay=void 0;class i{}t.mintDisplay=i,t.default=i},376:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintEvent=void 0;class i{}t.mintEvent=i,t.default=i},683:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintMath=void 0;class i{static randomInt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t)+t)}}t.mintMath=i,t.default=i},982:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintObject=void 0;class i{static isSimilar(e,t){let i=Object.keys(e);return i.length===Object.keys(t).length&&(i.forEach((i=>{if(e[i]!==t[i])return!1})),!0)}static isSuperset(e,t){let l=!0;if(e===t)return l;try{if(0===Object.keys(t).length)return!l}catch(e){return!l}return Object.keys(t).forEach((n=>{l=l&&i.isSuperset(e[n],t[n])})),l}static remove(e,t){return Object.keys(e).reduce(((i,l)=>(t.includes(l)||(i[l]=e[l]),i)),{})}static sort(e){return Object.keys(e).sort().reduce(((t,i)=>(t[i]=e[i],t)),{})}static filter(e,t){return this.filterKeys(e,t)}static filterKeys(e,t){return t.reduce(((t,i)=>(t[i]=e[i],t)),{})}static filterValues(e,t){return Object.keys(e).reduce(((i,l)=>(t.includes(e[l])&&(i[l]=e[l]),i)),{})}}t.mintObject=i,t.default=i},226:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintText=void 0;class i{}t.mintText=i,t.default=i},505:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintWindow=void 0;class i{}t.mintWindow=i,t.default=i},491:function(e,t,i){var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.mintUtil=t.mintSettings=t.mintSelectors=t.mintWindow=t.mintText=t.mintObject=t.mintMath=t.mintEvent=t.mintDisplay=t.mintItem=t.mintColor=t.mintSide=void 0;var n=i(64);Object.defineProperty(t,"mintSide",{enumerable:!0,get:function(){return n.mintSide}});var s=i(54);Object.defineProperty(t,"mintColor",{enumerable:!0,get:function(){return s.mintColor}});var a=i(708);Object.defineProperty(t,"mintItem",{enumerable:!0,get:function(){return a.mintItem}});var r=i(139);Object.defineProperty(t,"mintDisplay",{enumerable:!0,get:function(){return r.mintDisplay}});var o=i(376);Object.defineProperty(t,"mintEvent",{enumerable:!0,get:function(){return o.mintEvent}});var d=i(683);Object.defineProperty(t,"mintMath",{enumerable:!0,get:function(){return d.mintMath}});var u=i(982);Object.defineProperty(t,"mintObject",{enumerable:!0,get:function(){return u.mintObject}});var c=i(226);Object.defineProperty(t,"mintText",{enumerable:!0,get:function(){return c.mintText}});var h=i(505);Object.defineProperty(t,"mintWindow",{enumerable:!0,get:function(){return h.mintWindow}});var f=i(565);Object.defineProperty(t,"mintSelectors",{enumerable:!0,get:function(){return f.mintSelectors}});var b=i(750);Object.defineProperty(t,"mintSettings",{enumerable:!0,get:function(){return b.mintSettings}});var m=i(427);Object.defineProperty(t,"mintUtil",{enumerable:!0,get:function(){return m.mintUtil}}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l(m).default}})},565:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.mintSelectors=void 0;class l{static prefix(e){return(e=e.toLowerCase()).startsWith(this.pre)?e:`${this.pre}${e}`}static cssPrefix(e){return`--${this.prefix(e.replace(/^-+/,""))}`}static cssVar(e){return`var(${this.cssPrefix(e)})`}static neg(e){return`:not(${e})`}static class(e){return`.${this.prefix(e)}`}static id(e){return`#${this.prefix(e)}`}static controls(e){return e?`[aria-controls="${this.prefix(e)}"]`:this.hasControls}static expanded(e){return"boolean"==typeof e?`[aria-expanded="${e}"]`:this.hasExpanded}static getId(e){var t;return null!==(t=this.ids[null!=e?e:-1])&&void 0!==t?t:""}static getClass(e,t){var i,l;return t?null!==(i=this.classes[t][null!=e?e:-1])&&void 0!==i?i:"":null!==(l=this.classes[null!=e?e:-1])&&void 0!==l?l:""}static getFocusables(e){let t;return t=e?[...e.querySelectorAll(this.focusable)]:[...document.querySelectorAll(this.focusable)],t.filter((e=>this.isFocusable(e)))}static isFocusable(e){let t=e;do{if("none"===window.getComputedStyle(t).getPropertyValue("display").toLowerCase())return!1;t=t.parentElement}while(t);return!0}}t.mintSelectors=l,i=l,l.lib="mint",l.pre=`${i.lib}-`,l.disabled="[disabled]",l.hasControls="[aria-controls]",l.hasExpanded="[aria-expanded]",l.hasLink="[href]",l.hasRouterLink="[routerLink]",l.hasId="[id]",l.notTabbable='[tabindex^="-"]',l.tabbable=`[tabindex]${i.neg(i.notTabbable)}`,l.focusable=`input${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n select${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n textarea${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n button${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n object${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n a${i.hasLink}, a${i.hasRouterLink},\n area${i.hasLink},\n ${i.tabbable}`.replace(/\s/g,""),l.classes={sides:{top:i.prefix("top"),right:i.prefix("right"),bottom:i.prefix("bottom"),left:i.prefix("left")}},t.default=l},750:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.mintSettings=void 0;class l{static set(e){let t=!1;"number"==typeof e.delayBase&&(this.delayBase=e.delayBase,t=!0),"number"==typeof e.delayStep&&(this.delayStep=e.delayStep,t=!0),t&&this.setDelay(),e.delay&&Object.keys(e.delay).length&&Object.values(e.delay).reduce(((e,t)=>e&&"number"==typeof t),!0)&&(this.delay=Object.assign(Object.assign({},this.delay),e.delay))}static setDelay(){this.delay={instant:this.delayBase+0*this.delayStep,fast:this.delayBase+1*this.delayStep,medFast:this.delayBase+2*this.delayStep,default:this.delayBase+3*this.delayStep,medSlow:this.delayBase+4*this.delayStep,slow:this.delayBase+5*this.delayStep}}}t.mintSettings=l,i=l,l.delayBase=0,l.delayStep=100,l.delay={instant:i.delayBase+0*i.delayStep,fast:i.delayBase+1*i.delayStep,medFast:i.delayBase+2*i.delayStep,default:i.delayBase+3*i.delayStep,medSlow:i.delayBase+4*i.delayStep,slow:i.delayBase+5*i.delayStep},t.default=l},427:function(e,t,i){var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.mintUtil=void 0;const n=i(64),s=l(i(750));class a{static windowWidth(){let e=document.getElementsByTagName("body")[0].getBoundingClientRect().width%1;return window.innerWidth+e}static debounce(e){let t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.delay.default;return function(l){t&&clearTimeout(t),t=setTimeout(e,i,l)}}static debounceEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.delay.default;return a.debounce(e,t)}static throttle(e){let t,i,l,n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.delay.default,r=arguments.length>2?arguments[2]:void 0,o=0,d=function(){o=!1===(null==r?void 0:r.leading)?0:(new Date).getTime(),n=0,l=e.apply(t,i),n||(t=i=null)};return function(){let s=(new Date).getTime();o||!1!==(null==r?void 0:r.leading)||(o=s);let u=a-s+o;return t=this,i=arguments,u<=0||u>a?(n&&(clearTimeout(n),n=0),o=s,l=e.apply(t,i),n||(t=i=null)):n||!1===(null==r?void 0:r.trailing)||(n=window.setTimeout(d,u)),l}}static throttleEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.delay.default,i=arguments.length>2?arguments[2]:void 0;return a.throttle(e,t,i)}static show(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.delay.default,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.mintSide.Top;e&&(e.style.display="",requestAnimationFrame((()=>{i===n.mintSide.Top||i===n.mintSide.Bottom?e.style.height=`${e.scrollHeight}px`:e.style.width=`${e.scrollWidth}px`,setTimeout((()=>{i===n.mintSide.Top||i===n.mintSide.Bottom?e.style.height="auto":e.style.width="auto"}),t)})))}static hide(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.delay.default,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.mintSide.Top;if(e){let l=e.scrollHeight,s=e.scrollWidth,a=e.style.transition;e.style.transition="",requestAnimationFrame((()=>{i===n.mintSide.Top||i===n.mintSide.Bottom?e.style.height=`${l}px`:e.style.width=`${s}px`,e.style.transition=a,requestAnimationFrame((()=>{i===n.mintSide.Top||i===n.mintSide.Bottom?e.style.height="0":e.style.width="0"}))})),setTimeout((()=>{e.style.display="none"}),t)}}static copyText(e){let t=document.createElement("textarea");return!(!e||!t||(t.value=e,t.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n transform: translate(-100%, -100%);\n opacity: 0;\n z-index: -1;\n ",document.body.appendChild(t),t.select(),t.setSelectionRange(0,99999),navigator.clipboard.writeText(t.value),document.body.removeChild(t),0))}static isEmail(e){return null!==e.match(/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/)}}t.mintUtil=a,t.default=a}},t={};return function i(l){var n=t[l];if(void 0!==n)return n.exports;var s=t[l]={exports:{}};return e[l].call(s.exports,s,s.exports,i),s.exports}(491)})(),e.exports=t()},721:function(e,t,i){"use strict";var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=i(498),s=l(i(565)),a=l(i(750));t.default=class{constructor(e){this.el={};let t={from:n.mintSide.Top,fixed:!0};a.default.set(Object.assign(Object.assign({},t),e)),this.attachElements(),this.attachEvents(),this.enableJavascript(),this.setMobileMenu()}attachElements(){var e;this.el.body=document.querySelector("body"),this.el.header=document.getElementById(s.default.getId("header")),this.el.mobileButton=(null===(e=this.el.header)||void 0===e?void 0:e.querySelector(s.default.controls(s.default.getId("wrapper"))))||null,this.el.wrapper=document.getElementById(s.default.getId("wrapper"))}attachEvents(){var e,t,i;window.addEventListener("resize",n.mintUtil.throttleEvent(this.eHandleResize.bind(this),a.default.delay.default,{trailing:!1})),window.addEventListener("scroll",n.mintUtil.throttleEvent(this.eHandleScroll.bind(this),a.default.delay.default,{trailing:!1}));let l=null===(e=this.el.header)||void 0===e?void 0:e.querySelectorAll(s.default.focusable),r=null==l?void 0:l[(null==l?void 0:l.length)-1];null==r||r.addEventListener("keydown",n.mintUtil.throttleEvent(this.eWrapTab.bind(this))),null==l||l.forEach((e=>{e.addEventListener("keydown",n.mintUtil.throttleEvent(this.eHandleKeypress.bind(this)))}));let o=null===(t=this.el.header)||void 0===t?void 0:t.querySelectorAll(s.default.controls()+s.default.neg(s.default.controls(s.default.ids.wrapper)));null==o||o.forEach((e=>{e.addEventListener("mousedown",n.mintUtil.throttleEvent(this.eToggleMenu.bind(this),a.default.delay.slow,{trailing:!1}))})),null===(i=this.el.mobileButton)||void 0===i||i.addEventListener("mousedown",n.mintUtil.throttleEvent(this.eToggleMobileMenu.bind(this),a.default.delay.slow,{trailing:!1}))}enableJavascript(){var e;null===(e=this.el.header)||void 0===e||e.classList.add(s.default.getClass("js"))}setMobileMenu(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];var t,i,l;let r=e?"true":"false",o=e?"close menu":"open menu";null===(t=this.el.mobileButton)||void 0===t||t.setAttribute("aria-expanded",r),setTimeout((()=>{var e;null===(e=this.el.mobileButton)||void 0===e||e.setAttribute("aria-label",o)}),a.default.delay.fast),e?(!0!==a.default.fixed&&window.scroll({top:0,left:0,behavior:"smooth"}),setTimeout((()=>{this.el.body&&(this.el.body.style.overflow="hidden")}),a.default.from===n.mintSide.Left?a.default.delay.default:a.default.delay.instant),null===(i=this.el.wrapper)||void 0===i||i.classList.add(s.default.getClass("open"))):(this.el.body&&(this.el.body.style.overflow="auto"),null===(l=this.el.wrapper)||void 0===l||l.classList.remove(s.default.getClass("open")),this.closeAllMenus())}toggleMobileMenu(){var e,t;this.setMobileMenu("false"===(null===(t=null===(e=this.el.mobileButton)||void 0===e?void 0:e.getAttribute("aria-expanded"))||void 0===t?void 0:t.toLowerCase()))}setMenu(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t?"true":"false",l=null==e?void 0:e.nextElementSibling;e&&l&&(e.setAttribute("aria-expanded",i),t?n.mintUtil.show(l):(n.mintUtil.hide(l),this.closeSubMenus(e)))}toggleMenu(e){var t;this.setMenu(e,"true"!==(null===(t=null==e?void 0:e.getAttribute("aria-expanded"))||void 0===t?void 0:t.toLowerCase()))}closeSubMenus(e){let t=null==e?void 0:e.nextElementSibling;(null==t?void 0:t.querySelectorAll(s.default.subMenuButtons)).forEach((e=>{var i;(null===(i=e.parentElement)||void 0===i?void 0:i.parentElement)===t&&this.setMenu(e)}))}closeAllMenus(){var e;let t=null===(e=this.el.wrapper)||void 0===e?void 0:e.querySelectorAll(s.default.subMenuButtons);null==t||t.forEach((e=>{this.setMenu(e)}))}openClosestMenu(){var e;let t=document.activeElement,i=null==t?void 0:t.nextElementSibling,l="true"===(null===(e=null==t?void 0:t.getAttribute("aria-expanded"))||void 0===e?void 0:e.toLowerCase());if((null==t?void 0:t.getAttribute("aria-controls"))===s.default.ids.wrapper&&(i=this.el.wrapper),(null==t?void 0:t.getAttribute("aria-controls"))&&i&&!l){t.click();let e=i.querySelector(s.default.focusable);null==e||e.focus()}}closeClosestMenu(){var e,t;let i=document.activeElement,l=null==i?void 0:i.closest(s.default.subMenu),n=(null==l?void 0:l.previousElementSibling)?l.previousElementSibling:this.el.mobileButton;(null==i?void 0:i.getAttribute("aria-controls"))&&"true"===(null===(e=null==i?void 0:i.getAttribute("aria-expanded"))||void 0===e?void 0:e.toLowerCase())&&(n=i),"true"===(null===(t=null==n?void 0:n.getAttribute("aria-expanded"))||void 0===t?void 0:t.toLowerCase())&&(null==n||n.click(),null==n||n.focus())}toggleClosestMenu(){var e,t;"true"===(null===(t=null===(e=document.activeElement)||void 0===e?void 0:e.getAttribute("aria-expanded"))||void 0===t?void 0:t.toLowerCase())?this.closeClosestMenu():this.openClosestMenu()}eHandleResize(){this.setMobileMenu()}eHandleScroll(){this.closeAllMenus()}eWrapTab(e){var t;"tab"!==e.key.toLowerCase()||e.shiftKey||(null===(t=this.el.mobileButton)||void 0===t||t.focus(),document.activeElement===this.el.mobileButton&&e.preventDefault())}eHandleButtonKeypress(e){var t;let i=e.target.closest("li");switch(e.key.toLowerCase()){case"escape":(null==i?void 0:i.classList.contains(s.default.classes.open))?this.setMenu(i):(this.setMobileMenu(),null===(t=this.el.menuButton)||void 0===t||t.focus());case"arrowleft":this.closeClosestMenu()}}eHandleLinkKeypress(e){switch(e.key.toLowerCase()){case"escape":case"arrowleft":this.closeClosestMenu();break;case"arrowright":this.openClosestMenu();break;case"enter":case"space":this.toggleClosestMenu()}}eHandleKeypress(e){"tab"!==e.key.toLowerCase()&&e.preventDefault();let t=e.target;switch(null==t?void 0:t.tagName.toLowerCase()){case"a":this.eHandleLinkKeypress(e);break;case"button":this.eHandleButtonKeypress(e)}}eToggleMobileMenu(){this.toggleMobileMenu()}eToggleMenu(e){this.toggleMenu(e.target)}}},491:function(e,t,i){"use strict";var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.n4vBar=t.n4vSettings=t.n4vSelectors=void 0;var n=i(565);Object.defineProperty(t,"n4vSelectors",{enumerable:!0,get:function(){return l(n).default}});var s=i(750);Object.defineProperty(t,"n4vSettings",{enumerable:!0,get:function(){return l(s).default}});var a=i(721);Object.defineProperty(t,"n4vBar",{enumerable:!0,get:function(){return l(a).default}});var r=i(721);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l(r).default}})},565:(e,t,i)=>{"use strict";var l,n;Object.defineProperty(t,"__esModule",{value:!0}),t.n4vSelectors=void 0;const s=i(498);class a extends(n=s.mintSelectors){}t.n4vSelectors=a,l=a,a.lib="n4v",a.pre=`${l.lib}-`,a.subMenuButtons=`button${l.hasControls}`,a.subMenu=`${l.subMenuButtons} + ul${l.hasId}`,a.ids={header:l.prefix("header"),logo:l.prefix("logo"),wrapper:l.prefix("wrapper"),mainContent:l.prefix("main-content")},a.classes=Object.assign(Object.assign({},Reflect.get(n,"classes",l)),{srOnly:l.prefix("sr-only"),js:l.prefix("js"),ready:l.prefix("ready"),fixed:l.prefix("fixed"),open:l.prefix("open")}),t.default=a},750:function(e,t,i){"use strict";var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.n4vSettings=void 0;const n=i(498),s=l(i(565));class a extends n.mintSettings{static set(e){super.set(e),(e.from||e.from===n.mintSide.Top)&&this.setFrom(e.from),"boolean"==typeof e.fixed&&this.setFixed(e.fixed)}static setFrom(e){if(this.from!==e){this.from=e;let t=document.getElementById(s.default.getId("header"));null==t||t.classList.remove(...Object.values(s.default.classes.sides)),null==t||t.classList.add(s.default.getClass(n.mintSide[this.from].toLowerCase(),"sides"))}}static setFixed(e){if(this.fixed!==e){this.fixed=e;let t=document.getElementById(s.default.getId("header")),i=s.default.getClass("fixed");this.fixed?null==t||t.classList.add(i):null==t||t.classList.remove(i)}}}t.n4vSettings=a,t.default=a}},t={},function i(l){var n=t[l];if(void 0!==n)return n.exports;var s=t[l]={exports:{}};return e[l].call(s.exports,s,s.exports,i),s.exports}(491);var e,t}));
//# sourceMappingURL=index.min.js.map
var __importDefault = this && this.__importDefault || function (mod) {
return mod && mod.__esModule ? mod : {
"default": mod
};
};
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.mintHeader = void 0;
/**
* Imports
*/
const enum_1 = __webpack_require__(/*! ../enum */ "./src/ts/imports/enum.ts");
const util_1 = __importDefault(__webpack_require__(/*! ../../util */ "./src/ts/util.ts"));
const selectors_1 = __importDefault(__webpack_require__(/*! ../util/selectors */ "./src/ts/imports/util/selectors.ts"));
const settings_1 = __importDefault(__webpack_require__(/*! ../util/settings */ "./src/ts/imports/util/settings.ts"));
/**
* Main header functionality
* @public
*/
class mintHeader {
/**
* Initializes and closes the menu
*/
constructor(settings) {
/**
* Frequently-referenced elements
*/
this.el = {};
let defaultSettings = {
from: enum_1.mintSide.Top,
fixed: true
};
settings_1.default.set(Object.assign(Object.assign({}, defaultSettings), settings));
this.attachElements();
this.attachEvents();
this.enableJavascript();
this.setMobileMenu();
}
/**
* Adds elements to {@link el | `this.el`}
*/
attachElements() {
var _a;
this.el.body = document.querySelector('body');
this.el.header = document.getElementById(selectors_1.default.getId('header'));
this.el.mobileButton = ((_a = this.el.header) === null || _a === void 0 ? void 0 : _a.querySelector(selectors_1.default.controls(selectors_1.default.getId('wrapper')))) || null;
this.el.wrapper = document.getElementById(selectors_1.default.getId('wrapper'));
}
/**
* Adds events to the dom
*/
attachEvents() {
var _a, _b, _c;
window.addEventListener('resize', util_1.default.throttleEvent(this.eHandleResize.bind(this), settings_1.default.delay.default, {
trailing: false
}));
window.addEventListener('scroll', util_1.default.throttleEvent(this.eHandleScroll.bind(this), settings_1.default.delay.default, {
trailing: false
}));
let focusables = (_a = this.el.header) === null || _a === void 0 ? void 0 : _a.querySelectorAll(selectors_1.default.focusable),
lastFocusable = focusables === null || focusables === void 0 ? void 0 : focusables[(focusables === null || focusables === void 0 ? void 0 : focusables.length) - 1];
lastFocusable === null || lastFocusable === void 0 ? void 0 : lastFocusable.addEventListener('keydown', util_1.default.throttleEvent(this.eWrapTab.bind(this)));
focusables === null || focusables === void 0 ? void 0 : focusables.forEach(focusable => {
focusable.addEventListener('keydown', util_1.default.throttleEvent(this.eHandleKeypress.bind(this)));
});
let menuButtons = (_b = this.el.header) === null || _b === void 0 ? void 0 : _b.querySelectorAll(selectors_1.default.controls() + selectors_1.default.neg(selectors_1.default.controls(selectors_1.default.ids.wrapper)));
menuButtons === null || menuButtons === void 0 ? void 0 : menuButtons.forEach(menuButton => {
menuButton.addEventListener('mousedown', util_1.default.throttleEvent(this.eToggleMenu.bind(this), settings_1.default.delay.slow, {
trailing: false
}));
});
(_c = this.el.mobileButton) === null || _c === void 0 ? void 0 : _c.addEventListener('mousedown', util_1.default.throttleEvent(this.eToggleMobileMenu.bind(this), settings_1.default.delay.slow, {
trailing: false
}));
}
/**
* Adds classes that inform the styles that javascript is enabled
*/
enableJavascript() {
var _a;
(_a = this.el.header) === null || _a === void 0 ? void 0 : _a.classList.add(selectors_1.default.getClass('js'));
}
/**
* Sets the state of the mobile menu
* @param open - `true` to open the menu or `false` to close it
*/
setMobileMenu() {
let open = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
var _a, _b, _c;
let ariaExpanded = open ? 'true' : 'false',
ariaLabel = open ? 'close menu' : 'open menu';
(_a = this.el.mobileButton) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-expanded', ariaExpanded);
setTimeout(() => {
var _a;
(_a = this.el.mobileButton) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-label', ariaLabel);
}, settings_1.default.delay.fast);
if (open) {
if (settings_1.default.fixed !== true) {
window.scroll({
top: 0,
left: 0,
behavior: 'smooth'
});
}
setTimeout(() => {
if (this.el.body) {
this.el.body.style.overflow = 'hidden';
}
}, settings_1.default.from === enum_1.mintSide.Left ? settings_1.default.delay.default : settings_1.default.delay.instant);
(_b = this.el.wrapper) === null || _b === void 0 ? void 0 : _b.classList.add(selectors_1.default.getClass('open'));
} else {
if (this.el.body) {
this.el.body.style.overflow = 'auto';
}
(_c = this.el.wrapper) === null || _c === void 0 ? void 0 : _c.classList.remove(selectors_1.default.getClass('open'));
this.closeAllMenus();
}
}
/**
* Toggles the state of the mobile menu
*/
toggleMobileMenu() {
var _a, _b;
this.setMobileMenu(((_b = (_a = this.el.mobileButton) === null || _a === void 0 ? void 0 : _a.getAttribute('aria-expanded')) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'false');
}
/**
* Sets the state of the provided button's menu
* @param button - Button element to set
* @param open - `true` to open the menu or `false` to close it
*/
setMenu(button) {
let open = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
let ariaExpanded = open ? 'true' : 'false',
menu = button === null || button === void 0 ? void 0 : button.nextElementSibling;
if (button && menu) {
button.setAttribute('aria-expanded', ariaExpanded);
if (open) {
util_1.default.show(menu);
} else {
util_1.default.hide(menu);
this.closeSubMenus(button);
}
}
}
/**
* Toggles the state of the provided button's menu
* @param button - Button element to toggle
*/
toggleMenu(button) {
var _a;
this.setMenu(button, ((_a = button === null || button === void 0 ? void 0 : button.getAttribute('aria-expanded')) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== 'true');
}
/**
* Closes all submenus of the provided button's menu
* @param button - Button element of the parent menu
*/
closeSubMenus(button) {
let menu = button === null || button === void 0 ? void 0 : button.nextElementSibling,
subMenus = menu === null || menu === void 0 ? void 0 : menu.querySelectorAll(selectors_1.default.subMenuButtons);
subMenus.forEach(child => {
var _a;
// setMenu calls this function, so ignore subsub menus
if (((_a = child.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement) === menu) {
this.setMenu(child);
}
});
}
/**
* Closes all submenus of the n4vbar
*/
closeAllMenus() {
var _a;
let menuButtons = (_a = this.el.wrapper) === null || _a === void 0 ? void 0 : _a.querySelectorAll(selectors_1.default.subMenuButtons);
menuButtons === null || menuButtons === void 0 ? void 0 : menuButtons.forEach(menuButton => {
this.setMenu(menuButton);
});
}
/**
* Opens the menu closest to the document's focus
*/
openClosestMenu() {
var _a;
let activeButton = document.activeElement,
activeMenu = activeButton === null || activeButton === void 0 ? void 0 : activeButton.nextElementSibling,
showing = ((_a = activeButton === null || activeButton === void 0 ? void 0 : activeButton.getAttribute('aria-expanded')) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'true';
if ((activeButton === null || activeButton === void 0 ? void 0 : activeButton.getAttribute('aria-controls')) === selectors_1.default.ids.wrapper) {
activeMenu = this.el.wrapper;
}
if ((activeButton === null || activeButton === void 0 ? void 0 : activeButton.getAttribute('aria-controls')) && activeMenu && !showing) {
activeButton.click();
let firstFocusable = activeMenu.querySelector(selectors_1.default.focusable);
firstFocusable === null || firstFocusable === void 0 ? void 0 : firstFocusable.focus();
}
}
/**
* Closes the menu closest to the document's focus
*/
closeClosestMenu() {
var _a, _b;
let activeElement = document.activeElement,
activeMenu = activeElement === null || activeElement === void 0 ? void 0 : activeElement.closest(selectors_1.default.subMenu),
activeButton = (activeMenu === null || activeMenu === void 0 ? void 0 : activeMenu.previousElementSibling) ? activeMenu.previousElementSibling : this.el.mobileButton;
if ((activeElement === null || activeElement === void 0 ? void 0 : activeElement.getAttribute('aria-controls')) && ((_a = activeElement === null || activeElement === void 0 ? void 0 : activeElement.getAttribute('aria-expanded')) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'true') {
activeButton = activeElement;
}
if (((_b = activeButton === null || activeButton === void 0 ? void 0 : activeButton.getAttribute('aria-expanded')) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'true') {
activeButton === null || activeButton === void 0 ? void 0 : activeButton.click();
activeButton === null || activeButton === void 0 ? void 0 : activeButton.focus();
}
}
/**
* Toggles the menu closest to the document's focus
*/
toggleClosestMenu() {
var _a, _b;
if (((_b = (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.getAttribute('aria-expanded')) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'true') {
this.closeClosestMenu();
} else {
this.openClosestMenu();
}
}
/**
* Closes the mobile menu when the window resizes
*/
eHandleResize() {
this.setMobileMenu();
}
/**
* Closes all submenus when the page is scrolled
*/
eHandleScroll() {
this.closeAllMenus();
}
/**
* Sends the focus to the menu button after tabbing past the last menu item
* @param e - Keyboard event
*/
eWrapTab(e) {
var _a;
if (e.key.toLowerCase() === 'tab' && !e.shiftKey) {
(_a = this.el.mobileButton) === null || _a === void 0 ? void 0 : _a.focus();
if (document.activeElement === this.el.mobileButton) {
e.preventDefault();
}
}
}
/**
* Handles keypresses on n4vbar buttons
* @param e - Keyboard event
*/
eHandleButtonKeypress(e) {
var _a;
let target = e.target,
subMenu = target.closest('li');
switch (e.key.toLowerCase()) {
case 'escape':
if (subMenu === null || subMenu === void 0 ? void 0 : subMenu.classList.contains(selectors_1.default.classes.open)) {
this.setMenu(subMenu);
} else {
this.setMobileMenu();
(_a = this.el.menuButton) === null || _a === void 0 ? void 0 : _a.focus();
}
case 'arrowleft':
this.closeClosestMenu();
break;
case 'arrowright':
break;
case 'enter':
case 'space':
break;
}
}
/**
* Handles keypresses on n4vbar links
* @param e - Keyboard event
*/
eHandleLinkKeypress(e) {
switch (e.key.toLowerCase()) {
case 'escape':
case 'arrowleft':
this.closeClosestMenu();
break;
case 'arrowright':
this.openClosestMenu();
break;
case 'enter':
case 'space':
this.toggleClosestMenu();
break;
}
}
/**
* Handles keypresses on the n4vbar
* @param e - Keyboard event
*/
eHandleKeypress(e) {
if (e.key.toLowerCase() !== 'tab') {
e.preventDefault();
}
let target = e.target;
switch (target === null || target === void 0 ? void 0 : target.tagName.toLowerCase()) {
case 'a':
this.eHandleLinkKeypress(e);
break;
case 'button':
this.eHandleButtonKeypress(e);
break;
}
}
/**
* Toggles the mobile menu
*/
eToggleMobileMenu() {
this.toggleMobileMenu();
}
/**
* Toggles the clicked submenu
* @param e - Mouse event
*/
eToggleMenu(e) {
this.toggleMenu(e.target);
}
}
exports.mintHeader = mintHeader;
exports["default"] = mintHeader;
/***/ }),
/***/ "./node_modules/@appartmint/util/dist/js/index.min.js":
/*!************************************************************!*\
!*** ./node_modules/@appartmint/util/dist/js/index.min.js ***!
\************************************************************/
/***/ ((module) => {
/***/ "./src/ts/imports/enum.ts":
/*!********************************!*\
!*** ./src/ts/imports/enum.ts ***!
\********************************/
/***/ ((__unused_webpack_module, exports) => {
!function(e,t){ true?module.exports=t():0}(self,(()=>(()=>{"use strict";var e={64:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.mintSide=void 0,(i=t.mintSide||(t.mintSide={}))[i.Top=0]="Top",i[i.Right=1]="Right",i[i.Bottom=2]="Bottom",i[i.Left=3]="Left"},54:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintColor=void 0;class i{constructor(e){this.r="number"==typeof e.r?Math.max(Math.min(e.r,i.hexBase**2-1),0):0,this.g="number"==typeof e.g?Math.max(Math.min(e.g,i.hexBase**2-1),0):0,this.b="number"==typeof e.b?Math.max(Math.min(e.b,i.hexBase**2-1),0):0,this.a="number"==typeof e.a?Math.max(Math.min(e.a,1),0):1,"string"==typeof e.color&&this.stringConstructor(e.color)}stringConstructor(e){e.startsWith("#")?this.hexConstructor(e):(~e.indexOf("linear-gradient")&&(e=e.substring(e.indexOf("linear-gradient"),e.length)),this.rgbConstructor(e))}hexConstructor(e){switch(e.length){case 1:case 5:case 6:return;case 2:e="#"+e[1]+e[1]+e[1]+e[1]+e[1]+e[1]+i.hexMax;break;case 3:e="#"+e[1]+e[1]+e[1]+e[2]+e[2]+e[2]+i.hexMax;break;case 4:e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+i.hexMax;break;case 7:e+=i.hexMax;break;case 8:e+=e[e.length-1];break;default:e=e.substring(0,9)}this.r=parseInt(e.substring(1,3),i.hexBase),this.g=parseInt(e.substring(3,5),i.hexBase),this.b=parseInt(e.substring(5,7),i.hexBase),this.a=parseInt(e.substring(7,9),i.hexBase)/i.hexBase**2}rgbConstructor(e){let t=e.match(/rgba?\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)?(?:, ?(\d(?:\.\d*)?)\))?/);t&&(this.r=parseInt(t[1]),this.g=parseInt(t[2]),this.b=parseInt(t[3]),this.a=parseFloat(t[4]))}getBrightness(){return 0===this.a?262:isNaN(this.r)||isNaN(this.g)||isNaN(this.b)?-1:Math.round((299*this.r+587*this.g+144*this.b)/1e3)}}t.mintColor=i,i.hexBase=16,i.hexMax="FF",t.default=i},708:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintItem=void 0;class i{constructor(){this.version=0,this.priority=0,this.centered=!1,this.disabled=!1,this.queryParams={},this.attributes={},this.classes=[],this.buttons=[],this.images=[],this.children=[]}}t.mintItem=i,t.default=i},139:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintDisplay=void 0;class i{}t.mintDisplay=i,t.default=i},376:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintEvent=void 0;class i{}t.mintEvent=i,t.default=i},683:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintMath=void 0;class i{static randomInt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t)+t)}}t.mintMath=i,t.default=i},982:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintObject=void 0;class i{static isSimilar(e,t){let i=Object.keys(e);return i.length===Object.keys(t).length&&(i.forEach((i=>{if(e[i]!==t[i])return!1})),!0)}static isSuperset(e,t){let n=!0;if(e===t)return n;try{if(0===Object.keys(t).length)return!n}catch(e){return!n}return Object.keys(t).forEach((a=>{n=n&&i.isSuperset(e[a],t[a])})),n}static remove(e,t){return Object.keys(e).reduce(((i,n)=>(t.includes(n)||(i[n]=e[n]),i)),{})}static sort(e){return Object.keys(e).sort().reduce(((t,i)=>(t[i]=e[i],t)),{})}static filter(e,t){return this.filterKeys(e,t)}static filterKeys(e,t){return t.reduce(((t,i)=>(t[i]=e[i],t)),{})}static filterValues(e,t){return Object.keys(e).reduce(((i,n)=>(t.includes(e[n])&&(i[n]=e[n]),i)),{})}}t.mintObject=i,t.default=i},226:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintText=void 0;class i{}t.mintText=i,t.default=i},505:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintWindow=void 0;class i{}t.mintWindow=i,t.default=i},491:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.mintUtil=t.mintSettings=t.mintSelectors=t.mintWindow=t.mintText=t.mintObject=t.mintMath=t.mintEvent=t.mintDisplay=t.mintItem=t.mintColor=t.mintSide=void 0;var a=i(64);Object.defineProperty(t,"mintSide",{enumerable:!0,get:function(){return a.mintSide}});var r=i(54);Object.defineProperty(t,"mintColor",{enumerable:!0,get:function(){return r.mintColor}});var s=i(708);Object.defineProperty(t,"mintItem",{enumerable:!0,get:function(){return s.mintItem}});var l=i(139);Object.defineProperty(t,"mintDisplay",{enumerable:!0,get:function(){return l.mintDisplay}});var o=i(376);Object.defineProperty(t,"mintEvent",{enumerable:!0,get:function(){return o.mintEvent}});var d=i(683);Object.defineProperty(t,"mintMath",{enumerable:!0,get:function(){return d.mintMath}});var u=i(982);Object.defineProperty(t,"mintObject",{enumerable:!0,get:function(){return u.mintObject}});var c=i(226);Object.defineProperty(t,"mintText",{enumerable:!0,get:function(){return c.mintText}});var h=i(505);Object.defineProperty(t,"mintWindow",{enumerable:!0,get:function(){return h.mintWindow}});var m=i(565);Object.defineProperty(t,"mintSelectors",{enumerable:!0,get:function(){return m.mintSelectors}});var b=i(750);Object.defineProperty(t,"mintSettings",{enumerable:!0,get:function(){return b.mintSettings}});var f=i(427);Object.defineProperty(t,"mintUtil",{enumerable:!0,get:function(){return f.mintUtil}}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(f).default}})},565:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.mintSelectors=void 0;class n{static prefix(e){return(e=e.toLowerCase()).startsWith(this.pre)?e:`${this.pre}${e}`}static cssPrefix(e){return`--${this.prefix(e.replace(/^-+/,""))}`}static cssVar(e){return`var(${this.cssPrefix(e)})`}static neg(e){return`:not(${e})`}static class(e){return`.${this.prefix(e)}`}static id(e){return`#${this.prefix(e)}`}static controls(e){return e?`[aria-controls="${this.prefix(e)}"]`:this.hasControls}static expanded(e){return"boolean"==typeof e?`[aria-expanded="${e}"]`:this.hasExpanded}static getId(e){var t;return null!==(t=this.ids[null!=e?e:-1])&&void 0!==t?t:""}static getClass(e,t){var i,n;return t?null!==(i=this.classes[t][null!=e?e:-1])&&void 0!==i?i:"":null!==(n=this.classes[null!=e?e:-1])&&void 0!==n?n:""}static getFocusables(e){let t;return t=e?[...e.querySelectorAll(this.focusable)]:[...document.querySelectorAll(this.focusable)],t.filter((e=>this.isFocusable(e)))}static isFocusable(e){let t=e;do{if("none"===window.getComputedStyle(t).getPropertyValue("display").toLowerCase())return!1;t=t.parentElement}while(t);return!0}}t.mintSelectors=n,i=n,n.lib="mint",n.pre=`${i.lib}-`,n.disabled="[disabled]",n.hasControls="[aria-controls]",n.hasExpanded="[aria-expanded]",n.hasLink="[href]",n.hasRouterLink="[routerLink]",n.hasId="[id]",n.notTabbable='[tabindex^="-"]',n.tabbable=`[tabindex]${i.neg(i.notTabbable)}`,n.focusable=`input${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n select${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n textarea${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n button${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n object${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n a${i.hasLink}, a${i.hasRouterLink},\n area${i.hasLink},\n ${i.tabbable}`.replace(/\s/g,""),n.classes={sides:{top:i.prefix("top"),right:i.prefix("right"),bottom:i.prefix("bottom"),left:i.prefix("left")}},t.default=n},750:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.mintSettings=void 0;class n{static set(e){let t=!1;"number"==typeof e.delayBase&&(this.delayBase=e.delayBase,t=!0),"number"==typeof e.delayStep&&(this.delayStep=e.delayStep,t=!0),t&&this.setDelay(),e.delay&&Object.keys(e.delay).length&&Object.values(e.delay).reduce(((e,t)=>e&&"number"==typeof t),!0)&&(this.delay=Object.assign(Object.assign({},this.delay),e.delay))}static setDelay(){this.delay={instant:this.delayBase+0*this.delayStep,fast:this.delayBase+1*this.delayStep,medFast:this.delayBase+2*this.delayStep,default:this.delayBase+3*this.delayStep,medSlow:this.delayBase+4*this.delayStep,slow:this.delayBase+5*this.delayStep}}}t.mintSettings=n,i=n,n.delayBase=0,n.delayStep=100,n.delay={instant:i.delayBase+0*i.delayStep,fast:i.delayBase+1*i.delayStep,medFast:i.delayBase+2*i.delayStep,default:i.delayBase+3*i.delayStep,medSlow:i.delayBase+4*i.delayStep,slow:i.delayBase+5*i.delayStep},t.default=n},427:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.mintUtil=void 0;const a=i(64),r=n(i(750));class s{static windowWidth(){let e=document.getElementsByTagName("body")[0].getBoundingClientRect().width%1;return window.innerWidth+e}static debounce(e){let t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.delay.default;return function(n){t&&clearTimeout(t),t=setTimeout(e,i,n)}}static debounceEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.delay.default;return s.debounce(e,t)}static throttle(e){let t,i,n,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.delay.default,l=arguments.length>2?arguments[2]:void 0,o=0,d=function(){o=!1===(null==l?void 0:l.leading)?0:(new Date).getTime(),a=0,n=e.apply(t,i),a||(t=i=null)};return function(){let r=(new Date).getTime();o||!1!==(null==l?void 0:l.leading)||(o=r);let u=s-r+o;return t=this,i=arguments,u<=0||u>s?(a&&(clearTimeout(a),a=0),o=r,n=e.apply(t,i),a||(t=i=null)):a||!1===(null==l?void 0:l.trailing)||(a=window.setTimeout(d,u)),n}}static throttleEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.delay.default,i=arguments.length>2?arguments[2]:void 0;return s.throttle(e,t,i)}static show(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.delay.default,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.mintSide.Top;e&&(e.style.display="",requestAnimationFrame((()=>{i===a.mintSide.Top||i===a.mintSide.Bottom?e.style.height=`${e.scrollHeight}px`:e.style.width=`${e.scrollWidth}px`,setTimeout((()=>{i===a.mintSide.Top||i===a.mintSide.Bottom?e.style.height="auto":e.style.width="auto"}),t)})))}static hide(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.delay.default,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.mintSide.Top;if(e){let n=e.scrollHeight,r=e.scrollWidth,s=e.style.transition;e.style.transition="",requestAnimationFrame((()=>{i===a.mintSide.Top||i===a.mintSide.Bottom?e.style.height=`${n}px`:e.style.width=`${r}px`,e.style.transition=s,requestAnimationFrame((()=>{i===a.mintSide.Top||i===a.mintSide.Bottom?e.style.height="0":e.style.width="0"}))})),setTimeout((()=>{e.style.display="none"}),t)}}static copyText(e){let t=document.createElement("textarea");return!(!e||!t||(t.value=e,t.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n transform: translate(-100%, -100%);\n opacity: 0;\n z-index: -1;\n ",document.body.appendChild(t),t.select(),t.setSelectionRange(0,99999),navigator.clipboard.writeText(t.value),document.body.removeChild(t),0))}static isEmail(e){return null!==e.match(/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/)}}t.mintUtil=s,t.default=s}},t={};return function i(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n].call(r.exports,r,r.exports,i),r.exports}(491)})()));
//# sourceMappingURL=index.min.js.map
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
(() => {
"use strict";
var exports = __webpack_exports__;
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.mintSide = void 0;
/**
* Side Enum
*/
var mintSide;
(function (mintSide) {
mintSide[mintSide["Top"] = 0] = "Top";
mintSide[mintSide["Right"] = 1] = "Right";
mintSide[mintSide["Bottom"] = 2] = "Bottom";
mintSide[mintSide["Left"] = 3] = "Left";
})(mintSide = exports.mintSide || (exports.mintSide = {}));
;
/***/ }),
/***/ "./src/ts/imports/models/color.ts":
/*!****************************************!*\
!*** ./src/ts/imports/models/color.ts ***!
\****************************************/
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.mintColor = void 0;
/**
* Color
*/
class mintColor {
constructor(args) {
this.r = typeof args.r === 'number' ? Math.max(Math.min(args.r, mintColor.hexBase ** 2 - 1), 0) : 0;
this.g = typeof args.g === 'number' ? Math.max(Math.min(args.g, mintColor.hexBase ** 2 - 1), 0) : 0;
this.b = typeof args.b === 'number' ? Math.max(Math.min(args.b, mintColor.hexBase ** 2 - 1), 0) : 0;
this.a = typeof args.a === 'number' ? Math.max(Math.min(args.a, 1), 0) : 1;
if (typeof args.color === 'string') {
this.stringConstructor(args.color);
}
}
/**
* Constructor from a string argument
*/
stringConstructor(str) {
if (str.startsWith('#')) {
this.hexConstructor(str);
} else {
if (~str.indexOf('linear-gradient')) {
str = str.substring(str.indexOf('linear-gradient'), str.length);
}
this.rgbConstructor(str);
}
}
/**
* Constructor from a hex argument
*/
hexConstructor(hex) {
switch (hex.length) {
case 1:
case 5:
case 6:
return;
case 2:
hex = '#' + hex[1] + hex[1] + hex[1] + hex[1] + hex[1] + hex[1] + mintColor.hexMax;
break;
case 3:
hex = '#' + hex[1] + hex[1] + hex[1] + hex[2] + hex[2] + hex[2] + mintColor.hexMax;
break;
case 4:
hex = '#' + hex[1] + hex[1] + hex[2] + hex[2] + hex[3] + hex[3] + mintColor.hexMax;
break;
case 7:
hex += mintColor.hexMax;
break;
case 8:
hex += hex[hex.length - 1];
break;
default:
hex = hex.substring(0, 9);
}
this.r = parseInt(hex.substring(1, 3), mintColor.hexBase);
this.g = parseInt(hex.substring(3, 5), mintColor.hexBase);
this.b = parseInt(hex.substring(5, 7), mintColor.hexBase);
this.a = parseInt(hex.substring(7, 9), mintColor.hexBase) / mintColor.hexBase ** 2;
}
/**
* Constructor from an rgba argument
*/
rgbConstructor(rgb) {
let match = rgb.match(/rgba?\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)?(?:, ?(\d(?:\.\d*)?)\))?/);
if (match) {
this.r = parseInt(match[1]);
this.g = parseInt(match[2]);
this.b = parseInt(match[3]);
this.a = parseFloat(match[4]);
}
}
/**
* Returns the perceived brightness of the color
*/
getBrightness() {
if (this.a === 0) {
return 262;
}
if (!isNaN(this.r) && !isNaN(this.g) && !isNaN(this.b)) {
return Math.round((this.r * 299 + this.g * 587 + this.b * 144) / 1000);
}
return -1;
}
}
exports.mintColor = mintColor;
mintColor.hexBase = 16;
mintColor.hexMax = 'FF';
exports["default"] = mintColor;
/***/ }),
/***/ "./src/ts/imports/models/item.ts":
/*!***************************************!*\
!*** ./src/ts/imports/models/item.ts ***!
\***************************************/
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.mintItem = void 0;
/**
* A generic item
*/
class mintItem {
constructor() {
/**
* Item settings
*/
this.version = 0;
this.priority = 0;
this.centered = false;
this.disabled = false;
/**
* Item data
*/
this.queryParams = {};
this.attributes = {};
/**
* Item lists
*/
this.classes = [];
this.buttons = [];
this.images = [];
this.children = [];
}
}
exports.mintItem = mintItem;
;
exports["default"] = mintItem;
/***/ }),
/***/ "./src/ts/imports/util/display.ts":
/*!****************************************!*\
!*** ./src/ts/imports/util/display.ts ***!
\****************************************/
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.mintDisplay = void 0;
/**
* Handles the display of elements
*/
class mintDisplay {}
exports.mintDisplay = mintDisplay;
;
exports["default"] = mintDisplay;
/***/ }),
/***/ "./src/ts/imports/util/event.ts":
/*!**************************************!*\
!*** ./src/ts/imports/util/event.ts ***!
\**************************************/
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.mintEvent = void 0;
/**
* Event helper functions
*/
class mintEvent {}
exports.mintEvent = mintEvent;
;
exports["default"] = mintEvent;
/***/ }),
/***/ "./src/ts/imports/util/icon.ts":
/*!*************************************!*\
!*** ./src/ts/imports/util/icon.ts ***!
\*************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
var __importDefault = this && this.__importDefault || function (mod) {
return mod && mod.__esModule ? mod : {
"default": mod
};
};
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.mintIcon = void 0;
/**
* Imports
*/
const object_1 = __importDefault(__webpack_require__(/*! ./object */ "./src/ts/imports/util/object.ts"));
/**
* Icon helper functions
*/
class mintIcon {
/**
* Appends the given icon to the given selector
*/
static append(icon, selector) {
let items = document.querySelectorAll(selector);
items.forEach(item => {
let currentIcon = item.querySelector('i'),
iconElement = document.createElement('i');
iconElement.classList.add(...icon.split(' '));
if (currentIcon) {
item.replaceChild(iconElement, currentIcon);
} else {
item.appendChild(iconElement);
}
});
}
/**
* Updates the icons
* @param icons - the icons to update
*/
static update(icons) {
let activeIcons = object_1.default.removeValues(Object.assign(Object.assign({}, this.icons), icons), [false]);
Object.keys(activeIcons).forEach(selector => {
this.append(activeIcons[selector], selector);
});
}
}
exports.mintIcon = mintIcon;
/**
* Default icons
*/
mintIcon.icons = {
'a[href^="http"]': 'fas fa-up-right-from-square',
'a[href^="mailto:"]': 'far fa-envelope',
'a[href^="tel:"]': 'fas fa-phone-flip',
'a[href^="sms:"]': 'far fa-message'
};
;
exports["default"] = mintIcon;
/***/ }),
/***/ "./src/ts/imports/util/math.ts":
/*!*************************************!*\
!*** ./src/ts/imports/util/math.ts ***!
\*************************************/
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.mintMath = void 0;
/**
* Math functions for the util library
*/
class mintMath {
/**
* Get a random integer between min and max
* @param max Maximum value to return
* @param min Minimum value to return (default is 0)
* @returns a random integer between min and max
*/
static randomInt(max) {
let min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min) + min);
}
}
exports.mintMath = mintMath;
;
exports["default"] = mintMath;
/***/ }),
/***/ "./src/ts/imports/util/object.ts":
/*!***************************************!*\
!*** ./src/ts/imports/util/object.ts ***!
\***************************************/
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.mintObject = void 0;
/**
* Object functions for the util library
*/
class mintObject {
/**
* Returns true if the provided objects have the same entries
*/
static isSimilar(obj1, obj2) {
let keys = Object.keys(obj1);
if (keys.length !== Object.keys(obj2).length) {
return false;
}
keys.forEach(key => {
if (obj1[key] !== obj2[key]) {
return false;
}
});
return true;
}
/**
* Returns true if the first object has at least the same
* entries as the second object
* @param superset - the object to check
* @param subset - the object whose entries are required
* @returns - true if the first object is a superset of the second
* @recursive
*/
static isSuperset(superset, subset) {
let isSuperset = true;
// Base case - if the objects are equal, it is a superset
if (superset === subset) {
return isSuperset;
}
// If the subset isn't an object or array, and doesn't
// satisfy the base case, it isn't a superset
try {
if (Object.keys(subset).length === 0) {
return !isSuperset;
}
}
// If the subset is null or undefined, and doesn't satisfy
// the base case, it isn't a superset
// TODO: Check if other exceptions could occur
catch (e) {
return !isSuperset;
}
// If the children of the subset are subsets of the
// respective children of the superset, it is a superset
Object.keys(subset).forEach(key => {
isSuperset = isSuperset && mintObject.isSuperset(superset[key], subset[key]);
});
return isSuperset;
}
/**
* Removes object entries by key
* @alias mintObject.removeKeys
* @param object - the object to remove entries from
* @param keys - the keys to remove
*/
static remove(object, keys) {
return this.removeKeys(object, keys);
}
/**
* Removes object entries by key
* @param object - the object to remove entries from
* @param keys - the keys to remove
*/
static removeKeys(object, keys) {
return Object.keys(object).reduce((obj, key) => {
if (!keys.includes(key)) {
obj[key] = object[key];
}
return obj;
}, {});
}
/**
* Removes object entries by value
*/
static removeValues(object, values) {
return Object.keys(object).reduce((obj, key) => {
if (!values.includes(object[key])) {
obj[key] = object[key];
}
return obj;
}, {});
}
/**
* Sorts an object's entries alphabetically by key
*/
static sort(object) {
return Object.keys(object).sort().reduce((obj, key) => {
obj[key] = object[key];
return obj;
}, {});
}
/**
* @alias mintObject.filterKeys
*/
static filter(object, keys) {
return this.filterKeys(object, keys);
}
/**
* Filters an object by its keys
* @param object - the object to filter
* @param keys - the keys to keep
* @returns - the filtered object
*/
static filterKeys(object, keys) {
return keys.reduce((obj, key) => {
obj[key] = object[key];
return obj;
}, {});
}
/**
* Filters an object by its values
* @param object - the object to filter
* @param values - the values to keep
* @returns - the filtered object
*/
static filterValues(object, values) {
return Object.keys(object).reduce((obj, key) => {
if (values.includes(object[key])) {
obj[key] = object[key];
}
return obj;
}, {});
}
}
exports.mintObject = mintObject;
;
exports["default"] = mintObject;
/***/ }),
/***/ "./src/ts/imports/util/selectors.ts":
/*!******************************************!*\
!*** ./src/ts/imports/util/selectors.ts ***!
\******************************************/
/***/ ((__unused_webpack_module, exports) => {
var _a;
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.mintSelectors = void 0;
/**
* CSS-selector helpers
* @public
*/
class mintSelectors {
/**
* Adds the library prefix to the beginning of the provided string
* @param base - the string to be prefixed
* @returns - the provided string prefixed with the library name
*/
static prefix(base) {
base = base.toLowerCase();
return base.startsWith(this.pre) ? base : `${this.pre}${base}`;
}
/**
* Adds two dashes to the beginning of the provided string
* @param base - the string to be prefixed
* @returns - the provided string prefixed with two dashes
*/
static cssPrefix(base) {
return `--${this.prefix(base.replace(/^-+/, ''))}`;
}
/**
* Turns the provided string into a CSS variable call
* @param base - the name of the CSS variable to call
* @returns - the CSS variable call for the provided string
*/
static cssVar(base) {
return `var(${this.cssPrefix(base)})`;
}
/**
* Negates the provided CSS selector
* @param base - the CSS selector to negate
* @returns - the negated CSS selector
*/
static neg(base) {
return `:not(${base})`;
}
/**
* Generates a class CSS selector
* @param base - the name of the class to generate
* @returns - the generated CSS selector
*/
static class(base) {
return `.${this.prefix(base)}`;
}
/**
* Generates an id CSS selector
* @param base - the name of the id to generate
* @returns - the generated CSS selector
*/
static id(base) {
return `#${this.prefix(base)}`;
}
/**
* Generates an aria-controls CSS selector
* @param id - the id of the controlled element
* @returns - the generated CSS selector
*/
static controls(id) {
return id ? `[aria-controls="${this.prefix(id)}"]` : this.hasControls;
}
/**
* Generates an aria-expanded CSS selector
* @param bool - whether the element is expanded or not
* @returns - the generated CSS selector
*/
static expanded(bool) {
return typeof bool === 'boolean' ? `[aria-expanded="${bool}"]` : this.hasExpanded;
}
/**
* Returns the id of the requested element
*/
static getId(id) {
var _b;
return (_b = this.ids[id !== null && id !== void 0 ? id : -1]) !== null && _b !== void 0 ? _b : '';
}
/**
* Returns the class of the requested element
*/
static getClass(className, classGroup) {
var _b, _c;
if (classGroup) {
let group = this.classes[classGroup];
return (_b = group[className !== null && className !== void 0 ? className : -1]) !== null && _b !== void 0 ? _b : '';
}
return (_c = this.classes[className !== null && className !== void 0 ? className : -1]) !== null && _c !== void 0 ? _c : '';
}
/**
* Returns a NodeList of HTMLElements within the given element that are focusable
* @param el - the element whose focusable children will be returned
* @returns - the elements within the given element that are focusable
*/
static getFocusables(el) {
let focusables;
if (el) {
focusables = [...el.querySelectorAll(this.focusable)];
} else {
focusables = [...document.querySelectorAll(this.focusable)];
}
return focusables.filter(el => this.isFocusable(el));
}
/**
* Returns true if an element is focusable and false if not,
* based on styles (i.e. a parent has display: none;)
* NOTE: Still need to determine what other styles may make an element un-focusable
* @param el - the element
* @returns - true if the element is focusable; false if not
*/
static isFocusable(el) {
let current = el;
do {
if (window.getComputedStyle(current).getPropertyValue('display').toLowerCase() === 'none') {
return false;
}
current = current.parentElement;
} while (current);
return true;
}
}
exports.mintSelectors = mintSelectors;
_a = mintSelectors;
/**
* The library name that will be added as a prefix
*/
mintSelectors.lib = 'mint';
/**
* The prefix built from the library name
*/
mintSelectors.pre = `${_a.lib}-`;
/**
* CSS-selector for disabled elements
*/
mintSelectors.disabled = '[disabled]';
/**
* CSS-selector for elements with an aria-controls attribute
*/
mintSelectors.hasControls = '[aria-controls]';
/**
* CSS-selector for elements with an aria-expanded attribute
*/
mintSelectors.hasExpanded = '[aria-expanded]';
/**
* CSS-selector for elements with an href attribute
*/
mintSelectors.hasLink = '[href]';
/**
* CSS-selector for elements with a routerLink attribute
*/
mintSelectors.hasRouterLink = '[routerLink]';
/**
* CSS-selector for elements with an id attribute
*/
mintSelectors.hasId = '[id]';
/**
* CSS-selector for elements that aren't tabbable (i.e. tabindex is negative)
*/
mintSelectors.notTabbable = '[tabindex^="-"]';
/**
* CSS-selector for elements that are tabbable (i.e. tabindex isn't negative)
*/
mintSelectors.tabbable = `[tabindex]${_a.neg(_a.notTabbable)}`;
/**
* CSS-selector for elements that can receive focus
*/
mintSelectors.focusable = `input${_a.neg(_a.disabled)}${_a.neg(_a.notTabbable)},
select${_a.neg(_a.disabled)}${_a.neg(_a.notTabbable)},
textarea${_a.neg(_a.disabled)}${_a.neg(_a.notTabbable)},
button${_a.neg(_a.disabled)}${_a.neg(_a.notTabbable)},
object${_a.neg(_a.disabled)}${_a.neg(_a.notTabbable)},
a${_a.hasLink}, a${_a.hasRouterLink},
area${_a.hasLink},
${_a.tabbable}`.replace(/\s/g, '');
/**
* CSS-selector for submenu buttons
*/
mintSelectors.subMenuButtons = `button${_a.hasControls}`;
/**
* CSS-selector for submenus
*/
mintSelectors.subMenu = `${_a.subMenuButtons} + ul${_a.hasId}`;
/**
* Frequently-used ids
*/
mintSelectors.ids = {
header: _a.prefix('header'),
logo: _a.prefix('logo'),
wrapper: _a.prefix('wrapper'),
mainContent: _a.prefix('main-content')
};
/**
* Classes
*/
mintSelectors.classes = {
sides: {
top: _a.prefix('top'),
right: _a.prefix('right'),
bottom: _a.prefix('bottom'),
left: _a.prefix('left')
},
srOnly: _a.prefix('sr-only'),
js: _a.prefix('js'),
ready: _a.prefix('ready'),
fixed: _a.prefix('fixed'),
open: _a.prefix('open')
};
exports["default"] = mintSelectors;
/***/ }),
/***/ "./src/ts/imports/util/settings.ts":
/*!*****************************************!*\
!*** ./src/ts/imports/util/settings.ts ***!
\*****************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
var _a;
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.mintSettings = void 0;
/**
* Imports
*/
const enum_1 = __webpack_require__(/*! ../enum */ "./src/ts/imports/enum.ts");
const selectors_1 = __webpack_require__(/*! ./selectors */ "./src/ts/imports/util/selectors.ts");
/**
* Settings management
* @public
*/
class mintSettings {
/**
* Update the provided settings variables
* @param settings - Object of settings variables to update
*/
static set(settings) {
let newDelay = false;
if (typeof settings.delayBase === 'number') {
this.delayBase = settings.delayBase;
newDelay = true;
}
if (typeof settings.delayStep === 'number') {
this.delayStep = settings.delayStep;
newDelay = true;
}
if (newDelay) {
this.setDelay();
}
if (settings.delay && Object.keys(settings.delay).length) {
if (Object.values(settings.delay).reduce((prev, next) => prev && typeof next === 'number', true)) {
this.delay = Object.assign(Object.assign({}, this.delay), settings.delay);
}
}
}
/**
* Updates the delay variables based on `this.delayBase` and `this.delayStep`
*/
static setDelay() {
this.delay = {
instant: this.delayBase + this.delayStep * 0,
fast: this.delayBase + this.delayStep * 1,
medFast: this.delayBase + this.delayStep * 2,
default: this.delayBase + this.delayStep * 3,
medSlow: this.delayBase + this.delayStep * 4,
slow: this.delayBase + this.delayStep * 5
};
}
/**
* Updates the direction the navbar enters from
*/
static setFrom(from) {
if (this.from !== from) {
this.from = from;
let header = document.getElementById(selectors_1.mintSelectors.getId('header'));
header === null || header === void 0 ? void 0 : header.classList.remove(...Object.values(selectors_1.mintSelectors.classes.sides));
header === null || header === void 0 ? void 0 : header.classList.add(selectors_1.mintSelectors.getClass(enum_1.mintSide[this.from].toLowerCase(), 'sides'));
}
}
/**
* Updates whether or not the navbar is fixed
*/
static setFixed(fixed) {
if (this.fixed !== fixed) {
this.fixed = fixed;
let header = document.getElementById(selectors_1.mintSelectors.getId('header')),
fixedClass = selectors_1.mintSelectors.getClass('fixed');
if (this.fixed) {
header === null || header === void 0 ? void 0 : header.classList.add(fixedClass);
} else {
header === null || header === void 0 ? void 0 : header.classList.remove(fixedClass);
}
}
}
}
exports.mintSettings = mintSettings;
_a = mintSettings;
/**
* Value added to all delay variables
*/
mintSettings.delayBase = 0;
/**
* Value multiplied by delay variable index
*/
mintSettings.delayStep = 100;
/**
* Delay variables
*/
mintSettings.delay = {
instant: _a.delayBase + _a.delayStep * 0,
fast: _a.delayBase + _a.delayStep * 1,
medFast: _a.delayBase + _a.delayStep * 2,
default: _a.delayBase + _a.delayStep * 3,
medSlow: _a.delayBase + _a.delayStep * 4,
slow: _a.delayBase + _a.delayStep * 5
};
;
exports["default"] = mintSettings;
/***/ }),
/***/ "./src/ts/imports/util/text.ts":
/*!*************************************!*\
!*** ./src/ts/imports/util/text.ts ***!
\*************************************/
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.mintText = void 0;
/**
* Functions for analyzing and manipulating text.
*/
class mintText {}
exports.mintText = mintText;
;
exports["default"] = mintText;
/***/ }),
/***/ "./src/ts/imports/util/window.ts":
/*!***************************************!*\
!*** ./src/ts/imports/util/window.ts ***!
\***************************************/
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.mintWindow = void 0;
/**
* Functions related to the browser window.
*/
class mintWindow {}
exports.mintWindow = mintWindow;
;
exports["default"] = mintWindow;
/***/ }),
/***/ "./src/ts/index.ts":
/*!*************************!*\
!*** ./src/ts/index.ts ***!
\*************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
/**
* Exports
* A library for building responsive web applications.
*
* @packageDocumentation
*/
var __importDefault = this && this.__importDefault || function (mod) {
return mod && mod.__esModule ? mod : {
"default": mod
};
};
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.mintSide = exports.mintWindow = exports.mintText = exports.mintObject = exports.mintEvent = exports.mintDisplay = exports.mintColor = exports.mintSettings = exports.mintSelectors = exports.mintUtil = exports.n4vSettings = exports.n4vSelectors = exports.n4vBar = void 0;
// Forward n4v
var n4v_1 = __webpack_require__(/*! @appartmint/n4v */ "./node_modules/@appartmint/n4v/dist/js/index.min.js");
Object.defineProperty(exports, "n4vBar", ({
exports["default"] = exports.mintUtil = exports.mintSettings = exports.mintSelectors = exports.mintWindow = exports.mintText = exports.mintObject = exports.mintMath = exports.mintIcon = exports.mintEvent = exports.mintDisplay = exports.mintItem = exports.mintColor = exports.mintHeader = exports.mintSide = void 0;
/**
* Exports
*/
// Enums
var enum_1 = __webpack_require__(/*! ./imports/enum */ "./src/ts/imports/enum.ts");
Object.defineProperty(exports, "mintSide", ({
enumerable: true,
get: function () {
return n4v_1.n4vBar;
return enum_1.mintSide;
}
}));
Object.defineProperty(exports, "n4vSelectors", ({
// Components
var header_1 = __webpack_require__(/*! ./imports/components/header */ "./src/ts/imports/components/header.ts");
Object.defineProperty(exports, "mintHeader", ({
enumerable: true,
get: function () {
return n4v_1.n4vSelectors;
return header_1.mintHeader;
}
}));
Object.defineProperty(exports, "n4vSettings", ({
// Models
var color_1 = __webpack_require__(/*! ./imports/models/color */ "./src/ts/imports/models/color.ts");
Object.defineProperty(exports, "mintColor", ({
enumerable: true,
get: function () {
return n4v_1.n4vSettings;
return color_1.mintColor;
}
}));
// Forward util
var util_1 = __webpack_require__(/*! @appartmint/util */ "./node_modules/@appartmint/util/dist/js/index.min.js");
Object.defineProperty(exports, "mintUtil", ({
var item_1 = __webpack_require__(/*! ./imports/models/item */ "./src/ts/imports/models/item.ts");
Object.defineProperty(exports, "mintItem", ({
enumerable: true,
get: function () {
return util_1.mintUtil;
return item_1.mintItem;
}
}));
Object.defineProperty(exports, "mintSelectors", ({
// Utilities
var display_1 = __webpack_require__(/*! ./imports/util/display */ "./src/ts/imports/util/display.ts");
Object.defineProperty(exports, "mintDisplay", ({
enumerable: true,
get: function () {
return util_1.mintSelectors;
return display_1.mintDisplay;
}
}));
Object.defineProperty(exports, "mintSettings", ({
var event_1 = __webpack_require__(/*! ./imports/util/event */ "./src/ts/imports/util/event.ts");
Object.defineProperty(exports, "mintEvent", ({
enumerable: true,
get: function () {
return util_1.mintSettings;
return event_1.mintEvent;
}
}));
Object.defineProperty(exports, "mintColor", ({
var icon_1 = __webpack_require__(/*! ./imports/util/icon */ "./src/ts/imports/util/icon.ts");
Object.defineProperty(exports, "mintIcon", ({
enumerable: true,
get: function () {
return util_1.mintColor;
return icon_1.mintIcon;
}
}));
Object.defineProperty(exports, "mintDisplay", ({
var math_1 = __webpack_require__(/*! ./imports/util/math */ "./src/ts/imports/util/math.ts");
Object.defineProperty(exports, "mintMath", ({
enumerable: true,
get: function () {
return util_1.mintDisplay;
return math_1.mintMath;
}
}));
Object.defineProperty(exports, "mintEvent", ({
var object_1 = __webpack_require__(/*! ./imports/util/object */ "./src/ts/imports/util/object.ts");
Object.defineProperty(exports, "mintObject", ({
enumerable: true,
get: function () {
return util_1.mintEvent;
return object_1.mintObject;
}
}));
Object.defineProperty(exports, "mintObject", ({
var text_1 = __webpack_require__(/*! ./imports/util/text */ "./src/ts/imports/util/text.ts");
Object.defineProperty(exports, "mintText", ({
enumerable: true,
get: function () {
return util_1.mintObject;
return text_1.mintText;
}
}));
Object.defineProperty(exports, "mintText", ({
var window_1 = __webpack_require__(/*! ./imports/util/window */ "./src/ts/imports/util/window.ts");
Object.defineProperty(exports, "mintWindow", ({
enumerable: true,
get: function () {
return util_1.mintText;
return window_1.mintWindow;
}
}));
Object.defineProperty(exports, "mintWindow", ({
// Objects
var selectors_1 = __webpack_require__(/*! ./imports/util/selectors */ "./src/ts/imports/util/selectors.ts");
Object.defineProperty(exports, "mintSelectors", ({
enumerable: true,
get: function () {
return util_1.mintWindow;
return selectors_1.mintSelectors;
}
}));
Object.defineProperty(exports, "mintSide", ({
var settings_1 = __webpack_require__(/*! ./imports/util/settings */ "./src/ts/imports/util/settings.ts");
Object.defineProperty(exports, "mintSettings", ({
enumerable: true,
get: function () {
return util_1.mintSide;
return settings_1.mintSettings;
}
}));
})();
var util_1 = __webpack_require__(/*! ./util */ "./src/ts/util.ts");
Object.defineProperty(exports, "mintUtil", ({
enumerable: true,
get: function () {
return util_1.mintUtil;
}
}));
Object.defineProperty(exports, "default", ({
enumerable: true,
get: function () {
return __importDefault(util_1).default;
}
}));
/***/ }),
/***/ "./src/ts/util.ts":
/*!************************!*\
!*** ./src/ts/util.ts ***!
\************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
var __importDefault = this && this.__importDefault || function (mod) {
return mod && mod.__esModule ? mod : {
"default": mod
};
};
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.mintUtil = void 0;
/**
* Imports
*/
const enum_1 = __webpack_require__(/*! ./imports/enum */ "./src/ts/imports/enum.ts");
const settings_1 = __importDefault(__webpack_require__(/*! ./imports/util/settings */ "./src/ts/imports/util/settings.ts"));
/**
* Utility functions
* @public
*/
class mintUtil {
/**
* Returns the width of the window, including fractional pixels
* @returns the width of the window
*/
static windowWidth() {
let body = document.getElementsByTagName('body')[0],
decimal = body.getBoundingClientRect().width % 1;
return window.innerWidth + decimal;
}
/**
* Ensures that a function `func` is run only after not being called for `wait` milliseconds
* @param func - the function to debounce
* @param wait - the amount of time to wait before running the function
* @returns - the debounced function
*/
static debounce(func) {
let wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : settings_1.default.delay.default;
let timer;
return function (e) {
if (timer) {
clearTimeout(timer);
}
timer = setTimeout(func, wait, e);
};
}
/**
* Ensures that a function `func` is run only after not being called for `wait` milliseconds
* @param func - the function to debounce
* @param wait - the amount of time to wait before running the function
* @returns - the debounced function as an EventListener
*/
static debounceEvent(func) {
let wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : settings_1.default.delay.default;
return mintUtil.debounce(func, wait);
}
/**
* Ensures that a function `func` is called at most every `wait` milliseconds with optional leading and trailing calls
* @param func - the function to throttle
* @param wait - the amount of time between function calls
* @param options - leading and trailing options: default = \{ leading: true, trailing, true \}
* @returns - the throttled function
*/
static throttle(func) {
let wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : settings_1.default.delay.default;
let options = arguments.length > 2 ? arguments[2] : undefined;
let context,
args,
result,
timeout,
previous = 0,
later = function () {
previous = (options === null || options === void 0 ? void 0 : options.leading) === false ? 0 : new Date().getTime();
timeout = 0;
result = func.apply(context, args);
if (!timeout) {
context = args = null;
}
},
throttled = function () {
let now = new Date().getTime();
if (!previous && (options === null || options === void 0 ? void 0 : options.leading) === false) {
previous = now;
}
let remaining = wait - now + previous;
context = this;
args = arguments;
if (remaining <= 0 || remaining > wait) {
if (timeout) {
clearTimeout(timeout);
timeout = 0;
}
previous = now;
result = func.apply(context, args);
if (!timeout) {
context = args = null;
}
} else if (!timeout && (options === null || options === void 0 ? void 0 : options.trailing) !== false) {
timeout = window.setTimeout(later, remaining);
}
return result;
};
return throttled;
}
/**
* Ensures that a function `func` is called at most every `wait` milliseconds with optional leading and trailing calls
* @param func - the function to throttle
* @param wait - the amount of time between function calls
* @param options - leading and trailing options: default = \{ leading: true, trailing, true \}
* @returns - the throttled function as an EventListener
*/
static throttleEvent(func) {
let wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : settings_1.default.delay.default;
let options = arguments.length > 2 ? arguments[2] : undefined;
return mintUtil.throttle(func, wait, options);
}
/**
* Sets the element's height to its `innerHeight`, then to `auto` after a delay
* @param el - the element whose height will be set
* @param delay - the amount of time in milliseconds that the show animation will be active
* @param from - the side that the element is animating from
*/
static show(el) {
let delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : settings_1.default.delay.default;
let from = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : enum_1.mintSide.Top;
if (el) {
el.style.display = '';
requestAnimationFrame(() => {
if (from === enum_1.mintSide.Top || from === enum_1.mintSide.Bottom) {
el.style.height = `${el.scrollHeight}px`;
} else {
el.style.width = `${el.scrollWidth}px`;
}
setTimeout(() => {
if (from === enum_1.mintSide.Top || from === enum_1.mintSide.Bottom) {
el.style.height = 'auto';
} else {
el.style.width = 'auto';
}
}, delay);
});
}
}
/**
* Sets the element's height to 0
* @param el - the element whose height will be set
* @param delay - the amount of time in milliseconds that the show animation will be active
* @param from - the side that the element is animating from
*/
static hide(el) {
let delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : settings_1.default.delay.default;
let from = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : enum_1.mintSide.Top;
if (el) {
let height = el.scrollHeight,
width = el.scrollWidth,
transition = el.style.transition;
el.style.transition = '';
requestAnimationFrame(() => {
if (from === enum_1.mintSide.Top || from === enum_1.mintSide.Bottom) {
el.style.height = `${height}px`;
} else {
el.style.width = `${width}px`;
}
el.style.transition = transition;
requestAnimationFrame(() => {
if (from === enum_1.mintSide.Top || from === enum_1.mintSide.Bottom) {
el.style.height = '0';
} else {
el.style.width = '0';
}
});
});
setTimeout(() => {
el.style.display = 'none';
}, delay);
}
}
/**
* Copies the provided text to the clipboard
* @param text - the text to copy
* @returns - true if the text was successfully copied to the clipboard; else false
*/
static copyText(text) {
let textArea = document.createElement('textarea');
if (!text || !textArea) {
return false;
}
textArea.value = text;
textArea.style.cssText = `
position: fixed;
top: 0;
left: 0;
transform: translate(-100%, -100%);
opacity: 0;
z-index: -1;
`;
document.body.appendChild(textArea);
textArea.select();
textArea.setSelectionRange(0, 99999);
navigator.clipboard.writeText(textArea.value);
document.body.removeChild(textArea);
return true;
}
/**
* Tests the validity of an email address
* @see {@link https://stackoverflow.com/questions/201323/how-can-i-validate-an-email-address-using-a-regular-expression}
* @param text - the string to test
* @returns - true if the given string is an email address; false if not
*/
static isEmail(text) {
return null !== text.match(/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/);
}
}
exports.mintUtil = mintUtil;
exports["default"] = mintUtil;
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module is referenced by other modules so it can't be inlined
/******/ var __webpack_exports__ = __webpack_require__("./src/ts/index.ts");
/******/
/******/ return __webpack_exports__;

@@ -166,0 +1591,0 @@ /******/ })()

2

dist/js/index.min.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.mint=t():e.mint=t()}(self,(()=>(()=>{var e={817:e=>{var t;self,t=()=>{return e={498:e=>{var t;self,t=()=>(()=>{"use strict";var e={64:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.mintSide=void 0,(i=t.mintSide||(t.mintSide={}))[i.Top=0]="Top",i[i.Right=1]="Right",i[i.Bottom=2]="Bottom",i[i.Left=3]="Left"},54:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintColor=void 0;class i{constructor(e){this.r="number"==typeof e.r?Math.max(Math.min(e.r,i.hexBase**2-1),0):0,this.g="number"==typeof e.g?Math.max(Math.min(e.g,i.hexBase**2-1),0):0,this.b="number"==typeof e.b?Math.max(Math.min(e.b,i.hexBase**2-1),0):0,this.a="number"==typeof e.a?Math.max(Math.min(e.a,1),0):1,"string"==typeof e.color&&this.stringConstructor(e.color)}stringConstructor(e){e.startsWith("#")?this.hexConstructor(e):(~e.indexOf("linear-gradient")&&(e=e.substring(e.indexOf("linear-gradient"),e.length)),this.rgbConstructor(e))}hexConstructor(e){switch(e.length){case 1:case 5:case 6:return;case 2:e="#"+e[1]+e[1]+e[1]+e[1]+e[1]+e[1]+i.hexMax;break;case 3:e="#"+e[1]+e[1]+e[1]+e[2]+e[2]+e[2]+i.hexMax;break;case 4:e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+i.hexMax;break;case 7:e+=i.hexMax;break;case 8:e+=e[e.length-1];break;default:e=e.substring(0,9)}this.r=parseInt(e.substring(1,3),i.hexBase),this.g=parseInt(e.substring(3,5),i.hexBase),this.b=parseInt(e.substring(5,7),i.hexBase),this.a=parseInt(e.substring(7,9),i.hexBase)/i.hexBase**2}rgbConstructor(e){let t=e.match(/rgba?\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)?(?:, ?(\d(?:\.\d*)?)\))?/);t&&(this.r=parseInt(t[1]),this.g=parseInt(t[2]),this.b=parseInt(t[3]),this.a=parseFloat(t[4]))}getBrightness(){return 0===this.a?262:isNaN(this.r)||isNaN(this.g)||isNaN(this.b)?-1:Math.round((299*this.r+587*this.g+144*this.b)/1e3)}}t.mintColor=i,i.hexBase=16,i.hexMax="FF",t.default=i},708:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintItem=void 0;class i{constructor(){this.version=0,this.priority=0,this.centered=!1,this.disabled=!1,this.queryParams={},this.attributes={},this.classes=[],this.buttons=[],this.images=[],this.children=[]}}t.mintItem=i,t.default=i},139:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintDisplay=void 0;class i{}t.mintDisplay=i,t.default=i},376:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintEvent=void 0;class i{}t.mintEvent=i,t.default=i},683:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintMath=void 0;class i{static randomInt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t)+t)}}t.mintMath=i,t.default=i},982:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintObject=void 0;class i{static isSimilar(e,t){let i=Object.keys(e);return i.length===Object.keys(t).length&&(i.forEach((i=>{if(e[i]!==t[i])return!1})),!0)}static isSuperset(e,t){let n=!0;if(e===t)return n;try{if(0===Object.keys(t).length)return!n}catch(e){return!n}return Object.keys(t).forEach((a=>{n=n&&i.isSuperset(e[a],t[a])})),n}static remove(e,t){return Object.keys(e).reduce(((i,n)=>(t.includes(n)||(i[n]=e[n]),i)),{})}static sort(e){return Object.keys(e).sort().reduce(((t,i)=>(t[i]=e[i],t)),{})}static filter(e,t){return this.filterKeys(e,t)}static filterKeys(e,t){return t.reduce(((t,i)=>(t[i]=e[i],t)),{})}static filterValues(e,t){return Object.keys(e).reduce(((i,n)=>(t.includes(e[n])&&(i[n]=e[n]),i)),{})}}t.mintObject=i,t.default=i},226:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintText=void 0;class i{}t.mintText=i,t.default=i},505:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintWindow=void 0;class i{}t.mintWindow=i,t.default=i},491:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.mintUtil=t.mintSettings=t.mintSelectors=t.mintWindow=t.mintText=t.mintObject=t.mintMath=t.mintEvent=t.mintDisplay=t.mintItem=t.mintColor=t.mintSide=void 0;var a=i(64);Object.defineProperty(t,"mintSide",{enumerable:!0,get:function(){return a.mintSide}});var r=i(54);Object.defineProperty(t,"mintColor",{enumerable:!0,get:function(){return r.mintColor}});var s=i(708);Object.defineProperty(t,"mintItem",{enumerable:!0,get:function(){return s.mintItem}});var l=i(139);Object.defineProperty(t,"mintDisplay",{enumerable:!0,get:function(){return l.mintDisplay}});var o=i(376);Object.defineProperty(t,"mintEvent",{enumerable:!0,get:function(){return o.mintEvent}});var d=i(683);Object.defineProperty(t,"mintMath",{enumerable:!0,get:function(){return d.mintMath}});var u=i(982);Object.defineProperty(t,"mintObject",{enumerable:!0,get:function(){return u.mintObject}});var c=i(226);Object.defineProperty(t,"mintText",{enumerable:!0,get:function(){return c.mintText}});var h=i(505);Object.defineProperty(t,"mintWindow",{enumerable:!0,get:function(){return h.mintWindow}});var f=i(565);Object.defineProperty(t,"mintSelectors",{enumerable:!0,get:function(){return f.mintSelectors}});var m=i(750);Object.defineProperty(t,"mintSettings",{enumerable:!0,get:function(){return m.mintSettings}});var b=i(427);Object.defineProperty(t,"mintUtil",{enumerable:!0,get:function(){return b.mintUtil}}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(b).default}})},565:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.mintSelectors=void 0;class n{static prefix(e){return(e=e.toLowerCase()).startsWith(this.pre)?e:`${this.pre}${e}`}static cssPrefix(e){return`--${this.prefix(e.replace(/^-+/,""))}`}static cssVar(e){return`var(${this.cssPrefix(e)})`}static neg(e){return`:not(${e})`}static class(e){return`.${this.prefix(e)}`}static id(e){return`#${this.prefix(e)}`}static controls(e){return e?`[aria-controls="${this.prefix(e)}"]`:this.hasControls}static expanded(e){return"boolean"==typeof e?`[aria-expanded="${e}"]`:this.hasExpanded}static getId(e){var t;return null!==(t=this.ids[null!=e?e:-1])&&void 0!==t?t:""}static getClass(e,t){var i,n;return t?null!==(i=this.classes[t][null!=e?e:-1])&&void 0!==i?i:"":null!==(n=this.classes[null!=e?e:-1])&&void 0!==n?n:""}static getFocusables(e){let t;return t=e?[...e.querySelectorAll(this.focusable)]:[...document.querySelectorAll(this.focusable)],t.filter((e=>this.isFocusable(e)))}static isFocusable(e){let t=e;do{if("none"===window.getComputedStyle(t).getPropertyValue("display").toLowerCase())return!1;t=t.parentElement}while(t);return!0}}t.mintSelectors=n,i=n,n.lib="mint",n.pre=`${i.lib}-`,n.disabled="[disabled]",n.hasControls="[aria-controls]",n.hasExpanded="[aria-expanded]",n.hasLink="[href]",n.hasRouterLink="[routerLink]",n.hasId="[id]",n.notTabbable='[tabindex^="-"]',n.tabbable=`[tabindex]${i.neg(i.notTabbable)}`,n.focusable=`input${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n select${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n textarea${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n button${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n object${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n a${i.hasLink}, a${i.hasRouterLink},\n area${i.hasLink},\n ${i.tabbable}`.replace(/\s/g,""),n.classes={sides:{top:i.prefix("top"),right:i.prefix("right"),bottom:i.prefix("bottom"),left:i.prefix("left")}},t.default=n},750:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.mintSettings=void 0;class n{static set(e){let t=!1;"number"==typeof e.delayBase&&(this.delayBase=e.delayBase,t=!0),"number"==typeof e.delayStep&&(this.delayStep=e.delayStep,t=!0),t&&this.setDelay(),e.delay&&Object.keys(e.delay).length&&Object.values(e.delay).reduce(((e,t)=>e&&"number"==typeof t),!0)&&(this.delay=Object.assign(Object.assign({},this.delay),e.delay))}static setDelay(){this.delay={instant:this.delayBase+0*this.delayStep,fast:this.delayBase+1*this.delayStep,medFast:this.delayBase+2*this.delayStep,default:this.delayBase+3*this.delayStep,medSlow:this.delayBase+4*this.delayStep,slow:this.delayBase+5*this.delayStep}}}t.mintSettings=n,i=n,n.delayBase=0,n.delayStep=100,n.delay={instant:i.delayBase+0*i.delayStep,fast:i.delayBase+1*i.delayStep,medFast:i.delayBase+2*i.delayStep,default:i.delayBase+3*i.delayStep,medSlow:i.delayBase+4*i.delayStep,slow:i.delayBase+5*i.delayStep},t.default=n},427:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.mintUtil=void 0;const a=i(64),r=n(i(750));class s{static windowWidth(){let e=document.getElementsByTagName("body")[0].getBoundingClientRect().width%1;return window.innerWidth+e}static debounce(e){let t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.delay.default;return function(n){t&&clearTimeout(t),t=setTimeout(e,i,n)}}static debounceEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.delay.default;return s.debounce(e,t)}static throttle(e){let t,i,n,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.delay.default,l=arguments.length>2?arguments[2]:void 0,o=0,d=function(){o=!1===(null==l?void 0:l.leading)?0:(new Date).getTime(),a=0,n=e.apply(t,i),a||(t=i=null)};return function(){let r=(new Date).getTime();o||!1!==(null==l?void 0:l.leading)||(o=r);let u=s-r+o;return t=this,i=arguments,u<=0||u>s?(a&&(clearTimeout(a),a=0),o=r,n=e.apply(t,i),a||(t=i=null)):a||!1===(null==l?void 0:l.trailing)||(a=window.setTimeout(d,u)),n}}static throttleEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.delay.default,i=arguments.length>2?arguments[2]:void 0;return s.throttle(e,t,i)}static show(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.delay.default,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.mintSide.Top;e&&(e.style.display="",requestAnimationFrame((()=>{i===a.mintSide.Top||i===a.mintSide.Bottom?e.style.height=`${e.scrollHeight}px`:e.style.width=`${e.scrollWidth}px`,setTimeout((()=>{i===a.mintSide.Top||i===a.mintSide.Bottom?e.style.height="auto":e.style.width="auto"}),t)})))}static hide(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.delay.default,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.mintSide.Top;if(e){let n=e.scrollHeight,r=e.scrollWidth,s=e.style.transition;e.style.transition="",requestAnimationFrame((()=>{i===a.mintSide.Top||i===a.mintSide.Bottom?e.style.height=`${n}px`:e.style.width=`${r}px`,e.style.transition=s,requestAnimationFrame((()=>{i===a.mintSide.Top||i===a.mintSide.Bottom?e.style.height="0":e.style.width="0"}))})),setTimeout((()=>{e.style.display="none"}),t)}}static copyText(e){let t=document.createElement("textarea");return!(!e||!t||(t.value=e,t.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n transform: translate(-100%, -100%);\n opacity: 0;\n z-index: -1;\n ",document.body.appendChild(t),t.select(),t.setSelectionRange(0,99999),navigator.clipboard.writeText(t.value),document.body.removeChild(t),0))}static isEmail(e){return null!==e.match(/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/)}}t.mintUtil=s,t.default=s}},t={};return function i(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n].call(r.exports,r,r.exports,i),r.exports}(491)})(),e.exports=t()},721:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(498),r=n(i(565)),s=n(i(750));t.default=class{constructor(e){this.el={};let t={from:a.mintSide.Top,fixed:!0};s.default.set(Object.assign(Object.assign({},t),e)),this.attachElements(),this.attachEvents(),this.enableJavascript(),this.setMobileMenu()}attachElements(){var e;this.el.body=document.querySelector("body"),this.el.header=document.getElementById(r.default.getId("header")),this.el.mobileButton=(null===(e=this.el.header)||void 0===e?void 0:e.querySelector(r.default.controls(r.default.getId("wrapper"))))||null,this.el.wrapper=document.getElementById(r.default.getId("wrapper"))}attachEvents(){var e,t,i;window.addEventListener("resize",a.mintUtil.throttleEvent(this.eHandleResize.bind(this),s.default.delay.default,{trailing:!1})),window.addEventListener("scroll",a.mintUtil.throttleEvent(this.eHandleScroll.bind(this),s.default.delay.default,{trailing:!1}));let n=null===(e=this.el.header)||void 0===e?void 0:e.querySelectorAll(r.default.focusable),l=null==n?void 0:n[(null==n?void 0:n.length)-1];null==l||l.addEventListener("keydown",a.mintUtil.throttleEvent(this.eWrapTab.bind(this))),null==n||n.forEach((e=>{e.addEventListener("keydown",a.mintUtil.throttleEvent(this.eHandleKeypress.bind(this)))}));let o=null===(t=this.el.header)||void 0===t?void 0:t.querySelectorAll(r.default.controls()+r.default.neg(r.default.controls(r.default.ids.wrapper)));null==o||o.forEach((e=>{e.addEventListener("mousedown",a.mintUtil.throttleEvent(this.eToggleMenu.bind(this),s.default.delay.slow,{trailing:!1}))})),null===(i=this.el.mobileButton)||void 0===i||i.addEventListener("mousedown",a.mintUtil.throttleEvent(this.eToggleMobileMenu.bind(this),s.default.delay.slow,{trailing:!1}))}enableJavascript(){var e;null===(e=this.el.header)||void 0===e||e.classList.add(r.default.getClass("js"))}setMobileMenu(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];var t,i,n;let l=e?"true":"false",o=e?"close menu":"open menu";null===(t=this.el.mobileButton)||void 0===t||t.setAttribute("aria-expanded",l),setTimeout((()=>{var e;null===(e=this.el.mobileButton)||void 0===e||e.setAttribute("aria-label",o)}),s.default.delay.fast),e?(!0!==s.default.fixed&&window.scroll({top:0,left:0,behavior:"smooth"}),setTimeout((()=>{this.el.body&&(this.el.body.style.overflow="hidden")}),s.default.from===a.mintSide.Left?s.default.delay.default:s.default.delay.instant),null===(i=this.el.wrapper)||void 0===i||i.classList.add(r.default.getClass("open"))):(this.el.body&&(this.el.body.style.overflow="auto"),null===(n=this.el.wrapper)||void 0===n||n.classList.remove(r.default.getClass("open")),this.closeAllMenus())}toggleMobileMenu(){var e,t;this.setMobileMenu("false"===(null===(t=null===(e=this.el.mobileButton)||void 0===e?void 0:e.getAttribute("aria-expanded"))||void 0===t?void 0:t.toLowerCase()))}setMenu(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t?"true":"false",n=null==e?void 0:e.nextElementSibling;e&&n&&(e.setAttribute("aria-expanded",i),t?a.mintUtil.show(n):(a.mintUtil.hide(n),this.closeSubMenus(e)))}toggleMenu(e){var t;this.setMenu(e,"true"!==(null===(t=null==e?void 0:e.getAttribute("aria-expanded"))||void 0===t?void 0:t.toLowerCase()))}closeSubMenus(e){let t=null==e?void 0:e.nextElementSibling;(null==t?void 0:t.querySelectorAll(r.default.subMenuButtons)).forEach((e=>{var i;(null===(i=e.parentElement)||void 0===i?void 0:i.parentElement)===t&&this.setMenu(e)}))}closeAllMenus(){var e;let t=null===(e=this.el.wrapper)||void 0===e?void 0:e.querySelectorAll(r.default.subMenuButtons);null==t||t.forEach((e=>{this.setMenu(e)}))}openClosestMenu(){var e;let t=document.activeElement,i=null==t?void 0:t.nextElementSibling,n="true"===(null===(e=null==t?void 0:t.getAttribute("aria-expanded"))||void 0===e?void 0:e.toLowerCase());if((null==t?void 0:t.getAttribute("aria-controls"))===r.default.ids.wrapper&&(i=this.el.wrapper),(null==t?void 0:t.getAttribute("aria-controls"))&&i&&!n){t.click();let e=i.querySelector(r.default.focusable);null==e||e.focus()}}closeClosestMenu(){var e,t;let i=document.activeElement,n=null==i?void 0:i.closest(r.default.subMenu),a=(null==n?void 0:n.previousElementSibling)?n.previousElementSibling:this.el.mobileButton;(null==i?void 0:i.getAttribute("aria-controls"))&&"true"===(null===(e=null==i?void 0:i.getAttribute("aria-expanded"))||void 0===e?void 0:e.toLowerCase())&&(a=i),"true"===(null===(t=null==a?void 0:a.getAttribute("aria-expanded"))||void 0===t?void 0:t.toLowerCase())&&(null==a||a.click(),null==a||a.focus())}toggleClosestMenu(){var e,t;"true"===(null===(t=null===(e=document.activeElement)||void 0===e?void 0:e.getAttribute("aria-expanded"))||void 0===t?void 0:t.toLowerCase())?this.closeClosestMenu():this.openClosestMenu()}eHandleResize(){this.setMobileMenu()}eHandleScroll(){this.closeAllMenus()}eWrapTab(e){var t;"tab"!==e.key.toLowerCase()||e.shiftKey||(null===(t=this.el.mobileButton)||void 0===t||t.focus(),document.activeElement===this.el.mobileButton&&e.preventDefault())}eHandleButtonKeypress(e){var t;let i=e.target.closest("li");switch(e.key.toLowerCase()){case"escape":(null==i?void 0:i.classList.contains(r.default.classes.open))?this.setMenu(i):(this.setMobileMenu(),null===(t=this.el.menuButton)||void 0===t||t.focus());case"arrowleft":this.closeClosestMenu()}}eHandleLinkKeypress(e){switch(e.key.toLowerCase()){case"escape":case"arrowleft":this.closeClosestMenu();break;case"arrowright":this.openClosestMenu();break;case"enter":case"space":this.toggleClosestMenu()}}eHandleKeypress(e){"tab"!==e.key.toLowerCase()&&e.preventDefault();let t=e.target;switch(null==t?void 0:t.tagName.toLowerCase()){case"a":this.eHandleLinkKeypress(e);break;case"button":this.eHandleButtonKeypress(e)}}eToggleMobileMenu(){this.toggleMobileMenu()}eToggleMenu(e){this.toggleMenu(e.target)}}},491:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.n4vBar=t.n4vSettings=t.n4vSelectors=void 0;var a=i(565);Object.defineProperty(t,"n4vSelectors",{enumerable:!0,get:function(){return n(a).default}});var r=i(750);Object.defineProperty(t,"n4vSettings",{enumerable:!0,get:function(){return n(r).default}});var s=i(721);Object.defineProperty(t,"n4vBar",{enumerable:!0,get:function(){return n(s).default}});var l=i(721);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(l).default}})},565:(e,t,i)=>{"use strict";var n,a;Object.defineProperty(t,"__esModule",{value:!0}),t.n4vSelectors=void 0;const r=i(498);class s extends(a=r.mintSelectors){}t.n4vSelectors=s,n=s,s.lib="n4v",s.pre=`${n.lib}-`,s.subMenuButtons=`button${n.hasControls}`,s.subMenu=`${n.subMenuButtons} + ul${n.hasId}`,s.ids={header:n.prefix("header"),logo:n.prefix("logo"),wrapper:n.prefix("wrapper"),mainContent:n.prefix("main-content")},s.classes=Object.assign(Object.assign({},Reflect.get(a,"classes",n)),{srOnly:n.prefix("sr-only"),js:n.prefix("js"),ready:n.prefix("ready"),fixed:n.prefix("fixed"),open:n.prefix("open")}),t.default=s},750:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.n4vSettings=void 0;const a=i(498),r=n(i(565));class s extends a.mintSettings{static set(e){super.set(e),(e.from||e.from===a.mintSide.Top)&&this.setFrom(e.from),"boolean"==typeof e.fixed&&this.setFixed(e.fixed)}static setFrom(e){if(this.from!==e){this.from=e;let t=document.getElementById(r.default.getId("header"));null==t||t.classList.remove(...Object.values(r.default.classes.sides)),null==t||t.classList.add(r.default.getClass(a.mintSide[this.from].toLowerCase(),"sides"))}}static setFixed(e){if(this.fixed!==e){this.fixed=e;let t=document.getElementById(r.default.getId("header")),i=r.default.getClass("fixed");this.fixed?null==t||t.classList.add(i):null==t||t.classList.remove(i)}}}t.n4vSettings=s,t.default=s}},t={},function i(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n].call(r.exports,r,r.exports,i),r.exports}(491);var e,t},e.exports=t()},498:e=>{var t;self,t=()=>(()=>{"use strict";var e={64:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.mintSide=void 0,(i=t.mintSide||(t.mintSide={}))[i.Top=0]="Top",i[i.Right=1]="Right",i[i.Bottom=2]="Bottom",i[i.Left=3]="Left"},54:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintColor=void 0;class i{constructor(e){this.r="number"==typeof e.r?Math.max(Math.min(e.r,i.hexBase**2-1),0):0,this.g="number"==typeof e.g?Math.max(Math.min(e.g,i.hexBase**2-1),0):0,this.b="number"==typeof e.b?Math.max(Math.min(e.b,i.hexBase**2-1),0):0,this.a="number"==typeof e.a?Math.max(Math.min(e.a,1),0):1,"string"==typeof e.color&&this.stringConstructor(e.color)}stringConstructor(e){e.startsWith("#")?this.hexConstructor(e):(~e.indexOf("linear-gradient")&&(e=e.substring(e.indexOf("linear-gradient"),e.length)),this.rgbConstructor(e))}hexConstructor(e){switch(e.length){case 1:case 5:case 6:return;case 2:e="#"+e[1]+e[1]+e[1]+e[1]+e[1]+e[1]+i.hexMax;break;case 3:e="#"+e[1]+e[1]+e[1]+e[2]+e[2]+e[2]+i.hexMax;break;case 4:e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+i.hexMax;break;case 7:e+=i.hexMax;break;case 8:e+=e[e.length-1];break;default:e=e.substring(0,9)}this.r=parseInt(e.substring(1,3),i.hexBase),this.g=parseInt(e.substring(3,5),i.hexBase),this.b=parseInt(e.substring(5,7),i.hexBase),this.a=parseInt(e.substring(7,9),i.hexBase)/i.hexBase**2}rgbConstructor(e){let t=e.match(/rgba?\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)?(?:, ?(\d(?:\.\d*)?)\))?/);t&&(this.r=parseInt(t[1]),this.g=parseInt(t[2]),this.b=parseInt(t[3]),this.a=parseFloat(t[4]))}getBrightness(){return 0===this.a?262:isNaN(this.r)||isNaN(this.g)||isNaN(this.b)?-1:Math.round((299*this.r+587*this.g+144*this.b)/1e3)}}t.mintColor=i,i.hexBase=16,i.hexMax="FF",t.default=i},708:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintItem=void 0;class i{constructor(){this.version=0,this.priority=0,this.centered=!1,this.disabled=!1,this.queryParams={},this.attributes={},this.classes=[],this.buttons=[],this.images=[],this.children=[]}}t.mintItem=i,t.default=i},139:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintDisplay=void 0;class i{}t.mintDisplay=i,t.default=i},376:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintEvent=void 0;class i{}t.mintEvent=i,t.default=i},683:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintMath=void 0;class i{static randomInt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t)+t)}}t.mintMath=i,t.default=i},982:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintObject=void 0;class i{static isSimilar(e,t){let i=Object.keys(e);return i.length===Object.keys(t).length&&(i.forEach((i=>{if(e[i]!==t[i])return!1})),!0)}static isSuperset(e,t){let n=!0;if(e===t)return n;try{if(0===Object.keys(t).length)return!n}catch(e){return!n}return Object.keys(t).forEach((a=>{n=n&&i.isSuperset(e[a],t[a])})),n}static remove(e,t){return Object.keys(e).reduce(((i,n)=>(t.includes(n)||(i[n]=e[n]),i)),{})}static sort(e){return Object.keys(e).sort().reduce(((t,i)=>(t[i]=e[i],t)),{})}static filter(e,t){return this.filterKeys(e,t)}static filterKeys(e,t){return t.reduce(((t,i)=>(t[i]=e[i],t)),{})}static filterValues(e,t){return Object.keys(e).reduce(((i,n)=>(t.includes(e[n])&&(i[n]=e[n]),i)),{})}}t.mintObject=i,t.default=i},226:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintText=void 0;class i{}t.mintText=i,t.default=i},505:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintWindow=void 0;class i{}t.mintWindow=i,t.default=i},491:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.mintUtil=t.mintSettings=t.mintSelectors=t.mintWindow=t.mintText=t.mintObject=t.mintMath=t.mintEvent=t.mintDisplay=t.mintItem=t.mintColor=t.mintSide=void 0;var a=i(64);Object.defineProperty(t,"mintSide",{enumerable:!0,get:function(){return a.mintSide}});var r=i(54);Object.defineProperty(t,"mintColor",{enumerable:!0,get:function(){return r.mintColor}});var s=i(708);Object.defineProperty(t,"mintItem",{enumerable:!0,get:function(){return s.mintItem}});var l=i(139);Object.defineProperty(t,"mintDisplay",{enumerable:!0,get:function(){return l.mintDisplay}});var o=i(376);Object.defineProperty(t,"mintEvent",{enumerable:!0,get:function(){return o.mintEvent}});var d=i(683);Object.defineProperty(t,"mintMath",{enumerable:!0,get:function(){return d.mintMath}});var u=i(982);Object.defineProperty(t,"mintObject",{enumerable:!0,get:function(){return u.mintObject}});var c=i(226);Object.defineProperty(t,"mintText",{enumerable:!0,get:function(){return c.mintText}});var h=i(505);Object.defineProperty(t,"mintWindow",{enumerable:!0,get:function(){return h.mintWindow}});var f=i(565);Object.defineProperty(t,"mintSelectors",{enumerable:!0,get:function(){return f.mintSelectors}});var m=i(750);Object.defineProperty(t,"mintSettings",{enumerable:!0,get:function(){return m.mintSettings}});var b=i(427);Object.defineProperty(t,"mintUtil",{enumerable:!0,get:function(){return b.mintUtil}}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(b).default}})},565:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.mintSelectors=void 0;class n{static prefix(e){return(e=e.toLowerCase()).startsWith(this.pre)?e:`${this.pre}${e}`}static cssPrefix(e){return`--${this.prefix(e.replace(/^-+/,""))}`}static cssVar(e){return`var(${this.cssPrefix(e)})`}static neg(e){return`:not(${e})`}static class(e){return`.${this.prefix(e)}`}static id(e){return`#${this.prefix(e)}`}static controls(e){return e?`[aria-controls="${this.prefix(e)}"]`:this.hasControls}static expanded(e){return"boolean"==typeof e?`[aria-expanded="${e}"]`:this.hasExpanded}static getId(e){var t;return null!==(t=this.ids[null!=e?e:-1])&&void 0!==t?t:""}static getClass(e,t){var i,n;return t?null!==(i=this.classes[t][null!=e?e:-1])&&void 0!==i?i:"":null!==(n=this.classes[null!=e?e:-1])&&void 0!==n?n:""}static getFocusables(e){let t;return t=e?[...e.querySelectorAll(this.focusable)]:[...document.querySelectorAll(this.focusable)],t.filter((e=>this.isFocusable(e)))}static isFocusable(e){let t=e;do{if("none"===window.getComputedStyle(t).getPropertyValue("display").toLowerCase())return!1;t=t.parentElement}while(t);return!0}}t.mintSelectors=n,i=n,n.lib="mint",n.pre=`${i.lib}-`,n.disabled="[disabled]",n.hasControls="[aria-controls]",n.hasExpanded="[aria-expanded]",n.hasLink="[href]",n.hasRouterLink="[routerLink]",n.hasId="[id]",n.notTabbable='[tabindex^="-"]',n.tabbable=`[tabindex]${i.neg(i.notTabbable)}`,n.focusable=`input${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n select${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n textarea${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n button${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n object${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n a${i.hasLink}, a${i.hasRouterLink},\n area${i.hasLink},\n ${i.tabbable}`.replace(/\s/g,""),n.classes={sides:{top:i.prefix("top"),right:i.prefix("right"),bottom:i.prefix("bottom"),left:i.prefix("left")}},t.default=n},750:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.mintSettings=void 0;class n{static set(e){let t=!1;"number"==typeof e.delayBase&&(this.delayBase=e.delayBase,t=!0),"number"==typeof e.delayStep&&(this.delayStep=e.delayStep,t=!0),t&&this.setDelay(),e.delay&&Object.keys(e.delay).length&&Object.values(e.delay).reduce(((e,t)=>e&&"number"==typeof t),!0)&&(this.delay=Object.assign(Object.assign({},this.delay),e.delay))}static setDelay(){this.delay={instant:this.delayBase+0*this.delayStep,fast:this.delayBase+1*this.delayStep,medFast:this.delayBase+2*this.delayStep,default:this.delayBase+3*this.delayStep,medSlow:this.delayBase+4*this.delayStep,slow:this.delayBase+5*this.delayStep}}}t.mintSettings=n,i=n,n.delayBase=0,n.delayStep=100,n.delay={instant:i.delayBase+0*i.delayStep,fast:i.delayBase+1*i.delayStep,medFast:i.delayBase+2*i.delayStep,default:i.delayBase+3*i.delayStep,medSlow:i.delayBase+4*i.delayStep,slow:i.delayBase+5*i.delayStep},t.default=n},427:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.mintUtil=void 0;const a=i(64),r=n(i(750));class s{static windowWidth(){let e=document.getElementsByTagName("body")[0].getBoundingClientRect().width%1;return window.innerWidth+e}static debounce(e){let t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.delay.default;return function(n){t&&clearTimeout(t),t=setTimeout(e,i,n)}}static debounceEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.delay.default;return s.debounce(e,t)}static throttle(e){let t,i,n,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.delay.default,l=arguments.length>2?arguments[2]:void 0,o=0,d=function(){o=!1===(null==l?void 0:l.leading)?0:(new Date).getTime(),a=0,n=e.apply(t,i),a||(t=i=null)};return function(){let r=(new Date).getTime();o||!1!==(null==l?void 0:l.leading)||(o=r);let u=s-r+o;return t=this,i=arguments,u<=0||u>s?(a&&(clearTimeout(a),a=0),o=r,n=e.apply(t,i),a||(t=i=null)):a||!1===(null==l?void 0:l.trailing)||(a=window.setTimeout(d,u)),n}}static throttleEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.delay.default,i=arguments.length>2?arguments[2]:void 0;return s.throttle(e,t,i)}static show(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.delay.default,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.mintSide.Top;e&&(e.style.display="",requestAnimationFrame((()=>{i===a.mintSide.Top||i===a.mintSide.Bottom?e.style.height=`${e.scrollHeight}px`:e.style.width=`${e.scrollWidth}px`,setTimeout((()=>{i===a.mintSide.Top||i===a.mintSide.Bottom?e.style.height="auto":e.style.width="auto"}),t)})))}static hide(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default.delay.default,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.mintSide.Top;if(e){let n=e.scrollHeight,r=e.scrollWidth,s=e.style.transition;e.style.transition="",requestAnimationFrame((()=>{i===a.mintSide.Top||i===a.mintSide.Bottom?e.style.height=`${n}px`:e.style.width=`${r}px`,e.style.transition=s,requestAnimationFrame((()=>{i===a.mintSide.Top||i===a.mintSide.Bottom?e.style.height="0":e.style.width="0"}))})),setTimeout((()=>{e.style.display="none"}),t)}}static copyText(e){let t=document.createElement("textarea");return!(!e||!t||(t.value=e,t.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n transform: translate(-100%, -100%);\n opacity: 0;\n z-index: -1;\n ",document.body.appendChild(t),t.select(),t.setSelectionRange(0,99999),navigator.clipboard.writeText(t.value),document.body.removeChild(t),0))}static isEmail(e){return null!==e.match(/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/)}}t.mintUtil=s,t.default=s}},t={};return function i(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n].call(r.exports,r,r.exports,i),r.exports}(491)})(),e.exports=t()}},t={};function i(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,i),r.exports}var n={};return(()=>{"use strict";var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.mintSide=e.mintWindow=e.mintText=e.mintObject=e.mintEvent=e.mintDisplay=e.mintColor=e.mintSettings=e.mintSelectors=e.mintUtil=e.n4vSettings=e.n4vSelectors=e.n4vBar=void 0;var t=i(817);Object.defineProperty(e,"n4vBar",{enumerable:!0,get:function(){return t.n4vBar}}),Object.defineProperty(e,"n4vSelectors",{enumerable:!0,get:function(){return t.n4vSelectors}}),Object.defineProperty(e,"n4vSettings",{enumerable:!0,get:function(){return t.n4vSettings}});var a=i(498);Object.defineProperty(e,"mintUtil",{enumerable:!0,get:function(){return a.mintUtil}}),Object.defineProperty(e,"mintSelectors",{enumerable:!0,get:function(){return a.mintSelectors}}),Object.defineProperty(e,"mintSettings",{enumerable:!0,get:function(){return a.mintSettings}}),Object.defineProperty(e,"mintColor",{enumerable:!0,get:function(){return a.mintColor}}),Object.defineProperty(e,"mintDisplay",{enumerable:!0,get:function(){return a.mintDisplay}}),Object.defineProperty(e,"mintEvent",{enumerable:!0,get:function(){return a.mintEvent}}),Object.defineProperty(e,"mintObject",{enumerable:!0,get:function(){return a.mintObject}}),Object.defineProperty(e,"mintText",{enumerable:!0,get:function(){return a.mintText}}),Object.defineProperty(e,"mintWindow",{enumerable:!0,get:function(){return a.mintWindow}}),Object.defineProperty(e,"mintSide",{enumerable:!0,get:function(){return a.mintSide}})})(),n})()));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.mint=t():e.mint=t()}(self,(()=>(()=>{"use strict";var e={870:function(e,t,i){var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.mintHeader=void 0;const n=i(64),a=l(i(427)),s=l(i(378)),r=l(i(110));class o{constructor(e){this.el={};let t={from:n.mintSide.Top,fixed:!0};r.default.set(Object.assign(Object.assign({},t),e)),this.attachElements(),this.attachEvents(),this.enableJavascript(),this.setMobileMenu()}attachElements(){var e;this.el.body=document.querySelector("body"),this.el.header=document.getElementById(s.default.getId("header")),this.el.mobileButton=(null===(e=this.el.header)||void 0===e?void 0:e.querySelector(s.default.controls(s.default.getId("wrapper"))))||null,this.el.wrapper=document.getElementById(s.default.getId("wrapper"))}attachEvents(){var e,t,i;window.addEventListener("resize",a.default.throttleEvent(this.eHandleResize.bind(this),r.default.delay.default,{trailing:!1})),window.addEventListener("scroll",a.default.throttleEvent(this.eHandleScroll.bind(this),r.default.delay.default,{trailing:!1}));let l=null===(e=this.el.header)||void 0===e?void 0:e.querySelectorAll(s.default.focusable),n=null==l?void 0:l[(null==l?void 0:l.length)-1];null==n||n.addEventListener("keydown",a.default.throttleEvent(this.eWrapTab.bind(this))),null==l||l.forEach((e=>{e.addEventListener("keydown",a.default.throttleEvent(this.eHandleKeypress.bind(this)))}));let o=null===(t=this.el.header)||void 0===t?void 0:t.querySelectorAll(s.default.controls()+s.default.neg(s.default.controls(s.default.ids.wrapper)));null==o||o.forEach((e=>{e.addEventListener("mousedown",a.default.throttleEvent(this.eToggleMenu.bind(this),r.default.delay.slow,{trailing:!1}))})),null===(i=this.el.mobileButton)||void 0===i||i.addEventListener("mousedown",a.default.throttleEvent(this.eToggleMobileMenu.bind(this),r.default.delay.slow,{trailing:!1}))}enableJavascript(){var e;null===(e=this.el.header)||void 0===e||e.classList.add(s.default.getClass("js"))}setMobileMenu(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];var t,i,l;let a=e?"true":"false",o=e?"close menu":"open menu";null===(t=this.el.mobileButton)||void 0===t||t.setAttribute("aria-expanded",a),setTimeout((()=>{var e;null===(e=this.el.mobileButton)||void 0===e||e.setAttribute("aria-label",o)}),r.default.delay.fast),e?(!0!==r.default.fixed&&window.scroll({top:0,left:0,behavior:"smooth"}),setTimeout((()=>{this.el.body&&(this.el.body.style.overflow="hidden")}),r.default.from===n.mintSide.Left?r.default.delay.default:r.default.delay.instant),null===(i=this.el.wrapper)||void 0===i||i.classList.add(s.default.getClass("open"))):(this.el.body&&(this.el.body.style.overflow="auto"),null===(l=this.el.wrapper)||void 0===l||l.classList.remove(s.default.getClass("open")),this.closeAllMenus())}toggleMobileMenu(){var e,t;this.setMobileMenu("false"===(null===(t=null===(e=this.el.mobileButton)||void 0===e?void 0:e.getAttribute("aria-expanded"))||void 0===t?void 0:t.toLowerCase()))}setMenu(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t?"true":"false",l=null==e?void 0:e.nextElementSibling;e&&l&&(e.setAttribute("aria-expanded",i),t?a.default.show(l):(a.default.hide(l),this.closeSubMenus(e)))}toggleMenu(e){var t;this.setMenu(e,"true"!==(null===(t=null==e?void 0:e.getAttribute("aria-expanded"))||void 0===t?void 0:t.toLowerCase()))}closeSubMenus(e){let t=null==e?void 0:e.nextElementSibling;(null==t?void 0:t.querySelectorAll(s.default.subMenuButtons)).forEach((e=>{var i;(null===(i=e.parentElement)||void 0===i?void 0:i.parentElement)===t&&this.setMenu(e)}))}closeAllMenus(){var e;let t=null===(e=this.el.wrapper)||void 0===e?void 0:e.querySelectorAll(s.default.subMenuButtons);null==t||t.forEach((e=>{this.setMenu(e)}))}openClosestMenu(){var e;let t=document.activeElement,i=null==t?void 0:t.nextElementSibling,l="true"===(null===(e=null==t?void 0:t.getAttribute("aria-expanded"))||void 0===e?void 0:e.toLowerCase());if((null==t?void 0:t.getAttribute("aria-controls"))===s.default.ids.wrapper&&(i=this.el.wrapper),(null==t?void 0:t.getAttribute("aria-controls"))&&i&&!l){t.click();let e=i.querySelector(s.default.focusable);null==e||e.focus()}}closeClosestMenu(){var e,t;let i=document.activeElement,l=null==i?void 0:i.closest(s.default.subMenu),n=(null==l?void 0:l.previousElementSibling)?l.previousElementSibling:this.el.mobileButton;(null==i?void 0:i.getAttribute("aria-controls"))&&"true"===(null===(e=null==i?void 0:i.getAttribute("aria-expanded"))||void 0===e?void 0:e.toLowerCase())&&(n=i),"true"===(null===(t=null==n?void 0:n.getAttribute("aria-expanded"))||void 0===t?void 0:t.toLowerCase())&&(null==n||n.click(),null==n||n.focus())}toggleClosestMenu(){var e,t;"true"===(null===(t=null===(e=document.activeElement)||void 0===e?void 0:e.getAttribute("aria-expanded"))||void 0===t?void 0:t.toLowerCase())?this.closeClosestMenu():this.openClosestMenu()}eHandleResize(){this.setMobileMenu()}eHandleScroll(){this.closeAllMenus()}eWrapTab(e){var t;"tab"!==e.key.toLowerCase()||e.shiftKey||(null===(t=this.el.mobileButton)||void 0===t||t.focus(),document.activeElement===this.el.mobileButton&&e.preventDefault())}eHandleButtonKeypress(e){var t;let i=e.target.closest("li");switch(e.key.toLowerCase()){case"escape":(null==i?void 0:i.classList.contains(s.default.classes.open))?this.setMenu(i):(this.setMobileMenu(),null===(t=this.el.menuButton)||void 0===t||t.focus());case"arrowleft":this.closeClosestMenu()}}eHandleLinkKeypress(e){switch(e.key.toLowerCase()){case"escape":case"arrowleft":this.closeClosestMenu();break;case"arrowright":this.openClosestMenu();break;case"enter":case"space":this.toggleClosestMenu()}}eHandleKeypress(e){"tab"!==e.key.toLowerCase()&&e.preventDefault();let t=e.target;switch(null==t?void 0:t.tagName.toLowerCase()){case"a":this.eHandleLinkKeypress(e);break;case"button":this.eHandleButtonKeypress(e)}}eToggleMobileMenu(){this.toggleMobileMenu()}eToggleMenu(e){this.toggleMenu(e.target)}}t.mintHeader=o,t.default=o},64:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.mintSide=void 0,(i=t.mintSide||(t.mintSide={}))[i.Top=0]="Top",i[i.Right=1]="Right",i[i.Bottom=2]="Bottom",i[i.Left=3]="Left"},54:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintColor=void 0;class i{constructor(e){this.r="number"==typeof e.r?Math.max(Math.min(e.r,i.hexBase**2-1),0):0,this.g="number"==typeof e.g?Math.max(Math.min(e.g,i.hexBase**2-1),0):0,this.b="number"==typeof e.b?Math.max(Math.min(e.b,i.hexBase**2-1),0):0,this.a="number"==typeof e.a?Math.max(Math.min(e.a,1),0):1,"string"==typeof e.color&&this.stringConstructor(e.color)}stringConstructor(e){e.startsWith("#")?this.hexConstructor(e):(~e.indexOf("linear-gradient")&&(e=e.substring(e.indexOf("linear-gradient"),e.length)),this.rgbConstructor(e))}hexConstructor(e){switch(e.length){case 1:case 5:case 6:return;case 2:e="#"+e[1]+e[1]+e[1]+e[1]+e[1]+e[1]+i.hexMax;break;case 3:e="#"+e[1]+e[1]+e[1]+e[2]+e[2]+e[2]+i.hexMax;break;case 4:e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+i.hexMax;break;case 7:e+=i.hexMax;break;case 8:e+=e[e.length-1];break;default:e=e.substring(0,9)}this.r=parseInt(e.substring(1,3),i.hexBase),this.g=parseInt(e.substring(3,5),i.hexBase),this.b=parseInt(e.substring(5,7),i.hexBase),this.a=parseInt(e.substring(7,9),i.hexBase)/i.hexBase**2}rgbConstructor(e){let t=e.match(/rgba?\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)?(?:, ?(\d(?:\.\d*)?)\))?/);t&&(this.r=parseInt(t[1]),this.g=parseInt(t[2]),this.b=parseInt(t[3]),this.a=parseFloat(t[4]))}getBrightness(){return 0===this.a?262:isNaN(this.r)||isNaN(this.g)||isNaN(this.b)?-1:Math.round((299*this.r+587*this.g+144*this.b)/1e3)}}t.mintColor=i,i.hexBase=16,i.hexMax="FF",t.default=i},708:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintItem=void 0;class i{constructor(){this.version=0,this.priority=0,this.centered=!1,this.disabled=!1,this.queryParams={},this.attributes={},this.classes=[],this.buttons=[],this.images=[],this.children=[]}}t.mintItem=i,t.default=i},139:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintDisplay=void 0;class i{}t.mintDisplay=i,t.default=i},376:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintEvent=void 0;class i{}t.mintEvent=i,t.default=i},4:function(e,t,i){var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.mintIcon=void 0;const n=l(i(982));class a{static append(e,t){document.querySelectorAll(t).forEach((t=>{let i=t.querySelector("i"),l=document.createElement("i");l.classList.add(...e.split(" ")),i?t.replaceChild(l,i):t.appendChild(l)}))}static update(e){let t=n.default.removeValues(Object.assign(Object.assign({},this.icons),e),[!1]);Object.keys(t).forEach((e=>{this.append(t[e],e)}))}}t.mintIcon=a,a.icons={'a[href^="http"]':"fas fa-up-right-from-square",'a[href^="mailto:"]':"far fa-envelope",'a[href^="tel:"]':"fas fa-phone-flip",'a[href^="sms:"]':"far fa-message"},t.default=a},683:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintMath=void 0;class i{static randomInt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t)+t)}}t.mintMath=i,t.default=i},982:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintObject=void 0;class i{static isSimilar(e,t){let i=Object.keys(e);return i.length===Object.keys(t).length&&(i.forEach((i=>{if(e[i]!==t[i])return!1})),!0)}static isSuperset(e,t){let l=!0;if(e===t)return l;try{if(0===Object.keys(t).length)return!l}catch(e){return!l}return Object.keys(t).forEach((n=>{l=l&&i.isSuperset(e[n],t[n])})),l}static remove(e,t){return this.removeKeys(e,t)}static removeKeys(e,t){return Object.keys(e).reduce(((i,l)=>(t.includes(l)||(i[l]=e[l]),i)),{})}static removeValues(e,t){return Object.keys(e).reduce(((i,l)=>(t.includes(e[l])||(i[l]=e[l]),i)),{})}static sort(e){return Object.keys(e).sort().reduce(((t,i)=>(t[i]=e[i],t)),{})}static filter(e,t){return this.filterKeys(e,t)}static filterKeys(e,t){return t.reduce(((t,i)=>(t[i]=e[i],t)),{})}static filterValues(e,t){return Object.keys(e).reduce(((i,l)=>(t.includes(e[l])&&(i[l]=e[l]),i)),{})}}t.mintObject=i,t.default=i},378:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.mintSelectors=void 0;class l{static prefix(e){return(e=e.toLowerCase()).startsWith(this.pre)?e:`${this.pre}${e}`}static cssPrefix(e){return`--${this.prefix(e.replace(/^-+/,""))}`}static cssVar(e){return`var(${this.cssPrefix(e)})`}static neg(e){return`:not(${e})`}static class(e){return`.${this.prefix(e)}`}static id(e){return`#${this.prefix(e)}`}static controls(e){return e?`[aria-controls="${this.prefix(e)}"]`:this.hasControls}static expanded(e){return"boolean"==typeof e?`[aria-expanded="${e}"]`:this.hasExpanded}static getId(e){var t;return null!==(t=this.ids[null!=e?e:-1])&&void 0!==t?t:""}static getClass(e,t){var i,l;return t?null!==(i=this.classes[t][null!=e?e:-1])&&void 0!==i?i:"":null!==(l=this.classes[null!=e?e:-1])&&void 0!==l?l:""}static getFocusables(e){let t;return t=e?[...e.querySelectorAll(this.focusable)]:[...document.querySelectorAll(this.focusable)],t.filter((e=>this.isFocusable(e)))}static isFocusable(e){let t=e;do{if("none"===window.getComputedStyle(t).getPropertyValue("display").toLowerCase())return!1;t=t.parentElement}while(t);return!0}}t.mintSelectors=l,i=l,l.lib="mint",l.pre=`${i.lib}-`,l.disabled="[disabled]",l.hasControls="[aria-controls]",l.hasExpanded="[aria-expanded]",l.hasLink="[href]",l.hasRouterLink="[routerLink]",l.hasId="[id]",l.notTabbable='[tabindex^="-"]',l.tabbable=`[tabindex]${i.neg(i.notTabbable)}`,l.focusable=`input${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n select${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n textarea${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n button${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n object${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n a${i.hasLink}, a${i.hasRouterLink},\n area${i.hasLink},\n ${i.tabbable}`.replace(/\s/g,""),l.subMenuButtons=`button${i.hasControls}`,l.subMenu=`${i.subMenuButtons} + ul${i.hasId}`,l.ids={header:i.prefix("header"),logo:i.prefix("logo"),wrapper:i.prefix("wrapper"),mainContent:i.prefix("main-content")},l.classes={sides:{top:i.prefix("top"),right:i.prefix("right"),bottom:i.prefix("bottom"),left:i.prefix("left")},srOnly:i.prefix("sr-only"),js:i.prefix("js"),ready:i.prefix("ready"),fixed:i.prefix("fixed"),open:i.prefix("open")},t.default=l},110:(e,t,i)=>{var l;Object.defineProperty(t,"__esModule",{value:!0}),t.mintSettings=void 0;const n=i(64),a=i(378);class s{static set(e){let t=!1;"number"==typeof e.delayBase&&(this.delayBase=e.delayBase,t=!0),"number"==typeof e.delayStep&&(this.delayStep=e.delayStep,t=!0),t&&this.setDelay(),e.delay&&Object.keys(e.delay).length&&Object.values(e.delay).reduce(((e,t)=>e&&"number"==typeof t),!0)&&(this.delay=Object.assign(Object.assign({},this.delay),e.delay))}static setDelay(){this.delay={instant:this.delayBase+0*this.delayStep,fast:this.delayBase+1*this.delayStep,medFast:this.delayBase+2*this.delayStep,default:this.delayBase+3*this.delayStep,medSlow:this.delayBase+4*this.delayStep,slow:this.delayBase+5*this.delayStep}}static setFrom(e){if(this.from!==e){this.from=e;let t=document.getElementById(a.mintSelectors.getId("header"));null==t||t.classList.remove(...Object.values(a.mintSelectors.classes.sides)),null==t||t.classList.add(a.mintSelectors.getClass(n.mintSide[this.from].toLowerCase(),"sides"))}}static setFixed(e){if(this.fixed!==e){this.fixed=e;let t=document.getElementById(a.mintSelectors.getId("header")),i=a.mintSelectors.getClass("fixed");this.fixed?null==t||t.classList.add(i):null==t||t.classList.remove(i)}}}t.mintSettings=s,l=s,s.delayBase=0,s.delayStep=100,s.delay={instant:l.delayBase+0*l.delayStep,fast:l.delayBase+1*l.delayStep,medFast:l.delayBase+2*l.delayStep,default:l.delayBase+3*l.delayStep,medSlow:l.delayBase+4*l.delayStep,slow:l.delayBase+5*l.delayStep},t.default=s},226:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintText=void 0;class i{}t.mintText=i,t.default=i},505:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintWindow=void 0;class i{}t.mintWindow=i,t.default=i},491:function(e,t,i){var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.mintUtil=t.mintSettings=t.mintSelectors=t.mintWindow=t.mintText=t.mintObject=t.mintMath=t.mintIcon=t.mintEvent=t.mintDisplay=t.mintItem=t.mintColor=t.mintHeader=t.mintSide=void 0;var n=i(64);Object.defineProperty(t,"mintSide",{enumerable:!0,get:function(){return n.mintSide}});var a=i(870);Object.defineProperty(t,"mintHeader",{enumerable:!0,get:function(){return a.mintHeader}});var s=i(54);Object.defineProperty(t,"mintColor",{enumerable:!0,get:function(){return s.mintColor}});var r=i(708);Object.defineProperty(t,"mintItem",{enumerable:!0,get:function(){return r.mintItem}});var o=i(139);Object.defineProperty(t,"mintDisplay",{enumerable:!0,get:function(){return o.mintDisplay}});var d=i(376);Object.defineProperty(t,"mintEvent",{enumerable:!0,get:function(){return d.mintEvent}});var u=i(4);Object.defineProperty(t,"mintIcon",{enumerable:!0,get:function(){return u.mintIcon}});var c=i(683);Object.defineProperty(t,"mintMath",{enumerable:!0,get:function(){return c.mintMath}});var h=i(982);Object.defineProperty(t,"mintObject",{enumerable:!0,get:function(){return h.mintObject}});var f=i(226);Object.defineProperty(t,"mintText",{enumerable:!0,get:function(){return f.mintText}});var m=i(505);Object.defineProperty(t,"mintWindow",{enumerable:!0,get:function(){return m.mintWindow}});var b=i(378);Object.defineProperty(t,"mintSelectors",{enumerable:!0,get:function(){return b.mintSelectors}});var p=i(110);Object.defineProperty(t,"mintSettings",{enumerable:!0,get:function(){return p.mintSettings}});var v=i(427);Object.defineProperty(t,"mintUtil",{enumerable:!0,get:function(){return v.mintUtil}}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l(v).default}})},427:function(e,t,i){var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.mintUtil=void 0;const n=i(64),a=l(i(110));class s{static windowWidth(){let e=document.getElementsByTagName("body")[0].getBoundingClientRect().width%1;return window.innerWidth+e}static debounce(e){let t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.delay.default;return function(l){t&&clearTimeout(t),t=setTimeout(e,i,l)}}static debounceEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.delay.default;return s.debounce(e,t)}static throttle(e){let t,i,l,n,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.delay.default,r=arguments.length>2?arguments[2]:void 0,o=0,d=function(){o=!1===(null==r?void 0:r.leading)?0:(new Date).getTime(),n=0,l=e.apply(t,i),n||(t=i=null)};return function(){let a=(new Date).getTime();o||!1!==(null==r?void 0:r.leading)||(o=a);let u=s-a+o;return t=this,i=arguments,u<=0||u>s?(n&&(clearTimeout(n),n=0),o=a,l=e.apply(t,i),n||(t=i=null)):n||!1===(null==r?void 0:r.trailing)||(n=window.setTimeout(d,u)),l}}static throttleEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.delay.default,i=arguments.length>2?arguments[2]:void 0;return s.throttle(e,t,i)}static show(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.delay.default,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.mintSide.Top;e&&(e.style.display="",requestAnimationFrame((()=>{i===n.mintSide.Top||i===n.mintSide.Bottom?e.style.height=`${e.scrollHeight}px`:e.style.width=`${e.scrollWidth}px`,setTimeout((()=>{i===n.mintSide.Top||i===n.mintSide.Bottom?e.style.height="auto":e.style.width="auto"}),t)})))}static hide(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.delay.default,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.mintSide.Top;if(e){let l=e.scrollHeight,a=e.scrollWidth,s=e.style.transition;e.style.transition="",requestAnimationFrame((()=>{i===n.mintSide.Top||i===n.mintSide.Bottom?e.style.height=`${l}px`:e.style.width=`${a}px`,e.style.transition=s,requestAnimationFrame((()=>{i===n.mintSide.Top||i===n.mintSide.Bottom?e.style.height="0":e.style.width="0"}))})),setTimeout((()=>{e.style.display="none"}),t)}}static copyText(e){let t=document.createElement("textarea");return!(!e||!t||(t.value=e,t.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n transform: translate(-100%, -100%);\n opacity: 0;\n z-index: -1;\n ",document.body.appendChild(t),t.select(),t.setSelectionRange(0,99999),navigator.clipboard.writeText(t.value),document.body.removeChild(t),0))}static isEmail(e){return null!==e.match(/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/)}}t.mintUtil=s,t.default=s}},t={};return function i(l){var n=t[l];if(void 0!==n)return n.exports;var a=t[l]={exports:{}};return e[l].call(a.exports,a,a.exports,i),a.exports}(491)})()));
//# sourceMappingURL=index.min.js.map
{
"name": "@appartmint/mint",
"author": "App/Art Mint",
"version": "0.8.13",
"version": "0.9.0",
"license": "MIT",

@@ -68,6 +68,2 @@ "description": "The front-end TS/SCSS framework of App/Art Mint",

},
"dependencies": {
"@appartmint/n4v": "^0.8.10",
"@appartmint/util": "^0.7.5"
},
"devDependencies": {

@@ -74,0 +70,0 @@ "@appartmint/config": "^0.6.5",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc