Socket
Socket
Sign inDemoInstall

shorter-js

Package Overview
Dependencies
0
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.0-alpha15 to 0.3.0-alpha16

42

dist/shorter-js.esm.js
/*!
* shorter-js v0.3.0alpha15 (https://github.com/thednp/shorter-js)
* shorter-js v0.3.0alpha16 (https://github.com/thednp/shorter-js)
* Copyright 2019-2022 © dnp_theme

@@ -591,6 +591,11 @@ * Licensed under MIT (https://github.com/thednp/shorter-js/blob/master/LICENSE)

/**
* A global namespace for `document.head`.
*/
const { head: documentHead } = document;
/**
* A global namespace for 'animationDuration' string.
* @type {string}
*/
const animationDuration = 'webkitAnimation' in document.head.style ? 'webkitAnimationDuration' : 'animationDuration';
const animationDuration = 'webkitAnimation' in documentHead.style ? 'webkitAnimationDuration' : 'animationDuration';

@@ -607,3 +612,3 @@ /**

*/
const animationDelay = 'webkitAnimation' in document.head.style ? 'webkitAnimationDelay' : 'animationDelay';
const animationDelay = 'webkitAnimation' in documentHead.style ? 'webkitAnimationDelay' : 'animationDelay';

@@ -620,3 +625,3 @@ /**

*/
const animationName = 'webkitAnimation' in document.head.style ? 'webkitAnimationName' : 'animationName';
const animationName = 'webkitAnimation' in documentHead.style ? 'webkitAnimationName' : 'animationName';

@@ -633,3 +638,3 @@ /**

*/
const animationEndEvent = 'webkitAnimation' in document.head.style ? 'webkitAnimationEnd' : 'animationend';
const animationEndEvent = 'webkitAnimation' in documentHead.style ? 'webkitAnimationEnd' : 'animationend';

@@ -646,3 +651,3 @@ /**

*/
const transitionDuration = 'webkitTransition' in document.head.style ? 'webkitTransitionDuration' : 'transitionDuration';
const transitionDuration = 'webkitTransition' in documentHead.style ? 'webkitTransitionDuration' : 'transitionDuration';

@@ -659,3 +664,3 @@ /**

*/
const transitionDelay = 'webkitTransition' in document.head.style ? 'webkitTransitionDelay' : 'transitionDelay';
const transitionDelay = 'webkitTransition' in documentHead.style ? 'webkitTransitionDelay' : 'transitionDelay';

@@ -672,3 +677,3 @@ /**

*/
const transitionEndEvent = 'webkitTransition' in document.head.style ? 'webkitTransitionEnd' : 'transitionend';
const transitionEndEvent = 'webkitTransition' in documentHead.style ? 'webkitTransitionEnd' : 'transitionend';

@@ -691,3 +696,3 @@ /**

*/
const transitionProperty = 'webkitTransition' in document.head.style ? 'webkitTransitionProperty' : 'transitionProperty';
const transitionProperty = 'webkitTransition' in documentHead.style ? 'webkitTransitionProperty' : 'transitionProperty';

@@ -810,7 +815,2 @@ /**

/**
* A global namespace for `document.head`.
*/
const { head: documentHead } = document;
/**
* A global `boolean` for CSS3 3D transform support.

@@ -1224,3 +1224,3 @@ * @type {boolean}

* Wrap the handler in on -> off callback
* @param {Event} e Event object
* @param {AnimationEvent} e Event object
*/

@@ -1230,7 +1230,7 @@ const animationEndWrapper = (e) => {

handler.apply(element, [e]);
element.removeEventListener(animationEndEvent$1, animationEndWrapper);
off(element, animationEndEvent$1, animationEndWrapper);
called = 1;
}
};
element.addEventListener(animationEndEvent$1, animationEndWrapper);
on(element, animationEndEvent$1, animationEndWrapper);
setTimeout(() => {

@@ -1363,3 +1363,3 @@ if (!called) element.dispatchEvent(endEvent);

* Wrap the handler in on -> off callback
* @param {Event} e Event object
* @param {TransitionEvent} e Event object
*/

@@ -1369,7 +1369,7 @@ const transitionEndWrapper = (e) => {

handler.apply(element, [e]);
element.removeEventListener(transitionEndEvent$1, transitionEndWrapper);
off(element, transitionEndEvent$1, transitionEndWrapper);
called = 1;
}
};
element.addEventListener(transitionEndEvent$1, transitionEndWrapper);
on(element, transitionEndEvent$1, transitionEndWrapper);
setTimeout(() => {

@@ -2133,3 +2133,3 @@ if (!called) element.dispatchEvent(endEvent);

var version = "0.3.0alpha15";
var version = "0.3.0alpha16";

@@ -2136,0 +2136,0 @@ // @ts-ignore

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

// shorter-js v0.3.0alpha15 | dnp_theme © 2022 | MIT-License
const e={DOMContentLoaded:"DOMContentLoaded",DOMMouseScroll:"DOMMouseScroll",abort:"abort",beforeunload:"beforeunload",blur:"blur",change:"change",click:"click",contextmenu:"contextmenu",dblclick:"dblclick",error:"error",focus:"focus",focusin:"focusin",focusout:"focusout",gesturechange:"gesturechange",gestureend:"gestureend",gesturestart:"gesturestart",hover:"hover",keydown:"keydown",keypress:"keypress",keyup:"keyup",load:"load",mousedown:"mousedown",mousemove:"mousemove",mousein:"mousein",mouseout:"mouseout",mouseenter:"mouseenter",mouseleave:"mouseleave",mouseover:"mouseover",mouseup:"mouseup",mousewheel:"mousewheel",move:"move",orientationchange:"orientationchange",pointercancel:"pointercancel",pointerdown:"pointerdown",pointerleave:"pointerleave",pointermove:"pointermove",pointerup:"pointerup",readystatechange:"readystatechange",reset:"reset",resize:"resize",scroll:"scroll",select:"select",selectend:"selectend",selectstart:"selectstart",submit:"submit",touchcancel:"touchcancel",touchend:"touchend",touchmove:"touchmove",touchstart:"touchstart",unload:"unload"},t="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],n="webkitAnimation"in document.head.style?"webkitAnimationDuration":"animationDuration",o="webkitAnimation"in document.head.style?"webkitAnimationDelay":"animationDelay",i="webkitAnimation"in document.head.style?"webkitAnimationName":"animationName",a="webkitAnimation"in document.head.style?"webkitAnimationEnd":"animationend",r="webkitTransition"in document.head.style?"webkitTransitionDuration":"transitionDuration",s="webkitTransition"in document.head.style?"webkitTransitionDelay":"transitionDelay",c="webkitTransition"in document.head.style?"webkitTransitionEnd":"transitionend",u="webkitTransition"in document.head.style?"webkitTransitionProperty":"transitionProperty",{userAgentData:l}=navigator,m=l,{userAgent:d}=navigator,g=d,f=/iPhone|iPad|iPod|Android/i;let p=!1;p=m?m.brands.some(e=>f.test(e.brand)):f.test(g);const v=p,E=/(iPhone|iPod|iPad)/,y=m?m.brands.some(e=>E.test(e.brand)):E.test(g),b=!!g&&g.includes("Firefox"),{head:h}=document,w="webkitPerspective"in h.style||"perspective"in h.style;function A(e,t,n,o){const i=o||!1;e.addEventListener(t,n,i)}function k(e,t,n,o){const i=o||!1;e.removeEventListener(t,n,i)}function L(e,t,n,o){const i=a=>{a.target===e&&(n.apply(e,[a]),k(e,t,i,o))};A(e,t,i,o)}const D=(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:()=>(e=!0,e)});L(document,"DOMContentLoaded",()=>{},t)}catch(e){throw Error("Passive events are not supported")}return e})(),T="webkitTransform"in h.style||"transform"in h.style,N="ontouchstart"in window||"msMaxTouchPoints"in navigator,M="webkitAnimation"in h.style||"animation"in h.style,S="webkitTransition"in h.style||"transition"in h.style;function C(e){return e instanceof HTMLElement?e.ownerDocument:e instanceof Window?e.document:window.document}const O=[Document,Node,Element,HTMLElement],z=[Element,HTMLElement];function H(e,t){const n="string"==typeof e,o=t&&O.some(e=>t instanceof e)?t:C();return!n&&[...z].some(t=>e instanceof t)?e:n?o.querySelector(e):null}const I=new Map,P={set:(e,t,n)=>{const o=H(e);if(!o)return;I.has(t)||I.set(t,new Map);I.get(t).set(o,n)},getAllFor:e=>I.get(e)||null,get:(e,t)=>{const n=H(e),o=P.getAllFor(t);return n&&o&&o.get(n)||null},remove:(e,t)=>{const n=H(e),o=I.get(t);o&&n&&(o.delete(n),0===o.size&&I.delete(t))}};function x(e,t){const n=getComputedStyle(e);return t in n?n[t]:""}function F(e){const t=x(e,"animationName"),n=x(e,"animationDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function B(e){const t=x(e,"animationName"),n=x(e,"animationDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function R(e){const t=x(e,i),n=x(e,o),a=n.includes("ms")?1:1e3,r=M&&t&&"none"!==t?parseFloat(n)*a:0;return Number.isNaN(r)?0:r}function W(e){const t=x(e,i),o=x(e,n),a=o.includes("ms")?1:1e3,r=M&&t&&"none"!==t?parseFloat(o)*a:0;return Number.isNaN(r)?0:r}function Q(e){const t=x(e,"transitionProperty"),n=x(e,"transitionDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function V(e){const t=x(e,"transitionProperty"),n=x(e,"transitionDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function j(e){const t=x(e,u),n=x(e,s),o=n.includes("ms")?1:1e3,i=S&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function q(e){const t=x(e,u),n=x(e,r),o=n.includes("ms")?1:1e3,i=S&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}let U=1;const G=new Map;function K(e){return"true"===e||"false"!==e&&(Number.isNaN(+e)?""===e||"null"===e?null:e:+e)}const X=e=>Object.keys(e);const $=(e,t)=>Object.assign(e,t),Y=!!D&&{passive:!0},Z=new Map;function J(e,t){const{width:n,height:o,top:i,right:a,bottom:r,left:s}=e.getBoundingClientRect();let c=1,u=1;if(t&&e instanceof HTMLElement){const{offsetWidth:t,offsetHeight:i}=e;c=t>0&&Math.round(n)/t||1,u=i>0&&Math.round(o)/i||1}return{width:n/c,height:o/u,top:i/u,right:a/c,bottom:r/u,left:s/c,x:s/c,y:i/u}}function _(e){return C(e).documentElement}function ee(e){if(null==e)return window;if(!(e instanceof Window)){const{ownerDocument:t}=e;return t&&t.defaultView||window}return e}const te=e=>e instanceof ee(e).ShadowRoot||e instanceof ShadowRoot;function ne(e){const{width:t,height:n}=J(e),{offsetWidth:o,offsetHeight:i}=e;return Math.round(t)!==o||Math.round(n)!==i}const oe=e=>e&&!!e.shadowRoot;const ie={ariaChecked:"aria-checked",ariaDescribedBy:"aria-describedby",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",ariaModal:"aria-modal",ariaPressed:"aria-pressed",ariaSelected:"aria-selected",nativeEvents:e,abortEvent:"abort",blurEvent:"blur",moveEvent:"move",changeEvent:"change",errorEvent:"error",resetEvent:"reset",resizeEvent:"resize",scrollEvent:"scroll",submitEvent:"submit",loadEvent:"load",unloadEvent:"unload",readystatechangeEvent:"readystatechange",beforeunloadEvent:"beforeunload",orientationchangeEvent:"orientationchange",contextmenuEvent:"contextmenu",DOMContentLoadedEvent:"DOMContentLoaded",DOMMouseScrollEvent:"DOMMouseScroll",selectEvent:"select",selectendEvent:"selectend",selectstartEvent:"selectstart",mouseClickEvents:{down:"mousedown",up:"mouseup"},mouseclickEvent:"click",mousedblclickEvent:"dblclick",mousedownEvent:"mousedown",mouseupEvent:"mouseup",mousehoverEvent:"hover",mouseHoverEvents:t,mouseenterEvent:"mouseenter",mouseleaveEvent:"mouseleave",mouseinEvent:"mousein",mouseoutEvent:"mouseout",mouseoverEvent:"mouseover",mousemoveEvent:"mousemove",mousewheelEvent:"mousewheel",mouseSwipeEvents:{start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"},touchEvents:{start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},touchstartEvent:"touchstart",touchmoveEvent:"touchmove",touchcancelEvent:"touchcancel",touchendEvent:"touchend",pointercancelEvent:"pointercancel",pointerdownEvent:"pointerdown",pointerleaveEvent:"pointerleave",pointermoveEvent:"pointermove",pointerupEvent:"pointerup",focusEvents:{in:"focusin",out:"focusout"},focusEvent:"focus",focusinEvent:"focusin",focusoutEvent:"focusout",gesturechangeEvent:"gesturechange",gestureendEvent:"gestureend",gesturestartEvent:"gesturestart",bezierEasings:{linear:"linear",easingSinusoidalIn:"cubic-bezier(0.47,0,0.745,0.715)",easingSinusoidalOut:"cubic-bezier(0.39,0.575,0.565,1)",easingSinusoidalInOut:"cubic-bezier(0.445,0.05,0.55,0.95)",easingQuadraticIn:"cubic-bezier(0.550,0.085,0.680,0.530)",easingQuadraticOut:"cubic-bezier(0.250,0.460,0.450,0.940)",easingQuadraticInOut:"cubic-bezier(0.455,0.030,0.515,0.955)",easingCubicIn:"cubic-bezier(0.55,0.055,0.675,0.19)",easingCubicOut:"cubic-bezier(0.215,0.61,0.355,1)",easingCubicInOut:"cubic-bezier(0.645,0.045,0.355,1)",easingQuarticIn:"cubic-bezier(0.895,0.03,0.685,0.22)",easingQuarticOut:"cubic-bezier(0.165,0.84,0.44,1)",easingQuarticInOut:"cubic-bezier(0.77,0,0.175,1)",easingQuinticIn:"cubic-bezier(0.755,0.05,0.855,0.06)",easingQuinticOut:"cubic-bezier(0.23,1,0.32,1)",easingQuinticInOut:"cubic-bezier(0.86,0,0.07,1)",easingExponentialIn:"cubic-bezier(0.95,0.05,0.795,0.035)",easingExponentialOut:"cubic-bezier(0.19,1,0.22,1)",easingExponentialInOut:"cubic-bezier(1,0,0,1)",easingCircularIn:"cubic-bezier(0.6,0.04,0.98,0.335)",easingCircularOut:"cubic-bezier(0.075,0.82,0.165,1)",easingCircularInOut:"cubic-bezier(0.785,0.135,0.15,0.86)",easingBackIn:"cubic-bezier(0.6,-0.28,0.735,0.045)",easingBackOut:"cubic-bezier(0.175,0.885,0.32,1.275)",easingBackInOut:"cubic-bezier(0.68,-0.55,0.265,1.55)"},animationDuration:"animationDuration",animationDurationLegacy:n,animationDelay:"animationDelay",animationDelayLegacy:o,animationName:"animationName",animationNameLegacy:i,animationEndEvent:"animationend",animationEndEventLegacy:a,transitionDuration:"transitionDuration",transitionDurationLegacy:r,transitionDelay:"transitionDelay",transitionDelayLegacy:s,transitionEndEvent:"transitionend",transitionEndEventLegacy:c,transitionProperty:"transitionProperty",transitionPropertyLegacy:u,isMobile:v,isApple:y,isFirefox:b,support3DTransform:w,supportPassive:D,supportTransform:T,supportTouch:N,supportAnimation:M,supportTransition:S,addEventListener:"addEventListener",removeEventListener:"removeEventListener",keyboardEventKeys:{Backspace:"Backspace",Tab:"Tab",Enter:"Enter",Shift:"Shift",Control:"Control",Alt:"Alt",Pause:"Pause",CapsLock:"CapsLock",Escape:"Escape",Scape:"Space",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",Insert:"Insert",Delete:"Delete",Meta:"Meta",ContextMenu:"ContextMenu",ScrollLock:"ScrollLock"},keydownEvent:"keydown",keypressEvent:"keypress",keyupEvent:"keyup",keyAlt:"Alt",keyArrowDown:"ArrowDown",keyArrowLeft:"ArrowLeft",keyArrowRight:"ArrowRight",keyArrowUp:"ArrowUp",keyBackspace:"Backspace",keyCapsLock:"CapsLock",keyControl:"Control",keyDelete:"Delete",keyEnter:"Enter",keyEscape:"Escape",keyInsert:"Insert",keyMeta:"Meta",keyPause:"Pause",keyScrollLock:"ScrollLock",keyShift:"Shift",keySpace:"Space",keyTab:"Tab",offsetHeight:"offsetHeight",offsetWidth:"offsetWidth",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",userAgentData:m,userAgent:g,addClass:function(e,t){e.classList.add(t)},removeClass:function(e,t){e.classList.remove(t)},hasClass:function(e,t){return e.classList.contains(t)},on:A,off:k,one:L,dispatchEvent:(e,t)=>e.dispatchEvent(t),distinct:(e,t,n)=>n.indexOf(e)===t,Data:P,Timer:{set:(e,t,n,o)=>{const i=H(e);if(i)if(o&&o.length){Z.has(i)||Z.set(i,new Map);Z.get(i).set(o,setTimeout(t,n))}else Z.set(i,setTimeout(t,n))},get:(e,t)=>{const n=H(e);if(!n)return null;const o=Z.get(n);return t&&t.length&&o&&o.get?o.get(t)||null:o||null},clear:(e,t)=>{const n=H(e);if(n)if(t&&t.length){const e=Z.get(n);e&&e.get&&(clearTimeout(e.get(t)),e.delete(t),0===e.size&&Z.delete(n))}else clearTimeout(Z.get(n)),Z.delete(n)}},getInstance:(e,t)=>P.get(e,t),emulateAnimationEnd:function(e,t){let n=0;const o=new Event("animationend"),i=B(e),a=F(e);if(i){const r=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener("animationend",r),n=1)};e.addEventListener("animationend",r),setTimeout(()=>{n||e.dispatchEvent(o)},i+a+17)}else t.apply(e,[o])},emulateAnimationEndLegacy:function(e,t){let n=0;const o=new Event(a),i=W(e),r=R(e);if(M&&i){const s=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener(a,s),n=1)};e.addEventListener(a,s),setTimeout(()=>{n||e.dispatchEvent(o)},i+r+17)}else t.apply(e,[o])},emulateTransitionEnd:function(e,t){let n=0;const o=new Event("transitionend"),i=V(e),a=Q(e);if(i){const r=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener("transitionend",r),n=1)};e.addEventListener("transitionend",r),setTimeout(()=>{n||e.dispatchEvent(o)},i+a+17)}else t.apply(e,[o])},emulateTransitionEndLegacy:function(e,t){let n=0;const o=new Event(c),i=q(e),a=j(e);if(S&&i){const r=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener(c,r),n=1)};e.addEventListener(c,r),setTimeout(()=>{n||e.dispatchEvent(o)},i+a+17)}else t.apply(e,[o])},isElementInScrollRange:e=>{const{top:t,bottom:n}=J(e),{clientHeight:o}=_(e);return t<=o&&n>=0},isElementInViewport:e=>{const{top:t,left:n,bottom:o,right:i}=J(e,!0),{clientWidth:a,clientHeight:r}=_(e);return t>=0&&n>=0&&o<=r&&i<=a},passiveHandler:{passive:!0},passiveHandlerLegacy:Y,getElementAnimationDuration:B,getElementAnimationDurationLegacy:W,getElementAnimationDelay:F,getElementAnimationDelayLegacy:R,getElementTransitionDuration:V,getElementTransitionDurationLegacy:q,getElementTransitionDelay:Q,getElementTransitionDelayLegacy:j,getNodeScroll:function(e){const t="scrollX"in e;return{x:t?e.scrollX:e.scrollLeft,y:t?e.scrollY:e.scrollTop}},getParentNode:function(e){return"HTML"===e.nodeName?e:e.assignedSlot||e.parentNode||(te(e)?e.host:null)||_(e)},getRectRelativeToOffsetParent:function(e,t,n){const o=t instanceof HTMLElement,i=J(e,o&&ne(t)),a={x:0,y:0};if(o){const e=J(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}return{x:i.left+n.x-a.x,y:i.top+n.y-a.y,width:i.width,height:i.height}},getWindow:ee,isArray:e=>Array.isArray(e),isString:e=>"string"==typeof e,isCustomElement:oe,isElement:e=>e instanceof Element,isNode:e=>e instanceof Node,isHTMLElement:e=>e instanceof HTMLElement,isHTMLImageElement:e=>e instanceof HTMLImageElement,isSVGElement:e=>e instanceof SVGElement,isNodeList:e=>e instanceof NodeList,isHTMLCollection:e=>e instanceof HTMLCollection,isScaledElement:ne,isTableElement:e=>["TABLE","TD","TH"].includes(e.tagName),isShadowRoot:te,isDocument:e=>e instanceof Document,isElementsArray:e=>Array.isArray(e)&&e.every(e=>[HTMLElement,Element].some(t=>e instanceof t)),isWindow:function(e){return e instanceof Window},isMedia:e=>e&&[SVGElement,HTMLImageElement,HTMLVideoElement].some(t=>e instanceof t),isRTL:e=>"rtl"===_(e).dir,elementNodes:z,parentNodes:O,closest:function e(t,n){return t?t.closest(n)||e(t.getRootNode().host,n):null},querySelector:H,getCustomElements:function(e){return[...(e&&O.some(t=>e instanceof t)?e:C()).querySelectorAll("*")].filter(oe)},querySelectorAll:function(e,t){return(t&&O.some(e=>t instanceof e)?t:C()).querySelectorAll(e)},getElementsByClassName:function(e,t){return(t&&O.some(e=>t instanceof e)?t:C()).getElementsByClassName(e)},getElementsByTagName:function(e,t){return(t&&O.some(e=>t instanceof e)?t:C()).getElementsByTagName(e)},normalizeValue:K,normalizeOptions:function(e,t,n,o){const i={...e.dataset},a={},r={};return X(i).forEach(e=>{const t=o&&e.includes(o)?e.replace(o,"").replace(/[A-Z]/,e=>e.toLowerCase()):e;r[t]=K(i[e])}),X(n).forEach(e=>{n[e]=K(n[e])}),X(t).forEach(e=>{a[e]=e in n?n[e]:e in r?r[e]:t[e]}),a},tryWrapper:function(e,t){try{e()}catch(e){throw TypeError(`${t} ${e}`)}},reflow:e=>e.offsetHeight,noop:()=>{},focus:e=>e.focus(),getUID:function(e,t){U+=1;let n=G.get(e),o=U;return n?o=t&&t.length&&n.get&&n.get(t)?n.get(t):n:t&&t.length?(n||(G.set(e,new Map),n=G.get(e)),n.set(t,o)):G.set(e,o),o},ArrayFrom:e=>Array.from(e),Float32ArrayFrom:e=>Float32Array.from(Array.from(e)),Float64ArrayFrom:e=>Float64Array.from(Array.from(e)),ObjectAssign:$,ObjectKeys:X,ObjectValues:e=>Object.values(e),getBoundingClientRect:J,getDocument:C,getDocumentBody:function(e){return C(e).body},getDocumentElement:_,getDocumentHead:function(e){return C(e).head},getElementStyle:x,setElementStyle:(e,t)=>{$(e.style,t)},hasAttribute:(e,t)=>e.hasAttribute(t),hasAttributeNS:(e,t,n)=>e.hasAttributeNS(n||null,t),getAttribute:(e,t)=>e.getAttribute(t),getAttributeNS:(e,t,n)=>e.getAttributeNS(n||null,t),setAttribute:(e,t,n)=>e.setAttribute(t,n),setAttributeNS:(e,t,n,o)=>e.setAttributeNS(o||null,t,n),removeAttribute:(e,t)=>e.removeAttribute(t),removeAttributeNS:(e,t,n)=>e.removeAttributeNS(n||null,t),Version:"0.3.0alpha15"};export{ie as default};
// shorter-js v0.3.0alpha16 | dnp_theme © 2022 | MIT-License
const e={DOMContentLoaded:"DOMContentLoaded",DOMMouseScroll:"DOMMouseScroll",abort:"abort",beforeunload:"beforeunload",blur:"blur",change:"change",click:"click",contextmenu:"contextmenu",dblclick:"dblclick",error:"error",focus:"focus",focusin:"focusin",focusout:"focusout",gesturechange:"gesturechange",gestureend:"gestureend",gesturestart:"gesturestart",hover:"hover",keydown:"keydown",keypress:"keypress",keyup:"keyup",load:"load",mousedown:"mousedown",mousemove:"mousemove",mousein:"mousein",mouseout:"mouseout",mouseenter:"mouseenter",mouseleave:"mouseleave",mouseover:"mouseover",mouseup:"mouseup",mousewheel:"mousewheel",move:"move",orientationchange:"orientationchange",pointercancel:"pointercancel",pointerdown:"pointerdown",pointerleave:"pointerleave",pointermove:"pointermove",pointerup:"pointerup",readystatechange:"readystatechange",reset:"reset",resize:"resize",scroll:"scroll",select:"select",selectend:"selectend",selectstart:"selectstart",submit:"submit",touchcancel:"touchcancel",touchend:"touchend",touchmove:"touchmove",touchstart:"touchstart",unload:"unload"},t="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],{head:n}=document,o="webkitAnimation"in n.style?"webkitAnimationDuration":"animationDuration",i="webkitAnimation"in n.style?"webkitAnimationDelay":"animationDelay",a="webkitAnimation"in n.style?"webkitAnimationName":"animationName",s="webkitAnimation"in n.style?"webkitAnimationEnd":"animationend",r="webkitTransition"in n.style?"webkitTransitionDuration":"transitionDuration",c="webkitTransition"in n.style?"webkitTransitionDelay":"transitionDelay",u="webkitTransition"in n.style?"webkitTransitionEnd":"transitionend",l="webkitTransition"in n.style?"webkitTransitionProperty":"transitionProperty",{userAgentData:m}=navigator,d=m,{userAgent:g}=navigator,f=g,p=/iPhone|iPad|iPod|Android/i;let E=!1;E=d?d.brands.some(e=>p.test(e.brand)):p.test(f);const v=E,y=/(iPhone|iPod|iPad)/,b=d?d.brands.some(e=>y.test(e.brand)):y.test(f),h=!!f&&f.includes("Firefox"),w="webkitPerspective"in n.style||"perspective"in n.style;function A(e,t,n,o){const i=o||!1;e.addEventListener(t,n,i)}function k(e,t,n,o){const i=o||!1;e.removeEventListener(t,n,i)}function L(e,t,n,o){const i=a=>{a.target===e&&(n.apply(e,[a]),k(e,t,i,o))};A(e,t,i,o)}const D=(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:()=>(e=!0,e)});L(document,"DOMContentLoaded",()=>{},t)}catch(e){throw Error("Passive events are not supported")}return e})(),T="webkitTransform"in n.style||"transform"in n.style,N="ontouchstart"in window||"msMaxTouchPoints"in navigator,M="webkitAnimation"in n.style||"animation"in n.style,S="webkitTransition"in n.style||"transition"in n.style;function C(e){return e instanceof HTMLElement?e.ownerDocument:e instanceof Window?e.document:window.document}const O=[Document,Node,Element,HTMLElement],z=[Element,HTMLElement];function H(e,t){const n="string"==typeof e,o=t&&O.some(e=>t instanceof e)?t:C();return!n&&[...z].some(t=>e instanceof t)?e:n?o.querySelector(e):null}const I=new Map,P={set:(e,t,n)=>{const o=H(e);if(!o)return;I.has(t)||I.set(t,new Map);I.get(t).set(o,n)},getAllFor:e=>I.get(e)||null,get:(e,t)=>{const n=H(e),o=P.getAllFor(t);return n&&o&&o.get(n)||null},remove:(e,t)=>{const n=H(e),o=I.get(t);o&&n&&(o.delete(n),0===o.size&&I.delete(t))}};function x(e,t){const n=getComputedStyle(e);return t in n?n[t]:""}function F(e){const t=x(e,"animationName"),n=x(e,"animationDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function B(e){const t=x(e,"animationName"),n=x(e,"animationDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function R(e){const t=x(e,a),n=x(e,i),o=n.includes("ms")?1:1e3,s=M&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(s)?0:s}function W(e){const t=x(e,a),n=x(e,o),i=n.includes("ms")?1:1e3,s=M&&t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(s)?0:s}function Q(e){const t=x(e,"transitionProperty"),n=x(e,"transitionDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function V(e){const t=x(e,"transitionProperty"),n=x(e,"transitionDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function j(e){const t=x(e,l),n=x(e,c),o=n.includes("ms")?1:1e3,i=S&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function q(e){const t=x(e,l),n=x(e,r),o=n.includes("ms")?1:1e3,i=S&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}let U=1;const G=new Map;function K(e){return"true"===e||"false"!==e&&(Number.isNaN(+e)?""===e||"null"===e?null:e:+e)}const X=e=>Object.keys(e);const $=(e,t)=>Object.assign(e,t),Y=!!D&&{passive:!0},Z=new Map;function J(e,t){const{width:n,height:o,top:i,right:a,bottom:s,left:r}=e.getBoundingClientRect();let c=1,u=1;if(t&&e instanceof HTMLElement){const{offsetWidth:t,offsetHeight:i}=e;c=t>0&&Math.round(n)/t||1,u=i>0&&Math.round(o)/i||1}return{width:n/c,height:o/u,top:i/u,right:a/c,bottom:s/u,left:r/c,x:r/c,y:i/u}}function _(e){return C(e).documentElement}function ee(e){if(null==e)return window;if(!(e instanceof Window)){const{ownerDocument:t}=e;return t&&t.defaultView||window}return e}const te=e=>e instanceof ee(e).ShadowRoot||e instanceof ShadowRoot;function ne(e){const{width:t,height:n}=J(e),{offsetWidth:o,offsetHeight:i}=e;return Math.round(t)!==o||Math.round(n)!==i}const oe=e=>e&&!!e.shadowRoot;const ie={ariaChecked:"aria-checked",ariaDescribedBy:"aria-describedby",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",ariaModal:"aria-modal",ariaPressed:"aria-pressed",ariaSelected:"aria-selected",nativeEvents:e,abortEvent:"abort",blurEvent:"blur",moveEvent:"move",changeEvent:"change",errorEvent:"error",resetEvent:"reset",resizeEvent:"resize",scrollEvent:"scroll",submitEvent:"submit",loadEvent:"load",unloadEvent:"unload",readystatechangeEvent:"readystatechange",beforeunloadEvent:"beforeunload",orientationchangeEvent:"orientationchange",contextmenuEvent:"contextmenu",DOMContentLoadedEvent:"DOMContentLoaded",DOMMouseScrollEvent:"DOMMouseScroll",selectEvent:"select",selectendEvent:"selectend",selectstartEvent:"selectstart",mouseClickEvents:{down:"mousedown",up:"mouseup"},mouseclickEvent:"click",mousedblclickEvent:"dblclick",mousedownEvent:"mousedown",mouseupEvent:"mouseup",mousehoverEvent:"hover",mouseHoverEvents:t,mouseenterEvent:"mouseenter",mouseleaveEvent:"mouseleave",mouseinEvent:"mousein",mouseoutEvent:"mouseout",mouseoverEvent:"mouseover",mousemoveEvent:"mousemove",mousewheelEvent:"mousewheel",mouseSwipeEvents:{start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"},touchEvents:{start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},touchstartEvent:"touchstart",touchmoveEvent:"touchmove",touchcancelEvent:"touchcancel",touchendEvent:"touchend",pointercancelEvent:"pointercancel",pointerdownEvent:"pointerdown",pointerleaveEvent:"pointerleave",pointermoveEvent:"pointermove",pointerupEvent:"pointerup",focusEvents:{in:"focusin",out:"focusout"},focusEvent:"focus",focusinEvent:"focusin",focusoutEvent:"focusout",gesturechangeEvent:"gesturechange",gestureendEvent:"gestureend",gesturestartEvent:"gesturestart",bezierEasings:{linear:"linear",easingSinusoidalIn:"cubic-bezier(0.47,0,0.745,0.715)",easingSinusoidalOut:"cubic-bezier(0.39,0.575,0.565,1)",easingSinusoidalInOut:"cubic-bezier(0.445,0.05,0.55,0.95)",easingQuadraticIn:"cubic-bezier(0.550,0.085,0.680,0.530)",easingQuadraticOut:"cubic-bezier(0.250,0.460,0.450,0.940)",easingQuadraticInOut:"cubic-bezier(0.455,0.030,0.515,0.955)",easingCubicIn:"cubic-bezier(0.55,0.055,0.675,0.19)",easingCubicOut:"cubic-bezier(0.215,0.61,0.355,1)",easingCubicInOut:"cubic-bezier(0.645,0.045,0.355,1)",easingQuarticIn:"cubic-bezier(0.895,0.03,0.685,0.22)",easingQuarticOut:"cubic-bezier(0.165,0.84,0.44,1)",easingQuarticInOut:"cubic-bezier(0.77,0,0.175,1)",easingQuinticIn:"cubic-bezier(0.755,0.05,0.855,0.06)",easingQuinticOut:"cubic-bezier(0.23,1,0.32,1)",easingQuinticInOut:"cubic-bezier(0.86,0,0.07,1)",easingExponentialIn:"cubic-bezier(0.95,0.05,0.795,0.035)",easingExponentialOut:"cubic-bezier(0.19,1,0.22,1)",easingExponentialInOut:"cubic-bezier(1,0,0,1)",easingCircularIn:"cubic-bezier(0.6,0.04,0.98,0.335)",easingCircularOut:"cubic-bezier(0.075,0.82,0.165,1)",easingCircularInOut:"cubic-bezier(0.785,0.135,0.15,0.86)",easingBackIn:"cubic-bezier(0.6,-0.28,0.735,0.045)",easingBackOut:"cubic-bezier(0.175,0.885,0.32,1.275)",easingBackInOut:"cubic-bezier(0.68,-0.55,0.265,1.55)"},animationDuration:"animationDuration",animationDurationLegacy:o,animationDelay:"animationDelay",animationDelayLegacy:i,animationName:"animationName",animationNameLegacy:a,animationEndEvent:"animationend",animationEndEventLegacy:s,transitionDuration:"transitionDuration",transitionDurationLegacy:r,transitionDelay:"transitionDelay",transitionDelayLegacy:c,transitionEndEvent:"transitionend",transitionEndEventLegacy:u,transitionProperty:"transitionProperty",transitionPropertyLegacy:l,isMobile:v,isApple:b,isFirefox:h,support3DTransform:w,supportPassive:D,supportTransform:T,supportTouch:N,supportAnimation:M,supportTransition:S,addEventListener:"addEventListener",removeEventListener:"removeEventListener",keyboardEventKeys:{Backspace:"Backspace",Tab:"Tab",Enter:"Enter",Shift:"Shift",Control:"Control",Alt:"Alt",Pause:"Pause",CapsLock:"CapsLock",Escape:"Escape",Scape:"Space",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",Insert:"Insert",Delete:"Delete",Meta:"Meta",ContextMenu:"ContextMenu",ScrollLock:"ScrollLock"},keydownEvent:"keydown",keypressEvent:"keypress",keyupEvent:"keyup",keyAlt:"Alt",keyArrowDown:"ArrowDown",keyArrowLeft:"ArrowLeft",keyArrowRight:"ArrowRight",keyArrowUp:"ArrowUp",keyBackspace:"Backspace",keyCapsLock:"CapsLock",keyControl:"Control",keyDelete:"Delete",keyEnter:"Enter",keyEscape:"Escape",keyInsert:"Insert",keyMeta:"Meta",keyPause:"Pause",keyScrollLock:"ScrollLock",keyShift:"Shift",keySpace:"Space",keyTab:"Tab",offsetHeight:"offsetHeight",offsetWidth:"offsetWidth",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",userAgentData:d,userAgent:f,addClass:function(e,t){e.classList.add(t)},removeClass:function(e,t){e.classList.remove(t)},hasClass:function(e,t){return e.classList.contains(t)},on:A,off:k,one:L,dispatchEvent:(e,t)=>e.dispatchEvent(t),distinct:(e,t,n)=>n.indexOf(e)===t,Data:P,Timer:{set:(e,t,n,o)=>{const i=H(e);if(i)if(o&&o.length){Z.has(i)||Z.set(i,new Map);Z.get(i).set(o,setTimeout(t,n))}else Z.set(i,setTimeout(t,n))},get:(e,t)=>{const n=H(e);if(!n)return null;const o=Z.get(n);return t&&t.length&&o&&o.get?o.get(t)||null:o||null},clear:(e,t)=>{const n=H(e);if(n)if(t&&t.length){const e=Z.get(n);e&&e.get&&(clearTimeout(e.get(t)),e.delete(t),0===e.size&&Z.delete(n))}else clearTimeout(Z.get(n)),Z.delete(n)}},getInstance:(e,t)=>P.get(e,t),emulateAnimationEnd:function(e,t){let n=0;const o=new Event("animationend"),i=B(e),a=F(e);if(i){const s=o=>{o.target===e&&(t.apply(e,[o]),k(e,"animationend",s),n=1)};A(e,"animationend",s),setTimeout(()=>{n||e.dispatchEvent(o)},i+a+17)}else t.apply(e,[o])},emulateAnimationEndLegacy:function(e,t){let n=0;const o=new Event(s),i=W(e),a=R(e);if(M&&i){const r=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener(s,r),n=1)};e.addEventListener(s,r),setTimeout(()=>{n||e.dispatchEvent(o)},i+a+17)}else t.apply(e,[o])},emulateTransitionEnd:function(e,t){let n=0;const o=new Event("transitionend"),i=V(e),a=Q(e);if(i){const s=o=>{o.target===e&&(t.apply(e,[o]),k(e,"transitionend",s),n=1)};A(e,"transitionend",s),setTimeout(()=>{n||e.dispatchEvent(o)},i+a+17)}else t.apply(e,[o])},emulateTransitionEndLegacy:function(e,t){let n=0;const o=new Event(u),i=q(e),a=j(e);if(S&&i){const s=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener(u,s),n=1)};e.addEventListener(u,s),setTimeout(()=>{n||e.dispatchEvent(o)},i+a+17)}else t.apply(e,[o])},isElementInScrollRange:e=>{const{top:t,bottom:n}=J(e),{clientHeight:o}=_(e);return t<=o&&n>=0},isElementInViewport:e=>{const{top:t,left:n,bottom:o,right:i}=J(e,!0),{clientWidth:a,clientHeight:s}=_(e);return t>=0&&n>=0&&o<=s&&i<=a},passiveHandler:{passive:!0},passiveHandlerLegacy:Y,getElementAnimationDuration:B,getElementAnimationDurationLegacy:W,getElementAnimationDelay:F,getElementAnimationDelayLegacy:R,getElementTransitionDuration:V,getElementTransitionDurationLegacy:q,getElementTransitionDelay:Q,getElementTransitionDelayLegacy:j,getNodeScroll:function(e){const t="scrollX"in e;return{x:t?e.scrollX:e.scrollLeft,y:t?e.scrollY:e.scrollTop}},getParentNode:function(e){return"HTML"===e.nodeName?e:e.assignedSlot||e.parentNode||(te(e)?e.host:null)||_(e)},getRectRelativeToOffsetParent:function(e,t,n){const o=t instanceof HTMLElement,i=J(e,o&&ne(t)),a={x:0,y:0};if(o){const e=J(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}return{x:i.left+n.x-a.x,y:i.top+n.y-a.y,width:i.width,height:i.height}},getWindow:ee,isArray:e=>Array.isArray(e),isString:e=>"string"==typeof e,isCustomElement:oe,isElement:e=>e instanceof Element,isNode:e=>e instanceof Node,isHTMLElement:e=>e instanceof HTMLElement,isHTMLImageElement:e=>e instanceof HTMLImageElement,isSVGElement:e=>e instanceof SVGElement,isNodeList:e=>e instanceof NodeList,isHTMLCollection:e=>e instanceof HTMLCollection,isScaledElement:ne,isTableElement:e=>["TABLE","TD","TH"].includes(e.tagName),isShadowRoot:te,isDocument:e=>e instanceof Document,isElementsArray:e=>Array.isArray(e)&&e.every(e=>[HTMLElement,Element].some(t=>e instanceof t)),isWindow:function(e){return e instanceof Window},isMedia:e=>e&&[SVGElement,HTMLImageElement,HTMLVideoElement].some(t=>e instanceof t),isRTL:e=>"rtl"===_(e).dir,elementNodes:z,parentNodes:O,closest:function e(t,n){return t?t.closest(n)||e(t.getRootNode().host,n):null},querySelector:H,getCustomElements:function(e){return[...(e&&O.some(t=>e instanceof t)?e:C()).querySelectorAll("*")].filter(oe)},querySelectorAll:function(e,t){return(t&&O.some(e=>t instanceof e)?t:C()).querySelectorAll(e)},getElementsByClassName:function(e,t){return(t&&O.some(e=>t instanceof e)?t:C()).getElementsByClassName(e)},getElementsByTagName:function(e,t){return(t&&O.some(e=>t instanceof e)?t:C()).getElementsByTagName(e)},normalizeValue:K,normalizeOptions:function(e,t,n,o){const i={...e.dataset},a={},s={};return X(i).forEach(e=>{const t=o&&e.includes(o)?e.replace(o,"").replace(/[A-Z]/,e=>e.toLowerCase()):e;s[t]=K(i[e])}),X(n).forEach(e=>{n[e]=K(n[e])}),X(t).forEach(e=>{a[e]=e in n?n[e]:e in s?s[e]:t[e]}),a},tryWrapper:function(e,t){try{e()}catch(e){throw TypeError(`${t} ${e}`)}},reflow:e=>e.offsetHeight,noop:()=>{},focus:e=>e.focus(),getUID:function(e,t){U+=1;let n=G.get(e),o=U;return n?o=t&&t.length&&n.get&&n.get(t)?n.get(t):n:t&&t.length?(n||(G.set(e,new Map),n=G.get(e)),n.set(t,o)):G.set(e,o),o},ArrayFrom:e=>Array.from(e),Float32ArrayFrom:e=>Float32Array.from(Array.from(e)),Float64ArrayFrom:e=>Float64Array.from(Array.from(e)),ObjectAssign:$,ObjectKeys:X,ObjectValues:e=>Object.values(e),getBoundingClientRect:J,getDocument:C,getDocumentBody:function(e){return C(e).body},getDocumentElement:_,getDocumentHead:function(e){return C(e).head},getElementStyle:x,setElementStyle:(e,t)=>{$(e.style,t)},hasAttribute:(e,t)=>e.hasAttribute(t),hasAttributeNS:(e,t,n)=>e.hasAttributeNS(n||null,t),getAttribute:(e,t)=>e.getAttribute(t),getAttributeNS:(e,t,n)=>e.getAttributeNS(n||null,t),setAttribute:(e,t,n)=>e.setAttribute(t,n),setAttributeNS:(e,t,n,o)=>e.setAttributeNS(o||null,t,n),removeAttribute:(e,t)=>e.removeAttribute(t),removeAttributeNS:(e,t,n)=>e.removeAttributeNS(n||null,t),Version:"0.3.0alpha16"};export{ie as default};

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

// shorter-js v0.3.0alpha15 | dnp_theme © 2022 | MIT-License
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).SHORTER=t()}(this,(function(){"use strict";var e={DOMContentLoaded:"DOMContentLoaded",DOMMouseScroll:"DOMMouseScroll",abort:"abort",beforeunload:"beforeunload",blur:"blur",change:"change",click:"click",contextmenu:"contextmenu",dblclick:"dblclick",error:"error",focus:"focus",focusin:"focusin",focusout:"focusout",gesturechange:"gesturechange",gestureend:"gestureend",gesturestart:"gesturestart",hover:"hover",keydown:"keydown",keypress:"keypress",keyup:"keyup",load:"load",mousedown:"mousedown",mousemove:"mousemove",mousein:"mousein",mouseout:"mouseout",mouseenter:"mouseenter",mouseleave:"mouseleave",mouseover:"mouseover",mouseup:"mouseup",mousewheel:"mousewheel",move:"move",orientationchange:"orientationchange",pointercancel:"pointercancel",pointerdown:"pointerdown",pointerleave:"pointerleave",pointermove:"pointermove",pointerup:"pointerup",readystatechange:"readystatechange",reset:"reset",resize:"resize",scroll:"scroll",select:"select",selectend:"selectend",selectstart:"selectstart",submit:"submit",touchcancel:"touchcancel",touchend:"touchend",touchmove:"touchmove",touchstart:"touchstart",unload:"unload"},t="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],n="webkitAnimation"in document.head.style?"webkitAnimationDuration":"animationDuration",o="webkitAnimation"in document.head.style?"webkitAnimationDelay":"animationDelay",i="webkitAnimation"in document.head.style?"webkitAnimationName":"animationName",r="webkitAnimation"in document.head.style?"webkitAnimationEnd":"animationend",a="webkitTransition"in document.head.style?"webkitTransitionDuration":"transitionDuration",u="webkitTransition"in document.head.style?"webkitTransitionDelay":"transitionDelay",s="webkitTransition"in document.head.style?"webkitTransitionEnd":"transitionend",c="webkitTransition"in document.head.style?"webkitTransitionProperty":"transitionProperty",l=navigator.userAgentData,m=navigator.userAgent,d=/iPhone|iPad|iPod|Android/i,f=l?l.brands.some((function(e){return d.test(e.brand)})):d.test(m),v=/(iPhone|iPod|iPad)/,g=l?l.brands.some((function(e){return v.test(e.brand)})):v.test(m),p=!!m&&m.includes("Firefox"),E=document.head,y="webkitPerspective"in E.style||"perspective"in E.style;function b(e,t,n,o){var i=o||!1;e.addEventListener(t,n,i)}function h(e,t,n,o){var i=o||!1;e.removeEventListener(t,n,i)}function w(e,t,n,o){var i=function(r){r.target===e&&(n.apply(e,[r]),h(e,t,i,o))};b(e,t,i,o)}var A=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0}});w(document,"DOMContentLoaded",(function(){}),t)}catch(e){throw Error("Passive events are not supported")}return e}(),k="webkitTransform"in E.style||"transform"in E.style,L="ontouchstart"in window||"msMaxTouchPoints"in navigator,D="webkitAnimation"in E.style||"animation"in E.style,T="webkitTransition"in E.style||"transition"in E.style;function N(e){return e instanceof HTMLElement?e.ownerDocument:e instanceof Window?e.document:window.document}var S=[Document,Node,Element,HTMLElement],M=[Element,HTMLElement];function O(e,t){var n="string"==typeof e,o=t&&S.some((function(e){return t instanceof e}))?t:N();return!n&&[].concat(M).some((function(t){return e instanceof t}))?e:n?o.querySelector(e):null}var C=new Map,z={set:function(e,t,n){var o=O(e);o&&(C.has(t)||C.set(t,new Map),C.get(t).set(o,n))},getAllFor:function(e){return C.get(e)||null},get:function(e,t){var n=O(e),o=z.getAllFor(t);return n&&o&&o.get(n)||null},remove:function(e,t){var n=O(e),o=C.get(t);o&&n&&(o.delete(n),0===o.size&&C.delete(t))}};function H(e,t){var n=getComputedStyle(e);return t in n?n[t]:""}function I(e){var t=H(e,"animationName"),n=H(e,"animationDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function x(e){var t=H(e,"animationName"),n=H(e,"animationDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function P(e){var t=H(e,i),n=H(e,o),r=n.includes("ms")?1:1e3,a=D&&t&&"none"!==t?parseFloat(n)*r:0;return Number.isNaN(a)?0:a}function F(e){var t=H(e,i),o=H(e,n),r=o.includes("ms")?1:1e3,a=D&&t&&"none"!==t?parseFloat(o)*r:0;return Number.isNaN(a)?0:a}function B(e){var t=H(e,"transitionProperty"),n=H(e,"transitionDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function R(e){var t=H(e,"transitionProperty"),n=H(e,"transitionDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function W(e){var t=H(e,c),n=H(e,u),o=n.includes("ms")?1:1e3,i=T&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function j(e){var t=H(e,c),n=H(e,a),o=n.includes("ms")?1:1e3,i=T&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}var Q=1,V=new Map;function q(e){return"true"===e||"false"!==e&&(Number.isNaN(+e)?""===e||"null"===e?null:e:+e)}var U=function(e){return Object.keys(e)};var G=function(e,t){return Object.assign(e,t)},K=!!A&&{passive:!0},X=new Map;function Y(e,t){var n=e.getBoundingClientRect(),o=n.width,i=n.height,r=n.top,a=n.right,u=n.bottom,s=n.left,c=1,l=1;if(t&&e instanceof HTMLElement){var m=e.offsetWidth,d=e.offsetHeight;c=m>0&&Math.round(o)/m||1,l=d>0&&Math.round(i)/d||1}return{width:o/c,height:i/l,top:r/l,right:a/c,bottom:u/l,left:s/c,x:s/c,y:r/l}}function Z(e){return N(e).documentElement}function J(e){if(null==e)return window;if(!(e instanceof Window)){var t=e.ownerDocument;return t&&t.defaultView||window}return e}var $=function(e){return e instanceof J(e).ShadowRoot||e instanceof ShadowRoot};function _(e){var t=Y(e),n=t.width,o=t.height,i=e.offsetWidth,r=e.offsetHeight;return Math.round(n)!==i||Math.round(o)!==r}var ee=function(e){return e&&!!e.shadowRoot};return{ariaChecked:"aria-checked",ariaDescribedBy:"aria-describedby",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",ariaModal:"aria-modal",ariaPressed:"aria-pressed",ariaSelected:"aria-selected",nativeEvents:e,abortEvent:"abort",blurEvent:"blur",moveEvent:"move",changeEvent:"change",errorEvent:"error",resetEvent:"reset",resizeEvent:"resize",scrollEvent:"scroll",submitEvent:"submit",loadEvent:"load",unloadEvent:"unload",readystatechangeEvent:"readystatechange",beforeunloadEvent:"beforeunload",orientationchangeEvent:"orientationchange",contextmenuEvent:"contextmenu",DOMContentLoadedEvent:"DOMContentLoaded",DOMMouseScrollEvent:"DOMMouseScroll",selectEvent:"select",selectendEvent:"selectend",selectstartEvent:"selectstart",mouseClickEvents:{down:"mousedown",up:"mouseup"},mouseclickEvent:"click",mousedblclickEvent:"dblclick",mousedownEvent:"mousedown",mouseupEvent:"mouseup",mousehoverEvent:"hover",mouseHoverEvents:t,mouseenterEvent:"mouseenter",mouseleaveEvent:"mouseleave",mouseinEvent:"mousein",mouseoutEvent:"mouseout",mouseoverEvent:"mouseover",mousemoveEvent:"mousemove",mousewheelEvent:"mousewheel",mouseSwipeEvents:{start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"},touchEvents:{start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},touchstartEvent:"touchstart",touchmoveEvent:"touchmove",touchcancelEvent:"touchcancel",touchendEvent:"touchend",pointercancelEvent:"pointercancel",pointerdownEvent:"pointerdown",pointerleaveEvent:"pointerleave",pointermoveEvent:"pointermove",pointerupEvent:"pointerup",focusEvents:{in:"focusin",out:"focusout"},focusEvent:"focus",focusinEvent:"focusin",focusoutEvent:"focusout",gesturechangeEvent:"gesturechange",gestureendEvent:"gestureend",gesturestartEvent:"gesturestart",bezierEasings:{linear:"linear",easingSinusoidalIn:"cubic-bezier(0.47,0,0.745,0.715)",easingSinusoidalOut:"cubic-bezier(0.39,0.575,0.565,1)",easingSinusoidalInOut:"cubic-bezier(0.445,0.05,0.55,0.95)",easingQuadraticIn:"cubic-bezier(0.550,0.085,0.680,0.530)",easingQuadraticOut:"cubic-bezier(0.250,0.460,0.450,0.940)",easingQuadraticInOut:"cubic-bezier(0.455,0.030,0.515,0.955)",easingCubicIn:"cubic-bezier(0.55,0.055,0.675,0.19)",easingCubicOut:"cubic-bezier(0.215,0.61,0.355,1)",easingCubicInOut:"cubic-bezier(0.645,0.045,0.355,1)",easingQuarticIn:"cubic-bezier(0.895,0.03,0.685,0.22)",easingQuarticOut:"cubic-bezier(0.165,0.84,0.44,1)",easingQuarticInOut:"cubic-bezier(0.77,0,0.175,1)",easingQuinticIn:"cubic-bezier(0.755,0.05,0.855,0.06)",easingQuinticOut:"cubic-bezier(0.23,1,0.32,1)",easingQuinticInOut:"cubic-bezier(0.86,0,0.07,1)",easingExponentialIn:"cubic-bezier(0.95,0.05,0.795,0.035)",easingExponentialOut:"cubic-bezier(0.19,1,0.22,1)",easingExponentialInOut:"cubic-bezier(1,0,0,1)",easingCircularIn:"cubic-bezier(0.6,0.04,0.98,0.335)",easingCircularOut:"cubic-bezier(0.075,0.82,0.165,1)",easingCircularInOut:"cubic-bezier(0.785,0.135,0.15,0.86)",easingBackIn:"cubic-bezier(0.6,-0.28,0.735,0.045)",easingBackOut:"cubic-bezier(0.175,0.885,0.32,1.275)",easingBackInOut:"cubic-bezier(0.68,-0.55,0.265,1.55)"},animationDuration:"animationDuration",animationDurationLegacy:n,animationDelay:"animationDelay",animationDelayLegacy:o,animationName:"animationName",animationNameLegacy:i,animationEndEvent:"animationend",animationEndEventLegacy:r,transitionDuration:"transitionDuration",transitionDurationLegacy:a,transitionDelay:"transitionDelay",transitionDelayLegacy:u,transitionEndEvent:"transitionend",transitionEndEventLegacy:s,transitionProperty:"transitionProperty",transitionPropertyLegacy:c,isMobile:f,isApple:g,isFirefox:p,support3DTransform:y,supportPassive:A,supportTransform:k,supportTouch:L,supportAnimation:D,supportTransition:T,addEventListener:"addEventListener",removeEventListener:"removeEventListener",keyboardEventKeys:{Backspace:"Backspace",Tab:"Tab",Enter:"Enter",Shift:"Shift",Control:"Control",Alt:"Alt",Pause:"Pause",CapsLock:"CapsLock",Escape:"Escape",Scape:"Space",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",Insert:"Insert",Delete:"Delete",Meta:"Meta",ContextMenu:"ContextMenu",ScrollLock:"ScrollLock"},keydownEvent:"keydown",keypressEvent:"keypress",keyupEvent:"keyup",keyAlt:"Alt",keyArrowDown:"ArrowDown",keyArrowLeft:"ArrowLeft",keyArrowRight:"ArrowRight",keyArrowUp:"ArrowUp",keyBackspace:"Backspace",keyCapsLock:"CapsLock",keyControl:"Control",keyDelete:"Delete",keyEnter:"Enter",keyEscape:"Escape",keyInsert:"Insert",keyMeta:"Meta",keyPause:"Pause",keyScrollLock:"ScrollLock",keyShift:"Shift",keySpace:"Space",keyTab:"Tab",offsetHeight:"offsetHeight",offsetWidth:"offsetWidth",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",userAgentData:l,userAgent:m,addClass:function(e,t){e.classList.add(t)},removeClass:function(e,t){e.classList.remove(t)},hasClass:function(e,t){return e.classList.contains(t)},on:b,off:h,one:w,dispatchEvent:function(e,t){return e.dispatchEvent(t)},distinct:function(e,t,n){return n.indexOf(e)===t},Data:z,Timer:{set:function(e,t,n,o){var i=O(e);i&&(o&&o.length?(X.has(i)||X.set(i,new Map),X.get(i).set(o,setTimeout(t,n))):X.set(i,setTimeout(t,n)))},get:function(e,t){var n=O(e);if(!n)return null;var o=X.get(n);return t&&t.length&&o&&o.get?o.get(t)||null:o||null},clear:function(e,t){var n=O(e);if(n)if(t&&t.length){var o=X.get(n);o&&o.get&&(clearTimeout(o.get(t)),o.delete(t),0===o.size&&X.delete(n))}else clearTimeout(X.get(n)),X.delete(n)}},getInstance:function(e,t){return z.get(e,t)},emulateAnimationEnd:function(e,t){var n=0,o=new Event("animationend"),i=x(e),r=I(e);if(i){var a=function(o){o.target===e&&(t.apply(e,[o]),e.removeEventListener("animationend",a),n=1)};e.addEventListener("animationend",a),setTimeout((function(){n||e.dispatchEvent(o)}),i+r+17)}else t.apply(e,[o])},emulateAnimationEndLegacy:function(e,t){var n=0,o=new Event(r),i=F(e),a=P(e);if(D&&i){var u=function(o){o.target===e&&(t.apply(e,[o]),e.removeEventListener(r,u),n=1)};e.addEventListener(r,u),setTimeout((function(){n||e.dispatchEvent(o)}),i+a+17)}else t.apply(e,[o])},emulateTransitionEnd:function(e,t){var n=0,o=new Event("transitionend"),i=R(e),r=B(e);if(i){var a=function(o){o.target===e&&(t.apply(e,[o]),e.removeEventListener("transitionend",a),n=1)};e.addEventListener("transitionend",a),setTimeout((function(){n||e.dispatchEvent(o)}),i+r+17)}else t.apply(e,[o])},emulateTransitionEndLegacy:function(e,t){var n=0,o=new Event(s),i=j(e),r=W(e);if(T&&i){var a=function(o){o.target===e&&(t.apply(e,[o]),e.removeEventListener(s,a),n=1)};e.addEventListener(s,a),setTimeout((function(){n||e.dispatchEvent(o)}),i+r+17)}else t.apply(e,[o])},isElementInScrollRange:function(e){var t=Y(e),n=t.top,o=t.bottom;return n<=Z(e).clientHeight&&o>=0},isElementInViewport:function(e){var t=Y(e,!0),n=t.top,o=t.left,i=t.bottom,r=t.right,a=Z(e),u=a.clientWidth,s=a.clientHeight;return n>=0&&o>=0&&i<=s&&r<=u},passiveHandler:{passive:!0},passiveHandlerLegacy:K,getElementAnimationDuration:x,getElementAnimationDurationLegacy:F,getElementAnimationDelay:I,getElementAnimationDelayLegacy:P,getElementTransitionDuration:R,getElementTransitionDurationLegacy:j,getElementTransitionDelay:B,getElementTransitionDelayLegacy:W,getNodeScroll:function(e){var t="scrollX"in e;return{x:t?e.scrollX:e.scrollLeft,y:t?e.scrollY:e.scrollTop}},getParentNode:function(e){return"HTML"===e.nodeName?e:e.assignedSlot||e.parentNode||($(e)?e.host:null)||Z(e)},getRectRelativeToOffsetParent:function(e,t,n){var o=t instanceof HTMLElement,i=Y(e,o&&_(t)),r={x:0,y:0};if(o){var a=Y(t,!0);r.x=a.x+t.clientLeft,r.y=a.y+t.clientTop}return{x:i.left+n.x-r.x,y:i.top+n.y-r.y,width:i.width,height:i.height}},getWindow:J,isArray:function(e){return Array.isArray(e)},isString:function(e){return"string"==typeof e},isCustomElement:ee,isElement:function(e){return e instanceof Element},isNode:function(e){return e instanceof Node},isHTMLElement:function(e){return e instanceof HTMLElement},isHTMLImageElement:function(e){return e instanceof HTMLImageElement},isSVGElement:function(e){return e instanceof SVGElement},isNodeList:function(e){return e instanceof NodeList},isHTMLCollection:function(e){return e instanceof HTMLCollection},isScaledElement:_,isTableElement:function(e){return["TABLE","TD","TH"].includes(e.tagName)},isShadowRoot:$,isDocument:function(e){return e instanceof Document},isElementsArray:function(e){return Array.isArray(e)&&e.every((function(e){return[HTMLElement,Element].some((function(t){return e instanceof t}))}))},isWindow:function(e){return e instanceof Window},isMedia:function(e){return e&&[SVGElement,HTMLImageElement,HTMLVideoElement].some((function(t){return e instanceof t}))},isRTL:function(e){return"rtl"===Z(e).dir},elementNodes:M,parentNodes:S,closest:function e(t,n){return t?t.closest(n)||e(t.getRootNode().host,n):null},querySelector:O,getCustomElements:function(e){var t=e&&S.some((function(t){return e instanceof t}))?e:N();return[].concat(t.querySelectorAll("*")).filter(ee)},querySelectorAll:function(e,t){return(t&&S.some((function(e){return t instanceof e}))?t:N()).querySelectorAll(e)},getElementsByClassName:function(e,t){return(t&&S.some((function(e){return t instanceof e}))?t:N()).getElementsByClassName(e)},getElementsByTagName:function(e,t){return(t&&S.some((function(e){return t instanceof e}))?t:N()).getElementsByTagName(e)},normalizeValue:q,normalizeOptions:function(e,t,n,o){var i=Object.assign({},e.dataset),r={},a={};return U(i).forEach((function(e){var t=o&&e.includes(o)?e.replace(o,"").replace(/[A-Z]/,(function(e){return e.toLowerCase()})):e;a[t]=q(i[e])})),U(n).forEach((function(e){n[e]=q(n[e])})),U(t).forEach((function(e){r[e]=e in n?n[e]:e in a?a[e]:t[e]})),r},tryWrapper:function(e,t){try{e()}catch(e){throw TypeError(t+" "+e)}},reflow:function(e){return e.offsetHeight},noop:function(){},focus:function(e){return e.focus()},getUID:function(e,t){Q+=1;var n=V.get(e),o=Q;return n?o=t&&t.length&&n.get&&n.get(t)?n.get(t):n:t&&t.length?(n||(V.set(e,new Map),n=V.get(e)),n.set(t,o)):V.set(e,o),o},ArrayFrom:function(e){return Array.from(e)},Float32ArrayFrom:function(e){return Float32Array.from(Array.from(e))},Float64ArrayFrom:function(e){return Float64Array.from(Array.from(e))},ObjectAssign:G,ObjectKeys:U,ObjectValues:function(e){return Object.values(e)},getBoundingClientRect:Y,getDocument:N,getDocumentBody:function(e){return N(e).body},getDocumentElement:Z,getDocumentHead:function(e){return N(e).head},getElementStyle:H,setElementStyle:function(e,t){G(e.style,t)},hasAttribute:function(e,t){return e.hasAttribute(t)},hasAttributeNS:function(e,t,n){return e.hasAttributeNS(n||null,t)},getAttribute:function(e,t){return e.getAttribute(t)},getAttributeNS:function(e,t,n){return e.getAttributeNS(n||null,t)},setAttribute:function(e,t,n){return e.setAttribute(t,n)},setAttributeNS:function(e,t,n,o){return e.setAttributeNS(o||null,t,n)},removeAttribute:function(e,t){return e.removeAttribute(t)},removeAttributeNS:function(e,t,n){return e.removeAttributeNS(n||null,t)},Version:"0.3.0alpha15"}}));
// shorter-js v0.3.0alpha16 | dnp_theme © 2022 | MIT-License
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).SHORTER=t()}(this,(function(){"use strict";var e={DOMContentLoaded:"DOMContentLoaded",DOMMouseScroll:"DOMMouseScroll",abort:"abort",beforeunload:"beforeunload",blur:"blur",change:"change",click:"click",contextmenu:"contextmenu",dblclick:"dblclick",error:"error",focus:"focus",focusin:"focusin",focusout:"focusout",gesturechange:"gesturechange",gestureend:"gestureend",gesturestart:"gesturestart",hover:"hover",keydown:"keydown",keypress:"keypress",keyup:"keyup",load:"load",mousedown:"mousedown",mousemove:"mousemove",mousein:"mousein",mouseout:"mouseout",mouseenter:"mouseenter",mouseleave:"mouseleave",mouseover:"mouseover",mouseup:"mouseup",mousewheel:"mousewheel",move:"move",orientationchange:"orientationchange",pointercancel:"pointercancel",pointerdown:"pointerdown",pointerleave:"pointerleave",pointermove:"pointermove",pointerup:"pointerup",readystatechange:"readystatechange",reset:"reset",resize:"resize",scroll:"scroll",select:"select",selectend:"selectend",selectstart:"selectstart",submit:"submit",touchcancel:"touchcancel",touchend:"touchend",touchmove:"touchmove",touchstart:"touchstart",unload:"unload"},t="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],n=document.head,o="webkitAnimation"in n.style?"webkitAnimationDuration":"animationDuration",i="webkitAnimation"in n.style?"webkitAnimationDelay":"animationDelay",r="webkitAnimation"in n.style?"webkitAnimationName":"animationName",a="webkitAnimation"in n.style?"webkitAnimationEnd":"animationend",u="webkitTransition"in n.style?"webkitTransitionDuration":"transitionDuration",s="webkitTransition"in n.style?"webkitTransitionDelay":"transitionDelay",c="webkitTransition"in n.style?"webkitTransitionEnd":"transitionend",l="webkitTransition"in n.style?"webkitTransitionProperty":"transitionProperty",m=navigator.userAgentData,f=navigator.userAgent,d=/iPhone|iPad|iPod|Android/i,v=m?m.brands.some((function(e){return d.test(e.brand)})):d.test(f),g=/(iPhone|iPod|iPad)/,p=m?m.brands.some((function(e){return g.test(e.brand)})):g.test(f),y=!!f&&f.includes("Firefox"),E="webkitPerspective"in n.style||"perspective"in n.style;function b(e,t,n,o){var i=o||!1;e.addEventListener(t,n,i)}function h(e,t,n,o){var i=o||!1;e.removeEventListener(t,n,i)}function w(e,t,n,o){var i=function(r){r.target===e&&(n.apply(e,[r]),h(e,t,i,o))};b(e,t,i,o)}var A=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0}});w(document,"DOMContentLoaded",(function(){}),t)}catch(e){throw Error("Passive events are not supported")}return e}(),k="webkitTransform"in n.style||"transform"in n.style,L="ontouchstart"in window||"msMaxTouchPoints"in navigator,D="webkitAnimation"in n.style||"animation"in n.style,T="webkitTransition"in n.style||"transition"in n.style;function N(e){return e instanceof HTMLElement?e.ownerDocument:e instanceof Window?e.document:window.document}var S=[Document,Node,Element,HTMLElement],M=[Element,HTMLElement];function O(e,t){var n="string"==typeof e,o=t&&S.some((function(e){return t instanceof e}))?t:N();return!n&&[].concat(M).some((function(t){return e instanceof t}))?e:n?o.querySelector(e):null}var C=new Map,z={set:function(e,t,n){var o=O(e);o&&(C.has(t)||C.set(t,new Map),C.get(t).set(o,n))},getAllFor:function(e){return C.get(e)||null},get:function(e,t){var n=O(e),o=z.getAllFor(t);return n&&o&&o.get(n)||null},remove:function(e,t){var n=O(e),o=C.get(t);o&&n&&(o.delete(n),0===o.size&&C.delete(t))}};function H(e,t){var n=getComputedStyle(e);return t in n?n[t]:""}function I(e){var t=H(e,"animationName"),n=H(e,"animationDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function x(e){var t=H(e,"animationName"),n=H(e,"animationDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function P(e){var t=H(e,r),n=H(e,i),o=n.includes("ms")?1:1e3,a=D&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(a)?0:a}function F(e){var t=H(e,r),n=H(e,o),i=n.includes("ms")?1:1e3,a=D&&t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(a)?0:a}function B(e){var t=H(e,"transitionProperty"),n=H(e,"transitionDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function R(e){var t=H(e,"transitionProperty"),n=H(e,"transitionDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function W(e){var t=H(e,l),n=H(e,s),o=n.includes("ms")?1:1e3,i=T&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function j(e){var t=H(e,l),n=H(e,u),o=n.includes("ms")?1:1e3,i=T&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}var Q=1,V=new Map;function q(e){return"true"===e||"false"!==e&&(Number.isNaN(+e)?""===e||"null"===e?null:e:+e)}var U=function(e){return Object.keys(e)};var G=function(e,t){return Object.assign(e,t)},K=!!A&&{passive:!0},X=new Map;function Y(e,t){var n=e.getBoundingClientRect(),o=n.width,i=n.height,r=n.top,a=n.right,u=n.bottom,s=n.left,c=1,l=1;if(t&&e instanceof HTMLElement){var m=e.offsetWidth,f=e.offsetHeight;c=m>0&&Math.round(o)/m||1,l=f>0&&Math.round(i)/f||1}return{width:o/c,height:i/l,top:r/l,right:a/c,bottom:u/l,left:s/c,x:s/c,y:r/l}}function Z(e){return N(e).documentElement}function J(e){if(null==e)return window;if(!(e instanceof Window)){var t=e.ownerDocument;return t&&t.defaultView||window}return e}var $=function(e){return e instanceof J(e).ShadowRoot||e instanceof ShadowRoot};function _(e){var t=Y(e),n=t.width,o=t.height,i=e.offsetWidth,r=e.offsetHeight;return Math.round(n)!==i||Math.round(o)!==r}var ee=function(e){return e&&!!e.shadowRoot};return{ariaChecked:"aria-checked",ariaDescribedBy:"aria-describedby",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",ariaModal:"aria-modal",ariaPressed:"aria-pressed",ariaSelected:"aria-selected",nativeEvents:e,abortEvent:"abort",blurEvent:"blur",moveEvent:"move",changeEvent:"change",errorEvent:"error",resetEvent:"reset",resizeEvent:"resize",scrollEvent:"scroll",submitEvent:"submit",loadEvent:"load",unloadEvent:"unload",readystatechangeEvent:"readystatechange",beforeunloadEvent:"beforeunload",orientationchangeEvent:"orientationchange",contextmenuEvent:"contextmenu",DOMContentLoadedEvent:"DOMContentLoaded",DOMMouseScrollEvent:"DOMMouseScroll",selectEvent:"select",selectendEvent:"selectend",selectstartEvent:"selectstart",mouseClickEvents:{down:"mousedown",up:"mouseup"},mouseclickEvent:"click",mousedblclickEvent:"dblclick",mousedownEvent:"mousedown",mouseupEvent:"mouseup",mousehoverEvent:"hover",mouseHoverEvents:t,mouseenterEvent:"mouseenter",mouseleaveEvent:"mouseleave",mouseinEvent:"mousein",mouseoutEvent:"mouseout",mouseoverEvent:"mouseover",mousemoveEvent:"mousemove",mousewheelEvent:"mousewheel",mouseSwipeEvents:{start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"},touchEvents:{start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},touchstartEvent:"touchstart",touchmoveEvent:"touchmove",touchcancelEvent:"touchcancel",touchendEvent:"touchend",pointercancelEvent:"pointercancel",pointerdownEvent:"pointerdown",pointerleaveEvent:"pointerleave",pointermoveEvent:"pointermove",pointerupEvent:"pointerup",focusEvents:{in:"focusin",out:"focusout"},focusEvent:"focus",focusinEvent:"focusin",focusoutEvent:"focusout",gesturechangeEvent:"gesturechange",gestureendEvent:"gestureend",gesturestartEvent:"gesturestart",bezierEasings:{linear:"linear",easingSinusoidalIn:"cubic-bezier(0.47,0,0.745,0.715)",easingSinusoidalOut:"cubic-bezier(0.39,0.575,0.565,1)",easingSinusoidalInOut:"cubic-bezier(0.445,0.05,0.55,0.95)",easingQuadraticIn:"cubic-bezier(0.550,0.085,0.680,0.530)",easingQuadraticOut:"cubic-bezier(0.250,0.460,0.450,0.940)",easingQuadraticInOut:"cubic-bezier(0.455,0.030,0.515,0.955)",easingCubicIn:"cubic-bezier(0.55,0.055,0.675,0.19)",easingCubicOut:"cubic-bezier(0.215,0.61,0.355,1)",easingCubicInOut:"cubic-bezier(0.645,0.045,0.355,1)",easingQuarticIn:"cubic-bezier(0.895,0.03,0.685,0.22)",easingQuarticOut:"cubic-bezier(0.165,0.84,0.44,1)",easingQuarticInOut:"cubic-bezier(0.77,0,0.175,1)",easingQuinticIn:"cubic-bezier(0.755,0.05,0.855,0.06)",easingQuinticOut:"cubic-bezier(0.23,1,0.32,1)",easingQuinticInOut:"cubic-bezier(0.86,0,0.07,1)",easingExponentialIn:"cubic-bezier(0.95,0.05,0.795,0.035)",easingExponentialOut:"cubic-bezier(0.19,1,0.22,1)",easingExponentialInOut:"cubic-bezier(1,0,0,1)",easingCircularIn:"cubic-bezier(0.6,0.04,0.98,0.335)",easingCircularOut:"cubic-bezier(0.075,0.82,0.165,1)",easingCircularInOut:"cubic-bezier(0.785,0.135,0.15,0.86)",easingBackIn:"cubic-bezier(0.6,-0.28,0.735,0.045)",easingBackOut:"cubic-bezier(0.175,0.885,0.32,1.275)",easingBackInOut:"cubic-bezier(0.68,-0.55,0.265,1.55)"},animationDuration:"animationDuration",animationDurationLegacy:o,animationDelay:"animationDelay",animationDelayLegacy:i,animationName:"animationName",animationNameLegacy:r,animationEndEvent:"animationend",animationEndEventLegacy:a,transitionDuration:"transitionDuration",transitionDurationLegacy:u,transitionDelay:"transitionDelay",transitionDelayLegacy:s,transitionEndEvent:"transitionend",transitionEndEventLegacy:c,transitionProperty:"transitionProperty",transitionPropertyLegacy:l,isMobile:v,isApple:p,isFirefox:y,support3DTransform:E,supportPassive:A,supportTransform:k,supportTouch:L,supportAnimation:D,supportTransition:T,addEventListener:"addEventListener",removeEventListener:"removeEventListener",keyboardEventKeys:{Backspace:"Backspace",Tab:"Tab",Enter:"Enter",Shift:"Shift",Control:"Control",Alt:"Alt",Pause:"Pause",CapsLock:"CapsLock",Escape:"Escape",Scape:"Space",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",Insert:"Insert",Delete:"Delete",Meta:"Meta",ContextMenu:"ContextMenu",ScrollLock:"ScrollLock"},keydownEvent:"keydown",keypressEvent:"keypress",keyupEvent:"keyup",keyAlt:"Alt",keyArrowDown:"ArrowDown",keyArrowLeft:"ArrowLeft",keyArrowRight:"ArrowRight",keyArrowUp:"ArrowUp",keyBackspace:"Backspace",keyCapsLock:"CapsLock",keyControl:"Control",keyDelete:"Delete",keyEnter:"Enter",keyEscape:"Escape",keyInsert:"Insert",keyMeta:"Meta",keyPause:"Pause",keyScrollLock:"ScrollLock",keyShift:"Shift",keySpace:"Space",keyTab:"Tab",offsetHeight:"offsetHeight",offsetWidth:"offsetWidth",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",userAgentData:m,userAgent:f,addClass:function(e,t){e.classList.add(t)},removeClass:function(e,t){e.classList.remove(t)},hasClass:function(e,t){return e.classList.contains(t)},on:b,off:h,one:w,dispatchEvent:function(e,t){return e.dispatchEvent(t)},distinct:function(e,t,n){return n.indexOf(e)===t},Data:z,Timer:{set:function(e,t,n,o){var i=O(e);i&&(o&&o.length?(X.has(i)||X.set(i,new Map),X.get(i).set(o,setTimeout(t,n))):X.set(i,setTimeout(t,n)))},get:function(e,t){var n=O(e);if(!n)return null;var o=X.get(n);return t&&t.length&&o&&o.get?o.get(t)||null:o||null},clear:function(e,t){var n=O(e);if(n)if(t&&t.length){var o=X.get(n);o&&o.get&&(clearTimeout(o.get(t)),o.delete(t),0===o.size&&X.delete(n))}else clearTimeout(X.get(n)),X.delete(n)}},getInstance:function(e,t){return z.get(e,t)},emulateAnimationEnd:function(e,t){var n=0,o=new Event("animationend"),i=x(e),r=I(e);if(i){var a=function(o){o.target===e&&(t.apply(e,[o]),h(e,"animationend",a),n=1)};b(e,"animationend",a),setTimeout((function(){n||e.dispatchEvent(o)}),i+r+17)}else t.apply(e,[o])},emulateAnimationEndLegacy:function(e,t){var n=0,o=new Event(a),i=F(e),r=P(e);if(D&&i){var u=function(o){o.target===e&&(t.apply(e,[o]),e.removeEventListener(a,u),n=1)};e.addEventListener(a,u),setTimeout((function(){n||e.dispatchEvent(o)}),i+r+17)}else t.apply(e,[o])},emulateTransitionEnd:function(e,t){var n=0,o=new Event("transitionend"),i=R(e),r=B(e);if(i){var a=function(o){o.target===e&&(t.apply(e,[o]),h(e,"transitionend",a),n=1)};b(e,"transitionend",a),setTimeout((function(){n||e.dispatchEvent(o)}),i+r+17)}else t.apply(e,[o])},emulateTransitionEndLegacy:function(e,t){var n=0,o=new Event(c),i=j(e),r=W(e);if(T&&i){var a=function(o){o.target===e&&(t.apply(e,[o]),e.removeEventListener(c,a),n=1)};e.addEventListener(c,a),setTimeout((function(){n||e.dispatchEvent(o)}),i+r+17)}else t.apply(e,[o])},isElementInScrollRange:function(e){var t=Y(e),n=t.top,o=t.bottom;return n<=Z(e).clientHeight&&o>=0},isElementInViewport:function(e){var t=Y(e,!0),n=t.top,o=t.left,i=t.bottom,r=t.right,a=Z(e),u=a.clientWidth,s=a.clientHeight;return n>=0&&o>=0&&i<=s&&r<=u},passiveHandler:{passive:!0},passiveHandlerLegacy:K,getElementAnimationDuration:x,getElementAnimationDurationLegacy:F,getElementAnimationDelay:I,getElementAnimationDelayLegacy:P,getElementTransitionDuration:R,getElementTransitionDurationLegacy:j,getElementTransitionDelay:B,getElementTransitionDelayLegacy:W,getNodeScroll:function(e){var t="scrollX"in e;return{x:t?e.scrollX:e.scrollLeft,y:t?e.scrollY:e.scrollTop}},getParentNode:function(e){return"HTML"===e.nodeName?e:e.assignedSlot||e.parentNode||($(e)?e.host:null)||Z(e)},getRectRelativeToOffsetParent:function(e,t,n){var o=t instanceof HTMLElement,i=Y(e,o&&_(t)),r={x:0,y:0};if(o){var a=Y(t,!0);r.x=a.x+t.clientLeft,r.y=a.y+t.clientTop}return{x:i.left+n.x-r.x,y:i.top+n.y-r.y,width:i.width,height:i.height}},getWindow:J,isArray:function(e){return Array.isArray(e)},isString:function(e){return"string"==typeof e},isCustomElement:ee,isElement:function(e){return e instanceof Element},isNode:function(e){return e instanceof Node},isHTMLElement:function(e){return e instanceof HTMLElement},isHTMLImageElement:function(e){return e instanceof HTMLImageElement},isSVGElement:function(e){return e instanceof SVGElement},isNodeList:function(e){return e instanceof NodeList},isHTMLCollection:function(e){return e instanceof HTMLCollection},isScaledElement:_,isTableElement:function(e){return["TABLE","TD","TH"].includes(e.tagName)},isShadowRoot:$,isDocument:function(e){return e instanceof Document},isElementsArray:function(e){return Array.isArray(e)&&e.every((function(e){return[HTMLElement,Element].some((function(t){return e instanceof t}))}))},isWindow:function(e){return e instanceof Window},isMedia:function(e){return e&&[SVGElement,HTMLImageElement,HTMLVideoElement].some((function(t){return e instanceof t}))},isRTL:function(e){return"rtl"===Z(e).dir},elementNodes:M,parentNodes:S,closest:function e(t,n){return t?t.closest(n)||e(t.getRootNode().host,n):null},querySelector:O,getCustomElements:function(e){var t=e&&S.some((function(t){return e instanceof t}))?e:N();return[].concat(t.querySelectorAll("*")).filter(ee)},querySelectorAll:function(e,t){return(t&&S.some((function(e){return t instanceof e}))?t:N()).querySelectorAll(e)},getElementsByClassName:function(e,t){return(t&&S.some((function(e){return t instanceof e}))?t:N()).getElementsByClassName(e)},getElementsByTagName:function(e,t){return(t&&S.some((function(e){return t instanceof e}))?t:N()).getElementsByTagName(e)},normalizeValue:q,normalizeOptions:function(e,t,n,o){var i=Object.assign({},e.dataset),r={},a={};return U(i).forEach((function(e){var t=o&&e.includes(o)?e.replace(o,"").replace(/[A-Z]/,(function(e){return e.toLowerCase()})):e;a[t]=q(i[e])})),U(n).forEach((function(e){n[e]=q(n[e])})),U(t).forEach((function(e){r[e]=e in n?n[e]:e in a?a[e]:t[e]})),r},tryWrapper:function(e,t){try{e()}catch(e){throw TypeError(t+" "+e)}},reflow:function(e){return e.offsetHeight},noop:function(){},focus:function(e){return e.focus()},getUID:function(e,t){Q+=1;var n=V.get(e),o=Q;return n?o=t&&t.length&&n.get&&n.get(t)?n.get(t):n:t&&t.length?(n||(V.set(e,new Map),n=V.get(e)),n.set(t,o)):V.set(e,o),o},ArrayFrom:function(e){return Array.from(e)},Float32ArrayFrom:function(e){return Float32Array.from(Array.from(e))},Float64ArrayFrom:function(e){return Float64Array.from(Array.from(e))},ObjectAssign:G,ObjectKeys:U,ObjectValues:function(e){return Object.values(e)},getBoundingClientRect:Y,getDocument:N,getDocumentBody:function(e){return N(e).body},getDocumentElement:Z,getDocumentHead:function(e){return N(e).head},getElementStyle:H,setElementStyle:function(e,t){G(e.style,t)},hasAttribute:function(e,t){return e.hasAttribute(t)},hasAttributeNS:function(e,t,n){return e.hasAttributeNS(n||null,t)},getAttribute:function(e,t){return e.getAttribute(t)},getAttributeNS:function(e,t,n){return e.getAttributeNS(n||null,t)},setAttribute:function(e,t,n){return e.setAttribute(t,n)},setAttributeNS:function(e,t,n,o){return e.setAttributeNS(o||null,t,n)},removeAttribute:function(e,t){return e.removeAttribute(t)},removeAttributeNS:function(e,t,n){return e.removeAttributeNS(n||null,t)},Version:"0.3.0alpha16"}}));
{
"name": "shorter-js",
"version": "0.3.0alpha15",
"version": "0.3.0alpha16",
"description": "A small ES6+ library with various JavaScript tools useful for creating light libraries.",

@@ -5,0 +5,0 @@ "main": "dist/shorter-js.min.js",

import animationEndEvent from '../strings/animationEndEvent';
import getElementAnimationDelay from '../get/getElementAnimationDelay';
import getElementAnimationDuration from '../get/getElementAnimationDuration';
import on from '../event/on';
import off from '../event/off';

@@ -21,3 +23,3 @@ /**

* Wrap the handler in on -> off callback
* @param {Event} e Event object
* @param {AnimationEvent} e Event object
*/

@@ -27,7 +29,7 @@ const animationEndWrapper = (e) => {

handler.apply(element, [e]);
element.removeEventListener(animationEndEvent, animationEndWrapper);
off(element, animationEndEvent, animationEndWrapper);
called = 1;
}
};
element.addEventListener(animationEndEvent, animationEndWrapper);
on(element, animationEndEvent, animationEndWrapper);
setTimeout(() => {

@@ -34,0 +36,0 @@ if (!called) element.dispatchEvent(endEvent);

import transitionEndEvent from '../strings/transitionEndEvent';
import getElementTransitionDelay from '../get/getElementTransitionDelay';
import getElementTransitionDuration from '../get/getElementTransitionDuration';
import on from '../event/on';
import off from '../event/off';

@@ -21,3 +23,3 @@ /**

* Wrap the handler in on -> off callback
* @param {Event} e Event object
* @param {TransitionEvent} e Event object
*/

@@ -27,7 +29,7 @@ const transitionEndWrapper = (e) => {

handler.apply(element, [e]);
element.removeEventListener(transitionEndEvent, transitionEndWrapper);
off(element, transitionEndEvent, transitionEndWrapper);
called = 1;
}
};
element.addEventListener(transitionEndEvent, transitionEndWrapper);
on(element, transitionEndEvent, transitionEndWrapper);
setTimeout(() => {

@@ -34,0 +36,0 @@ if (!called) element.dispatchEvent(endEvent);

@@ -0,1 +1,3 @@

import documentHead from '../blocks/documentHead';
/**

@@ -5,3 +7,3 @@ * A global namespace for 'animationDelay' string.

*/
const animationDelay = 'webkitAnimation' in document.head.style ? 'webkitAnimationDelay' : 'animationDelay';
const animationDelay = 'webkitAnimation' in documentHead.style ? 'webkitAnimationDelay' : 'animationDelay';
export default animationDelay;

@@ -0,1 +1,3 @@

import documentHead from '../blocks/documentHead';
/**

@@ -5,3 +7,3 @@ * A global namespace for 'animationDuration' string.

*/
const animationDuration = 'webkitAnimation' in document.head.style ? 'webkitAnimationDuration' : 'animationDuration';
const animationDuration = 'webkitAnimation' in documentHead.style ? 'webkitAnimationDuration' : 'animationDuration';
export default animationDuration;

@@ -0,1 +1,3 @@

import documentHead from '../blocks/documentHead';
/**

@@ -5,3 +7,3 @@ * A global namespace for 'animationend' string.

*/
const animationEndEvent = 'webkitAnimation' in document.head.style ? 'webkitAnimationEnd' : 'animationend';
const animationEndEvent = 'webkitAnimation' in documentHead.style ? 'webkitAnimationEnd' : 'animationend';
export default animationEndEvent;

@@ -0,1 +1,3 @@

import documentHead from '../blocks/documentHead';
/**

@@ -5,3 +7,3 @@ * A global namespace for 'animationName' string.

*/
const animationName = 'webkitAnimation' in document.head.style ? 'webkitAnimationName' : 'animationName';
const animationName = 'webkitAnimation' in documentHead.style ? 'webkitAnimationName' : 'animationName';
export default animationName;

@@ -0,1 +1,3 @@

import documentHead from '../blocks/documentHead';
/**

@@ -5,3 +7,3 @@ * A global namespace for 'transitionDelay' string.

*/
const transitionDelay = 'webkitTransition' in document.head.style ? 'webkitTransitionDelay' : 'transitionDelay';
const transitionDelay = 'webkitTransition' in documentHead.style ? 'webkitTransitionDelay' : 'transitionDelay';
export default transitionDelay;

@@ -0,1 +1,3 @@

import documentHead from '../blocks/documentHead';
/**

@@ -5,3 +7,3 @@ * A global namespace for 'transitionDuration' string.

*/
const transitionDuration = 'webkitTransition' in document.head.style ? 'webkitTransitionDuration' : 'transitionDuration';
const transitionDuration = 'webkitTransition' in documentHead.style ? 'webkitTransitionDuration' : 'transitionDuration';
export default transitionDuration;

@@ -0,1 +1,3 @@

import documentHead from '../blocks/documentHead';
/**

@@ -5,3 +7,3 @@ * A global namespace for 'transitionend' string.

*/
const transitionEndEvent = 'webkitTransition' in document.head.style ? 'webkitTransitionEnd' : 'transitionend';
const transitionEndEvent = 'webkitTransition' in documentHead.style ? 'webkitTransitionEnd' : 'transitionend';
export default transitionEndEvent;

@@ -0,1 +1,3 @@

import documentHead from '../blocks/documentHead';
/**

@@ -8,4 +10,4 @@ * A global namespace for:

*/
const transitionProperty = 'webkitTransition' in document.head.style ? 'webkitTransitionProperty' : 'transitionProperty';
const transitionProperty = 'webkitTransition' in documentHead.style ? 'webkitTransitionProperty' : 'transitionProperty';
export default transitionProperty;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc