@thednp/shorty 1.0.3 → 2.0.0-alpha10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (353) hide show
  1. package/.eslintrc.cjs +224 -0
  2. package/.lgtm.yml +9 -0
  3. package/.prettierrc.json +15 -0
  4. package/README.md +195 -198
  5. package/cypress/e2e/att.cy.ts +46 -0
  6. package/cypress/e2e/boolean.cy.ts +44 -0
  7. package/cypress/e2e/class.cy.ts +28 -0
  8. package/cypress/e2e/event.cy.ts +51 -0
  9. package/cypress/e2e/get.cy.ts +168 -0
  10. package/cypress/e2e/is.cy.ts +233 -0
  11. package/cypress/e2e/misc.cy.ts +331 -0
  12. package/cypress/e2e/selectors.cy.ts +85 -0
  13. package/cypress/fixtures/custom-elem.js +18 -0
  14. package/cypress/plugins/esbuild-istanbul.ts +50 -0
  15. package/cypress/plugins/tsCompile.ts +34 -0
  16. package/cypress/support/commands.ts +37 -0
  17. package/cypress/support/e2e.ts +21 -0
  18. package/cypress/support/index.js +22 -0
  19. package/cypress/test.html +63 -0
  20. package/cypress.config.ts +30 -0
  21. package/dist/shorty.cjs +2 -0
  22. package/dist/shorty.cjs.map +1 -0
  23. package/dist/shorty.d.ts +1502 -0
  24. package/dist/shorty.js +2 -2628
  25. package/dist/shorty.js.map +1 -0
  26. package/dist/shorty.mjs +552 -0
  27. package/dist/shorty.mjs.map +1 -0
  28. package/dts.config.ts +22 -0
  29. package/package.json +33 -38
  30. package/src/attr/getAttribute.ts +11 -0
  31. package/src/attr/getAttributeNS.ts +12 -0
  32. package/src/attr/hasAttribute.ts +10 -0
  33. package/src/attr/hasAttributeNS.ts +12 -0
  34. package/src/attr/removeAttribute.ts +9 -0
  35. package/src/attr/removeAttributeNS.ts +11 -0
  36. package/src/attr/setAttribute.ts +11 -0
  37. package/src/attr/setAttributeNS.ts +12 -0
  38. package/src/blocks/{documentBody.js → documentBody.ts} +0 -0
  39. package/src/blocks/{documentElement.js → documentElement.ts} +0 -0
  40. package/src/blocks/{documentHead.js → documentHead.ts} +0 -0
  41. package/src/boolean/isApple.ts +14 -0
  42. package/src/boolean/{isFirefox.js → isFirefox.ts} +2 -3
  43. package/src/boolean/{isMobile.js → isMobile.ts} +1 -2
  44. package/src/boolean/support3DTransform.ts +8 -0
  45. package/src/boolean/supportAnimation.ts +8 -0
  46. package/src/boolean/{supportPassive.js → supportPassive.ts} +3 -3
  47. package/src/boolean/supportTouch.ts +7 -0
  48. package/src/boolean/supportTransform.ts +8 -0
  49. package/src/boolean/supportTransition.ts +8 -0
  50. package/src/class/addClass.ts +11 -0
  51. package/src/class/hasClass.ts +11 -0
  52. package/src/class/removeClass.ts +11 -0
  53. package/src/event/off.ts +14 -0
  54. package/src/event/on.ts +14 -0
  55. package/src/event/one.ts +25 -0
  56. package/src/get/{getBoundingClientRect.js → getBoundingClientRect.ts} +14 -12
  57. package/src/get/{getDocument.js → getDocument.ts} +11 -7
  58. package/src/get/getDocumentBody.ts +13 -0
  59. package/src/get/getDocumentElement.ts +13 -0
  60. package/src/get/getDocumentHead.ts +12 -0
  61. package/src/get/{getElementAnimationDelay.js → getElementAnimationDelay.ts} +10 -9
  62. package/src/get/{getElementAnimationDuration.js → getElementAnimationDuration.ts} +10 -8
  63. package/src/get/getElementStyle.ts +25 -0
  64. package/src/get/{getElementTransitionDelay.js → getElementTransitionDelay.ts} +12 -8
  65. package/src/get/{getElementTransitionDuration.js → getElementTransitionDuration.ts} +12 -8
  66. package/src/get/{getNodeScroll.js → getNodeScroll.ts} +9 -5
  67. package/src/get/{getParentNode.js → getParentNode.ts} +11 -6
  68. package/src/get/{getRectRelativeToOffsetParent.js → getRectRelativeToOffsetParent.ts} +15 -7
  69. package/src/get/getUID.ts +42 -0
  70. package/src/get/{getWindow.js → getWindow.ts} +9 -6
  71. package/src/{index.js → index.ts} +37 -43
  72. package/src/interface/boundingClientRect.d.ts +10 -0
  73. package/src/interface/css4Declaration.d.ts +4 -0
  74. package/src/interface/customElement.d.ts +8 -0
  75. package/src/interface/navigatorUA.d.ts +15 -0
  76. package/src/interface/offsetRect.d.ts +6 -0
  77. package/src/interface/originalEvent.d.ts +4 -0
  78. package/src/is/isArray.ts +9 -0
  79. package/src/is/isCanvas.ts +13 -0
  80. package/src/is/isCustomElement.ts +13 -0
  81. package/src/is/isDocument.ts +13 -0
  82. package/src/is/{isElement.js → isElement.ts} +10 -5
  83. package/src/is/{isElementInScrollRange.js → isElementInScrollRange.ts} +4 -4
  84. package/src/is/{isElementInViewport.js → isElementInViewport.ts} +6 -12
  85. package/src/is/isElementsArray.ts +13 -0
  86. package/src/is/isFunction.ts +10 -0
  87. package/src/is/isHTMLCollection.ts +12 -0
  88. package/src/is/isHTMLElement.ts +13 -0
  89. package/src/is/isHTMLImageElement.ts +12 -0
  90. package/src/is/isJSON.ts +20 -0
  91. package/src/is/isMap.ts +11 -0
  92. package/src/is/isMedia.ts +20 -0
  93. package/src/is/isNode.ts +17 -0
  94. package/src/is/isNodeList.ts +13 -0
  95. package/src/is/isNumber.ts +9 -0
  96. package/src/is/isObject.ts +10 -0
  97. package/src/is/isRTL.ts +11 -0
  98. package/src/is/isSVGElement.ts +13 -0
  99. package/src/is/{isScaledElement.js → isScaledElement.ts} +9 -7
  100. package/src/is/isShadowRoot.ts +12 -0
  101. package/src/is/isString.ts +9 -0
  102. package/src/is/isTableElement.ts +14 -0
  103. package/src/is/isWeakMap.ts +11 -0
  104. package/src/is/isWindow.ts +13 -0
  105. package/src/misc/ArrayFrom.ts +11 -0
  106. package/src/misc/Float32ArrayFrom.ts +10 -0
  107. package/src/misc/Float64ArrayFrom.ts +10 -0
  108. package/src/misc/ObjectAssign.ts +43 -0
  109. package/src/misc/ObjectEntries.ts +11 -0
  110. package/src/misc/ObjectHasOwn.ts +17 -0
  111. package/src/misc/ObjectKeys.ts +10 -0
  112. package/src/misc/ObjectValues.ts +11 -0
  113. package/src/misc/createCustomEvent.ts +28 -0
  114. package/src/misc/createElement.ts +40 -0
  115. package/src/misc/createElementNS.ts +45 -0
  116. package/src/misc/data.ts +82 -0
  117. package/src/misc/dispatchEvent.ts +9 -0
  118. package/src/misc/distinct.ts +18 -0
  119. package/src/misc/{emulateAnimationEnd.js → emulateAnimationEnd.ts} +8 -9
  120. package/src/misc/{emulateTransitionEnd.js → emulateTransitionEnd.ts} +8 -9
  121. package/src/misc/focus.ts +9 -0
  122. package/src/misc/getInstance.ts +9 -0
  123. package/src/misc/{noop.js → noop.ts} +4 -1
  124. package/src/misc/normalizeOptions.ts +55 -0
  125. package/src/misc/normalizeValue.ts +30 -0
  126. package/src/misc/{passiveHandler.js → passiveHandler.ts} +1 -2
  127. package/src/misc/reflow.ts +9 -0
  128. package/src/misc/setElementStyle.ts +23 -0
  129. package/src/misc/timer.ts +84 -0
  130. package/src/misc/toLowerCase.ts +9 -0
  131. package/src/misc/toUpperCase.ts +9 -0
  132. package/src/selectors/closest.ts +20 -0
  133. package/src/selectors/{getCustomElements.js → getCustomElements.ts} +8 -4
  134. package/src/selectors/getElementById.ts +16 -0
  135. package/src/selectors/getElementsByClassName.ts +22 -0
  136. package/src/selectors/getElementsByTagName.ts +20 -0
  137. package/src/selectors/matches.ts +10 -0
  138. package/src/selectors/querySelector.ts +22 -0
  139. package/src/selectors/{querySelectorAll.js → querySelectorAll.ts} +7 -5
  140. package/src/strings/{DOMContentLoadedEvent.js → DOMContentLoadedEvent.ts} +0 -1
  141. package/src/strings/{DOMMouseScrollEvent.js → DOMMouseScrollEvent.ts} +0 -1
  142. package/src/strings/{abortEvent.js → abortEvent.ts} +0 -1
  143. package/src/strings/{addEventListener.js → addEventListener.ts} +0 -1
  144. package/src/strings/{animationDelay.js → animationDelay.ts} +0 -1
  145. package/src/strings/{animationDuration.js → animationDuration.ts} +0 -1
  146. package/src/strings/{animationEndEvent.js → animationEndEvent.ts} +0 -1
  147. package/src/strings/{animationName.js → animationName.ts} +0 -1
  148. package/src/strings/{ariaChecked.js → ariaChecked.ts} +0 -1
  149. package/src/strings/{ariaDescribedBy.js → ariaDescribedBy.ts} +0 -1
  150. package/src/strings/{ariaDescription.js → ariaDescription.ts} +0 -1
  151. package/src/strings/{ariaExpanded.js → ariaExpanded.ts} +0 -1
  152. package/src/strings/{ariaHasPopup.js → ariaHasPopup.ts} +0 -1
  153. package/src/strings/{ariaHidden.js → ariaHidden.ts} +0 -1
  154. package/src/strings/{ariaLabel.js → ariaLabel.ts} +0 -1
  155. package/src/strings/{ariaLabelledBy.js → ariaLabelledBy.ts} +0 -1
  156. package/src/strings/{ariaModal.js → ariaModal.ts} +0 -1
  157. package/src/strings/{ariaPressed.js → ariaPressed.ts} +0 -1
  158. package/src/strings/{ariaSelected.js → ariaSelected.ts} +0 -1
  159. package/src/strings/{ariaValueMax.js → ariaValueMax.ts} +0 -1
  160. package/src/strings/{ariaValueMin.js → ariaValueMin.ts} +0 -1
  161. package/src/strings/{ariaValueNow.js → ariaValueNow.ts} +0 -1
  162. package/src/strings/{ariaValueText.js → ariaValueText.ts} +0 -1
  163. package/src/strings/{beforeunloadEvent.js → beforeunloadEvent.ts} +0 -1
  164. package/src/strings/{bezierEasings.js → bezierEasings.ts} +0 -1
  165. package/src/strings/{blurEvent.js → blurEvent.ts} +0 -1
  166. package/src/strings/{changeEvent.js → changeEvent.ts} +0 -1
  167. package/src/strings/{contextmenuEvent.js → contextmenuEvent.ts} +0 -1
  168. package/src/strings/dragEvent.ts +5 -0
  169. package/src/strings/dragendEvent.ts +5 -0
  170. package/src/strings/dragenterEvent.ts +5 -0
  171. package/src/strings/dragleaveEvent.ts +5 -0
  172. package/src/strings/dragoverEvent.ts +5 -0
  173. package/src/strings/dragstartEvent.ts +5 -0
  174. package/src/strings/{errorEvent.js → errorEvent.ts} +0 -1
  175. package/src/strings/{focusEvent.js → focusEvent.ts} +0 -1
  176. package/src/strings/{focusEvents.js → focusEvents.ts} +0 -1
  177. package/src/strings/{focusinEvent.js → focusinEvent.ts} +0 -1
  178. package/src/strings/{focusoutEvent.js → focusoutEvent.ts} +0 -1
  179. package/src/strings/{gesturechangeEvent.js → gesturechangeEvent.ts} +0 -1
  180. package/src/strings/{gestureendEvent.js → gestureendEvent.ts} +0 -1
  181. package/src/strings/{gesturestartEvent.js → gesturestartEvent.ts} +0 -1
  182. package/src/strings/{keyAlt.js → keyAlt.ts} +1 -1
  183. package/src/strings/{keyArrowDown.js → keyArrowDown.ts} +1 -1
  184. package/src/strings/{keyArrowLeft.js → keyArrowLeft.ts} +1 -1
  185. package/src/strings/{keyArrowRight.js → keyArrowRight.ts} +1 -1
  186. package/src/strings/{keyArrowUp.js → keyArrowUp.ts} +1 -1
  187. package/src/strings/{keyBackspace.js → keyBackspace.ts} +1 -1
  188. package/src/strings/{keyCapsLock.js → keyCapsLock.ts} +1 -1
  189. package/src/strings/{keyControl.js → keyControl.ts} +1 -1
  190. package/src/strings/{keyDelete.js → keyDelete.ts} +1 -1
  191. package/src/strings/{keyEnter.js → keyEnter.ts} +1 -1
  192. package/src/strings/{keyEscape.js → keyEscape.ts} +1 -1
  193. package/src/strings/{keyInsert.js → keyInsert.ts} +1 -1
  194. package/src/strings/{keyMeta.js → keyMeta.ts} +1 -1
  195. package/src/strings/{keyPause.js → keyPause.ts} +1 -1
  196. package/src/strings/{keyScrollLock.js → keyScrollLock.ts} +1 -1
  197. package/src/strings/{keyShift.js → keyShift.ts} +1 -1
  198. package/src/strings/{keySpace.js → keySpace.ts} +1 -1
  199. package/src/strings/{keyTab.js → keyTab.ts} +1 -1
  200. package/src/strings/{keyboardEventKeys.js → keyboardEventKeys.ts} +0 -1
  201. package/src/strings/{keydownEvent.js → keydownEvent.ts} +0 -1
  202. package/src/strings/{keypressEvent.js → keypressEvent.ts} +0 -1
  203. package/src/strings/{keyupEvent.js → keyupEvent.ts} +0 -1
  204. package/src/strings/{loadEvent.js → loadEvent.ts} +0 -1
  205. package/src/strings/{loadstartEvent.js → loadstartEvent.ts} +0 -1
  206. package/src/strings/{mouseClickEvents.js → mouseClickEvents.ts} +0 -1
  207. package/src/strings/mouseHoverEvents.ts +8 -0
  208. package/src/strings/{mouseSwipeEvents.js → mouseSwipeEvents.ts} +4 -2
  209. package/src/strings/{mouseclickEvent.js → mouseclickEvent.ts} +0 -1
  210. package/src/strings/{mousedblclickEvent.js → mousedblclickEvent.ts} +0 -1
  211. package/src/strings/{mousedownEvent.js → mousedownEvent.ts} +0 -1
  212. package/src/strings/{mouseenterEvent.js → mouseenterEvent.ts} +0 -1
  213. package/src/strings/{mousehoverEvent.js → mousehoverEvent.ts} +0 -1
  214. package/src/strings/{mouseinEvent.js → mouseinEvent.ts} +0 -1
  215. package/src/strings/{mouseleaveEvent.js → mouseleaveEvent.ts} +0 -1
  216. package/src/strings/{mousemoveEvent.js → mousemoveEvent.ts} +0 -1
  217. package/src/strings/{mouseoutEvent.js → mouseoutEvent.ts} +0 -1
  218. package/src/strings/{mouseoverEvent.js → mouseoverEvent.ts} +0 -1
  219. package/src/strings/{mouseupEvent.js → mouseupEvent.ts} +0 -1
  220. package/src/strings/{mousewheelEvent.js → mousewheelEvent.ts} +0 -1
  221. package/src/strings/{moveEvent.js → moveEvent.ts} +0 -1
  222. package/src/strings/{nativeEvents.js → nativeEvents.ts} +0 -0
  223. package/src/strings/{offsetHeight.js → offsetHeight.ts} +0 -1
  224. package/src/strings/{offsetWidth.js → offsetWidth.ts} +0 -1
  225. package/src/strings/{orientationchangeEvent.js → orientationchangeEvent.ts} +0 -1
  226. package/src/strings/{pointercancelEvent.js → pointercancelEvent.ts} +0 -1
  227. package/src/strings/{pointerdownEvent.js → pointerdownEvent.ts} +0 -1
  228. package/src/strings/{pointerleaveEvent.js → pointerleaveEvent.ts} +0 -1
  229. package/src/strings/{pointermoveEvent.js → pointermoveEvent.ts} +0 -1
  230. package/src/strings/{pointerupEvent.js → pointerupEvent.ts} +0 -1
  231. package/src/strings/{readystatechangeEvent.js → readystatechangeEvent.ts} +0 -1
  232. package/src/strings/{removeEventListener.js → removeEventListener.ts} +0 -1
  233. package/src/strings/{resetEvent.js → resetEvent.ts} +0 -1
  234. package/src/strings/{resizeEvent.js → resizeEvent.ts} +0 -1
  235. package/src/strings/{scrollEvent.js → scrollEvent.ts} +0 -1
  236. package/src/strings/{scrollHeight.js → scrollHeight.ts} +0 -1
  237. package/src/strings/{scrollWidth.js → scrollWidth.ts} +0 -1
  238. package/src/strings/{selectEvent.js → selectEvent.ts} +0 -1
  239. package/src/strings/{selectendEvent.js → selectendEvent.ts} +0 -1
  240. package/src/strings/{selectstartEvent.js → selectstartEvent.ts} +0 -1
  241. package/src/strings/{submitEvent.js → submitEvent.ts} +0 -1
  242. package/src/strings/tabindex.ts +5 -0
  243. package/src/strings/touchEvents.ts +10 -0
  244. package/src/strings/{touchcancelEvent.js → touchcancelEvent.ts} +0 -1
  245. package/src/strings/{touchendEvent.js → touchendEvent.ts} +0 -1
  246. package/src/strings/{touchmoveEvent.js → touchmoveEvent.ts} +0 -1
  247. package/src/strings/{touchstartEvent.js → touchstartEvent.ts} +0 -1
  248. package/src/strings/{transitionDelay.js → transitionDelay.ts} +0 -1
  249. package/src/strings/{transitionDuration.js → transitionDuration.ts} +0 -1
  250. package/src/strings/{transitionEndEvent.js → transitionEndEvent.ts} +0 -1
  251. package/src/strings/{transitionProperty.js → transitionProperty.ts} +0 -2
  252. package/src/strings/{unloadEvent.js → unloadEvent.ts} +0 -1
  253. package/src/strings/{userAgent.js → userAgent.ts} +0 -0
  254. package/src/strings/userAgentData.ts +9 -0
  255. package/tsconfig.json +30 -0
  256. package/vite.config.ts +30 -0
  257. package/dist/shorty.esm.js +0 -2599
  258. package/dist/shorty.esm.min.js +0 -2
  259. package/dist/shorty.min.js +0 -2
  260. package/src/attr/getAttribute.js +0 -9
  261. package/src/attr/getAttributeNS.js +0 -10
  262. package/src/attr/hasAttribute.js +0 -9
  263. package/src/attr/hasAttributeNS.js +0 -10
  264. package/src/attr/removeAttribute.js +0 -9
  265. package/src/attr/removeAttributeNS.js +0 -10
  266. package/src/attr/setAttribute.js +0 -10
  267. package/src/attr/setAttributeNS.js +0 -11
  268. package/src/boolean/isApple.js +0 -13
  269. package/src/boolean/support3DTransform.js +0 -9
  270. package/src/boolean/supportAnimation.js +0 -9
  271. package/src/boolean/supportTouch.js +0 -7
  272. package/src/boolean/supportTransform.js +0 -9
  273. package/src/boolean/supportTransition.js +0 -9
  274. package/src/class/addClass.js +0 -10
  275. package/src/class/hasClass.js +0 -10
  276. package/src/class/removeClass.js +0 -10
  277. package/src/event/off.js +0 -9
  278. package/src/event/on.js +0 -9
  279. package/src/event/one.js +0 -23
  280. package/src/get/getDocumentBody.js +0 -10
  281. package/src/get/getDocumentElement.js +0 -11
  282. package/src/get/getDocumentHead.js +0 -10
  283. package/src/get/getElementAnimationDelayLegacy.js +0 -21
  284. package/src/get/getElementAnimationDurationLegacy.js +0 -21
  285. package/src/get/getElementStyle.js +0 -20
  286. package/src/get/getElementTransitionDelayLegacy.js +0 -21
  287. package/src/get/getElementTransitionDurationLegacy.js +0 -21
  288. package/src/get/getUID.js +0 -34
  289. package/src/is/isArray.js +0 -8
  290. package/src/is/isCustomElement.js +0 -8
  291. package/src/is/isDocument.js +0 -10
  292. package/src/is/isElementsArray.js +0 -12
  293. package/src/is/isFunction.js +0 -8
  294. package/src/is/isHTMLCollection.js +0 -8
  295. package/src/is/isHTMLElement.js +0 -9
  296. package/src/is/isHTMLImageElement.js +0 -8
  297. package/src/is/isMedia.js +0 -14
  298. package/src/is/isNode.js +0 -9
  299. package/src/is/isNodeList.js +0 -9
  300. package/src/is/isNumber.js +0 -8
  301. package/src/is/isObject.js +0 -8
  302. package/src/is/isRTL.js +0 -9
  303. package/src/is/isSVGElement.js +0 -11
  304. package/src/is/isShadowRoot.js +0 -9
  305. package/src/is/isString.js +0 -8
  306. package/src/is/isTableElement.js +0 -11
  307. package/src/is/isWindow.js +0 -9
  308. package/src/misc/ArrayFrom.js +0 -8
  309. package/src/misc/Float32ArrayFrom.js +0 -7
  310. package/src/misc/Float64ArrayFrom.js +0 -7
  311. package/src/misc/ObjectAssign.js +0 -7
  312. package/src/misc/ObjectEntries.js +0 -7
  313. package/src/misc/ObjectKeys.js +0 -7
  314. package/src/misc/ObjectValues.js +0 -7
  315. package/src/misc/OriginalEvent.js +0 -20
  316. package/src/misc/createElement.js +0 -27
  317. package/src/misc/createElementNS.js +0 -30
  318. package/src/misc/data.js +0 -78
  319. package/src/misc/dispatchEvent.js +0 -8
  320. package/src/misc/distinct.js +0 -10
  321. package/src/misc/emulateAnimationEndLegacy.js +0 -41
  322. package/src/misc/emulateTransitionEndLegacy.js +0 -41
  323. package/src/misc/focus.js +0 -7
  324. package/src/misc/normalizeOptions.js +0 -49
  325. package/src/misc/normalizeValue.js +0 -34
  326. package/src/misc/passiveHandlerLegacy.js +0 -10
  327. package/src/misc/reflow.js +0 -8
  328. package/src/misc/setElementStyle.js +0 -19
  329. package/src/misc/timer.js +0 -75
  330. package/src/misc/toLowerCase.js +0 -8
  331. package/src/misc/toUpperCase.js +0 -8
  332. package/src/misc/version.js +0 -8
  333. package/src/selectors/closest.js +0 -16
  334. package/src/selectors/getElementById.js +0 -14
  335. package/src/selectors/getElementsByClassName.js +0 -15
  336. package/src/selectors/getElementsByTagName.js +0 -15
  337. package/src/selectors/matches.js +0 -10
  338. package/src/selectors/matchesLegacy.js +0 -23
  339. package/src/selectors/querySelector.js +0 -19
  340. package/src/strings/animationDelayLegacy.js +0 -9
  341. package/src/strings/animationDurationLegacy.js +0 -9
  342. package/src/strings/animationEndEventLegacy.js +0 -9
  343. package/src/strings/animationNameLegacy.js +0 -9
  344. package/src/strings/mouseHoverEvents.js +0 -7
  345. package/src/strings/touchEvents.js +0 -8
  346. package/src/strings/transitionDelayLegacy.js +0 -9
  347. package/src/strings/transitionDurationLegacy.js +0 -9
  348. package/src/strings/transitionEndEventLegacy.js +0 -9
  349. package/src/strings/transitionPropertyLegacy.js +0 -12
  350. package/src/strings/userAgentData.js +0 -7
  351. package/types/index.d.ts +0 -257
  352. package/types/module/shorty.ts +0 -248
  353. package/types/shorty.d.ts +0 -2316
@@ -1,2 +0,0 @@
1
- // Shorty v1.0.3 | dnp_theme © 2022 | MIT-License
2
- 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",r="webkitAnimation"in n.style?"webkitAnimationName":"animationName",a="webkitAnimation"in n.style?"webkitAnimationEnd":"animationend",s="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,p=g,y=/iPhone|iPad|iPod|Android/i;let b=!1;b=d?d.brands.some(e=>y.test(e.brand)):y.test(p);const v=b,f=/(iPhone|iPod|iPad)/,E=d?d.brands.some(e=>f.test(e.brand)):f.test(p),h=!!p&&p.includes("Firefox"),w="webkitPerspective"in n.style||"perspective"in n.style;function k(e,t,n,o){const i=o||!1;e.addEventListener(t,n,i)}function A(e,t,n,o){const i=o||!1;e.removeEventListener(t,n,i)}function L(e,t,n,o){const i=r=>{r.target===e&&(n.apply(e,[r]),A(e,t,i,o))};k(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){}return e})(),N="webkitTransform"in n.style||"transform"in n.style,T="ontouchstart"in window||"msMaxTouchPoints"in navigator,S="webkitAnimation"in n.style||"animation"in n.style,M="webkitTransition"in n.style||"transition"in n.style,C=(e,t)=>e.getAttribute(t),O=(e,t,n)=>e.setAttribute(t,n);const z=e=>e&&1===e.nodeType||!1,I=new Map,x={set:(e,t,n)=>{if(!z(e))return;I.has(t)||I.set(t,new Map);I.get(t).set(e,n)},getAllFor:e=>I.get(e)||null,get:(e,t)=>{if(!z(e)||!t)return null;const n=x.getAllFor(t);return e&&n&&n.get(e)||null},remove:(e,t)=>{const n=I.get(t);n&&z(e)&&(n.delete(e),0===n.size&&I.delete(t))}},P=e=>e&&[1,2,3,4,5,6,7,8,9,10,11].some(t=>+e.nodeType===t)||!1,F=e=>e&&"Window"===e.constructor.name||!1,H=e=>e&&9===e.nodeType||!1;function B(e){return H(e)?e:P(e)?e.ownerDocument:F(e)?e.document:window.document}const V=(e,t)=>Object.assign(e,t);const R=e=>Object.entries(e);const j=(e,t)=>e.dispatchEvent(t);function W(e,t){const n=getComputedStyle(e);return t.includes("--")?n.getPropertyValue(t):n[t]}function Q(e){const t=W(e,"animationName"),n=W(e,"animationDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function U(e){const t=W(e,"animationName"),n=W(e,"animationDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function q(e){const t=W(e,r),n=W(e,i),o=n.includes("ms")?1:1e3,a=S&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(a)?0:a}function G(e){const t=W(e,r),n=W(e,o),i=n.includes("ms")?1:1e3,a=S&&t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(a)?0:a}function K(e){const t=W(e,"transitionProperty"),n=W(e,"transitionDelay"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function X(e){const t=W(e,"transitionProperty"),n=W(e,"transitionDuration"),o=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function Y(e){const t=W(e,l),n=W(e,c),o=n.includes("ms")?1:1e3,i=M&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function Z(e){const t=W(e,l),n=W(e,s),o=n.includes("ms")?1:1e3,i=M&&t&&"none"!==t?parseFloat(n)*o:0;return Number.isNaN(i)?0:i}function J(e){return!!["true",!0].includes(e)||!["false",!1].includes(e)&&(""===e||"null"===e?null:""===e||Number.isNaN(+e)?e:+e)}const $=e=>Object.keys(e),_=e=>e.toLowerCase();const ee=e=>"object"==typeof e||!1;const te=!!D&&{passive:!0},ne=new Map,oe={set:(e,t,n,o)=>{if(z(e))if(o&&o.length){ne.has(e)||ne.set(e,new Map);ne.get(e).set(o,setTimeout(t,n))}else ne.set(e,setTimeout(t,n))},get:(e,t)=>{if(!z(e))return null;const n=ne.get(e);return t&&t.length&&n&&n.get?n.get(t)||null:n||null},clear:(e,t)=>{if(z(e))if(t&&t.length){const n=ne.get(e);n&&n.get&&(clearTimeout(n.get(t)),n.delete(t),0===n.size&&ne.delete(e))}else clearTimeout(ne.get(e)),ne.delete(e)}};function ie(e,t){const{width:n,height:o,top:i,right:r,bottom:a,left:s}=e.getBoundingClientRect();let c=1,u=1;if(t&&z(e)){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:r/c,bottom:a/u,left:s/c,x:s/c,y:i/u}}function re(e){return B(e).documentElement}const ae=e=>e&&"ShadowRoot"===e.constructor.name||!1;function se(e){if(!e||!z(e))return!1;const{width:t,height:n}=ie(e),{offsetWidth:o,offsetHeight:i}=e;return Math.round(t)!==o||Math.round(n)!==i}let ce=0,ue=0;const le=new Map;function me(e){return e?H(e)?e.defaultView:P(e)?e.ownerDocument.defaultView:e:window}const de=e=>e&&!!e.shadowRoot||!1;function ge(e,t){return(P(t)?t:B()).getElementsByTagName(e)}const pe=Element.prototype,ye=pe.matches||pe.matchesSelector||pe.webkitMatchesSelector||pe.mozMatchesSelector||pe.msMatchesSelector||pe.oMatchesSelector||function(){return!1};const be={ariaChecked:"aria-checked",ariaDescription:"aria-description",ariaDescribedBy:"aria-describedby",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaHasPopup:"aria-haspopup",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",ariaModal:"aria-modal",ariaPressed:"aria-pressed",ariaSelected:"aria-selected",ariaValueMin:"aria-valuemin",ariaValueMax:"aria-valuemax",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",nativeEvents:e,abortEvent:"abort",blurEvent:"blur",moveEvent:"move",changeEvent:"change",errorEvent:"error",resetEvent:"reset",resizeEvent:"resize",scrollEvent:"scroll",submitEvent:"submit",loadEvent:"load",loadstartEvent:"loadstart",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:s,transitionDelay:"transitionDelay",transitionDelayLegacy:c,transitionEndEvent:"transitionend",transitionEndEventLegacy:u,transitionProperty:"transitionProperty",transitionPropertyLegacy:l,isMobile:v,isApple:E,isFirefox:h,support3DTransform:w,supportPassive:D,supportTransform:N,supportTouch:T,supportAnimation:S,supportTransition:M,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:p,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:k,off:A,one:L,dispatchEvent:j,distinct:(e,t,n)=>n.indexOf(e)===t,Data:x,getInstance:(e,t)=>x.get(e,t),createElement:function e(t){if(!t)return null;if("string"==typeof t)return B().createElement(t);const{tagName:n}=t,o={...t},i=e(n);return delete o.tagName,V(i,o),i},createElementNS:function e(t,n){if(!t&&!n)return null;if("string"==typeof n)return B().createElementNS(t,n);const{tagName:o}=n,i={...n},r=e(t,o);return delete i.tagName,R(i).forEach(([e,t])=>{O(r,e,t)}),r},toUpperCase:e=>e.toUpperCase(),toLowerCase:_,Timer:oe,emulateAnimationEnd:function(e,t){let n=0;const o=new Event("animationend"),i=U(e),r=Q(e);if(i){const a=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener("animationend",a),n=1)};e.addEventListener("animationend",a),setTimeout(()=>{n||j(e,o)},i+r+17)}else t.apply(e,[o])},emulateAnimationEndLegacy:function(e,t){let n=0;const o=new Event(a),i=G(e),r=q(e);if(S&&i){const s=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener(a,s),n=1)};e.addEventListener(a,s),setTimeout(()=>{n||j(e,o)},i+r+17)}else t.apply(e,[o])},emulateTransitionEnd:function(e,t){let n=0;const o=new Event("transitionend"),i=X(e),r=K(e);if(i){const a=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener("transitionend",a),n=1)};e.addEventListener("transitionend",a),setTimeout(()=>{n||j(e,o)},i+r+17)}else t.apply(e,[o])},emulateTransitionEndLegacy:function(e,t){let n=0;const o=new Event(u),i=Z(e),r=Y(e);if(M&&i){const a=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener(u,a),n=1)};e.addEventListener(u,a),setTimeout(()=>{n||j(e,o)},i+r+17)}else t.apply(e,[o])},isElementInScrollRange:e=>{if(!e||!P(e))return!1;const{top:t,bottom:n}=ie(e),{clientHeight:o}=re(e);return t<=o&&n>=0},isElementInViewport:e=>{if(!e||!P(e))return!1;const{clientWidth:t,clientHeight:n}=re(e),{top:o,left:i,bottom:r,right:a}=ie(e,!0);return o>=0&&i>=0&&r<=n&&a<=t},passiveHandler:{passive:!0},passiveHandlerLegacy:te,getElementAnimationDuration:U,getElementAnimationDurationLegacy:G,getElementAnimationDelay:Q,getElementAnimationDelayLegacy:q,getElementTransitionDuration:X,getElementTransitionDurationLegacy:Z,getElementTransitionDelay:K,getElementTransitionDelayLegacy:Y,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||ae(e)&&e.host||re(e)},getRectRelativeToOffsetParent:function(e,t,n){const o=z(t),i=ie(e,o&&se(t)),r={x:0,y:0};if(o){const e=ie(t,!0);r.x=e.x+t.clientLeft,r.y=e.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:me,isArray:e=>Array.isArray(e),isString:e=>"string"==typeof e,isCustomElement:de,isElement:e=>e&&[1,2,3,4,5,6,7,8].some(t=>e.nodeType===t)||!1,isNode:P,isNumber:e=>"number"==typeof e,isHTMLElement:z,isHTMLImageElement:e=>e&&"IMG"===e.tagName||!1,isSVGElement:e=>e&&e instanceof me(e).SVGElement||!1,isNodeList:e=>e&&"NodeList"===e.constructor.name||!1,isHTMLCollection:e=>e&&"HTMLCollection"===e.constructor.name||!1,isScaledElement:se,isTableElement:e=>e&&["TABLE","TD","TH"].includes(e.tagName)||!1,isShadowRoot:ae,isDocument:H,isElementsArray:e=>Array.isArray(e)&&e.every(z),isFunction:e=>e&&"Function"===e.constructor.name||!1,isObject:ee,isWindow:F,isMedia:e=>e&&1===e.nodeType&&["SVG","Image","Video"].some(t=>e.constructor.name.includes(t))||!1,isRTL:e=>"rtl"===re(e).dir,closest:function e(t,n){return t?t.closest(n)||e(t.getRootNode().host,n):null},querySelector:function(e,t){return P(e)?e:(P(t)?t:B()).querySelector(e)},getCustomElements:function(e){return[...ge("*",e)].filter(de)},getElementById:function(e,t){return B(t).getElementById(e)},querySelectorAll:function(e,t){return(P(t)?t:B()).querySelectorAll(e)},getElementsByClassName:function(e,t){return(P(t)?t:B()).getElementsByClassName(e)},getElementsByTagName:ge,matches:function(e,t){return e.matches(t)},matchesLegacy:function(e,t){return ye.call(e,t)},normalizeValue:J,normalizeOptions:function(e,t,n,o){const i={...e.dataset},r={},a={};return $(i).forEach(e=>{const t=o&&e.includes(o)?e.replace(o,"").replace(/[A-Z]/,e=>_(e)):e;a[t]=J(i[e])}),$(n).forEach(e=>{n[e]=J(n[e])}),$(t).forEach(o=>{r[o]=o in n?n[o]:o in a?a[o]:"title"===o?C(e,"title"):t[o]}),r},reflow:e=>e.offsetHeight,noop:()=>{},focus:e=>e.focus(),getUID:function e(t,n){let o=n?ce:ue;if(n){const i=e(t),r=le.get(i)||new Map;le.has(i)||le.set(i,r),r.has(n)?o=r.get(n):(r.set(n,o),ce+=1)}else{const e=t.id||t;le.has(e)?o=le.get(e):(le.set(e,o),ue+=1)}return o},ArrayFrom:e=>Array.from(e),Float32ArrayFrom:e=>Float32Array.from(Array.from(e)),Float64ArrayFrom:e=>Float64Array.from(Array.from(e)),ObjectAssign:V,ObjectEntries:R,ObjectKeys:$,ObjectValues:e=>Object.values(e),OriginalEvent:function(e,t){const n=new CustomEvent(e,{cancelable:!0,bubbles:!0});return ee(t)&&V(n,t),n},getBoundingClientRect:ie,getDocument:B,getDocumentBody:function(e){return B(e).body},getDocumentElement:re,getDocumentHead:function(e){return B(e).head},getElementStyle:W,setElementStyle:(e,t)=>{R(t).forEach(([t,n])=>{if(t.includes("--"))e.style.setProperty(t,n);else{const o={};o[t]=n,V(e.style,o)}})},hasAttribute:(e,t)=>e.hasAttribute(t),hasAttributeNS:(e,t,n)=>t.hasAttributeNS(e,n),getAttribute:C,getAttributeNS:(e,t,n)=>t.getAttributeNS(e,n),setAttribute:O,setAttributeNS:(e,t,n,o)=>t.setAttributeNS(e,n,o),removeAttribute:(e,t)=>e.removeAttribute(t),removeAttributeNS:(e,t,n)=>t.removeAttributeNS(e,n),Version:"1.0.3"};export{be as default};
@@ -1,2 +0,0 @@
1
- // Shorty v1.0.3 | dnp_theme © 2022 | MIT-License
2
- !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).SHORTY=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,r="webkitAnimation"in n.style?"webkitAnimationDuration":"animationDuration",i="webkitAnimation"in n.style?"webkitAnimationDelay":"animationDelay",o="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,d=navigator.userAgent,f=/iPhone|iPad|iPod|Android/i,v=m?m.brands.some((function(e){return f.test(e.brand)})):f.test(d),g=/(iPhone|iPod|iPad)/,p=m?m.brands.some((function(e){return g.test(e.brand)})):g.test(d),b=!!d&&d.includes("Firefox"),y="webkitPerspective"in n.style||"perspective"in n.style;function E(e,t,n,r){var i=r||!1;e.addEventListener(t,n,i)}function h(e,t,n,r){var i=r||!1;e.removeEventListener(t,n,i)}function w(e,t,n,r){var i=function(o){o.target===e&&(n.apply(e,[o]),h(e,t,i,r))};E(e,t,i,r)}var k=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0}});w(document,"DOMContentLoaded",(function(){}),t)}catch(e){}return e}(),A="webkitTransform"in n.style||"transform"in n.style,L="ontouchstart"in window||"msMaxTouchPoints"in navigator,D="webkitAnimation"in n.style||"animation"in n.style,N="webkitTransition"in n.style||"transition"in n.style,T=function(e,t){return e.getAttribute(t)},S=function(e,t,n){return e.setAttribute(t,n)};var M=function(e){return e&&1===e.nodeType||!1},O=new Map,C={set:function(e,t,n){M(e)&&(O.has(t)||O.set(t,new Map),O.get(t).set(e,n))},getAllFor:function(e){return O.get(e)||null},get:function(e,t){if(!M(e)||!t)return null;var n=C.getAllFor(t);return e&&n&&n.get(e)||null},remove:function(e,t){var n=O.get(t);n&&M(e)&&(n.delete(e),0===n.size&&O.delete(t))}},z=function(e){return e&&[1,2,3,4,5,6,7,8,9,10,11].some((function(t){return+e.nodeType===t}))||!1},x=function(e){return e&&"Window"===e.constructor.name||!1},I=function(e){return e&&9===e.nodeType||!1};function P(e){return I(e)?e:z(e)?e.ownerDocument:x(e)?e.document:window.document}var H=function(e,t){return Object.assign(e,t)};var F=function(e){return Object.entries(e)};var B=function(e,t){return e.dispatchEvent(t)};function j(e,t){var n=getComputedStyle(e);return t.includes("--")?n.getPropertyValue(t):n[t]}function R(e){var t=j(e,"animationName"),n=j(e,"animationDelay"),r=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*r:0;return Number.isNaN(i)?0:i}function V(e){var t=j(e,"animationName"),n=j(e,"animationDuration"),r=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*r:0;return Number.isNaN(i)?0:i}function W(e){var t=j(e,o),n=j(e,i),r=n.includes("ms")?1:1e3,a=D&&t&&"none"!==t?parseFloat(n)*r:0;return Number.isNaN(a)?0:a}function Q(e){var t=j(e,o),n=j(e,r),i=n.includes("ms")?1:1e3,a=D&&t&&"none"!==t?parseFloat(n)*i:0;return Number.isNaN(a)?0:a}function U(e){var t=j(e,"transitionProperty"),n=j(e,"transitionDelay"),r=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*r:0;return Number.isNaN(i)?0:i}function q(e){var t=j(e,"transitionProperty"),n=j(e,"transitionDuration"),r=n.includes("ms")?1:1e3,i=t&&"none"!==t?parseFloat(n)*r:0;return Number.isNaN(i)?0:i}function G(e){var t=j(e,l),n=j(e,s),r=n.includes("ms")?1:1e3,i=N&&t&&"none"!==t?parseFloat(n)*r:0;return Number.isNaN(i)?0:i}function K(e){var t=j(e,l),n=j(e,u),r=n.includes("ms")?1:1e3,i=N&&t&&"none"!==t?parseFloat(n)*r:0;return Number.isNaN(i)?0:i}function X(e){return!!["true",!0].includes(e)||!["false",!1].includes(e)&&(""===e||"null"===e?null:""===e||Number.isNaN(+e)?e:+e)}var Y=function(e){return Object.keys(e)},Z=function(e){return e.toLowerCase()};var J=function(e){return"object"==typeof e||!1};var $=!!k&&{passive:!0},_=new Map,ee={set:function(e,t,n,r){M(e)&&(r&&r.length?(_.has(e)||_.set(e,new Map),_.get(e).set(r,setTimeout(t,n))):_.set(e,setTimeout(t,n)))},get:function(e,t){if(!M(e))return null;var n=_.get(e);return t&&t.length&&n&&n.get?n.get(t)||null:n||null},clear:function(e,t){if(M(e))if(t&&t.length){var n=_.get(e);n&&n.get&&(clearTimeout(n.get(t)),n.delete(t),0===n.size&&_.delete(e))}else clearTimeout(_.get(e)),_.delete(e)}};function te(e,t){var n=e.getBoundingClientRect(),r=n.width,i=n.height,o=n.top,a=n.right,u=n.bottom,s=n.left,c=1,l=1;if(t&&M(e)){var m=e.offsetWidth,d=e.offsetHeight;c=m>0?Math.round(r)/m:1,l=d>0?Math.round(i)/d:1}return{width:r/c,height:i/l,top:o/l,right:a/c,bottom:u/l,left:s/c,x:s/c,y:o/l}}function ne(e){return P(e).documentElement}var re=function(e){return e&&"ShadowRoot"===e.constructor.name||!1};function ie(e){if(!e||!M(e))return!1;var t=te(e),n=t.width,r=t.height,i=e.offsetWidth,o=e.offsetHeight;return Math.round(n)!==i||Math.round(r)!==o}var oe=0,ae=0,ue=new Map;function se(e){return e?I(e)?e.defaultView:z(e)?e.ownerDocument.defaultView:e:window}var ce=function(e){return e&&!!e.shadowRoot||!1};function le(e,t){return(z(t)?t:P()).getElementsByTagName(e)}var me=Element.prototype,de=me.matches||me.matchesSelector||me.webkitMatchesSelector||me.mozMatchesSelector||me.msMatchesSelector||me.oMatchesSelector||function(){return!1};return{ariaChecked:"aria-checked",ariaDescription:"aria-description",ariaDescribedBy:"aria-describedby",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaHasPopup:"aria-haspopup",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",ariaModal:"aria-modal",ariaPressed:"aria-pressed",ariaSelected:"aria-selected",ariaValueMin:"aria-valuemin",ariaValueMax:"aria-valuemax",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",nativeEvents:e,abortEvent:"abort",blurEvent:"blur",moveEvent:"move",changeEvent:"change",errorEvent:"error",resetEvent:"reset",resizeEvent:"resize",scrollEvent:"scroll",submitEvent:"submit",loadEvent:"load",loadstartEvent:"loadstart",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:r,animationDelay:"animationDelay",animationDelayLegacy:i,animationName:"animationName",animationNameLegacy:o,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:b,support3DTransform:y,supportPassive:k,supportTransform:A,supportTouch:L,supportAnimation:D,supportTransition:N,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:d,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:E,off:h,one:w,dispatchEvent:B,distinct:function(e,t,n){return n.indexOf(e)===t},Data:C,getInstance:function(e,t){return C.get(e,t)},createElement:function e(t){if(!t)return null;if("string"==typeof t)return P().createElement(t);var n=t.tagName,r=Object.assign({},t),i=e(n);return delete r.tagName,H(i,r),i},createElementNS:function e(t,n){if(!t&&!n)return null;if("string"==typeof n)return P().createElementNS(t,n);var r=n.tagName,i=Object.assign({},n),o=e(t,r);return delete i.tagName,F(i).forEach((function(e){var t=e[0],n=e[1];S(o,t,n)})),o},toUpperCase:function(e){return e.toUpperCase()},toLowerCase:Z,Timer:ee,emulateAnimationEnd:function(e,t){var n=0,r=new Event("animationend"),i=V(e),o=R(e);if(i){var a=function(r){r.target===e&&(t.apply(e,[r]),e.removeEventListener("animationend",a),n=1)};e.addEventListener("animationend",a),setTimeout((function(){n||B(e,r)}),i+o+17)}else t.apply(e,[r])},emulateAnimationEndLegacy:function(e,t){var n=0,r=new Event(a),i=Q(e),o=W(e);if(D&&i){var u=function(r){r.target===e&&(t.apply(e,[r]),e.removeEventListener(a,u),n=1)};e.addEventListener(a,u),setTimeout((function(){n||B(e,r)}),i+o+17)}else t.apply(e,[r])},emulateTransitionEnd:function(e,t){var n=0,r=new Event("transitionend"),i=q(e),o=U(e);if(i){var a=function(r){r.target===e&&(t.apply(e,[r]),e.removeEventListener("transitionend",a),n=1)};e.addEventListener("transitionend",a),setTimeout((function(){n||B(e,r)}),i+o+17)}else t.apply(e,[r])},emulateTransitionEndLegacy:function(e,t){var n=0,r=new Event(c),i=K(e),o=G(e);if(N&&i){var a=function(r){r.target===e&&(t.apply(e,[r]),e.removeEventListener(c,a),n=1)};e.addEventListener(c,a),setTimeout((function(){n||B(e,r)}),i+o+17)}else t.apply(e,[r])},isElementInScrollRange:function(e){if(!e||!z(e))return!1;var t=te(e),n=t.top,r=t.bottom;return n<=ne(e).clientHeight&&r>=0},isElementInViewport:function(e){if(!e||!z(e))return!1;var t=ne(e),n=t.clientWidth,r=t.clientHeight,i=te(e,!0),o=i.top,a=i.left,u=i.bottom,s=i.right;return o>=0&&a>=0&&u<=r&&s<=n},passiveHandler:{passive:!0},passiveHandlerLegacy:$,getElementAnimationDuration:V,getElementAnimationDurationLegacy:Q,getElementAnimationDelay:R,getElementAnimationDelayLegacy:W,getElementTransitionDuration:q,getElementTransitionDurationLegacy:K,getElementTransitionDelay:U,getElementTransitionDelayLegacy:G,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||re(e)&&e.host||ne(e)},getRectRelativeToOffsetParent:function(e,t,n){var r=M(t),i=te(e,r&&ie(t)),o={x:0,y:0};if(r){var a=te(t,!0);o.x=a.x+t.clientLeft,o.y=a.y+t.clientTop}return{x:i.left+n.x-o.x,y:i.top+n.y-o.y,width:i.width,height:i.height}},getWindow:se,isArray:function(e){return Array.isArray(e)},isString:function(e){return"string"==typeof e},isCustomElement:ce,isElement:function(e){return e&&[1,2,3,4,5,6,7,8].some((function(t){return e.nodeType===t}))||!1},isNode:z,isNumber:function(e){return"number"==typeof e},isHTMLElement:M,isHTMLImageElement:function(e){return e&&"IMG"===e.tagName||!1},isSVGElement:function(e){return e&&e instanceof se(e).SVGElement||!1},isNodeList:function(e){return e&&"NodeList"===e.constructor.name||!1},isHTMLCollection:function(e){return e&&"HTMLCollection"===e.constructor.name||!1},isScaledElement:ie,isTableElement:function(e){return e&&["TABLE","TD","TH"].includes(e.tagName)||!1},isShadowRoot:re,isDocument:I,isElementsArray:function(e){return Array.isArray(e)&&e.every(M)},isFunction:function(e){return e&&"Function"===e.constructor.name||!1},isObject:J,isWindow:x,isMedia:function(e){return e&&1===e.nodeType&&["SVG","Image","Video"].some((function(t){return e.constructor.name.includes(t)}))||!1},isRTL:function(e){return"rtl"===ne(e).dir},closest:function e(t,n){return t?t.closest(n)||e(t.getRootNode().host,n):null},querySelector:function(e,t){return z(e)?e:(z(t)?t:P()).querySelector(e)},getCustomElements:function(e){var t=le("*",e);return[].concat(t).filter(ce)},getElementById:function(e,t){return P(t).getElementById(e)},querySelectorAll:function(e,t){return(z(t)?t:P()).querySelectorAll(e)},getElementsByClassName:function(e,t){return(z(t)?t:P()).getElementsByClassName(e)},getElementsByTagName:le,matches:function(e,t){return e.matches(t)},matchesLegacy:function(e,t){return de.call(e,t)},normalizeValue:X,normalizeOptions:function(e,t,n,r){var i=Object.assign({},e.dataset),o={},a={};return Y(i).forEach((function(e){var t=r&&e.includes(r)?e.replace(r,"").replace(/[A-Z]/,(function(e){return Z(e)})):e;a[t]=X(i[e])})),Y(n).forEach((function(e){n[e]=X(n[e])})),Y(t).forEach((function(r){o[r]=r in n?n[r]:r in a?a[r]:"title"===r?T(e,"title"):t[r]})),o},reflow:function(e){return e.offsetHeight},noop:function(){},focus:function(e){return e.focus()},getUID:function e(t,n){var r=n?oe:ae;if(n){var i=e(t),o=ue.get(i)||new Map;ue.has(i)||ue.set(i,o),o.has(n)?r=o.get(n):(o.set(n,r),oe+=1)}else{var a=t.id||t;ue.has(a)?r=ue.get(a):(ue.set(a,r),ae+=1)}return r},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:H,ObjectEntries:F,ObjectKeys:Y,ObjectValues:function(e){return Object.values(e)},OriginalEvent:function(e,t){var n=new CustomEvent(e,{cancelable:!0,bubbles:!0});return J(t)&&H(n,t),n},getBoundingClientRect:te,getDocument:P,getDocumentBody:function(e){return P(e).body},getDocumentElement:ne,getDocumentHead:function(e){return P(e).head},getElementStyle:j,setElementStyle:function(e,t){F(t).forEach((function(t){var n=t[0],r=t[1];if(n.includes("--"))e.style.setProperty(n,r);else{var i={};i[n]=r,H(e.style,i)}}))},hasAttribute:function(e,t){return e.hasAttribute(t)},hasAttributeNS:function(e,t,n){return t.hasAttributeNS(e,n)},getAttribute:T,getAttributeNS:function(e,t,n){return t.getAttributeNS(e,n)},setAttribute:S,setAttributeNS:function(e,t,n,r){return t.setAttributeNS(e,n,r)},removeAttribute:function(e,t){return e.removeAttribute(t)},removeAttributeNS:function(e,t,n){return t.removeAttributeNS(e,n)},Version:"1.0.3"}}));
@@ -1,9 +0,0 @@
1
- /**
2
- * Shortcut for `HTMLElement.getAttribute()` method.
3
- * @param {HTMLElement} element target element
4
- * @param {string} attribute attribute name
5
- * @returns {string?} attribute value
6
- */
7
- const getAttribute = (element, attribute) => element.getAttribute(attribute);
8
-
9
- export default getAttribute;
@@ -1,10 +0,0 @@
1
- /**
2
- * Shortcut for `HTMLElement.getAttributeNS()` method.
3
- * @param {string} ns attribute namespace
4
- * @param {HTMLElement} element target element
5
- * @param {string} attribute attribute name
6
- * @returns {string?} attribute value
7
- */
8
- const getAttributeNS = (ns, element, attribute) => element.getAttributeNS(ns, attribute);
9
-
10
- export default getAttributeNS;
@@ -1,9 +0,0 @@
1
- /**
2
- * Shortcut for `HTMLElement.hasAttribute()` method.
3
- * @param {HTMLElement} element target element
4
- * @param {string} attribute attribute name
5
- * @returns {boolean} the query result
6
- */
7
- const hasAttribute = (element, attribute) => element.hasAttribute(attribute);
8
-
9
- export default hasAttribute;
@@ -1,10 +0,0 @@
1
- /**
2
- * Shortcut for `HTMLElement.hasAttributeNS()` method.
3
- * @param {string} ns attribute namespace
4
- * @param {HTMLElement} element target element
5
- * @param {string} att attribute name
6
- * @returns {boolean} the query result
7
- */
8
- const hasAttributeNS = (ns, element, att) => element.hasAttributeNS(ns, att);
9
-
10
- export default hasAttributeNS;
@@ -1,9 +0,0 @@
1
- /**
2
- * Shortcut for `HTMLElement.removeAttribute()` method.
3
- * @param {HTMLElement} element target element
4
- * @param {string} attribute attribute name
5
- * @returns {void}
6
- */
7
- const removeAttribute = (element, attribute) => element.removeAttribute(attribute);
8
-
9
- export default removeAttribute;
@@ -1,10 +0,0 @@
1
- /**
2
- * Shortcut for `HTMLElement.removeAttributeNS()` method.
3
- * @param {string} ns attribute namespace
4
- * @param {HTMLElement} element target element
5
- * @param {string} att attribute name
6
- * @returns {void}
7
- */
8
- const removeAttributeNS = (ns, element, att) => element.removeAttributeNS(ns, att);
9
-
10
- export default removeAttributeNS;
@@ -1,10 +0,0 @@
1
- /**
2
- * Shortcut for `HTMLElement.setAttribute()` method.
3
- * @param {HTMLElement} element target element
4
- * @param {string} attribute attribute name
5
- * @param {string} value attribute value
6
- * @returns {void}
7
- */
8
- const setAttribute = (element, attribute, value) => element.setAttribute(attribute, value);
9
-
10
- export default setAttribute;
@@ -1,11 +0,0 @@
1
- /**
2
- * Shortcut for `SVGElement.setAttributeNS()` method.
3
- * @param {string} ns attribute namespace
4
- * @param {HTMLElement} element target element
5
- * @param {string} att attribute name
6
- * @param {string} value attribute value
7
- * @returns {void}
8
- */
9
- const setAttributeNS = (ns, element, att, value) => element.setAttributeNS(ns, att, value);
10
-
11
- export default setAttributeNS;
@@ -1,13 +0,0 @@
1
- import userAgentData from '../strings/userAgentData';
2
- import userAgent from '../strings/userAgent';
3
-
4
- const appleBrands = /(iPhone|iPod|iPad)/;
5
-
6
- /**
7
- * A global `boolean` for Apple browsers.
8
- * @type {boolean}
9
- */
10
- const isApple = userAgentData ? userAgentData.brands.some((x) => appleBrands.test(x.brand))
11
- : /* istanbul ignore next */appleBrands.test(userAgent);
12
-
13
- export default isApple;
@@ -1,9 +0,0 @@
1
- import documentHead from '../blocks/documentHead';
2
-
3
- /**
4
- * A global `boolean` for CSS3 3D transform support.
5
- * @type {boolean}
6
- */
7
- const support3DTransform = 'webkitPerspective' in documentHead.style
8
- || /* istanbul ignore next */'perspective' in documentHead.style;
9
- export default support3DTransform;
@@ -1,9 +0,0 @@
1
- import documentHead from '../blocks/documentHead';
2
-
3
- /**
4
- * A global `boolean` for CSS3 animation support.
5
- * @type {boolean}
6
- */
7
- const supportAnimation = 'webkitAnimation' in documentHead.style
8
- || /* istanbul ignore next */'animation' in documentHead.style;
9
- export default supportAnimation;
@@ -1,7 +0,0 @@
1
- /**
2
- * A global `boolean` for touch events support.
3
- * @type {boolean}
4
- */
5
- const supportTouch = 'ontouchstart' in window
6
- || /* istanbul ignore next */'msMaxTouchPoints' in navigator;
7
- export default supportTouch;
@@ -1,9 +0,0 @@
1
- import documentHead from '../blocks/documentHead';
2
-
3
- /**
4
- * A global `boolean` for CSS3 transform support.
5
- * @type {boolean}
6
- */
7
- const supportTransform = 'webkitTransform' in documentHead.style
8
- || /* istanbul ignore next */'transform' in documentHead.style;
9
- export default supportTransform;
@@ -1,9 +0,0 @@
1
- import documentHead from '../blocks/documentHead';
2
-
3
- /**
4
- * A global `boolean` for CSS3 transition support.
5
- * @type {boolean}
6
- */
7
- const supportTransition = 'webkitTransition' in documentHead.style
8
- || /* istanbul ignore next */'transition' in documentHead.style;
9
- export default supportTransition;
@@ -1,10 +0,0 @@
1
- /**
2
- * Add class to `HTMLElement.classList`.
3
- *
4
- * @param {HTMLElement} element target
5
- * @param {string} classNAME to add
6
- * @returns {void}
7
- */
8
- export default function addClass(element, classNAME) {
9
- element.classList.add(classNAME);
10
- }
@@ -1,10 +0,0 @@
1
- /**
2
- * Check class in `HTMLElement.classList`.
3
- *
4
- * @param {HTMLElement} element target
5
- * @param {string} classNAME to check
6
- * @returns {boolean}
7
- */
8
- export default function hasClass(element, classNAME) {
9
- return element.classList.contains(classNAME);
10
- }
@@ -1,10 +0,0 @@
1
- /**
2
- * Remove class from `HTMLElement.classList`.
3
- *
4
- * @param {HTMLElement} element target
5
- * @param {string} classNAME to remove
6
- * @returns {void}
7
- */
8
- export default function removeClass(element, classNAME) {
9
- element.classList.remove(classNAME);
10
- }
package/src/event/off.js DELETED
@@ -1,9 +0,0 @@
1
- /**
2
- * Remove eventListener from an `HTMLElement` | `Document` | `Window` target.
3
- *
4
- * @type {SHORTY.OnOff<EventTarget>}
5
- */
6
- export default function off(element, eventName, listener, options) {
7
- const ops = options || false;
8
- element.removeEventListener(eventName, listener, ops);
9
- }
package/src/event/on.js DELETED
@@ -1,9 +0,0 @@
1
- /**
2
- * Add eventListener to an `HTMLElement` | `Document` target.
3
- *
4
- * @type {SHORTY.OnOff<EventTarget>}
5
- */
6
- export default function on(element, eventName, listener, options) {
7
- const ops = options || false;
8
- element.addEventListener(eventName, listener, ops);
9
- }
package/src/event/one.js DELETED
@@ -1,23 +0,0 @@
1
- import on from './on';
2
- import off from './off';
3
-
4
- /**
5
- * Add an `eventListener` to an `HTMLElement` | `Document` | `Window`
6
- * target and remove it once callback is called.
7
- *
8
- * @type {SHORTY.OnOff<EventTarget>}
9
- */
10
- export default function one(element, eventName, listener, options) {
11
- /**
12
- * Wrap the listener for easy on -> off
13
- * @type {EventListener}
14
- */
15
- const handlerWrapper = (e) => {
16
- /* istanbul ignore else */
17
- if (e.target === element) {
18
- listener.apply(element, [e]);
19
- off(element, eventName, handlerWrapper, options);
20
- }
21
- };
22
- on(element, eventName, handlerWrapper, options);
23
- }
@@ -1,10 +0,0 @@
1
- import getDocument from './getDocument';
2
- /**
3
- * Returns the `document.body` or the `<body>` element.
4
- *
5
- * @param {(Node | Window)=} node
6
- * @returns {HTMLBodyElement}
7
- */
8
- export default function getDocumentBody(node) {
9
- return getDocument(node).body;
10
- }
@@ -1,11 +0,0 @@
1
- import getDocument from './getDocument';
2
-
3
- /**
4
- * Returns the `document.documentElement` or the `<html>` element.
5
- *
6
- * @param {(Node | Window)=} node
7
- * @returns {HTMLHtmlElement}
8
- */
9
- export default function getDocumentElement(node) {
10
- return getDocument(node).documentElement;
11
- }
@@ -1,10 +0,0 @@
1
- import getDocument from './getDocument';
2
- /**
3
- * Returns the `document.head` or the `<head>` element.
4
- *
5
- * @param {(Node | Window)=} node
6
- * @returns {HTMLHeadElement}
7
- */
8
- export default function getDocumentHead(node) {
9
- return getDocument(node).head;
10
- }
@@ -1,21 +0,0 @@
1
- import supportAnimation from '../boolean/supportAnimation';
2
- import animationDelay from '../strings/animationDelayLegacy';
3
- import animationName from '../strings/animationNameLegacy';
4
- import getElementStyle from './getElementStyle';
5
-
6
- /**
7
- * Utility to get the computed `animationDelay`
8
- * from Element in miliseconds.
9
- *
10
- * @param {HTMLElement} element target
11
- * @return {number} the value in miliseconds
12
- */
13
- export default function getElementAnimationDelay(element) {
14
- const propertyValue = getElementStyle(element, animationName);
15
- const durationValue = getElementStyle(element, animationDelay);
16
- const durationScale = durationValue.includes('ms') ? /* istanbul ignore next */1 : 1000;
17
- const duration = supportAnimation && propertyValue && propertyValue !== 'none'
18
- ? parseFloat(durationValue) * durationScale : 0;
19
-
20
- return !Number.isNaN(duration) ? duration : /* istanbul ignore next */0;
21
- }
@@ -1,21 +0,0 @@
1
- import supportAnimation from '../boolean/supportAnimation';
2
- import animationDuration from '../strings/animationDurationLegacy';
3
- import animationName from '../strings/animationNameLegacy';
4
- import getElementStyle from './getElementStyle';
5
-
6
- /**
7
- * Utility to get the computed `animationDuration`
8
- * from `HTMLElement` in miliseconds.
9
- *
10
- * @param {HTMLElement} element target
11
- * @return {number} the value in miliseconds
12
- */
13
- export default function getElementAnimationDuration(element) {
14
- const propertyValue = getElementStyle(element, animationName);
15
- const durationValue = getElementStyle(element, animationDuration);
16
- const durationScale = durationValue.includes('ms') ? /* istanbul ignore next */1 : 1000;
17
- const duration = supportAnimation && propertyValue && propertyValue !== 'none'
18
- ? parseFloat(durationValue) * durationScale : 0;
19
-
20
- return !Number.isNaN(duration) ? duration : /* istanbul ignore next */0;
21
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * Shortcut for `window.getComputedStyle(element).propertyName`
3
- * static method.
4
- *
5
- * * If `element` parameter is not an `HTMLElement`, `getComputedStyle`
6
- * throws a `ReferenceError`.
7
- *
8
- * @param {HTMLElement} element target
9
- * @param {string} property the css property
10
- * @return {string} the css property value
11
- */
12
- export default function getElementStyle(element, property) {
13
- const computedStyle = getComputedStyle(element);
14
-
15
- // must use camelcase strings,
16
- // or non-camelcase strings with `getPropertyValue`
17
- return property.includes('--')
18
- ? computedStyle.getPropertyValue(property)
19
- : computedStyle[property];
20
- }
@@ -1,21 +0,0 @@
1
- import supportTransition from '../boolean/supportTransition';
2
- import transitionDelay from '../strings/transitionDelayLegacy';
3
- import transitionProperty from '../strings/transitionPropertyLegacy';
4
- import getElementStyle from './getElementStyle';
5
-
6
- /**
7
- * Utility to get the computed `transitionDelay`
8
- * from Element in miliseconds.
9
- *
10
- * @param {HTMLElement} element target
11
- * @return {number} the value in miliseconds
12
- */
13
- export default function getElementTransitionDelay(element) {
14
- const propertyValue = getElementStyle(element, transitionProperty);
15
- const delayValue = getElementStyle(element, transitionDelay);
16
- const delayScale = delayValue.includes('ms') ? /* istanbul ignore next */1 : 1000;
17
- const duration = supportTransition && propertyValue && propertyValue !== 'none'
18
- ? parseFloat(delayValue) * delayScale : 0;
19
-
20
- return !Number.isNaN(duration) ? duration : /* istanbul ignore next */0;
21
- }
@@ -1,21 +0,0 @@
1
- import supportTransition from '../boolean/supportTransition';
2
- import transitionDuration from '../strings/transitionDurationLegacy';
3
- import transitionProperty from '../strings/transitionPropertyLegacy';
4
- import getElementStyle from './getElementStyle';
5
-
6
- /**
7
- * Utility to get the computed `transitionDuration`
8
- * from Element in miliseconds.
9
- *
10
- * @param {HTMLElement} element target
11
- * @return {number} the value in miliseconds
12
- */
13
- export default function getElementTransitionDuration(element) {
14
- const propertyValue = getElementStyle(element, transitionProperty);
15
- const durationValue = getElementStyle(element, transitionDuration);
16
- const durationScale = durationValue.includes('ms') ? /* istanbul ignore next */1 : 1000;
17
- const duration = supportTransition && propertyValue && propertyValue !== 'none'
18
- ? parseFloat(durationValue) * durationScale : 0;
19
-
20
- return !Number.isNaN(duration) ? duration : /* istanbul ignore next */0;
21
- }
package/src/get/getUID.js DELETED
@@ -1,34 +0,0 @@
1
- let elementUID = 0;
2
- let elementMapUID = 0;
3
- const elementIDMap = new Map();
4
-
5
- /**
6
- * Returns a unique identifier for popover, tooltip, scrollspy.
7
- *
8
- * @param {HTMLElement} element target element
9
- * @param {string=} key predefined key
10
- * @returns {number} an existing or new unique ID
11
- */
12
- export default function getUID(element, key) {
13
- let result = key ? elementUID : elementMapUID;
14
-
15
- if (key) {
16
- const elID = getUID(element);
17
- const elMap = elementIDMap.get(elID) || new Map();
18
- if (!elementIDMap.has(elID)) {
19
- elementIDMap.set(elID, elMap);
20
- }
21
- if (!elMap.has(key)) {
22
- elMap.set(key, result);
23
- elementUID += 1;
24
- } else result = elMap.get(key);
25
- } else {
26
- const elkey = element.id || element;
27
-
28
- if (!elementIDMap.has(elkey)) {
29
- elementIDMap.set(elkey, result);
30
- elementMapUID += 1;
31
- } else result = elementIDMap.get(elkey);
32
- }
33
- return result;
34
- }
package/src/is/isArray.js DELETED
@@ -1,8 +0,0 @@
1
- /**
2
- * Shortcut for `Array.isArray()` static method.
3
- *
4
- * @param {any} arr array-like iterable object
5
- * @returns {boolean} the query result
6
- */
7
- const isArray = (arr) => Array.isArray(arr);
8
- export default isArray;
@@ -1,8 +0,0 @@
1
- /**
2
- * Checks if an object is a `CustomElement`.
3
- *
4
- * @param {any} element the target object
5
- * @returns {boolean} the query result
6
- */
7
- const isCustomElement = (element) => (element && !!element.shadowRoot) || false;
8
- export default isCustomElement;
@@ -1,10 +0,0 @@
1
- /**
2
- * Checks if an object is a `Document`.
3
- * @see https://dom.spec.whatwg.org/#node
4
- *
5
- * @param {any} object the target object
6
- * @returns {boolean} the query result
7
- */
8
- const isDocument = (object) => (object && object.nodeType === 9) || false;
9
-
10
- export default isDocument;
@@ -1,12 +0,0 @@
1
- import isHTMLElement from './isHTMLElement';
2
-
3
- /**
4
- * Checks if an object is an `Array` in which all items are `Element`.
5
- *
6
- * @param {any} object the target object
7
- * @returns {boolean} the query result
8
- */
9
- const isElementsArray = (object) => Array.isArray(object)
10
- && object.every(isHTMLElement);
11
-
12
- export default isElementsArray;
@@ -1,8 +0,0 @@
1
- /**
2
- * Checks if an object is a `Function`.
3
- *
4
- * @param {any} fn the target object
5
- * @returns {boolean} the query result
6
- */
7
- const isFunction = (fn) => (fn && fn.constructor.name === 'Function') || false;
8
- export default isFunction;
@@ -1,8 +0,0 @@
1
- /**
2
- * Checks if an object is an `HTMLCollection`.
3
- *
4
- * @param {any} object the target object
5
- * @returns {boolean} the query result
6
- */
7
- const isHTMLCollection = (object) => (object && object.constructor.name === 'HTMLCollection') || false;
8
- export default isHTMLCollection;
@@ -1,9 +0,0 @@
1
- /**
2
- * Checks if an element is an `HTMLElement`.
3
- * @see https://dom.spec.whatwg.org/#node
4
- *
5
- * @param {any} element the target object
6
- * @returns {boolean} the query result
7
- */
8
- const isHTMLElement = (element) => (element && element.nodeType === 1) || false;
9
- export default isHTMLElement;
@@ -1,8 +0,0 @@
1
- /**
2
- * Check if a target element is an `<img>`.
3
- * @param {any} element the target element
4
- * @returns {boolean} the query result
5
- */
6
- const isHTMLImageElement = (element) => (element && element.tagName === 'IMG') || false;
7
-
8
- export default isHTMLImageElement;
package/src/is/isMedia.js DELETED
@@ -1,14 +0,0 @@
1
- /**
2
- * Checks if an element is an `<svg>` (or any type of SVG element),
3
- * `<img>` or `<video>`.
4
- *
5
- * *Tooltip* / *Popover* works different with media elements.
6
- * @param {any} element the target element
7
- * @returns {boolean} the query result
8
- */
9
-
10
- const isMedia = (element) => (
11
- element
12
- && element.nodeType === 1
13
- && ['SVG', 'Image', 'Video'].some((s) => element.constructor.name.includes(s))) || false;
14
- export default isMedia;
package/src/is/isNode.js DELETED
@@ -1,9 +0,0 @@
1
- /**
2
- * Checks if an object is a `Node`.
3
- *
4
- * @param {any} node the target object
5
- * @returns {boolean} the query result
6
- */
7
- const isNode = (element) => (element && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
8
- .some((x) => +element.nodeType === x)) || false;
9
- export default isNode;