diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index 116c8622..00000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,199 +0,0 @@ -module.exports = { - env: { - browser: true, - es6: true, - }, - extends: ['plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended-requiring-type-checking'], - parser: '@typescript-eslint/parser', - parserOptions: { - project: 'tsconfig.json', - sourceType: 'module', - }, - plugins: [ - 'eslint-plugin-jsdoc', - 'eslint-plugin-prefer-arrow', - // "eslint-plugin-react", - '@typescript-eslint', - 'prettier', - ], - root: true, - rules: { - 'prettier/prettier': 'error', - '@typescript-eslint/adjacent-overload-signatures': 'error', - '@typescript-eslint/array-type': [ - 'error', - { - default: 'array', - }, - ], - '@typescript-eslint/ban-types': [ - 'error', - { - types: { - Object: { - message: 'Avoid using the `Object` type. Did you mean `object`?', - }, - Function: { - message: 'Avoid using the `Function` type. Prefer a specific function type, like `() => void`.', - }, - Boolean: { - message: 'Avoid using the `Boolean` type. Did you mean `boolean`?', - }, - Number: { - message: 'Avoid using the `Number` type. Did you mean `number`?', - }, - String: { - message: 'Avoid using the `String` type. Did you mean `string`?', - }, - Symbol: { - message: 'Avoid using the `Symbol` type. Did you mean `symbol`?', - }, - }, - }, - ], - '@typescript-eslint/unbound-method': 'warn', - '@typescript-eslint/consistent-type-assertions': 'error', - '@typescript-eslint/dot-notation': 'error', - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/indent': 'off', - '@typescript-eslint/member-delimiter-style': [ - 'off', - { - multiline: { - delimiter: 'none', - requireLast: true, - }, - singleline: { - delimiter: 'semi', - requireLast: false, - }, - }, - ], - '@typescript-eslint/naming-convention': 'off', // error - '@typescript-eslint/no-empty-function': 'error', - '@typescript-eslint/no-empty-interface': 'error', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-misused-new': 'error', - '@typescript-eslint/no-namespace': 'error', - '@typescript-eslint/no-parameter-properties': 'off', - '@typescript-eslint/no-shadow': [ - 'error', - { - hoist: 'all', - }, - ], - '@typescript-eslint/no-unused-expressions': 'error', - '@typescript-eslint/no-use-before-define': 'off', - '@typescript-eslint/no-var-requires': 'error', - '@typescript-eslint/prefer-for-of': 'error', - '@typescript-eslint/prefer-function-type': 'error', - '@typescript-eslint/prefer-namespace-keyword': 'error', - '@typescript-eslint/quotes': 'off', - '@typescript-eslint/semi': ['off', null], - '@typescript-eslint/triple-slash-reference': [ - 'error', - { - path: 'always', - types: 'prefer-import', - lib: 'always', - }, - ], - '@typescript-eslint/type-annotation-spacing': 'off', - '@typescript-eslint/typedef': 'off', - '@typescript-eslint/unified-signatures': 'error', - 'arrow-parens': ['off', 'always'], - 'brace-style': ['off', 'off'], - 'comma-dangle': 'off', - complexity: 'off', - 'constructor-super': 'error', - 'dot-notation': 'off', - 'eol-last': 'off', - eqeqeq: ['error', 'smart'], - 'guard-for-in': 'error', - 'id-denylist': [ - 'error', - 'any', - 'Number', - 'number', - 'String', - 'string', - 'Boolean', - 'boolean', - 'Undefined', - 'undefined', - ], - 'id-match': 'error', - indent: 'off', - 'jsdoc/check-alignment': 'error', - 'jsdoc/check-indentation': 'error', - // 'jsdoc/newline-after-description': 'error', - 'linebreak-style': 'off', - 'max-classes-per-file': ['error', 1], - 'max-len': 'off', - 'new-parens': 'off', - 'newline-per-chained-call': 'off', - 'no-bitwise': 'error', - 'no-caller': 'error', - 'no-cond-assign': 'error', - 'no-console': 'error', - 'no-debugger': 'error', - 'no-empty': 'error', - 'no-empty-function': 'off', - 'no-eval': 'error', - 'no-extra-semi': 'off', - 'no-fallthrough': 'off', - 'no-invalid-this': 'off', - 'no-irregular-whitespace': 'off', - 'no-multiple-empty-lines': 'off', - 'no-new-wrappers': 'error', - 'no-shadow': 'off', - 'no-throw-literal': 'error', - 'no-trailing-spaces': 'off', - 'no-undef-init': 'error', - 'no-underscore-dangle': 'off', - 'no-unsafe-finally': 'error', - 'no-unused-expressions': 'off', - 'no-unused-labels': 'error', - 'no-use-before-define': 'off', - 'no-var': 'error', - 'object-shorthand': 'error', - 'one-var': ['error', 'never'], - 'padded-blocks': [ - 'off', - { - blocks: 'never', - }, - { - allowSingleLineBlocks: true, - }, - ], - 'prefer-arrow/prefer-arrow-functions': 'error', - 'prefer-const': 'error', - 'quote-props': 'off', - quotes: 'off', - radix: 'error', - // "react/jsx-curly-spacing": "off", - // "react/jsx-equals-spacing": "off", - // "react/jsx-tag-spacing": [ - // "off", - // { - // "afterOpening": "allow", - // "closingSlash": "allow" - // } - // ], - // "react/jsx-wrap-multilines": "off", - semi: 'off', - 'space-before-function-paren': 'off', - 'space-in-parens': ['off', 'never'], - 'spaced-comment': [ - 'error', - 'always', - { - markers: ['/'], - }, - ], - 'use-isnan': 'error', - 'valid-typeof': 'off', - }, -}; diff --git a/.github/workflows/badges.yml b/.github/workflows/badges.yml index 86e90492..622f32e6 100644 --- a/.github/workflows/badges.yml +++ b/.github/workflows/badges.yml @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@v3 - name: Update version badges 🏷 - run: npx -p dependency-version-badge update-badge typescript eslint vitest vite + run: npx -p dependency-version-badge update-badge typescript vitest vite - name: Commit any changed files 💾 uses: stefanzweifel/git-auto-commit-action@v4 diff --git a/README.md b/README.md index efb547ec..940ea03e 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ [![NPM Version](https://img.shields.io/npm/v/bootstrap.native.svg)](https://www.npmjs.com/package/bootstrap.native) [![jsDeliver](https://img.shields.io/jsdelivr/npm/hw/bootstrap.native)](https://www.jsdelivr.com/package/npm/bootstrap.native) [![typescript version](https://img.shields.io/badge/typescript-5.6.3-brightgreen)](https://www.typescriptlang.org/) -[![eslint version](https://img.shields.io/badge/eslint-8.57.1-brightgreen)](https://github.com/eslint) [![vitest version](https://img.shields.io/badge/vitest-2.1.3-brightgreen)](https://vitest.dev/) [![vite version](https://img.shields.io/badge/vite-5.4.10-brightgreen)](https://vitejs.dev/) diff --git a/dist/bootstrap-native.cjs b/dist/bootstrap-native.cjs index 4f15eedc..ea52dc97 100644 --- a/dist/bootstrap-native.cjs +++ b/dist/bootstrap-native.cjs @@ -147,10 +147,8 @@ a!==l&&yn(this,l);return}const{offsets:r}=this;// istanbul ignore else @preserve if(a&&n0){this.activeItem=null;// istanbul ignore else @preserve e&&Oo(e);return}c.forEach((l,h)=>{a!==l&&n>=r[h]&&(typeof r[h+1]>"u"||n{(e?_:B)(this.scrollTarget,Be,this.refresh,nt)});const{element:o,options:i}=this;this.target=H(i.target,E(o)),this.target&&(this.scrollTarget=o.clientHeightW(t,Mo),Oc=t=>new Qt(t),cs=$(`show.bs.${ye}`),Sn=$(`shown.bs.${ye}`),as=$(`hide.bs.${ye}`),xn=$(`hidden.bs.${ye}`),me=new Map,Hn=t=>{const{tabContent:s,nav:e}=t;// istanbul ignore else @preserve s&&g(s,Ot)&&(s.style.height="",b(s,Ot));// istanbul ignore else @preserve -e&&u.clear(e)},Pn=t=>{const{element:s,tabContent:e,content:n,nav:o}=t,{tab:i}=T(o)&&me.get(o)||{tab:null};// istanbul ignore next @preserve -// istanbul ignore else @preserve -if(e&&n&&g(n,R)){const{currentHeight:c,nextHeight:a}=me.get(s)||{currentHeight:0,nextHeight:0};// istanbul ignore next @preserve -// istanbul ignore else @preserve: vitest won't validate this branch +e&&u.clear(e)},Pn=t=>{const{element:s,tabContent:e,content:n,nav:o}=t,{tab:i}=T(o)&&me.get(o)||{tab:null};// istanbul ignore else @preserve +if(e&&n&&g(n,R)){const{currentHeight:c,nextHeight:a}=me.get(s)||{currentHeight:0,nextHeight:0};// istanbul ignore else @preserve: vitest won't validate this branch c!==a?setTimeout(()=>{e.style.height=`${a}px`,_t(e),A(e,()=>Hn(t))},50):Hn(t)}else o&&u.clear(o);Sn.relatedTarget=i,w(s,Sn)},Dn=t=>{const{element:s,content:e,tabContent:n,nav:o}=t,{tab:i,content:c}=o&&me.get(o)||{tab:null,content:null};let a=0;// istanbul ignore else @preserve n&&e&&g(e,R)&&([c,e].forEach(r=>{// istanbul ignore else @preserve T(r)&&f(r,"overflow-hidden")}),a=T(c)?c.scrollHeight:0),cs.relatedTarget=i,xn.relatedTarget=s,w(s,cs);// istanbul ignore else @preserve diff --git a/dist/bootstrap-native.cjs.map b/dist/bootstrap-native.cjs.map index 2e736313..0a5e7472 100644 --- a/dist/bootstrap-native.cjs.map +++ b/dist/bootstrap-native.cjs.map @@ -1 +1 @@ -{"version":3,"file":"bootstrap-native.cjs","sources":["../node_modules/.pnpm/@thednp+shorty@2.0.5/node_modules/@thednp/shorty/dist/shorty.mjs","../node_modules/.pnpm/@thednp+event-listener@2.0.6/node_modules/@thednp/event-listener/dist/event-listener.mjs","../src/strings/fadeClass.ts","../src/strings/showClass.ts","../src/strings/dataBsDismiss.ts","../src/strings/alertString.ts","../src/strings/alertComponent.ts","../src/version.ts","../src/components/base-component.ts","../src/components/alert.ts","../src/strings/activeClass.ts","../src/strings/dataBsToggle.ts","../src/strings/buttonString.ts","../src/strings/buttonComponent.ts","../src/components/button.ts","../src/strings/dataBsTarget.ts","../src/strings/carouselString.ts","../src/strings/carouselComponent.ts","../src/strings/dataBsParent.ts","../src/strings/dataBsContainer.ts","../src/util/getTargetElement.ts","../src/components/carousel.ts","../src/strings/collapsingClass.ts","../src/strings/collapseString.ts","../src/strings/collapseComponent.ts","../src/components/collapse.ts","../src/strings/dropdownClasses.ts","../src/strings/dropdownComponent.ts","../src/strings/dropdownMenuClass.ts","../src/util/isEmptyAnchor.ts","../src/components/dropdown.ts","../src/strings/modalString.ts","../src/strings/modalComponent.ts","../src/strings/offcanvasComponent.ts","../src/strings/fixedTopClass.ts","../src/strings/fixedBottomClass.ts","../src/strings/stickyTopClass.ts","../src/strings/positionStickyClass.ts","../src/util/scrollbar.ts","../src/strings/offcanvasString.ts","../src/util/popupContainer.ts","../src/util/backdrop.ts","../src/util/isVisible.ts","../src/components/modal.ts","../src/components/offcanvas.ts","../src/strings/popoverString.ts","../src/strings/popoverComponent.ts","../src/strings/tooltipString.ts","../src/util/getTipTemplate.ts","../src/util/tipClassPositions.ts","../src/util/styleTip.ts","../src/util/tooltipDefaults.ts","../src/strings/dataOriginalTitle.ts","../src/strings/tooltipComponent.ts","../src/util/setHtml.ts","../src/util/createTip.ts","../src/util/getElementContainer.ts","../src/components/tooltip.ts","../src/components/popover.ts","../src/strings/scrollspyString.ts","../src/strings/scrollspyComponent.ts","../src/components/scrollspy.ts","../src/strings/tabString.ts","../src/strings/tabComponent.ts","../src/components/tab.ts","../src/strings/toastString.ts","../src/strings/toastComponent.ts","../src/components/toast.ts","../src/util/init.ts"],"sourcesContent":["const he = \"aria-checked\", ye = \"aria-description\", we = \"aria-describedby\", Ae = \"aria-expanded\", Se = \"aria-haspopup\", X = \"aria-hidden\", Ne = \"aria-label\", Me = \"aria-labelledby\", Te = \"aria-modal\", ke = \"aria-pressed\", De = \"aria-selected\", Ce = \"aria-valuemin\", Oe = \"aria-valuemax\", Le = \"aria-valuenow\", Ie = \"aria-valuetext\", Y = \"abort\", Z = \"beforeunload\", $ = \"blur\", _ = \"change\", tt = \"contextmenu\", P = \"DOMContentLoaded\", et = \"DOMMouseScroll\", nt = \"error\", ot = \"focus\", st = \"focusin\", ct = \"focusout\", rt = \"gesturechange\", at = \"gestureend\", it = \"gesturestart\", ut = \"keydown\", lt = \"keypress\", dt = \"keyup\", pt = \"load\", ft = \"click\", mt = \"dblclick\", gt = \"mousedown\", vt = \"mouseup\", Et = \"hover\", bt = \"mouseenter\", ht = \"mouseleave\", yt = \"mousein\", wt = \"mouseout\", At = \"mouseover\", St = \"mousemove\", Nt = \"mousewheel\", Mt = \"move\", Tt = \"orientationchange\", kt = \"pointercancel\", Dt = \"pointerdown\", Ct = \"pointerleave\", Ot = \"pointermove\", Lt = \"pointerup\", It = \"readystatechange\", xt = \"reset\", zt = \"resize\", Vt = \"select\", Bt = \"selectend\", Ft = \"selectstart\", Ht = \"scroll\", Pt = \"submit\", Ut = \"touchstart\", Wt = \"touchmove\", Rt = \"touchcancel\", Qt = \"touchend\", jt = \"unload\", xe = {\n DOMContentLoaded: P,\n DOMMouseScroll: et,\n abort: Y,\n beforeunload: Z,\n blur: $,\n change: _,\n click: ft,\n contextmenu: tt,\n dblclick: mt,\n error: nt,\n focus: ot,\n focusin: st,\n focusout: ct,\n gesturechange: rt,\n gestureend: at,\n gesturestart: it,\n hover: Et,\n keydown: ut,\n keypress: lt,\n keyup: dt,\n load: pt,\n mousedown: gt,\n mousemove: St,\n mousein: yt,\n mouseout: wt,\n mouseenter: bt,\n mouseleave: ht,\n mouseover: At,\n mouseup: vt,\n mousewheel: Nt,\n move: Mt,\n orientationchange: Tt,\n pointercancel: kt,\n pointerdown: Dt,\n pointerleave: Ct,\n pointermove: Ot,\n pointerup: Lt,\n readystatechange: It,\n reset: xt,\n resize: zt,\n scroll: Ht,\n select: Vt,\n selectend: Bt,\n selectstart: Ft,\n submit: Pt,\n touchcancel: Rt,\n touchend: Qt,\n touchmove: Wt,\n touchstart: Ut,\n unload: jt\n}, ze = \"drag\", Ve = \"dragstart\", Be = \"dragenter\", Fe = \"dragleave\", He = \"dragover\", Pe = \"dragend\", Ue = \"loadstart\", We = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, Re = { down: \"mousedown\", up: \"mouseup\" }, Qe = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : (\n /* istanbul ignore next */\n [\"mouseover\", \"mouseout\"]\n), je = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, qe = { in: \"focusin\", out: \"focusout\" }, qt = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]', Ge = {\n Backspace: \"Backspace\",\n // 8\n Tab: \"Tab\",\n // 9\n Enter: \"Enter\",\n // 13\n Shift: \"Shift\",\n // 16\n Control: \"Control\",\n // 17\n Alt: \"Alt\",\n // 18\n Pause: \"Pause\",\n // 19\n CapsLock: \"CapsLock\",\n // 20\n Escape: \"Escape\",\n // 27\n Scape: \"Space\",\n // 32\n ArrowLeft: \"ArrowLeft\",\n // 37\n ArrowUp: \"ArrowUp\",\n // 38\n ArrowRight: \"ArrowRight\",\n // 39\n ArrowDown: \"ArrowDown\",\n // 40\n Insert: \"Insert\",\n // 45\n Delete: \"Delete\",\n // 46\n Meta: \"Meta\",\n // 91 windows key\n ContextMenu: \"ContextMenu\",\n // 93\n ScrollLock: \"ScrollLock\"\n // 145\n}, Ke = \"Alt\", Je = \"ArrowDown\", Xe = \"ArrowUp\", Ye = \"ArrowLeft\", Ze = \"ArrowRight\", $e = \"Backspace\", _e = \"CapsLock\", tn = \"Control\", en = \"Delete\", nn = \"Enter\", on = \"NumpadEnter\", sn = \"Escape\", cn = \"Insert\", rn = \"Meta\", an = \"Pause\", un = \"ScrollLock\", ln = \"Shift\", dn = \"Space\", pn = \"Tab\", Gt = \"animationDuration\", Kt = \"animationDelay\", U = \"animationName\", D = \"animationend\", Jt = \"transitionDuration\", Xt = \"transitionDelay\", C = \"transitionend\", W = \"transitionProperty\", fn = \"addEventListener\", mn = \"removeEventListener\", gn = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\"\n}, vn = \"offsetHeight\", En = \"offsetWidth\", bn = \"scrollHeight\", hn = \"scrollWidth\", yn = \"tabindex\", Yt = navigator.userAgentData, A = Yt, { userAgent: Zt } = navigator, S = Zt, z = /iPhone|iPad|iPod|Android/i;\nlet O = !1;\n// istanbul ignore else @preserve\nA ? O = A.brands.some((t) => z.test(t.brand)) : O = z.test(S);\nconst wn = O, V = /(iPhone|iPod|iPad)/, An = A ? A.brands.some((t) => V.test(t.brand)) : (\n /* istanbul ignore next @preserve */\n V.test(S)\n), Sn = S ? S.includes(\"Firefox\") : (\n /* istanbul ignore next @preserve */\n !1\n), { head: N } = document, Nn = [\"webkitPerspective\", \"perspective\"].some((t) => t in N.style), R = (t, e, n, o) => {\n const s = o || !1;\n t.addEventListener(e, n, s);\n}, Q = (t, e, n, o) => {\n const s = o || !1;\n t.removeEventListener(e, n, s);\n}, $t = (t, e, n, o) => {\n const s = (c) => {\n /* istanbul ignore else @preserve */\n (c.target === t || c.currentTarget === t) && (n.apply(t, [c]), Q(t, e, s, o));\n };\n R(t, e, s, o);\n}, _t = () => {\n}, Mn = (() => {\n let t = !1;\n try {\n const e = Object.defineProperty({}, \"passive\", {\n get: () => (t = !0, t)\n });\n // istanbul ignore next @preserve\n $t(document, P, _t, e);\n } catch {\n }\n return t;\n})(), Tn = [\"webkitTransform\", \"transform\"].some((t) => t in N.style), kn = \"ontouchstart\" in window || /* istanbul ignore next */\n\"msMaxTouchPoints\" in navigator, Dn = [\"webkitAnimation\", \"animation\"].some((t) => t in N.style), Cn = [\"webkitTransition\", \"transition\"].some((t) => t in N.style), j = (t, e) => t.getAttribute(e), On = (t, e, n) => e.getAttributeNS(t, n), te = (t, e) => t.hasAttribute(e), Ln = (t, e, n) => e.hasAttributeNS(t, n), In = (t, e, n) => t.setAttribute(e, n), xn = (t, e, n, o) => e.setAttributeNS(t, n, o), zn = (t, e) => t.removeAttribute(e), Vn = (t, e, n) => e.removeAttributeNS(t, n), Bn = (t, ...e) => {\n t.classList.add(...e);\n}, Fn = (t, ...e) => {\n t.classList.remove(...e);\n}, Hn = (t, e) => t.classList.contains(e), { body: Pn } = document, { documentElement: Un } = document, Wn = (t) => Array.from(t), v = (t) => t != null && typeof t == \"object\" || !1, i = (t) => v(t) && typeof t.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some((e) => t.nodeType === e) || !1, l = (t) => i(t) && t.nodeType === 1 || !1, E = /* @__PURE__ */ new Map(), L = {\n data: E,\n /**\n * Sets web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @param instance the component instance\n */\n set: (t, e, n) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n E.has(e) || E.set(e, /* @__PURE__ */ new Map()), E.get(e).set(t, n);\n },\n /**\n * Returns all instances for specified component.\n *\n * @param component the component's name or a unique key\n * @returns all the component instances\n */\n getAllFor: (t) => E.get(t) || null,\n /**\n * Returns the instance associated with the target.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @returns the instance\n */\n get: (t, e) => {\n if (!l(t) || !e) return null;\n const n = L.getAllFor(e);\n return t && n && n.get(t) || null;\n },\n /**\n * Removes web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n */\n remove: (t, e) => {\n const n = L.getAllFor(e);\n if (!n || !l(t)) return;\n n.delete(t);\n // istanbul ignore else @preserve\n n.size === 0 && E.delete(e);\n }\n}, Rn = (t, e) => L.get(t, e), M = (t) => typeof t == \"string\" || !1, q = (t) => v(t) && t.constructor.name === \"Window\" || !1, G = (t) => i(t) && t.nodeType === 9 || !1, d = (t) => q(t) ? t.document : G(t) ? t : i(t) ? t.ownerDocument : window.document, T = (t, ...e) => Object.assign(t, ...e), ee = (t) => {\n if (!t) return;\n if (M(t))\n return d().createElement(t);\n const { tagName: e } = t, n = ee(e);\n if (!n) return;\n const o = { ...t };\n return delete o.tagName, T(n, o);\n}, ne = (t, e) => {\n if (!t || !e) return;\n if (M(e))\n return d().createElementNS(t, e);\n const { tagName: n } = e, o = ne(t, n);\n if (!o) return;\n const s = { ...e };\n return delete s.tagName, T(o, s);\n}, K = (t, e) => t.dispatchEvent(e), Qn = (t, e, n) => n.indexOf(t) === e, g = (t, e) => {\n const n = getComputedStyle(t), o = e.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return n.getPropertyValue(o);\n}, oe = (t) => {\n const e = g(t, U), n = g(t, Kt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, se = (t) => {\n const e = g(t, U), n = g(t, Gt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, jn = (t, e) => {\n let n = 0;\n const o = new Event(D), s = se(t), c = oe(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(D, a), n = 1);\n };\n t.addEventListener(D, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else {\n // istanbul ignore next @preserve\n e.apply(t, [o]);\n }\n}, ce = (t) => {\n const e = g(t, W), n = g(t, Xt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, re = (t) => {\n const e = g(t, W), n = g(t, Jt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, qn = (t, e) => {\n let n = 0;\n const o = new Event(C), s = re(t), c = ce(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(C, a), n = 1);\n };\n t.addEventListener(C, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else\n e.apply(t, [o]);\n}, Gn = (t) => Float32Array.from(Array.from(t)), Kn = (t) => Float64Array.from(Array.from(t)), Jn = (t, e) => t.focus(e), B = (t) => [\"true\", !0].includes(t) ? !0 : [\"false\", !1].includes(t) ? !1 : [\"null\", \"\", null, void 0].includes(t) ? null : t !== \"\" && !Number.isNaN(+t) ? +t : t, w = (t) => Object.entries(t), ae = (t) => t.toLowerCase(), Xn = (t, e, n, o) => {\n const s = { ...n }, c = { ...t.dataset }, a = { ...e }, u = {}, p = \"title\";\n return w(c).forEach(([r, f]) => {\n const y = o && typeof r == \"string\" && r.includes(o) ? r.replace(o, \"\").replace(/[A-Z]/g, (J) => ae(J)) : (\n /* istanbul ignore next @preserve */\n r\n );\n u[y] = B(f);\n }), w(s).forEach(([r, f]) => {\n s[r] = B(f);\n }), w(e).forEach(([r, f]) => {\n // istanbul ignore else @preserve\n r in s ? a[r] = s[r] : r in u ? a[r] = u[r] : a[r] = r === p ? j(t, p) : f;\n }), a;\n}, Yn = (t, e) => v(t) && (Object.hasOwn(t, e) || e in t), Zn = (t) => Object.keys(t), $n = (t) => Object.values(t), _n = (t) => Object.fromEntries(t), to = (t, e) => {\n const n = new CustomEvent(t, {\n cancelable: !0,\n bubbles: !0\n });\n // istanbul ignore else @preserve\n return v(e) && T(n, e), n;\n}, eo = { passive: !0 }, no = (t) => t.offsetHeight, oo = (t, e) => {\n w(e).forEach(([n, o]) => {\n if (o && M(n) && n.includes(\"--\"))\n t.style.setProperty(n, o);\n else {\n const s = {};\n s[n] = o, T(t.style, s);\n }\n });\n}, I = (t) => v(t) && t.constructor.name === \"Map\" || !1, ie = (t) => typeof t == \"number\" || !1, m = /* @__PURE__ */ new Map(), so = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n *\n * @param element target element\n * @param callback the callback\n * @param delay the execution delay\n * @param key a unique key\n */\n set: (t, e, n, o) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n if (o && o.length) {\n // istanbul ignore else @preserve\n m.has(t) || m.set(t, /* @__PURE__ */ new Map()), m.get(t).set(o, setTimeout(e, n));\n } else\n m.set(t, setTimeout(e, n));\n },\n /**\n * Returns the timer associated with the target.\n *\n * @param element target element\n * @param key a unique\n * @returns the timer\n */\n get: (t, e) => {\n if (!l(t)) return null;\n const n = m.get(t);\n return e && n && I(n) ? n.get(e) || /* istanbul ignore next */\n null : ie(n) ? n : null;\n },\n /**\n * Clears the element's timer.\n *\n * @param element target element\n * @param key a unique key\n */\n clear: (t, e) => {\n if (!l(t)) return;\n const n = m.get(t);\n if (e && e.length && I(n)) {\n clearTimeout(n.get(e)), n.delete(e);\n // istanbul ignore else @preserve\n n.size === 0 && m.delete(t);\n } else\n clearTimeout(n), m.delete(t);\n }\n}, co = (t) => t.toUpperCase(), ue = (t, e) => (i(e) ? e : d()).querySelectorAll(t), x = /* @__PURE__ */ new Map();\nfunction le(t) {\n const { shiftKey: e, code: n } = t, o = d(this), s = [...ue(qt, this)].filter(\n (u) => !te(u, \"disabled\") && !j(u, X)\n );\n if (!s.length) return;\n const c = s[0], a = s[s.length - 1];\n // istanbul ignore else @preserve\n n === \"Tab\" && (e && o.activeElement === c ? (a.focus(), t.preventDefault()) : !e && o.activeElement === a && (c.focus(), t.preventDefault()));\n}\nconst de = (t) => x.has(t) === !0, ro = (t) => {\n const e = de(t);\n (e ? Q : R)(t, \"keydown\", le), e ? x.delete(t) : x.set(t, !0);\n}, h = (t, e) => {\n const { width: n, height: o, top: s, right: c, bottom: a, left: u } = t.getBoundingClientRect();\n let p = 1, r = 1;\n if (e && l(t)) {\n const { offsetWidth: f, offsetHeight: y } = t;\n p = f > 0 ? Math.round(n) / f : (\n /* istanbul ignore next */\n 1\n ), r = y > 0 ? Math.round(o) / y : (\n /* istanbul ignore next */\n 1\n );\n }\n return {\n width: n / p,\n height: o / r,\n top: s / r,\n right: c / p,\n bottom: a / r,\n left: u / p,\n x: u / p,\n y: s / r\n };\n}, ao = (t) => d(t).body, k = (t) => d(t).documentElement, io = (t) => d(t).head, uo = (t) => {\n const e = q(t), n = e ? t.scrollX : t.scrollLeft, o = e ? t.scrollY : t.scrollTop;\n return { x: n, y: o };\n}, pe = (t) => i(t) && t.constructor.name === \"ShadowRoot\" || !1, lo = (t) => t.nodeName === \"HTML\" ? t : l(t) && t.assignedSlot || // step into the shadow DOM of the parent of a slotted node\ni(t) && t.parentNode || // DOM Element detected\npe(t) && t.host || // ShadowRoot detected\nk(t), fe = (t) => {\n if (!l(t)) return !1;\n const { width: e, height: n } = h(t), { offsetWidth: o, offsetHeight: s } = t;\n return Math.round(e) !== o || Math.round(n) !== s;\n}, po = (t, e, n) => {\n const o = l(e), s = h(t, o && fe(e)), c = { x: 0, y: 0 };\n // istanbul ignore else @preserve\n if (o) {\n const a = h(e, !0);\n c.x = a.x + e.clientLeft, c.y = a.y + e.clientTop;\n }\n return {\n x: s.left + n.x - c.x,\n y: s.top + n.y - c.y,\n width: s.width,\n height: s.height\n };\n};\nlet F = 0, H = 0;\nconst b = /* @__PURE__ */ new Map(), me = (t, e) => {\n let n = e ? F : H;\n if (e) {\n const o = me(t), s = b.get(o) || /* @__PURE__ */ new Map();\n b.has(o) || b.set(o, s), I(s) && !s.has(e) ? (s.set(e, n), F += 1) : n = s.get(e);\n } else {\n const o = t.id || t;\n b.has(o) ? n = b.get(o) : (b.set(o, n), H += 1);\n }\n return n;\n}, fo = (t) => {\n var e;\n return t ? G(t) ? t.defaultView : i(t) ? (e = t == null ? void 0 : t.ownerDocument) == null ? void 0 : e.defaultView : t : window;\n}, ge = (t) => Array.isArray(t) || !1, mo = (t) => i(t) && t.nodeName === \"CANVAS\" || !1, ve = (t) => l(t) && !!t.shadowRoot || !1, go = (t) => i(t) && [1, 2, 3, 4, 5, 6, 7, 8].some((e) => t.nodeType === e) || !1, vo = (t) => {\n if (!i(t)) return !1;\n const { top: e, bottom: n } = h(t), { clientHeight: o } = k(t);\n return e <= o && n >= 0;\n}, Eo = (t) => {\n if (!i(t)) return !1;\n const { clientWidth: e, clientHeight: n } = k(t), { top: o, left: s, bottom: c, right: a } = h(t, !0);\n return o >= 0 && s >= 0 && c <= n && a <= e;\n}, bo = (t) => ge(t) && t.every(l) || !1, ho = (t) => typeof t == \"function\" || !1, yo = (t) => v(t) && t.constructor.name === \"HTMLCollection\" || !1, wo = (t) => l(t) && t.tagName === \"IMG\" || !1, Ao = (t) => {\n if (!M(t)) return !1;\n try {\n JSON.parse(t);\n } catch {\n return !1;\n }\n return !0;\n}, So = (t) => v(t) && t.constructor.name === \"WeakMap\" || !1, No = (t) => i(t) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some((e) => t.constructor.name.includes(e)) || !1, Mo = (t) => v(t) && t.constructor.name === \"NodeList\" || !1, To = (t) => k(t).dir === \"rtl\", ko = (t) => i(t) && t.constructor.name.includes(\"SVG\") || !1, Do = (t) => i(t) && [\"TABLE\", \"TD\", \"TH\"].includes(t.nodeName) || !1, Ee = (t, e) => t ? t.closest(e) || // break out of `ShadowRoot`\nEe(t.getRootNode().host, e) : null, Co = (t, e) => l(t) ? t : (i(e) ? e : d()).querySelector(t), be = (t, e) => (i(e) ? e : d()).getElementsByTagName(t), Oo = (t) => [...be(\"*\", t)].filter(ve), Lo = (t, e) => d(e).getElementById(t) || null, Io = (t, e) => (e && i(e) ? e : d()).getElementsByClassName(t), xo = (t, e) => t.matches(e), zo = \"2.0.5\";\nexport {\n Wn as ArrayFrom,\n P as DOMContentLoadedEvent,\n et as DOMMouseScrollEvent,\n L as Data,\n Gn as Float32ArrayFrom,\n Kn as Float64ArrayFrom,\n T as ObjectAssign,\n w as ObjectEntries,\n _n as ObjectFromEntries,\n Yn as ObjectHasOwn,\n Zn as ObjectKeys,\n $n as ObjectValues,\n so as Timer,\n Y as abortEvent,\n Bn as addClass,\n fn as addEventListener,\n Kt as animationDelay,\n Gt as animationDuration,\n D as animationEndEvent,\n U as animationName,\n he as ariaChecked,\n we as ariaDescribedBy,\n ye as ariaDescription,\n Ae as ariaExpanded,\n Se as ariaHasPopup,\n X as ariaHidden,\n Ne as ariaLabel,\n Me as ariaLabelledBy,\n Te as ariaModal,\n ke as ariaPressed,\n De as ariaSelected,\n Oe as ariaValueMax,\n Ce as ariaValueMin,\n Le as ariaValueNow,\n Ie as ariaValueText,\n Z as beforeunloadEvent,\n gn as bezierEasings,\n $ as blurEvent,\n _ as changeEvent,\n Ee as closest,\n tt as contextmenuEvent,\n to as createCustomEvent,\n ee as createElement,\n ne as createElementNS,\n K as dispatchEvent,\n Qn as distinct,\n Pn as documentBody,\n Un as documentElement,\n N as documentHead,\n ze as dragEvent,\n Pe as dragendEvent,\n Be as dragenterEvent,\n Fe as dragleaveEvent,\n He as dragoverEvent,\n Ve as dragstartEvent,\n jn as emulateAnimationEnd,\n qn as emulateTransitionEnd,\n nt as errorEvent,\n Jn as focus,\n ot as focusEvent,\n qe as focusEvents,\n qt as focusableSelector,\n st as focusinEvent,\n ct as focusoutEvent,\n rt as gesturechangeEvent,\n at as gestureendEvent,\n it as gesturestartEvent,\n j as getAttribute,\n On as getAttributeNS,\n h as getBoundingClientRect,\n Oo as getCustomElements,\n d as getDocument,\n ao as getDocumentBody,\n k as getDocumentElement,\n io as getDocumentHead,\n oe as getElementAnimationDelay,\n se as getElementAnimationDuration,\n Lo as getElementById,\n g as getElementStyle,\n ce as getElementTransitionDelay,\n re as getElementTransitionDuration,\n Io as getElementsByClassName,\n be as getElementsByTagName,\n Rn as getInstance,\n uo as getNodeScroll,\n lo as getParentNode,\n po as getRectRelativeToOffsetParent,\n me as getUID,\n fo as getWindow,\n te as hasAttribute,\n Ln as hasAttributeNS,\n Hn as hasClass,\n de as hasFocusTrap,\n An as isApple,\n ge as isArray,\n mo as isCanvas,\n ve as isCustomElement,\n G as isDocument,\n go as isElement,\n vo as isElementInScrollRange,\n Eo as isElementInViewport,\n bo as isElementsArray,\n Sn as isFirefox,\n ho as isFunction,\n yo as isHTMLCollection,\n l as isHTMLElement,\n wo as isHTMLImageElement,\n Ao as isJSON,\n I as isMap,\n No as isMedia,\n wn as isMobile,\n i as isNode,\n Mo as isNodeList,\n ie as isNumber,\n v as isObject,\n To as isRTL,\n ko as isSVGElement,\n fe as isScaledElement,\n pe as isShadowRoot,\n M as isString,\n Do as isTableElement,\n So as isWeakMap,\n q as isWindow,\n Ke as keyAlt,\n Je as keyArrowDown,\n Ye as keyArrowLeft,\n Ze as keyArrowRight,\n Xe as keyArrowUp,\n $e as keyBackspace,\n _e as keyCapsLock,\n tn as keyControl,\n en as keyDelete,\n nn as keyEnter,\n sn as keyEscape,\n cn as keyInsert,\n rn as keyMeta,\n on as keyNumpadEnter,\n an as keyPause,\n un as keyScrollLock,\n ln as keyShift,\n dn as keySpace,\n pn as keyTab,\n Ge as keyboardEventKeys,\n ut as keydownEvent,\n lt as keypressEvent,\n dt as keyupEvent,\n pt as loadEvent,\n Ue as loadstartEvent,\n xo as matches,\n Re as mouseClickEvents,\n Qe as mouseHoverEvents,\n We as mouseSwipeEvents,\n ft as mouseclickEvent,\n mt as mousedblclickEvent,\n gt as mousedownEvent,\n bt as mouseenterEvent,\n Et as mousehoverEvent,\n yt as mouseinEvent,\n ht as mouseleaveEvent,\n St as mousemoveEvent,\n wt as mouseoutEvent,\n At as mouseoverEvent,\n vt as mouseupEvent,\n Nt as mousewheelEvent,\n Mt as moveEvent,\n xe as nativeEvents,\n _t as noop,\n Xn as normalizeOptions,\n B as normalizeValue,\n Q as off,\n vn as offsetHeight,\n En as offsetWidth,\n R as on,\n $t as one,\n Tt as orientationchangeEvent,\n eo as passiveHandler,\n kt as pointercancelEvent,\n Dt as pointerdownEvent,\n Ct as pointerleaveEvent,\n Ot as pointermoveEvent,\n Lt as pointerupEvent,\n Co as querySelector,\n ue as querySelectorAll,\n It as readystatechangeEvent,\n no as reflow,\n zn as removeAttribute,\n Vn as removeAttributeNS,\n Fn as removeClass,\n mn as removeEventListener,\n xt as resetEvent,\n zt as resizeEvent,\n Ht as scrollEvent,\n bn as scrollHeight,\n hn as scrollWidth,\n Vt as selectEvent,\n Bt as selectendEvent,\n Ft as selectstartEvent,\n In as setAttribute,\n xn as setAttributeNS,\n oo as setElementStyle,\n Pt as submitEvent,\n Nn as support3DTransform,\n Dn as supportAnimation,\n Mn as supportPassive,\n kn as supportTouch,\n Tn as supportTransform,\n Cn as supportTransition,\n yn as tabindex,\n ae as toLowerCase,\n co as toUpperCase,\n ro as toggleFocusTrap,\n je as touchEvents,\n Rt as touchcancelEvent,\n Qt as touchendEvent,\n Wt as touchmoveEvent,\n Ut as touchstartEvent,\n Xt as transitionDelay,\n Jt as transitionDuration,\n C as transitionEndEvent,\n W as transitionProperty,\n jt as unloadEvent,\n S as userAgent,\n A as userAgentData,\n zo as version\n};\n//# sourceMappingURL=shorty.mjs.map\n","const e = {}, f = (t) => {\n const { type: c, currentTarget: i } = t;\n [...e[c]].forEach(([n, s]) => {\n /* istanbul ignore else @preserve */\n i === n && [...s].forEach(([o, a]) => {\n o.apply(n, [t]), typeof a == \"object\" && a.once && r(n, c, o, a);\n });\n });\n}, E = (t, c, i, n) => {\n /* istanbul ignore else @preserve */\n e[c] || (e[c] = /* @__PURE__ */ new Map());\n const s = e[c];\n /* istanbul ignore else @preserve */\n s.has(t) || s.set(t, /* @__PURE__ */ new Map());\n const o = s.get(t), { size: a } = o;\n o.set(i, n);\n /* istanbul ignore else @preserve */\n a || t.addEventListener(c, f, n);\n}, r = (t, c, i, n) => {\n const s = e[c], o = s && s.get(t), a = o && o.get(i), d = a !== void 0 ? a : n;\n /* istanbul ignore else @preserve */\n o && o.has(i) && o.delete(i);\n /* istanbul ignore else @preserve */\n s && (!o || !o.size) && s.delete(t);\n /* istanbul ignore else @preserve */\n (!s || !s.size) && delete e[c];\n /* istanbul ignore else @preserve */\n (!o || !o.size) && t.removeEventListener(\n c,\n f,\n d\n );\n}, g = E, M = r;\nexport {\n E as addListener,\n f as globalListener,\n M as off,\n g as on,\n e as registry,\n r as removeListener\n};\n//# sourceMappingURL=event-listener.mjs.map\n","/**\n * Global namespace for most components `fade` class.\n */\nconst fadeClass = 'fade';\nexport default fadeClass;\n","/**\n * Global namespace for most components `show` class.\n */\nconst showClass = 'show';\nexport default showClass;\n","/**\n * Global namespace for most components `dismiss` option.\n */\nconst dataBsDismiss = 'data-bs-dismiss';\nexport default dataBsDismiss;\n","/** @type {string} */\nconst alertString = 'alert';\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = 'Alert';\nexport default alertComponent;\n","import { version } from '../package.json';\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport { Data, isHTMLElement, isString, normalizeOptions, ObjectKeys, querySelector } from '@thednp/shorty';\n\nimport type { BaseOptions } from '../interface/baseComponent';\nimport Version from '../version';\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options =\n this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, 'bs')\n : // istanbul ignore next @preserve\n {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return 'BaseComponent';\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach(prop => {\n delete this[prop];\n });\n }\n}\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport fadeClass from '../strings/fadeClass';\nimport showClass from '../strings/showClass';\nimport dataBsDismiss from '../strings/dataBsDismiss';\nimport alertString from '../strings/alertString';\nimport alertComponent from '../strings/alertComponent';\nimport type { AlertEvent } from '../interface/alert';\n\nimport BaseComponent from './base-component';\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) => getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(`close.bs.${alertString}`);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(`closed.bs.${alertString}`);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/**\n * Global namespace for most components active class.\n */\nconst activeClass = 'active';\nexport default activeClass;\n","/**\n * Global namespace for most components `toggle` option.\n */\nconst dataBsToggle = 'data-bs-toggle';\nexport default dataBsToggle;\n","/** @type {string} */\nconst buttonString = 'button';\nexport default buttonString;\n","/** @type {string} */\nconst buttonComponent = 'Button';\nexport default buttonComponent;\n","/* Native JavaScript for Bootstrap 5 | Button\n---------------------------------------------*/\nimport {\n addClass,\n ariaPressed,\n getAttribute,\n getInstance,\n hasClass,\n mouseclickEvent,\n removeClass,\n setAttribute,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport activeClass from '../strings/activeClass';\nimport dataBsToggle from '../strings/dataBsToggle';\nimport buttonString from '../strings/buttonString';\nimport buttonComponent from '../strings/buttonComponent';\n\nimport BaseComponent from './base-component';\n\n// BUTTON PRIVATE GC\n// =================\nconst buttonSelector = `[${dataBsToggle}=\"${buttonString}\"]`;\n\n/**\n * Static method which returns an existing `Button` instance associated\n * to a target `Element`.\n */\nconst getButtonInstance = (element: HTMLElement) => getInstance',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) => getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n","/** @type {string} */\nconst scrollspyString = 'scrollspy';\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = 'ScrollSpy';\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n getWindow,\n hasClass,\n isHTMLElement,\n isWindow,\n passiveHandler,\n querySelector,\n removeClass,\n scrollEvent,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport activeClass from '../strings/activeClass';\nimport scrollspyString from '../strings/scrollspyString';\nimport scrollspyComponent from '../strings/scrollspyComponent';\n\nimport BaseComponent from './base-component';\nimport { ScrollSpyEvent, ScrollSpyOptions } from '../interface/scrollspy';\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) => getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } = self;\n const { offset } = options;\n const isWin = isWindow(scrollTarget as Node | Window);\n\n const links = target && getElementsByTagName('A', target);\n const scrollHEIGHT = scrollTarget\n ? getScrollHeight(scrollTarget)\n : // istanbul ignore next @preserve\n scrollHeight;\n\n self.scrollTop = isWin ? (scrollTarget as Window).scrollY : (scrollTarget as HTMLElement).scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n [...links].forEach(link => {\n href = getAttribute(link, 'href');\n targetItem =\n href && href.charAt(0) === '#' && href.slice(-1) !== '#' && querySelector(href, getDocument(element));\n\n if (targetItem) {\n self.items.push(link);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push((isWin ? rect.top + self.scrollTop : targetItem.offsetTop) - offset);\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: Node | Window) => {\n return isHTMLElement(scrollTarget as Node)\n ? (scrollTarget as HTMLElement).scrollHeight\n : getDocumentElement(scrollTarget as Node).scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return isWindow(scrollTarget as Node) ? (scrollTarget as Window).innerHeight : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName('A', target)].forEach(item => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, 'nav') || hasClass(parentItem, 'dropdown-menu')) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach(menuItem => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement | Window;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(options.target as HTMLElement | string, getDocument(element));\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight ? element : getWindow(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // add event handlers\n this._toggleEventListeners(true);\n\n this.refresh();\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === 'undefined' || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /**\n * Toggles on/off the component event listener.\n *\n * @param add when `true`, listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.scrollTarget as EventTarget, scrollEvent, this.refresh, passiveHandler);\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst tabString = 'tab';\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = 'Tab';\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport collapsingClass from '../strings/collapsingClass';\nimport activeClass from '../strings/activeClass';\nimport fadeClass from '../strings/fadeClass';\nimport showClass from '../strings/showClass';\nimport dropdownClasses from '../strings/dropdownClasses';\nimport dataBsToggle from '../strings/dataBsToggle';\nimport tabString from '../strings/tabString';\nimport tabComponent from '../strings/tabComponent';\n\nimport getTargetElement from '../util/getTargetElement';\nimport BaseComponent from './base-component';\nimport type { /* TabOptions, */ TabEvent } from '../interface/tab';\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) => getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(`show.bs.${tabString}`);\nconst shownTabEvent = createCustomEvent(`shown.bs.${tabString}`);\nconst hideTabEvent = createCustomEvent(`hide.bs.${tabString}`);\nconst hiddenTabEvent = createCustomEvent(`hidden.bs.${tabString}`);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = '';\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) || { tab: null }; // istanbul ignore next @preserve\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) || { currentHeight: 0, nextHeight: 0 }; // istanbul ignore next @preserve\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) || {\n // istanbul ignore next @preserve\n tab: null,\n content: null,\n };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach(c => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, 'overflow-hidden');\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight\n : // istanbul ignore next @preserve\n 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach(c => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, 'overflow-hidden');\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (self: Tab): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (activeTabs.length === 1 && !dropdownClasses.some(c => hasClass(activeTabs[0].parentElement as HTMLElement, c))) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement) ? getTargetElement(tab as HTMLElement) : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(',.')}`);\n return dropdown ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown) : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, '.nav');\n const container = closest(content, '.tab-content');\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, 'true');\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, 'true');\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, 'false');\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (content && (hasClass(content, fadeClass) || (nextContent && hasClass(nextContent, fadeClass)))) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst toastString = 'toast';\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = 'Toast';\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport fadeClass from '../strings/fadeClass';\nimport showClass from '../strings/showClass';\nimport dataBsDismiss from '../strings/dataBsDismiss';\nimport dataBsToggle from '../strings/dataBsToggle';\nimport toastString from '../strings/toastString';\nimport toastComponent from '../strings/toastComponent';\nimport getTargetElement from '../util/getTargetElement';\nimport BaseComponent from './base-component';\nimport { ToastEvent, ToastOptions } from '../interface/toast';\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = 'showing';\n/** @deprecated */\nconst hideClass = 'hide';\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) => getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(`show.bs.${toastString}`);\nconst shownToastEvent = createCustomEvent, ToastEvent>(`shown.bs.${toastString}`);\nconst hideToastEvent = createCustomEvent, ToastEvent>(`hide.bs.${toastString}`);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(`hidden.bs.${toastString}`);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === 'A') e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (self && element !== relatedTarget && !element.contains(relatedTarget as Node)) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [...querySelectorAll(toastToggleSelector, getDocument(element))].filter(\n btn => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(e =>\n action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach(btn => action(btn, mouseclickEvent, toastClickHandler));\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n","import { Data, getElementsByTagName, matches } from '@thednp/shorty';\n\nimport { addListener } from '@thednp/event-listener';\n\nimport Alert from '../components/alert';\nimport Button from '../components/button';\nimport Carousel from '../components/carousel';\nimport Collapse from '../components/collapse';\nimport Dropdown from '../components/dropdown';\nimport Modal from '../components/modal';\nimport Offcanvas from '../components/offcanvas';\nimport Popover from '../components/popover';\nimport ScrollSpy from '../components/scrollspy';\nimport Tab from '../components/tab';\nimport Toast from '../components/toast';\nimport Tooltip from '../components/tooltip';\n\nconst componentsList = new Map<\n string,\n | typeof Alert\n | typeof Button\n | typeof Carousel\n | typeof Collapse\n | typeof Dropdown\n | typeof Modal\n | typeof Offcanvas\n | typeof Popover\n | typeof ScrollSpy\n | typeof Tab\n | typeof Toast\n | typeof Tooltip\n>();\n\ntype Component =\n | Alert\n | Button\n | Carousel\n | Collapse\n | Dropdown\n | Modal\n | Offcanvas\n | Popover\n | ScrollSpy\n | Tab\n | Toast\n | Tooltip;\n\n[Alert, Button, Carousel, Collapse, Dropdown, Modal, Offcanvas, Popover, ScrollSpy, Tab, Toast, Tooltip].forEach(c =>\n componentsList.set(c.prototype.name, c),\n);\n\n/**\n * Initialize all matched `Element`s for one component.\n *\n * @param callback\n * @param collection\n */\nconst initComponentDataAPI = (\n callback: (el: HTMLElement) => Component,\n collection: HTMLCollectionOf | HTMLElement[],\n) => {\n [...collection].forEach(x => callback(x));\n};\n\n/**\n * Remove one component from a target container element or all in the page.\n *\n * @param component the component name\n * @param context parent `Node`\n */\nconst removeComponentDataAPI = (component: string, context: ParentNode) => {\n const compData = Data.getAllFor(component) as Map;\n\n if (compData) {\n [...compData].forEach(([element, instance]) => {\n if (context.contains(element)) {\n (instance as T & { dispose: () => void }).dispose();\n }\n });\n }\n};\n\n/**\n * Initialize all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const initCallback = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n const elemCollection = [...getElementsByTagName('*', lookUp)];\n\n componentsList.forEach(cs => {\n const { init, selector } = cs;\n initComponentDataAPI(\n init,\n elemCollection.filter(item => matches(item, selector)),\n );\n });\n};\n\n/**\n * Remove all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const removeDataAPI = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n\n componentsList.forEach(comp => {\n removeComponentDataAPI(comp.prototype.name, lookUp);\n });\n};\n\n// Bulk initialize all components\nif (document.body) initCallback();\nelse {\n addListener(document, 'DOMContentLoaded', () => initCallback(), {\n once: true,\n });\n}\n"],"names":["we","Ae","X","Te","ke","De","P","ot","st","ct","ut","dt","ft","gt","Et","bt","ht","Dt","Ot","Lt","zt","Ht","Ut","Ve","qt","Je","Xe","Ye","Ze","sn","Jt","Xt","C","W","Yt","A","Zt","S","z","V","An","N","R","e","n","o","s","Q","$t","c","_t","j","te","In","zn","Bn","Fn","Hn","v","i","l","E","L","Rn","M","q","G","d","T","ee","K","g","ce","re","qn","a","u","Jn","B","w","ae","Xn","p","r","f","y","J","Zn","to","eo","no","oo","I","ie","m","so","ue","x","le","de","ro","h","ao","k","pe","lo","F","H","b","me","fo","ge","vo","ho","Mo","To","Do","Ee","Co","be","Io","xo","fadeClass","showClass","dataBsDismiss","alertString","alertComponent","Version","version","BaseComponent","target","config","__publicField","element","isHTMLElement","isString","querySelector","prevInstance","Data","ObjectKeys","normalizeOptions","prop","alertSelector","alertDismissSelector","getAlertInstance","getInstance","alertInitCallback","Alert","closeAlertEvent","createCustomEvent","closedAlertEvent","alertTransitionEnd","self","dispatchEvent","hasClass","removeClass","emulateTransitionEnd","add","action","addListener","removeListener","dismiss","close","mouseclickEvent","activeClass","dataBsToggle","buttonString","buttonComponent","buttonSelector","getButtonInstance","buttonInitCallback","Button","isActive","getAttribute","addClass","setAttribute","ariaPressed","dataBsTarget","carouselString","carouselComponent","dataBsParent","dataBsContainer","getTargetElement","targetAttr","doc","getDocument","att","attValue","closest","carouselSelector","carouselItem","dataBsSlideTo","dataBsSlide","pausedClass","carouselDefaults","getCarouselInstance","carouselInitCallback","Carousel","startX","currentX","endX","carouselSlideEvent","carouselSlidEvent","carouselTransitionEndHandler","index","direction","slides","options","activeItem","getActiveIndex","orientation","directionClass","Timer","carouselPauseHandler","carouselResumeHandler","carouselIndicatorHandler","newIndex","carouselControlsHandler","carouselKeyHandler","code","querySelectorAll","isElementInScrollRange","RTL","isRTL","arrowKeyNext","keyArrowLeft","keyArrowRight","arrowKeyPrev","carouselDragHandler","carouselPointerDownHandler","controls","indicators","el","toggleCarouselTouchHandlers","carouselPointerMoveHandler","carouselPointerUpHandler","_a","activateCarouselIndicator","pointermoveEvent","passiveHandler","pointerupEvent","touch","pause","interval","keyboard","mouseenterEvent","mouseleaveEvent","pointerdownEvent","touchstartEvent","dragstartEvent","arrow","indicator","keydownEvent","getElementsByClassName","activeIndex","transitionItem","matches","ar","isPaused","idx","next","eventProperties","ObjectAssign","getElementTransitionDuration","reflow","isAnimating","clone","collapsingClass","collapseString","collapseComponent","collapseSelector","collapseToggleSelector","collapseDefaults","getCollapseInstance","collapseInitCallback","Collapse","showCollapseEvent","shownCollapseEvent","hideCollapseEvent","hiddenCollapseEvent","expandCollapse","parent","triggers","noop","setElementStyle","btn","ariaExpanded","collapseContent","collapseClickHandler","trigger","activeCollapse","activeCollapseInstance","dropdownMenuClasses","dropdownComponent","dropdownMenuClass","isEmptyAnchor","parentAnchor","hasAttribute","dropdownString","dropupString","dropstartString","dropendString","dropdownClasses","dropdownSelector","getDropdownInstance","dropdownInitCallback","Dropdown","dropdownMenuEndClass","verticalClass","horizontalClass","menuFocusTags","dropdownDefaults","showDropdownEvent","shownDropdownEvent","hideDropdownEvent","hiddenDropdownEvent","updatedDropdownEvent","styleDropdown","menu","parentElement","offset","getElementStyle","menuEnd","style","positionClass","dropdownMargin","dropdownPosition","menuWidth","menuHeight","clientWidth","clientHeight","getDocumentElement","targetLeft","targetTop","targetWidth","targetHeight","getBoundingClientRect","leftFullExceed","rightFullExceed","bottomExceed","bottomFullExceed","topExceed","leftExceed","rightExceed","posAjust","margins","getMenuItems","firstElementChild","toggleDropdownDismiss","dropdownDismissHandler","focusEvent","dropdownPreventScroll","keyupEvent","dropdownKeyHandler","scrollEvent","resizeEvent","ev","getWindow","dropdownLayoutHandler","getCurrentOpenDropdown","currentParent","type","isForm","mousedownEvent","dropdownClickHandler","keyArrowDown","keyArrowUp","activeElement","open","menuItems","focus","keyEscape","currentElement","currentInstance","modalString","modalComponent","offcanvasComponent","fixedTopClass","fixedBottomClass","stickyTopClass","positionStickyClass","getFixedItems","resetScrollbar","bd","getDocumentBody","fixedItems","fixed","measureScrollbar","innerWidth","setScrollbar","overflow","bodyPad","sbWidth","itemPadValue","itemMValue","offcanvasString","popupContainer","createElement","appendPopup","customContainer","containerIsBody","isNode","lookup","BODY","removePopup","hasPopup","backdropString","modalBackdropClass","offcanvasBackdropClass","modalActiveSelector","offcanvasActiveSelector","overlay","getCurrentOpen","toggleOverlayType","isModal","targetClass","appendOverlay","hasFade","showOverlay","hideOverlay","removeOverlay","isVisible","modalSelector","modalToggleSelector","modalDismissSelector","modalStaticClass","modalDefaults","getModalInstance","modalInitCallback","Modal","showModalEvent","shownModalEvent","hideModalEvent","hiddenModalEvent","setModalScrollbar","scrollbarWidth","scrollHeight","modalHeight","modalScrollHeight","modalOverflow","padStyle","toggleModalDismiss","update","modalDismissHandler","modalKeyHandler","afterModalHide","relatedTarget","focusElement","toggleFocusTrap","afterModalShow","beforeModalShow","removeAttribute","ariaHidden","ariaModal","beforeModalHide","modalClickHandler","currentTarget","isStatic","modalDialog","backdrop","selectedText","targetInsideDialog","staticTransitionEnd","duration","overlayDelay","currentOpen","that","callback","offcanvasSelector","offcanvasToggleSelector","offcanvasDismissSelector","offcanvasTogglingClass","offcanvasDefaults","getOffcanvasInstance","offcanvasInitCallback","Offcanvas","showOffcanvasEvent","shownOffcanvasEvent","hideOffcanvasEvent","hiddenOffcanvasEvent","setOffCanvasScrollbar","toggleOffCanvasDismiss","offcanvasKeyDismissHandler","offcanvasDismissHandler","beforeOffcanvasShow","showOffcanvasComplete","beforeOffcanvasHide","hideOffcanvasComplete","offcanvasTriggerHandler","offCanvasDismiss","selection","visibleTrigger","isOpen","popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","body","tipClassPositions","styleTip","tipClasses","tooltip","container","tipPositions","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","placement","parentCWidth","parentOWidth","fixedParent","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","horizontals","verticals","updatedTooltipEvent","toLowerCase","tooltipDefaults","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","dirty","isFunction","tempDocument","isNodeList","isArray","createTip","id","title","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","tooltipHeader","tooltipBody","tempTitle","tempContent","tempBtn","getElementContainer","majorBlockTags","containers","parentNode","getParentNode","isShadowRoot","isTableElement","tooltipSelector","titleAttr","getTooltipInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","ariaDescribedBy","hasTip","disposeTooltipComplete","toggleTooltipTitle","toggleTooltipAction","tooltipShownAction","shownTooltipEvent","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","offsetHeight","parentModal","parentOffcanvas","win","scrollTarget","titleAtt","tr","mousehoverEvent","focusinEvent","focusoutEvent","isApple","tipComponent","elem","getUID","position","outTimer","tipContainer","showTooltipEvent","delay","hideTooltipEvent","enabled","popoverSelector","popoverDefaults","getPopoverInstance","popoverInitCallback","Popover","scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","updateSpyTargets","itemsLength","isWin","isWindow","links","getElementsByTagName","scrollHEIGHT","getScrollHeight","href","targetItem","rect","getOffsetHeight","link","clear","item","activate","parents","parentItem","menuItem","parentLink","scrollTop","maxScroll","items","newActiveItem","offsets","tabString","tabComponent","tabSelector","getTabInstance","tabInitCallback","Tab","showTabEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","tabContent","nav","triggerTabShow","nextContent","tab","currentHeight","nextHeight","triggerTabHide","getActiveTab","activeTabs","getParentDropdown","dropdown","tabClickHandler","firstTab","firstTabContent","ariaSelected","activeDropdown","toggleTab","toastString","toastComponent","toastSelector","toastDismissSelector","toastToggleSelector","showingClass","hideClass","toastDefaults","getToastInstance","toastInitCallback","Toast","showToastEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","hideToastComplete","hideToast","showToast","toastClickHandler","interactiveToastHandler","isShown","hide","componentsList","initComponentDataAPI","collection","removeComponentDataAPI","component","context","compData","instance","initCallback","lookUp","elemCollection","cs","init","selector","removeDataAPI","comp"],"mappings":"wPAAK,MAA+CA,GAAK,mBAAoBC,GAAK,gBAAuCC,GAAI,cAA0DC,GAAK,aAAcC,GAAK,eAAgBC,GAAK,gBAAyLC,GAAI,mBAAyDC,GAAK,QAASC,GAAK,UAAWC,GAAK,WAA0EC,GAAK,UAA4BC,GAAK,QAAsBC,EAAK,QAA0BC,GAAK,YAA6BC,GAAK,QAASC,GAAK,aAAcC,GAAK,aAAmKC,GAAK,cAAoCC,GAAK,cAAeC,GAAK,YAAoDC,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CACvD,CACD,CACH,EAOaC,GAAiBT,GAAyB,CACrD,MAAMI,EAASJ,GAAWA,EAAQ,SAAWA,EAAU,SAEvDL,GAAe,QAAgBe,GAAA,CACNZ,GAAAY,EAAK,UAAU,KAAMN,CAAM,CAAA,CACnD,CACH,EAGI,SAAS,KAAmBD,KAE9B1iB,EAAY,SAAU,mBAAoB,IAAM0iB,GAAA,EAAgB,CAC9D,KAAM,EAAA,CACP","x_google_ignoreList":[0,1]} \ No newline at end of file +{"version":3,"file":"bootstrap-native.cjs","sources":["../node_modules/.pnpm/@thednp+shorty@2.0.5/node_modules/@thednp/shorty/dist/shorty.mjs","../node_modules/.pnpm/@thednp+event-listener@2.0.6/node_modules/@thednp/event-listener/dist/event-listener.mjs","../src/strings/fadeClass.ts","../src/strings/showClass.ts","../src/strings/dataBsDismiss.ts","../src/strings/alertString.ts","../src/strings/alertComponent.ts","../src/version.ts","../src/components/base-component.ts","../src/components/alert.ts","../src/strings/activeClass.ts","../src/strings/dataBsToggle.ts","../src/strings/buttonString.ts","../src/strings/buttonComponent.ts","../src/components/button.ts","../src/strings/dataBsTarget.ts","../src/strings/carouselString.ts","../src/strings/carouselComponent.ts","../src/strings/dataBsParent.ts","../src/strings/dataBsContainer.ts","../src/util/getTargetElement.ts","../src/components/carousel.ts","../src/strings/collapsingClass.ts","../src/strings/collapseString.ts","../src/strings/collapseComponent.ts","../src/components/collapse.ts","../src/strings/dropdownClasses.ts","../src/strings/dropdownComponent.ts","../src/strings/dropdownMenuClass.ts","../src/util/isEmptyAnchor.ts","../src/components/dropdown.ts","../src/strings/modalString.ts","../src/strings/modalComponent.ts","../src/strings/offcanvasComponent.ts","../src/strings/fixedTopClass.ts","../src/strings/fixedBottomClass.ts","../src/strings/stickyTopClass.ts","../src/strings/positionStickyClass.ts","../src/util/scrollbar.ts","../src/strings/offcanvasString.ts","../src/util/popupContainer.ts","../src/util/backdrop.ts","../src/util/isVisible.ts","../src/components/modal.ts","../src/components/offcanvas.ts","../src/strings/popoverString.ts","../src/strings/popoverComponent.ts","../src/strings/tooltipString.ts","../src/util/getTipTemplate.ts","../src/util/tipClassPositions.ts","../src/util/styleTip.ts","../src/util/tooltipDefaults.ts","../src/strings/dataOriginalTitle.ts","../src/strings/tooltipComponent.ts","../src/util/setHtml.ts","../src/util/createTip.ts","../src/util/getElementContainer.ts","../src/components/tooltip.ts","../src/components/popover.ts","../src/strings/scrollspyString.ts","../src/strings/scrollspyComponent.ts","../src/components/scrollspy.ts","../src/strings/tabString.ts","../src/strings/tabComponent.ts","../src/components/tab.ts","../src/strings/toastString.ts","../src/strings/toastComponent.ts","../src/components/toast.ts","../src/util/init.ts"],"sourcesContent":["const he = \"aria-checked\", ye = \"aria-description\", we = \"aria-describedby\", Ae = \"aria-expanded\", Se = \"aria-haspopup\", X = \"aria-hidden\", Ne = \"aria-label\", Me = \"aria-labelledby\", Te = \"aria-modal\", ke = \"aria-pressed\", De = \"aria-selected\", Ce = \"aria-valuemin\", Oe = \"aria-valuemax\", Le = \"aria-valuenow\", Ie = \"aria-valuetext\", Y = \"abort\", Z = \"beforeunload\", $ = \"blur\", _ = \"change\", tt = \"contextmenu\", P = \"DOMContentLoaded\", et = \"DOMMouseScroll\", nt = \"error\", ot = \"focus\", st = \"focusin\", ct = \"focusout\", rt = \"gesturechange\", at = \"gestureend\", it = \"gesturestart\", ut = \"keydown\", lt = \"keypress\", dt = \"keyup\", pt = \"load\", ft = \"click\", mt = \"dblclick\", gt = \"mousedown\", vt = \"mouseup\", Et = \"hover\", bt = \"mouseenter\", ht = \"mouseleave\", yt = \"mousein\", wt = \"mouseout\", At = \"mouseover\", St = \"mousemove\", Nt = \"mousewheel\", Mt = \"move\", Tt = \"orientationchange\", kt = \"pointercancel\", Dt = \"pointerdown\", Ct = \"pointerleave\", Ot = \"pointermove\", Lt = \"pointerup\", It = \"readystatechange\", xt = \"reset\", zt = \"resize\", Vt = \"select\", Bt = \"selectend\", Ft = \"selectstart\", Ht = \"scroll\", Pt = \"submit\", Ut = \"touchstart\", Wt = \"touchmove\", Rt = \"touchcancel\", Qt = \"touchend\", jt = \"unload\", xe = {\n DOMContentLoaded: P,\n DOMMouseScroll: et,\n abort: Y,\n beforeunload: Z,\n blur: $,\n change: _,\n click: ft,\n contextmenu: tt,\n dblclick: mt,\n error: nt,\n focus: ot,\n focusin: st,\n focusout: ct,\n gesturechange: rt,\n gestureend: at,\n gesturestart: it,\n hover: Et,\n keydown: ut,\n keypress: lt,\n keyup: dt,\n load: pt,\n mousedown: gt,\n mousemove: St,\n mousein: yt,\n mouseout: wt,\n mouseenter: bt,\n mouseleave: ht,\n mouseover: At,\n mouseup: vt,\n mousewheel: Nt,\n move: Mt,\n orientationchange: Tt,\n pointercancel: kt,\n pointerdown: Dt,\n pointerleave: Ct,\n pointermove: Ot,\n pointerup: Lt,\n readystatechange: It,\n reset: xt,\n resize: zt,\n scroll: Ht,\n select: Vt,\n selectend: Bt,\n selectstart: Ft,\n submit: Pt,\n touchcancel: Rt,\n touchend: Qt,\n touchmove: Wt,\n touchstart: Ut,\n unload: jt\n}, ze = \"drag\", Ve = \"dragstart\", Be = \"dragenter\", Fe = \"dragleave\", He = \"dragover\", Pe = \"dragend\", Ue = \"loadstart\", We = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, Re = { down: \"mousedown\", up: \"mouseup\" }, Qe = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : (\n /* istanbul ignore next */\n [\"mouseover\", \"mouseout\"]\n), je = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, qe = { in: \"focusin\", out: \"focusout\" }, qt = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]', Ge = {\n Backspace: \"Backspace\",\n // 8\n Tab: \"Tab\",\n // 9\n Enter: \"Enter\",\n // 13\n Shift: \"Shift\",\n // 16\n Control: \"Control\",\n // 17\n Alt: \"Alt\",\n // 18\n Pause: \"Pause\",\n // 19\n CapsLock: \"CapsLock\",\n // 20\n Escape: \"Escape\",\n // 27\n Scape: \"Space\",\n // 32\n ArrowLeft: \"ArrowLeft\",\n // 37\n ArrowUp: \"ArrowUp\",\n // 38\n ArrowRight: \"ArrowRight\",\n // 39\n ArrowDown: \"ArrowDown\",\n // 40\n Insert: \"Insert\",\n // 45\n Delete: \"Delete\",\n // 46\n Meta: \"Meta\",\n // 91 windows key\n ContextMenu: \"ContextMenu\",\n // 93\n ScrollLock: \"ScrollLock\"\n // 145\n}, Ke = \"Alt\", Je = \"ArrowDown\", Xe = \"ArrowUp\", Ye = \"ArrowLeft\", Ze = \"ArrowRight\", $e = \"Backspace\", _e = \"CapsLock\", tn = \"Control\", en = \"Delete\", nn = \"Enter\", on = \"NumpadEnter\", sn = \"Escape\", cn = \"Insert\", rn = \"Meta\", an = \"Pause\", un = \"ScrollLock\", ln = \"Shift\", dn = \"Space\", pn = \"Tab\", Gt = \"animationDuration\", Kt = \"animationDelay\", U = \"animationName\", D = \"animationend\", Jt = \"transitionDuration\", Xt = \"transitionDelay\", C = \"transitionend\", W = \"transitionProperty\", fn = \"addEventListener\", mn = \"removeEventListener\", gn = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\"\n}, vn = \"offsetHeight\", En = \"offsetWidth\", bn = \"scrollHeight\", hn = \"scrollWidth\", yn = \"tabindex\", Yt = navigator.userAgentData, A = Yt, { userAgent: Zt } = navigator, S = Zt, z = /iPhone|iPad|iPod|Android/i;\nlet O = !1;\n// istanbul ignore else @preserve\nA ? O = A.brands.some((t) => z.test(t.brand)) : O = z.test(S);\nconst wn = O, V = /(iPhone|iPod|iPad)/, An = A ? A.brands.some((t) => V.test(t.brand)) : (\n /* istanbul ignore next @preserve */\n V.test(S)\n), Sn = S ? S.includes(\"Firefox\") : (\n /* istanbul ignore next @preserve */\n !1\n), { head: N } = document, Nn = [\"webkitPerspective\", \"perspective\"].some((t) => t in N.style), R = (t, e, n, o) => {\n const s = o || !1;\n t.addEventListener(e, n, s);\n}, Q = (t, e, n, o) => {\n const s = o || !1;\n t.removeEventListener(e, n, s);\n}, $t = (t, e, n, o) => {\n const s = (c) => {\n /* istanbul ignore else @preserve */\n (c.target === t || c.currentTarget === t) && (n.apply(t, [c]), Q(t, e, s, o));\n };\n R(t, e, s, o);\n}, _t = () => {\n}, Mn = (() => {\n let t = !1;\n try {\n const e = Object.defineProperty({}, \"passive\", {\n get: () => (t = !0, t)\n });\n // istanbul ignore next @preserve\n $t(document, P, _t, e);\n } catch {\n }\n return t;\n})(), Tn = [\"webkitTransform\", \"transform\"].some((t) => t in N.style), kn = \"ontouchstart\" in window || /* istanbul ignore next */\n\"msMaxTouchPoints\" in navigator, Dn = [\"webkitAnimation\", \"animation\"].some((t) => t in N.style), Cn = [\"webkitTransition\", \"transition\"].some((t) => t in N.style), j = (t, e) => t.getAttribute(e), On = (t, e, n) => e.getAttributeNS(t, n), te = (t, e) => t.hasAttribute(e), Ln = (t, e, n) => e.hasAttributeNS(t, n), In = (t, e, n) => t.setAttribute(e, n), xn = (t, e, n, o) => e.setAttributeNS(t, n, o), zn = (t, e) => t.removeAttribute(e), Vn = (t, e, n) => e.removeAttributeNS(t, n), Bn = (t, ...e) => {\n t.classList.add(...e);\n}, Fn = (t, ...e) => {\n t.classList.remove(...e);\n}, Hn = (t, e) => t.classList.contains(e), { body: Pn } = document, { documentElement: Un } = document, Wn = (t) => Array.from(t), v = (t) => t != null && typeof t == \"object\" || !1, i = (t) => v(t) && typeof t.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some((e) => t.nodeType === e) || !1, l = (t) => i(t) && t.nodeType === 1 || !1, E = /* @__PURE__ */ new Map(), L = {\n data: E,\n /**\n * Sets web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @param instance the component instance\n */\n set: (t, e, n) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n E.has(e) || E.set(e, /* @__PURE__ */ new Map()), E.get(e).set(t, n);\n },\n /**\n * Returns all instances for specified component.\n *\n * @param component the component's name or a unique key\n * @returns all the component instances\n */\n getAllFor: (t) => E.get(t) || null,\n /**\n * Returns the instance associated with the target.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @returns the instance\n */\n get: (t, e) => {\n if (!l(t) || !e) return null;\n const n = L.getAllFor(e);\n return t && n && n.get(t) || null;\n },\n /**\n * Removes web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n */\n remove: (t, e) => {\n const n = L.getAllFor(e);\n if (!n || !l(t)) return;\n n.delete(t);\n // istanbul ignore else @preserve\n n.size === 0 && E.delete(e);\n }\n}, Rn = (t, e) => L.get(t, e), M = (t) => typeof t == \"string\" || !1, q = (t) => v(t) && t.constructor.name === \"Window\" || !1, G = (t) => i(t) && t.nodeType === 9 || !1, d = (t) => q(t) ? t.document : G(t) ? t : i(t) ? t.ownerDocument : window.document, T = (t, ...e) => Object.assign(t, ...e), ee = (t) => {\n if (!t) return;\n if (M(t))\n return d().createElement(t);\n const { tagName: e } = t, n = ee(e);\n if (!n) return;\n const o = { ...t };\n return delete o.tagName, T(n, o);\n}, ne = (t, e) => {\n if (!t || !e) return;\n if (M(e))\n return d().createElementNS(t, e);\n const { tagName: n } = e, o = ne(t, n);\n if (!o) return;\n const s = { ...e };\n return delete s.tagName, T(o, s);\n}, K = (t, e) => t.dispatchEvent(e), Qn = (t, e, n) => n.indexOf(t) === e, g = (t, e) => {\n const n = getComputedStyle(t), o = e.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return n.getPropertyValue(o);\n}, oe = (t) => {\n const e = g(t, U), n = g(t, Kt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, se = (t) => {\n const e = g(t, U), n = g(t, Gt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, jn = (t, e) => {\n let n = 0;\n const o = new Event(D), s = se(t), c = oe(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(D, a), n = 1);\n };\n t.addEventListener(D, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else {\n // istanbul ignore next @preserve\n e.apply(t, [o]);\n }\n}, ce = (t) => {\n const e = g(t, W), n = g(t, Xt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, re = (t) => {\n const e = g(t, W), n = g(t, Jt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, qn = (t, e) => {\n let n = 0;\n const o = new Event(C), s = re(t), c = ce(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(C, a), n = 1);\n };\n t.addEventListener(C, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else\n e.apply(t, [o]);\n}, Gn = (t) => Float32Array.from(Array.from(t)), Kn = (t) => Float64Array.from(Array.from(t)), Jn = (t, e) => t.focus(e), B = (t) => [\"true\", !0].includes(t) ? !0 : [\"false\", !1].includes(t) ? !1 : [\"null\", \"\", null, void 0].includes(t) ? null : t !== \"\" && !Number.isNaN(+t) ? +t : t, w = (t) => Object.entries(t), ae = (t) => t.toLowerCase(), Xn = (t, e, n, o) => {\n const s = { ...n }, c = { ...t.dataset }, a = { ...e }, u = {}, p = \"title\";\n return w(c).forEach(([r, f]) => {\n const y = o && typeof r == \"string\" && r.includes(o) ? r.replace(o, \"\").replace(/[A-Z]/g, (J) => ae(J)) : (\n /* istanbul ignore next @preserve */\n r\n );\n u[y] = B(f);\n }), w(s).forEach(([r, f]) => {\n s[r] = B(f);\n }), w(e).forEach(([r, f]) => {\n // istanbul ignore else @preserve\n r in s ? a[r] = s[r] : r in u ? a[r] = u[r] : a[r] = r === p ? j(t, p) : f;\n }), a;\n}, Yn = (t, e) => v(t) && (Object.hasOwn(t, e) || e in t), Zn = (t) => Object.keys(t), $n = (t) => Object.values(t), _n = (t) => Object.fromEntries(t), to = (t, e) => {\n const n = new CustomEvent(t, {\n cancelable: !0,\n bubbles: !0\n });\n // istanbul ignore else @preserve\n return v(e) && T(n, e), n;\n}, eo = { passive: !0 }, no = (t) => t.offsetHeight, oo = (t, e) => {\n w(e).forEach(([n, o]) => {\n if (o && M(n) && n.includes(\"--\"))\n t.style.setProperty(n, o);\n else {\n const s = {};\n s[n] = o, T(t.style, s);\n }\n });\n}, I = (t) => v(t) && t.constructor.name === \"Map\" || !1, ie = (t) => typeof t == \"number\" || !1, m = /* @__PURE__ */ new Map(), so = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n *\n * @param element target element\n * @param callback the callback\n * @param delay the execution delay\n * @param key a unique key\n */\n set: (t, e, n, o) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n if (o && o.length) {\n // istanbul ignore else @preserve\n m.has(t) || m.set(t, /* @__PURE__ */ new Map()), m.get(t).set(o, setTimeout(e, n));\n } else\n m.set(t, setTimeout(e, n));\n },\n /**\n * Returns the timer associated with the target.\n *\n * @param element target element\n * @param key a unique\n * @returns the timer\n */\n get: (t, e) => {\n if (!l(t)) return null;\n const n = m.get(t);\n return e && n && I(n) ? n.get(e) || /* istanbul ignore next */\n null : ie(n) ? n : null;\n },\n /**\n * Clears the element's timer.\n *\n * @param element target element\n * @param key a unique key\n */\n clear: (t, e) => {\n if (!l(t)) return;\n const n = m.get(t);\n if (e && e.length && I(n)) {\n clearTimeout(n.get(e)), n.delete(e);\n // istanbul ignore else @preserve\n n.size === 0 && m.delete(t);\n } else\n clearTimeout(n), m.delete(t);\n }\n}, co = (t) => t.toUpperCase(), ue = (t, e) => (i(e) ? e : d()).querySelectorAll(t), x = /* @__PURE__ */ new Map();\nfunction le(t) {\n const { shiftKey: e, code: n } = t, o = d(this), s = [...ue(qt, this)].filter(\n (u) => !te(u, \"disabled\") && !j(u, X)\n );\n if (!s.length) return;\n const c = s[0], a = s[s.length - 1];\n // istanbul ignore else @preserve\n n === \"Tab\" && (e && o.activeElement === c ? (a.focus(), t.preventDefault()) : !e && o.activeElement === a && (c.focus(), t.preventDefault()));\n}\nconst de = (t) => x.has(t) === !0, ro = (t) => {\n const e = de(t);\n (e ? Q : R)(t, \"keydown\", le), e ? x.delete(t) : x.set(t, !0);\n}, h = (t, e) => {\n const { width: n, height: o, top: s, right: c, bottom: a, left: u } = t.getBoundingClientRect();\n let p = 1, r = 1;\n if (e && l(t)) {\n const { offsetWidth: f, offsetHeight: y } = t;\n p = f > 0 ? Math.round(n) / f : (\n /* istanbul ignore next */\n 1\n ), r = y > 0 ? Math.round(o) / y : (\n /* istanbul ignore next */\n 1\n );\n }\n return {\n width: n / p,\n height: o / r,\n top: s / r,\n right: c / p,\n bottom: a / r,\n left: u / p,\n x: u / p,\n y: s / r\n };\n}, ao = (t) => d(t).body, k = (t) => d(t).documentElement, io = (t) => d(t).head, uo = (t) => {\n const e = q(t), n = e ? t.scrollX : t.scrollLeft, o = e ? t.scrollY : t.scrollTop;\n return { x: n, y: o };\n}, pe = (t) => i(t) && t.constructor.name === \"ShadowRoot\" || !1, lo = (t) => t.nodeName === \"HTML\" ? t : l(t) && t.assignedSlot || // step into the shadow DOM of the parent of a slotted node\ni(t) && t.parentNode || // DOM Element detected\npe(t) && t.host || // ShadowRoot detected\nk(t), fe = (t) => {\n if (!l(t)) return !1;\n const { width: e, height: n } = h(t), { offsetWidth: o, offsetHeight: s } = t;\n return Math.round(e) !== o || Math.round(n) !== s;\n}, po = (t, e, n) => {\n const o = l(e), s = h(t, o && fe(e)), c = { x: 0, y: 0 };\n // istanbul ignore else @preserve\n if (o) {\n const a = h(e, !0);\n c.x = a.x + e.clientLeft, c.y = a.y + e.clientTop;\n }\n return {\n x: s.left + n.x - c.x,\n y: s.top + n.y - c.y,\n width: s.width,\n height: s.height\n };\n};\nlet F = 0, H = 0;\nconst b = /* @__PURE__ */ new Map(), me = (t, e) => {\n let n = e ? F : H;\n if (e) {\n const o = me(t), s = b.get(o) || /* @__PURE__ */ new Map();\n b.has(o) || b.set(o, s), I(s) && !s.has(e) ? (s.set(e, n), F += 1) : n = s.get(e);\n } else {\n const o = t.id || t;\n b.has(o) ? n = b.get(o) : (b.set(o, n), H += 1);\n }\n return n;\n}, fo = (t) => {\n var e;\n return t ? G(t) ? t.defaultView : i(t) ? (e = t == null ? void 0 : t.ownerDocument) == null ? void 0 : e.defaultView : t : window;\n}, ge = (t) => Array.isArray(t) || !1, mo = (t) => i(t) && t.nodeName === \"CANVAS\" || !1, ve = (t) => l(t) && !!t.shadowRoot || !1, go = (t) => i(t) && [1, 2, 3, 4, 5, 6, 7, 8].some((e) => t.nodeType === e) || !1, vo = (t) => {\n if (!i(t)) return !1;\n const { top: e, bottom: n } = h(t), { clientHeight: o } = k(t);\n return e <= o && n >= 0;\n}, Eo = (t) => {\n if (!i(t)) return !1;\n const { clientWidth: e, clientHeight: n } = k(t), { top: o, left: s, bottom: c, right: a } = h(t, !0);\n return o >= 0 && s >= 0 && c <= n && a <= e;\n}, bo = (t) => ge(t) && t.every(l) || !1, ho = (t) => typeof t == \"function\" || !1, yo = (t) => v(t) && t.constructor.name === \"HTMLCollection\" || !1, wo = (t) => l(t) && t.tagName === \"IMG\" || !1, Ao = (t) => {\n if (!M(t)) return !1;\n try {\n JSON.parse(t);\n } catch {\n return !1;\n }\n return !0;\n}, So = (t) => v(t) && t.constructor.name === \"WeakMap\" || !1, No = (t) => i(t) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some((e) => t.constructor.name.includes(e)) || !1, Mo = (t) => v(t) && t.constructor.name === \"NodeList\" || !1, To = (t) => k(t).dir === \"rtl\", ko = (t) => i(t) && t.constructor.name.includes(\"SVG\") || !1, Do = (t) => i(t) && [\"TABLE\", \"TD\", \"TH\"].includes(t.nodeName) || !1, Ee = (t, e) => t ? t.closest(e) || // break out of `ShadowRoot`\nEe(t.getRootNode().host, e) : null, Co = (t, e) => l(t) ? t : (i(e) ? e : d()).querySelector(t), be = (t, e) => (i(e) ? e : d()).getElementsByTagName(t), Oo = (t) => [...be(\"*\", t)].filter(ve), Lo = (t, e) => d(e).getElementById(t) || null, Io = (t, e) => (e && i(e) ? e : d()).getElementsByClassName(t), xo = (t, e) => t.matches(e), zo = \"2.0.5\";\nexport {\n Wn as ArrayFrom,\n P as DOMContentLoadedEvent,\n et as DOMMouseScrollEvent,\n L as Data,\n Gn as Float32ArrayFrom,\n Kn as Float64ArrayFrom,\n T as ObjectAssign,\n w as ObjectEntries,\n _n as ObjectFromEntries,\n Yn as ObjectHasOwn,\n Zn as ObjectKeys,\n $n as ObjectValues,\n so as Timer,\n Y as abortEvent,\n Bn as addClass,\n fn as addEventListener,\n Kt as animationDelay,\n Gt as animationDuration,\n D as animationEndEvent,\n U as animationName,\n he as ariaChecked,\n we as ariaDescribedBy,\n ye as ariaDescription,\n Ae as ariaExpanded,\n Se as ariaHasPopup,\n X as ariaHidden,\n Ne as ariaLabel,\n Me as ariaLabelledBy,\n Te as ariaModal,\n ke as ariaPressed,\n De as ariaSelected,\n Oe as ariaValueMax,\n Ce as ariaValueMin,\n Le as ariaValueNow,\n Ie as ariaValueText,\n Z as beforeunloadEvent,\n gn as bezierEasings,\n $ as blurEvent,\n _ as changeEvent,\n Ee as closest,\n tt as contextmenuEvent,\n to as createCustomEvent,\n ee as createElement,\n ne as createElementNS,\n K as dispatchEvent,\n Qn as distinct,\n Pn as documentBody,\n Un as documentElement,\n N as documentHead,\n ze as dragEvent,\n Pe as dragendEvent,\n Be as dragenterEvent,\n Fe as dragleaveEvent,\n He as dragoverEvent,\n Ve as dragstartEvent,\n jn as emulateAnimationEnd,\n qn as emulateTransitionEnd,\n nt as errorEvent,\n Jn as focus,\n ot as focusEvent,\n qe as focusEvents,\n qt as focusableSelector,\n st as focusinEvent,\n ct as focusoutEvent,\n rt as gesturechangeEvent,\n at as gestureendEvent,\n it as gesturestartEvent,\n j as getAttribute,\n On as getAttributeNS,\n h as getBoundingClientRect,\n Oo as getCustomElements,\n d as getDocument,\n ao as getDocumentBody,\n k as getDocumentElement,\n io as getDocumentHead,\n oe as getElementAnimationDelay,\n se as getElementAnimationDuration,\n Lo as getElementById,\n g as getElementStyle,\n ce as getElementTransitionDelay,\n re as getElementTransitionDuration,\n Io as getElementsByClassName,\n be as getElementsByTagName,\n Rn as getInstance,\n uo as getNodeScroll,\n lo as getParentNode,\n po as getRectRelativeToOffsetParent,\n me as getUID,\n fo as getWindow,\n te as hasAttribute,\n Ln as hasAttributeNS,\n Hn as hasClass,\n de as hasFocusTrap,\n An as isApple,\n ge as isArray,\n mo as isCanvas,\n ve as isCustomElement,\n G as isDocument,\n go as isElement,\n vo as isElementInScrollRange,\n Eo as isElementInViewport,\n bo as isElementsArray,\n Sn as isFirefox,\n ho as isFunction,\n yo as isHTMLCollection,\n l as isHTMLElement,\n wo as isHTMLImageElement,\n Ao as isJSON,\n I as isMap,\n No as isMedia,\n wn as isMobile,\n i as isNode,\n Mo as isNodeList,\n ie as isNumber,\n v as isObject,\n To as isRTL,\n ko as isSVGElement,\n fe as isScaledElement,\n pe as isShadowRoot,\n M as isString,\n Do as isTableElement,\n So as isWeakMap,\n q as isWindow,\n Ke as keyAlt,\n Je as keyArrowDown,\n Ye as keyArrowLeft,\n Ze as keyArrowRight,\n Xe as keyArrowUp,\n $e as keyBackspace,\n _e as keyCapsLock,\n tn as keyControl,\n en as keyDelete,\n nn as keyEnter,\n sn as keyEscape,\n cn as keyInsert,\n rn as keyMeta,\n on as keyNumpadEnter,\n an as keyPause,\n un as keyScrollLock,\n ln as keyShift,\n dn as keySpace,\n pn as keyTab,\n Ge as keyboardEventKeys,\n ut as keydownEvent,\n lt as keypressEvent,\n dt as keyupEvent,\n pt as loadEvent,\n Ue as loadstartEvent,\n xo as matches,\n Re as mouseClickEvents,\n Qe as mouseHoverEvents,\n We as mouseSwipeEvents,\n ft as mouseclickEvent,\n mt as mousedblclickEvent,\n gt as mousedownEvent,\n bt as mouseenterEvent,\n Et as mousehoverEvent,\n yt as mouseinEvent,\n ht as mouseleaveEvent,\n St as mousemoveEvent,\n wt as mouseoutEvent,\n At as mouseoverEvent,\n vt as mouseupEvent,\n Nt as mousewheelEvent,\n Mt as moveEvent,\n xe as nativeEvents,\n _t as noop,\n Xn as normalizeOptions,\n B as normalizeValue,\n Q as off,\n vn as offsetHeight,\n En as offsetWidth,\n R as on,\n $t as one,\n Tt as orientationchangeEvent,\n eo as passiveHandler,\n kt as pointercancelEvent,\n Dt as pointerdownEvent,\n Ct as pointerleaveEvent,\n Ot as pointermoveEvent,\n Lt as pointerupEvent,\n Co as querySelector,\n ue as querySelectorAll,\n It as readystatechangeEvent,\n no as reflow,\n zn as removeAttribute,\n Vn as removeAttributeNS,\n Fn as removeClass,\n mn as removeEventListener,\n xt as resetEvent,\n zt as resizeEvent,\n Ht as scrollEvent,\n bn as scrollHeight,\n hn as scrollWidth,\n Vt as selectEvent,\n Bt as selectendEvent,\n Ft as selectstartEvent,\n In as setAttribute,\n xn as setAttributeNS,\n oo as setElementStyle,\n Pt as submitEvent,\n Nn as support3DTransform,\n Dn as supportAnimation,\n Mn as supportPassive,\n kn as supportTouch,\n Tn as supportTransform,\n Cn as supportTransition,\n yn as tabindex,\n ae as toLowerCase,\n co as toUpperCase,\n ro as toggleFocusTrap,\n je as touchEvents,\n Rt as touchcancelEvent,\n Qt as touchendEvent,\n Wt as touchmoveEvent,\n Ut as touchstartEvent,\n Xt as transitionDelay,\n Jt as transitionDuration,\n C as transitionEndEvent,\n W as transitionProperty,\n jt as unloadEvent,\n S as userAgent,\n A as userAgentData,\n zo as version\n};\n//# sourceMappingURL=shorty.mjs.map\n","const e = {}, f = (t) => {\n const { type: c, currentTarget: i } = t;\n [...e[c]].forEach(([n, s]) => {\n /* istanbul ignore else @preserve */\n i === n && [...s].forEach(([o, a]) => {\n o.apply(n, [t]), typeof a == \"object\" && a.once && r(n, c, o, a);\n });\n });\n}, E = (t, c, i, n) => {\n /* istanbul ignore else @preserve */\n e[c] || (e[c] = /* @__PURE__ */ new Map());\n const s = e[c];\n /* istanbul ignore else @preserve */\n s.has(t) || s.set(t, /* @__PURE__ */ new Map());\n const o = s.get(t), { size: a } = o;\n o.set(i, n);\n /* istanbul ignore else @preserve */\n a || t.addEventListener(c, f, n);\n}, r = (t, c, i, n) => {\n const s = e[c], o = s && s.get(t), a = o && o.get(i), d = a !== void 0 ? a : n;\n /* istanbul ignore else @preserve */\n o && o.has(i) && o.delete(i);\n /* istanbul ignore else @preserve */\n s && (!o || !o.size) && s.delete(t);\n /* istanbul ignore else @preserve */\n (!s || !s.size) && delete e[c];\n /* istanbul ignore else @preserve */\n (!o || !o.size) && t.removeEventListener(\n c,\n f,\n d\n );\n}, g = E, M = r;\nexport {\n E as addListener,\n f as globalListener,\n M as off,\n g as on,\n e as registry,\n r as removeListener\n};\n//# sourceMappingURL=event-listener.mjs.map\n","/**\n * Global namespace for most components `fade` class.\n */\nconst fadeClass = \"fade\";\nexport default fadeClass;\n","/**\n * Global namespace for most components `show` class.\n */\nconst showClass = \"show\";\nexport default showClass;\n","/**\n * Global namespace for most components `dismiss` option.\n */\nconst dataBsDismiss = \"data-bs-dismiss\";\nexport default dataBsDismiss;\n","/** @type {string} */\nconst alertString = \"alert\";\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = \"Alert\";\nexport default alertComponent;\n","import { version } from \"../package.json\";\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport {\n Data,\n isHTMLElement,\n isString,\n normalizeOptions,\n ObjectKeys,\n querySelector,\n} from \"@thednp/shorty\";\n\nimport type { BaseOptions } from \"../interface/baseComponent\";\nimport Version from \"../version\";\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options = this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, \"bs\")\n // istanbul ignore next @preserve\n : {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return \"BaseComponent\";\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach((prop) => {\n delete this[prop];\n });\n }\n}\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport alertString from \"../strings/alertString\";\nimport alertComponent from \"../strings/alertComponent\";\nimport type { AlertEvent } from \"../interface/alert\";\n\nimport BaseComponent from \"./base-component\";\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) =>\n getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(\n `close.bs.${alertString}`,\n);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(\n `closed.bs.${alertString}`,\n);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/**\n * Global namespace for most components active class.\n */\nconst activeClass = \"active\";\nexport default activeClass;\n","/**\n * Global namespace for most components `toggle` option.\n */\nconst dataBsToggle = \"data-bs-toggle\";\nexport default dataBsToggle;\n","/** @type {string} */\nconst buttonString = \"button\";\nexport default buttonString;\n","/** @type {string} */\nconst buttonComponent = \"Button\";\nexport default buttonComponent;\n","/* Native JavaScript for Bootstrap 5 | Button\n---------------------------------------------*/\nimport {\n addClass,\n ariaPressed,\n getAttribute,\n getInstance,\n hasClass,\n mouseclickEvent,\n removeClass,\n setAttribute,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport activeClass from \"../strings/activeClass\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport buttonString from \"../strings/buttonString\";\nimport buttonComponent from \"../strings/buttonComponent\";\n\nimport BaseComponent from \"./base-component\";\n\n// BUTTON PRIVATE GC\n// =================\nconst buttonSelector = `[${dataBsToggle}=\"${buttonString}\"]`;\n\n/**\n * Static method which returns an existing `Button` instance associated\n * to a target `Element`.\n */\nconst getButtonInstance = (element: HTMLElement) =>\n getInstance',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) =>\n getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n","/** @type {string} */\nconst scrollspyString = \"scrollspy\";\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = \"ScrollSpy\";\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n getWindow,\n hasClass,\n isHTMLElement,\n isWindow,\n passiveHandler,\n querySelector,\n removeClass,\n scrollEvent,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport activeClass from \"../strings/activeClass\";\nimport scrollspyString from \"../strings/scrollspyString\";\nimport scrollspyComponent from \"../strings/scrollspyComponent\";\n\nimport BaseComponent from \"./base-component\";\nimport { ScrollSpyEvent, ScrollSpyOptions } from \"../interface/scrollspy\";\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) =>\n getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent<\n ScrollSpyEventProps,\n ScrollSpyEvent\n>(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } =\n self;\n const { offset } = options;\n const isWin = isWindow(scrollTarget as Node | Window);\n\n const links = target && getElementsByTagName(\"A\", target);\n const scrollHEIGHT = scrollTarget\n ? getScrollHeight(scrollTarget)\n // istanbul ignore next @preserve\n : scrollHeight;\n\n self.scrollTop = isWin\n ? (scrollTarget as Window).scrollY\n : (scrollTarget as HTMLElement).scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (\n links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)\n ) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n [...links].forEach((link) => {\n href = getAttribute(link, \"href\");\n targetItem = href && href.charAt(0) === \"#\" && href.slice(-1) !== \"#\" &&\n querySelector(href, getDocument(element));\n\n if (targetItem) {\n self.items.push(link);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push(\n (isWin ? rect.top + self.scrollTop : targetItem.offsetTop) - offset,\n );\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: Node | Window) => {\n return isHTMLElement(scrollTarget as Node)\n ? (scrollTarget as HTMLElement).scrollHeight\n : getDocumentElement(scrollTarget as Node).scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return isWindow(scrollTarget as Node)\n ? (scrollTarget as Window).innerHeight\n : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName(\"A\", target)].forEach((item) => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, \"nav\") || hasClass(parentItem, \"dropdown-menu\")) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach((menuItem) => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement | Window;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(\n target: HTMLElement | string,\n config?: Partial,\n ) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(\n options.target as HTMLElement | string,\n getDocument(element),\n );\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight\n ? element\n : getWindow(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // add event handlers\n this._toggleEventListeners(true);\n\n this.refresh();\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === \"undefined\" || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /**\n * Toggles on/off the component event listener.\n *\n * @param add when `true`, listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(\n this.scrollTarget as EventTarget,\n scrollEvent,\n this.refresh,\n passiveHandler,\n );\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst tabString = \"tab\";\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = \"Tab\";\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport collapsingClass from \"../strings/collapsingClass\";\nimport activeClass from \"../strings/activeClass\";\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dropdownClasses from \"../strings/dropdownClasses\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport tabString from \"../strings/tabString\";\nimport tabComponent from \"../strings/tabComponent\";\n\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport type { /* TabOptions, */ TabEvent } from \"../interface/tab\";\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) =>\n getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(\n `show.bs.${tabString}`,\n);\nconst shownTabEvent = createCustomEvent(\n `shown.bs.${tabString}`,\n);\nconst hideTabEvent = createCustomEvent(\n `hide.bs.${tabString}`,\n);\nconst hiddenTabEvent = createCustomEvent(\n `hidden.bs.${tabString}`,\n);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = \"\";\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null };\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) ||\n // istanbul ignore next @preserve\n { currentHeight: 0, nextHeight: 0 };\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null, content: null };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, \"overflow-hidden\");\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight // istanbul ignore next @preserve\n : 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, \"overflow-hidden\");\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (\n self: Tab,\n): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (\n activeTabs.length === 1 &&\n !dropdownClasses.some((c) =>\n hasClass(activeTabs[0].parentElement as HTMLElement, c)\n )\n ) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement)\n ? getTargetElement(tab as HTMLElement)\n : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(\",.\")}`);\n return dropdown\n ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown)\n : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, \".nav\");\n const container = closest(content, \".tab-content\");\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, \"false\");\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (\n content &&\n (hasClass(content, fadeClass) ||\n (nextContent && hasClass(nextContent, fadeClass)))\n ) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst toastString = \"toast\";\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = \"Toast\";\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport toastString from \"../strings/toastString\";\nimport toastComponent from \"../strings/toastComponent\";\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport { ToastEvent, ToastOptions } from \"../interface/toast\";\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = \"showing\";\n/** @deprecated */\nconst hideClass = \"hide\";\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) =>\n getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(\n `show.bs.${toastString}`,\n);\nconst shownToastEvent = createCustomEvent, ToastEvent>(\n `shown.bs.${toastString}`,\n);\nconst hideToastEvent = createCustomEvent, ToastEvent>(\n `hide.bs.${toastString}`,\n);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(\n `hidden.bs.${toastString}`,\n);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === \"A\") e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (\n self && element !== relatedTarget &&\n !element.contains(relatedTarget as Node)\n ) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [\n ...querySelectorAll(toastToggleSelector, getDocument(element)),\n ].filter(\n (btn) => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(\n (e) => action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach((btn) =>\n action(btn, mouseclickEvent, toastClickHandler)\n );\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n","import { Data, getElementsByTagName, matches } from \"@thednp/shorty\";\n\nimport { addListener } from \"@thednp/event-listener\";\n\nimport Alert from \"../components/alert\";\nimport Button from \"../components/button\";\nimport Carousel from \"../components/carousel\";\nimport Collapse from \"../components/collapse\";\nimport Dropdown from \"../components/dropdown\";\nimport Modal from \"../components/modal\";\nimport Offcanvas from \"../components/offcanvas\";\nimport Popover from \"../components/popover\";\nimport ScrollSpy from \"../components/scrollspy\";\nimport Tab from \"../components/tab\";\nimport Toast from \"../components/toast\";\nimport Tooltip from \"../components/tooltip\";\n\nconst componentsList = new Map<\n string,\n | typeof Alert\n | typeof Button\n | typeof Carousel\n | typeof Collapse\n | typeof Dropdown\n | typeof Modal\n | typeof Offcanvas\n | typeof Popover\n | typeof ScrollSpy\n | typeof Tab\n | typeof Toast\n | typeof Tooltip\n>();\n\ntype Component =\n | Alert\n | Button\n | Carousel\n | Collapse\n | Dropdown\n | Modal\n | Offcanvas\n | Popover\n | ScrollSpy\n | Tab\n | Toast\n | Tooltip;\n\n[\n Alert,\n Button,\n Carousel,\n Collapse,\n Dropdown,\n Modal,\n Offcanvas,\n Popover,\n ScrollSpy,\n Tab,\n Toast,\n Tooltip,\n].forEach((c) => componentsList.set(c.prototype.name, c));\n\n/**\n * Initialize all matched `Element`s for one component.\n *\n * @param callback\n * @param collection\n */\nconst initComponentDataAPI = (\n callback: (el: HTMLElement) => Component,\n collection: HTMLCollectionOf | HTMLElement[],\n) => {\n [...collection].forEach((x) => callback(x));\n};\n\n/**\n * Remove one component from a target container element or all in the page.\n *\n * @param component the component name\n * @param context parent `Node`\n */\nconst removeComponentDataAPI = (component: string, context: ParentNode) => {\n const compData = Data.getAllFor(component) as Map;\n\n if (compData) {\n [...compData].forEach(([element, instance]) => {\n if (context.contains(element)) {\n (instance as T & { dispose: () => void }).dispose();\n }\n });\n }\n};\n\n/**\n * Initialize all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const initCallback = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n const elemCollection = [...getElementsByTagName(\"*\", lookUp)];\n\n componentsList.forEach((cs) => {\n const { init, selector } = cs;\n initComponentDataAPI(\n init,\n elemCollection.filter((item) => matches(item, selector)),\n );\n });\n};\n\n/**\n * Remove all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const removeDataAPI = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n\n componentsList.forEach((comp) => {\n removeComponentDataAPI(comp.prototype.name, lookUp);\n });\n};\n\n// Bulk initialize all components\nif (document.body) initCallback();\nelse {\n addListener(document, \"DOMContentLoaded\", () => initCallback(), {\n once: true,\n });\n}\n"],"names":["we","Ae","X","Te","ke","De","P","ot","st","ct","ut","dt","ft","gt","Et","bt","ht","Dt","Ot","Lt","zt","Ht","Ut","Ve","qt","Je","Xe","Ye","Ze","sn","Jt","Xt","C","W","Yt","A","Zt","S","z","V","An","N","R","e","n","o","s","Q","$t","c","_t","j","te","In","zn","Bn","Fn","Hn","v","i","l","E","L","Rn","M","q","G","d","T","ee","K","g","ce","re","qn","a","u","Jn","B","w","ae","Xn","p","r","f","y","J","Zn","to","eo","no","oo","I","ie","m","so","ue","x","le","de","ro","h","ao","k","pe","lo","F","H","b","me","fo","ge","vo","ho","Mo","To","Do","Ee","Co","be","Io","xo","fadeClass","showClass","dataBsDismiss","alertString","alertComponent","Version","version","BaseComponent","target","config","__publicField","element","isHTMLElement","isString","querySelector","prevInstance","Data","ObjectKeys","normalizeOptions","prop","alertSelector","alertDismissSelector","getAlertInstance","getInstance","alertInitCallback","Alert","closeAlertEvent","createCustomEvent","closedAlertEvent","alertTransitionEnd","self","dispatchEvent","hasClass","removeClass","emulateTransitionEnd","add","action","addListener","removeListener","dismiss","close","mouseclickEvent","activeClass","dataBsToggle","buttonString","buttonComponent","buttonSelector","getButtonInstance","buttonInitCallback","Button","isActive","getAttribute","addClass","setAttribute","ariaPressed","dataBsTarget","carouselString","carouselComponent","dataBsParent","dataBsContainer","getTargetElement","targetAttr","doc","getDocument","att","attValue","closest","carouselSelector","carouselItem","dataBsSlideTo","dataBsSlide","pausedClass","carouselDefaults","getCarouselInstance","carouselInitCallback","Carousel","startX","currentX","endX","carouselSlideEvent","carouselSlidEvent","carouselTransitionEndHandler","index","direction","slides","options","activeItem","getActiveIndex","orientation","directionClass","Timer","carouselPauseHandler","carouselResumeHandler","carouselIndicatorHandler","newIndex","carouselControlsHandler","carouselKeyHandler","code","querySelectorAll","isElementInScrollRange","RTL","isRTL","arrowKeyNext","keyArrowLeft","keyArrowRight","arrowKeyPrev","carouselDragHandler","carouselPointerDownHandler","controls","indicators","el","toggleCarouselTouchHandlers","carouselPointerMoveHandler","carouselPointerUpHandler","_a","activateCarouselIndicator","pointermoveEvent","passiveHandler","pointerupEvent","touch","pause","interval","keyboard","mouseenterEvent","mouseleaveEvent","pointerdownEvent","touchstartEvent","dragstartEvent","arrow","indicator","keydownEvent","getElementsByClassName","activeIndex","transitionItem","matches","ar","isPaused","idx","next","eventProperties","ObjectAssign","getElementTransitionDuration","reflow","isAnimating","clone","collapsingClass","collapseString","collapseComponent","collapseSelector","collapseToggleSelector","collapseDefaults","getCollapseInstance","collapseInitCallback","Collapse","showCollapseEvent","shownCollapseEvent","hideCollapseEvent","hiddenCollapseEvent","expandCollapse","parent","triggers","noop","setElementStyle","btn","ariaExpanded","collapseContent","collapseClickHandler","trigger","activeCollapse","activeCollapseInstance","dropdownMenuClasses","dropdownComponent","dropdownMenuClass","isEmptyAnchor","parentAnchor","hasAttribute","dropdownString","dropupString","dropstartString","dropendString","dropdownClasses","dropdownSelector","getDropdownInstance","dropdownInitCallback","Dropdown","dropdownMenuEndClass","verticalClass","horizontalClass","menuFocusTags","dropdownDefaults","showDropdownEvent","shownDropdownEvent","hideDropdownEvent","hiddenDropdownEvent","updatedDropdownEvent","styleDropdown","menu","parentElement","offset","getElementStyle","menuEnd","style","positionClass","dropdownMargin","dropdownPosition","menuWidth","menuHeight","clientWidth","clientHeight","getDocumentElement","targetLeft","targetTop","targetWidth","targetHeight","getBoundingClientRect","leftFullExceed","rightFullExceed","bottomExceed","bottomFullExceed","topExceed","leftExceed","rightExceed","posAjust","margins","getMenuItems","firstElementChild","toggleDropdownDismiss","dropdownDismissHandler","focusEvent","dropdownPreventScroll","keyupEvent","dropdownKeyHandler","scrollEvent","resizeEvent","ev","getWindow","dropdownLayoutHandler","getCurrentOpenDropdown","currentParent","type","isForm","mousedownEvent","dropdownClickHandler","keyArrowDown","keyArrowUp","activeElement","open","menuItems","focus","keyEscape","currentElement","currentInstance","modalString","modalComponent","offcanvasComponent","fixedTopClass","fixedBottomClass","stickyTopClass","positionStickyClass","getFixedItems","resetScrollbar","bd","getDocumentBody","fixedItems","fixed","measureScrollbar","innerWidth","setScrollbar","overflow","bodyPad","sbWidth","itemPadValue","itemMValue","offcanvasString","popupContainer","createElement","appendPopup","customContainer","containerIsBody","isNode","lookup","BODY","removePopup","hasPopup","backdropString","modalBackdropClass","offcanvasBackdropClass","modalActiveSelector","offcanvasActiveSelector","overlay","getCurrentOpen","toggleOverlayType","isModal","targetClass","appendOverlay","hasFade","showOverlay","hideOverlay","removeOverlay","isVisible","modalSelector","modalToggleSelector","modalDismissSelector","modalStaticClass","modalDefaults","getModalInstance","modalInitCallback","Modal","showModalEvent","shownModalEvent","hideModalEvent","hiddenModalEvent","setModalScrollbar","scrollbarWidth","scrollHeight","modalHeight","modalScrollHeight","modalOverflow","padStyle","toggleModalDismiss","update","modalDismissHandler","modalKeyHandler","afterModalHide","relatedTarget","focusElement","toggleFocusTrap","afterModalShow","beforeModalShow","removeAttribute","ariaHidden","ariaModal","beforeModalHide","modalClickHandler","currentTarget","isStatic","modalDialog","backdrop","selectedText","targetInsideDialog","staticTransitionEnd","duration","overlayDelay","currentOpen","that","callback","offcanvasSelector","offcanvasToggleSelector","offcanvasDismissSelector","offcanvasTogglingClass","offcanvasDefaults","getOffcanvasInstance","offcanvasInitCallback","Offcanvas","showOffcanvasEvent","shownOffcanvasEvent","hideOffcanvasEvent","hiddenOffcanvasEvent","setOffCanvasScrollbar","toggleOffCanvasDismiss","offcanvasKeyDismissHandler","offcanvasDismissHandler","beforeOffcanvasShow","showOffcanvasComplete","beforeOffcanvasHide","hideOffcanvasComplete","offcanvasTriggerHandler","offCanvasDismiss","selection","visibleTrigger","isOpen","popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","body","tipClassPositions","styleTip","tipClasses","tooltip","container","tipPositions","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","placement","parentCWidth","parentOWidth","fixedParent","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","horizontals","verticals","updatedTooltipEvent","toLowerCase","tooltipDefaults","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","dirty","isFunction","tempDocument","isNodeList","isArray","createTip","id","title","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","tooltipHeader","tooltipBody","tempTitle","tempContent","tempBtn","getElementContainer","majorBlockTags","containers","parentNode","getParentNode","isShadowRoot","isTableElement","tooltipSelector","titleAttr","getTooltipInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","ariaDescribedBy","hasTip","disposeTooltipComplete","toggleTooltipTitle","toggleTooltipAction","tooltipShownAction","shownTooltipEvent","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","offsetHeight","parentModal","parentOffcanvas","win","scrollTarget","titleAtt","tr","mousehoverEvent","focusinEvent","focusoutEvent","isApple","tipComponent","elem","getUID","position","outTimer","tipContainer","showTooltipEvent","delay","hideTooltipEvent","enabled","popoverSelector","popoverDefaults","getPopoverInstance","popoverInitCallback","Popover","scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","updateSpyTargets","itemsLength","isWin","isWindow","links","getElementsByTagName","scrollHEIGHT","getScrollHeight","href","targetItem","rect","getOffsetHeight","link","clear","item","activate","parents","parentItem","menuItem","parentLink","scrollTop","maxScroll","items","newActiveItem","offsets","tabString","tabComponent","tabSelector","getTabInstance","tabInitCallback","Tab","showTabEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","tabContent","nav","triggerTabShow","nextContent","tab","currentHeight","nextHeight","triggerTabHide","getActiveTab","activeTabs","getParentDropdown","dropdown","tabClickHandler","firstTab","firstTabContent","ariaSelected","activeDropdown","toggleTab","toastString","toastComponent","toastSelector","toastDismissSelector","toastToggleSelector","showingClass","hideClass","toastDefaults","getToastInstance","toastInitCallback","Toast","showToastEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","hideToastComplete","hideToast","showToast","toastClickHandler","interactiveToastHandler","isShown","hide","componentsList","initComponentDataAPI","collection","removeComponentDataAPI","component","context","compData","instance","initCallback","lookUp","elemCollection","cs","init","selector","removeDataAPI","comp"],"mappings":"wPAAK,MAA+CA,GAAK,mBAAoBC,GAAK,gBAAuCC,GAAI,cAA0DC,GAAK,aAAcC,GAAK,eAAgBC,GAAK,gBAAyLC,GAAI,mBAAyDC,GAAK,QAASC,GAAK,UAAWC,GAAK,WAA0EC,GAAK,UAA4BC,GAAK,QAAsBC,EAAK,QAA0BC,GAAK,YAA6BC,GAAK,QAASC,GAAK,aAAcC,GAAK,aAAmKC,GAAK,cAAoCC,GAAK,cAAeC,GAAK,YAAoDC,GAAK,SAA+DC,GAAK,SAAyBC,GAAK,aAmD1lCC,GAAK,YAauBC,GAAK,oFAuClCC,GAAK,YAAaC,GAAK,UAAWC,GAAK,YAAaC,GAAK,aAAkHC,GAAK,SAAyMC,GAAK,qBAAsBC,GAAK,kBAAmBC,GAAI,gBAAiBC,GAAI,qBA0B9WC,GAAK,UAAU,cAAeC,GAAID,GAAI,CAAE,UAAWE,EAAE,EAAK,UAAWC,GAAID,GAAIE,GAAI,4BAEvL;AACAH,GAAQA,GAAE,OAAO,KAAM,GAAMG,GAAE,KAAK,EAAE,KAAK,CAAC,EAAQA,GAAE,KAAKD,EAAC,EACvD,MAASE,GAAI,qBAAsBC,GAAKL,GAAIA,GAAE,OAAO,KAAM,GAAMI,GAAE,KAAK,EAAE,KAAK,CAAC,EAEnFA,GAAE,KAAKF,EAAC,EACFA,IAAIA,GAAE,SAAS,SAAS,EAG7B,KAAA,CAAE,KAAMI,IAAM,SAAe,CAAC,oBAAqB,aAAa,EAAE,KAAM,GAAM,KAAKA,GAAE,KAAK,EAAG,MAAAC,GAAI,CAAC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,MAAMI,EAASJ,GAAWA,EAAQ,SAAWA,EAAU,SACjDK,EAAiB,CAAC,GAAGnF,GAAqB,IAAKkF,CAAM,CAAC,EAE7CT,GAAA,QAASW,GAAO,CACvB,KAAA,CAAE,KAAAC,EAAM,SAAAC,CAAa,EAAAF,EAC3BV,GACEW,EACAF,EAAe,OAAQ1E,GAASjY,GAAQiY,EAAM6E,CAAQ,CAAC,CAAA,CACzD,CACD,CACH,EAOaC,GAAiBT,GAAyB,CACrD,MAAMI,EAASJ,GAAWA,EAAQ,SAAWA,EAAU,SAExCL,GAAA,QAASe,GAAS,CACRZ,GAAAY,EAAK,UAAU,KAAMN,CAAM,CAAA,CACnD,CACH,EAGI,SAAS,KAAmBD,KAE9B1iB,EAAY,SAAU,mBAAoB,IAAM0iB,GAAA,EAAgB,CAC9D,KAAM,EAAA,CACP","x_google_ignoreList":[0,1]} \ No newline at end of file diff --git a/dist/bootstrap-native.d.ts b/dist/bootstrap-native.d.ts index e9211fb9..c9036b38 100644 --- a/dist/bootstrap-native.d.ts +++ b/dist/bootstrap-native.d.ts @@ -1,5 +1,5 @@ export interface BaseOptions { - [key: string]: any; + [key: string]: unknown; } declare class BaseComponent { element: HTMLElement; diff --git a/dist/bootstrap-native.js b/dist/bootstrap-native.js index d9300832..b9d2bb42 100644 --- a/dist/bootstrap-native.js +++ b/dist/bootstrap-native.js @@ -147,10 +147,8 @@ a!==l&&Co(this,l);return}const{offsets:r}=this;// istanbul ignore else @preserve if(a&&n0){this.activeItem=null;// istanbul ignore else @preserve e&&yo(e);return}c.forEach((l,g)=>{a!==l&&n>=r[g]&&(typeof r[g+1]>"u"||n{(e?_:B)(this.scrollTarget,Ie,this.refresh,st)});const{element:o,options:i}=this;this.target=P(i.target,w(o)),this.target&&(this.scrollTarget=o.clientHeightW(t,So),Lc=t=>new se(t),As=$(`show.bs.${Ee}`),Do=$(`shown.bs.${Ee}`),Is=$(`hide.bs.${Ee}`),xo=$(`hidden.bs.${Ee}`),$e=new Map,Ao=t=>{const{tabContent:s,nav:e}=t;// istanbul ignore else @preserve s&&f(s,Nt)&&(s.style.height="",b(s,Nt));// istanbul ignore else @preserve -e&&u.clear(e)},Io=t=>{const{element:s,tabContent:e,content:n,nav:o}=t,{tab:i}=T(o)&&$e.get(o)||{tab:null};// istanbul ignore next @preserve -// istanbul ignore else @preserve -if(e&&n&&f(n,F)){const{currentHeight:c,nextHeight:a}=$e.get(s)||{currentHeight:0,nextHeight:0};// istanbul ignore next @preserve -// istanbul ignore else @preserve: vitest won't validate this branch +e&&u.clear(e)},Io=t=>{const{element:s,tabContent:e,content:n,nav:o}=t,{tab:i}=T(o)&&$e.get(o)||{tab:null};// istanbul ignore else @preserve +if(e&&n&&f(n,F)){const{currentHeight:c,nextHeight:a}=$e.get(s)||{currentHeight:0,nextHeight:0};// istanbul ignore else @preserve: vitest won't validate this branch c!==a?setTimeout(()=>{e.style.height=`${a}px`,Lt(e),A(e,()=>Ao(t))},50):Ao(t)}else o&&u.clear(o);Do.relatedTarget=i,E(s,Do)},Lo=t=>{const{element:s,content:e,tabContent:n,nav:o}=t,{tab:i,content:c}=o&&$e.get(o)||{tab:null,content:null};let a=0;// istanbul ignore else @preserve n&&e&&f(e,F)&&([c,e].forEach(r=>{// istanbul ignore else @preserve T(r)&&h(r,"overflow-hidden")}),a=T(c)?c.scrollHeight:0),As.relatedTarget=i,xo.relatedTarget=s,E(s,As);// istanbul ignore else @preserve diff --git a/dist/bootstrap-native.js.map b/dist/bootstrap-native.js.map index d19baaec..718764d5 100644 --- a/dist/bootstrap-native.js.map +++ b/dist/bootstrap-native.js.map @@ -1 +1 @@ -{"version":3,"file":"bootstrap-native.js","sources":["../node_modules/.pnpm/@thednp+shorty@2.0.5/node_modules/@thednp/shorty/dist/shorty.mjs","../node_modules/.pnpm/@thednp+event-listener@2.0.6/node_modules/@thednp/event-listener/dist/event-listener.mjs","../src/strings/fadeClass.ts","../src/strings/showClass.ts","../src/strings/dataBsDismiss.ts","../src/strings/alertString.ts","../src/strings/alertComponent.ts","../src/version.ts","../src/components/base-component.ts","../src/components/alert.ts","../src/strings/activeClass.ts","../src/strings/dataBsToggle.ts","../src/strings/buttonString.ts","../src/strings/buttonComponent.ts","../src/components/button.ts","../src/strings/dataBsTarget.ts","../src/strings/carouselString.ts","../src/strings/carouselComponent.ts","../src/strings/dataBsParent.ts","../src/strings/dataBsContainer.ts","../src/util/getTargetElement.ts","../src/components/carousel.ts","../src/strings/collapsingClass.ts","../src/strings/collapseString.ts","../src/strings/collapseComponent.ts","../src/components/collapse.ts","../src/strings/dropdownClasses.ts","../src/strings/dropdownComponent.ts","../src/strings/dropdownMenuClass.ts","../src/util/isEmptyAnchor.ts","../src/components/dropdown.ts","../src/strings/modalString.ts","../src/strings/modalComponent.ts","../src/strings/offcanvasComponent.ts","../src/strings/fixedTopClass.ts","../src/strings/fixedBottomClass.ts","../src/strings/stickyTopClass.ts","../src/strings/positionStickyClass.ts","../src/util/scrollbar.ts","../src/strings/offcanvasString.ts","../src/util/popupContainer.ts","../src/util/backdrop.ts","../src/util/isVisible.ts","../src/components/modal.ts","../src/components/offcanvas.ts","../src/strings/popoverString.ts","../src/strings/popoverComponent.ts","../src/strings/tooltipString.ts","../src/util/getTipTemplate.ts","../src/util/tipClassPositions.ts","../src/util/styleTip.ts","../src/util/tooltipDefaults.ts","../src/strings/dataOriginalTitle.ts","../src/strings/tooltipComponent.ts","../src/util/setHtml.ts","../src/util/createTip.ts","../src/util/getElementContainer.ts","../src/components/tooltip.ts","../src/components/popover.ts","../src/strings/scrollspyString.ts","../src/strings/scrollspyComponent.ts","../src/components/scrollspy.ts","../src/strings/tabString.ts","../src/strings/tabComponent.ts","../src/components/tab.ts","../src/strings/toastString.ts","../src/strings/toastComponent.ts","../src/components/toast.ts","../src/util/init.ts"],"sourcesContent":["const he = \"aria-checked\", ye = \"aria-description\", we = \"aria-describedby\", Ae = \"aria-expanded\", Se = \"aria-haspopup\", X = \"aria-hidden\", Ne = \"aria-label\", Me = \"aria-labelledby\", Te = \"aria-modal\", ke = \"aria-pressed\", De = \"aria-selected\", Ce = \"aria-valuemin\", Oe = \"aria-valuemax\", Le = \"aria-valuenow\", Ie = \"aria-valuetext\", Y = \"abort\", Z = \"beforeunload\", $ = \"blur\", _ = \"change\", tt = \"contextmenu\", P = \"DOMContentLoaded\", et = \"DOMMouseScroll\", nt = \"error\", ot = \"focus\", st = \"focusin\", ct = \"focusout\", rt = \"gesturechange\", at = \"gestureend\", it = \"gesturestart\", ut = \"keydown\", lt = \"keypress\", dt = \"keyup\", pt = \"load\", ft = \"click\", mt = \"dblclick\", gt = \"mousedown\", vt = \"mouseup\", Et = \"hover\", bt = \"mouseenter\", ht = \"mouseleave\", yt = \"mousein\", wt = \"mouseout\", At = \"mouseover\", St = \"mousemove\", Nt = \"mousewheel\", Mt = \"move\", Tt = \"orientationchange\", kt = \"pointercancel\", Dt = \"pointerdown\", Ct = \"pointerleave\", Ot = \"pointermove\", Lt = \"pointerup\", It = \"readystatechange\", xt = \"reset\", zt = \"resize\", Vt = \"select\", Bt = \"selectend\", Ft = \"selectstart\", Ht = \"scroll\", Pt = \"submit\", Ut = \"touchstart\", Wt = \"touchmove\", Rt = \"touchcancel\", Qt = \"touchend\", jt = \"unload\", xe = {\n DOMContentLoaded: P,\n DOMMouseScroll: et,\n abort: Y,\n beforeunload: Z,\n blur: $,\n change: _,\n click: ft,\n contextmenu: tt,\n dblclick: mt,\n error: nt,\n focus: ot,\n focusin: st,\n focusout: ct,\n gesturechange: rt,\n gestureend: at,\n gesturestart: it,\n hover: Et,\n keydown: ut,\n keypress: lt,\n keyup: dt,\n load: pt,\n mousedown: gt,\n mousemove: St,\n mousein: yt,\n mouseout: wt,\n mouseenter: bt,\n mouseleave: ht,\n mouseover: At,\n mouseup: vt,\n mousewheel: Nt,\n move: Mt,\n orientationchange: Tt,\n pointercancel: kt,\n pointerdown: Dt,\n pointerleave: Ct,\n pointermove: Ot,\n pointerup: Lt,\n readystatechange: It,\n reset: xt,\n resize: zt,\n scroll: Ht,\n select: Vt,\n selectend: Bt,\n selectstart: Ft,\n submit: Pt,\n touchcancel: Rt,\n touchend: Qt,\n touchmove: Wt,\n touchstart: Ut,\n unload: jt\n}, ze = \"drag\", Ve = \"dragstart\", Be = \"dragenter\", Fe = \"dragleave\", He = \"dragover\", Pe = \"dragend\", Ue = \"loadstart\", We = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, Re = { down: \"mousedown\", up: \"mouseup\" }, Qe = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : (\n /* istanbul ignore next */\n [\"mouseover\", \"mouseout\"]\n), je = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, qe = { in: \"focusin\", out: \"focusout\" }, qt = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]', Ge = {\n Backspace: \"Backspace\",\n // 8\n Tab: \"Tab\",\n // 9\n Enter: \"Enter\",\n // 13\n Shift: \"Shift\",\n // 16\n Control: \"Control\",\n // 17\n Alt: \"Alt\",\n // 18\n Pause: \"Pause\",\n // 19\n CapsLock: \"CapsLock\",\n // 20\n Escape: \"Escape\",\n // 27\n Scape: \"Space\",\n // 32\n ArrowLeft: \"ArrowLeft\",\n // 37\n ArrowUp: \"ArrowUp\",\n // 38\n ArrowRight: \"ArrowRight\",\n // 39\n ArrowDown: \"ArrowDown\",\n // 40\n Insert: \"Insert\",\n // 45\n Delete: \"Delete\",\n // 46\n Meta: \"Meta\",\n // 91 windows key\n ContextMenu: \"ContextMenu\",\n // 93\n ScrollLock: \"ScrollLock\"\n // 145\n}, Ke = \"Alt\", Je = \"ArrowDown\", Xe = \"ArrowUp\", Ye = \"ArrowLeft\", Ze = \"ArrowRight\", $e = \"Backspace\", _e = \"CapsLock\", tn = \"Control\", en = \"Delete\", nn = \"Enter\", on = \"NumpadEnter\", sn = \"Escape\", cn = \"Insert\", rn = \"Meta\", an = \"Pause\", un = \"ScrollLock\", ln = \"Shift\", dn = \"Space\", pn = \"Tab\", Gt = \"animationDuration\", Kt = \"animationDelay\", U = \"animationName\", D = \"animationend\", Jt = \"transitionDuration\", Xt = \"transitionDelay\", C = \"transitionend\", W = \"transitionProperty\", fn = \"addEventListener\", mn = \"removeEventListener\", gn = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\"\n}, vn = \"offsetHeight\", En = \"offsetWidth\", bn = \"scrollHeight\", hn = \"scrollWidth\", yn = \"tabindex\", Yt = navigator.userAgentData, A = Yt, { userAgent: Zt } = navigator, S = Zt, z = /iPhone|iPad|iPod|Android/i;\nlet O = !1;\n// istanbul ignore else @preserve\nA ? O = A.brands.some((t) => z.test(t.brand)) : O = z.test(S);\nconst wn = O, V = /(iPhone|iPod|iPad)/, An = A ? A.brands.some((t) => V.test(t.brand)) : (\n /* istanbul ignore next @preserve */\n V.test(S)\n), Sn = S ? S.includes(\"Firefox\") : (\n /* istanbul ignore next @preserve */\n !1\n), { head: N } = document, Nn = [\"webkitPerspective\", \"perspective\"].some((t) => t in N.style), R = (t, e, n, o) => {\n const s = o || !1;\n t.addEventListener(e, n, s);\n}, Q = (t, e, n, o) => {\n const s = o || !1;\n t.removeEventListener(e, n, s);\n}, $t = (t, e, n, o) => {\n const s = (c) => {\n /* istanbul ignore else @preserve */\n (c.target === t || c.currentTarget === t) && (n.apply(t, [c]), Q(t, e, s, o));\n };\n R(t, e, s, o);\n}, _t = () => {\n}, Mn = (() => {\n let t = !1;\n try {\n const e = Object.defineProperty({}, \"passive\", {\n get: () => (t = !0, t)\n });\n // istanbul ignore next @preserve\n $t(document, P, _t, e);\n } catch {\n }\n return t;\n})(), Tn = [\"webkitTransform\", \"transform\"].some((t) => t in N.style), kn = \"ontouchstart\" in window || /* istanbul ignore next */\n\"msMaxTouchPoints\" in navigator, Dn = [\"webkitAnimation\", \"animation\"].some((t) => t in N.style), Cn = [\"webkitTransition\", \"transition\"].some((t) => t in N.style), j = (t, e) => t.getAttribute(e), On = (t, e, n) => e.getAttributeNS(t, n), te = (t, e) => t.hasAttribute(e), Ln = (t, e, n) => e.hasAttributeNS(t, n), In = (t, e, n) => t.setAttribute(e, n), xn = (t, e, n, o) => e.setAttributeNS(t, n, o), zn = (t, e) => t.removeAttribute(e), Vn = (t, e, n) => e.removeAttributeNS(t, n), Bn = (t, ...e) => {\n t.classList.add(...e);\n}, Fn = (t, ...e) => {\n t.classList.remove(...e);\n}, Hn = (t, e) => t.classList.contains(e), { body: Pn } = document, { documentElement: Un } = document, Wn = (t) => Array.from(t), v = (t) => t != null && typeof t == \"object\" || !1, i = (t) => v(t) && typeof t.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some((e) => t.nodeType === e) || !1, l = (t) => i(t) && t.nodeType === 1 || !1, E = /* @__PURE__ */ new Map(), L = {\n data: E,\n /**\n * Sets web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @param instance the component instance\n */\n set: (t, e, n) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n E.has(e) || E.set(e, /* @__PURE__ */ new Map()), E.get(e).set(t, n);\n },\n /**\n * Returns all instances for specified component.\n *\n * @param component the component's name or a unique key\n * @returns all the component instances\n */\n getAllFor: (t) => E.get(t) || null,\n /**\n * Returns the instance associated with the target.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @returns the instance\n */\n get: (t, e) => {\n if (!l(t) || !e) return null;\n const n = L.getAllFor(e);\n return t && n && n.get(t) || null;\n },\n /**\n * Removes web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n */\n remove: (t, e) => {\n const n = L.getAllFor(e);\n if (!n || !l(t)) return;\n n.delete(t);\n // istanbul ignore else @preserve\n n.size === 0 && E.delete(e);\n }\n}, Rn = (t, e) => L.get(t, e), M = (t) => typeof t == \"string\" || !1, q = (t) => v(t) && t.constructor.name === \"Window\" || !1, G = (t) => i(t) && t.nodeType === 9 || !1, d = (t) => q(t) ? t.document : G(t) ? t : i(t) ? t.ownerDocument : window.document, T = (t, ...e) => Object.assign(t, ...e), ee = (t) => {\n if (!t) return;\n if (M(t))\n return d().createElement(t);\n const { tagName: e } = t, n = ee(e);\n if (!n) return;\n const o = { ...t };\n return delete o.tagName, T(n, o);\n}, ne = (t, e) => {\n if (!t || !e) return;\n if (M(e))\n return d().createElementNS(t, e);\n const { tagName: n } = e, o = ne(t, n);\n if (!o) return;\n const s = { ...e };\n return delete s.tagName, T(o, s);\n}, K = (t, e) => t.dispatchEvent(e), Qn = (t, e, n) => n.indexOf(t) === e, g = (t, e) => {\n const n = getComputedStyle(t), o = e.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return n.getPropertyValue(o);\n}, oe = (t) => {\n const e = g(t, U), n = g(t, Kt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, se = (t) => {\n const e = g(t, U), n = g(t, Gt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, jn = (t, e) => {\n let n = 0;\n const o = new Event(D), s = se(t), c = oe(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(D, a), n = 1);\n };\n t.addEventListener(D, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else {\n // istanbul ignore next @preserve\n e.apply(t, [o]);\n }\n}, ce = (t) => {\n const e = g(t, W), n = g(t, Xt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, re = (t) => {\n const e = g(t, W), n = g(t, Jt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, qn = (t, e) => {\n let n = 0;\n const o = new Event(C), s = re(t), c = ce(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(C, a), n = 1);\n };\n t.addEventListener(C, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else\n e.apply(t, [o]);\n}, Gn = (t) => Float32Array.from(Array.from(t)), Kn = (t) => Float64Array.from(Array.from(t)), Jn = (t, e) => t.focus(e), B = (t) => [\"true\", !0].includes(t) ? !0 : [\"false\", !1].includes(t) ? !1 : [\"null\", \"\", null, void 0].includes(t) ? null : t !== \"\" && !Number.isNaN(+t) ? +t : t, w = (t) => Object.entries(t), ae = (t) => t.toLowerCase(), Xn = (t, e, n, o) => {\n const s = { ...n }, c = { ...t.dataset }, a = { ...e }, u = {}, p = \"title\";\n return w(c).forEach(([r, f]) => {\n const y = o && typeof r == \"string\" && r.includes(o) ? r.replace(o, \"\").replace(/[A-Z]/g, (J) => ae(J)) : (\n /* istanbul ignore next @preserve */\n r\n );\n u[y] = B(f);\n }), w(s).forEach(([r, f]) => {\n s[r] = B(f);\n }), w(e).forEach(([r, f]) => {\n // istanbul ignore else @preserve\n r in s ? a[r] = s[r] : r in u ? a[r] = u[r] : a[r] = r === p ? j(t, p) : f;\n }), a;\n}, Yn = (t, e) => v(t) && (Object.hasOwn(t, e) || e in t), Zn = (t) => Object.keys(t), $n = (t) => Object.values(t), _n = (t) => Object.fromEntries(t), to = (t, e) => {\n const n = new CustomEvent(t, {\n cancelable: !0,\n bubbles: !0\n });\n // istanbul ignore else @preserve\n return v(e) && T(n, e), n;\n}, eo = { passive: !0 }, no = (t) => t.offsetHeight, oo = (t, e) => {\n w(e).forEach(([n, o]) => {\n if (o && M(n) && n.includes(\"--\"))\n t.style.setProperty(n, o);\n else {\n const s = {};\n s[n] = o, T(t.style, s);\n }\n });\n}, I = (t) => v(t) && t.constructor.name === \"Map\" || !1, ie = (t) => typeof t == \"number\" || !1, m = /* @__PURE__ */ new Map(), so = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n *\n * @param element target element\n * @param callback the callback\n * @param delay the execution delay\n * @param key a unique key\n */\n set: (t, e, n, o) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n if (o && o.length) {\n // istanbul ignore else @preserve\n m.has(t) || m.set(t, /* @__PURE__ */ new Map()), m.get(t).set(o, setTimeout(e, n));\n } else\n m.set(t, setTimeout(e, n));\n },\n /**\n * Returns the timer associated with the target.\n *\n * @param element target element\n * @param key a unique\n * @returns the timer\n */\n get: (t, e) => {\n if (!l(t)) return null;\n const n = m.get(t);\n return e && n && I(n) ? n.get(e) || /* istanbul ignore next */\n null : ie(n) ? n : null;\n },\n /**\n * Clears the element's timer.\n *\n * @param element target element\n * @param key a unique key\n */\n clear: (t, e) => {\n if (!l(t)) return;\n const n = m.get(t);\n if (e && e.length && I(n)) {\n clearTimeout(n.get(e)), n.delete(e);\n // istanbul ignore else @preserve\n n.size === 0 && m.delete(t);\n } else\n clearTimeout(n), m.delete(t);\n }\n}, co = (t) => t.toUpperCase(), ue = (t, e) => (i(e) ? e : d()).querySelectorAll(t), x = /* @__PURE__ */ new Map();\nfunction le(t) {\n const { shiftKey: e, code: n } = t, o = d(this), s = [...ue(qt, this)].filter(\n (u) => !te(u, \"disabled\") && !j(u, X)\n );\n if (!s.length) return;\n const c = s[0], a = s[s.length - 1];\n // istanbul ignore else @preserve\n n === \"Tab\" && (e && o.activeElement === c ? (a.focus(), t.preventDefault()) : !e && o.activeElement === a && (c.focus(), t.preventDefault()));\n}\nconst de = (t) => x.has(t) === !0, ro = (t) => {\n const e = de(t);\n (e ? Q : R)(t, \"keydown\", le), e ? x.delete(t) : x.set(t, !0);\n}, h = (t, e) => {\n const { width: n, height: o, top: s, right: c, bottom: a, left: u } = t.getBoundingClientRect();\n let p = 1, r = 1;\n if (e && l(t)) {\n const { offsetWidth: f, offsetHeight: y } = t;\n p = f > 0 ? Math.round(n) / f : (\n /* istanbul ignore next */\n 1\n ), r = y > 0 ? Math.round(o) / y : (\n /* istanbul ignore next */\n 1\n );\n }\n return {\n width: n / p,\n height: o / r,\n top: s / r,\n right: c / p,\n bottom: a / r,\n left: u / p,\n x: u / p,\n y: s / r\n };\n}, ao = (t) => d(t).body, k = (t) => d(t).documentElement, io = (t) => d(t).head, uo = (t) => {\n const e = q(t), n = e ? t.scrollX : t.scrollLeft, o = e ? t.scrollY : t.scrollTop;\n return { x: n, y: o };\n}, pe = (t) => i(t) && t.constructor.name === \"ShadowRoot\" || !1, lo = (t) => t.nodeName === \"HTML\" ? t : l(t) && t.assignedSlot || // step into the shadow DOM of the parent of a slotted node\ni(t) && t.parentNode || // DOM Element detected\npe(t) && t.host || // ShadowRoot detected\nk(t), fe = (t) => {\n if (!l(t)) return !1;\n const { width: e, height: n } = h(t), { offsetWidth: o, offsetHeight: s } = t;\n return Math.round(e) !== o || Math.round(n) !== s;\n}, po = (t, e, n) => {\n const o = l(e), s = h(t, o && fe(e)), c = { x: 0, y: 0 };\n // istanbul ignore else @preserve\n if (o) {\n const a = h(e, !0);\n c.x = a.x + e.clientLeft, c.y = a.y + e.clientTop;\n }\n return {\n x: s.left + n.x - c.x,\n y: s.top + n.y - c.y,\n width: s.width,\n height: s.height\n };\n};\nlet F = 0, H = 0;\nconst b = /* @__PURE__ */ new Map(), me = (t, e) => {\n let n = e ? F : H;\n if (e) {\n const o = me(t), s = b.get(o) || /* @__PURE__ */ new Map();\n b.has(o) || b.set(o, s), I(s) && !s.has(e) ? (s.set(e, n), F += 1) : n = s.get(e);\n } else {\n const o = t.id || t;\n b.has(o) ? n = b.get(o) : (b.set(o, n), H += 1);\n }\n return n;\n}, fo = (t) => {\n var e;\n return t ? G(t) ? t.defaultView : i(t) ? (e = t == null ? void 0 : t.ownerDocument) == null ? void 0 : e.defaultView : t : window;\n}, ge = (t) => Array.isArray(t) || !1, mo = (t) => i(t) && t.nodeName === \"CANVAS\" || !1, ve = (t) => l(t) && !!t.shadowRoot || !1, go = (t) => i(t) && [1, 2, 3, 4, 5, 6, 7, 8].some((e) => t.nodeType === e) || !1, vo = (t) => {\n if (!i(t)) return !1;\n const { top: e, bottom: n } = h(t), { clientHeight: o } = k(t);\n return e <= o && n >= 0;\n}, Eo = (t) => {\n if (!i(t)) return !1;\n const { clientWidth: e, clientHeight: n } = k(t), { top: o, left: s, bottom: c, right: a } = h(t, !0);\n return o >= 0 && s >= 0 && c <= n && a <= e;\n}, bo = (t) => ge(t) && t.every(l) || !1, ho = (t) => typeof t == \"function\" || !1, yo = (t) => v(t) && t.constructor.name === \"HTMLCollection\" || !1, wo = (t) => l(t) && t.tagName === \"IMG\" || !1, Ao = (t) => {\n if (!M(t)) return !1;\n try {\n JSON.parse(t);\n } catch {\n return !1;\n }\n return !0;\n}, So = (t) => v(t) && t.constructor.name === \"WeakMap\" || !1, No = (t) => i(t) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some((e) => t.constructor.name.includes(e)) || !1, Mo = (t) => v(t) && t.constructor.name === \"NodeList\" || !1, To = (t) => k(t).dir === \"rtl\", ko = (t) => i(t) && t.constructor.name.includes(\"SVG\") || !1, Do = (t) => i(t) && [\"TABLE\", \"TD\", \"TH\"].includes(t.nodeName) || !1, Ee = (t, e) => t ? t.closest(e) || // break out of `ShadowRoot`\nEe(t.getRootNode().host, e) : null, Co = (t, e) => l(t) ? t : (i(e) ? e : d()).querySelector(t), be = (t, e) => (i(e) ? e : d()).getElementsByTagName(t), Oo = (t) => [...be(\"*\", t)].filter(ve), Lo = (t, e) => d(e).getElementById(t) || null, Io = (t, e) => (e && i(e) ? e : d()).getElementsByClassName(t), xo = (t, e) => t.matches(e), zo = \"2.0.5\";\nexport {\n Wn as ArrayFrom,\n P as DOMContentLoadedEvent,\n et as DOMMouseScrollEvent,\n L as Data,\n Gn as Float32ArrayFrom,\n Kn as Float64ArrayFrom,\n T as ObjectAssign,\n w as ObjectEntries,\n _n as ObjectFromEntries,\n Yn as ObjectHasOwn,\n Zn as ObjectKeys,\n $n as ObjectValues,\n so as Timer,\n Y as abortEvent,\n Bn as addClass,\n fn as addEventListener,\n Kt as animationDelay,\n Gt as animationDuration,\n D as animationEndEvent,\n U as animationName,\n he as ariaChecked,\n we as ariaDescribedBy,\n ye as ariaDescription,\n Ae as ariaExpanded,\n Se as ariaHasPopup,\n X as ariaHidden,\n Ne as ariaLabel,\n Me as ariaLabelledBy,\n Te as ariaModal,\n ke as ariaPressed,\n De as ariaSelected,\n Oe as ariaValueMax,\n Ce as ariaValueMin,\n Le as ariaValueNow,\n Ie as ariaValueText,\n Z as beforeunloadEvent,\n gn as bezierEasings,\n $ as blurEvent,\n _ as changeEvent,\n Ee as closest,\n tt as contextmenuEvent,\n to as createCustomEvent,\n ee as createElement,\n ne as createElementNS,\n K as dispatchEvent,\n Qn as distinct,\n Pn as documentBody,\n Un as documentElement,\n N as documentHead,\n ze as dragEvent,\n Pe as dragendEvent,\n Be as dragenterEvent,\n Fe as dragleaveEvent,\n He as dragoverEvent,\n Ve as dragstartEvent,\n jn as emulateAnimationEnd,\n qn as emulateTransitionEnd,\n nt as errorEvent,\n Jn as focus,\n ot as focusEvent,\n qe as focusEvents,\n qt as focusableSelector,\n st as focusinEvent,\n ct as focusoutEvent,\n rt as gesturechangeEvent,\n at as gestureendEvent,\n it as gesturestartEvent,\n j as getAttribute,\n On as getAttributeNS,\n h as getBoundingClientRect,\n Oo as getCustomElements,\n d as getDocument,\n ao as getDocumentBody,\n k as getDocumentElement,\n io as getDocumentHead,\n oe as getElementAnimationDelay,\n se as getElementAnimationDuration,\n Lo as getElementById,\n g as getElementStyle,\n ce as getElementTransitionDelay,\n re as getElementTransitionDuration,\n Io as getElementsByClassName,\n be as getElementsByTagName,\n Rn as getInstance,\n uo as getNodeScroll,\n lo as getParentNode,\n po as getRectRelativeToOffsetParent,\n me as getUID,\n fo as getWindow,\n te as hasAttribute,\n Ln as hasAttributeNS,\n Hn as hasClass,\n de as hasFocusTrap,\n An as isApple,\n ge as isArray,\n mo as isCanvas,\n ve as isCustomElement,\n G as isDocument,\n go as isElement,\n vo as isElementInScrollRange,\n Eo as isElementInViewport,\n bo as isElementsArray,\n Sn as isFirefox,\n ho as isFunction,\n yo as isHTMLCollection,\n l as isHTMLElement,\n wo as isHTMLImageElement,\n Ao as isJSON,\n I as isMap,\n No as isMedia,\n wn as isMobile,\n i as isNode,\n Mo as isNodeList,\n ie as isNumber,\n v as isObject,\n To as isRTL,\n ko as isSVGElement,\n fe as isScaledElement,\n pe as isShadowRoot,\n M as isString,\n Do as isTableElement,\n So as isWeakMap,\n q as isWindow,\n Ke as keyAlt,\n Je as keyArrowDown,\n Ye as keyArrowLeft,\n Ze as keyArrowRight,\n Xe as keyArrowUp,\n $e as keyBackspace,\n _e as keyCapsLock,\n tn as keyControl,\n en as keyDelete,\n nn as keyEnter,\n sn as keyEscape,\n cn as keyInsert,\n rn as keyMeta,\n on as keyNumpadEnter,\n an as keyPause,\n un as keyScrollLock,\n ln as keyShift,\n dn as keySpace,\n pn as keyTab,\n Ge as keyboardEventKeys,\n ut as keydownEvent,\n lt as keypressEvent,\n dt as keyupEvent,\n pt as loadEvent,\n Ue as loadstartEvent,\n xo as matches,\n Re as mouseClickEvents,\n Qe as mouseHoverEvents,\n We as mouseSwipeEvents,\n ft as mouseclickEvent,\n mt as mousedblclickEvent,\n gt as mousedownEvent,\n bt as mouseenterEvent,\n Et as mousehoverEvent,\n yt as mouseinEvent,\n ht as mouseleaveEvent,\n St as mousemoveEvent,\n wt as mouseoutEvent,\n At as mouseoverEvent,\n vt as mouseupEvent,\n Nt as mousewheelEvent,\n Mt as moveEvent,\n xe as nativeEvents,\n _t as noop,\n Xn as normalizeOptions,\n B as normalizeValue,\n Q as off,\n vn as offsetHeight,\n En as offsetWidth,\n R as on,\n $t as one,\n Tt as orientationchangeEvent,\n eo as passiveHandler,\n kt as pointercancelEvent,\n Dt as pointerdownEvent,\n Ct as pointerleaveEvent,\n Ot as pointermoveEvent,\n Lt as pointerupEvent,\n Co as querySelector,\n ue as querySelectorAll,\n It as readystatechangeEvent,\n no as reflow,\n zn as removeAttribute,\n Vn as removeAttributeNS,\n Fn as removeClass,\n mn as removeEventListener,\n xt as resetEvent,\n zt as resizeEvent,\n Ht as scrollEvent,\n bn as scrollHeight,\n hn as scrollWidth,\n Vt as selectEvent,\n Bt as selectendEvent,\n Ft as selectstartEvent,\n In as setAttribute,\n xn as setAttributeNS,\n oo as setElementStyle,\n Pt as submitEvent,\n Nn as support3DTransform,\n Dn as supportAnimation,\n Mn as supportPassive,\n kn as supportTouch,\n Tn as supportTransform,\n Cn as supportTransition,\n yn as tabindex,\n ae as toLowerCase,\n co as toUpperCase,\n ro as toggleFocusTrap,\n je as touchEvents,\n Rt as touchcancelEvent,\n Qt as touchendEvent,\n Wt as touchmoveEvent,\n Ut as touchstartEvent,\n Xt as transitionDelay,\n Jt as transitionDuration,\n C as transitionEndEvent,\n W as transitionProperty,\n jt as unloadEvent,\n S as userAgent,\n A as userAgentData,\n zo as version\n};\n//# sourceMappingURL=shorty.mjs.map\n","const e = {}, f = (t) => {\n const { type: c, currentTarget: i } = t;\n [...e[c]].forEach(([n, s]) => {\n /* istanbul ignore else @preserve */\n i === n && [...s].forEach(([o, a]) => {\n o.apply(n, [t]), typeof a == \"object\" && a.once && r(n, c, o, a);\n });\n });\n}, E = (t, c, i, n) => {\n /* istanbul ignore else @preserve */\n e[c] || (e[c] = /* @__PURE__ */ new Map());\n const s = e[c];\n /* istanbul ignore else @preserve */\n s.has(t) || s.set(t, /* @__PURE__ */ new Map());\n const o = s.get(t), { size: a } = o;\n o.set(i, n);\n /* istanbul ignore else @preserve */\n a || t.addEventListener(c, f, n);\n}, r = (t, c, i, n) => {\n const s = e[c], o = s && s.get(t), a = o && o.get(i), d = a !== void 0 ? a : n;\n /* istanbul ignore else @preserve */\n o && o.has(i) && o.delete(i);\n /* istanbul ignore else @preserve */\n s && (!o || !o.size) && s.delete(t);\n /* istanbul ignore else @preserve */\n (!s || !s.size) && delete e[c];\n /* istanbul ignore else @preserve */\n (!o || !o.size) && t.removeEventListener(\n c,\n f,\n d\n );\n}, g = E, M = r;\nexport {\n E as addListener,\n f as globalListener,\n M as off,\n g as on,\n e as registry,\n r as removeListener\n};\n//# sourceMappingURL=event-listener.mjs.map\n","/**\n * Global namespace for most components `fade` class.\n */\nconst fadeClass = 'fade';\nexport default fadeClass;\n","/**\n * Global namespace for most components `show` class.\n */\nconst showClass = 'show';\nexport default showClass;\n","/**\n * Global namespace for most components `dismiss` option.\n */\nconst dataBsDismiss = 'data-bs-dismiss';\nexport default dataBsDismiss;\n","/** @type {string} */\nconst alertString = 'alert';\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = 'Alert';\nexport default alertComponent;\n","import { version } from '../package.json';\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport { Data, isHTMLElement, isString, normalizeOptions, ObjectKeys, querySelector } from '@thednp/shorty';\n\nimport type { BaseOptions } from '../interface/baseComponent';\nimport Version from '../version';\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options =\n this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, 'bs')\n : // istanbul ignore next @preserve\n {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return 'BaseComponent';\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach(prop => {\n delete this[prop];\n });\n }\n}\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport fadeClass from '../strings/fadeClass';\nimport showClass from '../strings/showClass';\nimport dataBsDismiss from '../strings/dataBsDismiss';\nimport alertString from '../strings/alertString';\nimport alertComponent from '../strings/alertComponent';\nimport type { AlertEvent } from '../interface/alert';\n\nimport BaseComponent from './base-component';\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) => getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(`close.bs.${alertString}`);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(`closed.bs.${alertString}`);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/**\n * Global namespace for most components active class.\n */\nconst activeClass = 'active';\nexport default activeClass;\n","/**\n * Global namespace for most components `toggle` option.\n */\nconst dataBsToggle = 'data-bs-toggle';\nexport default dataBsToggle;\n","/** @type {string} */\nconst buttonString = 'button';\nexport default buttonString;\n","/** @type {string} */\nconst buttonComponent = 'Button';\nexport default buttonComponent;\n","/* Native JavaScript for Bootstrap 5 | Button\n---------------------------------------------*/\nimport {\n addClass,\n ariaPressed,\n getAttribute,\n getInstance,\n hasClass,\n mouseclickEvent,\n removeClass,\n setAttribute,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport activeClass from '../strings/activeClass';\nimport dataBsToggle from '../strings/dataBsToggle';\nimport buttonString from '../strings/buttonString';\nimport buttonComponent from '../strings/buttonComponent';\n\nimport BaseComponent from './base-component';\n\n// BUTTON PRIVATE GC\n// =================\nconst buttonSelector = `[${dataBsToggle}=\"${buttonString}\"]`;\n\n/**\n * Static method which returns an existing `Button` instance associated\n * to a target `Element`.\n */\nconst getButtonInstance = (element: HTMLElement) => getInstance',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) => getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n","/** @type {string} */\nconst scrollspyString = 'scrollspy';\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = 'ScrollSpy';\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n getWindow,\n hasClass,\n isHTMLElement,\n isWindow,\n passiveHandler,\n querySelector,\n removeClass,\n scrollEvent,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport activeClass from '../strings/activeClass';\nimport scrollspyString from '../strings/scrollspyString';\nimport scrollspyComponent from '../strings/scrollspyComponent';\n\nimport BaseComponent from './base-component';\nimport { ScrollSpyEvent, ScrollSpyOptions } from '../interface/scrollspy';\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) => getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } = self;\n const { offset } = options;\n const isWin = isWindow(scrollTarget as Node | Window);\n\n const links = target && getElementsByTagName('A', target);\n const scrollHEIGHT = scrollTarget\n ? getScrollHeight(scrollTarget)\n : // istanbul ignore next @preserve\n scrollHeight;\n\n self.scrollTop = isWin ? (scrollTarget as Window).scrollY : (scrollTarget as HTMLElement).scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n [...links].forEach(link => {\n href = getAttribute(link, 'href');\n targetItem =\n href && href.charAt(0) === '#' && href.slice(-1) !== '#' && querySelector(href, getDocument(element));\n\n if (targetItem) {\n self.items.push(link);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push((isWin ? rect.top + self.scrollTop : targetItem.offsetTop) - offset);\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: Node | Window) => {\n return isHTMLElement(scrollTarget as Node)\n ? (scrollTarget as HTMLElement).scrollHeight\n : getDocumentElement(scrollTarget as Node).scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return isWindow(scrollTarget as Node) ? (scrollTarget as Window).innerHeight : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName('A', target)].forEach(item => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, 'nav') || hasClass(parentItem, 'dropdown-menu')) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach(menuItem => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement | Window;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(options.target as HTMLElement | string, getDocument(element));\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight ? element : getWindow(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // add event handlers\n this._toggleEventListeners(true);\n\n this.refresh();\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === 'undefined' || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /**\n * Toggles on/off the component event listener.\n *\n * @param add when `true`, listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.scrollTarget as EventTarget, scrollEvent, this.refresh, passiveHandler);\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst tabString = 'tab';\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = 'Tab';\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport collapsingClass from '../strings/collapsingClass';\nimport activeClass from '../strings/activeClass';\nimport fadeClass from '../strings/fadeClass';\nimport showClass from '../strings/showClass';\nimport dropdownClasses from '../strings/dropdownClasses';\nimport dataBsToggle from '../strings/dataBsToggle';\nimport tabString from '../strings/tabString';\nimport tabComponent from '../strings/tabComponent';\n\nimport getTargetElement from '../util/getTargetElement';\nimport BaseComponent from './base-component';\nimport type { /* TabOptions, */ TabEvent } from '../interface/tab';\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) => getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(`show.bs.${tabString}`);\nconst shownTabEvent = createCustomEvent(`shown.bs.${tabString}`);\nconst hideTabEvent = createCustomEvent(`hide.bs.${tabString}`);\nconst hiddenTabEvent = createCustomEvent(`hidden.bs.${tabString}`);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = '';\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) || { tab: null }; // istanbul ignore next @preserve\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) || { currentHeight: 0, nextHeight: 0 }; // istanbul ignore next @preserve\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) || {\n // istanbul ignore next @preserve\n tab: null,\n content: null,\n };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach(c => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, 'overflow-hidden');\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight\n : // istanbul ignore next @preserve\n 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach(c => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, 'overflow-hidden');\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (self: Tab): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (activeTabs.length === 1 && !dropdownClasses.some(c => hasClass(activeTabs[0].parentElement as HTMLElement, c))) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement) ? getTargetElement(tab as HTMLElement) : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(',.')}`);\n return dropdown ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown) : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, '.nav');\n const container = closest(content, '.tab-content');\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, 'true');\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, 'true');\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, 'false');\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (content && (hasClass(content, fadeClass) || (nextContent && hasClass(nextContent, fadeClass)))) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst toastString = 'toast';\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = 'Toast';\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport fadeClass from '../strings/fadeClass';\nimport showClass from '../strings/showClass';\nimport dataBsDismiss from '../strings/dataBsDismiss';\nimport dataBsToggle from '../strings/dataBsToggle';\nimport toastString from '../strings/toastString';\nimport toastComponent from '../strings/toastComponent';\nimport getTargetElement from '../util/getTargetElement';\nimport BaseComponent from './base-component';\nimport { ToastEvent, ToastOptions } from '../interface/toast';\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = 'showing';\n/** @deprecated */\nconst hideClass = 'hide';\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) => getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(`show.bs.${toastString}`);\nconst shownToastEvent = createCustomEvent, ToastEvent>(`shown.bs.${toastString}`);\nconst hideToastEvent = createCustomEvent, ToastEvent>(`hide.bs.${toastString}`);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(`hidden.bs.${toastString}`);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === 'A') e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (self && element !== relatedTarget && !element.contains(relatedTarget as Node)) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [...querySelectorAll(toastToggleSelector, getDocument(element))].filter(\n btn => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(e =>\n action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach(btn => action(btn, mouseclickEvent, toastClickHandler));\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n","import { Data, getElementsByTagName, matches } from '@thednp/shorty';\n\nimport { addListener } from '@thednp/event-listener';\n\nimport Alert from '../components/alert';\nimport Button from '../components/button';\nimport Carousel from '../components/carousel';\nimport Collapse from '../components/collapse';\nimport Dropdown from '../components/dropdown';\nimport Modal from '../components/modal';\nimport Offcanvas from '../components/offcanvas';\nimport Popover from '../components/popover';\nimport ScrollSpy from '../components/scrollspy';\nimport Tab from '../components/tab';\nimport Toast from '../components/toast';\nimport Tooltip from '../components/tooltip';\n\nconst componentsList = new Map<\n string,\n | typeof Alert\n | typeof Button\n | typeof Carousel\n | typeof Collapse\n | typeof Dropdown\n | typeof Modal\n | typeof Offcanvas\n | typeof Popover\n | typeof ScrollSpy\n | typeof Tab\n | typeof Toast\n | typeof Tooltip\n>();\n\ntype Component =\n | Alert\n | Button\n | Carousel\n | Collapse\n | Dropdown\n | Modal\n | Offcanvas\n | Popover\n | ScrollSpy\n | Tab\n | Toast\n | Tooltip;\n\n[Alert, Button, Carousel, Collapse, Dropdown, Modal, Offcanvas, Popover, ScrollSpy, Tab, Toast, Tooltip].forEach(c =>\n componentsList.set(c.prototype.name, c),\n);\n\n/**\n * Initialize all matched `Element`s for one component.\n *\n * @param callback\n * @param collection\n */\nconst initComponentDataAPI = (\n callback: (el: HTMLElement) => Component,\n collection: HTMLCollectionOf | HTMLElement[],\n) => {\n [...collection].forEach(x => callback(x));\n};\n\n/**\n * Remove one component from a target container element or all in the page.\n *\n * @param component the component name\n * @param context parent `Node`\n */\nconst removeComponentDataAPI = (component: string, context: ParentNode) => {\n const compData = Data.getAllFor(component) as Map;\n\n if (compData) {\n [...compData].forEach(([element, instance]) => {\n if (context.contains(element)) {\n (instance as T & { dispose: () => void }).dispose();\n }\n });\n }\n};\n\n/**\n * Initialize all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const initCallback = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n const elemCollection = [...getElementsByTagName('*', lookUp)];\n\n componentsList.forEach(cs => {\n const { init, selector } = cs;\n initComponentDataAPI(\n init,\n elemCollection.filter(item => matches(item, selector)),\n );\n });\n};\n\n/**\n * Remove all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const removeDataAPI = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n\n componentsList.forEach(comp => {\n removeComponentDataAPI(comp.prototype.name, lookUp);\n });\n};\n\n// Bulk initialize all components\nif (document.body) initCallback();\nelse {\n addListener(document, 'DOMContentLoaded', () => initCallback(), {\n once: true,\n });\n}\n"],"names":["we","Ae","X","Te","ke","De","P","ot","st","ct","ut","dt","ft","gt","Et","bt","ht","Dt","Ot","Lt","zt","Ht","Ut","Ve","qt","Je","Xe","Ye","Ze","sn","Jt","Xt","C","W","Yt","A","Zt","S","z","V","An","N","R","e","n","o","s","Q","$t","c","_t","j","te","In","zn","Bn","Fn","Hn","v","i","l","E","L","Rn","M","q","G","d","T","ee","K","g","ce","re","qn","a","u","Jn","B","w","ae","Xn","p","r","f","y","J","Zn","to","eo","no","oo","I","ie","m","so","ue","x","le","de","ro","h","ao","k","pe","lo","F","H","b","me","fo","ge","vo","ho","Mo","To","Do","Ee","Co","be","Io","xo","fadeClass","showClass","dataBsDismiss","alertString","alertComponent","Version","BaseComponent","target","config","__publicField","element","isHTMLElement","isString","querySelector","prevInstance","Data","ObjectKeys","normalizeOptions","prop","alertSelector","alertDismissSelector","getAlertInstance","getInstance","alertInitCallback","Alert","closeAlertEvent","createCustomEvent","closedAlertEvent","alertTransitionEnd","self","dispatchEvent","hasClass","removeClass","emulateTransitionEnd","add","action","addListener","removeListener","dismiss","close","mouseclickEvent","activeClass","dataBsToggle","buttonString","buttonComponent","buttonSelector","getButtonInstance","buttonInitCallback","Button","isActive","getAttribute","addClass","setAttribute","ariaPressed","dataBsTarget","carouselString","carouselComponent","dataBsParent","dataBsContainer","getTargetElement","targetAttr","doc","getDocument","att","attValue","closest","carouselSelector","carouselItem","dataBsSlideTo","dataBsSlide","pausedClass","carouselDefaults","getCarouselInstance","carouselInitCallback","Carousel","startX","currentX","endX","carouselSlideEvent","carouselSlidEvent","carouselTransitionEndHandler","index","direction","slides","options","activeItem","getActiveIndex","orientation","directionClass","Timer","carouselPauseHandler","carouselResumeHandler","carouselIndicatorHandler","newIndex","carouselControlsHandler","carouselKeyHandler","code","querySelectorAll","isElementInScrollRange","RTL","isRTL","arrowKeyNext","keyArrowLeft","keyArrowRight","arrowKeyPrev","carouselDragHandler","carouselPointerDownHandler","controls","indicators","el","toggleCarouselTouchHandlers","carouselPointerMoveHandler","carouselPointerUpHandler","_a","activateCarouselIndicator","pointermoveEvent","passiveHandler","pointerupEvent","touch","pause","interval","keyboard","mouseenterEvent","mouseleaveEvent","pointerdownEvent","touchstartEvent","dragstartEvent","arrow","indicator","keydownEvent","getElementsByClassName","activeIndex","transitionItem","matches","ar","isPaused","idx","next","eventProperties","ObjectAssign","getElementTransitionDuration","reflow","isAnimating","clone","collapsingClass","collapseString","collapseComponent","collapseSelector","collapseToggleSelector","collapseDefaults","getCollapseInstance","collapseInitCallback","Collapse","showCollapseEvent","shownCollapseEvent","hideCollapseEvent","hiddenCollapseEvent","expandCollapse","parent","triggers","noop","setElementStyle","btn","ariaExpanded","collapseContent","collapseClickHandler","trigger","activeCollapse","activeCollapseInstance","dropdownMenuClasses","dropdownComponent","dropdownMenuClass","isEmptyAnchor","parentAnchor","hasAttribute","dropdownString","dropupString","dropstartString","dropendString","dropdownClasses","dropdownSelector","getDropdownInstance","dropdownInitCallback","Dropdown","dropdownMenuEndClass","verticalClass","horizontalClass","menuFocusTags","dropdownDefaults","showDropdownEvent","shownDropdownEvent","hideDropdownEvent","hiddenDropdownEvent","updatedDropdownEvent","styleDropdown","menu","parentElement","offset","getElementStyle","menuEnd","style","positionClass","dropdownMargin","dropdownPosition","menuWidth","menuHeight","clientWidth","clientHeight","getDocumentElement","targetLeft","targetTop","targetWidth","targetHeight","getBoundingClientRect","leftFullExceed","rightFullExceed","bottomExceed","bottomFullExceed","topExceed","leftExceed","rightExceed","posAjust","margins","getMenuItems","firstElementChild","toggleDropdownDismiss","dropdownDismissHandler","focusEvent","dropdownPreventScroll","keyupEvent","dropdownKeyHandler","scrollEvent","resizeEvent","ev","getWindow","dropdownLayoutHandler","getCurrentOpenDropdown","currentParent","type","isForm","mousedownEvent","dropdownClickHandler","keyArrowDown","keyArrowUp","activeElement","open","menuItems","focus","keyEscape","currentElement","currentInstance","modalString","modalComponent","offcanvasComponent","fixedTopClass","fixedBottomClass","stickyTopClass","positionStickyClass","getFixedItems","resetScrollbar","bd","getDocumentBody","fixedItems","fixed","measureScrollbar","innerWidth","setScrollbar","overflow","bodyPad","sbWidth","itemPadValue","itemMValue","offcanvasString","popupContainer","createElement","appendPopup","customContainer","containerIsBody","isNode","lookup","BODY","removePopup","hasPopup","backdropString","modalBackdropClass","offcanvasBackdropClass","modalActiveSelector","offcanvasActiveSelector","overlay","getCurrentOpen","toggleOverlayType","isModal","targetClass","appendOverlay","hasFade","showOverlay","hideOverlay","removeOverlay","isVisible","modalSelector","modalToggleSelector","modalDismissSelector","modalStaticClass","modalDefaults","getModalInstance","modalInitCallback","Modal","showModalEvent","shownModalEvent","hideModalEvent","hiddenModalEvent","setModalScrollbar","scrollbarWidth","scrollHeight","modalHeight","modalScrollHeight","modalOverflow","padStyle","toggleModalDismiss","update","modalDismissHandler","modalKeyHandler","afterModalHide","relatedTarget","focusElement","toggleFocusTrap","afterModalShow","beforeModalShow","removeAttribute","ariaHidden","ariaModal","beforeModalHide","modalClickHandler","currentTarget","isStatic","modalDialog","backdrop","selectedText","targetInsideDialog","staticTransitionEnd","duration","overlayDelay","currentOpen","that","callback","offcanvasSelector","offcanvasToggleSelector","offcanvasDismissSelector","offcanvasTogglingClass","offcanvasDefaults","getOffcanvasInstance","offcanvasInitCallback","Offcanvas","showOffcanvasEvent","shownOffcanvasEvent","hideOffcanvasEvent","hiddenOffcanvasEvent","setOffCanvasScrollbar","toggleOffCanvasDismiss","offcanvasKeyDismissHandler","offcanvasDismissHandler","beforeOffcanvasShow","showOffcanvasComplete","beforeOffcanvasHide","hideOffcanvasComplete","offcanvasTriggerHandler","offCanvasDismiss","selection","visibleTrigger","isOpen","popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","body","tipClassPositions","styleTip","tipClasses","tooltip","container","tipPositions","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","placement","parentCWidth","parentOWidth","fixedParent","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","horizontals","verticals","updatedTooltipEvent","toLowerCase","tooltipDefaults","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","dirty","isFunction","tempDocument","isNodeList","isArray","createTip","id","title","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","tooltipHeader","tooltipBody","tempTitle","tempContent","tempBtn","getElementContainer","majorBlockTags","containers","parentNode","getParentNode","isShadowRoot","isTableElement","tooltipSelector","titleAttr","getTooltipInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","ariaDescribedBy","hasTip","disposeTooltipComplete","toggleTooltipTitle","toggleTooltipAction","tooltipShownAction","shownTooltipEvent","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","offsetHeight","parentModal","parentOffcanvas","win","scrollTarget","titleAtt","tr","mousehoverEvent","focusinEvent","focusoutEvent","isApple","tipComponent","elem","getUID","position","outTimer","tipContainer","showTooltipEvent","delay","hideTooltipEvent","enabled","popoverSelector","popoverDefaults","getPopoverInstance","popoverInitCallback","Popover","scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","updateSpyTargets","itemsLength","isWin","isWindow","links","getElementsByTagName","scrollHEIGHT","getScrollHeight","href","targetItem","rect","getOffsetHeight","link","clear","item","activate","parents","parentItem","menuItem","parentLink","scrollTop","maxScroll","items","newActiveItem","offsets","tabString","tabComponent","tabSelector","getTabInstance","tabInitCallback","Tab","showTabEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","tabContent","nav","triggerTabShow","nextContent","tab","currentHeight","nextHeight","triggerTabHide","getActiveTab","activeTabs","getParentDropdown","dropdown","tabClickHandler","firstTab","firstTabContent","ariaSelected","activeDropdown","toggleTab","toastString","toastComponent","toastSelector","toastDismissSelector","toastToggleSelector","showingClass","hideClass","toastDefaults","getToastInstance","toastInitCallback","Toast","showToastEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","hideToastComplete","hideToast","showToast","toastClickHandler","interactiveToastHandler","isShown","hide","componentsList","initComponentDataAPI","collection","removeComponentDataAPI","component","context","compData","instance","initCallback","lookUp","elemCollection","cs","init","selector","removeDataAPI","comp"],"mappings":"sNAAoD,MAAAA,GAAK,mBAAoBC,GAAK,gBAAuCC,GAAI,cAA0DC,GAAK,aAAcC,GAAK,eAAgBC,GAAK,gBAAyLC,GAAI,mBAAyDC,GAAK,QAASC,GAAK,UAAWC,GAAK,WAA0EC,GAAK,UAA4BC,GAAK,QAAsBC,EAAK,QAA0BC,GAAK,YAA6BC,GAAK,QAASC,GAAK,aAAcC,GAAK,aAAmKC,GAAK,cAAoCC,GAAK,cAAeC,GAAK,YAAoDC,GAAK,SAA+DC,GAAK,SAAyBC,GAAK,aAmD1lCC,GAAK,YAauBC,GAAK,oFAuClCC,GAAK,YAAaC,GAAK,UAAWC,GAAK,YAAaC,GAAK,aAAkHC,GAAK,SAAyMC,GAAK,qBAAsBC,GAAK,kBAAmBC,GAAI,gBAAiBC,GAAI,qBA0B9WC,GAAK,UAAU,cAAeC,GAAID,GAAI,CAAE,UAAWE,EAAE,EAAK,UAAWC,GAAID,GAAIE,GAAI,4BAEvL;AACAH,GAAQA,GAAE,OAAO,KAAM,GAAMG,GAAE,KAAK,EAAE,KAAK,CAAC,EAAQA,GAAE,KAAKD,EAAC,EAC9C,MAAAE,GAAI,qBAAsBC,GAAKL,GAAIA,GAAE,OAAO,KAAM,GAAMI,GAAE,KAAK,EAAE,KAAK,CAAC,EAEnFA,GAAE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AAW+I,GAASO,GAAWgC,GAAKmC,GAAOhH,EAAO,EAAE,WACvG6H,GAAe,IAAI/oB,EAAE,UAAU,KAAMA,CAAC,CACxC,EAQA,MAAMgpB,GAAuB,CAC3B/O,EACAgP,IACG,CACH,CAAC,GAAGA,CAAU,EAAE,QAAajmB,GAAAiX,EAASjX,CAAC,CAAC,CAC1C,EAQMkmB,GAAyB,CAAIC,EAAmBC,IAAwB,CACtE,MAAAC,EAAW7jB,GAAK,UAAU2jB,CAAS,EAErCE,GACD,CAAA,GAAGA,CAAQ,EAAE,QAAQ,CAAC,CAAClkB,EAASmkB,CAAQ,IAAM,CACzCF,EAAQ,SAASjkB,CAAO,GACzBmkB,EAAyC,QAAQ,CACpD,CACD,CAEL,EAOaC,GAAgBH,GAAyB,CACpD,MAAMI,EAASJ,GAAWA,EAAQ,SAAWA,EAAU,SACjDK,EAAiB,CAAC,GAAGnF,GAAqB,IAAKkF,CAAM,CAAC,EAE5DT,GAAe,QAAcW,GAAA,CACrB,KAAA,CAAE,KAAAC,EAAM,SAAAC,CAAa,EAAAF,EAC3BV,GACEW,EACAF,EAAe,OAAO1E,GAAQjY,GAAQiY,EAAM6E,CAAQ,CAAC,CAAA,CACvD,CACD,CACH,EAOaC,GAAiBT,GAAyB,CACrD,MAAMI,EAASJ,GAAWA,EAAQ,SAAWA,EAAU,SAEvDL,GAAe,QAAgBe,GAAA,CACNZ,GAAAY,EAAK,UAAU,KAAMN,CAAM,CAAA,CACnD,CACH,EAGA,OAAI,SAAS,KAAmBD,KAE9B1iB,EAAY,SAAU,mBAAoB,IAAM0iB,GAAA,EAAgB,CAC9D,KAAM,EAAA,CACP","x_google_ignoreList":[0,1]} \ No newline at end of file +{"version":3,"file":"bootstrap-native.js","sources":["../node_modules/.pnpm/@thednp+shorty@2.0.5/node_modules/@thednp/shorty/dist/shorty.mjs","../node_modules/.pnpm/@thednp+event-listener@2.0.6/node_modules/@thednp/event-listener/dist/event-listener.mjs","../src/strings/fadeClass.ts","../src/strings/showClass.ts","../src/strings/dataBsDismiss.ts","../src/strings/alertString.ts","../src/strings/alertComponent.ts","../src/version.ts","../src/components/base-component.ts","../src/components/alert.ts","../src/strings/activeClass.ts","../src/strings/dataBsToggle.ts","../src/strings/buttonString.ts","../src/strings/buttonComponent.ts","../src/components/button.ts","../src/strings/dataBsTarget.ts","../src/strings/carouselString.ts","../src/strings/carouselComponent.ts","../src/strings/dataBsParent.ts","../src/strings/dataBsContainer.ts","../src/util/getTargetElement.ts","../src/components/carousel.ts","../src/strings/collapsingClass.ts","../src/strings/collapseString.ts","../src/strings/collapseComponent.ts","../src/components/collapse.ts","../src/strings/dropdownClasses.ts","../src/strings/dropdownComponent.ts","../src/strings/dropdownMenuClass.ts","../src/util/isEmptyAnchor.ts","../src/components/dropdown.ts","../src/strings/modalString.ts","../src/strings/modalComponent.ts","../src/strings/offcanvasComponent.ts","../src/strings/fixedTopClass.ts","../src/strings/fixedBottomClass.ts","../src/strings/stickyTopClass.ts","../src/strings/positionStickyClass.ts","../src/util/scrollbar.ts","../src/strings/offcanvasString.ts","../src/util/popupContainer.ts","../src/util/backdrop.ts","../src/util/isVisible.ts","../src/components/modal.ts","../src/components/offcanvas.ts","../src/strings/popoverString.ts","../src/strings/popoverComponent.ts","../src/strings/tooltipString.ts","../src/util/getTipTemplate.ts","../src/util/tipClassPositions.ts","../src/util/styleTip.ts","../src/util/tooltipDefaults.ts","../src/strings/dataOriginalTitle.ts","../src/strings/tooltipComponent.ts","../src/util/setHtml.ts","../src/util/createTip.ts","../src/util/getElementContainer.ts","../src/components/tooltip.ts","../src/components/popover.ts","../src/strings/scrollspyString.ts","../src/strings/scrollspyComponent.ts","../src/components/scrollspy.ts","../src/strings/tabString.ts","../src/strings/tabComponent.ts","../src/components/tab.ts","../src/strings/toastString.ts","../src/strings/toastComponent.ts","../src/components/toast.ts","../src/util/init.ts"],"sourcesContent":["const he = \"aria-checked\", ye = \"aria-description\", we = \"aria-describedby\", Ae = \"aria-expanded\", Se = \"aria-haspopup\", X = \"aria-hidden\", Ne = \"aria-label\", Me = \"aria-labelledby\", Te = \"aria-modal\", ke = \"aria-pressed\", De = \"aria-selected\", Ce = \"aria-valuemin\", Oe = \"aria-valuemax\", Le = \"aria-valuenow\", Ie = \"aria-valuetext\", Y = \"abort\", Z = \"beforeunload\", $ = \"blur\", _ = \"change\", tt = \"contextmenu\", P = \"DOMContentLoaded\", et = \"DOMMouseScroll\", nt = \"error\", ot = \"focus\", st = \"focusin\", ct = \"focusout\", rt = \"gesturechange\", at = \"gestureend\", it = \"gesturestart\", ut = \"keydown\", lt = \"keypress\", dt = \"keyup\", pt = \"load\", ft = \"click\", mt = \"dblclick\", gt = \"mousedown\", vt = \"mouseup\", Et = \"hover\", bt = \"mouseenter\", ht = \"mouseleave\", yt = \"mousein\", wt = \"mouseout\", At = \"mouseover\", St = \"mousemove\", Nt = \"mousewheel\", Mt = \"move\", Tt = \"orientationchange\", kt = \"pointercancel\", Dt = \"pointerdown\", Ct = \"pointerleave\", Ot = \"pointermove\", Lt = \"pointerup\", It = \"readystatechange\", xt = \"reset\", zt = \"resize\", Vt = \"select\", Bt = \"selectend\", Ft = \"selectstart\", Ht = \"scroll\", Pt = \"submit\", Ut = \"touchstart\", Wt = \"touchmove\", Rt = \"touchcancel\", Qt = \"touchend\", jt = \"unload\", xe = {\n DOMContentLoaded: P,\n DOMMouseScroll: et,\n abort: Y,\n beforeunload: Z,\n blur: $,\n change: _,\n click: ft,\n contextmenu: tt,\n dblclick: mt,\n error: nt,\n focus: ot,\n focusin: st,\n focusout: ct,\n gesturechange: rt,\n gestureend: at,\n gesturestart: it,\n hover: Et,\n keydown: ut,\n keypress: lt,\n keyup: dt,\n load: pt,\n mousedown: gt,\n mousemove: St,\n mousein: yt,\n mouseout: wt,\n mouseenter: bt,\n mouseleave: ht,\n mouseover: At,\n mouseup: vt,\n mousewheel: Nt,\n move: Mt,\n orientationchange: Tt,\n pointercancel: kt,\n pointerdown: Dt,\n pointerleave: Ct,\n pointermove: Ot,\n pointerup: Lt,\n readystatechange: It,\n reset: xt,\n resize: zt,\n scroll: Ht,\n select: Vt,\n selectend: Bt,\n selectstart: Ft,\n submit: Pt,\n touchcancel: Rt,\n touchend: Qt,\n touchmove: Wt,\n touchstart: Ut,\n unload: jt\n}, ze = \"drag\", Ve = \"dragstart\", Be = \"dragenter\", Fe = \"dragleave\", He = \"dragover\", Pe = \"dragend\", Ue = \"loadstart\", We = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, Re = { down: \"mousedown\", up: \"mouseup\" }, Qe = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : (\n /* istanbul ignore next */\n [\"mouseover\", \"mouseout\"]\n), je = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, qe = { in: \"focusin\", out: \"focusout\" }, qt = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]', Ge = {\n Backspace: \"Backspace\",\n // 8\n Tab: \"Tab\",\n // 9\n Enter: \"Enter\",\n // 13\n Shift: \"Shift\",\n // 16\n Control: \"Control\",\n // 17\n Alt: \"Alt\",\n // 18\n Pause: \"Pause\",\n // 19\n CapsLock: \"CapsLock\",\n // 20\n Escape: \"Escape\",\n // 27\n Scape: \"Space\",\n // 32\n ArrowLeft: \"ArrowLeft\",\n // 37\n ArrowUp: \"ArrowUp\",\n // 38\n ArrowRight: \"ArrowRight\",\n // 39\n ArrowDown: \"ArrowDown\",\n // 40\n Insert: \"Insert\",\n // 45\n Delete: \"Delete\",\n // 46\n Meta: \"Meta\",\n // 91 windows key\n ContextMenu: \"ContextMenu\",\n // 93\n ScrollLock: \"ScrollLock\"\n // 145\n}, Ke = \"Alt\", Je = \"ArrowDown\", Xe = \"ArrowUp\", Ye = \"ArrowLeft\", Ze = \"ArrowRight\", $e = \"Backspace\", _e = \"CapsLock\", tn = \"Control\", en = \"Delete\", nn = \"Enter\", on = \"NumpadEnter\", sn = \"Escape\", cn = \"Insert\", rn = \"Meta\", an = \"Pause\", un = \"ScrollLock\", ln = \"Shift\", dn = \"Space\", pn = \"Tab\", Gt = \"animationDuration\", Kt = \"animationDelay\", U = \"animationName\", D = \"animationend\", Jt = \"transitionDuration\", Xt = \"transitionDelay\", C = \"transitionend\", W = \"transitionProperty\", fn = \"addEventListener\", mn = \"removeEventListener\", gn = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\"\n}, vn = \"offsetHeight\", En = \"offsetWidth\", bn = \"scrollHeight\", hn = \"scrollWidth\", yn = \"tabindex\", Yt = navigator.userAgentData, A = Yt, { userAgent: Zt } = navigator, S = Zt, z = /iPhone|iPad|iPod|Android/i;\nlet O = !1;\n// istanbul ignore else @preserve\nA ? O = A.brands.some((t) => z.test(t.brand)) : O = z.test(S);\nconst wn = O, V = /(iPhone|iPod|iPad)/, An = A ? A.brands.some((t) => V.test(t.brand)) : (\n /* istanbul ignore next @preserve */\n V.test(S)\n), Sn = S ? S.includes(\"Firefox\") : (\n /* istanbul ignore next @preserve */\n !1\n), { head: N } = document, Nn = [\"webkitPerspective\", \"perspective\"].some((t) => t in N.style), R = (t, e, n, o) => {\n const s = o || !1;\n t.addEventListener(e, n, s);\n}, Q = (t, e, n, o) => {\n const s = o || !1;\n t.removeEventListener(e, n, s);\n}, $t = (t, e, n, o) => {\n const s = (c) => {\n /* istanbul ignore else @preserve */\n (c.target === t || c.currentTarget === t) && (n.apply(t, [c]), Q(t, e, s, o));\n };\n R(t, e, s, o);\n}, _t = () => {\n}, Mn = (() => {\n let t = !1;\n try {\n const e = Object.defineProperty({}, \"passive\", {\n get: () => (t = !0, t)\n });\n // istanbul ignore next @preserve\n $t(document, P, _t, e);\n } catch {\n }\n return t;\n})(), Tn = [\"webkitTransform\", \"transform\"].some((t) => t in N.style), kn = \"ontouchstart\" in window || /* istanbul ignore next */\n\"msMaxTouchPoints\" in navigator, Dn = [\"webkitAnimation\", \"animation\"].some((t) => t in N.style), Cn = [\"webkitTransition\", \"transition\"].some((t) => t in N.style), j = (t, e) => t.getAttribute(e), On = (t, e, n) => e.getAttributeNS(t, n), te = (t, e) => t.hasAttribute(e), Ln = (t, e, n) => e.hasAttributeNS(t, n), In = (t, e, n) => t.setAttribute(e, n), xn = (t, e, n, o) => e.setAttributeNS(t, n, o), zn = (t, e) => t.removeAttribute(e), Vn = (t, e, n) => e.removeAttributeNS(t, n), Bn = (t, ...e) => {\n t.classList.add(...e);\n}, Fn = (t, ...e) => {\n t.classList.remove(...e);\n}, Hn = (t, e) => t.classList.contains(e), { body: Pn } = document, { documentElement: Un } = document, Wn = (t) => Array.from(t), v = (t) => t != null && typeof t == \"object\" || !1, i = (t) => v(t) && typeof t.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some((e) => t.nodeType === e) || !1, l = (t) => i(t) && t.nodeType === 1 || !1, E = /* @__PURE__ */ new Map(), L = {\n data: E,\n /**\n * Sets web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @param instance the component instance\n */\n set: (t, e, n) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n E.has(e) || E.set(e, /* @__PURE__ */ new Map()), E.get(e).set(t, n);\n },\n /**\n * Returns all instances for specified component.\n *\n * @param component the component's name or a unique key\n * @returns all the component instances\n */\n getAllFor: (t) => E.get(t) || null,\n /**\n * Returns the instance associated with the target.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @returns the instance\n */\n get: (t, e) => {\n if (!l(t) || !e) return null;\n const n = L.getAllFor(e);\n return t && n && n.get(t) || null;\n },\n /**\n * Removes web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n */\n remove: (t, e) => {\n const n = L.getAllFor(e);\n if (!n || !l(t)) return;\n n.delete(t);\n // istanbul ignore else @preserve\n n.size === 0 && E.delete(e);\n }\n}, Rn = (t, e) => L.get(t, e), M = (t) => typeof t == \"string\" || !1, q = (t) => v(t) && t.constructor.name === \"Window\" || !1, G = (t) => i(t) && t.nodeType === 9 || !1, d = (t) => q(t) ? t.document : G(t) ? t : i(t) ? t.ownerDocument : window.document, T = (t, ...e) => Object.assign(t, ...e), ee = (t) => {\n if (!t) return;\n if (M(t))\n return d().createElement(t);\n const { tagName: e } = t, n = ee(e);\n if (!n) return;\n const o = { ...t };\n return delete o.tagName, T(n, o);\n}, ne = (t, e) => {\n if (!t || !e) return;\n if (M(e))\n return d().createElementNS(t, e);\n const { tagName: n } = e, o = ne(t, n);\n if (!o) return;\n const s = { ...e };\n return delete s.tagName, T(o, s);\n}, K = (t, e) => t.dispatchEvent(e), Qn = (t, e, n) => n.indexOf(t) === e, g = (t, e) => {\n const n = getComputedStyle(t), o = e.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return n.getPropertyValue(o);\n}, oe = (t) => {\n const e = g(t, U), n = g(t, Kt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, se = (t) => {\n const e = g(t, U), n = g(t, Gt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, jn = (t, e) => {\n let n = 0;\n const o = new Event(D), s = se(t), c = oe(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(D, a), n = 1);\n };\n t.addEventListener(D, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else {\n // istanbul ignore next @preserve\n e.apply(t, [o]);\n }\n}, ce = (t) => {\n const e = g(t, W), n = g(t, Xt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, re = (t) => {\n const e = g(t, W), n = g(t, Jt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, qn = (t, e) => {\n let n = 0;\n const o = new Event(C), s = re(t), c = ce(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(C, a), n = 1);\n };\n t.addEventListener(C, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else\n e.apply(t, [o]);\n}, Gn = (t) => Float32Array.from(Array.from(t)), Kn = (t) => Float64Array.from(Array.from(t)), Jn = (t, e) => t.focus(e), B = (t) => [\"true\", !0].includes(t) ? !0 : [\"false\", !1].includes(t) ? !1 : [\"null\", \"\", null, void 0].includes(t) ? null : t !== \"\" && !Number.isNaN(+t) ? +t : t, w = (t) => Object.entries(t), ae = (t) => t.toLowerCase(), Xn = (t, e, n, o) => {\n const s = { ...n }, c = { ...t.dataset }, a = { ...e }, u = {}, p = \"title\";\n return w(c).forEach(([r, f]) => {\n const y = o && typeof r == \"string\" && r.includes(o) ? r.replace(o, \"\").replace(/[A-Z]/g, (J) => ae(J)) : (\n /* istanbul ignore next @preserve */\n r\n );\n u[y] = B(f);\n }), w(s).forEach(([r, f]) => {\n s[r] = B(f);\n }), w(e).forEach(([r, f]) => {\n // istanbul ignore else @preserve\n r in s ? a[r] = s[r] : r in u ? a[r] = u[r] : a[r] = r === p ? j(t, p) : f;\n }), a;\n}, Yn = (t, e) => v(t) && (Object.hasOwn(t, e) || e in t), Zn = (t) => Object.keys(t), $n = (t) => Object.values(t), _n = (t) => Object.fromEntries(t), to = (t, e) => {\n const n = new CustomEvent(t, {\n cancelable: !0,\n bubbles: !0\n });\n // istanbul ignore else @preserve\n return v(e) && T(n, e), n;\n}, eo = { passive: !0 }, no = (t) => t.offsetHeight, oo = (t, e) => {\n w(e).forEach(([n, o]) => {\n if (o && M(n) && n.includes(\"--\"))\n t.style.setProperty(n, o);\n else {\n const s = {};\n s[n] = o, T(t.style, s);\n }\n });\n}, I = (t) => v(t) && t.constructor.name === \"Map\" || !1, ie = (t) => typeof t == \"number\" || !1, m = /* @__PURE__ */ new Map(), so = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n *\n * @param element target element\n * @param callback the callback\n * @param delay the execution delay\n * @param key a unique key\n */\n set: (t, e, n, o) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n if (o && o.length) {\n // istanbul ignore else @preserve\n m.has(t) || m.set(t, /* @__PURE__ */ new Map()), m.get(t).set(o, setTimeout(e, n));\n } else\n m.set(t, setTimeout(e, n));\n },\n /**\n * Returns the timer associated with the target.\n *\n * @param element target element\n * @param key a unique\n * @returns the timer\n */\n get: (t, e) => {\n if (!l(t)) return null;\n const n = m.get(t);\n return e && n && I(n) ? n.get(e) || /* istanbul ignore next */\n null : ie(n) ? n : null;\n },\n /**\n * Clears the element's timer.\n *\n * @param element target element\n * @param key a unique key\n */\n clear: (t, e) => {\n if (!l(t)) return;\n const n = m.get(t);\n if (e && e.length && I(n)) {\n clearTimeout(n.get(e)), n.delete(e);\n // istanbul ignore else @preserve\n n.size === 0 && m.delete(t);\n } else\n clearTimeout(n), m.delete(t);\n }\n}, co = (t) => t.toUpperCase(), ue = (t, e) => (i(e) ? e : d()).querySelectorAll(t), x = /* @__PURE__ */ new Map();\nfunction le(t) {\n const { shiftKey: e, code: n } = t, o = d(this), s = [...ue(qt, this)].filter(\n (u) => !te(u, \"disabled\") && !j(u, X)\n );\n if (!s.length) return;\n const c = s[0], a = s[s.length - 1];\n // istanbul ignore else @preserve\n n === \"Tab\" && (e && o.activeElement === c ? (a.focus(), t.preventDefault()) : !e && o.activeElement === a && (c.focus(), t.preventDefault()));\n}\nconst de = (t) => x.has(t) === !0, ro = (t) => {\n const e = de(t);\n (e ? Q : R)(t, \"keydown\", le), e ? x.delete(t) : x.set(t, !0);\n}, h = (t, e) => {\n const { width: n, height: o, top: s, right: c, bottom: a, left: u } = t.getBoundingClientRect();\n let p = 1, r = 1;\n if (e && l(t)) {\n const { offsetWidth: f, offsetHeight: y } = t;\n p = f > 0 ? Math.round(n) / f : (\n /* istanbul ignore next */\n 1\n ), r = y > 0 ? Math.round(o) / y : (\n /* istanbul ignore next */\n 1\n );\n }\n return {\n width: n / p,\n height: o / r,\n top: s / r,\n right: c / p,\n bottom: a / r,\n left: u / p,\n x: u / p,\n y: s / r\n };\n}, ao = (t) => d(t).body, k = (t) => d(t).documentElement, io = (t) => d(t).head, uo = (t) => {\n const e = q(t), n = e ? t.scrollX : t.scrollLeft, o = e ? t.scrollY : t.scrollTop;\n return { x: n, y: o };\n}, pe = (t) => i(t) && t.constructor.name === \"ShadowRoot\" || !1, lo = (t) => t.nodeName === \"HTML\" ? t : l(t) && t.assignedSlot || // step into the shadow DOM of the parent of a slotted node\ni(t) && t.parentNode || // DOM Element detected\npe(t) && t.host || // ShadowRoot detected\nk(t), fe = (t) => {\n if (!l(t)) return !1;\n const { width: e, height: n } = h(t), { offsetWidth: o, offsetHeight: s } = t;\n return Math.round(e) !== o || Math.round(n) !== s;\n}, po = (t, e, n) => {\n const o = l(e), s = h(t, o && fe(e)), c = { x: 0, y: 0 };\n // istanbul ignore else @preserve\n if (o) {\n const a = h(e, !0);\n c.x = a.x + e.clientLeft, c.y = a.y + e.clientTop;\n }\n return {\n x: s.left + n.x - c.x,\n y: s.top + n.y - c.y,\n width: s.width,\n height: s.height\n };\n};\nlet F = 0, H = 0;\nconst b = /* @__PURE__ */ new Map(), me = (t, e) => {\n let n = e ? F : H;\n if (e) {\n const o = me(t), s = b.get(o) || /* @__PURE__ */ new Map();\n b.has(o) || b.set(o, s), I(s) && !s.has(e) ? (s.set(e, n), F += 1) : n = s.get(e);\n } else {\n const o = t.id || t;\n b.has(o) ? n = b.get(o) : (b.set(o, n), H += 1);\n }\n return n;\n}, fo = (t) => {\n var e;\n return t ? G(t) ? t.defaultView : i(t) ? (e = t == null ? void 0 : t.ownerDocument) == null ? void 0 : e.defaultView : t : window;\n}, ge = (t) => Array.isArray(t) || !1, mo = (t) => i(t) && t.nodeName === \"CANVAS\" || !1, ve = (t) => l(t) && !!t.shadowRoot || !1, go = (t) => i(t) && [1, 2, 3, 4, 5, 6, 7, 8].some((e) => t.nodeType === e) || !1, vo = (t) => {\n if (!i(t)) return !1;\n const { top: e, bottom: n } = h(t), { clientHeight: o } = k(t);\n return e <= o && n >= 0;\n}, Eo = (t) => {\n if (!i(t)) return !1;\n const { clientWidth: e, clientHeight: n } = k(t), { top: o, left: s, bottom: c, right: a } = h(t, !0);\n return o >= 0 && s >= 0 && c <= n && a <= e;\n}, bo = (t) => ge(t) && t.every(l) || !1, ho = (t) => typeof t == \"function\" || !1, yo = (t) => v(t) && t.constructor.name === \"HTMLCollection\" || !1, wo = (t) => l(t) && t.tagName === \"IMG\" || !1, Ao = (t) => {\n if (!M(t)) return !1;\n try {\n JSON.parse(t);\n } catch {\n return !1;\n }\n return !0;\n}, So = (t) => v(t) && t.constructor.name === \"WeakMap\" || !1, No = (t) => i(t) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some((e) => t.constructor.name.includes(e)) || !1, Mo = (t) => v(t) && t.constructor.name === \"NodeList\" || !1, To = (t) => k(t).dir === \"rtl\", ko = (t) => i(t) && t.constructor.name.includes(\"SVG\") || !1, Do = (t) => i(t) && [\"TABLE\", \"TD\", \"TH\"].includes(t.nodeName) || !1, Ee = (t, e) => t ? t.closest(e) || // break out of `ShadowRoot`\nEe(t.getRootNode().host, e) : null, Co = (t, e) => l(t) ? t : (i(e) ? e : d()).querySelector(t), be = (t, e) => (i(e) ? e : d()).getElementsByTagName(t), Oo = (t) => [...be(\"*\", t)].filter(ve), Lo = (t, e) => d(e).getElementById(t) || null, Io = (t, e) => (e && i(e) ? e : d()).getElementsByClassName(t), xo = (t, e) => t.matches(e), zo = \"2.0.5\";\nexport {\n Wn as ArrayFrom,\n P as DOMContentLoadedEvent,\n et as DOMMouseScrollEvent,\n L as Data,\n Gn as Float32ArrayFrom,\n Kn as Float64ArrayFrom,\n T as ObjectAssign,\n w as ObjectEntries,\n _n as ObjectFromEntries,\n Yn as ObjectHasOwn,\n Zn as ObjectKeys,\n $n as ObjectValues,\n so as Timer,\n Y as abortEvent,\n Bn as addClass,\n fn as addEventListener,\n Kt as animationDelay,\n Gt as animationDuration,\n D as animationEndEvent,\n U as animationName,\n he as ariaChecked,\n we as ariaDescribedBy,\n ye as ariaDescription,\n Ae as ariaExpanded,\n Se as ariaHasPopup,\n X as ariaHidden,\n Ne as ariaLabel,\n Me as ariaLabelledBy,\n Te as ariaModal,\n ke as ariaPressed,\n De as ariaSelected,\n Oe as ariaValueMax,\n Ce as ariaValueMin,\n Le as ariaValueNow,\n Ie as ariaValueText,\n Z as beforeunloadEvent,\n gn as bezierEasings,\n $ as blurEvent,\n _ as changeEvent,\n Ee as closest,\n tt as contextmenuEvent,\n to as createCustomEvent,\n ee as createElement,\n ne as createElementNS,\n K as dispatchEvent,\n Qn as distinct,\n Pn as documentBody,\n Un as documentElement,\n N as documentHead,\n ze as dragEvent,\n Pe as dragendEvent,\n Be as dragenterEvent,\n Fe as dragleaveEvent,\n He as dragoverEvent,\n Ve as dragstartEvent,\n jn as emulateAnimationEnd,\n qn as emulateTransitionEnd,\n nt as errorEvent,\n Jn as focus,\n ot as focusEvent,\n qe as focusEvents,\n qt as focusableSelector,\n st as focusinEvent,\n ct as focusoutEvent,\n rt as gesturechangeEvent,\n at as gestureendEvent,\n it as gesturestartEvent,\n j as getAttribute,\n On as getAttributeNS,\n h as getBoundingClientRect,\n Oo as getCustomElements,\n d as getDocument,\n ao as getDocumentBody,\n k as getDocumentElement,\n io as getDocumentHead,\n oe as getElementAnimationDelay,\n se as getElementAnimationDuration,\n Lo as getElementById,\n g as getElementStyle,\n ce as getElementTransitionDelay,\n re as getElementTransitionDuration,\n Io as getElementsByClassName,\n be as getElementsByTagName,\n Rn as getInstance,\n uo as getNodeScroll,\n lo as getParentNode,\n po as getRectRelativeToOffsetParent,\n me as getUID,\n fo as getWindow,\n te as hasAttribute,\n Ln as hasAttributeNS,\n Hn as hasClass,\n de as hasFocusTrap,\n An as isApple,\n ge as isArray,\n mo as isCanvas,\n ve as isCustomElement,\n G as isDocument,\n go as isElement,\n vo as isElementInScrollRange,\n Eo as isElementInViewport,\n bo as isElementsArray,\n Sn as isFirefox,\n ho as isFunction,\n yo as isHTMLCollection,\n l as isHTMLElement,\n wo as isHTMLImageElement,\n Ao as isJSON,\n I as isMap,\n No as isMedia,\n wn as isMobile,\n i as isNode,\n Mo as isNodeList,\n ie as isNumber,\n v as isObject,\n To as isRTL,\n ko as isSVGElement,\n fe as isScaledElement,\n pe as isShadowRoot,\n M as isString,\n Do as isTableElement,\n So as isWeakMap,\n q as isWindow,\n Ke as keyAlt,\n Je as keyArrowDown,\n Ye as keyArrowLeft,\n Ze as keyArrowRight,\n Xe as keyArrowUp,\n $e as keyBackspace,\n _e as keyCapsLock,\n tn as keyControl,\n en as keyDelete,\n nn as keyEnter,\n sn as keyEscape,\n cn as keyInsert,\n rn as keyMeta,\n on as keyNumpadEnter,\n an as keyPause,\n un as keyScrollLock,\n ln as keyShift,\n dn as keySpace,\n pn as keyTab,\n Ge as keyboardEventKeys,\n ut as keydownEvent,\n lt as keypressEvent,\n dt as keyupEvent,\n pt as loadEvent,\n Ue as loadstartEvent,\n xo as matches,\n Re as mouseClickEvents,\n Qe as mouseHoverEvents,\n We as mouseSwipeEvents,\n ft as mouseclickEvent,\n mt as mousedblclickEvent,\n gt as mousedownEvent,\n bt as mouseenterEvent,\n Et as mousehoverEvent,\n yt as mouseinEvent,\n ht as mouseleaveEvent,\n St as mousemoveEvent,\n wt as mouseoutEvent,\n At as mouseoverEvent,\n vt as mouseupEvent,\n Nt as mousewheelEvent,\n Mt as moveEvent,\n xe as nativeEvents,\n _t as noop,\n Xn as normalizeOptions,\n B as normalizeValue,\n Q as off,\n vn as offsetHeight,\n En as offsetWidth,\n R as on,\n $t as one,\n Tt as orientationchangeEvent,\n eo as passiveHandler,\n kt as pointercancelEvent,\n Dt as pointerdownEvent,\n Ct as pointerleaveEvent,\n Ot as pointermoveEvent,\n Lt as pointerupEvent,\n Co as querySelector,\n ue as querySelectorAll,\n It as readystatechangeEvent,\n no as reflow,\n zn as removeAttribute,\n Vn as removeAttributeNS,\n Fn as removeClass,\n mn as removeEventListener,\n xt as resetEvent,\n zt as resizeEvent,\n Ht as scrollEvent,\n bn as scrollHeight,\n hn as scrollWidth,\n Vt as selectEvent,\n Bt as selectendEvent,\n Ft as selectstartEvent,\n In as setAttribute,\n xn as setAttributeNS,\n oo as setElementStyle,\n Pt as submitEvent,\n Nn as support3DTransform,\n Dn as supportAnimation,\n Mn as supportPassive,\n kn as supportTouch,\n Tn as supportTransform,\n Cn as supportTransition,\n yn as tabindex,\n ae as toLowerCase,\n co as toUpperCase,\n ro as toggleFocusTrap,\n je as touchEvents,\n Rt as touchcancelEvent,\n Qt as touchendEvent,\n Wt as touchmoveEvent,\n Ut as touchstartEvent,\n Xt as transitionDelay,\n Jt as transitionDuration,\n C as transitionEndEvent,\n W as transitionProperty,\n jt as unloadEvent,\n S as userAgent,\n A as userAgentData,\n zo as version\n};\n//# sourceMappingURL=shorty.mjs.map\n","const e = {}, f = (t) => {\n const { type: c, currentTarget: i } = t;\n [...e[c]].forEach(([n, s]) => {\n /* istanbul ignore else @preserve */\n i === n && [...s].forEach(([o, a]) => {\n o.apply(n, [t]), typeof a == \"object\" && a.once && r(n, c, o, a);\n });\n });\n}, E = (t, c, i, n) => {\n /* istanbul ignore else @preserve */\n e[c] || (e[c] = /* @__PURE__ */ new Map());\n const s = e[c];\n /* istanbul ignore else @preserve */\n s.has(t) || s.set(t, /* @__PURE__ */ new Map());\n const o = s.get(t), { size: a } = o;\n o.set(i, n);\n /* istanbul ignore else @preserve */\n a || t.addEventListener(c, f, n);\n}, r = (t, c, i, n) => {\n const s = e[c], o = s && s.get(t), a = o && o.get(i), d = a !== void 0 ? a : n;\n /* istanbul ignore else @preserve */\n o && o.has(i) && o.delete(i);\n /* istanbul ignore else @preserve */\n s && (!o || !o.size) && s.delete(t);\n /* istanbul ignore else @preserve */\n (!s || !s.size) && delete e[c];\n /* istanbul ignore else @preserve */\n (!o || !o.size) && t.removeEventListener(\n c,\n f,\n d\n );\n}, g = E, M = r;\nexport {\n E as addListener,\n f as globalListener,\n M as off,\n g as on,\n e as registry,\n r as removeListener\n};\n//# sourceMappingURL=event-listener.mjs.map\n","/**\n * Global namespace for most components `fade` class.\n */\nconst fadeClass = \"fade\";\nexport default fadeClass;\n","/**\n * Global namespace for most components `show` class.\n */\nconst showClass = \"show\";\nexport default showClass;\n","/**\n * Global namespace for most components `dismiss` option.\n */\nconst dataBsDismiss = \"data-bs-dismiss\";\nexport default dataBsDismiss;\n","/** @type {string} */\nconst alertString = \"alert\";\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = \"Alert\";\nexport default alertComponent;\n","import { version } from \"../package.json\";\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport {\n Data,\n isHTMLElement,\n isString,\n normalizeOptions,\n ObjectKeys,\n querySelector,\n} from \"@thednp/shorty\";\n\nimport type { BaseOptions } from \"../interface/baseComponent\";\nimport Version from \"../version\";\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options = this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, \"bs\")\n // istanbul ignore next @preserve\n : {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return \"BaseComponent\";\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach((prop) => {\n delete this[prop];\n });\n }\n}\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport alertString from \"../strings/alertString\";\nimport alertComponent from \"../strings/alertComponent\";\nimport type { AlertEvent } from \"../interface/alert\";\n\nimport BaseComponent from \"./base-component\";\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) =>\n getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(\n `close.bs.${alertString}`,\n);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(\n `closed.bs.${alertString}`,\n);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/**\n * Global namespace for most components active class.\n */\nconst activeClass = \"active\";\nexport default activeClass;\n","/**\n * Global namespace for most components `toggle` option.\n */\nconst dataBsToggle = \"data-bs-toggle\";\nexport default dataBsToggle;\n","/** @type {string} */\nconst buttonString = \"button\";\nexport default buttonString;\n","/** @type {string} */\nconst buttonComponent = \"Button\";\nexport default buttonComponent;\n","/* Native JavaScript for Bootstrap 5 | Button\n---------------------------------------------*/\nimport {\n addClass,\n ariaPressed,\n getAttribute,\n getInstance,\n hasClass,\n mouseclickEvent,\n removeClass,\n setAttribute,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport activeClass from \"../strings/activeClass\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport buttonString from \"../strings/buttonString\";\nimport buttonComponent from \"../strings/buttonComponent\";\n\nimport BaseComponent from \"./base-component\";\n\n// BUTTON PRIVATE GC\n// =================\nconst buttonSelector = `[${dataBsToggle}=\"${buttonString}\"]`;\n\n/**\n * Static method which returns an existing `Button` instance associated\n * to a target `Element`.\n */\nconst getButtonInstance = (element: HTMLElement) =>\n getInstance',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) =>\n getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n","/** @type {string} */\nconst scrollspyString = \"scrollspy\";\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = \"ScrollSpy\";\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n getWindow,\n hasClass,\n isHTMLElement,\n isWindow,\n passiveHandler,\n querySelector,\n removeClass,\n scrollEvent,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport activeClass from \"../strings/activeClass\";\nimport scrollspyString from \"../strings/scrollspyString\";\nimport scrollspyComponent from \"../strings/scrollspyComponent\";\n\nimport BaseComponent from \"./base-component\";\nimport { ScrollSpyEvent, ScrollSpyOptions } from \"../interface/scrollspy\";\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) =>\n getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent<\n ScrollSpyEventProps,\n ScrollSpyEvent\n>(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } =\n self;\n const { offset } = options;\n const isWin = isWindow(scrollTarget as Node | Window);\n\n const links = target && getElementsByTagName(\"A\", target);\n const scrollHEIGHT = scrollTarget\n ? getScrollHeight(scrollTarget)\n // istanbul ignore next @preserve\n : scrollHeight;\n\n self.scrollTop = isWin\n ? (scrollTarget as Window).scrollY\n : (scrollTarget as HTMLElement).scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (\n links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)\n ) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n [...links].forEach((link) => {\n href = getAttribute(link, \"href\");\n targetItem = href && href.charAt(0) === \"#\" && href.slice(-1) !== \"#\" &&\n querySelector(href, getDocument(element));\n\n if (targetItem) {\n self.items.push(link);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push(\n (isWin ? rect.top + self.scrollTop : targetItem.offsetTop) - offset,\n );\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: Node | Window) => {\n return isHTMLElement(scrollTarget as Node)\n ? (scrollTarget as HTMLElement).scrollHeight\n : getDocumentElement(scrollTarget as Node).scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return isWindow(scrollTarget as Node)\n ? (scrollTarget as Window).innerHeight\n : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName(\"A\", target)].forEach((item) => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, \"nav\") || hasClass(parentItem, \"dropdown-menu\")) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach((menuItem) => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement | Window;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(\n target: HTMLElement | string,\n config?: Partial,\n ) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(\n options.target as HTMLElement | string,\n getDocument(element),\n );\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight\n ? element\n : getWindow(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // add event handlers\n this._toggleEventListeners(true);\n\n this.refresh();\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === \"undefined\" || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /**\n * Toggles on/off the component event listener.\n *\n * @param add when `true`, listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(\n this.scrollTarget as EventTarget,\n scrollEvent,\n this.refresh,\n passiveHandler,\n );\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst tabString = \"tab\";\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = \"Tab\";\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport collapsingClass from \"../strings/collapsingClass\";\nimport activeClass from \"../strings/activeClass\";\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dropdownClasses from \"../strings/dropdownClasses\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport tabString from \"../strings/tabString\";\nimport tabComponent from \"../strings/tabComponent\";\n\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport type { /* TabOptions, */ TabEvent } from \"../interface/tab\";\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) =>\n getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(\n `show.bs.${tabString}`,\n);\nconst shownTabEvent = createCustomEvent(\n `shown.bs.${tabString}`,\n);\nconst hideTabEvent = createCustomEvent(\n `hide.bs.${tabString}`,\n);\nconst hiddenTabEvent = createCustomEvent(\n `hidden.bs.${tabString}`,\n);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = \"\";\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null };\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) ||\n // istanbul ignore next @preserve\n { currentHeight: 0, nextHeight: 0 };\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null, content: null };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, \"overflow-hidden\");\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight // istanbul ignore next @preserve\n : 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, \"overflow-hidden\");\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (\n self: Tab,\n): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (\n activeTabs.length === 1 &&\n !dropdownClasses.some((c) =>\n hasClass(activeTabs[0].parentElement as HTMLElement, c)\n )\n ) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement)\n ? getTargetElement(tab as HTMLElement)\n : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(\",.\")}`);\n return dropdown\n ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown)\n : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, \".nav\");\n const container = closest(content, \".tab-content\");\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, \"false\");\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (\n content &&\n (hasClass(content, fadeClass) ||\n (nextContent && hasClass(nextContent, fadeClass)))\n ) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst toastString = \"toast\";\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = \"Toast\";\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport toastString from \"../strings/toastString\";\nimport toastComponent from \"../strings/toastComponent\";\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport { ToastEvent, ToastOptions } from \"../interface/toast\";\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = \"showing\";\n/** @deprecated */\nconst hideClass = \"hide\";\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) =>\n getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(\n `show.bs.${toastString}`,\n);\nconst shownToastEvent = createCustomEvent, ToastEvent>(\n `shown.bs.${toastString}`,\n);\nconst hideToastEvent = createCustomEvent, ToastEvent>(\n `hide.bs.${toastString}`,\n);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(\n `hidden.bs.${toastString}`,\n);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === \"A\") e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (\n self && element !== relatedTarget &&\n !element.contains(relatedTarget as Node)\n ) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [\n ...querySelectorAll(toastToggleSelector, getDocument(element)),\n ].filter(\n (btn) => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(\n (e) => action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach((btn) =>\n action(btn, mouseclickEvent, toastClickHandler)\n );\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n","import { Data, getElementsByTagName, matches } from \"@thednp/shorty\";\n\nimport { addListener } from \"@thednp/event-listener\";\n\nimport Alert from \"../components/alert\";\nimport Button from \"../components/button\";\nimport Carousel from \"../components/carousel\";\nimport Collapse from \"../components/collapse\";\nimport Dropdown from \"../components/dropdown\";\nimport Modal from \"../components/modal\";\nimport Offcanvas from \"../components/offcanvas\";\nimport Popover from \"../components/popover\";\nimport ScrollSpy from \"../components/scrollspy\";\nimport Tab from \"../components/tab\";\nimport Toast from \"../components/toast\";\nimport Tooltip from \"../components/tooltip\";\n\nconst componentsList = new Map<\n string,\n | typeof Alert\n | typeof Button\n | typeof Carousel\n | typeof Collapse\n | typeof Dropdown\n | typeof Modal\n | typeof Offcanvas\n | typeof Popover\n | typeof ScrollSpy\n | typeof Tab\n | typeof Toast\n | typeof Tooltip\n>();\n\ntype Component =\n | Alert\n | Button\n | Carousel\n | Collapse\n | Dropdown\n | Modal\n | Offcanvas\n | Popover\n | ScrollSpy\n | Tab\n | Toast\n | Tooltip;\n\n[\n Alert,\n Button,\n Carousel,\n Collapse,\n Dropdown,\n Modal,\n Offcanvas,\n Popover,\n ScrollSpy,\n Tab,\n Toast,\n Tooltip,\n].forEach((c) => componentsList.set(c.prototype.name, c));\n\n/**\n * Initialize all matched `Element`s for one component.\n *\n * @param callback\n * @param collection\n */\nconst initComponentDataAPI = (\n callback: (el: HTMLElement) => Component,\n collection: HTMLCollectionOf | HTMLElement[],\n) => {\n [...collection].forEach((x) => callback(x));\n};\n\n/**\n * Remove one component from a target container element or all in the page.\n *\n * @param component the component name\n * @param context parent `Node`\n */\nconst removeComponentDataAPI = (component: string, context: ParentNode) => {\n const compData = Data.getAllFor(component) as Map;\n\n if (compData) {\n [...compData].forEach(([element, instance]) => {\n if (context.contains(element)) {\n (instance as T & { dispose: () => void }).dispose();\n }\n });\n }\n};\n\n/**\n * Initialize all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const initCallback = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n const elemCollection = [...getElementsByTagName(\"*\", lookUp)];\n\n componentsList.forEach((cs) => {\n const { init, selector } = cs;\n initComponentDataAPI(\n init,\n elemCollection.filter((item) => matches(item, selector)),\n );\n });\n};\n\n/**\n * Remove all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const removeDataAPI = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n\n componentsList.forEach((comp) => {\n removeComponentDataAPI(comp.prototype.name, lookUp);\n });\n};\n\n// Bulk initialize all components\nif (document.body) initCallback();\nelse {\n addListener(document, \"DOMContentLoaded\", () => initCallback(), {\n once: true,\n });\n}\n"],"names":["we","Ae","X","Te","ke","De","P","ot","st","ct","ut","dt","ft","gt","Et","bt","ht","Dt","Ot","Lt","zt","Ht","Ut","Ve","qt","Je","Xe","Ye","Ze","sn","Jt","Xt","C","W","Yt","A","Zt","S","z","V","An","N","R","e","n","o","s","Q","$t","c","_t","j","te","In","zn","Bn","Fn","Hn","v","i","l","E","L","Rn","M","q","G","d","T","ee","K","g","ce","re","qn","a","u","Jn","B","w","ae","Xn","p","r","f","y","J","Zn","to","eo","no","oo","I","ie","m","so","ue","x","le","de","ro","h","ao","k","pe","lo","F","H","b","me","fo","ge","vo","ho","Mo","To","Do","Ee","Co","be","Io","xo","fadeClass","showClass","dataBsDismiss","alertString","alertComponent","Version","BaseComponent","target","config","__publicField","element","isHTMLElement","isString","querySelector","prevInstance","Data","ObjectKeys","normalizeOptions","prop","alertSelector","alertDismissSelector","getAlertInstance","getInstance","alertInitCallback","Alert","closeAlertEvent","createCustomEvent","closedAlertEvent","alertTransitionEnd","self","dispatchEvent","hasClass","removeClass","emulateTransitionEnd","add","action","addListener","removeListener","dismiss","close","mouseclickEvent","activeClass","dataBsToggle","buttonString","buttonComponent","buttonSelector","getButtonInstance","buttonInitCallback","Button","isActive","getAttribute","addClass","setAttribute","ariaPressed","dataBsTarget","carouselString","carouselComponent","dataBsParent","dataBsContainer","getTargetElement","targetAttr","doc","getDocument","att","attValue","closest","carouselSelector","carouselItem","dataBsSlideTo","dataBsSlide","pausedClass","carouselDefaults","getCarouselInstance","carouselInitCallback","Carousel","startX","currentX","endX","carouselSlideEvent","carouselSlidEvent","carouselTransitionEndHandler","index","direction","slides","options","activeItem","getActiveIndex","orientation","directionClass","Timer","carouselPauseHandler","carouselResumeHandler","carouselIndicatorHandler","newIndex","carouselControlsHandler","carouselKeyHandler","code","querySelectorAll","isElementInScrollRange","RTL","isRTL","arrowKeyNext","keyArrowLeft","keyArrowRight","arrowKeyPrev","carouselDragHandler","carouselPointerDownHandler","controls","indicators","el","toggleCarouselTouchHandlers","carouselPointerMoveHandler","carouselPointerUpHandler","_a","activateCarouselIndicator","pointermoveEvent","passiveHandler","pointerupEvent","touch","pause","interval","keyboard","mouseenterEvent","mouseleaveEvent","pointerdownEvent","touchstartEvent","dragstartEvent","arrow","indicator","keydownEvent","getElementsByClassName","activeIndex","transitionItem","matches","ar","isPaused","idx","next","eventProperties","ObjectAssign","getElementTransitionDuration","reflow","isAnimating","clone","collapsingClass","collapseString","collapseComponent","collapseSelector","collapseToggleSelector","collapseDefaults","getCollapseInstance","collapseInitCallback","Collapse","showCollapseEvent","shownCollapseEvent","hideCollapseEvent","hiddenCollapseEvent","expandCollapse","parent","triggers","noop","setElementStyle","btn","ariaExpanded","collapseContent","collapseClickHandler","trigger","activeCollapse","activeCollapseInstance","dropdownMenuClasses","dropdownComponent","dropdownMenuClass","isEmptyAnchor","parentAnchor","hasAttribute","dropdownString","dropupString","dropstartString","dropendString","dropdownClasses","dropdownSelector","getDropdownInstance","dropdownInitCallback","Dropdown","dropdownMenuEndClass","verticalClass","horizontalClass","menuFocusTags","dropdownDefaults","showDropdownEvent","shownDropdownEvent","hideDropdownEvent","hiddenDropdownEvent","updatedDropdownEvent","styleDropdown","menu","parentElement","offset","getElementStyle","menuEnd","style","positionClass","dropdownMargin","dropdownPosition","menuWidth","menuHeight","clientWidth","clientHeight","getDocumentElement","targetLeft","targetTop","targetWidth","targetHeight","getBoundingClientRect","leftFullExceed","rightFullExceed","bottomExceed","bottomFullExceed","topExceed","leftExceed","rightExceed","posAjust","margins","getMenuItems","firstElementChild","toggleDropdownDismiss","dropdownDismissHandler","focusEvent","dropdownPreventScroll","keyupEvent","dropdownKeyHandler","scrollEvent","resizeEvent","ev","getWindow","dropdownLayoutHandler","getCurrentOpenDropdown","currentParent","type","isForm","mousedownEvent","dropdownClickHandler","keyArrowDown","keyArrowUp","activeElement","open","menuItems","focus","keyEscape","currentElement","currentInstance","modalString","modalComponent","offcanvasComponent","fixedTopClass","fixedBottomClass","stickyTopClass","positionStickyClass","getFixedItems","resetScrollbar","bd","getDocumentBody","fixedItems","fixed","measureScrollbar","innerWidth","setScrollbar","overflow","bodyPad","sbWidth","itemPadValue","itemMValue","offcanvasString","popupContainer","createElement","appendPopup","customContainer","containerIsBody","isNode","lookup","BODY","removePopup","hasPopup","backdropString","modalBackdropClass","offcanvasBackdropClass","modalActiveSelector","offcanvasActiveSelector","overlay","getCurrentOpen","toggleOverlayType","isModal","targetClass","appendOverlay","hasFade","showOverlay","hideOverlay","removeOverlay","isVisible","modalSelector","modalToggleSelector","modalDismissSelector","modalStaticClass","modalDefaults","getModalInstance","modalInitCallback","Modal","showModalEvent","shownModalEvent","hideModalEvent","hiddenModalEvent","setModalScrollbar","scrollbarWidth","scrollHeight","modalHeight","modalScrollHeight","modalOverflow","padStyle","toggleModalDismiss","update","modalDismissHandler","modalKeyHandler","afterModalHide","relatedTarget","focusElement","toggleFocusTrap","afterModalShow","beforeModalShow","removeAttribute","ariaHidden","ariaModal","beforeModalHide","modalClickHandler","currentTarget","isStatic","modalDialog","backdrop","selectedText","targetInsideDialog","staticTransitionEnd","duration","overlayDelay","currentOpen","that","callback","offcanvasSelector","offcanvasToggleSelector","offcanvasDismissSelector","offcanvasTogglingClass","offcanvasDefaults","getOffcanvasInstance","offcanvasInitCallback","Offcanvas","showOffcanvasEvent","shownOffcanvasEvent","hideOffcanvasEvent","hiddenOffcanvasEvent","setOffCanvasScrollbar","toggleOffCanvasDismiss","offcanvasKeyDismissHandler","offcanvasDismissHandler","beforeOffcanvasShow","showOffcanvasComplete","beforeOffcanvasHide","hideOffcanvasComplete","offcanvasTriggerHandler","offCanvasDismiss","selection","visibleTrigger","isOpen","popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","body","tipClassPositions","styleTip","tipClasses","tooltip","container","tipPositions","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","placement","parentCWidth","parentOWidth","fixedParent","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","horizontals","verticals","updatedTooltipEvent","toLowerCase","tooltipDefaults","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","dirty","isFunction","tempDocument","isNodeList","isArray","createTip","id","title","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","tooltipHeader","tooltipBody","tempTitle","tempContent","tempBtn","getElementContainer","majorBlockTags","containers","parentNode","getParentNode","isShadowRoot","isTableElement","tooltipSelector","titleAttr","getTooltipInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","ariaDescribedBy","hasTip","disposeTooltipComplete","toggleTooltipTitle","toggleTooltipAction","tooltipShownAction","shownTooltipEvent","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","offsetHeight","parentModal","parentOffcanvas","win","scrollTarget","titleAtt","tr","mousehoverEvent","focusinEvent","focusoutEvent","isApple","tipComponent","elem","getUID","position","outTimer","tipContainer","showTooltipEvent","delay","hideTooltipEvent","enabled","popoverSelector","popoverDefaults","getPopoverInstance","popoverInitCallback","Popover","scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","updateSpyTargets","itemsLength","isWin","isWindow","links","getElementsByTagName","scrollHEIGHT","getScrollHeight","href","targetItem","rect","getOffsetHeight","link","clear","item","activate","parents","parentItem","menuItem","parentLink","scrollTop","maxScroll","items","newActiveItem","offsets","tabString","tabComponent","tabSelector","getTabInstance","tabInitCallback","Tab","showTabEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","tabContent","nav","triggerTabShow","nextContent","tab","currentHeight","nextHeight","triggerTabHide","getActiveTab","activeTabs","getParentDropdown","dropdown","tabClickHandler","firstTab","firstTabContent","ariaSelected","activeDropdown","toggleTab","toastString","toastComponent","toastSelector","toastDismissSelector","toastToggleSelector","showingClass","hideClass","toastDefaults","getToastInstance","toastInitCallback","Toast","showToastEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","hideToastComplete","hideToast","showToast","toastClickHandler","interactiveToastHandler","isShown","hide","componentsList","initComponentDataAPI","collection","removeComponentDataAPI","component","context","compData","instance","initCallback","lookUp","elemCollection","cs","init","selector","removeDataAPI","comp"],"mappings":"sNAAoD,MAAAA,GAAK,mBAAoBC,GAAK,gBAAuCC,GAAI,cAA0DC,GAAK,aAAcC,GAAK,eAAgBC,GAAK,gBAAyLC,GAAI,mBAAyDC,GAAK,QAASC,GAAK,UAAWC,GAAK,WAA0EC,GAAK,UAA4BC,GAAK,QAAsBC,EAAK,QAA0BC,GAAK,YAA6BC,GAAK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,EAAY,SAAU,mBAAoB,IAAM0iB,GAAA,EAAgB,CAC9D,KAAM,EAAA,CACP","x_google_ignoreList":[0,1]} \ No newline at end of file diff --git a/dist/bootstrap-native.mjs b/dist/bootstrap-native.mjs index 883d1049..10b4b9d5 100644 --- a/dist/bootstrap-native.mjs +++ b/dist/bootstrap-native.mjs @@ -333,10 +333,7 @@ class ot { } const o = At.get(n, this.name); // istanbul ignore else @preserve - o && o._toggleEventListeners(), this.element = n, this.options = this.defaults && js(this.defaults).length ? ii(n, this.defaults, e || {}, "bs") : ( - // istanbul ignore next @preserve - {} - ), At.set(n, this.name, this); + o && o._toggleEventListeners(), this.element = n, this.options = this.defaults && js(this.defaults).length ? ii(n, this.defaults, e || {}, "bs") : {}, At.set(n, this.name, this); } // istanbul ignore next @preserve get version() { @@ -357,7 +354,11 @@ class ot { }); } } -const mi = `.${je}`, vi = `[${We}="${je}"]`, bi = (t) => W(t, Un), wi = (t) => new se(t), Xs = $(`close.bs.${je}`), Ei = $(`closed.bs.${je}`), Ks = (t) => { +const mi = `.${je}`, vi = `[${We}="${je}"]`, bi = (t) => W(t, Un), wi = (t) => new se(t), Xs = $( + `close.bs.${je}` +), Ei = $( + `closed.bs.${je}` +), Ks = (t) => { const { element: s } = t; w(s, Ei), t._toggleEventListeners(), t.dispose(), s.remove(); }; @@ -498,7 +499,9 @@ function Ai(t) { } } const Ii = ({ code: t, target: s }) => { - const e = E(s), [n] = [...J(Te, e)].filter((i) => Xn(i)), o = gt(n); + const e = E(s), [n] = [...J(Te, e)].filter( + (i) => Xn(i) + ), o = gt(n); // istanbul ignore next @preserve if (o && !o.isAnimating && !/textarea|input/i.test(s.nodeName)) { const i = Ct(n), c = i ? _s : Bs, a = i ? Bs : _s; @@ -517,7 +520,9 @@ function Li(t) { if (e && !e.isAnimating && !e.isTouch) { const { controls: n, indicators: o } = e; // istanbul ignore else @preserve - if (![...n, ...o].every((i) => i === s || i.contains(s))) { + if (![...n, ...o].every( + (i) => i === s || i.contains(s) + )) { ee = t.pageX; // istanbul ignore else @preserve this.contains(s) && (e.isTouch = !0, Jn(e, !0)); @@ -545,7 +550,17 @@ const ki = (t) => { t.indicators[s] && f(e[s], C); }, Jn = (t, s) => { const { element: e } = t, n = s ? _ : B; - n(E(e), Uo, ki, nt), n(E(e), qo, Ni, nt); + n( + E(e), + Uo, + ki, + nt + ), n( + E(e), + qo, + Ni, + nt + ); }, us = (t) => { const { slides: s, element: e } = t, n = S(`.${Z}.${C}`, e); return T(n) ? [...s].indexOf(n) : -1; @@ -564,7 +579,12 @@ class oe extends ot { */ d(this, "_toggleEventListeners", (e) => { const { element: n, options: o, slides: i, controls: c, indicators: a } = this, { touch: l, pause: r, interval: h, keyboard: p } = o, v = e ? _ : B; - r && h && (v(n, Me, Si), v(n, ys, Pi)), l && i.length > 2 && (v(n, Yo, Li, nt), v(n, Cs, Zs, { passive: !1 }), v(n, Zo, Zs, { passive: !1 })); + r && h && (v(n, Me, Si), v(n, ys, Pi)), l && i.length > 2 && (v( + n, + Yo, + Li, + nt + ), v(n, Cs, Zs, { passive: !1 }), v(n, Zo, Zs, { passive: !1 })); // istanbul ignore else @preserve c.length && c.forEach((P) => { // istanbul ignore else @preserve @@ -579,18 +599,23 @@ class oe extends ot { this.direction = Ct(o) ? "right" : "left", this.isTouch = !1, this.slides = rt(Z, o); const { slides: i } = this; if (i.length >= 2) { - const c = us(this), a = [...i].find((h) => Kn(h, `.${Z}-next,.${Z}-next`)); + const c = us(this), a = [...i].find( + (h) => Kn(h, `.${Z}-next,.${Z}-next`) + ); this.index = c; const l = E(o); this.controls = [ ...J(`[${Et}]`, o), - ...J(`[${Et}][${fs}="#${o.id}"]`, l) + ...J( + `[${Et}][${fs}="#${o.id}"]`, + l + ) ].filter((h, p, v) => p === v.indexOf(h)), this.indicator = S(`.${It}-indicators`, o), this.indicators = [ - ...this.indicator ? J(`[${gs}]`, this.indicator) : ( - // istanbul ignore next @preserve - [] - ), - ...J(`[${gs}][${fs}="#${o.id}"]`, l) + ...this.indicator ? J(`[${gs}]`, this.indicator) : [], + ...J( + `[${gs}][${fs}="#${o.id}"]`, + l + ) ].filter((h, p, v) => p === v.indexOf(h)); const { options: r } = this; this.options.interval = r.interval === !0 ? Us.interval : r.interval; @@ -622,7 +647,10 @@ class oe extends ot { * Check if instance is animating. */ get isAnimating() { - return S(`.${Z}-next,.${Z}-prev`, this.element) !== null; + return S( + `.${Z}-next,.${Z}-prev`, + this.element + ) !== null; } // CAROUSEL PUBLIC METHODS // ======================= @@ -748,10 +776,14 @@ class ie extends ot { d(this, "_toggleEventListeners", (e) => { const n = e ? _ : B, { triggers: o } = this; // istanbul ignore else @preserve - o.length && o.forEach((i) => n(i, N, Wi)); + o.length && o.forEach( + (i) => n(i, N, Wi) + ); }); const { element: o, options: i } = this, c = E(o); - this.triggers = [...J(Qn, c)].filter((a) => K(a) === o), this.parent = T(i.parent) ? i.parent : we(i.parent) ? K(o) || S(i.parent, c) : null, this._toggleEventListeners(!0); + this.triggers = [...J(Qn, c)].filter( + (a) => K(a) === o + ), this.parent = T(i.parent) ? i.parent : we(i.parent) ? K(o) || S(i.parent, c) : null, this._toggleEventListeners(!0); } /** * Returns component name string. @@ -781,9 +813,9 @@ class ie extends ot { show() { const { element: e, parent: n, triggers: o } = this; let i, c; - if (n && (i = [...J(`.${X}.${m}`, n)].find( - (a) => Pe(a) - ), c = i && Pe(i)), (!n || !u.get(n)) && !u.get(e)) { + if (n && (i = [ + ...J(`.${X}.${m}`, n) + ].find((a) => Pe(a)), c = i && Pe(i)), (!n || !u.get(n)) && !u.get(e)) { c && i !== e && (Qs(c), c.triggers.forEach((a) => { f(a, `${X}d`); })), Fi(this); @@ -811,7 +843,13 @@ const Ot = ["dropdown", "dropup", "dropstart", "dropend"], to = "Dropdown", eo = // [number] 5(px) display: "dynamic" // [dynamic|static] -}, ss = $(`show.bs.${et}`), nn = $(`shown.bs.${et}`), ns = $(`hide.bs.${et}`), on = $(`hidden.bs.${et}`), oo = $(`updated.bs.${et}`), io = (t) => { +}, ss = $( + `show.bs.${et}` +), nn = $( + `shown.bs.${et}` +), ns = $( + `hide.bs.${et}` +), on = $(`hidden.bs.${et}`), oo = $(`updated.bs.${et}`), io = (t) => { const { element: s, menu: e, parentElement: n, options: o } = t, { offset: i } = o; // istanbul ignore else @preserve: this test requires a navbar if (V(e, "position") !== "static") { @@ -820,7 +858,9 @@ const Ot = ["dropdown", "dropup", "dropstart", "dropend"], to = "Dropdown", eo = const ut = {}; ut[k] = "", I(e, ut); }); - let r = Ot.find((k) => g(n, k)) || // istanbul ignore next @preserve: fallback position + let r = Ot.find( + (k) => g(n, k) + ) || // istanbul ignore next @preserve: fallback position et; const h = { dropdown: [i, 0, 0], @@ -858,10 +898,7 @@ const Ot = ["dropdown", "dropup", "dropstart", "dropend"], to = "Dropdown", eo = margin: `${pt.map((k) => k && `${k}px`).join(" ")}` }), tn.includes(r) && a) { // istanbul ignore else @preserve - a && I(e, p[!c && H || c && Rt ? "menuStart" : ( - // istanbul ignore next @preserve - "menuEnd" - )]); + a && I(e, p[!c && H || c && Rt ? "menuStart" : "menuEnd"]); } w(n, oo); } @@ -877,7 +914,9 @@ const Ot = ["dropdown", "dropup", "dropstart", "dropend"], to = "Dropdown", eo = n(Ut(s), i, qi, nt); }); }, ze = (t) => { - const s = [...Ot, "btn-group", "input-group"].map((e) => rt(`${e} ${m}`, E(t))).find((e) => e.length); + const s = [...Ot, "btn-group", "input-group"].map( + (e) => rt(`${e} ${m}`, E(t)) + ).find((e) => e.length); if (s && s.length) return [...s[0].children].find( (e) => Ot.some((n) => n === st(e, ct)) @@ -942,7 +981,10 @@ class ce extends ot { d(this, "_toggleEventListeners", (e) => { (e ? _ : B)(this.element, N, Ki); }); - const { parentElement: o } = this.element, [i] = rt(eo, o); + const { parentElement: o } = this.element, [i] = rt( + eo, + o + ); i && (this.parentElement = o, this.menu = i, this._toggleEventListeners(!0)); } /** @@ -969,9 +1011,11 @@ class ce extends ot { // istanbul ignore else @preserve if (!n) { const c = ze(e), a = c && Kt(c); - a && a.hide(), [ss, nn, oo].forEach((l) => { - l.relatedTarget = e; - }), w(i, ss), ss.defaultPrevented || (f(o, m), f(i, m), O(e, Ie, "true"), io(this), this.open = !n, ht(e), cn(this), w(i, nn)); + a && a.hide(), [ss, nn, oo].forEach( + (l) => { + l.relatedTarget = e; + } + ), w(i, ss), ss.defaultPrevented || (f(o, m), f(i, m), O(e, Ie, "true"), io(this), this.open = !n, ht(e), cn(this), w(i, nn)); } } /** Hides the dropdown menu from the user. */ @@ -1044,7 +1088,10 @@ const U = "modal", Ps = "Modal", Ds = "Offcanvas", Zi = "fixed-top", Ji = "fixed }, As = (t, s) => { const e = D(s) && s.nodeName !== "BODY" ? s : yt; return D(t) && e.contains(t); -}, po = "backdrop", rn = `${U}-${po}`, ln = `${G}-${po}`, uo = `.${U}.${m}`, Is = `.${G}.${m}`, L = $t("div"), _t = (t) => S(`${uo},${Is}`, E(t)), Ls = (t) => { +}, po = "backdrop", rn = `${U}-${po}`, ln = `${G}-${po}`, uo = `.${U}.${m}`, Is = `.${G}.${m}`, L = $t("div"), _t = (t) => S( + `${uo},${Is}`, + E(t) +), Ls = (t) => { const s = t ? rn : ln; [rn, ln].forEach((e) => { b(L, e); @@ -1060,14 +1107,19 @@ const U = "modal", Ps = "Modal", Ds = "Offcanvas", Zi = "fixed-top", Ji = "fixed }, wo = (t) => T(t) && V(t, "visibility") !== "hidden" && t.offsetParent !== null, Qi = `.${U}`, Eo = `[${ct}="${U}"]`, tc = `[${We}="${U}"]`, $o = `${U}-static`, ec = { backdrop: !0, keyboard: !0 -}, pe = (t) => W(t, Ps), sc = (t) => new ae(t), De = $(`show.bs.${U}`), dn = $(`shown.bs.${U}`), os = $(`hide.bs.${U}`), hn = $(`hidden.bs.${U}`), To = (t) => { +}, pe = (t) => W(t, Ps), sc = (t) => new ae(t), De = $( + `show.bs.${U}` +), dn = $( + `shown.bs.${U}` +), os = $( + `hide.bs.${U}` +), hn = $( + `hidden.bs.${U}` +), To = (t) => { const { element: s } = t, e = lo(s), { clientHeight: n, scrollHeight: o } = ft(s), { clientHeight: i, scrollHeight: c } = s, a = i !== c; // istanbul ignore next @preserve: impossible to test? if (!a && e) { - const r = { [Ct(s) ? ( - // istanbul ignore next @preserve - "paddingLeft" - ) : "paddingRight"]: `${e}px` }; + const r = { [Ct(s) ? "paddingLeft" : "paddingRight"]: `${e}px` }; I(s, r); } ho(s, a || n !== o); @@ -1148,11 +1200,15 @@ class ae extends ot { d(this, "_toggleEventListeners", (e) => { const n = e ? _ : B, { triggers: o } = this; // istanbul ignore else @preserve - o.length && o.forEach((i) => n(i, N, nc)); + o.length && o.forEach( + (i) => n(i, N, nc) + ); }); const { element: o } = this, i = S(`.${U}-dialog`, o); // istanbul ignore else @preserve - i && (this.modalDialog = i, this.triggers = [...J(Eo, E(o))].filter( + i && (this.modalDialog = i, this.triggers = [ + ...J(Eo, E(o)) + ].filter( (c) => K(c) === o ), this.isStatic = this.options.backdrop === "static", this.hasFade = g(o, R), this.relatedTarget = null, this._toggleEventListeners(!0)); } @@ -1184,7 +1240,10 @@ class ae extends ot { // istanbul ignore else @preserve if (l && l !== e) { const r = pe(l) || // istanbul ignore next @preserve - W(l, Ds); + W( + l, + Ds + ); // istanbul ignore else @preserve r && r.hide(); } @@ -1243,7 +1302,13 @@ const ac = `.${G}`, ks = `[${ct}="${G}"]`, rc = `[${We}="${G}"]`, Xe = `${G}-tog s && s.tagName === "A" && t.preventDefault(); } }, pc = (t) => { - const { target: s } = t, e = S(Is, E(s)), n = S(rc, e), o = e && ue(e); + const { target: s } = t, e = S( + Is, + E(s) + ), n = S( + rc, + e + ), o = e && ue(e); // istanbul ignore else @preserve if (o) { const { options: i, triggers: c } = o, { backdrop: a } = i, l = M(s, ks), r = E(e).getSelection(); @@ -1257,7 +1322,10 @@ const ac = `.${G}`, ks = `[${ct}="${G}"]`, rc = `[${We}="${G}"]`, Xe = `${G}-tog } } }, uc = ({ code: t, target: s }) => { - const e = S(Is, E(s)), n = e && ue(e); + const e = S( + Is, + E(s) + ), n = e && ue(e); // istanbul ignore else @preserve if (n) { // istanbul ignore else @preserve @@ -1288,10 +1356,14 @@ class re extends ot { */ d(this, "_toggleEventListeners", (e) => { const n = e ? _ : B; - this.triggers.forEach((o) => n(o, N, gc)); + this.triggers.forEach( + (o) => n(o, N, gc) + ); }); const { element: o } = this; - this.triggers = [...J(ks, E(o))].filter( + this.triggers = [ + ...J(ks, E(o)) + ].filter( (i) => K(i) === o ), this.relatedTarget = null, this._toggleEventListeners(!0); } @@ -1321,7 +1393,10 @@ class re extends ot { const c = _t(e); if (c && c !== e) { const a = ue(c) || // istanbul ignore next @preserve - W(c, Ps); + W( + c, + Ps + ); // istanbul ignore else @preserve a && a.hide(); } @@ -1372,10 +1447,10 @@ const Lt = "popover", Ke = "Popover", lt = "tooltip", So = (t) => { }); const r = t.name === Ke, { offsetWidth: h, offsetHeight: p } = n, { clientWidth: v, clientHeight: P, offsetWidth: q } = ft(e); let { placement: y } = i; - const { clientWidth: j, offsetWidth: Y } = o, at = V(o, "position") === "fixed", x = Math.abs(at ? j - Y : v - q), tt = l && at ? ( - // istanbul ignore next @preserve - x - ) : 0, it = v - (l ? 0 : x) - 1, { + const { clientWidth: j, offsetWidth: Y } = o, at = V( + o, + "position" + ) === "fixed", x = Math.abs(at ? j - Y : v - q), tt = l && at ? x : 0, it = v - (l ? 0 : x) - 1, { width: F, height: z, left: H, @@ -1395,10 +1470,10 @@ const Lt = "popover", Ke = "Popover", lt = "tooltip", So = (t) => { const St = c.offsetWidth || 0, vt = c.offsetHeight || 0, qe = St / 2; let Zt = pt - p - vt < 0, Jt = pt + p + z + vt >= P, Gt = H - h - St < tt, Qt = H + h + F + St >= it; const xe = ["left", "right"], Ze = ["top", "bottom"]; - Zt = xe.includes(y) ? pt + z / 2 - p / 2 - vt < 0 : Zt, Jt = xe.includes(y) ? pt + p / 2 + z / 2 + vt >= P : Jt, Gt = Ze.includes(y) ? H + F / 2 - h / 2 < tt : Gt, Qt = Ze.includes(y) ? H + h / 2 + F / 2 >= it : Qt, y = xe.includes(y) && Gt && Qt ? "top" : y, y = y === "top" && Zt ? "bottom" : y, y = y === "bottom" && Jt ? "top" : y, y = y === "left" && Gt ? "right" : y, y = y === "right" && Qt ? "left" : ( - // istanbul ignore next @preserve - y - ), n.className.includes(y) || (n.className = n.className.replace(s, a[y])); + Zt = xe.includes(y) ? pt + z / 2 - p / 2 - vt < 0 : Zt, Jt = xe.includes(y) ? pt + p / 2 + z / 2 + vt >= P : Jt, Gt = Ze.includes(y) ? H + F / 2 - h / 2 < tt : Gt, Qt = Ze.includes(y) ? H + h / 2 + F / 2 >= it : Qt, y = xe.includes(y) && Gt && Qt ? "top" : y, y = y === "top" && Zt ? "bottom" : y, y = y === "bottom" && Jt ? "top" : y, y = y === "left" && Gt ? "right" : y, y = y === "right" && Qt ? "left" : y, n.className.includes(y) || (n.className = n.className.replace( + s, + a[y] + )); // istanbul ignore else @preserve xe.includes(y) ? (y === "left" ? mt = k - h - (r ? St : 0) : mt = k + F + (r ? St : 0), Zt && Jt ? (Ht = 0, qt = 0, Ft = pt + z / 2 - vt / 2) : Zt ? (Ht = ut, qt = "", Ft = z / 2 - St) : Jt ? (Ht = ut - p + z, qt = "", Ft = p - z / 2 - St) : (Ht = ut - p / 2 + z / 2, Ft = p / 2 - vt / 2)) : Ze.includes(y) && (y === "top" ? Ht = ut - p - (r ? vt : 0) : Ht = ut + z + (r ? vt : 0), Gt ? (mt = 0, Ce = k + F / 2 - qe) : Qt ? (mt = "auto", Ye = 0, Ue = F / 2 + it - Rt - qe) : (mt = k - h / 2 + F / 2, Ce = h / 2 - qe)), I(n, { top: `${Ht}px`, @@ -1435,7 +1510,17 @@ const Lt = "popover", Ke = "Popover", lt = "tooltip", So = (t) => { t.append(...i.body.childNodes); } else T(s) ? t.append(s) : (fi(s) || di(s) && s.every(D)) && t.append(...s); }, bc = (t) => { - const s = t.name === Pt, { id: e, element: n, options: o } = t, { title: i, placement: c, template: a, animation: l, customClass: r, sanitizeFn: h, dismissible: p, content: v, btnClose: P } = o, q = s ? lt : Lt, y = { ...Po }; + const s = t.name === Pt, { id: e, element: n, options: o } = t, { + title: i, + placement: c, + template: a, + animation: l, + customClass: r, + sanitizeFn: h, + dismissible: p, + content: v, + btnClose: P + } = o, q = s ? lt : Lt, y = { ...Po }; let j = [], Y = []; Ct(n) && (y.left = "end", y.right = "start"); const Bt = `bs-${q}-${y[c]}`; @@ -1446,10 +1531,7 @@ const Lt = "popover", Ke = "Popover", lt = "tooltip", So = (t) => { const tt = $t("div"); wt(tt, a, h), at = tt.firstChild; } - t.tooltip = T(at) ? at.cloneNode(!0) : ( - // istanbul ignore next @preserve - void 0 - ); + t.tooltip = T(at) ? at.cloneNode(!0) : void 0; const { tooltip: x } = t; // istanbul ignore else @preserve if (x) { @@ -1511,13 +1593,18 @@ const Lt = "popover", Ke = "Popover", lt = "tooltip", So = (t) => { // istanbul ignore else @preserve zn(n) || gi(n) || e.push(n); } - return e.find((o, i) => V(o, "position") !== "relative" && e.slice(i + 1).every((c) => V(c, "position") === "static") ? o : null) || // istanbul ignore next: optional guard + return e.find((o, i) => V(o, "position") !== "relative" && e.slice(i + 1).every( + (c) => V(c, "position") === "static" + ) ? o : null) || // istanbul ignore next: optional guard E(t).body; }, Ec = `[${ct}="${lt}"],[data-tip="${lt}"]`, Ao = "title"; let vn = (t) => W(t, Pt); const $c = (t) => new Dt(t), Tc = (t) => { const { element: s, tooltip: e, container: n, offsetParent: o } = t; - kt(s, Mn), go(e, n === o ? n : o); + kt(s, Mn), go( + e, + n === o ? n : o + ); }, te = (t) => { const { tooltip: s, container: e, offsetParent: n } = t; return s && As(s, e === n ? e : n); @@ -1530,7 +1617,12 @@ const $c = (t) => new Dt(t), Tc = (t) => { s && s(); }, Io = (t, s) => { const e = s ? _ : B, { element: n } = t; - e(E(n), Cs, t.handleTouch, nt), [Be, _e].forEach((o) => { + e( + E(n), + Cs, + t.handleTouch, + nt + ), [Be, _e].forEach((o) => { e(Ut(n), o, t.update, nt); }); }, bn = (t) => { @@ -1606,7 +1698,12 @@ class Dt extends ot { if (p === Ko) { n(o, Bn, this.handleShow), n(o, Me, this.handleShow); // istanbul ignore else @preserve - r || (n(o, ys, this.handleHide), n(E(o), Cs, this.handleTouch, nt)); + r || (n(o, ys, this.handleHide), n( + E(o), + Cs, + this.handleTouch, + nt + )); } else if (p === N) n(o, p, r ? this.handleShow : this.toggle); else if (p === $s) { @@ -1706,7 +1803,10 @@ class Dt extends ot { } /** Removes the `Tooltip` from the target element. */ dispose() { - const { tooltip: e, options: n } = this, o = { ...this, name: this.name }, i = () => setTimeout(() => yc(o, () => super.dispose()), 17); + const { tooltip: e, options: n } = this, o = { ...this, name: this.name }, i = () => setTimeout( + () => yc(o, () => super.dispose()), + 17 + ); n.animation && te(o) ? (this.options.delay = 0, this.hide(), A(e, i)) : i(); } } @@ -1750,16 +1850,15 @@ const Pc = "scrollspy", ko = "ScrollSpy", Dc = '[data-bs-spy="scroll"]', Ac = { offset: 10, target: null }, Ic = (t) => W(t, ko), Lc = (t) => new le(t), $n = $(`activate.bs.${Pc}`), kc = (t) => { - const { target: s, scrollTarget: e, options: n, itemsLength: o, scrollHeight: i, element: c } = t, { offset: a } = n, l = Hs(e), r = s && Ss("A", s), h = e ? No(e) : ( - // istanbul ignore next @preserve - i - ); + const { target: s, scrollTarget: e, options: n, itemsLength: o, scrollHeight: i, element: c } = t, { offset: a } = n, l = Hs(e), r = s && Ss("A", s), h = e ? No(e) : i; t.scrollTop = l ? e.scrollY : e.scrollTop; // istanbul ignore else @preserve if (r && (h !== i || o !== r.length)) { let p, v, P; t.items = [], t.offsets = [], t.scrollHeight = h, t.maxScroll = t.scrollHeight - Nc(t), [...r].forEach((q) => { - p = st(q, "href"), v = p && p.charAt(0) === "#" && p.slice(-1) !== "#" && S(p, E(c)), v && (t.items.push(q), P = $e(v), t.offsets.push((l ? P.top + t.scrollTop : v.offsetTop) - a)); + p = st(q, "href"), v = p && p.charAt(0) === "#" && p.slice(-1) !== "#" && S(p, E(c)), v && (t.items.push(q), P = $e(v), t.offsets.push( + (l ? P.top + t.scrollTop : v.offsetTop) - a + )); }), t.itemsLength = t.items.length; } }, No = (t) => T(t) ? t.scrollHeight : ft(t).scrollHeight, Nc = ({ element: t, scrollTarget: s }) => Hs(s) ? s.innerHeight : $e(t).height, Oo = (t) => { @@ -1822,10 +1921,18 @@ class le extends ot { * @param add when `true`, listener is added */ d(this, "_toggleEventListeners", (e) => { - (e ? _ : B)(this.scrollTarget, Be, this.refresh, nt); + (e ? _ : B)( + this.scrollTarget, + Be, + this.refresh, + nt + ); }); const { element: o, options: i } = this; - this.target = S(i.target, E(o)), this.target && (this.scrollTarget = o.clientHeight < o.scrollHeight ? o : Ut(o), this.scrollHeight = No(this.scrollTarget), this._toggleEventListeners(!0), this.refresh()); + this.target = S( + i.target, + E(o) + ), this.target && (this.scrollTarget = o.clientHeight < o.scrollHeight ? o : Ut(o), this.scrollHeight = No(this.scrollTarget), this._toggleEventListeners(!0), this.refresh()); } /* eslint-disable */ /** @@ -1846,19 +1953,27 @@ class le extends ot { } } d(le, "selector", Dc), d(le, "init", Lc), d(le, "getInstance", Ic); -const ye = "tab", Mo = "Tab", yn = `[${ct}="${ye}"]`, _o = (t) => W(t, Mo), Oc = (t) => new de(t), cs = $(`show.bs.${ye}`), Cn = $(`shown.bs.${ye}`), as = $(`hide.bs.${ye}`), xn = $(`hidden.bs.${ye}`), me = /* @__PURE__ */ new Map(), Hn = (t) => { +const ye = "tab", Mo = "Tab", yn = `[${ct}="${ye}"]`, _o = (t) => W(t, Mo), Oc = (t) => new de(t), cs = $( + `show.bs.${ye}` +), Cn = $( + `shown.bs.${ye}` +), as = $( + `hide.bs.${ye}` +), xn = $( + `hidden.bs.${ye}` +), me = /* @__PURE__ */ new Map(), Hn = (t) => { const { tabContent: s, nav: e } = t; // istanbul ignore else @preserve s && g(s, Nt) && (s.style.height = "", b(s, Nt)); // istanbul ignore else @preserve e && u.clear(e); }, Sn = (t) => { - const { element: s, tabContent: e, content: n, nav: o } = t, { tab: i } = T(o) && me.get(o) || { tab: null }; - // istanbul ignore next @preserve + const { element: s, tabContent: e, content: n, nav: o } = t, { tab: i } = T(o) && me.get(o) || // istanbul ignore next @preserve + { tab: null }; // istanbul ignore else @preserve if (e && n && g(n, R)) { - const { currentHeight: c, nextHeight: a } = me.get(s) || { currentHeight: 0, nextHeight: 0 }; - // istanbul ignore next @preserve + const { currentHeight: c, nextHeight: a } = me.get(s) || // istanbul ignore next @preserve + { currentHeight: 0, nextHeight: 0 }; // istanbul ignore else @preserve: vitest won't validate this branch c !== a ? setTimeout(() => { e.style.height = `${a}px`, Mt(e), A(e, () => Hn(t)); @@ -1866,20 +1981,14 @@ const ye = "tab", Mo = "Tab", yn = `[${ct}="${ye}"]`, _o = (t) => W(t, Mo), Oc = } else o && u.clear(o); Cn.relatedTarget = i, w(s, Cn); }, Pn = (t) => { - const { element: s, content: e, tabContent: n, nav: o } = t, { tab: i, content: c } = o && me.get(o) || { - // istanbul ignore next @preserve - tab: null, - content: null - }; + const { element: s, content: e, tabContent: n, nav: o } = t, { tab: i, content: c } = o && me.get(o) || // istanbul ignore next @preserve + { tab: null, content: null }; let a = 0; // istanbul ignore else @preserve n && e && g(e, R) && ([c, e].forEach((l) => { // istanbul ignore else @preserve T(l) && f(l, "overflow-hidden"); - }), a = T(c) ? c.scrollHeight : ( - // istanbul ignore next @preserve - 0 - )), cs.relatedTarget = i, xn.relatedTarget = s, w(s, cs); + }), a = T(c) ? c.scrollHeight : 0), cs.relatedTarget = i, xn.relatedTarget = s, w(s, cs); // istanbul ignore else @preserve if (!cs.defaultPrevented) { // istanbul ignore else @preserve @@ -1920,7 +2029,9 @@ const ye = "tab", Mo = "Tab", yn = `[${ct}="${ye}"]`, _o = (t) => W(t, Mo), Oc = const e = rt(C, s); let n = null; // istanbul ignore else @preserve - e.length === 1 && !Ot.some((i) => g(e[0].parentElement, i)) ? [n] = e : e.length > 1 && (n = e[e.length - 1]); + e.length === 1 && !Ot.some( + (i) => g(e[0].parentElement, i) + ) ? [n] = e : e.length > 1 && (n = e[e.length - 1]); const o = T(n) ? K(n) : null; return { tab: n, content: o }; }, An = (t) => { @@ -2007,7 +2118,15 @@ const Q = "toast", Bo = "Toast", _c = `.${Q}`, Bc = `[${We}="${Q}"]`, Ro = `[${c animation: !0, autohide: !0, delay: 5e3 -}, Ns = (t) => W(t, Bo), Fc = (t) => new he(t), In = $(`show.bs.${Q}`), Wc = $(`shown.bs.${Q}`), Ln = $(`hide.bs.${Q}`), jc = $(`hidden.bs.${Q}`), kn = (t) => { +}, Ns = (t) => W(t, Bo), Fc = (t) => new he(t), In = $( + `show.bs.${Q}` +), Wc = $( + `shown.bs.${Q}` +), Ln = $( + `hide.bs.${Q}` +), jc = $( + `hidden.bs.${Q}` +), kn = (t) => { const { element: s, options: e } = t; b(s, Yt), u.clear(s, Yt), w(s, Wc); // istanbul ignore else @preserve @@ -2075,10 +2194,14 @@ class he extends ot { (r) => n(o, r, Kc) ); // istanbul ignore else @preserve - i.length && i.forEach((r) => n(r, N, Xc)); + i.length && i.forEach( + (r) => n(r, N, Xc) + ); }); const { element: o, options: i } = this; - i.animation && !g(o, R) ? f(o, R) : !i.animation && g(o, R) && b(o, R), this.dismiss = S(Bc, o), this.triggers = [...J(Ro, E(o))].filter( + i.animation && !g(o, R) ? f(o, R) : !i.animation && g(o, R) && b(o, R), this.dismiss = S(Bc, o), this.triggers = [ + ...J(Ro, E(o)) + ].filter( (c) => K(c) === o ), this._toggleEventListeners(!0); } @@ -2108,9 +2231,20 @@ class he extends ot { } d(he, "selector", _c), d(he, "init", Fc), d(he, "getInstance", Ns); const Os = /* @__PURE__ */ new Map(); -[se, ne, oe, ie, ce, ae, re, zt, le, de, he, Dt].forEach( - (t) => Os.set(t.prototype.name, t) -); +[ + se, + ne, + oe, + ie, + ce, + ae, + re, + zt, + le, + de, + he, + Dt +].forEach((t) => Os.set(t.prototype.name, t)); const Yc = (t, s) => { [...s].forEach((e) => t(e)); }, Uc = (t, s) => { diff --git a/dist/bootstrap-native.mjs.map b/dist/bootstrap-native.mjs.map index 5e0de234..a6cbe5ba 100644 --- a/dist/bootstrap-native.mjs.map +++ b/dist/bootstrap-native.mjs.map @@ -1 +1 @@ -{"version":3,"file":"bootstrap-native.mjs","sources":["../node_modules/.pnpm/@thednp+shorty@2.0.5/node_modules/@thednp/shorty/dist/shorty.mjs","../node_modules/.pnpm/@thednp+event-listener@2.0.6/node_modules/@thednp/event-listener/dist/event-listener.mjs","../src/strings/fadeClass.ts","../src/strings/showClass.ts","../src/strings/dataBsDismiss.ts","../src/strings/alertString.ts","../src/strings/alertComponent.ts","../src/version.ts","../src/components/base-component.ts","../src/components/alert.ts","../src/strings/activeClass.ts","../src/strings/dataBsToggle.ts","../src/strings/buttonString.ts","../src/strings/buttonComponent.ts","../src/components/button.ts","../src/strings/dataBsTarget.ts","../src/strings/carouselString.ts","../src/strings/carouselComponent.ts","../src/strings/dataBsParent.ts","../src/strings/dataBsContainer.ts","../src/util/getTargetElement.ts","../src/components/carousel.ts","../src/strings/collapsingClass.ts","../src/strings/collapseString.ts","../src/strings/collapseComponent.ts","../src/components/collapse.ts","../src/strings/dropdownClasses.ts","../src/strings/dropdownComponent.ts","../src/strings/dropdownMenuClass.ts","../src/util/isEmptyAnchor.ts","../src/components/dropdown.ts","../src/strings/modalString.ts","../src/strings/modalComponent.ts","../src/strings/offcanvasComponent.ts","../src/strings/fixedTopClass.ts","../src/strings/fixedBottomClass.ts","../src/strings/stickyTopClass.ts","../src/strings/positionStickyClass.ts","../src/util/scrollbar.ts","../src/strings/offcanvasString.ts","../src/util/popupContainer.ts","../src/util/backdrop.ts","../src/util/isVisible.ts","../src/components/modal.ts","../src/components/offcanvas.ts","../src/strings/popoverString.ts","../src/strings/popoverComponent.ts","../src/strings/tooltipString.ts","../src/util/getTipTemplate.ts","../src/util/tipClassPositions.ts","../src/util/styleTip.ts","../src/util/tooltipDefaults.ts","../src/strings/dataOriginalTitle.ts","../src/strings/tooltipComponent.ts","../src/util/setHtml.ts","../src/util/createTip.ts","../src/util/getElementContainer.ts","../src/components/tooltip.ts","../src/components/popover.ts","../src/strings/scrollspyString.ts","../src/strings/scrollspyComponent.ts","../src/components/scrollspy.ts","../src/strings/tabString.ts","../src/strings/tabComponent.ts","../src/components/tab.ts","../src/strings/toastString.ts","../src/strings/toastComponent.ts","../src/components/toast.ts","../src/util/init.ts"],"sourcesContent":["const he = \"aria-checked\", ye = \"aria-description\", we = \"aria-describedby\", Ae = \"aria-expanded\", Se = \"aria-haspopup\", X = \"aria-hidden\", Ne = \"aria-label\", Me = \"aria-labelledby\", Te = \"aria-modal\", ke = \"aria-pressed\", De = \"aria-selected\", Ce = \"aria-valuemin\", Oe = \"aria-valuemax\", Le = \"aria-valuenow\", Ie = \"aria-valuetext\", Y = \"abort\", Z = \"beforeunload\", $ = \"blur\", _ = \"change\", tt = \"contextmenu\", P = \"DOMContentLoaded\", et = \"DOMMouseScroll\", nt = \"error\", ot = \"focus\", st = \"focusin\", ct = \"focusout\", rt = \"gesturechange\", at = \"gestureend\", it = \"gesturestart\", ut = \"keydown\", lt = \"keypress\", dt = \"keyup\", pt = \"load\", ft = \"click\", mt = \"dblclick\", gt = \"mousedown\", vt = \"mouseup\", Et = \"hover\", bt = \"mouseenter\", ht = \"mouseleave\", yt = \"mousein\", wt = \"mouseout\", At = \"mouseover\", St = \"mousemove\", Nt = \"mousewheel\", Mt = \"move\", Tt = \"orientationchange\", kt = \"pointercancel\", Dt = \"pointerdown\", Ct = \"pointerleave\", Ot = \"pointermove\", Lt = \"pointerup\", It = \"readystatechange\", xt = \"reset\", zt = \"resize\", Vt = \"select\", Bt = \"selectend\", Ft = \"selectstart\", Ht = \"scroll\", Pt = \"submit\", Ut = \"touchstart\", Wt = \"touchmove\", Rt = \"touchcancel\", Qt = \"touchend\", jt = \"unload\", xe = {\n DOMContentLoaded: P,\n DOMMouseScroll: et,\n abort: Y,\n beforeunload: Z,\n blur: $,\n change: _,\n click: ft,\n contextmenu: tt,\n dblclick: mt,\n error: nt,\n focus: ot,\n focusin: st,\n focusout: ct,\n gesturechange: rt,\n gestureend: at,\n gesturestart: it,\n hover: Et,\n keydown: ut,\n keypress: lt,\n keyup: dt,\n load: pt,\n mousedown: gt,\n mousemove: St,\n mousein: yt,\n mouseout: wt,\n mouseenter: bt,\n mouseleave: ht,\n mouseover: At,\n mouseup: vt,\n mousewheel: Nt,\n move: Mt,\n orientationchange: Tt,\n pointercancel: kt,\n pointerdown: Dt,\n pointerleave: Ct,\n pointermove: Ot,\n pointerup: Lt,\n readystatechange: It,\n reset: xt,\n resize: zt,\n scroll: Ht,\n select: Vt,\n selectend: Bt,\n selectstart: Ft,\n submit: Pt,\n touchcancel: Rt,\n touchend: Qt,\n touchmove: Wt,\n touchstart: Ut,\n unload: jt\n}, ze = \"drag\", Ve = \"dragstart\", Be = \"dragenter\", Fe = \"dragleave\", He = \"dragover\", Pe = \"dragend\", Ue = \"loadstart\", We = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, Re = { down: \"mousedown\", up: \"mouseup\" }, Qe = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : (\n /* istanbul ignore next */\n [\"mouseover\", \"mouseout\"]\n), je = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, qe = { in: \"focusin\", out: \"focusout\" }, qt = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]', Ge = {\n Backspace: \"Backspace\",\n // 8\n Tab: \"Tab\",\n // 9\n Enter: \"Enter\",\n // 13\n Shift: \"Shift\",\n // 16\n Control: \"Control\",\n // 17\n Alt: \"Alt\",\n // 18\n Pause: \"Pause\",\n // 19\n CapsLock: \"CapsLock\",\n // 20\n Escape: \"Escape\",\n // 27\n Scape: \"Space\",\n // 32\n ArrowLeft: \"ArrowLeft\",\n // 37\n ArrowUp: \"ArrowUp\",\n // 38\n ArrowRight: \"ArrowRight\",\n // 39\n ArrowDown: \"ArrowDown\",\n // 40\n Insert: \"Insert\",\n // 45\n Delete: \"Delete\",\n // 46\n Meta: \"Meta\",\n // 91 windows key\n ContextMenu: \"ContextMenu\",\n // 93\n ScrollLock: \"ScrollLock\"\n // 145\n}, Ke = \"Alt\", Je = \"ArrowDown\", Xe = \"ArrowUp\", Ye = \"ArrowLeft\", Ze = \"ArrowRight\", $e = \"Backspace\", _e = \"CapsLock\", tn = \"Control\", en = \"Delete\", nn = \"Enter\", on = \"NumpadEnter\", sn = \"Escape\", cn = \"Insert\", rn = \"Meta\", an = \"Pause\", un = \"ScrollLock\", ln = \"Shift\", dn = \"Space\", pn = \"Tab\", Gt = \"animationDuration\", Kt = \"animationDelay\", U = \"animationName\", D = \"animationend\", Jt = \"transitionDuration\", Xt = \"transitionDelay\", C = \"transitionend\", W = \"transitionProperty\", fn = \"addEventListener\", mn = \"removeEventListener\", gn = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\"\n}, vn = \"offsetHeight\", En = \"offsetWidth\", bn = \"scrollHeight\", hn = \"scrollWidth\", yn = \"tabindex\", Yt = navigator.userAgentData, A = Yt, { userAgent: Zt } = navigator, S = Zt, z = /iPhone|iPad|iPod|Android/i;\nlet O = !1;\n// istanbul ignore else @preserve\nA ? O = A.brands.some((t) => z.test(t.brand)) : O = z.test(S);\nconst wn = O, V = /(iPhone|iPod|iPad)/, An = A ? A.brands.some((t) => V.test(t.brand)) : (\n /* istanbul ignore next @preserve */\n V.test(S)\n), Sn = S ? S.includes(\"Firefox\") : (\n /* istanbul ignore next @preserve */\n !1\n), { head: N } = document, Nn = [\"webkitPerspective\", \"perspective\"].some((t) => t in N.style), R = (t, e, n, o) => {\n const s = o || !1;\n t.addEventListener(e, n, s);\n}, Q = (t, e, n, o) => {\n const s = o || !1;\n t.removeEventListener(e, n, s);\n}, $t = (t, e, n, o) => {\n const s = (c) => {\n /* istanbul ignore else @preserve */\n (c.target === t || c.currentTarget === t) && (n.apply(t, [c]), Q(t, e, s, o));\n };\n R(t, e, s, o);\n}, _t = () => {\n}, Mn = (() => {\n let t = !1;\n try {\n const e = Object.defineProperty({}, \"passive\", {\n get: () => (t = !0, t)\n });\n // istanbul ignore next @preserve\n $t(document, P, _t, e);\n } catch {\n }\n return t;\n})(), Tn = [\"webkitTransform\", \"transform\"].some((t) => t in N.style), kn = \"ontouchstart\" in window || /* istanbul ignore next */\n\"msMaxTouchPoints\" in navigator, Dn = [\"webkitAnimation\", \"animation\"].some((t) => t in N.style), Cn = [\"webkitTransition\", \"transition\"].some((t) => t in N.style), j = (t, e) => t.getAttribute(e), On = (t, e, n) => e.getAttributeNS(t, n), te = (t, e) => t.hasAttribute(e), Ln = (t, e, n) => e.hasAttributeNS(t, n), In = (t, e, n) => t.setAttribute(e, n), xn = (t, e, n, o) => e.setAttributeNS(t, n, o), zn = (t, e) => t.removeAttribute(e), Vn = (t, e, n) => e.removeAttributeNS(t, n), Bn = (t, ...e) => {\n t.classList.add(...e);\n}, Fn = (t, ...e) => {\n t.classList.remove(...e);\n}, Hn = (t, e) => t.classList.contains(e), { body: Pn } = document, { documentElement: Un } = document, Wn = (t) => Array.from(t), v = (t) => t != null && typeof t == \"object\" || !1, i = (t) => v(t) && typeof t.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some((e) => t.nodeType === e) || !1, l = (t) => i(t) && t.nodeType === 1 || !1, E = /* @__PURE__ */ new Map(), L = {\n data: E,\n /**\n * Sets web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @param instance the component instance\n */\n set: (t, e, n) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n E.has(e) || E.set(e, /* @__PURE__ */ new Map()), E.get(e).set(t, n);\n },\n /**\n * Returns all instances for specified component.\n *\n * @param component the component's name or a unique key\n * @returns all the component instances\n */\n getAllFor: (t) => E.get(t) || null,\n /**\n * Returns the instance associated with the target.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @returns the instance\n */\n get: (t, e) => {\n if (!l(t) || !e) return null;\n const n = L.getAllFor(e);\n return t && n && n.get(t) || null;\n },\n /**\n * Removes web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n */\n remove: (t, e) => {\n const n = L.getAllFor(e);\n if (!n || !l(t)) return;\n n.delete(t);\n // istanbul ignore else @preserve\n n.size === 0 && E.delete(e);\n }\n}, Rn = (t, e) => L.get(t, e), M = (t) => typeof t == \"string\" || !1, q = (t) => v(t) && t.constructor.name === \"Window\" || !1, G = (t) => i(t) && t.nodeType === 9 || !1, d = (t) => q(t) ? t.document : G(t) ? t : i(t) ? t.ownerDocument : window.document, T = (t, ...e) => Object.assign(t, ...e), ee = (t) => {\n if (!t) return;\n if (M(t))\n return d().createElement(t);\n const { tagName: e } = t, n = ee(e);\n if (!n) return;\n const o = { ...t };\n return delete o.tagName, T(n, o);\n}, ne = (t, e) => {\n if (!t || !e) return;\n if (M(e))\n return d().createElementNS(t, e);\n const { tagName: n } = e, o = ne(t, n);\n if (!o) return;\n const s = { ...e };\n return delete s.tagName, T(o, s);\n}, K = (t, e) => t.dispatchEvent(e), Qn = (t, e, n) => n.indexOf(t) === e, g = (t, e) => {\n const n = getComputedStyle(t), o = e.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return n.getPropertyValue(o);\n}, oe = (t) => {\n const e = g(t, U), n = g(t, Kt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, se = (t) => {\n const e = g(t, U), n = g(t, Gt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, jn = (t, e) => {\n let n = 0;\n const o = new Event(D), s = se(t), c = oe(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(D, a), n = 1);\n };\n t.addEventListener(D, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else {\n // istanbul ignore next @preserve\n e.apply(t, [o]);\n }\n}, ce = (t) => {\n const e = g(t, W), n = g(t, Xt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, re = (t) => {\n const e = g(t, W), n = g(t, Jt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, qn = (t, e) => {\n let n = 0;\n const o = new Event(C), s = re(t), c = ce(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(C, a), n = 1);\n };\n t.addEventListener(C, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else\n e.apply(t, [o]);\n}, Gn = (t) => Float32Array.from(Array.from(t)), Kn = (t) => Float64Array.from(Array.from(t)), Jn = (t, e) => t.focus(e), B = (t) => [\"true\", !0].includes(t) ? !0 : [\"false\", !1].includes(t) ? !1 : [\"null\", \"\", null, void 0].includes(t) ? null : t !== \"\" && !Number.isNaN(+t) ? +t : t, w = (t) => Object.entries(t), ae = (t) => t.toLowerCase(), Xn = (t, e, n, o) => {\n const s = { ...n }, c = { ...t.dataset }, a = { ...e }, u = {}, p = \"title\";\n return w(c).forEach(([r, f]) => {\n const y = o && typeof r == \"string\" && r.includes(o) ? r.replace(o, \"\").replace(/[A-Z]/g, (J) => ae(J)) : (\n /* istanbul ignore next @preserve */\n r\n );\n u[y] = B(f);\n }), w(s).forEach(([r, f]) => {\n s[r] = B(f);\n }), w(e).forEach(([r, f]) => {\n // istanbul ignore else @preserve\n r in s ? a[r] = s[r] : r in u ? a[r] = u[r] : a[r] = r === p ? j(t, p) : f;\n }), a;\n}, Yn = (t, e) => v(t) && (Object.hasOwn(t, e) || e in t), Zn = (t) => Object.keys(t), $n = (t) => Object.values(t), _n = (t) => Object.fromEntries(t), to = (t, e) => {\n const n = new CustomEvent(t, {\n cancelable: !0,\n bubbles: !0\n });\n // istanbul ignore else @preserve\n return v(e) && T(n, e), n;\n}, eo = { passive: !0 }, no = (t) => t.offsetHeight, oo = (t, e) => {\n w(e).forEach(([n, o]) => {\n if (o && M(n) && n.includes(\"--\"))\n t.style.setProperty(n, o);\n else {\n const s = {};\n s[n] = o, T(t.style, s);\n }\n });\n}, I = (t) => v(t) && t.constructor.name === \"Map\" || !1, ie = (t) => typeof t == \"number\" || !1, m = /* @__PURE__ */ new Map(), so = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n *\n * @param element target element\n * @param callback the callback\n * @param delay the execution delay\n * @param key a unique key\n */\n set: (t, e, n, o) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n if (o && o.length) {\n // istanbul ignore else @preserve\n m.has(t) || m.set(t, /* @__PURE__ */ new Map()), m.get(t).set(o, setTimeout(e, n));\n } else\n m.set(t, setTimeout(e, n));\n },\n /**\n * Returns the timer associated with the target.\n *\n * @param element target element\n * @param key a unique\n * @returns the timer\n */\n get: (t, e) => {\n if (!l(t)) return null;\n const n = m.get(t);\n return e && n && I(n) ? n.get(e) || /* istanbul ignore next */\n null : ie(n) ? n : null;\n },\n /**\n * Clears the element's timer.\n *\n * @param element target element\n * @param key a unique key\n */\n clear: (t, e) => {\n if (!l(t)) return;\n const n = m.get(t);\n if (e && e.length && I(n)) {\n clearTimeout(n.get(e)), n.delete(e);\n // istanbul ignore else @preserve\n n.size === 0 && m.delete(t);\n } else\n clearTimeout(n), m.delete(t);\n }\n}, co = (t) => t.toUpperCase(), ue = (t, e) => (i(e) ? e : d()).querySelectorAll(t), x = /* @__PURE__ */ new Map();\nfunction le(t) {\n const { shiftKey: e, code: n } = t, o = d(this), s = [...ue(qt, this)].filter(\n (u) => !te(u, \"disabled\") && !j(u, X)\n );\n if (!s.length) return;\n const c = s[0], a = s[s.length - 1];\n // istanbul ignore else @preserve\n n === \"Tab\" && (e && o.activeElement === c ? (a.focus(), t.preventDefault()) : !e && o.activeElement === a && (c.focus(), t.preventDefault()));\n}\nconst de = (t) => x.has(t) === !0, ro = (t) => {\n const e = de(t);\n (e ? Q : R)(t, \"keydown\", le), e ? x.delete(t) : x.set(t, !0);\n}, h = (t, e) => {\n const { width: n, height: o, top: s, right: c, bottom: a, left: u } = t.getBoundingClientRect();\n let p = 1, r = 1;\n if (e && l(t)) {\n const { offsetWidth: f, offsetHeight: y } = t;\n p = f > 0 ? Math.round(n) / f : (\n /* istanbul ignore next */\n 1\n ), r = y > 0 ? Math.round(o) / y : (\n /* istanbul ignore next */\n 1\n );\n }\n return {\n width: n / p,\n height: o / r,\n top: s / r,\n right: c / p,\n bottom: a / r,\n left: u / p,\n x: u / p,\n y: s / r\n };\n}, ao = (t) => d(t).body, k = (t) => d(t).documentElement, io = (t) => d(t).head, uo = (t) => {\n const e = q(t), n = e ? t.scrollX : t.scrollLeft, o = e ? t.scrollY : t.scrollTop;\n return { x: n, y: o };\n}, pe = (t) => i(t) && t.constructor.name === \"ShadowRoot\" || !1, lo = (t) => t.nodeName === \"HTML\" ? t : l(t) && t.assignedSlot || // step into the shadow DOM of the parent of a slotted node\ni(t) && t.parentNode || // DOM Element detected\npe(t) && t.host || // ShadowRoot detected\nk(t), fe = (t) => {\n if (!l(t)) return !1;\n const { width: e, height: n } = h(t), { offsetWidth: o, offsetHeight: s } = t;\n return Math.round(e) !== o || Math.round(n) !== s;\n}, po = (t, e, n) => {\n const o = l(e), s = h(t, o && fe(e)), c = { x: 0, y: 0 };\n // istanbul ignore else @preserve\n if (o) {\n const a = h(e, !0);\n c.x = a.x + e.clientLeft, c.y = a.y + e.clientTop;\n }\n return {\n x: s.left + n.x - c.x,\n y: s.top + n.y - c.y,\n width: s.width,\n height: s.height\n };\n};\nlet F = 0, H = 0;\nconst b = /* @__PURE__ */ new Map(), me = (t, e) => {\n let n = e ? F : H;\n if (e) {\n const o = me(t), s = b.get(o) || /* @__PURE__ */ new Map();\n b.has(o) || b.set(o, s), I(s) && !s.has(e) ? (s.set(e, n), F += 1) : n = s.get(e);\n } else {\n const o = t.id || t;\n b.has(o) ? n = b.get(o) : (b.set(o, n), H += 1);\n }\n return n;\n}, fo = (t) => {\n var e;\n return t ? G(t) ? t.defaultView : i(t) ? (e = t == null ? void 0 : t.ownerDocument) == null ? void 0 : e.defaultView : t : window;\n}, ge = (t) => Array.isArray(t) || !1, mo = (t) => i(t) && t.nodeName === \"CANVAS\" || !1, ve = (t) => l(t) && !!t.shadowRoot || !1, go = (t) => i(t) && [1, 2, 3, 4, 5, 6, 7, 8].some((e) => t.nodeType === e) || !1, vo = (t) => {\n if (!i(t)) return !1;\n const { top: e, bottom: n } = h(t), { clientHeight: o } = k(t);\n return e <= o && n >= 0;\n}, Eo = (t) => {\n if (!i(t)) return !1;\n const { clientWidth: e, clientHeight: n } = k(t), { top: o, left: s, bottom: c, right: a } = h(t, !0);\n return o >= 0 && s >= 0 && c <= n && a <= e;\n}, bo = (t) => ge(t) && t.every(l) || !1, ho = (t) => typeof t == \"function\" || !1, yo = (t) => v(t) && t.constructor.name === \"HTMLCollection\" || !1, wo = (t) => l(t) && t.tagName === \"IMG\" || !1, Ao = (t) => {\n if (!M(t)) return !1;\n try {\n JSON.parse(t);\n } catch {\n return !1;\n }\n return !0;\n}, So = (t) => v(t) && t.constructor.name === \"WeakMap\" || !1, No = (t) => i(t) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some((e) => t.constructor.name.includes(e)) || !1, Mo = (t) => v(t) && t.constructor.name === \"NodeList\" || !1, To = (t) => k(t).dir === \"rtl\", ko = (t) => i(t) && t.constructor.name.includes(\"SVG\") || !1, Do = (t) => i(t) && [\"TABLE\", \"TD\", \"TH\"].includes(t.nodeName) || !1, Ee = (t, e) => t ? t.closest(e) || // break out of `ShadowRoot`\nEe(t.getRootNode().host, e) : null, Co = (t, e) => l(t) ? t : (i(e) ? e : d()).querySelector(t), be = (t, e) => (i(e) ? e : d()).getElementsByTagName(t), Oo = (t) => [...be(\"*\", t)].filter(ve), Lo = (t, e) => d(e).getElementById(t) || null, Io = (t, e) => (e && i(e) ? e : d()).getElementsByClassName(t), xo = (t, e) => t.matches(e), zo = \"2.0.5\";\nexport {\n Wn as ArrayFrom,\n P as DOMContentLoadedEvent,\n et as DOMMouseScrollEvent,\n L as Data,\n Gn as Float32ArrayFrom,\n Kn as Float64ArrayFrom,\n T as ObjectAssign,\n w as ObjectEntries,\n _n as ObjectFromEntries,\n Yn as ObjectHasOwn,\n Zn as ObjectKeys,\n $n as ObjectValues,\n so as Timer,\n Y as abortEvent,\n Bn as addClass,\n fn as addEventListener,\n Kt as animationDelay,\n Gt as animationDuration,\n D as animationEndEvent,\n U as animationName,\n he as ariaChecked,\n we as ariaDescribedBy,\n ye as ariaDescription,\n Ae as ariaExpanded,\n Se as ariaHasPopup,\n X as ariaHidden,\n Ne as ariaLabel,\n Me as ariaLabelledBy,\n Te as ariaModal,\n ke as ariaPressed,\n De as ariaSelected,\n Oe as ariaValueMax,\n Ce as ariaValueMin,\n Le as ariaValueNow,\n Ie as ariaValueText,\n Z as beforeunloadEvent,\n gn as bezierEasings,\n $ as blurEvent,\n _ as changeEvent,\n Ee as closest,\n tt as contextmenuEvent,\n to as createCustomEvent,\n ee as createElement,\n ne as createElementNS,\n K as dispatchEvent,\n Qn as distinct,\n Pn as documentBody,\n Un as documentElement,\n N as documentHead,\n ze as dragEvent,\n Pe as dragendEvent,\n Be as dragenterEvent,\n Fe as dragleaveEvent,\n He as dragoverEvent,\n Ve as dragstartEvent,\n jn as emulateAnimationEnd,\n qn as emulateTransitionEnd,\n nt as errorEvent,\n Jn as focus,\n ot as focusEvent,\n qe as focusEvents,\n qt as focusableSelector,\n st as focusinEvent,\n ct as focusoutEvent,\n rt as gesturechangeEvent,\n at as gestureendEvent,\n it as gesturestartEvent,\n j as getAttribute,\n On as getAttributeNS,\n h as getBoundingClientRect,\n Oo as getCustomElements,\n d as getDocument,\n ao as getDocumentBody,\n k as getDocumentElement,\n io as getDocumentHead,\n oe as getElementAnimationDelay,\n se as getElementAnimationDuration,\n Lo as getElementById,\n g as getElementStyle,\n ce as getElementTransitionDelay,\n re as getElementTransitionDuration,\n Io as getElementsByClassName,\n be as getElementsByTagName,\n Rn as getInstance,\n uo as getNodeScroll,\n lo as getParentNode,\n po as getRectRelativeToOffsetParent,\n me as getUID,\n fo as getWindow,\n te as hasAttribute,\n Ln as hasAttributeNS,\n Hn as hasClass,\n de as hasFocusTrap,\n An as isApple,\n ge as isArray,\n mo as isCanvas,\n ve as isCustomElement,\n G as isDocument,\n go as isElement,\n vo as isElementInScrollRange,\n Eo as isElementInViewport,\n bo as isElementsArray,\n Sn as isFirefox,\n ho as isFunction,\n yo as isHTMLCollection,\n l as isHTMLElement,\n wo as isHTMLImageElement,\n Ao as isJSON,\n I as isMap,\n No as isMedia,\n wn as isMobile,\n i as isNode,\n Mo as isNodeList,\n ie as isNumber,\n v as isObject,\n To as isRTL,\n ko as isSVGElement,\n fe as isScaledElement,\n pe as isShadowRoot,\n M as isString,\n Do as isTableElement,\n So as isWeakMap,\n q as isWindow,\n Ke as keyAlt,\n Je as keyArrowDown,\n Ye as keyArrowLeft,\n Ze as keyArrowRight,\n Xe as keyArrowUp,\n $e as keyBackspace,\n _e as keyCapsLock,\n tn as keyControl,\n en as keyDelete,\n nn as keyEnter,\n sn as keyEscape,\n cn as keyInsert,\n rn as keyMeta,\n on as keyNumpadEnter,\n an as keyPause,\n un as keyScrollLock,\n ln as keyShift,\n dn as keySpace,\n pn as keyTab,\n Ge as keyboardEventKeys,\n ut as keydownEvent,\n lt as keypressEvent,\n dt as keyupEvent,\n pt as loadEvent,\n Ue as loadstartEvent,\n xo as matches,\n Re as mouseClickEvents,\n Qe as mouseHoverEvents,\n We as mouseSwipeEvents,\n ft as mouseclickEvent,\n mt as mousedblclickEvent,\n gt as mousedownEvent,\n bt as mouseenterEvent,\n Et as mousehoverEvent,\n yt as mouseinEvent,\n ht as mouseleaveEvent,\n St as mousemoveEvent,\n wt as mouseoutEvent,\n At as mouseoverEvent,\n vt as mouseupEvent,\n Nt as mousewheelEvent,\n Mt as moveEvent,\n xe as nativeEvents,\n _t as noop,\n Xn as normalizeOptions,\n B as normalizeValue,\n Q as off,\n vn as offsetHeight,\n En as offsetWidth,\n R as on,\n $t as one,\n Tt as orientationchangeEvent,\n eo as passiveHandler,\n kt as pointercancelEvent,\n Dt as pointerdownEvent,\n Ct as pointerleaveEvent,\n Ot as pointermoveEvent,\n Lt as pointerupEvent,\n Co as querySelector,\n ue as querySelectorAll,\n It as readystatechangeEvent,\n no as reflow,\n zn as removeAttribute,\n Vn as removeAttributeNS,\n Fn as removeClass,\n mn as removeEventListener,\n xt as resetEvent,\n zt as resizeEvent,\n Ht as scrollEvent,\n bn as scrollHeight,\n hn as scrollWidth,\n Vt as selectEvent,\n Bt as selectendEvent,\n Ft as selectstartEvent,\n In as setAttribute,\n xn as setAttributeNS,\n oo as setElementStyle,\n Pt as submitEvent,\n Nn as support3DTransform,\n Dn as supportAnimation,\n Mn as supportPassive,\n kn as supportTouch,\n Tn as supportTransform,\n Cn as supportTransition,\n yn as tabindex,\n ae as toLowerCase,\n co as toUpperCase,\n ro as toggleFocusTrap,\n je as touchEvents,\n Rt as touchcancelEvent,\n Qt as touchendEvent,\n Wt as touchmoveEvent,\n Ut as touchstartEvent,\n Xt as transitionDelay,\n Jt as transitionDuration,\n C as transitionEndEvent,\n W as transitionProperty,\n jt as unloadEvent,\n S as userAgent,\n A as userAgentData,\n zo as version\n};\n//# sourceMappingURL=shorty.mjs.map\n","const e = {}, f = (t) => {\n const { type: c, currentTarget: i } = t;\n [...e[c]].forEach(([n, s]) => {\n /* istanbul ignore else @preserve */\n i === n && [...s].forEach(([o, a]) => {\n o.apply(n, [t]), typeof a == \"object\" && a.once && r(n, c, o, a);\n });\n });\n}, E = (t, c, i, n) => {\n /* istanbul ignore else @preserve */\n e[c] || (e[c] = /* @__PURE__ */ new Map());\n const s = e[c];\n /* istanbul ignore else @preserve */\n s.has(t) || s.set(t, /* @__PURE__ */ new Map());\n const o = s.get(t), { size: a } = o;\n o.set(i, n);\n /* istanbul ignore else @preserve */\n a || t.addEventListener(c, f, n);\n}, r = (t, c, i, n) => {\n const s = e[c], o = s && s.get(t), a = o && o.get(i), d = a !== void 0 ? a : n;\n /* istanbul ignore else @preserve */\n o && o.has(i) && o.delete(i);\n /* istanbul ignore else @preserve */\n s && (!o || !o.size) && s.delete(t);\n /* istanbul ignore else @preserve */\n (!s || !s.size) && delete e[c];\n /* istanbul ignore else @preserve */\n (!o || !o.size) && t.removeEventListener(\n c,\n f,\n d\n );\n}, g = E, M = r;\nexport {\n E as addListener,\n f as globalListener,\n M as off,\n g as on,\n e as registry,\n r as removeListener\n};\n//# sourceMappingURL=event-listener.mjs.map\n","/**\n * Global namespace for most components `fade` class.\n */\nconst fadeClass = 'fade';\nexport default fadeClass;\n","/**\n * Global namespace for most components `show` class.\n */\nconst showClass = 'show';\nexport default showClass;\n","/**\n * Global namespace for most components `dismiss` option.\n */\nconst dataBsDismiss = 'data-bs-dismiss';\nexport default dataBsDismiss;\n","/** @type {string} */\nconst alertString = 'alert';\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = 'Alert';\nexport default alertComponent;\n","import { version } from '../package.json';\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport { Data, isHTMLElement, isString, normalizeOptions, ObjectKeys, querySelector } from '@thednp/shorty';\n\nimport type { BaseOptions } from '../interface/baseComponent';\nimport Version from '../version';\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options =\n this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, 'bs')\n : // istanbul ignore next @preserve\n {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return 'BaseComponent';\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach(prop => {\n delete this[prop];\n });\n }\n}\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport fadeClass from '../strings/fadeClass';\nimport showClass from '../strings/showClass';\nimport dataBsDismiss from '../strings/dataBsDismiss';\nimport alertString from '../strings/alertString';\nimport alertComponent from '../strings/alertComponent';\nimport type { AlertEvent } from '../interface/alert';\n\nimport BaseComponent from './base-component';\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) => getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(`close.bs.${alertString}`);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(`closed.bs.${alertString}`);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/**\n * Global namespace for most components active class.\n */\nconst activeClass = 'active';\nexport default activeClass;\n","/**\n * Global namespace for most components `toggle` option.\n */\nconst dataBsToggle = 'data-bs-toggle';\nexport default dataBsToggle;\n","/** @type {string} */\nconst buttonString = 'button';\nexport default buttonString;\n","/** @type {string} */\nconst buttonComponent = 'Button';\nexport default buttonComponent;\n","/* Native JavaScript for Bootstrap 5 | Button\n---------------------------------------------*/\nimport {\n addClass,\n ariaPressed,\n getAttribute,\n getInstance,\n hasClass,\n mouseclickEvent,\n removeClass,\n setAttribute,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport activeClass from '../strings/activeClass';\nimport dataBsToggle from '../strings/dataBsToggle';\nimport buttonString from '../strings/buttonString';\nimport buttonComponent from '../strings/buttonComponent';\n\nimport BaseComponent from './base-component';\n\n// BUTTON PRIVATE GC\n// =================\nconst buttonSelector = `[${dataBsToggle}=\"${buttonString}\"]`;\n\n/**\n * Static method which returns an existing `Button` instance associated\n * to a target `Element`.\n */\nconst getButtonInstance = (element: HTMLElement) => getInstance',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) => getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n","/** @type {string} */\nconst scrollspyString = 'scrollspy';\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = 'ScrollSpy';\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n getWindow,\n hasClass,\n isHTMLElement,\n isWindow,\n passiveHandler,\n querySelector,\n removeClass,\n scrollEvent,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport activeClass from '../strings/activeClass';\nimport scrollspyString from '../strings/scrollspyString';\nimport scrollspyComponent from '../strings/scrollspyComponent';\n\nimport BaseComponent from './base-component';\nimport { ScrollSpyEvent, ScrollSpyOptions } from '../interface/scrollspy';\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) => getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } = self;\n const { offset } = options;\n const isWin = isWindow(scrollTarget as Node | Window);\n\n const links = target && getElementsByTagName('A', target);\n const scrollHEIGHT = scrollTarget\n ? getScrollHeight(scrollTarget)\n : // istanbul ignore next @preserve\n scrollHeight;\n\n self.scrollTop = isWin ? (scrollTarget as Window).scrollY : (scrollTarget as HTMLElement).scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n [...links].forEach(link => {\n href = getAttribute(link, 'href');\n targetItem =\n href && href.charAt(0) === '#' && href.slice(-1) !== '#' && querySelector(href, getDocument(element));\n\n if (targetItem) {\n self.items.push(link);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push((isWin ? rect.top + self.scrollTop : targetItem.offsetTop) - offset);\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: Node | Window) => {\n return isHTMLElement(scrollTarget as Node)\n ? (scrollTarget as HTMLElement).scrollHeight\n : getDocumentElement(scrollTarget as Node).scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return isWindow(scrollTarget as Node) ? (scrollTarget as Window).innerHeight : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName('A', target)].forEach(item => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, 'nav') || hasClass(parentItem, 'dropdown-menu')) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach(menuItem => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement | Window;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(options.target as HTMLElement | string, getDocument(element));\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight ? element : getWindow(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // add event handlers\n this._toggleEventListeners(true);\n\n this.refresh();\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === 'undefined' || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /**\n * Toggles on/off the component event listener.\n *\n * @param add when `true`, listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.scrollTarget as EventTarget, scrollEvent, this.refresh, passiveHandler);\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst tabString = 'tab';\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = 'Tab';\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport collapsingClass from '../strings/collapsingClass';\nimport activeClass from '../strings/activeClass';\nimport fadeClass from '../strings/fadeClass';\nimport showClass from '../strings/showClass';\nimport dropdownClasses from '../strings/dropdownClasses';\nimport dataBsToggle from '../strings/dataBsToggle';\nimport tabString from '../strings/tabString';\nimport tabComponent from '../strings/tabComponent';\n\nimport getTargetElement from '../util/getTargetElement';\nimport BaseComponent from './base-component';\nimport type { /* TabOptions, */ TabEvent } from '../interface/tab';\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) => getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(`show.bs.${tabString}`);\nconst shownTabEvent = createCustomEvent(`shown.bs.${tabString}`);\nconst hideTabEvent = createCustomEvent(`hide.bs.${tabString}`);\nconst hiddenTabEvent = createCustomEvent(`hidden.bs.${tabString}`);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = '';\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) || { tab: null }; // istanbul ignore next @preserve\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) || { currentHeight: 0, nextHeight: 0 }; // istanbul ignore next @preserve\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) || {\n // istanbul ignore next @preserve\n tab: null,\n content: null,\n };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach(c => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, 'overflow-hidden');\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight\n : // istanbul ignore next @preserve\n 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach(c => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, 'overflow-hidden');\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (self: Tab): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (activeTabs.length === 1 && !dropdownClasses.some(c => hasClass(activeTabs[0].parentElement as HTMLElement, c))) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement) ? getTargetElement(tab as HTMLElement) : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(',.')}`);\n return dropdown ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown) : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, '.nav');\n const container = closest(content, '.tab-content');\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, 'true');\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, 'true');\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, 'false');\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (content && (hasClass(content, fadeClass) || (nextContent && hasClass(nextContent, fadeClass)))) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst toastString = 'toast';\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = 'Toast';\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport fadeClass from '../strings/fadeClass';\nimport showClass from '../strings/showClass';\nimport dataBsDismiss from '../strings/dataBsDismiss';\nimport dataBsToggle from '../strings/dataBsToggle';\nimport toastString from '../strings/toastString';\nimport toastComponent from '../strings/toastComponent';\nimport getTargetElement from '../util/getTargetElement';\nimport BaseComponent from './base-component';\nimport { ToastEvent, ToastOptions } from '../interface/toast';\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = 'showing';\n/** @deprecated */\nconst hideClass = 'hide';\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) => getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(`show.bs.${toastString}`);\nconst shownToastEvent = createCustomEvent, ToastEvent>(`shown.bs.${toastString}`);\nconst hideToastEvent = createCustomEvent, ToastEvent>(`hide.bs.${toastString}`);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(`hidden.bs.${toastString}`);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === 'A') e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (self && element !== relatedTarget && !element.contains(relatedTarget as Node)) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [...querySelectorAll(toastToggleSelector, getDocument(element))].filter(\n btn => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(e =>\n action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach(btn => action(btn, mouseclickEvent, toastClickHandler));\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n","import { Data, getElementsByTagName, matches } from '@thednp/shorty';\n\nimport { addListener } from '@thednp/event-listener';\n\nimport Alert from '../components/alert';\nimport Button from '../components/button';\nimport Carousel from '../components/carousel';\nimport Collapse from '../components/collapse';\nimport Dropdown from '../components/dropdown';\nimport Modal from '../components/modal';\nimport Offcanvas from '../components/offcanvas';\nimport Popover from '../components/popover';\nimport ScrollSpy from '../components/scrollspy';\nimport Tab from '../components/tab';\nimport Toast from '../components/toast';\nimport Tooltip from '../components/tooltip';\n\nconst componentsList = new Map<\n string,\n | typeof Alert\n | typeof Button\n | typeof Carousel\n | typeof Collapse\n | typeof Dropdown\n | typeof Modal\n | typeof Offcanvas\n | typeof Popover\n | typeof ScrollSpy\n | typeof Tab\n | typeof Toast\n | typeof Tooltip\n>();\n\ntype Component =\n | Alert\n | Button\n | Carousel\n | Collapse\n | Dropdown\n | Modal\n | Offcanvas\n | Popover\n | ScrollSpy\n | Tab\n | Toast\n | Tooltip;\n\n[Alert, Button, Carousel, Collapse, Dropdown, Modal, Offcanvas, Popover, ScrollSpy, Tab, Toast, Tooltip].forEach(c =>\n componentsList.set(c.prototype.name, c),\n);\n\n/**\n * Initialize all matched `Element`s for one component.\n *\n * @param callback\n * @param collection\n */\nconst initComponentDataAPI = (\n callback: (el: HTMLElement) => Component,\n collection: HTMLCollectionOf | HTMLElement[],\n) => {\n [...collection].forEach(x => callback(x));\n};\n\n/**\n * Remove one component from a target container element or all in the page.\n *\n * @param component the component name\n * @param context parent `Node`\n */\nconst removeComponentDataAPI = (component: string, context: ParentNode) => {\n const compData = Data.getAllFor(component) as Map;\n\n if (compData) {\n [...compData].forEach(([element, instance]) => {\n if (context.contains(element)) {\n (instance as T & { dispose: () => void }).dispose();\n }\n });\n }\n};\n\n/**\n * Initialize all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const initCallback = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n const elemCollection = [...getElementsByTagName('*', lookUp)];\n\n componentsList.forEach(cs => {\n const { init, selector } = cs;\n initComponentDataAPI(\n init,\n elemCollection.filter(item => matches(item, selector)),\n );\n });\n};\n\n/**\n * Remove all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const removeDataAPI = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n\n componentsList.forEach(comp => {\n removeComponentDataAPI(comp.prototype.name, lookUp);\n });\n};\n\n// Bulk initialize all components\nif (document.body) initCallback();\nelse {\n addListener(document, 'DOMContentLoaded', () => initCallback(), {\n once: true,\n });\n}\n"],"names":["we","Ae","X","Te","ke","De","P","ot","st","ct","ut","dt","ft","gt","Et","bt","ht","Dt","Ot","Lt","zt","Ht","Ut","Ve","qt","Je","Xe","Ye","Ze","sn","Jt","Xt","C","W","Yt","A","Zt","S","z","V","An","N","R","e","n","o","s","Q","$t","c","_t","j","te","In","zn","Bn","Fn","Hn","v","i","l","E","L","Rn","M","q","G","d","T","ee","K","g","ce","re","qn","a","u","Jn","B","w","ae","Xn","p","f","y","J","Zn","to","eo","no","oo","I","ie","m","so","ue","x","le","de","ro","h","ao","k","pe","lo","F","H","b","me","fo","ge","vo","ho","Mo","To","Do","Ee","Co","be","Io","xo","r","fadeClass","showClass","dataBsDismiss","alertString","alertComponent","Version","version","BaseComponent","target","config","__publicField","element","isHTMLElement","isString","querySelector","prevInstance","Data","ObjectKeys","normalizeOptions","prop","alertSelector","alertDismissSelector","getAlertInstance","getInstance","alertInitCallback","Alert","closeAlertEvent","createCustomEvent","closedAlertEvent","alertTransitionEnd","self","dispatchEvent","hasClass","removeClass","emulateTransitionEnd","add","action","addListener","removeListener","dismiss","close","mouseclickEvent","activeClass","dataBsToggle","buttonString","buttonComponent","buttonSelector","getButtonInstance","buttonInitCallback","Button","isActive","getAttribute","addClass","setAttribute","ariaPressed","dataBsTarget","carouselString","carouselComponent","dataBsParent","dataBsContainer","getTargetElement","targetAttr","doc","getDocument","att","attValue","closest","carouselSelector","carouselItem","dataBsSlideTo","dataBsSlide","pausedClass","carouselDefaults","getCarouselInstance","carouselInitCallback","Carousel","startX","currentX","endX","carouselSlideEvent","carouselSlidEvent","carouselTransitionEndHandler","index","direction","slides","options","activeItem","getActiveIndex","orientation","directionClass","Timer","carouselPauseHandler","carouselResumeHandler","carouselIndicatorHandler","newIndex","carouselControlsHandler","carouselKeyHandler","code","querySelectorAll","isElementInScrollRange","RTL","isRTL","arrowKeyNext","keyArrowLeft","keyArrowRight","arrowKeyPrev","carouselDragHandler","carouselPointerDownHandler","controls","indicators","el","toggleCarouselTouchHandlers","carouselPointerMoveHandler","carouselPointerUpHandler","_a","activateCarouselIndicator","pointermoveEvent","passiveHandler","pointerupEvent","touch","pause","interval","keyboard","mouseenterEvent","mouseleaveEvent","pointerdownEvent","touchstartEvent","dragstartEvent","arrow","indicator","keydownEvent","getElementsByClassName","activeIndex","transitionItem","matches","ar","isPaused","idx","next","eventProperties","ObjectAssign","getElementTransitionDuration","reflow","isAnimating","clone","collapsingClass","collapseString","collapseComponent","collapseSelector","collapseToggleSelector","collapseDefaults","getCollapseInstance","collapseInitCallback","Collapse","showCollapseEvent","shownCollapseEvent","hideCollapseEvent","hiddenCollapseEvent","expandCollapse","parent","triggers","noop","setElementStyle","btn","ariaExpanded","collapseContent","collapseClickHandler","trigger","activeCollapse","activeCollapseInstance","dropdownMenuClasses","dropdownComponent","dropdownMenuClass","isEmptyAnchor","parentAnchor","hasAttribute","dropdownString","dropupString","dropstartString","dropendString","dropdownClasses","dropdownSelector","getDropdownInstance","dropdownInitCallback","Dropdown","dropdownMenuEndClass","verticalClass","horizontalClass","menuFocusTags","dropdownDefaults","showDropdownEvent","shownDropdownEvent","hideDropdownEvent","hiddenDropdownEvent","updatedDropdownEvent","styleDropdown","menu","parentElement","offset","getElementStyle","menuEnd","style","positionClass","dropdownMargin","dropdownPosition","menuWidth","menuHeight","clientWidth","clientHeight","getDocumentElement","targetLeft","targetTop","targetWidth","targetHeight","getBoundingClientRect","leftFullExceed","rightFullExceed","bottomExceed","bottomFullExceed","topExceed","leftExceed","rightExceed","posAjust","margins","getMenuItems","firstElementChild","toggleDropdownDismiss","dropdownDismissHandler","focusEvent","dropdownPreventScroll","keyupEvent","dropdownKeyHandler","scrollEvent","resizeEvent","ev","getWindow","dropdownLayoutHandler","getCurrentOpenDropdown","currentParent","type","isForm","mousedownEvent","dropdownClickHandler","keyArrowDown","keyArrowUp","activeElement","open","menuItems","focus","keyEscape","currentElement","currentInstance","modalString","modalComponent","offcanvasComponent","fixedTopClass","fixedBottomClass","stickyTopClass","positionStickyClass","getFixedItems","resetScrollbar","bd","getDocumentBody","fixedItems","fixed","measureScrollbar","innerWidth","setScrollbar","overflow","bodyPad","sbWidth","itemPadValue","itemMValue","offcanvasString","popupContainer","createElement","appendPopup","customContainer","containerIsBody","isNode","lookup","BODY","removePopup","hasPopup","backdropString","modalBackdropClass","offcanvasBackdropClass","modalActiveSelector","offcanvasActiveSelector","overlay","getCurrentOpen","toggleOverlayType","isModal","targetClass","appendOverlay","hasFade","showOverlay","hideOverlay","removeOverlay","isVisible","modalSelector","modalToggleSelector","modalDismissSelector","modalStaticClass","modalDefaults","getModalInstance","modalInitCallback","Modal","showModalEvent","shownModalEvent","hideModalEvent","hiddenModalEvent","setModalScrollbar","scrollbarWidth","scrollHeight","modalHeight","modalScrollHeight","modalOverflow","padStyle","toggleModalDismiss","update","modalDismissHandler","modalKeyHandler","afterModalHide","relatedTarget","focusElement","toggleFocusTrap","afterModalShow","beforeModalShow","removeAttribute","ariaHidden","ariaModal","beforeModalHide","modalClickHandler","_b","currentTarget","isStatic","modalDialog","backdrop","selectedText","targetInsideDialog","staticTransitionEnd","duration","overlayDelay","currentOpen","that","callback","offcanvasSelector","offcanvasToggleSelector","offcanvasDismissSelector","offcanvasTogglingClass","offcanvasDefaults","getOffcanvasInstance","offcanvasInitCallback","Offcanvas","showOffcanvasEvent","shownOffcanvasEvent","hideOffcanvasEvent","hiddenOffcanvasEvent","setOffCanvasScrollbar","toggleOffCanvasDismiss","offcanvasKeyDismissHandler","offcanvasDismissHandler","beforeOffcanvasShow","showOffcanvasComplete","beforeOffcanvasHide","hideOffcanvasComplete","offcanvasTriggerHandler","offCanvasDismiss","selection","visibleTrigger","isOpen","popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","body","tipClassPositions","styleTip","tipClasses","tooltip","container","tipPositions","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","placement","parentCWidth","parentOWidth","fixedParent","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","horizontals","verticals","updatedTooltipEvent","toLowerCase","tooltipDefaults","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","dirty","isFunction","tempDocument","isNodeList","isArray","createTip","id","title","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","tooltipHeader","tooltipBody","tempTitle","tempContent","tempBtn","getElementContainer","majorBlockTags","containers","parentNode","getParentNode","isShadowRoot","isTableElement","tooltipSelector","titleAttr","getTooltipInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","ariaDescribedBy","hasTip","disposeTooltipComplete","toggleTooltipTitle","toggleTooltipAction","tooltipShownAction","shownTooltipEvent","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","offsetHeight","parentModal","parentOffcanvas","win","scrollTarget","titleAtt","tr","mousehoverEvent","focusinEvent","focusoutEvent","isApple","tipComponent","elem","getUID","position","outTimer","tipContainer","showTooltipEvent","delay","hideTooltipEvent","enabled","popoverSelector","popoverDefaults","getPopoverInstance","popoverInitCallback","Popover","scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","updateSpyTargets","itemsLength","isWin","isWindow","links","getElementsByTagName","scrollHEIGHT","getScrollHeight","href","targetItem","rect","getOffsetHeight","link","clear","item","activate","parents","parentItem","menuItem","parentLink","scrollTop","maxScroll","items","newActiveItem","offsets","tabString","tabComponent","tabSelector","getTabInstance","tabInitCallback","Tab","showTabEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","tabContent","nav","triggerTabShow","nextContent","tab","currentHeight","nextHeight","triggerTabHide","getActiveTab","activeTabs","getParentDropdown","dropdown","tabClickHandler","firstTab","firstTabContent","ariaSelected","activeDropdown","toggleTab","toastString","toastComponent","toastSelector","toastDismissSelector","toastToggleSelector","showingClass","hideClass","toastDefaults","getToastInstance","toastInitCallback","Toast","showToastEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","hideToastComplete","hideToast","showToast","toastClickHandler","interactiveToastHandler","isShown","hide","componentsList","initComponentDataAPI","collection","removeComponentDataAPI","component","context","compData","instance","initCallback","lookUp","elemCollection","cs","init","selector","removeDataAPI","comp"],"mappings":";;;AAAK,MAA+CA,KAAK,oBAAoBC,KAAK,iBAAuCC,KAAI,eAA0DC,KAAK,cAAcC,KAAK,gBAAgBC,KAAK,iBAAyLC,KAAI,oBAAyDC,KAAK,SAASC,KAAK,WAAWC,KAAK,YAA0EC,KAAK,WAA4BC,KAAK,SAAsBC,IAAK,SAA0BC,KAAK,aAA6BC,KAAK,SAASC,KAAK,cAAcC,KAAK,cAAmKC,KAAK,eAAoCC,KAAK,eAAeC,KAAK,aAAoDC,KAAK,UAA+DC,KAAK,UAAyBC,KAAK,cAmD1lCC,KAAK,aAauBC,KAAK,qFA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ACAF,EAAe,OAAO,CAAA1E,MAAQlY,GAAQkY,GAAM6E,CAAQ,CAAC;AAAA,IAAA;AAAA,EACvD,CACD;AACH,GAOaC,KAAgB,CAACT,MAAyB;AACrD,QAAMI,IAASJ,KAAWA,EAAQ,WAAWA,IAAU;AAEvD,EAAAL,GAAe,QAAQ,CAAQe,MAAA;AACN,IAAAZ,GAAAY,EAAK,UAAU,MAAMN,CAAM;AAAA,EAAA,CACnD;AACH;AAGI,SAAS,OAAmBD,OAE9B3iB,EAAY,UAAU,oBAAoB,MAAM2iB,GAAA,GAAgB;AAAA,EAC9D,MAAM;AAAA,CACP;","x_google_ignoreList":[0,1]} \ No newline at end of file +{"version":3,"file":"bootstrap-native.mjs","sources":["../node_modules/.pnpm/@thednp+shorty@2.0.5/node_modules/@thednp/shorty/dist/shorty.mjs","../node_modules/.pnpm/@thednp+event-listener@2.0.6/node_modules/@thednp/event-listener/dist/event-listener.mjs","../src/strings/fadeClass.ts","../src/strings/showClass.ts","../src/strings/dataBsDismiss.ts","../src/strings/alertString.ts","../src/strings/alertComponent.ts","../src/version.ts","../src/components/base-component.ts","../src/components/alert.ts","../src/strings/activeClass.ts","../src/strings/dataBsToggle.ts","../src/strings/buttonString.ts","../src/strings/buttonComponent.ts","../src/components/button.ts","../src/strings/dataBsTarget.ts","../src/strings/carouselString.ts","../src/strings/carouselComponent.ts","../src/strings/dataBsParent.ts","../src/strings/dataBsContainer.ts","../src/util/getTargetElement.ts","../src/components/carousel.ts","../src/strings/collapsingClass.ts","../src/strings/collapseString.ts","../src/strings/collapseComponent.ts","../src/components/collapse.ts","../src/strings/dropdownClasses.ts","../src/strings/dropdownComponent.ts","../src/strings/dropdownMenuClass.ts","../src/util/isEmptyAnchor.ts","../src/components/dropdown.ts","../src/strings/modalString.ts","../src/strings/modalComponent.ts","../src/strings/offcanvasComponent.ts","../src/strings/fixedTopClass.ts","../src/strings/fixedBottomClass.ts","../src/strings/stickyTopClass.ts","../src/strings/positionStickyClass.ts","../src/util/scrollbar.ts","../src/strings/offcanvasString.ts","../src/util/popupContainer.ts","../src/util/backdrop.ts","../src/util/isVisible.ts","../src/components/modal.ts","../src/components/offcanvas.ts","../src/strings/popoverString.ts","../src/strings/popoverComponent.ts","../src/strings/tooltipString.ts","../src/util/getTipTemplate.ts","../src/util/tipClassPositions.ts","../src/util/styleTip.ts","../src/util/tooltipDefaults.ts","../src/strings/dataOriginalTitle.ts","../src/strings/tooltipComponent.ts","../src/util/setHtml.ts","../src/util/createTip.ts","../src/util/getElementContainer.ts","../src/components/tooltip.ts","../src/components/popover.ts","../src/strings/scrollspyString.ts","../src/strings/scrollspyComponent.ts","../src/components/scrollspy.ts","../src/strings/tabString.ts","../src/strings/tabComponent.ts","../src/components/tab.ts","../src/strings/toastString.ts","../src/strings/toastComponent.ts","../src/components/toast.ts","../src/util/init.ts"],"sourcesContent":["const he = \"aria-checked\", ye = \"aria-description\", we = \"aria-describedby\", Ae = \"aria-expanded\", Se = \"aria-haspopup\", X = \"aria-hidden\", Ne = \"aria-label\", Me = \"aria-labelledby\", Te = \"aria-modal\", ke = \"aria-pressed\", De = \"aria-selected\", Ce = \"aria-valuemin\", Oe = \"aria-valuemax\", Le = \"aria-valuenow\", Ie = \"aria-valuetext\", Y = \"abort\", Z = \"beforeunload\", $ = \"blur\", _ = \"change\", tt = \"contextmenu\", P = \"DOMContentLoaded\", et = \"DOMMouseScroll\", nt = \"error\", ot = \"focus\", st = \"focusin\", ct = \"focusout\", rt = \"gesturechange\", at = \"gestureend\", it = \"gesturestart\", ut = \"keydown\", lt = \"keypress\", dt = \"keyup\", pt = \"load\", ft = \"click\", mt = \"dblclick\", gt = \"mousedown\", vt = \"mouseup\", Et = \"hover\", bt = \"mouseenter\", ht = \"mouseleave\", yt = \"mousein\", wt = \"mouseout\", At = \"mouseover\", St = \"mousemove\", Nt = \"mousewheel\", Mt = \"move\", Tt = \"orientationchange\", kt = \"pointercancel\", Dt = \"pointerdown\", Ct = \"pointerleave\", Ot = \"pointermove\", Lt = \"pointerup\", It = \"readystatechange\", xt = \"reset\", zt = \"resize\", Vt = \"select\", Bt = \"selectend\", Ft = \"selectstart\", Ht = \"scroll\", Pt = \"submit\", Ut = \"touchstart\", Wt = \"touchmove\", Rt = \"touchcancel\", Qt = \"touchend\", jt = \"unload\", xe = {\n DOMContentLoaded: P,\n DOMMouseScroll: et,\n abort: Y,\n beforeunload: Z,\n blur: $,\n change: _,\n click: ft,\n contextmenu: tt,\n dblclick: mt,\n error: nt,\n focus: ot,\n focusin: st,\n focusout: ct,\n gesturechange: rt,\n gestureend: at,\n gesturestart: it,\n hover: Et,\n keydown: ut,\n keypress: lt,\n keyup: dt,\n load: pt,\n mousedown: gt,\n mousemove: St,\n mousein: yt,\n mouseout: wt,\n mouseenter: bt,\n mouseleave: ht,\n mouseover: At,\n mouseup: vt,\n mousewheel: Nt,\n move: Mt,\n orientationchange: Tt,\n pointercancel: kt,\n pointerdown: Dt,\n pointerleave: Ct,\n pointermove: Ot,\n pointerup: Lt,\n readystatechange: It,\n reset: xt,\n resize: zt,\n scroll: Ht,\n select: Vt,\n selectend: Bt,\n selectstart: Ft,\n submit: Pt,\n touchcancel: Rt,\n touchend: Qt,\n touchmove: Wt,\n touchstart: Ut,\n unload: jt\n}, ze = \"drag\", Ve = \"dragstart\", Be = \"dragenter\", Fe = \"dragleave\", He = \"dragover\", Pe = \"dragend\", Ue = \"loadstart\", We = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, Re = { down: \"mousedown\", up: \"mouseup\" }, Qe = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : (\n /* istanbul ignore next */\n [\"mouseover\", \"mouseout\"]\n), je = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, qe = { in: \"focusin\", out: \"focusout\" }, qt = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]', Ge = {\n Backspace: \"Backspace\",\n // 8\n Tab: \"Tab\",\n // 9\n Enter: \"Enter\",\n // 13\n Shift: \"Shift\",\n // 16\n Control: \"Control\",\n // 17\n Alt: \"Alt\",\n // 18\n Pause: \"Pause\",\n // 19\n CapsLock: \"CapsLock\",\n // 20\n Escape: \"Escape\",\n // 27\n Scape: \"Space\",\n // 32\n ArrowLeft: \"ArrowLeft\",\n // 37\n ArrowUp: \"ArrowUp\",\n // 38\n ArrowRight: \"ArrowRight\",\n // 39\n ArrowDown: \"ArrowDown\",\n // 40\n Insert: \"Insert\",\n // 45\n Delete: \"Delete\",\n // 46\n Meta: \"Meta\",\n // 91 windows key\n ContextMenu: \"ContextMenu\",\n // 93\n ScrollLock: \"ScrollLock\"\n // 145\n}, Ke = \"Alt\", Je = \"ArrowDown\", Xe = \"ArrowUp\", Ye = \"ArrowLeft\", Ze = \"ArrowRight\", $e = \"Backspace\", _e = \"CapsLock\", tn = \"Control\", en = \"Delete\", nn = \"Enter\", on = \"NumpadEnter\", sn = \"Escape\", cn = \"Insert\", rn = \"Meta\", an = \"Pause\", un = \"ScrollLock\", ln = \"Shift\", dn = \"Space\", pn = \"Tab\", Gt = \"animationDuration\", Kt = \"animationDelay\", U = \"animationName\", D = \"animationend\", Jt = \"transitionDuration\", Xt = \"transitionDelay\", C = \"transitionend\", W = \"transitionProperty\", fn = \"addEventListener\", mn = \"removeEventListener\", gn = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\"\n}, vn = \"offsetHeight\", En = \"offsetWidth\", bn = \"scrollHeight\", hn = \"scrollWidth\", yn = \"tabindex\", Yt = navigator.userAgentData, A = Yt, { userAgent: Zt } = navigator, S = Zt, z = /iPhone|iPad|iPod|Android/i;\nlet O = !1;\n// istanbul ignore else @preserve\nA ? O = A.brands.some((t) => z.test(t.brand)) : O = z.test(S);\nconst wn = O, V = /(iPhone|iPod|iPad)/, An = A ? A.brands.some((t) => V.test(t.brand)) : (\n /* istanbul ignore next @preserve */\n V.test(S)\n), Sn = S ? S.includes(\"Firefox\") : (\n /* istanbul ignore next @preserve */\n !1\n), { head: N } = document, Nn = [\"webkitPerspective\", \"perspective\"].some((t) => t in N.style), R = (t, e, n, o) => {\n const s = o || !1;\n t.addEventListener(e, n, s);\n}, Q = (t, e, n, o) => {\n const s = o || !1;\n t.removeEventListener(e, n, s);\n}, $t = (t, e, n, o) => {\n const s = (c) => {\n /* istanbul ignore else @preserve */\n (c.target === t || c.currentTarget === t) && (n.apply(t, [c]), Q(t, e, s, o));\n };\n R(t, e, s, o);\n}, _t = () => {\n}, Mn = (() => {\n let t = !1;\n try {\n const e = Object.defineProperty({}, \"passive\", {\n get: () => (t = !0, t)\n });\n // istanbul ignore next @preserve\n $t(document, P, _t, e);\n } catch {\n }\n return t;\n})(), Tn = [\"webkitTransform\", \"transform\"].some((t) => t in N.style), kn = \"ontouchstart\" in window || /* istanbul ignore next */\n\"msMaxTouchPoints\" in navigator, Dn = [\"webkitAnimation\", \"animation\"].some((t) => t in N.style), Cn = [\"webkitTransition\", \"transition\"].some((t) => t in N.style), j = (t, e) => t.getAttribute(e), On = (t, e, n) => e.getAttributeNS(t, n), te = (t, e) => t.hasAttribute(e), Ln = (t, e, n) => e.hasAttributeNS(t, n), In = (t, e, n) => t.setAttribute(e, n), xn = (t, e, n, o) => e.setAttributeNS(t, n, o), zn = (t, e) => t.removeAttribute(e), Vn = (t, e, n) => e.removeAttributeNS(t, n), Bn = (t, ...e) => {\n t.classList.add(...e);\n}, Fn = (t, ...e) => {\n t.classList.remove(...e);\n}, Hn = (t, e) => t.classList.contains(e), { body: Pn } = document, { documentElement: Un } = document, Wn = (t) => Array.from(t), v = (t) => t != null && typeof t == \"object\" || !1, i = (t) => v(t) && typeof t.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some((e) => t.nodeType === e) || !1, l = (t) => i(t) && t.nodeType === 1 || !1, E = /* @__PURE__ */ new Map(), L = {\n data: E,\n /**\n * Sets web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @param instance the component instance\n */\n set: (t, e, n) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n E.has(e) || E.set(e, /* @__PURE__ */ new Map()), E.get(e).set(t, n);\n },\n /**\n * Returns all instances for specified component.\n *\n * @param component the component's name or a unique key\n * @returns all the component instances\n */\n getAllFor: (t) => E.get(t) || null,\n /**\n * Returns the instance associated with the target.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @returns the instance\n */\n get: (t, e) => {\n if (!l(t) || !e) return null;\n const n = L.getAllFor(e);\n return t && n && n.get(t) || null;\n },\n /**\n * Removes web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n */\n remove: (t, e) => {\n const n = L.getAllFor(e);\n if (!n || !l(t)) return;\n n.delete(t);\n // istanbul ignore else @preserve\n n.size === 0 && E.delete(e);\n }\n}, Rn = (t, e) => L.get(t, e), M = (t) => typeof t == \"string\" || !1, q = (t) => v(t) && t.constructor.name === \"Window\" || !1, G = (t) => i(t) && t.nodeType === 9 || !1, d = (t) => q(t) ? t.document : G(t) ? t : i(t) ? t.ownerDocument : window.document, T = (t, ...e) => Object.assign(t, ...e), ee = (t) => {\n if (!t) return;\n if (M(t))\n return d().createElement(t);\n const { tagName: e } = t, n = ee(e);\n if (!n) return;\n const o = { ...t };\n return delete o.tagName, T(n, o);\n}, ne = (t, e) => {\n if (!t || !e) return;\n if (M(e))\n return d().createElementNS(t, e);\n const { tagName: n } = e, o = ne(t, n);\n if (!o) return;\n const s = { ...e };\n return delete s.tagName, T(o, s);\n}, K = (t, e) => t.dispatchEvent(e), Qn = (t, e, n) => n.indexOf(t) === e, g = (t, e) => {\n const n = getComputedStyle(t), o = e.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return n.getPropertyValue(o);\n}, oe = (t) => {\n const e = g(t, U), n = g(t, Kt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, se = (t) => {\n const e = g(t, U), n = g(t, Gt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, jn = (t, e) => {\n let n = 0;\n const o = new Event(D), s = se(t), c = oe(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(D, a), n = 1);\n };\n t.addEventListener(D, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else {\n // istanbul ignore next @preserve\n e.apply(t, [o]);\n }\n}, ce = (t) => {\n const e = g(t, W), n = g(t, Xt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, re = (t) => {\n const e = g(t, W), n = g(t, Jt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, qn = (t, e) => {\n let n = 0;\n const o = new Event(C), s = re(t), c = ce(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(C, a), n = 1);\n };\n t.addEventListener(C, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else\n e.apply(t, [o]);\n}, Gn = (t) => Float32Array.from(Array.from(t)), Kn = (t) => Float64Array.from(Array.from(t)), Jn = (t, e) => t.focus(e), B = (t) => [\"true\", !0].includes(t) ? !0 : [\"false\", !1].includes(t) ? !1 : [\"null\", \"\", null, void 0].includes(t) ? null : t !== \"\" && !Number.isNaN(+t) ? +t : t, w = (t) => Object.entries(t), ae = (t) => t.toLowerCase(), Xn = (t, e, n, o) => {\n const s = { ...n }, c = { ...t.dataset }, a = { ...e }, u = {}, p = \"title\";\n return w(c).forEach(([r, f]) => {\n const y = o && typeof r == \"string\" && r.includes(o) ? r.replace(o, \"\").replace(/[A-Z]/g, (J) => ae(J)) : (\n /* istanbul ignore next @preserve */\n r\n );\n u[y] = B(f);\n }), w(s).forEach(([r, f]) => {\n s[r] = B(f);\n }), w(e).forEach(([r, f]) => {\n // istanbul ignore else @preserve\n r in s ? a[r] = s[r] : r in u ? a[r] = u[r] : a[r] = r === p ? j(t, p) : f;\n }), a;\n}, Yn = (t, e) => v(t) && (Object.hasOwn(t, e) || e in t), Zn = (t) => Object.keys(t), $n = (t) => Object.values(t), _n = (t) => Object.fromEntries(t), to = (t, e) => {\n const n = new CustomEvent(t, {\n cancelable: !0,\n bubbles: !0\n });\n // istanbul ignore else @preserve\n return v(e) && T(n, e), n;\n}, eo = { passive: !0 }, no = (t) => t.offsetHeight, oo = (t, e) => {\n w(e).forEach(([n, o]) => {\n if (o && M(n) && n.includes(\"--\"))\n t.style.setProperty(n, o);\n else {\n const s = {};\n s[n] = o, T(t.style, s);\n }\n });\n}, I = (t) => v(t) && t.constructor.name === \"Map\" || !1, ie = (t) => typeof t == \"number\" || !1, m = /* @__PURE__ */ new Map(), so = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n *\n * @param element target element\n * @param callback the callback\n * @param delay the execution delay\n * @param key a unique key\n */\n set: (t, e, n, o) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n if (o && o.length) {\n // istanbul ignore else @preserve\n m.has(t) || m.set(t, /* @__PURE__ */ new Map()), m.get(t).set(o, setTimeout(e, n));\n } else\n m.set(t, setTimeout(e, n));\n },\n /**\n * Returns the timer associated with the target.\n *\n * @param element target element\n * @param key a unique\n * @returns the timer\n */\n get: (t, e) => {\n if (!l(t)) return null;\n const n = m.get(t);\n return e && n && I(n) ? n.get(e) || /* istanbul ignore next */\n null : ie(n) ? n : null;\n },\n /**\n * Clears the element's timer.\n *\n * @param element target element\n * @param key a unique key\n */\n clear: (t, e) => {\n if (!l(t)) return;\n const n = m.get(t);\n if (e && e.length && I(n)) {\n clearTimeout(n.get(e)), n.delete(e);\n // istanbul ignore else @preserve\n n.size === 0 && m.delete(t);\n } else\n clearTimeout(n), m.delete(t);\n }\n}, co = (t) => t.toUpperCase(), ue = (t, e) => (i(e) ? e : d()).querySelectorAll(t), x = /* @__PURE__ */ new Map();\nfunction le(t) {\n const { shiftKey: e, code: n } = t, o = d(this), s = [...ue(qt, this)].filter(\n (u) => !te(u, \"disabled\") && !j(u, X)\n );\n if (!s.length) return;\n const c = s[0], a = s[s.length - 1];\n // istanbul ignore else @preserve\n n === \"Tab\" && (e && o.activeElement === c ? (a.focus(), t.preventDefault()) : !e && o.activeElement === a && (c.focus(), t.preventDefault()));\n}\nconst de = (t) => x.has(t) === !0, ro = (t) => {\n const e = de(t);\n (e ? Q : R)(t, \"keydown\", le), e ? x.delete(t) : x.set(t, !0);\n}, h = (t, e) => {\n const { width: n, height: o, top: s, right: c, bottom: a, left: u } = t.getBoundingClientRect();\n let p = 1, r = 1;\n if (e && l(t)) {\n const { offsetWidth: f, offsetHeight: y } = t;\n p = f > 0 ? Math.round(n) / f : (\n /* istanbul ignore next */\n 1\n ), r = y > 0 ? Math.round(o) / y : (\n /* istanbul ignore next */\n 1\n );\n }\n return {\n width: n / p,\n height: o / r,\n top: s / r,\n right: c / p,\n bottom: a / r,\n left: u / p,\n x: u / p,\n y: s / r\n };\n}, ao = (t) => d(t).body, k = (t) => d(t).documentElement, io = (t) => d(t).head, uo = (t) => {\n const e = q(t), n = e ? t.scrollX : t.scrollLeft, o = e ? t.scrollY : t.scrollTop;\n return { x: n, y: o };\n}, pe = (t) => i(t) && t.constructor.name === \"ShadowRoot\" || !1, lo = (t) => t.nodeName === \"HTML\" ? t : l(t) && t.assignedSlot || // step into the shadow DOM of the parent of a slotted node\ni(t) && t.parentNode || // DOM Element detected\npe(t) && t.host || // ShadowRoot detected\nk(t), fe = (t) => {\n if (!l(t)) return !1;\n const { width: e, height: n } = h(t), { offsetWidth: o, offsetHeight: s } = t;\n return Math.round(e) !== o || Math.round(n) !== s;\n}, po = (t, e, n) => {\n const o = l(e), s = h(t, o && fe(e)), c = { x: 0, y: 0 };\n // istanbul ignore else @preserve\n if (o) {\n const a = h(e, !0);\n c.x = a.x + e.clientLeft, c.y = a.y + e.clientTop;\n }\n return {\n x: s.left + n.x - c.x,\n y: s.top + n.y - c.y,\n width: s.width,\n height: s.height\n };\n};\nlet F = 0, H = 0;\nconst b = /* @__PURE__ */ new Map(), me = (t, e) => {\n let n = e ? F : H;\n if (e) {\n const o = me(t), s = b.get(o) || /* @__PURE__ */ new Map();\n b.has(o) || b.set(o, s), I(s) && !s.has(e) ? (s.set(e, n), F += 1) : n = s.get(e);\n } else {\n const o = t.id || t;\n b.has(o) ? n = b.get(o) : (b.set(o, n), H += 1);\n }\n return n;\n}, fo = (t) => {\n var e;\n return t ? G(t) ? t.defaultView : i(t) ? (e = t == null ? void 0 : t.ownerDocument) == null ? void 0 : e.defaultView : t : window;\n}, ge = (t) => Array.isArray(t) || !1, mo = (t) => i(t) && t.nodeName === \"CANVAS\" || !1, ve = (t) => l(t) && !!t.shadowRoot || !1, go = (t) => i(t) && [1, 2, 3, 4, 5, 6, 7, 8].some((e) => t.nodeType === e) || !1, vo = (t) => {\n if (!i(t)) return !1;\n const { top: e, bottom: n } = h(t), { clientHeight: o } = k(t);\n return e <= o && n >= 0;\n}, Eo = (t) => {\n if (!i(t)) return !1;\n const { clientWidth: e, clientHeight: n } = k(t), { top: o, left: s, bottom: c, right: a } = h(t, !0);\n return o >= 0 && s >= 0 && c <= n && a <= e;\n}, bo = (t) => ge(t) && t.every(l) || !1, ho = (t) => typeof t == \"function\" || !1, yo = (t) => v(t) && t.constructor.name === \"HTMLCollection\" || !1, wo = (t) => l(t) && t.tagName === \"IMG\" || !1, Ao = (t) => {\n if (!M(t)) return !1;\n try {\n JSON.parse(t);\n } catch {\n return !1;\n }\n return !0;\n}, So = (t) => v(t) && t.constructor.name === \"WeakMap\" || !1, No = (t) => i(t) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some((e) => t.constructor.name.includes(e)) || !1, Mo = (t) => v(t) && t.constructor.name === \"NodeList\" || !1, To = (t) => k(t).dir === \"rtl\", ko = (t) => i(t) && t.constructor.name.includes(\"SVG\") || !1, Do = (t) => i(t) && [\"TABLE\", \"TD\", \"TH\"].includes(t.nodeName) || !1, Ee = (t, e) => t ? t.closest(e) || // break out of `ShadowRoot`\nEe(t.getRootNode().host, e) : null, Co = (t, e) => l(t) ? t : (i(e) ? e : d()).querySelector(t), be = (t, e) => (i(e) ? e : d()).getElementsByTagName(t), Oo = (t) => [...be(\"*\", t)].filter(ve), Lo = (t, e) => d(e).getElementById(t) || null, Io = (t, e) => (e && i(e) ? e : d()).getElementsByClassName(t), xo = (t, e) => t.matches(e), zo = \"2.0.5\";\nexport {\n Wn as ArrayFrom,\n P as DOMContentLoadedEvent,\n et as DOMMouseScrollEvent,\n L as Data,\n Gn as Float32ArrayFrom,\n Kn as Float64ArrayFrom,\n T as ObjectAssign,\n w as ObjectEntries,\n _n as ObjectFromEntries,\n Yn as ObjectHasOwn,\n Zn as ObjectKeys,\n $n as ObjectValues,\n so as Timer,\n Y as abortEvent,\n Bn as addClass,\n fn as addEventListener,\n Kt as animationDelay,\n Gt as animationDuration,\n D as animationEndEvent,\n U as animationName,\n he as ariaChecked,\n we as ariaDescribedBy,\n ye as ariaDescription,\n Ae as ariaExpanded,\n Se as ariaHasPopup,\n X as ariaHidden,\n Ne as ariaLabel,\n Me as ariaLabelledBy,\n Te as ariaModal,\n ke as ariaPressed,\n De as ariaSelected,\n Oe as ariaValueMax,\n Ce as ariaValueMin,\n Le as ariaValueNow,\n Ie as ariaValueText,\n Z as beforeunloadEvent,\n gn as bezierEasings,\n $ as blurEvent,\n _ as changeEvent,\n Ee as closest,\n tt as contextmenuEvent,\n to as createCustomEvent,\n ee as createElement,\n ne as createElementNS,\n K as dispatchEvent,\n Qn as distinct,\n Pn as documentBody,\n Un as documentElement,\n N as documentHead,\n ze as dragEvent,\n Pe as dragendEvent,\n Be as dragenterEvent,\n Fe as dragleaveEvent,\n He as dragoverEvent,\n Ve as dragstartEvent,\n jn as emulateAnimationEnd,\n qn as emulateTransitionEnd,\n nt as errorEvent,\n Jn as focus,\n ot as focusEvent,\n qe as focusEvents,\n qt as focusableSelector,\n st as focusinEvent,\n ct as focusoutEvent,\n rt as gesturechangeEvent,\n at as gestureendEvent,\n it as gesturestartEvent,\n j as getAttribute,\n On as getAttributeNS,\n h as getBoundingClientRect,\n Oo as getCustomElements,\n d as getDocument,\n ao as getDocumentBody,\n k as getDocumentElement,\n io as getDocumentHead,\n oe as getElementAnimationDelay,\n se as getElementAnimationDuration,\n Lo as getElementById,\n g as getElementStyle,\n ce as getElementTransitionDelay,\n re as getElementTransitionDuration,\n Io as getElementsByClassName,\n be as getElementsByTagName,\n Rn as getInstance,\n uo as getNodeScroll,\n lo as getParentNode,\n po as getRectRelativeToOffsetParent,\n me as getUID,\n fo as getWindow,\n te as hasAttribute,\n Ln as hasAttributeNS,\n Hn as hasClass,\n de as hasFocusTrap,\n An as isApple,\n ge as isArray,\n mo as isCanvas,\n ve as isCustomElement,\n G as isDocument,\n go as isElement,\n vo as isElementInScrollRange,\n Eo as isElementInViewport,\n bo as isElementsArray,\n Sn as isFirefox,\n ho as isFunction,\n yo as isHTMLCollection,\n l as isHTMLElement,\n wo as isHTMLImageElement,\n Ao as isJSON,\n I as isMap,\n No as isMedia,\n wn as isMobile,\n i as isNode,\n Mo as isNodeList,\n ie as isNumber,\n v as isObject,\n To as isRTL,\n ko as isSVGElement,\n fe as isScaledElement,\n pe as isShadowRoot,\n M as isString,\n Do as isTableElement,\n So as isWeakMap,\n q as isWindow,\n Ke as keyAlt,\n Je as keyArrowDown,\n Ye as keyArrowLeft,\n Ze as keyArrowRight,\n Xe as keyArrowUp,\n $e as keyBackspace,\n _e as keyCapsLock,\n tn as keyControl,\n en as keyDelete,\n nn as keyEnter,\n sn as keyEscape,\n cn as keyInsert,\n rn as keyMeta,\n on as keyNumpadEnter,\n an as keyPause,\n un as keyScrollLock,\n ln as keyShift,\n dn as keySpace,\n pn as keyTab,\n Ge as keyboardEventKeys,\n ut as keydownEvent,\n lt as keypressEvent,\n dt as keyupEvent,\n pt as loadEvent,\n Ue as loadstartEvent,\n xo as matches,\n Re as mouseClickEvents,\n Qe as mouseHoverEvents,\n We as mouseSwipeEvents,\n ft as mouseclickEvent,\n mt as mousedblclickEvent,\n gt as mousedownEvent,\n bt as mouseenterEvent,\n Et as mousehoverEvent,\n yt as mouseinEvent,\n ht as mouseleaveEvent,\n St as mousemoveEvent,\n wt as mouseoutEvent,\n At as mouseoverEvent,\n vt as mouseupEvent,\n Nt as mousewheelEvent,\n Mt as moveEvent,\n xe as nativeEvents,\n _t as noop,\n Xn as normalizeOptions,\n B as normalizeValue,\n Q as off,\n vn as offsetHeight,\n En as offsetWidth,\n R as on,\n $t as one,\n Tt as orientationchangeEvent,\n eo as passiveHandler,\n kt as pointercancelEvent,\n Dt as pointerdownEvent,\n Ct as pointerleaveEvent,\n Ot as pointermoveEvent,\n Lt as pointerupEvent,\n Co as querySelector,\n ue as querySelectorAll,\n It as readystatechangeEvent,\n no as reflow,\n zn as removeAttribute,\n Vn as removeAttributeNS,\n Fn as removeClass,\n mn as removeEventListener,\n xt as resetEvent,\n zt as resizeEvent,\n Ht as scrollEvent,\n bn as scrollHeight,\n hn as scrollWidth,\n Vt as selectEvent,\n Bt as selectendEvent,\n Ft as selectstartEvent,\n In as setAttribute,\n xn as setAttributeNS,\n oo as setElementStyle,\n Pt as submitEvent,\n Nn as support3DTransform,\n Dn as supportAnimation,\n Mn as supportPassive,\n kn as supportTouch,\n Tn as supportTransform,\n Cn as supportTransition,\n yn as tabindex,\n ae as toLowerCase,\n co as toUpperCase,\n ro as toggleFocusTrap,\n je as touchEvents,\n Rt as touchcancelEvent,\n Qt as touchendEvent,\n Wt as touchmoveEvent,\n Ut as touchstartEvent,\n Xt as transitionDelay,\n Jt as transitionDuration,\n C as transitionEndEvent,\n W as transitionProperty,\n jt as unloadEvent,\n S as userAgent,\n A as userAgentData,\n zo as version\n};\n//# sourceMappingURL=shorty.mjs.map\n","const e = {}, f = (t) => {\n const { type: c, currentTarget: i } = t;\n [...e[c]].forEach(([n, s]) => {\n /* istanbul ignore else @preserve */\n i === n && [...s].forEach(([o, a]) => {\n o.apply(n, [t]), typeof a == \"object\" && a.once && r(n, c, o, a);\n });\n });\n}, E = (t, c, i, n) => {\n /* istanbul ignore else @preserve */\n e[c] || (e[c] = /* @__PURE__ */ new Map());\n const s = e[c];\n /* istanbul ignore else @preserve */\n s.has(t) || s.set(t, /* @__PURE__ */ new Map());\n const o = s.get(t), { size: a } = o;\n o.set(i, n);\n /* istanbul ignore else @preserve */\n a || t.addEventListener(c, f, n);\n}, r = (t, c, i, n) => {\n const s = e[c], o = s && s.get(t), a = o && o.get(i), d = a !== void 0 ? a : n;\n /* istanbul ignore else @preserve */\n o && o.has(i) && o.delete(i);\n /* istanbul ignore else @preserve */\n s && (!o || !o.size) && s.delete(t);\n /* istanbul ignore else @preserve */\n (!s || !s.size) && delete e[c];\n /* istanbul ignore else @preserve */\n (!o || !o.size) && t.removeEventListener(\n c,\n f,\n d\n );\n}, g = E, M = r;\nexport {\n E as addListener,\n f as globalListener,\n M as off,\n g as on,\n e as registry,\n r as removeListener\n};\n//# sourceMappingURL=event-listener.mjs.map\n","/**\n * Global namespace for most components `fade` class.\n */\nconst fadeClass = \"fade\";\nexport default fadeClass;\n","/**\n * Global namespace for most components `show` class.\n */\nconst showClass = \"show\";\nexport default showClass;\n","/**\n * Global namespace for most components `dismiss` option.\n */\nconst dataBsDismiss = \"data-bs-dismiss\";\nexport default dataBsDismiss;\n","/** @type {string} */\nconst alertString = \"alert\";\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = \"Alert\";\nexport default alertComponent;\n","import { version } from \"../package.json\";\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport {\n Data,\n isHTMLElement,\n isString,\n normalizeOptions,\n ObjectKeys,\n querySelector,\n} from \"@thednp/shorty\";\n\nimport type { BaseOptions } from \"../interface/baseComponent\";\nimport Version from \"../version\";\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options = this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, \"bs\")\n // istanbul ignore next @preserve\n : {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return \"BaseComponent\";\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach((prop) => {\n delete this[prop];\n });\n }\n}\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport alertString from \"../strings/alertString\";\nimport alertComponent from \"../strings/alertComponent\";\nimport type { AlertEvent } from \"../interface/alert\";\n\nimport BaseComponent from \"./base-component\";\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) =>\n getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(\n `close.bs.${alertString}`,\n);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(\n `closed.bs.${alertString}`,\n);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/**\n * Global namespace for most components active class.\n */\nconst activeClass = \"active\";\nexport default activeClass;\n","/**\n * Global namespace for most components `toggle` option.\n */\nconst dataBsToggle = \"data-bs-toggle\";\nexport default dataBsToggle;\n","/** @type {string} */\nconst buttonString = \"button\";\nexport default buttonString;\n","/** @type {string} */\nconst buttonComponent = \"Button\";\nexport default buttonComponent;\n","/* Native JavaScript for Bootstrap 5 | Button\n---------------------------------------------*/\nimport {\n addClass,\n ariaPressed,\n getAttribute,\n getInstance,\n hasClass,\n mouseclickEvent,\n removeClass,\n setAttribute,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport activeClass from \"../strings/activeClass\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport buttonString from \"../strings/buttonString\";\nimport buttonComponent from \"../strings/buttonComponent\";\n\nimport BaseComponent from \"./base-component\";\n\n// BUTTON PRIVATE GC\n// =================\nconst buttonSelector = `[${dataBsToggle}=\"${buttonString}\"]`;\n\n/**\n * Static method which returns an existing `Button` instance associated\n * to a target `Element`.\n */\nconst getButtonInstance = (element: HTMLElement) =>\n getInstance',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) =>\n getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n","/** @type {string} */\nconst scrollspyString = \"scrollspy\";\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = \"ScrollSpy\";\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n getWindow,\n hasClass,\n isHTMLElement,\n isWindow,\n passiveHandler,\n querySelector,\n removeClass,\n scrollEvent,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport activeClass from \"../strings/activeClass\";\nimport scrollspyString from \"../strings/scrollspyString\";\nimport scrollspyComponent from \"../strings/scrollspyComponent\";\n\nimport BaseComponent from \"./base-component\";\nimport { ScrollSpyEvent, ScrollSpyOptions } from \"../interface/scrollspy\";\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) =>\n getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent<\n ScrollSpyEventProps,\n ScrollSpyEvent\n>(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } =\n self;\n const { offset } = options;\n const isWin = isWindow(scrollTarget as Node | Window);\n\n const links = target && getElementsByTagName(\"A\", target);\n const scrollHEIGHT = scrollTarget\n ? getScrollHeight(scrollTarget)\n // istanbul ignore next @preserve\n : scrollHeight;\n\n self.scrollTop = isWin\n ? (scrollTarget as Window).scrollY\n : (scrollTarget as HTMLElement).scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (\n links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)\n ) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n [...links].forEach((link) => {\n href = getAttribute(link, \"href\");\n targetItem = href && href.charAt(0) === \"#\" && href.slice(-1) !== \"#\" &&\n querySelector(href, getDocument(element));\n\n if (targetItem) {\n self.items.push(link);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push(\n (isWin ? rect.top + self.scrollTop : targetItem.offsetTop) - offset,\n );\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: Node | Window) => {\n return isHTMLElement(scrollTarget as Node)\n ? (scrollTarget as HTMLElement).scrollHeight\n : getDocumentElement(scrollTarget as Node).scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return isWindow(scrollTarget as Node)\n ? (scrollTarget as Window).innerHeight\n : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName(\"A\", target)].forEach((item) => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, \"nav\") || hasClass(parentItem, \"dropdown-menu\")) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach((menuItem) => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement | Window;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(\n target: HTMLElement | string,\n config?: Partial,\n ) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(\n options.target as HTMLElement | string,\n getDocument(element),\n );\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight\n ? element\n : getWindow(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // add event handlers\n this._toggleEventListeners(true);\n\n this.refresh();\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === \"undefined\" || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /**\n * Toggles on/off the component event listener.\n *\n * @param add when `true`, listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(\n this.scrollTarget as EventTarget,\n scrollEvent,\n this.refresh,\n passiveHandler,\n );\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst tabString = \"tab\";\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = \"Tab\";\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport collapsingClass from \"../strings/collapsingClass\";\nimport activeClass from \"../strings/activeClass\";\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dropdownClasses from \"../strings/dropdownClasses\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport tabString from \"../strings/tabString\";\nimport tabComponent from \"../strings/tabComponent\";\n\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport type { /* TabOptions, */ TabEvent } from \"../interface/tab\";\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) =>\n getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(\n `show.bs.${tabString}`,\n);\nconst shownTabEvent = createCustomEvent(\n `shown.bs.${tabString}`,\n);\nconst hideTabEvent = createCustomEvent(\n `hide.bs.${tabString}`,\n);\nconst hiddenTabEvent = createCustomEvent(\n `hidden.bs.${tabString}`,\n);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = \"\";\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null };\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) ||\n // istanbul ignore next @preserve\n { currentHeight: 0, nextHeight: 0 };\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null, content: null };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, \"overflow-hidden\");\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight // istanbul ignore next @preserve\n : 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, \"overflow-hidden\");\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (\n self: Tab,\n): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (\n activeTabs.length === 1 &&\n !dropdownClasses.some((c) =>\n hasClass(activeTabs[0].parentElement as HTMLElement, c)\n )\n ) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement)\n ? getTargetElement(tab as HTMLElement)\n : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(\",.\")}`);\n return dropdown\n ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown)\n : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, \".nav\");\n const container = closest(content, \".tab-content\");\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, \"false\");\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (\n content &&\n (hasClass(content, fadeClass) ||\n (nextContent && hasClass(nextContent, fadeClass)))\n ) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst toastString = \"toast\";\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = \"Toast\";\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport toastString from \"../strings/toastString\";\nimport toastComponent from \"../strings/toastComponent\";\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport { ToastEvent, ToastOptions } from \"../interface/toast\";\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = \"showing\";\n/** @deprecated */\nconst hideClass = \"hide\";\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) =>\n getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(\n `show.bs.${toastString}`,\n);\nconst shownToastEvent = createCustomEvent, ToastEvent>(\n `shown.bs.${toastString}`,\n);\nconst hideToastEvent = createCustomEvent, ToastEvent>(\n `hide.bs.${toastString}`,\n);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(\n `hidden.bs.${toastString}`,\n);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === \"A\") e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (\n self && element !== relatedTarget &&\n !element.contains(relatedTarget as Node)\n ) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [\n ...querySelectorAll(toastToggleSelector, getDocument(element)),\n ].filter(\n (btn) => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(\n (e) => action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach((btn) =>\n action(btn, mouseclickEvent, toastClickHandler)\n );\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n","import { Data, getElementsByTagName, matches } from \"@thednp/shorty\";\n\nimport { addListener } from \"@thednp/event-listener\";\n\nimport Alert from \"../components/alert\";\nimport Button from \"../components/button\";\nimport Carousel from \"../components/carousel\";\nimport Collapse from \"../components/collapse\";\nimport Dropdown from \"../components/dropdown\";\nimport Modal from \"../components/modal\";\nimport Offcanvas from \"../components/offcanvas\";\nimport Popover from \"../components/popover\";\nimport ScrollSpy from \"../components/scrollspy\";\nimport Tab from \"../components/tab\";\nimport Toast from \"../components/toast\";\nimport Tooltip from \"../components/tooltip\";\n\nconst componentsList = new Map<\n string,\n | typeof Alert\n | typeof Button\n | typeof Carousel\n | typeof Collapse\n | typeof Dropdown\n | typeof Modal\n | typeof Offcanvas\n | typeof Popover\n | typeof ScrollSpy\n | typeof Tab\n | typeof Toast\n | typeof Tooltip\n>();\n\ntype Component =\n | Alert\n | Button\n | Carousel\n | Collapse\n | Dropdown\n | Modal\n | Offcanvas\n | Popover\n | ScrollSpy\n | Tab\n | Toast\n | Tooltip;\n\n[\n Alert,\n Button,\n Carousel,\n Collapse,\n Dropdown,\n Modal,\n Offcanvas,\n Popover,\n ScrollSpy,\n Tab,\n Toast,\n Tooltip,\n].forEach((c) => componentsList.set(c.prototype.name, c));\n\n/**\n * Initialize all matched `Element`s for one component.\n *\n * @param callback\n * @param collection\n */\nconst initComponentDataAPI = (\n callback: (el: HTMLElement) => Component,\n collection: HTMLCollectionOf | HTMLElement[],\n) => {\n [...collection].forEach((x) => callback(x));\n};\n\n/**\n * Remove one component from a target container element or all in the page.\n *\n * @param component the component name\n * @param context parent `Node`\n */\nconst removeComponentDataAPI = (component: string, context: ParentNode) => {\n const compData = Data.getAllFor(component) as Map;\n\n if (compData) {\n [...compData].forEach(([element, instance]) => {\n if (context.contains(element)) {\n (instance as T & { dispose: () => void }).dispose();\n }\n });\n }\n};\n\n/**\n * Initialize all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const initCallback = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n const elemCollection = [...getElementsByTagName(\"*\", lookUp)];\n\n componentsList.forEach((cs) => {\n const { init, selector } = cs;\n initComponentDataAPI(\n init,\n elemCollection.filter((item) => matches(item, selector)),\n );\n });\n};\n\n/**\n * Remove all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const removeDataAPI = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n\n componentsList.forEach((comp) => {\n removeComponentDataAPI(comp.prototype.name, lookUp);\n });\n};\n\n// Bulk initialize all components\nif (document.body) initCallback();\nelse {\n addListener(document, \"DOMContentLoaded\", () => initCallback(), {\n once: true,\n });\n}\n"],"names":["we","Ae","X","Te","ke","De","P","ot","st","ct","ut","dt","ft","gt","Et","bt","ht","Dt","Ot","Lt","zt","Ht","Ut","Ve","qt","Je","Xe","Ye","Ze","sn","Jt","Xt","C","W","Yt","A","Zt","S","z","V","An","N","R","e","n","o","s","Q","$t","c","_t","j","te","In","zn","Bn","Fn","Hn","v","i","l","E","L","Rn","M","q","G","d","T","ee","K","g","ce","re","qn","a","u","Jn","B","w","ae","Xn","p","f","y","J","Zn","to","eo","no","oo","I","ie","m","so","ue","x","le","de","ro","h","ao","k","pe","lo","F","H","b","me","fo","ge","vo","ho","Mo","To","Do","Ee","Co","be","Io","xo","r","fadeClass","showClass","dataBsDismiss","alertString","alertComponent","Version","version","BaseComponent","target","config","__publicField","element","isHTMLElement","isString","querySelector","prevInstance","Data","ObjectKeys","normalizeOptions","prop","alertSelector","alertDismissSelector","getAlertInstance","getInstance","alertInitCallback","Alert","closeAlertEvent","createCustomEvent","closedAlertEvent","alertTransitionEnd","self","dispatchEvent","hasClass","removeClass","emulateTransitionEnd","add","action","addListener","removeListener","dismiss","close","mouseclickEvent","activeClass","dataBsToggle","buttonString","buttonComponent","buttonSelector","getButtonInstance","buttonInitCallback","Button","isActive","getAttribute","addClass","setAttribute","ariaPressed","dataBsTarget","carouselString","carouselComponent","dataBsParent","dataBsContainer","getTargetElement","targetAttr","doc","getDocument","att","attValue","closest","carouselSelector","carouselItem","dataBsSlideTo","dataBsSlide","pausedClass","carouselDefaults","getCarouselInstance","carouselInitCallback","Carousel","startX","currentX","endX","carouselSlideEvent","carouselSlidEvent","carouselTransitionEndHandler","index","direction","slides","options","activeItem","getActiveIndex","orientation","directionClass","Timer","carouselPauseHandler","carouselResumeHandler","carouselIndicatorHandler","newIndex","carouselControlsHandler","carouselKeyHandler","code","querySelectorAll","isElementInScrollRange","RTL","isRTL","arrowKeyNext","keyArrowLeft","keyArrowRight","arrowKeyPrev","carouselDragHandler","carouselPointerDownHandler","controls","indicators","el","toggleCarouselTouchHandlers","carouselPointerMoveHandler","carouselPointerUpHandler","_a","activateCarouselIndicator","pointermoveEvent","passiveHandler","pointerupEvent","touch","pause","interval","keyboard","mouseenterEvent","mouseleaveEvent","pointerdownEvent","touchstartEvent","dragstartEvent","arrow","indicator","keydownEvent","getElementsByClassName","activeIndex","transitionItem","matches","ar","isPaused","idx","next","eventProperties","ObjectAssign","getElementTransitionDuration","reflow","isAnimating","clone","collapsingClass","collapseString","collapseComponent","collapseSelector","collapseToggleSelector","collapseDefaults","getCollapseInstance","collapseInitCallback","Collapse","showCollapseEvent","shownCollapseEvent","hideCollapseEvent","hiddenCollapseEvent","expandCollapse","parent","triggers","noop","setElementStyle","btn","ariaExpanded","collapseContent","collapseClickHandler","trigger","activeCollapse","activeCollapseInstance","dropdownMenuClasses","dropdownComponent","dropdownMenuClass","isEmptyAnchor","parentAnchor","hasAttribute","dropdownString","dropupString","dropstartString","dropendString","dropdownClasses","dropdownSelector","getDropdownInstance","dropdownInitCallback","Dropdown","dropdownMenuEndClass","verticalClass","horizontalClass","menuFocusTags","dropdownDefaults","showDropdownEvent","shownDropdownEvent","hideDropdownEvent","hiddenDropdownEvent","updatedDropdownEvent","styleDropdown","menu","parentElement","offset","getElementStyle","menuEnd","style","positionClass","dropdownMargin","dropdownPosition","menuWidth","menuHeight","clientWidth","clientHeight","getDocumentElement","targetLeft","targetTop","targetWidth","targetHeight","getBoundingClientRect","leftFullExceed","rightFullExceed","bottomExceed","bottomFullExceed","topExceed","leftExceed","rightExceed","posAjust","margins","getMenuItems","firstElementChild","toggleDropdownDismiss","dropdownDismissHandler","focusEvent","dropdownPreventScroll","keyupEvent","dropdownKeyHandler","scrollEvent","resizeEvent","ev","getWindow","dropdownLayoutHandler","getCurrentOpenDropdown","currentParent","type","isForm","mousedownEvent","dropdownClickHandler","keyArrowDown","keyArrowUp","activeElement","open","menuItems","focus","keyEscape","currentElement","currentInstance","modalString","modalComponent","offcanvasComponent","fixedTopClass","fixedBottomClass","stickyTopClass","positionStickyClass","getFixedItems","resetScrollbar","bd","getDocumentBody","fixedItems","fixed","measureScrollbar","innerWidth","setScrollbar","overflow","bodyPad","sbWidth","itemPadValue","itemMValue","offcanvasString","popupContainer","createElement","appendPopup","customContainer","containerIsBody","isNode","lookup","BODY","removePopup","hasPopup","backdropString","modalBackdropClass","offcanvasBackdropClass","modalActiveSelector","offcanvasActiveSelector","overlay","getCurrentOpen","toggleOverlayType","isModal","targetClass","appendOverlay","hasFade","showOverlay","hideOverlay","removeOverlay","isVisible","modalSelector","modalToggleSelector","modalDismissSelector","modalStaticClass","modalDefaults","getModalInstance","modalInitCallback","Modal","showModalEvent","shownModalEvent","hideModalEvent","hiddenModalEvent","setModalScrollbar","scrollbarWidth","scrollHeight","modalHeight","modalScrollHeight","modalOverflow","padStyle","toggleModalDismiss","update","modalDismissHandler","modalKeyHandler","afterModalHide","relatedTarget","focusElement","toggleFocusTrap","afterModalShow","beforeModalShow","removeAttribute","ariaHidden","ariaModal","beforeModalHide","modalClickHandler","_b","currentTarget","isStatic","modalDialog","backdrop","selectedText","targetInsideDialog","staticTransitionEnd","duration","overlayDelay","currentOpen","that","callback","offcanvasSelector","offcanvasToggleSelector","offcanvasDismissSelector","offcanvasTogglingClass","offcanvasDefaults","getOffcanvasInstance","offcanvasInitCallback","Offcanvas","showOffcanvasEvent","shownOffcanvasEvent","hideOffcanvasEvent","hiddenOffcanvasEvent","setOffCanvasScrollbar","toggleOffCanvasDismiss","offcanvasKeyDismissHandler","offcanvasDismissHandler","beforeOffcanvasShow","showOffcanvasComplete","beforeOffcanvasHide","hideOffcanvasComplete","offcanvasTriggerHandler","offCanvasDismiss","selection","visibleTrigger","isOpen","popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","body","tipClassPositions","styleTip","tipClasses","tooltip","container","tipPositions","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","placement","parentCWidth","parentOWidth","fixedParent","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","horizontals","verticals","updatedTooltipEvent","toLowerCase","tooltipDefaults","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","dirty","isFunction","tempDocument","isNodeList","isArray","createTip","id","title","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","tooltipHeader","tooltipBody","tempTitle","tempContent","tempBtn","getElementContainer","majorBlockTags","containers","parentNode","getParentNode","isShadowRoot","isTableElement","tooltipSelector","titleAttr","getTooltipInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","ariaDescribedBy","hasTip","disposeTooltipComplete","toggleTooltipTitle","toggleTooltipAction","tooltipShownAction","shownTooltipEvent","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","offsetHeight","parentModal","parentOffcanvas","win","scrollTarget","titleAtt","tr","mousehoverEvent","focusinEvent","focusoutEvent","isApple","tipComponent","elem","getUID","position","outTimer","tipContainer","showTooltipEvent","delay","hideTooltipEvent","enabled","popoverSelector","popoverDefaults","getPopoverInstance","popoverInitCallback","Popover","scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","updateSpyTargets","itemsLength","isWin","isWindow","links","getElementsByTagName","scrollHEIGHT","getScrollHeight","href","targetItem","rect","getOffsetHeight","link","clear","item","activate","parents","parentItem","menuItem","parentLink","scrollTop","maxScroll","items","newActiveItem","offsets","tabString","tabComponent","tabSelector","getTabInstance","tabInitCallback","Tab","showTabEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","tabContent","nav","triggerTabShow","nextContent","tab","currentHeight","nextHeight","triggerTabHide","getActiveTab","activeTabs","getParentDropdown","dropdown","tabClickHandler","firstTab","firstTabContent","ariaSelected","activeDropdown","toggleTab","toastString","toastComponent","toastSelector","toastDismissSelector","toastToggleSelector","showingClass","hideClass","toastDefaults","getToastInstance","toastInitCallback","Toast","showToastEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","hideToastComplete","hideToast","showToast","toastClickHandler","interactiveToastHandler","isShown","hide","componentsList","initComponentDataAPI","collection","removeComponentDataAPI","component","context","compData","instance","initCallback","lookUp","elemCollection","cs","init","selector","removeDataAPI","comp"],"mappings":";;;AAAK,MAA+CA,KAAK,oBAAoBC,KAAK,iBAAuCC,KAAI,eAA0DC,KAAK,cAAcC,KAAK,gBAAgBC,KAAK,iBAAyLC,KAAI,oBAAyDC,KAAK,SAASC,KAAK,WAAWC,KAAK,YAA0EC,KAAK,WAA4BC,KAAK,SAAsBC,IAAK,SAA0BC,KAAK,aAA6BC,KAAK,SAASC,KAAK,cAAcC,KAAK,cAAmKC,KAAK,eAAoCC,KAAK,eAAeC,KAAK,aAAoDC,KAAK,UAA+DC,KAAK,UAAyBC,KAAK,cAmD1lCC,KAAK,aAauBC,KAAK,qFAuClCC,KAAK,aAAaC,KAAK,WAAWC,KAAK,aAAaC,KAAK,cAAkHC,KAAK,UAAyMC,KAAK,sBAAsBC,KAAK,mBAAmBC,KAAI,iBAAiBC,KAAI,sBA0B9WC,KAAK,UAAU,eAAeC,KAAID,IAAI,EAAE,WAAWE,GAAE,IAAK,WAAWC,KAAID,IAAIE,KAAI;AAEvL;AACAH,KAAQA,GAAE,OAAO,KAAK,CAAC,MAAMG,GAAE,KAAK,EAAE,KAAK,CAAC,IAAQA,GAAE,KAAKD,EAAC;AACvD,MAASE,KAAI,sBAAsBC,KAAKL,KAAIA,GAAE,OAAO,KAAK,CAAC,MAAMI,GAAE,KAAK,EAAE,KAAK,CAAC;AAAA;AAAA,EAEnFA,GAAE,KAAKF,EAAC;AAAA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AM6E,CAAQ,CAAC;AAAA,IAAA;AAAA,EACzD,CACD;AACH,GAOaC,KAAgB,CAACT,MAAyB;AACrD,QAAMI,IAASJ,KAAWA,EAAQ,WAAWA,IAAU;AAExC,EAAAL,GAAA,QAAQ,CAACe,MAAS;AACR,IAAAZ,GAAAY,EAAK,UAAU,MAAMN,CAAM;AAAA,EAAA,CACnD;AACH;AAGI,SAAS,OAAmBD,OAE9B3iB,EAAY,UAAU,oBAAoB,MAAM2iB,GAAA,GAAgB;AAAA,EAC9D,MAAM;AAAA,CACP;","x_google_ignoreList":[0,1]} \ No newline at end of file diff --git a/dist/components/activeClass-CxJYQAGN.js.map b/dist/components/activeClass-CxJYQAGN.js.map index 7c40c835..95220714 100644 --- a/dist/components/activeClass-CxJYQAGN.js.map +++ b/dist/components/activeClass-CxJYQAGN.js.map @@ -1 +1 @@ -{"version":3,"file":"activeClass-CxJYQAGN.js","sources":["../../src/strings/activeClass.ts"],"sourcesContent":["/**\n * Global namespace for most components active class.\n */\nconst activeClass = 'active';\nexport default activeClass;\n"],"names":["activeClass"],"mappings":"aAGA,MAAMA,EAAc"} \ No newline at end of file +{"version":3,"file":"activeClass-CxJYQAGN.js","sources":["../../src/strings/activeClass.ts"],"sourcesContent":["/**\n * Global namespace for most components active class.\n */\nconst activeClass = \"active\";\nexport default activeClass;\n"],"names":["activeClass"],"mappings":"aAGA,MAAMA,EAAc"} \ No newline at end of file diff --git a/dist/components/activeClass-iqaD75Su.mjs.map b/dist/components/activeClass-iqaD75Su.mjs.map index 751e8a9b..6f437bb4 100644 --- a/dist/components/activeClass-iqaD75Su.mjs.map +++ b/dist/components/activeClass-iqaD75Su.mjs.map @@ -1 +1 @@ -{"version":3,"file":"activeClass-iqaD75Su.mjs","sources":["../../src/strings/activeClass.ts"],"sourcesContent":["/**\n * Global namespace for most components active class.\n */\nconst activeClass = 'active';\nexport default activeClass;\n"],"names":["activeClass"],"mappings":"AAGA,MAAMA,IAAc;"} \ No newline at end of file +{"version":3,"file":"activeClass-iqaD75Su.mjs","sources":["../../src/strings/activeClass.ts"],"sourcesContent":["/**\n * Global namespace for most components active class.\n */\nconst activeClass = \"active\";\nexport default activeClass;\n"],"names":["activeClass"],"mappings":"AAGA,MAAMA,IAAc;"} \ No newline at end of file diff --git a/dist/components/alert.cjs.map b/dist/components/alert.cjs.map index 45555447..d163aca6 100644 --- a/dist/components/alert.cjs.map +++ b/dist/components/alert.cjs.map @@ -1 +1 @@ -{"version":3,"file":"alert.cjs","sources":["../../src/strings/alertString.ts","../../src/strings/alertComponent.ts","../../src/components/alert.ts"],"sourcesContent":["/** @type {string} */\nconst alertString = 'alert';\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = 'Alert';\nexport default alertComponent;\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport fadeClass from '../strings/fadeClass';\nimport showClass from '../strings/showClass';\nimport dataBsDismiss from '../strings/dataBsDismiss';\nimport alertString from '../strings/alertString';\nimport alertComponent from '../strings/alertComponent';\nimport type { AlertEvent } from '../interface/alert';\n\nimport BaseComponent from './base-component';\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) => getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(`close.bs.${alertString}`);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(`closed.bs.${alertString}`);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n"],"names":["alertString","alertComponent","alertSelector","alertDismissSelector","dataBsDismiss","getAlertInstance","element","getInstance","alertInitCallback","Alert","closeAlertEvent","createCustomEvent","closedAlertEvent","alertTransitionEnd","self","dispatchEvent","BaseComponent","target","__publicField","hasClass","showClass","removeClass","fadeClass","emulateTransitionEnd","add","action","addListener","removeListener","dismiss","close","mouseclickEvent","querySelector"],"mappings":"oZACMA,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5DEiB,EADmBT,EACZ,WAAWP,GAClBgB,EAFmBT,EAEZ,OAAOD,GACdU,EAHmBT,EAGZ,cAAcJ"} \ No newline at end of file +{"version":3,"file":"alert.cjs","sources":["../../src/strings/alertString.ts","../../src/strings/alertComponent.ts","../../src/components/alert.ts"],"sourcesContent":["/** @type {string} */\nconst alertString = \"alert\";\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = \"Alert\";\nexport default alertComponent;\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport alertString from \"../strings/alertString\";\nimport alertComponent from \"../strings/alertComponent\";\nimport type { AlertEvent } from \"../interface/alert\";\n\nimport BaseComponent from \"./base-component\";\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) =>\n getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(\n `close.bs.${alertString}`,\n);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(\n `closed.bs.${alertString}`,\n);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n"],"names":["alertString","alertComponent","alertSelector","alertDismissSelector","dataBsDismiss","getAlertInstance","element","getInstance","alertInitCallback","Alert","closeAlertEvent","createCustomEvent","closedAlertEvent","alertTransitionEnd","self","dispatchEvent","BaseComponent","target","__publicField","hasClass","showClass","removeClass","fadeClass","emulateTransitionEnd","add","action","addListener","removeListener","dismiss","close","mouseclickEvent","querySelector"],"mappings":"oZACMA,EAAc,QCAdC,EAAiB,QCyBjBC,EAAgB,IAAIF,CAAW,GAC/BG,EAAuB,IAAIC,EAAAA,aAAa,KAAKJ,CAAW,KAMxDK,EAAoBC,GACxBC,EAAA,YAAmBD,E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..9cb314b8 100644 --- a/dist/components/alert.d.ts +++ b/dist/components/alert.d.ts @@ -1,5 +1,5 @@ export interface BaseOptions { - [key: string]: any; + [key: string]: unknown; } declare class BaseComponent { element: HTMLElement; diff --git a/dist/components/alert.mjs b/dist/components/alert.mjs index 651a5d39..4407b3a2 100644 --- a/dist/components/alert.mjs +++ b/dist/components/alert.mjs @@ -6,8 +6,12 @@ import { addListener as S, removeListener as _ } from "@thednp/event-listener"; import { f as b } from "./fadeClass-CLIYI_zn.mjs"; import { s as c } from "./showClass-C8hdJfjQ.mjs"; import { d as B } from "./dataBsDismiss-DdNPQYa-.mjs"; -import { B as k } from "./base-component-nXu3wApu.mjs"; -const i = "alert", g = "Alert", w = `.${i}`, x = `[${B}="${i}"]`, A = (t) => I(t, g), D = (t) => new n(t), l = d(`close.bs.${i}`), T = d(`closed.bs.${i}`), m = (t) => { +import { B as k } from "./base-component-DHbs0JQk.mjs"; +const i = "alert", g = "Alert", w = `.${i}`, x = `[${B}="${i}"]`, A = (t) => I(t, g), D = (t) => new n(t), l = d( + `close.bs.${i}` +), T = d( + `closed.bs.${i}` +), m = (t) => { const { element: s } = t; p(s, T), t._toggleEventListeners(), t.dispose(), s.remove(); }; diff --git a/dist/components/alert.mjs.map b/dist/components/alert.mjs.map index cf18b81d..3f90db5f 100644 --- a/dist/components/alert.mjs.map +++ b/dist/components/alert.mjs.map @@ -1 +1 @@ -{"version":3,"file":"alert.mjs","sources":["../../src/strings/alertString.ts","../../src/strings/alertComponent.ts","../../src/components/alert.ts"],"sourcesContent":["/** @type {string} */\nconst alertString = 'alert';\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = 'Alert';\nexport default alertComponent;\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport fadeClass from '../strings/fadeClass';\nimport showClass from '../strings/showClass';\nimport dataBsDismiss from '../strings/dataBsDismiss';\nimport alertString from '../strings/alertString';\nimport alertComponent from '../strings/alertComponent';\nimport type { AlertEvent } from '../interface/alert';\n\nimport BaseComponent from './base-component';\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) => getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(`close.bs.${alertString}`);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(`closed.bs.${alertString}`);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n"],"names":["alertString","alertComponent","alertSelector","alertDismissSelector","dataBsDismiss","getAlertInstance","element","getInstance","alertInitCallback","Alert","closeAlertEvent","createCustomEvent","closedAlertEvent","alertTransitionEnd","self","dispatchEvent","BaseComponent","target","__publicField","hasClass","showClass","removeClass","fadeClass","emulateTransitionEnd","add","action","addListener","removeListener","dismiss","close","mouseclickEvent","querySelector"],"mappings":";;;;;;;;;AACA,MAAMA,IAAc,SCAdC,IAAiB,SCyBjBC,IAAgB,IAAIF,CAAW,IAC/BG,IAAuB,IAAIC,CAAa,KAAKJ,CAAW,MAMxDK,IAAmB,CAACC,MAAyBC,EAAmBD,GAASL,CAAc,GAKvFO,IAAoB,CAACF,MAAyB,IAAIG,EAAMH,CAAO,GAI/DI,IAAkBC,EAAqD,YAAYX,CAAW,EAAE,GAChGY,IAAmBD,EAAqD,aAAaX,CAAW,EAAE,GASlGa,IAAqB,CAACC,MAAgB;AACpC,QAAA,EAAE,SAAAR,EAAY,IAAAQ;AACpB,EAAAC,EAAcT,GAASM,CAAgB,GAEvCE,EAAK,sBAAsB,GAC3BA,EAAK,QAAQ,GACbR,EAAQ,OAAO;AACjB;AAKA,MAAqBG,UAAcO,EAAc;AAAA,EAM/C,YAAYC,GAA8B;AACxC,UAAMA,CAAM;AAHd,IAAAC,EAAA;AAwBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,EAAA,eAAQ,MAAM;AACN,YAAA,EAAE,SAAAZ,EAAY,IAAA;AAAA,MAAA;AAGpB,MAAIA,KAAWa,EAASb,GAASc,CAAS,MACxCL,EAAcT,GAASI,CAAe,GAEjCA,EAAgB,qBACnBW,EAAYf,GAASc,CAAS,GAE1BD,EAASb,GAASgB,CAAS,IAC7BC,EAAqBjB,GAAS,MAAMO,EAAmB,IAAI,CAAC,MACpC,IAAI;AAAA,IAElC;AAOF;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAK,EAAA,+BAAwB,CAACM,MAAkB;AACnC,YAAAC,IAASD,IAAME,IAAcC,GAC7B,EAAE,SAAAC,GAAS,OAAAC,EAAU,IAAA;AAAA,MAAA;AAE3B,MAAID,KAASH,EAAOG,GAASE,GAAiBD,CAAK;AAAA,IAAA;AA3CnD,SAAK,UAAUE,EAAc5B,GAAsB,KAAK,OAAO,GAG/D,KAAK,sBAAsB,EAAI;AAAA,EACjC;AAAA;AAAA,EAGA,IAAI,OAAO;AACF,WAAAF;AAAA,EACT;AAAA;AAAA,EAsCA,UAAU;AACR,SAAK,sBAAsB,GAC3B,MAAM,QAAQ;AAAA,EAChB;AACF;AA5DEiB,EADmBT,GACZ,YAAWP,IAClBgB,EAFmBT,GAEZ,QAAOD,IACdU,EAHmBT,GAGZ,eAAcJ;"} \ No newline at end of file +{"version":3,"file":"alert.mjs","sources":["../../src/strings/alertString.ts","../../src/strings/alertComponent.ts","../../src/components/alert.ts"],"sourcesContent":["/** @type {string} */\nconst alertString = \"alert\";\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = \"Alert\";\nexport default alertComponent;\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport alertString from \"../strings/alertString\";\nimport alertComponent from \"../strings/alertComponent\";\nimport type { AlertEvent } from \"../interface/alert\";\n\nimport BaseComponent from \"./base-component\";\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) =>\n getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(\n `close.bs.${alertString}`,\n);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(\n `closed.bs.${alertString}`,\n);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n"],"names":["alertString","alertComponent","alertSelector","alertDismissSelector","dataBsDismiss","getAlertInstance","element","getInstance","alertInitCallback","Alert","closeAlertEvent","createCustomEvent","closedAlertEvent","alertTransitionEnd","self","dispatchEvent","BaseComponent","target","__publicField","hasClass","showClass","removeClass","fadeClass","emulateTransitionEnd","add","action","addListener","removeListener","dismiss","close","mouseclickEvent","querySelector"],"mappings":";;;;;;;;;AACA,MAAMA,IAAc,SCAdC,IAAiB,SCyBjBC,IAAgB,IAAIF,CAAW,IAC/BG,IAAuB,IAAIC,CAAa,KAAKJ,CAAW,MAMxDK,IAAmB,CAACC,MACxBC,EAAmBD,GAASL,CAAc,GAKtCO,IAAoB,CAACF,MAAyB,IAAIG,EAAMH,CAAO,GAI/DI,IAAkBC;AAAA,EACtB,YAAYX,CAAW;AACzB,GACMY,IAAmBD;AAAA,EACvB,aAAaX,CAAW;AAC1B,GASMa,IAAqB,CAACC,MAAgB;AACpC,QAAA,EAAE,SAAAR,EAAY,IAAAQ;AACpB,EAAAC,EAAcT,GAASM,CAAgB,GAEvCE,EAAK,sBAAsB,GAC3BA,EAAK,QAAQ,GACbR,EAAQ,OAAO;AACjB;AAKA,MAAqBG,UAAcO,EAAc;AAAA,EAM/C,YAAYC,GAA8B;AACxC,UAAMA,CAAM;AAHd,IAAAC,EAAA;AAwBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,EAAA,eAAQ,MAAM;AACN,YAAA,EAAE,SAAAZ,EAAY,IAAA;AAAA,MAAA;AAGpB,MAAIA,KAAWa,EAASb,GAASc,CAAS,MACxCL,EAAcT,GAASI,CAAe,GAEjCA,EAAgB,qBACnBW,EAAYf,GAASc,CAAS,GAE1BD,EAASb,GAASgB,CAAS,IAC7BC,EAAqBjB,GAAS,MAAMO,EAAmB,IAAI,CAAC,MACpC,IAAI;AAAA,IAElC;AAOF;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAK,EAAA,+BAAwB,CAACM,MAAkB;AACnC,YAAAC,IAASD,IAAME,IAAcC,GAC7B,EAAE,SAAAC,GAAS,OAAAC,EAAU,IAAA;AAAA,MAAA;AAE3B,MAAID,KAASH,EAAOG,GAASE,GAAiBD,CAAK;AAAA,IAAA;AA3CnD,SAAK,UAAUE,EAAc5B,GAAsB,KAAK,OAAO,GAG/D,KAAK,sBAAsB,EAAI;AAAA,EACjC;AAAA;AAAA,EAGA,IAAI,OAAO;AACF,WAAAF;AAAA,EACT;AAAA;AAAA,EAsCA,UAAU;AACR,SAAK,sBAAsB,GAC3B,MAAM,QAAQ;AAAA,EAChB;AACF;AA5DEiB,EADmBT,GACZ,YAAWP,IAClBgB,EAFmBT,GAEZ,QAAOD,IACdU,EAHmBT,GAGZ,eAAcJ;"} \ No newline at end of file diff --git a/dist/components/base-component-DBcDoOjV.js.map b/dist/components/base-component-DBcDoOjV.js.map index b9152923..7c3124be 100644 --- a/dist/components/base-component-DBcDoOjV.js.map +++ b/dist/components/base-component-DBcDoOjV.js.map @@ -1 +1 @@ -{"version":3,"file":"base-component-DBcDoOjV.js","sources":["../../src/version.ts","../../src/components/base-component.ts"],"sourcesContent":["import { version } from '../package.json';\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport { Data, isHTMLElement, isString, normalizeOptions, ObjectKeys, querySelector } from '@thednp/shorty';\n\nimport type { BaseOptions } from '../interface/baseComponent';\nimport Version from '../version';\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options =\n this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, 'bs')\n : // istanbul ignore next @preserve\n {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return 'BaseComponent';\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach(prop => {\n delete this[prop];\n });\n }\n}\n"],"names":["Version","version","BaseComponent","target","config","__publicField","element","isHTMLElement","isString","querySelector","e","prevInstance","Data","ObjectKeys","normalizeOptions","prop"],"mappings":"8NAEMA,EAAUC,ECMhB,MAAqBC,CAAc,CAQjC,YAAYC,EAA8BC,EAAsB,CAoDhEC,EAAA,6BAAwB,IAAM,CAAA,GAnDxB,IAAAC,EAEA,GAAA,CACE,GAAAC,EAAAA,cAAcJ,CAAM,EACZG,EAAAH,UACDK,EAAAA,SAASL,CAAM,EAAG,CAC3BG,EAAUG,EAAAA,cAA2BN,CAAM,EAAA;AAE3C,GAAI,CAACG,EAAS,MAAM,MAAM,IAAIH,CAAM,4BAA4B,CAAA,KAEhE,OAAM,MAAM,gDAAgD,QAEvDO,EAAG,CACV,MAAM,MAAM,GAAG,KAAK,IAAI,WAAYA,EAAY,OAAO,EAAE,CAC3D,CAEA,MAAMC,EAAeC,EAAAA,KAAK,IAAiBN,EAAS,KAAK,IAAI,EAAA;AAEzDK,GAGFA,EAAa,sBAAsB,EAGrC,KAAK,QAAUL,EACf,KAAK,QACH,KAAK,UAAYO,EAAA,WAAW,KAAK,QAAQ,EAAE,OACvCC,EAAA,iBAAiBR,EAAS,KAAK,SAAUF,GAAU,GAAI,IAAI,EAE3D,CAAC,EAEPQ,EAAA,KAAK,IAAIN,EAAS,KAAK,KAAM,IAAI,CACnC,CAGA,IAAI,SAAU,CACL,OAAAN,CACT,CAGA,IAAI,MAAO,CACF,MAAA,eACT,CAGA,IAAI,UAAW,CACb,MAAO,EACT,CASA,SAAU,CACRY,EAAA,KAAK,OAAoB,KAAK,QAAS,KAAK,IAAI,EACrCC,EAAAA,WAAA,IAAI,EAAE,QAAgBE,GAAA,CAC/B,OAAO,KAAKA,CAAI,CAAA,CACjB,CACH,CACF"} \ No newline at end of file +{"version":3,"file":"base-component-DBcDoOjV.js","sources":["../../src/version.ts","../../src/components/base-component.ts"],"sourcesContent":["import { version } from \"../package.json\";\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport {\n Data,\n isHTMLElement,\n isString,\n normalizeOptions,\n ObjectKeys,\n querySelector,\n} from \"@thednp/shorty\";\n\nimport type { BaseOptions } from \"../interface/baseComponent\";\nimport Version from \"../version\";\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options = this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, \"bs\")\n // istanbul ignore next @preserve\n : {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return \"BaseComponent\";\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach((prop) => {\n delete this[prop];\n });\n }\n}\n"],"names":["Version","version","BaseComponent","target","config","__publicField","element","isHTMLElement","isString","querySelector","e","prevInstance","Data","ObjectKeys","normalizeOptions","prop"],"mappings":"8NAEMA,EAAUC,ECahB,MAAqBC,CAAc,CAQjC,YAAYC,EAA8BC,EAAsB,CAmDhEC,EAAA,6BAAwB,IAAM,CAAA,GAlDxB,IAAAC,EAEA,GAAA,CACE,GAAAC,EAAAA,cAAcJ,CAAM,EACZG,EAAAH,UACDK,EAAAA,SAASL,CAAM,EAAG,CAC3BG,EAAUG,EAAAA,cAA2BN,CAAM,EAAA;AAE3C,GAAI,CAACG,EAAS,MAAM,MAAM,IAAIH,CAAM,4BAA4B,CAAA,KAEhE,OAAM,MAAM,gDAAgD,QAEvDO,EAAG,CACV,MAAM,MAAM,GAAG,KAAK,IAAI,WAAYA,EAAY,OAAO,EAAE,CAC3D,CAEA,MAAMC,EAAeC,EAAAA,KAAK,IAAiBN,EAAS,KAAK,IAAI,EAAA;AAEzDK,GAGFA,EAAa,sBAAsB,EAGrC,KAAK,QAAUL,EACf,KAAK,QAAU,KAAK,UAAYO,EAAAA,WAAW,KAAK,QAAQ,EAAE,OACtDC,EAAAA,iBAAiBR,EAAS,KAAK,SAAUF,GAAU,GAAI,IAAI,EAE3D,GAEJQ,EAAA,KAAK,IAAIN,EAAS,KAAK,KAAM,IAAI,CACnC,CAGA,IAAI,SAAU,CACL,OAAAN,CACT,CAGA,IAAI,MAAO,CACF,MAAA,eACT,CAGA,IAAI,UAAW,CACb,MAAO,EACT,CASA,SAAU,CACRY,EAAA,KAAK,OAAoB,KAAK,QAAS,KAAK,IAAI,EAChDC,EAAAA,WAAW,IAAI,EAAE,QAASE,GAAS,CACjC,OAAO,KAAKA,CAAI,CAAA,CACjB,CACH,CACF"} \ No newline at end of file diff --git a/dist/components/base-component-nXu3wApu.mjs b/dist/components/base-component-DHbs0JQk.mjs similarity index 91% rename from dist/components/base-component-nXu3wApu.mjs rename to dist/components/base-component-DHbs0JQk.mjs index 9fe8047b..bdfcb775 100644 --- a/dist/components/base-component-nXu3wApu.mjs +++ b/dist/components/base-component-DHbs0JQk.mjs @@ -28,10 +28,7 @@ class y { } const o = r.get(t, this.name); // istanbul ignore else @preserve - o && o._toggleEventListeners(), this.element = t, this.options = this.defaults && a(this.defaults).length ? E(t, this.defaults, n || {}, "bs") : ( - // istanbul ignore next @preserve - {} - ), r.set(t, this.name, this); + o && o._toggleEventListeners(), this.element = t, this.options = this.defaults && a(this.defaults).length ? E(t, this.defaults, n || {}, "bs") : {}, r.set(t, this.name, this); } // istanbul ignore next @preserve get version() { @@ -55,4 +52,4 @@ class y { export { y as B }; -//# sourceMappingURL=base-component-nXu3wApu.mjs.map +//# sourceMappingURL=base-component-DHbs0JQk.mjs.map diff --git a/dist/components/base-component-DHbs0JQk.mjs.map b/dist/components/base-component-DHbs0JQk.mjs.map new file mode 100644 index 00000000..7c9c0837 --- /dev/null +++ b/dist/components/base-component-DHbs0JQk.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"base-component-DHbs0JQk.mjs","sources":["../../src/version.ts","../../src/components/base-component.ts"],"sourcesContent":["import { version } from \"../package.json\";\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport {\n Data,\n isHTMLElement,\n isString,\n normalizeOptions,\n ObjectKeys,\n querySelector,\n} from \"@thednp/shorty\";\n\nimport type { BaseOptions } from \"../interface/baseComponent\";\nimport Version from \"../version\";\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options = this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, \"bs\")\n // istanbul ignore next @preserve\n : {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return \"BaseComponent\";\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach((prop) => {\n delete this[prop];\n });\n }\n}\n"],"names":["Version","version","BaseComponent","target","config","__publicField","element","isHTMLElement","isString","querySelector","e","prevInstance","Data","ObjectKeys","normalizeOptions","prop"],"mappings":";;;;oBAEMA,IAAUC;ACahB,MAAqBC,EAAc;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjC,YAAYC,GAA8BC,GAAsB;AAmDhE;AAAA;AAAA,IAAAC,EAAA,+BAAwB,MAAM;AAAA,IAAA;AAlDxB,QAAAC;AAEA,QAAA;AACE,UAAAC,EAAcJ,CAAM;AACZ,QAAAG,IAAAH;AAAA,eACDK,EAASL,CAAM,GAAG;AAC3B,QAAAG,IAAUG,EAA2BN,CAAM;AAAA,QAAA;AAE3C,YAAI,CAACG,EAAS,OAAM,MAAM,IAAIH,CAAM,4BAA4B;AAAA,MAAA;AAEhE,cAAM,MAAM,gDAAgD;AAAA,aAEvDO,GAAG;AACV,YAAM,MAAM,GAAG,KAAK,IAAI,WAAYA,EAAY,OAAO,EAAE;AAAA,IAC3D;AAEA,UAAMC,IAAeC,EAAK,IAAiBN,GAAS,KAAK,IAAI;AAAA,IAAA;AAE7D,IAAIK,KAGFA,EAAa,sBAAsB,GAGrC,KAAK,UAAUL,GACf,KAAK,UAAU,KAAK,YAAYO,EAAW,KAAK,QAAQ,EAAE,SACtDC,EAAiBR,GAAS,KAAK,UAAUF,KAAU,IAAI,IAAI,IAE3D,IAEJQ,EAAK,IAAIN,GAAS,KAAK,MAAM,IAAI;AAAA,EACnC;AAAA;AAAA,EAGA,IAAI,UAAU;AACL,WAAAN;AAAA,EACT;AAAA;AAAA,EAGA,IAAI,OAAO;AACF,WAAA;AAAA,EACT;AAAA;AAAA,EAGA,IAAI,WAAW;AACb,WAAO;EACT;AAAA;AAAA,EASA,UAAU;AACR,IAAAY,EAAK,OAAoB,KAAK,SAAS,KAAK,IAAI,GAChDC,EAAW,IAAI,EAAE,QAAQ,CAACE,MAAS;AACjC,aAAO,KAAKA,CAAI;AAAA,IAAA,CACjB;AAAA,EACH;AACF;"} \ No newline at end of file diff --git a/dist/components/base-component-nXu3wApu.mjs.map b/dist/components/base-component-nXu3wApu.mjs.map deleted file mode 100644 index c47faa6f..00000000 --- a/dist/components/base-component-nXu3wApu.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"base-component-nXu3wApu.mjs","sources":["../../src/version.ts","../../src/components/base-component.ts"],"sourcesContent":["import { version } from '../package.json';\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport { Data, isHTMLElement, isString, normalizeOptions, ObjectKeys, querySelector } from '@thednp/shorty';\n\nimport type { BaseOptions } from '../interface/baseComponent';\nimport Version from '../version';\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options =\n this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, 'bs')\n : // istanbul ignore next @preserve\n {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return 'BaseComponent';\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach(prop => {\n delete this[prop];\n });\n }\n}\n"],"names":["Version","version","BaseComponent","target","config","__publicField","element","isHTMLElement","isString","querySelector","e","prevInstance","Data","ObjectKeys","normalizeOptions","prop"],"mappings":";;;;oBAEMA,IAAUC;ACMhB,MAAqBC,EAAc;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjC,YAAYC,GAA8BC,GAAsB;AAoDhE;AAAA;AAAA,IAAAC,EAAA,+BAAwB,MAAM;AAAA,IAAA;AAnDxB,QAAAC;AAEA,QAAA;AACE,UAAAC,EAAcJ,CAAM;AACZ,QAAAG,IAAAH;AAAA,eACDK,EAASL,CAAM,GAAG;AAC3B,QAAAG,IAAUG,EAA2BN,CAAM;AAAA,QAAA;AAE3C,YAAI,CAACG,EAAS,OAAM,MAAM,IAAIH,CAAM,4BAA4B;AAAA,MAAA;AAEhE,cAAM,MAAM,gDAAgD;AAAA,aAEvDO,GAAG;AACV,YAAM,MAAM,GAAG,KAAK,IAAI,WAAYA,EAAY,OAAO,EAAE;AAAA,IAC3D;AAEA,UAAMC,IAAeC,EAAK,IAAiBN,GAAS,KAAK,IAAI;AAAA,IAAA;AAE7D,IAAIK,KAGFA,EAAa,sBAAsB,GAGrC,KAAK,UAAUL,GACf,KAAK,UACH,KAAK,YAAYO,EAAW,KAAK,QAAQ,EAAE,SACvCC,EAAiBR,GAAS,KAAK,UAAUF,KAAU,IAAI,IAAI;AAAA;AAAA,MAE3D,CAAC;AAAA,OAEPQ,EAAK,IAAIN,GAAS,KAAK,MAAM,IAAI;AAAA,EACnC;AAAA;AAAA,EAGA,IAAI,UAAU;AACL,WAAAN;AAAA,EACT;AAAA;AAAA,EAGA,IAAI,OAAO;AACF,WAAA;AAAA,EACT;AAAA;AAAA,EAGA,IAAI,WAAW;AACb,WAAO;EACT;AAAA;AAAA,EASA,UAAU;AACR,IAAAY,EAAK,OAAoB,KAAK,SAAS,KAAK,IAAI,GACrCC,EAAA,IAAI,EAAE,QAAQ,CAAQE,MAAA;AAC/B,aAAO,KAAKA,CAAI;AAAA,IAAA,CACjB;AAAA,EACH;AACF;"} \ No newline at end of file diff --git a/dist/components/button.cjs.map b/dist/components/button.cjs.map index afdcffef..469addba 100644 --- a/dist/components/button.cjs.map +++ b/dist/components/button.cjs.map @@ -1 +1 @@ -{"version":3,"file":"button.cjs","sources":["../../src/strings/buttonString.ts","../../src/strings/buttonComponent.ts","../../src/components/button.ts"],"sourcesContent":["/** @type {string} */\nconst buttonString = 'button';\nexport default buttonString;\n","/** @type {string} */\nconst buttonComponent = 'Button';\nexport default buttonComponent;\n","/* Native JavaScript for Bootstrap 5 | Button\n---------------------------------------------*/\nimport {\n addClass,\n ariaPressed,\n getAttribute,\n getInstance,\n hasClass,\n mouseclickEvent,\n removeClass,\n setAttribute,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport activeClass from '../strings/activeClass';\nimport dataBsToggle from '../strings/dataBsToggle';\nimport buttonString from '../strings/buttonString';\nimport buttonComponent from '../strings/buttonComponent';\n\nimport BaseComponent from './base-component';\n\n// BUTTON PRIVATE GC\n// =================\nconst buttonSelector = `[${dataBsToggle}=\"${buttonString}\"]`;\n\n/**\n * Static method which returns an existing `Button` instance associated\n * to a target `Element`.\n */\nconst getButtonInstance = (element: HTMLElement) => getInstance',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) => getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n"],"names":["popoverSelector","dataBsToggle","popoverString","popoverDefaults","ObjectAssign","tooltipDefaults","getTipTemplate","getPopoverInstance","element","getInstance","popoverComponent","popoverInitCallback","Popover","Tooltip","target","config","__publicField","options","btn","focus","styleTip"],"mappings":"8RAiBMA,EAAkB,IAAIC,cAAY,KAAKC,EAAAA,aAAa,iBAAiBA,eAAa,KAElFC,EAAkCC,EAAAA,aAAa,CAAC,EAAGC,kBAAiB,CACxE,SAAUC,iBAAeJ,eAAa,EACtC,QAAS,GACT,YAAa,GACb,SAAU,wDACZ,CAAC,EAMKK,EAAsBC,GAAyBC,EAAA,YAAqBD,EAASE,EAAgB,gBAAA,EAK7FC,EAAuBH,GAAyB,IAAII,EAAQJ,CAAO,EAKzE,MAAqBI,UAAgBC,EAAAA,OAAQ,CAW3C,YAAYC,EAA8BC,EAAkC,CAC1E,MAAMD,EAAQC,CAAM,EAgBtBC,EAAA,YAAO,IAAM,CACX,MAAM,KAAK,EAEL,KAAA,CAAE,QAAAC,EAAS,IAAAC,CAAQ,EAAA,KAAA;AAErBD,EAAQ,aAAeC,GAAK,WAAW,IAAMC,QAAMD,CAAG,EAAG,EAAE,CAAA,EApBjE,CAIA,IAAI,MAAO,CACF,OAAAR,kBACT,CAIA,IAAI,UAAW,CACN,OAAAP,CACT,CAUF,CAlCEa,EADmBJ,EACZ,WAAWZ,GAClBgB,EAFmBJ,EAEZ,OAAOD,GACdK,EAHmBJ,EAGZ,cAAcL,GACrBS,EAJmBJ,EAIZ,WAAWQ,EAAAA"} \ No newline at end of file +{"version":3,"file":"popover.cjs","sources":["../../src/components/popover.ts"],"sourcesContent":["/* Native JavaScript for Bootstrap 5 | Popover\n---------------------------------------------- */\nimport { focus, getInstance, ObjectAssign } from \"@thednp/shorty\";\n\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport popoverString from \"../strings/popoverString\";\nimport popoverComponent from \"../strings/popoverComponent\";\n\nimport getTipTemplate from \"../util/getTipTemplate\";\nimport styleTip from \"../util/styleTip\";\nimport tooltipDefaults from \"../util/tooltipDefaults\";\nimport Tooltip from \"./tooltip\";\n\nimport type { PopoverOptions /* , PopoverEvent */ } from \"../interface/popover\";\n\n// POPOVER PRIVATE GC\n// ==================\nconst popoverSelector =\n `[${dataBsToggle}=\"${popoverString}\"],[data-tip=\"${popoverString}\"]`;\n\nconst popoverDefaults: PopoverOptions = ObjectAssign({}, tooltipDefaults, {\n template: getTipTemplate(popoverString),\n content: \"\",\n dismissible: false,\n btnClose: '',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) =>\n getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n"],"names":["popoverSelector","dataBsToggle","popoverString","popoverDefaults","ObjectAssign","tooltipDefaults","getTipTemplate","getPopoverInstance","element","getInstance","popoverComponent","popoverInitCallback","Popover","Tooltip","target","config","__publicField","options","btn","focus","styleTip"],"mappings":"8RAiBMA,EACJ,IAAIC,cAAY,KAAKC,EAAAA,aAAa,iBAAiBA,eAAa,KAE5DC,EAAkCC,EAAAA,aAAa,CAAC,EAAGC,kBAAiB,CACxE,SAAUC,iBAAeJ,eAAa,EACtC,QAAS,GACT,YAAa,GACb,SAAU,wDACZ,CAAC,EAMKK,EAAsBC,GAC1BC,EAAA,YAAqBD,EAASE,EAAgB,gBAAA,EAK1CC,EAAuBH,GAAyB,IAAII,EAAQJ,CAAO,EAKzE,MAAqBI,UAAgBC,EAAAA,OAAQ,CAW3C,YAAYC,EAA8BC,EAAkC,CAC1E,MAAMD,EAAQC,CAAM,EAgBtBC,EAAA,YAAO,IAAM,CACX,MAAM,KAAK,EAEL,KAAA,CAAE,QAAAC,EAAS,IAAAC,CAAQ,EAAA,KAAA;AAErBD,EAAQ,aAAeC,GAAK,WAAW,IAAMC,QAAMD,CAAG,EAAG,EAAE,CAAA,EApBjE,CAIA,IAAI,MAAO,CACF,OAAAR,kBACT,CAIA,IAAI,UAAW,CACN,OAAAP,CACT,CAUF,CAlCEa,EADmBJ,EACZ,WAAWZ,GAClBgB,EAFmBJ,EAEZ,OAAOD,GACdK,EAHmBJ,EAGZ,cAAcL,GACrBS,EAJmBJ,EAIZ,WAAWQ,EAAAA"} \ No newline at end of file diff --git a/dist/components/popover.d.ts b/dist/components/popover.d.ts index 4e1e1ac6..fe9427d5 100644 --- a/dist/components/popover.d.ts +++ b/dist/components/popover.d.ts @@ -1,5 +1,5 @@ export interface BaseOptions { - [key: string]: any; + [key: string]: unknown; } declare class BaseComponent { element: HTMLElement; diff --git a/dist/components/popover.mjs b/dist/components/popover.mjs index 6dd6ffff..ecfef628 100644 --- a/dist/components/popover.mjs +++ b/dist/components/popover.mjs @@ -3,7 +3,7 @@ var c = (t, s, e) => s in t ? p(t, s, { enumerable: !0, configurable: !0, writab var o = (t, s, e) => c(t, typeof s != "symbol" ? s + "" : s, e); import { ObjectAssign as r, focus as m, getInstance as u } from "@thednp/shorty"; import { d as g } from "./dataBsToggle-B84TS15h.mjs"; -import { t as b, g as f, T as d, s as T, p as l, a as i } from "./tooltip-B1BCkN2D.mjs"; +import { t as b, g as f, T as d, s as T, p as l, a as i } from "./tooltip-Qmkn435O.mjs"; const C = `[${g}="${i}"],[data-tip="${i}"]`, I = r({}, b, { template: f(i), content: "", diff --git a/dist/components/popover.mjs.map b/dist/components/popover.mjs.map index 77523141..9c6ecb07 100644 --- a/dist/components/popover.mjs.map +++ b/dist/components/popover.mjs.map @@ -1 +1 @@ -{"version":3,"file":"popover.mjs","sources":["../../src/components/popover.ts"],"sourcesContent":["/* Native JavaScript for Bootstrap 5 | Popover\n---------------------------------------------- */\nimport { focus, getInstance, ObjectAssign } from '@thednp/shorty';\n\nimport dataBsToggle from '../strings/dataBsToggle';\nimport popoverString from '../strings/popoverString';\nimport popoverComponent from '../strings/popoverComponent';\n\nimport getTipTemplate from '../util/getTipTemplate';\nimport styleTip from '../util/styleTip';\nimport tooltipDefaults from '../util/tooltipDefaults';\nimport Tooltip from './tooltip';\n\nimport type { PopoverOptions /* , PopoverEvent */ } from '../interface/popover';\n\n// POPOVER PRIVATE GC\n// ==================\nconst popoverSelector = `[${dataBsToggle}=\"${popoverString}\"],[data-tip=\"${popoverString}\"]`;\n\nconst popoverDefaults: PopoverOptions = ObjectAssign({}, tooltipDefaults, {\n template: getTipTemplate(popoverString),\n content: '',\n dismissible: false,\n btnClose: '',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) => getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n"],"names":["popoverSelector","dataBsToggle","popoverString","popoverDefaults","ObjectAssign","tooltipDefaults","getTipTemplate","getPopoverInstance","element","getInstance","popoverComponent","popoverInitCallback","Popover","Tooltip","target","config","__publicField","options","btn","focus","styleTip"],"mappings":";;;;;;AAiBA,MAAMA,IAAkB,IAAIC,CAAY,KAAKC,CAAa,iBAAiBA,CAAa,MAElFC,IAAkCC,EAAa,CAAC,GAAGC,GAAiB;AAAA,EACxE,UAAUC,EAAeJ,CAAa;AAAA,EACtC,SAAS;AAAA,EACT,aAAa;AAAA,EACb,UAAU;AACZ,CAAC,GAMKK,IAAqB,CAACC,MAAyBC,EAAqBD,GAASE,CAAgB,GAK7FC,IAAsB,CAACH,MAAyB,IAAII,EAAQJ,CAAO;AAKzE,MAAqBI,UAAgBC,EAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,EAW3C,YAAYC,GAA8BC,GAAkC;AAC1E,UAAMD,GAAQC,CAAM;AAgBtB;AAAA,IAAAC,EAAA,cAAO,MAAM;AACX,YAAM,KAAK;AAEL,YAAA,EAAE,SAAAC,GAAS,KAAAC,EAAQ,IAAA;AAAA,MAAA;AAErB,MAAAD,EAAQ,eAAeC,KAAK,WAAW,MAAMC,EAAMD,CAAG,GAAG,EAAE;AAAA,IAAA;AAAA,EApBjE;AAAA;AAAA;AAAA;AAAA,EAIA,IAAI,OAAO;AACF,WAAAR;AAAA,EACT;AAAA;AAAA;AAAA;AAAA,EAIA,IAAI,WAAW;AACN,WAAAP;AAAA,EACT;AAUF;AAlCEa,EADmBJ,GACZ,YAAWZ,IAClBgB,EAFmBJ,GAEZ,QAAOD,IACdK,EAHmBJ,GAGZ,eAAcL,IACrBS,EAJmBJ,GAIZ,YAAWQ;"} \ No newline at end of file +{"version":3,"file":"popover.mjs","sources":["../../src/components/popover.ts"],"sourcesContent":["/* Native JavaScript for Bootstrap 5 | Popover\n---------------------------------------------- */\nimport { focus, getInstance, ObjectAssign } from \"@thednp/shorty\";\n\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport popoverString from \"../strings/popoverString\";\nimport popoverComponent from \"../strings/popoverComponent\";\n\nimport getTipTemplate from \"../util/getTipTemplate\";\nimport styleTip from \"../util/styleTip\";\nimport tooltipDefaults from \"../util/tooltipDefaults\";\nimport Tooltip from \"./tooltip\";\n\nimport type { PopoverOptions /* , PopoverEvent */ } from \"../interface/popover\";\n\n// POPOVER PRIVATE GC\n// ==================\nconst popoverSelector =\n `[${dataBsToggle}=\"${popoverString}\"],[data-tip=\"${popoverString}\"]`;\n\nconst popoverDefaults: PopoverOptions = ObjectAssign({}, tooltipDefaults, {\n template: getTipTemplate(popoverString),\n content: \"\",\n dismissible: false,\n btnClose: '',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) =>\n getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n"],"names":["popoverSelector","dataBsToggle","popoverString","popoverDefaults","ObjectAssign","tooltipDefaults","getTipTemplate","getPopoverInstance","element","getInstance","popoverComponent","popoverInitCallback","Popover","Tooltip","target","config","__publicField","options","btn","focus","styleTip"],"mappings":";;;;;;AAiBA,MAAMA,IACJ,IAAIC,CAAY,KAAKC,CAAa,iBAAiBA,CAAa,MAE5DC,IAAkCC,EAAa,CAAC,GAAGC,GAAiB;AAAA,EACxE,UAAUC,EAAeJ,CAAa;AAAA,EACtC,SAAS;AAAA,EACT,aAAa;AAAA,EACb,UAAU;AACZ,CAAC,GAMKK,IAAqB,CAACC,MAC1BC,EAAqBD,GAASE,CAAgB,GAK1CC,IAAsB,CAACH,MAAyB,IAAII,EAAQJ,CAAO;AAKzE,MAAqBI,UAAgBC,EAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,EAW3C,YAAYC,GAA8BC,GAAkC;AAC1E,UAAMD,GAAQC,CAAM;AAgBtB;AAAA,IAAAC,EAAA,cAAO,MAAM;AACX,YAAM,KAAK;AAEL,YAAA,EAAE,SAAAC,GAAS,KAAAC,EAAQ,IAAA;AAAA,MAAA;AAErB,MAAAD,EAAQ,eAAeC,KAAK,WAAW,MAAMC,EAAMD,CAAG,GAAG,EAAE;AAAA,IAAA;AAAA,EApBjE;AAAA;AAAA;AAAA;AAAA,EAIA,IAAI,OAAO;AACF,WAAAR;AAAA,EACT;AAAA;AAAA;AAAA;AAAA,EAIA,IAAI,WAAW;AACN,WAAAP;AAAA,EACT;AAUF;AAlCEa,EADmBJ,GACZ,YAAWZ,IAClBgB,EAFmBJ,GAEZ,QAAOD,IACdK,EAHmBJ,GAGZ,eAAcL,IACrBS,EAJmBJ,GAIZ,YAAWQ;"} \ No newline at end of file diff --git a/dist/components/popupContainer-BitC465I.mjs.map b/dist/components/popupContainer-BitC465I.mjs.map index 7438a0e7..cf93762d 100644 --- a/dist/components/popupContainer-BitC465I.mjs.map +++ b/dist/components/popupContainer-BitC465I.mjs.map @@ -1 +1 @@ -{"version":3,"file":"popupContainer-BitC465I.mjs","sources":["../../src/strings/modalString.ts","../../src/strings/offcanvasString.ts","../../src/util/popupContainer.ts"],"sourcesContent":["/** @type {string} */\nconst modalString = 'modal';\nexport default modalString;\n","/** @type {string} */\nconst offcanvasString = 'offcanvas';\nexport default offcanvasString;\n","import { createElement, getDocumentBody, isNode } from '@thednp/shorty';\n\n// the default container for Modal, Offcanvas, Popover and Tooltip\nconst popupContainer = createElement({\n tagName: 'div',\n className: 'popup-container',\n}) as HTMLElement;\n\nconst appendPopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const containerIsBody = isNode(customContainer) && customContainer.nodeName === 'BODY';\n const lookup = isNode(customContainer) && !containerIsBody ? customContainer : popupContainer;\n const BODY = containerIsBody ? customContainer : getDocumentBody(target);\n\n // istanbul ignore else @preserve\n if (isNode(target)) {\n if (lookup === popupContainer) {\n BODY.append(popupContainer);\n }\n lookup.append(target);\n }\n};\n\nconst removePopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const containerIsBody = isNode(customContainer) && customContainer.nodeName === 'BODY';\n const lookup = isNode(customContainer) && !containerIsBody ? customContainer : popupContainer;\n\n // istanbul ignore else @preserve\n if (isNode(target)) {\n target.remove();\n\n if (lookup === popupContainer && !popupContainer.children.length) {\n popupContainer.remove();\n }\n }\n};\n\nconst hasPopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const lookup = isNode(customContainer) && customContainer.nodeName !== 'BODY' ? customContainer : popupContainer;\n return isNode(target) && lookup.contains(target);\n};\n\nexport { appendPopup, hasPopup, popupContainer, removePopup };\n"],"names":["modalString","offcanvasString","popupContainer","createElement","appendPopup","target","customContainer","containerIsBody","isNode","lookup","BODY","getDocumentBody","removePopup","hasPopup"],"mappings":";AACA,MAAMA,IAAc,SCAdC,IAAkB,aCElBC,IAAiBC,EAAc;AAAA,EACnC,SAAS;AAAA,EACT,WAAW;AACb,CAAC,GAEKC,IAAc,CAACC,GAAqBC,MAAiC;AACzE,QAAMC,IAAkBC,EAAOF,CAAe,KAAKA,EAAgB,aAAa,QAC1EG,IAASD,EAAOF,CAAe,KAAK,CAACC,IAAkBD,IAAkBJ,GACzEQ,IAAOH,IAAkBD,IAAkBK,EAAgBN,CAAM;AAAA,EAAA;AAGnE,EAAAG,EAAOH,CAAM,MACXI,MAAWP,KACbQ,EAAK,OAAOR,CAAc,GAE5BO,EAAO,OAAOJ,CAAM;AAExB,GAEMO,IAAc,CAACP,GAAqBC,MAAiC;AACzE,QAAMC,IAAkBC,EAAOF,CAAe,KAAKA,EAAgB,aAAa,QAC1EG,IAASD,EAAOF,CAAe,KAAK,CAACC,IAAkBD,IAAkBJ;AAAA,EAAA;AAG3E,EAAAM,EAAOH,CAAM,MACfA,EAAO,OAAO,GAEVI,MAAWP,KAAkB,CAACA,EAAe,SAAS,UACxDA,EAAe,OAAO;AAG5B,GAEMW,IAAW,CAACR,GAAqBC,MAAiC;AACtE,QAAMG,IAASD,EAAOF,CAAe,KAAKA,EAAgB,aAAa,SAASA,IAAkBJ;AAClG,SAAOM,EAAOH,CAAM,KAAKI,EAAO,SAASJ,CAAM;AACjD;"} \ No newline at end of file +{"version":3,"file":"popupContainer-BitC465I.mjs","sources":["../../src/strings/modalString.ts","../../src/strings/offcanvasString.ts","../../src/util/popupContainer.ts"],"sourcesContent":["/** @type {string} */\nconst modalString = \"modal\";\nexport default modalString;\n","/** @type {string} */\nconst offcanvasString = \"offcanvas\";\nexport default offcanvasString;\n","import { createElement, getDocumentBody, isNode } from \"@thednp/shorty\";\n\n// the default container for Modal, Offcanvas, Popover and Tooltip\nconst popupContainer = createElement({\n tagName: \"div\",\n className: \"popup-container\",\n}) as HTMLElement;\n\nconst appendPopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const containerIsBody = isNode(customContainer) &&\n customContainer.nodeName === \"BODY\";\n const lookup = isNode(customContainer) && !containerIsBody\n ? customContainer\n : popupContainer;\n const BODY = containerIsBody ? customContainer : getDocumentBody(target);\n\n // istanbul ignore else @preserve\n if (isNode(target)) {\n if (lookup === popupContainer) {\n BODY.append(popupContainer);\n }\n lookup.append(target);\n }\n};\n\nconst removePopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const containerIsBody = isNode(customContainer) &&\n customContainer.nodeName === \"BODY\";\n const lookup = isNode(customContainer) && !containerIsBody\n ? customContainer\n : popupContainer;\n\n // istanbul ignore else @preserve\n if (isNode(target)) {\n target.remove();\n\n if (lookup === popupContainer && !popupContainer.children.length) {\n popupContainer.remove();\n }\n }\n};\n\nconst hasPopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const lookup = isNode(customContainer) && customContainer.nodeName !== \"BODY\"\n ? customContainer\n : popupContainer;\n return isNode(target) && lookup.contains(target);\n};\n\nexport { appendPopup, hasPopup, popupContainer, removePopup };\n"],"names":["modalString","offcanvasString","popupContainer","createElement","appendPopup","target","customContainer","containerIsBody","isNode","lookup","BODY","getDocumentBody","removePopup","hasPopup"],"mappings":";AACA,MAAMA,IAAc,SCAdC,IAAkB,aCElBC,IAAiBC,EAAc;AAAA,EACnC,SAAS;AAAA,EACT,WAAW;AACb,CAAC,GAEKC,IAAc,CAACC,GAAqBC,MAAiC;AACzE,QAAMC,IAAkBC,EAAOF,CAAe,KAC5CA,EAAgB,aAAa,QACzBG,IAASD,EAAOF,CAAe,KAAK,CAACC,IACvCD,IACAJ,GACEQ,IAAOH,IAAkBD,IAAkBK,EAAgBN,CAAM;AAAA,EAAA;AAGnE,EAAAG,EAAOH,CAAM,MACXI,MAAWP,KACbQ,EAAK,OAAOR,CAAc,GAE5BO,EAAO,OAAOJ,CAAM;AAExB,GAEMO,IAAc,CAACP,GAAqBC,MAAiC;AACzE,QAAMC,IAAkBC,EAAOF,CAAe,KAC5CA,EAAgB,aAAa,QACzBG,IAASD,EAAOF,CAAe,KAAK,CAACC,IACvCD,IACAJ;AAAA,EAAA;AAGA,EAAAM,EAAOH,CAAM,MACfA,EAAO,OAAO,GAEVI,MAAWP,KAAkB,CAACA,EAAe,SAAS,UACxDA,EAAe,OAAO;AAG5B,GAEMW,IAAW,CAACR,GAAqBC,MAAiC;AACtE,QAAMG,IAASD,EAAOF,CAAe,KAAKA,EAAgB,aAAa,SACnEA,IACAJ;AACJ,SAAOM,EAAOH,CAAM,KAAKI,EAAO,SAASJ,CAAM;AACjD;"} \ No newline at end of file diff --git a/dist/components/popupContainer-DIlSFkzD.js.map b/dist/components/popupContainer-DIlSFkzD.js.map index 28ab16da..915cd267 100644 --- a/dist/components/popupContainer-DIlSFkzD.js.map +++ b/dist/components/popupContainer-DIlSFkzD.js.map @@ -1 +1 @@ -{"version":3,"file":"popupContainer-DIlSFkzD.js","sources":["../../src/strings/modalString.ts","../../src/strings/offcanvasString.ts","../../src/util/popupContainer.ts"],"sourcesContent":["/** @type {string} */\nconst modalString = 'modal';\nexport default modalString;\n","/** @type {string} */\nconst offcanvasString = 'offcanvas';\nexport default offcanvasString;\n","import { createElement, getDocumentBody, isNode } from '@thednp/shorty';\n\n// the default container for Modal, Offcanvas, Popover and Tooltip\nconst popupContainer = createElement({\n tagName: 'div',\n className: 'popup-container',\n}) as HTMLElement;\n\nconst appendPopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const containerIsBody = isNode(customContainer) && customContainer.nodeName === 'BODY';\n const lookup = isNode(customContainer) && !containerIsBody ? customContainer : popupContainer;\n const BODY = containerIsBody ? customContainer : getDocumentBody(target);\n\n // istanbul ignore else @preserve\n if (isNode(target)) {\n if (lookup === popupContainer) {\n BODY.append(popupContainer);\n }\n lookup.append(target);\n }\n};\n\nconst removePopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const containerIsBody = isNode(customContainer) && customContainer.nodeName === 'BODY';\n const lookup = isNode(customContainer) && !containerIsBody ? customContainer : popupContainer;\n\n // istanbul ignore else @preserve\n if (isNode(target)) {\n target.remove();\n\n if (lookup === popupContainer && !popupContainer.children.length) {\n popupContainer.remove();\n }\n }\n};\n\nconst hasPopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const lookup = isNode(customContainer) && customContainer.nodeName !== 'BODY' ? customContainer : popupContainer;\n return isNode(target) && lookup.contains(target);\n};\n\nexport { appendPopup, hasPopup, popupContainer, removePopup };\n"],"names":["modalString","offcanvasString","popupContainer","createElement","appendPopup","target","customContainer","containerIsBody","isNode","lookup","BODY","getDocumentBody","removePopup","hasPopup"],"mappings":"+CACMA,EAAc,QCAdC,EAAkB,YCElBC,EAAiBC,EAAAA,cAAc,CACnC,QAAS,MACT,UAAW,iBACb,CAAC,EAEKC,EAAc,CAACC,EAAqBC,IAAiC,CACzE,MAAMC,EAAkBC,EAAAA,OAAOF,CAAe,GAAKA,EAAgB,WAAa,OAC1EG,EAASD,EAAAA,OAAOF,CAAe,GAAK,CAACC,EAAkBD,EAAkBJ,EACzEQ,EAAOH,EAAkBD,EAAkBK,EAAA,gBAAgBN,CAAM,EAAA;AAGnEG,EAAAA,OAAOH,CAAM,IACXI,IAAWP,GACbQ,EAAK,OAAOR,CAAc,EAE5BO,EAAO,OAAOJ,CAAM,EAExB,EAEMO,EAAc,CAACP,EAAqBC,IAAiC,CACzE,MAAMC,EAAkBC,EAAAA,OAAOF,CAAe,GAAKA,EAAgB,WAAa,OAC1EG,EAASD,EAAAA,OAAOF,CAAe,GAAK,CAACC,EAAkBD,EAAkBJ,EAAA;AAG3EM,EAAAA,OAAOH,CAAM,IACfA,EAAO,OAAO,EAEVI,IAAWP,GAAkB,CAACA,EAAe,SAAS,QACxDA,EAAe,OAAO,EAG5B,EAEMW,EAAW,CAACR,EAAqBC,IAAiC,CACtE,MAAMG,EAASD,EAAO,OAAAF,CAAe,GAAKA,EAAgB,WAAa,OAASA,EAAkBJ,EAClG,OAAOM,EAAAA,OAAOH,CAAM,GAAKI,EAAO,SAASJ,CAAM,CACjD"} \ No newline at end of file +{"version":3,"file":"popupContainer-DIlSFkzD.js","sources":["../../src/strings/modalString.ts","../../src/strings/offcanvasString.ts","../../src/util/popupContainer.ts"],"sourcesContent":["/** @type {string} */\nconst modalString = \"modal\";\nexport default modalString;\n","/** @type {string} */\nconst offcanvasString = \"offcanvas\";\nexport default offcanvasString;\n","import { createElement, getDocumentBody, isNode } from \"@thednp/shorty\";\n\n// the default container for Modal, Offcanvas, Popover and Tooltip\nconst popupContainer = createElement({\n tagName: \"div\",\n className: \"popup-container\",\n}) as HTMLElement;\n\nconst appendPopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const containerIsBody = isNode(customContainer) &&\n customContainer.nodeName === \"BODY\";\n const lookup = isNode(customContainer) && !containerIsBody\n ? customContainer\n : popupContainer;\n const BODY = containerIsBody ? customContainer : getDocumentBody(target);\n\n // istanbul ignore else @preserve\n if (isNode(target)) {\n if (lookup === popupContainer) {\n BODY.append(popupContainer);\n }\n lookup.append(target);\n }\n};\n\nconst removePopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const containerIsBody = isNode(customContainer) &&\n customContainer.nodeName === \"BODY\";\n const lookup = isNode(customContainer) && !containerIsBody\n ? customContainer\n : popupContainer;\n\n // istanbul ignore else @preserve\n if (isNode(target)) {\n target.remove();\n\n if (lookup === popupContainer && !popupContainer.children.length) {\n popupContainer.remove();\n }\n }\n};\n\nconst hasPopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const lookup = isNode(customContainer) && customContainer.nodeName !== \"BODY\"\n ? customContainer\n : popupContainer;\n return isNode(target) && lookup.contains(target);\n};\n\nexport { appendPopup, hasPopup, popupContainer, removePopup };\n"],"names":["modalString","offcanvasString","popupContainer","createElement","appendPopup","target","customContainer","containerIsBody","isNode","lookup","BODY","getDocumentBody","removePopup","hasPopup"],"mappings":"+CACMA,EAAc,QCAdC,EAAkB,YCElBC,EAAiBC,EAAAA,cAAc,CACnC,QAAS,MACT,UAAW,iBACb,CAAC,EAEKC,EAAc,CAACC,EAAqBC,IAAiC,CACzE,MAAMC,EAAkBC,EAAAA,OAAOF,CAAe,GAC5CA,EAAgB,WAAa,OACzBG,EAASD,EAAAA,OAAOF,CAAe,GAAK,CAACC,EACvCD,EACAJ,EACEQ,EAAOH,EAAkBD,EAAkBK,EAAA,gBAAgBN,CAAM,EAAA;AAGnEG,EAAAA,OAAOH,CAAM,IACXI,IAAWP,GACbQ,EAAK,OAAOR,CAAc,EAE5BO,EAAO,OAAOJ,CAAM,EAExB,EAEMO,EAAc,CAACP,EAAqBC,IAAiC,CACzE,MAAMC,EAAkBC,EAAAA,OAAOF,CAAe,GAC5CA,EAAgB,WAAa,OACzBG,EAASD,EAAAA,OAAOF,CAAe,GAAK,CAACC,EACvCD,EACAJ,EAAA;AAGAM,EAAAA,OAAOH,CAAM,IACfA,EAAO,OAAO,EAEVI,IAAWP,GAAkB,CAACA,EAAe,SAAS,QACxDA,EAAe,OAAO,EAG5B,EAEMW,EAAW,CAACR,EAAqBC,IAAiC,CACtE,MAAMG,EAASD,EAAO,OAAAF,CAAe,GAAKA,EAAgB,WAAa,OACnEA,EACAJ,EACJ,OAAOM,EAAAA,OAAOH,CAAM,GAAKI,EAAO,SAASJ,CAAM,CACjD"} \ No newline at end of file diff --git a/dist/components/scrollspy.cjs.map b/dist/components/scrollspy.cjs.map index f7c77c2e..b99b70cb 100644 --- a/dist/components/scrollspy.cjs.map +++ b/dist/components/scrollspy.cjs.map @@ -1 +1 @@ -{"version":3,"file":"scrollspy.cjs","sources":["../../src/strings/scrollspyString.ts","../../src/strings/scrollspyComponent.ts","../../src/components/scrollspy.ts"],"sourcesContent":["/** @type {string} */\nconst scrollspyString = 'scrollspy';\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = 'ScrollSpy';\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n getWindow,\n hasClass,\n isHTMLElement,\n isWindow,\n passiveHandler,\n querySelector,\n removeClass,\n scrollEvent,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport activeClass from '../strings/activeClass';\nimport scrollspyString from '../strings/scrollspyString';\nimport scrollspyComponent from '../strings/scrollspyComponent';\n\nimport BaseComponent from './base-component';\nimport { ScrollSpyEvent, ScrollSpyOptions } from '../interface/scrollspy';\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) => getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } = self;\n const { offset } = options;\n const isWin = isWindow(scrollTarget as Node | Window);\n\n const links = target && getElementsByTagName('A', target);\n const scrollHEIGHT = scrollTarget\n ? getScrollHeight(scrollTarget)\n : // istanbul ignore next @preserve\n scrollHeight;\n\n self.scrollTop = isWin ? (scrollTarget as Window).scrollY : (scrollTarget as HTMLElement).scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n [...links].forEach(link => {\n href = getAttribute(link, 'href');\n targetItem =\n href && href.charAt(0) === '#' && href.slice(-1) !== '#' && querySelector(href, getDocument(element));\n\n if (targetItem) {\n self.items.push(link);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push((isWin ? rect.top + self.scrollTop : targetItem.offsetTop) - offset);\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: Node | Window) => {\n return isHTMLElement(scrollTarget as Node)\n ? (scrollTarget as HTMLElement).scrollHeight\n : getDocumentElement(scrollTarget as Node).scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return isWindow(scrollTarget as Node) ? (scrollTarget as Window).innerHeight : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName('A', target)].forEach(item => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, 'nav') || hasClass(parentItem, 'dropdown-menu')) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach(menuItem => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement | Window;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(options.target as HTMLElement | string, getDocument(element));\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight ? element : getWindow(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // add event handlers\n this._toggleEventListeners(true);\n\n this.refresh();\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === 'undefined' || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /**\n * Toggles on/off the component event listener.\n *\n * @param add when `true`, listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.scrollTarget as EventTarget, scrollEvent, this.refresh, passiveHandler);\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n"],"names":["scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","element","getInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","createCustomEvent","updateSpyTargets","self","target","scrollTarget","options","itemsLength","scrollHeight","offset","isWin","isWindow","links","getElementsByTagName","scrollHEIGHT","getScrollHeight","href","targetItem","rect","getOffsetHeight","link","getAttribute","querySelector","getDocument","getBoundingClientRect","isHTMLElement","getDocumentElement","clear","item","hasClass","activeClass","removeClass","activate","addClass","parents","parentItem","getDocumentBody","menuItem","parentLink","dispatchEvent","BaseComponent","config","__publicField","scrollTop","maxScroll","items","activeItem","newActiveItem","offsets","i","add","addListener","removeListener","scrollEvent","passiveHandler","getWindow"],"mappings":"wUACMA,EAAkB,YCAlBC,EAAqB,YCiCrBC,EAAoB,yBAEpBC,EAAsC,CAC1C,OAAQ,GACR,OAAQ,IACV,EAUMC,EAAwBC,GAAyBC,EAAA,YAAuBD,EAASJ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ponent.ts","../../src/components/scrollspy.ts"],"sourcesContent":["/** @type {string} */\nconst scrollspyString = \"scrollspy\";\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = \"ScrollSpy\";\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n getWindow,\n hasClass,\n isHTMLElement,\n isWindow,\n passiveHandler,\n querySelector,\n removeClass,\n scrollEvent,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport activeClass from \"../strings/activeClass\";\nimport scrollspyString from \"../strings/scrollspyString\";\nimport scrollspyComponent from \"../strings/scrollspyComponent\";\n\nimport BaseComponent from \"./base-component\";\nimport { ScrollSpyEvent, ScrollSpyOptions } from \"../interface/scrollspy\";\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) =>\n getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent<\n ScrollSpyEventProps,\n ScrollSpyEvent\n>(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } =\n self;\n const { offset } = options;\n const isWin = isWindow(scrollTarget as Node | Window);\n\n const links = target && getElementsByTagName(\"A\", target);\n const scrollHEIGHT = scrollTarget\n ? getScrollHeight(scrollTarget)\n // istanbul ignore next @preserve\n : scrollHeight;\n\n self.scrollTop = isWin\n ? (scrollTarget as Window).scrollY\n : (scrollTarget as HTMLElement).scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (\n links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)\n ) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n [...links].forEach((link) => {\n href = getAttribute(link, \"href\");\n targetItem = href && href.charAt(0) === \"#\" && href.slice(-1) !== \"#\" &&\n querySelector(href, getDocument(element));\n\n if (targetItem) {\n self.items.push(link);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push(\n (isWin ? rect.top + self.scrollTop : targetItem.offsetTop) - offset,\n );\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: Node | Window) => {\n return isHTMLElement(scrollTarget as Node)\n ? (scrollTarget as HTMLElement).scrollHeight\n : getDocumentElement(scrollTarget as Node).scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return isWindow(scrollTarget as Node)\n ? (scrollTarget as Window).innerHeight\n : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName(\"A\", target)].forEach((item) => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, \"nav\") || hasClass(parentItem, \"dropdown-menu\")) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach((menuItem) => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement | Window;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(\n target: HTMLElement | string,\n config?: Partial,\n ) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(\n options.target as HTMLElement | string,\n getDocument(element),\n );\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight\n ? element\n : getWindow(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // add event handlers\n this._toggleEventListeners(true);\n\n this.refresh();\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === \"undefined\" || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /**\n * Toggles on/off the component event listener.\n *\n * @param add when `true`, listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(\n this.scrollTarget as EventTarget,\n scrollEvent,\n this.refresh,\n passiveHandler,\n );\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n"],"names":["scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","element","getInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","createCustomEvent","updateSpyTargets","self","target","scrollTarget","options","itemsLength","scrollHeight","offset","isWin","isWindow","links","getElementsByTagName","scrollHEIGHT","getScrollHeight","href","targetItem","rect","getOffsetHeight","link","getAttribute","querySelector","getDocument","getBoundingClientRect","isHTMLElement","getDocumentElement","clear","item","hasClass","activeClass","removeClass","activate","addClass","parents","parentItem","getDocumentBody","menuItem","parentLink","dispatchEvent","BaseComponent","config","__publicField","scrollTop","maxScroll","items","activeItem","newActiveItem","offsets","i","add","addListener","removeListener","scrollEvent","passiveHandler","getWindow"],"mappings":"wUACMA,EAAkB,YCAlBC,EAAqB,YCiCrBC,EAAoB,yBAEpBC,EAAsC,CAC1C,OAAQ,GACR,OAAQ,IACV,EAUMC,EAAwBC,GAC5BC,EAAA,YAAuBD,EAASJ,CAAkB,EAK9CM,EAAyBF,GAAyB,IAAIG,EAAUH,CAAO,EAIvEI,EAAoBC,EAAAA,kBAGxB,eAAeV,CAAe,EAAE,EAS5BW,EAAoBC,GAAoB,CAC5C,KAAM,CAAE,OAAAC,EAAQ,aAAAC,EAAc,QAAAC,EAAS,YAAAC,EAAa,aAAAC,EAAc,QAAAZ,CAChE,EAAAO,EACI,CAAE,OAAAM,CAAW,EAAAH,EACbI,EAAQC,WAASN,CAA6B,EAE9CO,EAAQR,GAAUS,EAAqB,qBAAA,IAAKT,CAAM,EAClDU,EAAeT,EACjBU,EAAgBV,CAAY,EAE5BG,EAEJL,EAAK,UAAYO,EACZL,EAAwB,QACxBA,EAA6B,UAAA;AAIlC,GACEO,IAAUE,IAAiBN,GAAgBD,IAAgBK,EAAM,QACjE,CACI,IAAAI,EACAC,EACAC,EAGJf,EAAK,MAAQ,GACbA,EAAK,QAAU,GACfA,EAAK,aAAeW,EACpBX,EAAK,UAAYA,EAAK,aAAegB,EAAgBhB,CAAI,EAEzD,CAAC,GAAGS,CAAK,EAAE,QAASQ,GAAS,CACpBJ,EAAAK,EAAA,aAAaD,EAAM,MAAM,EAChCH,EAAaD,GAAQA,EAAK,OAAO,CAAC,IAAM,KAAOA,EAAK,MAAM,EAAE,IAAM,KAChEM,EAAA,cAAcN,EAAMO,EAAA,YAAY3B,CAAO,CAAC,EAEtCqB,IACGd,EAAA,MAAM,KAAKiB,CAAI,EACpBF,EAAOM,EAAAA,sBAAsBP,CAAU,EACvCd,EAAK,QAAQ,MACVO,EAAQQ,EAAK,IAAMf,E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,CACR,KAAK,sBAAsB,EAC3B,MAAM,QAAQ,CAChB,CACF,CAhIEgD,EADmB3C,EACZ,WAAWN,GAClBiD,EAFmB3C,EAEZ,OAAOD,GACd4C,EAHmB3C,EAGZ,cAAcJ"} \ No newline at end of file diff --git a/dist/components/scrollspy.d.ts b/dist/components/scrollspy.d.ts index 9b33d399..722ecc98 100644 --- a/dist/components/scrollspy.d.ts +++ b/dist/components/scrollspy.d.ts @@ -1,5 +1,5 @@ export interface BaseOptions { - [key: string]: any; + [key: string]: unknown; } declare class BaseComponent { element: HTMLElement; diff --git a/dist/components/scrollspy.mjs b/dist/components/scrollspy.mjs index 1f5ce5dd..13ed7f17 100644 --- a/dist/components/scrollspy.mjs +++ b/dist/components/scrollspy.mjs @@ -4,21 +4,20 @@ var h = (t, e, s) => W(t, typeof e != "symbol" ? e + "" : e, s); import { createCustomEvent as _, querySelector as L, getDocument as S, getWindow as k, isHTMLElement as v, scrollEvent as q, passiveHandler as G, getInstance as M, isWindow as C, getElementsByTagName as w, getAttribute as N, getBoundingClientRect as b, getDocumentElement as O, hasClass as u, removeClass as R, addClass as y, getDocumentBody as Y, dispatchEvent as $ } from "@thednp/shorty"; import { addListener as j, removeListener as z } from "@thednp/event-listener"; import { a as m } from "./activeClass-iqaD75Su.mjs"; -import { B as F } from "./base-component-nXu3wApu.mjs"; +import { B as F } from "./base-component-DHbs0JQk.mjs"; const J = "scrollspy", A = "ScrollSpy", K = '[data-bs-spy="scroll"]', P = { offset: 10, target: null }, Q = (t) => M(t, A), U = (t) => new d(t), I = _(`activate.bs.${J}`), V = (t) => { - const { target: e, scrollTarget: s, options: n, itemsLength: r, scrollHeight: o, element: a } = t, { offset: i } = n, l = C(s), c = e && w("A", e), g = s ? B(s) : ( - // istanbul ignore next @preserve - o - ); + const { target: e, scrollTarget: s, options: n, itemsLength: r, scrollHeight: o, element: a } = t, { offset: i } = n, l = C(s), c = e && w("A", e), g = s ? B(s) : o; t.scrollTop = l ? s.scrollY : s.scrollTop; // istanbul ignore else @preserve if (c && (g !== o || r !== c.length)) { let p, f, E; t.items = [], t.offsets = [], t.scrollHeight = g, t.maxScroll = t.scrollHeight - X(t), [...c].forEach((H) => { - p = N(H, "href"), f = p && p.charAt(0) === "#" && p.slice(-1) !== "#" && L(p, S(a)), f && (t.items.push(H), E = b(f), t.offsets.push((l ? E.top + t.scrollTop : f.offsetTop) - i)); + p = N(H, "href"), f = p && p.charAt(0) === "#" && p.slice(-1) !== "#" && L(p, S(a)), f && (t.items.push(H), E = b(f), t.offsets.push( + (l ? E.top + t.scrollTop : f.offsetTop) - i + )); }), t.itemsLength = t.items.length; } }, B = (t) => v(t) ? t.scrollHeight : O(t).scrollHeight, X = ({ element: t, scrollTarget: e }) => C(e) ? e.innerHeight : b(t).height, x = (t) => { @@ -81,10 +80,18 @@ class d extends F { * @param add when `true`, listener is added */ h(this, "_toggleEventListeners", (s) => { - (s ? j : z)(this.scrollTarget, q, this.refresh, G); + (s ? j : z)( + this.scrollTarget, + q, + this.refresh, + G + ); }); const { element: r, options: o } = this; - this.target = L(o.target, S(r)), this.target && (this.scrollTarget = r.clientHeight < r.scrollHeight ? r : k(r), this.scrollHeight = B(this.scrollTarget), this._toggleEventListeners(!0), this.refresh()); + this.target = L( + o.target, + S(r) + ), this.target && (this.scrollTarget = r.clientHeight < r.scrollHeight ? r : k(r), this.scrollHeight = B(this.scrollTarget), this._toggleEventListeners(!0), this.refresh()); } /* eslint-disable */ /** diff --git a/dist/components/scrollspy.mjs.map b/dist/components/scrollspy.mjs.map index cd3a5bd2..e76616b0 100644 --- a/dist/components/scrollspy.mjs.map +++ b/dist/components/scrollspy.mjs.map @@ -1 +1 @@ -{"version":3,"file":"scrollspy.mjs","sources":["../../src/strings/scrollspyString.ts","../../src/strings/scrollspyComponent.ts","../../src/components/scrollspy.ts"],"sourcesContent":["/** @type {string} */\nconst scrollspyString = 'scrollspy';\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = 'ScrollSpy';\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n getWindow,\n hasClass,\n isHTMLElement,\n isWindow,\n passiveHandler,\n querySelector,\n removeClass,\n scrollEvent,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport activeClass from '../strings/activeClass';\nimport scrollspyString from '../strings/scrollspyString';\nimport scrollspyComponent from '../strings/scrollspyComponent';\n\nimport BaseComponent from './base-component';\nimport { ScrollSpyEvent, ScrollSpyOptions } from '../interface/scrollspy';\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) => getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } = self;\n const { offset } = options;\n const isWin = isWindow(scrollTarget as Node | Window);\n\n const links = target && getElementsByTagName('A', target);\n const scrollHEIGHT = scrollTarget\n ? getScrollHeight(scrollTarget)\n : // istanbul ignore next @preserve\n scrollHeight;\n\n self.scrollTop = isWin ? (scrollTarget as Window).scrollY : (scrollTarget as HTMLElement).scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n [...links].forEach(link => {\n href = getAttribute(link, 'href');\n targetItem =\n href && href.charAt(0) === '#' && href.slice(-1) !== '#' && querySelector(href, getDocument(element));\n\n if (targetItem) {\n self.items.push(link);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push((isWin ? rect.top + self.scrollTop : targetItem.offsetTop) - offset);\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: Node | Window) => {\n return isHTMLElement(scrollTarget as Node)\n ? (scrollTarget as HTMLElement).scrollHeight\n : getDocumentElement(scrollTarget as Node).scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return isWindow(scrollTarget as Node) ? (scrollTarget as Window).innerHeight : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName('A', target)].forEach(item => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, 'nav') || hasClass(parentItem, 'dropdown-menu')) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach(menuItem => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement | Window;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(options.target as HTMLElement | string, getDocument(element));\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight ? element : getWindow(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // add event handlers\n this._toggleEventListeners(true);\n\n this.refresh();\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === 'undefined' || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /**\n * Toggles on/off the component event listener.\n *\n * @param add when `true`, listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.scrollTarget as EventTarget, scrollEvent, this.refresh, passiveHandler);\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n"],"names":["scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","element","getInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","createCustomEvent","updateSpyTargets","self","target","scrollTarget","options","itemsLength","scrollHeight","offset","isWin","isWindow","links","getElementsByTagName","scrollHEIGHT","getScrollHeight","href","targetItem","rect","getOffsetHeight","link","getAttribute","querySelector","getDocument","getBoundingClientRect","isHTMLElement","getDocumentElement","clear","item","hasClass","activeClass","removeClass","activate","addClass","parents","parentItem","getDocumentBody","menuItem","parentLink","dispatchEvent","BaseComponent","config","__publicField","scrollTop","maxScroll","items","activeItem","newActiveItem","offsets","i","add","addListener","removeListener","scrollEvent","passiveHandler","getWindow"],"mappings":";;;;;;;AACA,MAAMA,IAAkB,aCAlBC,IAAqB,aCiCrBC,IAAoB,0BAEpBC,IAAsC;AAAA,EAC1C,QAAQ;AAAA,EACR,QAAQ;AACV,GAUMC,IAAuB,CAACC,MAAyBC,EAAuBD,GAAS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E;AAAA,EACT;AAAA;AAAA,EA2DA,UAAU;AACR,SAAK,sBAAsB,GAC3B,MAAM,QAAQ;AAAA,EAChB;AACF;AAnHEgD,EADmB3C,GACZ,YAAWN,IAClBiD,EAFmB3C,GAEZ,QAAOD,IACd4C,EAHmB3C,GAGZ,eAAcJ;"} \ No newline at end of file +{"version":3,"file":"scrollspy.mjs","sources":["../../src/strings/scrollspyString.ts","../../src/strings/scrollspyComponent.ts","../../src/components/scrollspy.ts"],"sourcesContent":["/** @type {string} */\nconst scrollspyString = \"scrollspy\";\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = \"ScrollSpy\";\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n getWindow,\n hasClass,\n isHTMLElement,\n isWindow,\n passiveHandler,\n querySelector,\n removeClass,\n scrollEvent,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport activeClass from \"../strings/activeClass\";\nimport scrollspyString from \"../strings/scrollspyString\";\nimport scrollspyComponent from \"../strings/scrollspyComponent\";\n\nimport BaseComponent from \"./base-component\";\nimport { ScrollSpyEvent, ScrollSpyOptions } from \"../interface/scrollspy\";\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) =>\n getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent<\n ScrollSpyEventProps,\n ScrollSpyEvent\n>(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } =\n self;\n const { offset } = options;\n const isWin = isWindow(scrollTarget as Node | Window);\n\n const links = target && getElementsByTagName(\"A\", target);\n const scrollHEIGHT = scrollTarget\n ? getScrollHeight(scrollTarget)\n // istanbul ignore next @preserve\n : scrollHeight;\n\n self.scrollTop = isWin\n ? (scrollTarget as Window).scrollY\n : (scrollTarget as HTMLElement).scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (\n links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)\n ) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n [...links].forEach((link) => {\n href = getAttribute(link, \"href\");\n targetItem = href && href.charAt(0) === \"#\" && href.slice(-1) !== \"#\" &&\n querySelector(href, getDocument(element));\n\n if (targetItem) {\n self.items.push(link);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push(\n (isWin ? rect.top + self.scrollTop : targetItem.offsetTop) - offset,\n );\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: Node | Window) => {\n return isHTMLElement(scrollTarget as Node)\n ? (scrollTarget as HTMLElement).scrollHeight\n : getDocumentElement(scrollTarget as Node).scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return isWindow(scrollTarget as Node)\n ? (scrollTarget as Window).innerHeight\n : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName(\"A\", target)].forEach((item) => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, \"nav\") || hasClass(parentItem, \"dropdown-menu\")) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach((menuItem) => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement | Window;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(\n target: HTMLElement | string,\n config?: Partial,\n ) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(\n options.target as HTMLElement | string,\n getDocument(element),\n );\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight\n ? element\n : getWindow(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // add event handlers\n this._toggleEventListeners(true);\n\n this.refresh();\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === \"undefined\" || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /**\n * Toggles on/off the component event listener.\n *\n * @param add when `true`, listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(\n this.scrollTarget as EventTarget,\n scrollEvent,\n this.refresh,\n passiveHandler,\n );\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n"],"names":["scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","element","getInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","createCustomEvent","updateSpyTargets","self","target","scrollTarget","options","itemsLength","scrollHeight","offset","isWin","isWindow","links","getElementsByTagName","scrollHEIGHT","getScrollHeight","href","targetItem","rect","getOffsetHeight","link","getAttribute","querySelector","getDocument","getBoundingClientRect","isHTMLElement","getDocumentElement","clear","item","hasClass","activeClass","removeClass","activate","addClass","parents","parentItem","getDocumentBody","menuItem","parentLink","dispatchEvent","BaseComponent","config","__publicField","scrollTop","maxScroll","items","activeItem","newActiveItem","offsets","i","add","addListener","removeListener","scrollEvent","passiveHandler","getWindow"],"mappings":";;;;;;;AACA,MAAMA,IAAkB,aCAlBC,IAAqB,aCiCrBC,IAAoB,0BAEpBC,IAAsC;AAAA,EAC1C,QAAQ;AAAA,EACR,QAAQ;AACV,GAUMC,IAAuB,CAACC,MAC5BC,EAAuBD,GAASJ,CAAkB,GAK9CM,IAAwB,CAACF,MAAyB,IAAIG,EAAUH,CAAO,GAIvEI,IAAoBC,EAGxB,eAAeV,CAAe,EAAE,GAS5BW,IAAmB,CAACC,MAAoB;AAC5C,QAAM,EAAE,QAAAC,GAAQ,cAAAC,GAAc,SAAAC,GAAS,aAAAC,GAAa,cAAAC,GAAc,SAAAZ,EAChE,IAAAO,GACI,EAAE,QAAAM,EAAW,IAAAH,GACbI,IAAQC,EAASN,CAA6B,GAE9CO,IAAQR,KAAUS,EAAqB,KAAKT,CAAM,GAClDU,IAAeT,IACjBU,EAAgBV,CAAY,IAE5BG;AAEJ,EAAAL,EAAK,YAAYO,IACZL,EAAwB,UACxBA,EAA6B;AAAA,EAAA;AAIlC,MACEO,MAAUE,MAAiBN,KAAgBD,MAAgBK,EAAM,SACjE;AACI,QAAAI,GACAC,GACAC;AAGJ,IAAAf,EAAK,QAAQ,IACbA,EAAK,UAAU,IACfA,EAAK,eAAeW,GACpBX,EAAK,YAAYA,EAAK,eAAegB,EAAgBhB,CAAI,GAEzD,CAAC,GAAGS,CAAK,EAAE,QAAQ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AACQ,MAAkB;AAEzC,OADeA,IAAMC,IAAcC;AAAA,QAEjC,KAAK;AAAA,QACLC;AAAA,QACA,KAAK;AAAA,QACLC;AAAA,MAAA;AAAA,IACF;AA/FM,UAAA,EAAE,SAAA1D,GAAS,SAAAU,EAAY,IAAA;AAG7B,SAAK,SAASgB;AAAA,MACZhB,EAAQ;AAAA,MACRiB,EAAY3B,CAAO;AAAA,IAAA,GAIjB,KAAK,WAEP,KAAK,eAAeA,EAAQ,eAAeA,EAAQ,eAC/CA,IACA2D,EAAU3D,CAAO,GAChB,KAAA,eAAemB,EAAgB,KAAK,YAAY,GAGrD,KAAK,sBAAsB,EAAI,GAE/B,KAAK,QAAQ;AAAA,EAEjB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,OAAO;AACF,WAAAvB;AAAA,EACT;AAAA;AAAA;AAAA;AAAA,EAIA,IAAI,WAAW;AACN,WAAAE;AAAA,EACT;AAAA;AAAA,EAgEA,UAAU;AACR,SAAK,sBAAsB,GAC3B,MAAM,QAAQ;AAAA,EAChB;AACF;AAhIEgD,EADmB3C,GACZ,YAAWN,IAClBiD,EAFmB3C,GAEZ,QAAOD,IACd4C,EAHmB3C,GAGZ,eAAcJ;"} \ No newline at end of file diff --git a/dist/components/showClass-C8hdJfjQ.mjs.map b/dist/components/showClass-C8hdJfjQ.mjs.map index 953ced34..9dffc68b 100644 --- a/dist/components/showClass-C8hdJfjQ.mjs.map +++ b/dist/components/showClass-C8hdJfjQ.mjs.map @@ -1 +1 @@ -{"version":3,"file":"showClass-C8hdJfjQ.mjs","sources":["../../src/strings/showClass.ts"],"sourcesContent":["/**\n * Global namespace for most components `show` class.\n */\nconst showClass = 'show';\nexport default showClass;\n"],"names":["showClass"],"mappings":"AAGA,MAAMA,IAAY;"} \ No newline at end of file +{"version":3,"file":"showClass-C8hdJfjQ.mjs","sources":["../../src/strings/showClass.ts"],"sourcesContent":["/**\n * Global namespace for most components `show` class.\n */\nconst showClass = \"show\";\nexport default showClass;\n"],"names":["showClass"],"mappings":"AAGA,MAAMA,IAAY;"} \ No newline at end of file diff --git a/dist/components/showClass-D_Ms1FgG.js.map b/dist/components/showClass-D_Ms1FgG.js.map index 0ee2ccd7..7938d328 100644 --- a/dist/components/showClass-D_Ms1FgG.js.map +++ b/dist/components/showClass-D_Ms1FgG.js.map @@ -1 +1 @@ -{"version":3,"file":"showClass-D_Ms1FgG.js","sources":["../../src/strings/showClass.ts"],"sourcesContent":["/**\n * Global namespace for most components `show` class.\n */\nconst showClass = 'show';\nexport default showClass;\n"],"names":["showClass"],"mappings":"aAGA,MAAMA,EAAY"} \ No newline at end of file +{"version":3,"file":"showClass-D_Ms1FgG.js","sources":["../../src/strings/showClass.ts"],"sourcesContent":["/**\n * Global namespace for most components `show` class.\n */\nconst showClass = \"show\";\nexport default showClass;\n"],"names":["showClass"],"mappings":"aAGA,MAAMA,EAAY"} \ No newline at end of file diff --git a/dist/components/tab.cjs b/dist/components/tab.cjs index 2abcfe36..123aba91 100644 --- a/dist/components/tab.cjs +++ b/dist/components/tab.cjs @@ -1,9 +1,7 @@ "use strict";var P=Object.defineProperty;var k=(n,s,t)=>s in n?P(n,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[s]=t;var g=(n,s,t)=>k(n,typeof s!="symbol"?s+"":s,t);const e=require("@thednp/shorty"),H=require("@thednp/event-listener"),E=require("./collapsingClass-CLblascz.js"),d=require("./activeClass-CxJYQAGN.js"),h=require("./fadeClass-Co6nOzNJ.js"),m=require("./showClass-D_Ms1FgG.js"),p=require("./dropdownClasses-CnEyz_iw.js"),D=require("./dataBsToggle-Dj-Ng54N.js"),w=require("./getTargetElement-Cl-PhUJH.js"),_=require("./base-component-DBcDoOjV.js"),f="tab",B="Tab",L=`[${D.dataBsToggle}="${f}"]`,I=n=>e.getInstance(n,B),j=n=>new u(n),b=e.createCustomEvent(`show.bs.${f}`),q=e.createCustomEvent(`shown.bs.${f}`),T=e.createCustomEvent(`hide.bs.${f}`),M=e.createCustomEvent(`hidden.bs.${f}`),v=new Map,x=n=>{const{tabContent:s,nav:t}=n;// istanbul ignore else @preserve s&&e.hasClass(s,E.collapsingClass)&&(s.style.height="",e.removeClass(s,E.collapsingClass));// istanbul ignore else @preserve -t&&e.Timer.clear(t)},$=n=>{const{element:s,tabContent:t,content:a,nav:l}=n,{tab:r}=e.isHTMLElement(l)&&v.get(l)||{tab:null};// istanbul ignore next @preserve -// istanbul ignore else @preserve -if(t&&a&&e.hasClass(a,h.fadeClass)){const{currentHeight:o,nextHeight:i}=v.get(s)||{currentHeight:0,nextHeight:0};// istanbul ignore next @preserve -// istanbul ignore else @preserve: vitest won't validate this branch +t&&e.Timer.clear(t)},$=n=>{const{element:s,tabContent:t,content:a,nav:l}=n,{tab:r}=e.isHTMLElement(l)&&v.get(l)||{tab:null};// istanbul ignore else @preserve +if(t&&a&&e.hasClass(a,h.fadeClass)){const{currentHeight:o,nextHeight:i}=v.get(s)||{currentHeight:0,nextHeight:0};// istanbul ignore else @preserve: vitest won't validate this branch o!==i?setTimeout(()=>{t.style.height=`${i}px`,e.reflow(t),e.emulateTransitionEnd(t,()=>x(n))},50):x(n)}else l&&e.Timer.clear(l);q.relatedTarget=r,e.dispatchEvent(s,q)},S=n=>{const{element:s,content:t,tabContent:a,nav:l}=n,{tab:r,content:o}=l&&v.get(l)||{tab:null,content:null};let i=0;// istanbul ignore else @preserve a&&t&&e.hasClass(t,h.fadeClass)&&([o,t].forEach(c=>{// istanbul ignore else @preserve e.isHTMLElement(c)&&e.addClass(c,"overflow-hidden")}),i=e.isHTMLElement(o)?o.scrollHeight:0),b.relatedTarget=r,M.relatedTarget=s,e.dispatchEvent(s,b);// istanbul ignore else @preserve diff --git a/dist/components/tab.cjs.map b/dist/components/tab.cjs.map index d4ff95e3..ad09b064 100644 --- a/dist/components/tab.cjs.map +++ b/dist/components/tab.cjs.map @@ -1 +1 @@ -{"version":3,"file":"tab.cjs","sources":["../../src/strings/tabString.ts","../../src/strings/tabComponent.ts","../../src/components/tab.ts"],"sourcesContent":["/** @type {string} */\nconst tabString = 'tab';\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = 'Tab';\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport collapsingClass from '../strings/collapsingClass';\nimport activeClass from '../strings/activeClass';\nimport fadeClass from '../strings/fadeClass';\nimport showClass from '../strings/showClass';\nimport dropdownClasses from '../strings/dropdownClasses';\nimport dataBsToggle from '../strings/dataBsToggle';\nimport tabString from '../strings/tabString';\nimport tabComponent from '../strings/tabComponent';\n\nimport getTargetElement from '../util/getTargetElement';\nimport BaseComponent from './base-component';\nimport type { /* TabOptions, */ TabEvent } from '../interface/tab';\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) => getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(`show.bs.${tabString}`);\nconst shownTabEvent = createCustomEvent(`shown.bs.${tabString}`);\nconst hideTabEvent = createCustomEvent(`hide.bs.${tabString}`);\nconst hiddenTabEvent = createCustomEvent(`hidden.bs.${tabString}`);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = '';\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) || { tab: null }; // istanbul ignore next @preserve\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) || { currentHeight: 0, nextHeight: 0 }; // istanbul ignore next @preserve\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) || {\n // istanbul ignore next @preserve\n tab: null,\n content: null,\n };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach(c => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, 'overflow-hidden');\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight\n : // istanbul ignore next @preserve\n 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach(c => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, 'overflow-hidden');\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (self: Tab): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (activeTabs.length === 1 && !dropdownClasses.some(c => hasClass(activeTabs[0].parentElement as HTMLElement, c))) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement) ? getTargetElement(tab as HTMLElement) : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(',.')}`);\n return dropdown ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown) : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, '.nav');\n const container = closest(content, '.tab-content');\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, 'true');\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, 'true');\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, 'false');\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (content && (hasClass(content, fadeClass) || (nextContent && hasClass(nextContent, fadeClass)))) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n"],"names":["tabString","tabComponent","tabSelector","dataBsToggle","getTabInstance","element","getInstance","tabInitCallback","Tab","showTabEvent","createCustomEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","self","tabContent","nav","hasClass","collapsingClass","removeClass","Timer","triggerTabShow","nextContent","tab","isHTMLElement","fadeClass","currentHeight","nextHeight","reflow","emulateTransitionEnd","dispatchEvent","triggerTabHide","content","addClass","activeClass","c","showClass","getActiveTab","activeTabs","getElementsByClassName","dropdownClasses","getTargetElement","getParentDropdown","dropdown","closest","querySelector","tabClickHandler","e","BaseComponent","target","__publicField","add","addListener","removeListener","mouseclickEvent","container","firstTab","firstTabContent","setAttribute","ariaSelected","activeDropdown","toggleTab"],"mappings":"4jBACMA,EAAY,MCAZC,EAAe,MCqCfC,EAAc,IAAIC,EAAAA,YAAY,KAAKH,CAAS,KAM5CI,EAAkBC,GAAyBC,EAAA,YAAiBD,EAASJ,CAAY,EAGjFM,EAAmBF,GAAyB,IAAIG,EAAIH,CAAO,EAQ3DI,EAAeC,EAAAA,kBAA2C,WAAWV,CAAS,EAAE,EAChFW,EAAgBD,EAAAA,kBAA2C,YAAYV,CAAS,EAAE,EAClFY,EAAeF,EAAAA,kBAA2C,WAAWV,CAAS,EAAE,EAChFa,EAAiBH,EAAAA,kBAA2C,aAAaV,CAAS,EAAE,EAapFc,MAA+C,IAS/CC,EAAiBC,GAAc,CAC7B,KAAA,CAAE,WAAAC,EAAY,IAAAC,CAAQ,EAAAF,EAAA;AAGxBC,GAAcE,EAAAA,SAASF,EAAYG,EAAe,eAAA,IACpDH,EAAW,MAAM,OAAS,GAC1BI,cAAYJ,EAAYG,EAAAA,eAAe,GACzC;AAGIF,GAAWI,EAAAA,MAAA,MAAMJ,CAAG,CAC1B,EAOMK,EAAkBP,GAAc,CACpC,KAAM,CAAE,QAAAX,EAAS,WAAAY,EAAY,QAASO,EAAa,IAAAN,CAAQ,EAAAF,EACrD,CAAE,IAAAS,CAAA,EAASC,EAAA,cAAcR,CAAG,GAAKJ,E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,MAAA,IAAIJ,EAAK6C,EAAW,CAAC,EACZA,EAAA,CACnB,CAAA;AAGI7B,IACFb,cAAYa,EAASI,EAAAA,SAAS,EAC1BnB,EAAA,SAASe,EAASP,EAAAA,SAAS,EAC7BI,EAAAA,qBAAqBG,EAAS,IAAMD,EAAe,IAAI,CAAC,EAExDA,EAAe,IAAI,EAGzB,CACF,CACF,CACF,CAaA,SAAU,CACR,KAAK,sBAAsB,EAC3B,MAAM,QAAQ,CAChB,CACF,CAxIEmB,EADmB5C,EACZ,WAAWN,GAClBkD,EAFmB5C,EAEZ,OAAOD,GACd6C,EAHmB5C,EAGZ,cAAcJ"} \ No newline at end of file +{"version":3,"file":"tab.cjs","sources":["../../src/strings/tabString.ts","../../src/strings/tabComponent.ts","../../src/components/tab.ts"],"sourcesContent":["/** @type {string} */\nconst tabString = \"tab\";\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = \"Tab\";\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport collapsingClass from \"../strings/collapsingClass\";\nimport activeClass from \"../strings/activeClass\";\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dropdownClasses from \"../strings/dropdownClasses\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport tabString from \"../strings/tabString\";\nimport tabComponent from \"../strings/tabComponent\";\n\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport type { /* TabOptions, */ TabEvent } from \"../interface/tab\";\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) =>\n getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(\n `show.bs.${tabString}`,\n);\nconst shownTabEvent = createCustomEvent(\n `shown.bs.${tabString}`,\n);\nconst hideTabEvent = createCustomEvent(\n `hide.bs.${tabString}`,\n);\nconst hiddenTabEvent = createCustomEvent(\n `hidden.bs.${tabString}`,\n);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = \"\";\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null };\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) ||\n // istanbul ignore next @preserve\n { currentHeight: 0, nextHeight: 0 };\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null, content: null };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, \"overflow-hidden\");\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight // istanbul ignore next @preserve\n : 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, \"overflow-hidden\");\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (\n self: Tab,\n): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (\n activeTabs.length === 1 &&\n !dropdownClasses.some((c) =>\n hasClass(activeTabs[0].parentElement as HTMLElement, c)\n )\n ) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement)\n ? getTargetElement(tab as HTMLElement)\n : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(\",.\")}`);\n return dropdown\n ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown)\n : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, \".nav\");\n const container = closest(content, \".tab-content\");\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, \"false\");\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (\n content &&\n (hasClass(content, fadeClass) ||\n (nextContent && hasClass(nextContent, fadeClass)))\n ) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n"],"names":["tabString","tabComponent","tabSelector","dataBsToggle","getTabInstance","element","getInstance","tabInitCallback","Tab","showTabEvent","createCustomEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","self","tabContent","nav","hasClass","collapsingClass","removeClass","Timer","triggerTabShow","nextContent","tab","isHTMLElement","fadeClass","currentHeight","nextHeight","reflow","emulateTransitionEnd","dispatchEvent","triggerTabHide","content","addClass","activeClass","c","showClass","getActiveTab","activeTabs","getElementsByClassName","dropdownClasses","getTargetElement","getParentDropdown","dropdown","closest","querySelector","tabClickHandler","e","BaseComponent","target","__publicField","add","addListener","removeListener","mouseclickEvent","container","firstTab","firstTabContent","setAttribute","ariaSelected","activeDropdown","toggleTab"],"mappings":"4jBACMA,EAAY,MCAZC,EAAe,MCqCfC,EAAc,IAAIC,EAAAA,YAAY,KAAKH,CAAS,KAM5CI,EAAkBC,GACtBC,EAAA,YAAiBD,EAASJ,CAAY,EAGlCM,EAAmBF,GAAyB,IAAIG,EAAIH,CAAO,EAQ3DI,EAAeC,EAAA,kBACn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,WAAW,EAChBwB,EAAAA,aAAAvD,EAASwD,eAAc,MAAM,EAE1C,MAAMC,EAAiBpC,EAAAA,cAAcD,CAAG,GAAKmB,EAAkBnB,CAAG,EAC9DqC,GAAkB3C,EAAAA,SAAS2C,EAAgB1B,EAAW,WAAA,GACxDf,cAAYyC,EAAgB1B,EAAAA,WAAW,EACzC;AAGA,GAAIlB,EAAK,CACP,MAAM6C,EAAY,IAAM,CAAA;AAElBtC,IACFJ,cAAYI,EAAKW,EAAAA,WAAW,EACfwB,EAAAA,aAAAnC,EAAKoC,eAAc,OAAO,GAErChB,GAAY,CAAC1B,EAAAA,SAAS0B,EAAUT,EAAW,WAAA,GAC7CD,WAASU,EAAUT,EAAAA,WAAW,CAChC,EAIAF,IACCf,WAASe,EAASP,EAAS,SAAA,GACzBH,GAAeL,WAASK,EAAaG,EAAS,SAAA,GAE3CL,EAAAA,MAAA,IAAIJ,EAAK6C,EAAW,CAAC,EACZA,EAAA,CACnB,CAAA;AAGI7B,IACFb,cAAYa,EAASI,EAAAA,SAAS,EAC1BnB,EAAA,SAASe,EAASP,EAAAA,SAAS,EAC7BI,EAAAA,qBAAqBG,EAAS,IAAMD,EAAe,IAAI,CAAC,EAExDA,EAAe,IAAI,EAGzB,CACF,CACF,CACF,CAaA,SAAU,CACR,KAAK,sBAAsB,EAC3B,MAAM,QAAQ,CAChB,CACF,CA5IEmB,EADmB5C,EACZ,WAAWN,GAClBkD,EAFmB5C,EAEZ,OAAOD,GACd6C,EAHmB5C,EAGZ,cAAcJ"} \ No newline at end of file diff --git a/dist/components/tab.d.ts b/dist/components/tab.d.ts index 5fabe115..06b01ff4 100644 --- a/dist/components/tab.d.ts +++ b/dist/components/tab.d.ts @@ -1,5 +1,5 @@ export interface BaseOptions { - [key: string]: any; + [key: string]: unknown; } declare class BaseComponent { element: HTMLElement; diff --git a/dist/components/tab.mjs b/dist/components/tab.mjs index 075f5c95..0d5cfc92 100644 --- a/dist/components/tab.mjs +++ b/dist/components/tab.mjs @@ -10,20 +10,28 @@ import { s as E } from "./showClass-C8hdJfjQ.mjs"; import { d as I } from "./dropdownClasses-CdCdZ-PX.mjs"; import { d as Y } from "./dataBsToggle-B84TS15h.mjs"; import { g as P } from "./getTargetElement-DbfK8LsG.mjs"; -import { B as Z } from "./base-component-nXu3wApu.mjs"; -const v = "tab", J = "Tab", D = `[${Y}="${v}"]`, K = (n) => U(n, J), tt = (n) => new T(n), L = H(`show.bs.${v}`), M = H(`shown.bs.${v}`), y = H(`hide.bs.${v}`), _ = H(`hidden.bs.${v}`), p = /* @__PURE__ */ new Map(), A = (n) => { +import { B as Z } from "./base-component-DHbs0JQk.mjs"; +const v = "tab", J = "Tab", D = `[${Y}="${v}"]`, K = (n) => U(n, J), tt = (n) => new T(n), L = H( + `show.bs.${v}` +), M = H( + `shown.bs.${v}` +), y = H( + `hide.bs.${v}` +), _ = H( + `hidden.bs.${v}` +), p = /* @__PURE__ */ new Map(), A = (n) => { const { tabContent: e, nav: t } = n; // istanbul ignore else @preserve e && f(e, B) && (e.style.height = "", b(e, B)); // istanbul ignore else @preserve t && C.clear(t); }, j = (n) => { - const { element: e, tabContent: t, content: s, nav: o } = n, { tab: r } = d(o) && p.get(o) || { tab: null }; - // istanbul ignore next @preserve + const { element: e, tabContent: t, content: s, nav: o } = n, { tab: r } = d(o) && p.get(o) || // istanbul ignore next @preserve + { tab: null }; // istanbul ignore else @preserve if (t && s && f(s, m)) { - const { currentHeight: i, nextHeight: a } = p.get(e) || { currentHeight: 0, nextHeight: 0 }; - // istanbul ignore next @preserve + const { currentHeight: i, nextHeight: a } = p.get(e) || // istanbul ignore next @preserve + { currentHeight: 0, nextHeight: 0 }; // istanbul ignore else @preserve: vitest won't validate this branch i !== a ? setTimeout(() => { t.style.height = `${a}px`, G(t), k(t, () => A(n)); @@ -31,20 +39,14 @@ const v = "tab", J = "Tab", D = `[${Y}="${v}"]`, K = (n) => U(n, J), tt = (n) => } else o && C.clear(o); M.relatedTarget = r, w(e, M); }, q = (n) => { - const { element: e, content: t, tabContent: s, nav: o } = n, { tab: r, content: i } = o && p.get(o) || { - // istanbul ignore next @preserve - tab: null, - content: null - }; + const { element: e, content: t, tabContent: s, nav: o } = n, { tab: r, content: i } = o && p.get(o) || // istanbul ignore next @preserve + { tab: null, content: null }; let a = 0; // istanbul ignore else @preserve s && t && f(t, m) && ([i, t].forEach((c) => { // istanbul ignore else @preserve d(c) && g(c, "overflow-hidden"); - }), a = d(i) ? i.scrollHeight : ( - // istanbul ignore next @preserve - 0 - )), L.relatedTarget = r, _.relatedTarget = e, w(e, L); + }), a = d(i) ? i.scrollHeight : 0), L.relatedTarget = r, _.relatedTarget = e, w(e, L); // istanbul ignore else @preserve if (!L.defaultPrevented) { // istanbul ignore else @preserve @@ -85,7 +87,9 @@ const v = "tab", J = "Tab", D = `[${Y}="${v}"]`, K = (n) => U(n, J), tt = (n) => const t = V(l, e); let s = null; // istanbul ignore else @preserve - t.length === 1 && !I.some((r) => f(t[0].parentElement, r)) ? [s] = t : t.length > 1 && (s = t[t.length - 1]); + t.length === 1 && !I.some( + (r) => f(t[0].parentElement, r) + ) ? [s] = t : t.length > 1 && (s = t[t.length - 1]); const o = d(s) ? P(s) : null; return { tab: s, content: o }; }, z = (n) => { diff --git a/dist/components/tab.mjs.map b/dist/components/tab.mjs.map index 1f86dcc1..b228bc06 100644 --- a/dist/components/tab.mjs.map +++ b/dist/components/tab.mjs.map @@ -1 +1 @@ -{"version":3,"file":"tab.mjs","sources":["../../src/strings/tabString.ts","../../src/strings/tabComponent.ts","../../src/components/tab.ts"],"sourcesContent":["/** @type {string} */\nconst tabString = 'tab';\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = 'Tab';\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport collapsingClass from '../strings/collapsingClass';\nimport activeClass from '../strings/activeClass';\nimport fadeClass from '../strings/fadeClass';\nimport showClass from '../strings/showClass';\nimport dropdownClasses from '../strings/dropdownClasses';\nimport dataBsToggle from '../strings/dataBsToggle';\nimport tabString from '../strings/tabString';\nimport tabComponent from '../strings/tabComponent';\n\nimport getTargetElement from '../util/getTargetElement';\nimport BaseComponent from './base-component';\nimport type { /* TabOptions, */ TabEvent } from '../interface/tab';\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) => getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(`show.bs.${tabString}`);\nconst shownTabEvent = createCustomEvent(`shown.bs.${tabString}`);\nconst hideTabEvent = createCustomEvent(`hide.bs.${tabString}`);\nconst hiddenTabEvent = createCustomEvent(`hidden.bs.${tabString}`);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = '';\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) || { tab: null }; // istanbul ignore next @preserve\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) || { currentHeight: 0, nextHeight: 0 }; // istanbul ignore next @preserve\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) || {\n // istanbul ignore next @preserve\n tab: null,\n content: null,\n };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach(c => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, 'overflow-hidden');\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight\n : // istanbul ignore next @preserve\n 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach(c => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, 'overflow-hidden');\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (self: Tab): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (activeTabs.length === 1 && !dropdownClasses.some(c => hasClass(activeTabs[0].parentElement as HTMLElement, c))) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement) ? getTargetElement(tab as HTMLElement) : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(',.')}`);\n return dropdown ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown) : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, '.nav');\n const container = closest(content, '.tab-content');\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, 'true');\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, 'true');\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, 'false');\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (content && (hasClass(content, fadeClass) || (nextContent && hasClass(nextContent, fadeClass)))) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n"],"names":["tabString","tabComponent","tabSelector","dataBsToggle","getTabInstance","element","getInstance","tabInitCallback","Tab","showTabEvent","createCustomEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","self","tabContent","nav","hasClass","collapsingClass","removeClass","Timer","triggerTabShow","nextContent","tab","isHTMLElement","fadeClass","currentHeight","nextHeight","reflow","emulateTransitionEnd","dispatchEvent","triggerTabHide","content","addClass","activeClass","c","showClass","getActiveTab","activeTabs","getElementsByClassName","dropdownClasses","getTargetElement","getParentDropdown","dropdown","closest","querySelector","tabClickHandler","e","BaseComponent","target","__publicField","add","addListener","removeListener","mouseclickEvent","container","firstTab","firstTabContent","setAttribute","ariaSelected","activeDropdown","toggleTab"],"mappings":";;;;;;;;;;;;;AACA,MAAMA,IAAY,OCAZC,IAAe,OCqCfC,IAAc,IAAIC,CAAY,KAAKH,CAAS,MAM5CI,IAAiB,CAACC,MAAyBC,EAAiBD,GAASJ,CAAY,GAGjFM,KAAkB,CAACF,MAAyB,IAAIG,EAAIH,CAAO,GAQ3DI,IAAeC,EAA2C,WAAWV,CAAS,EAAE,GAChFW,IAAgBD,EAA2C,YAAYV,CAAS,EAAE,GAClFY,IAAeF,EAA2C,WAAWV,CAAS,EAAE,GAChFa,IAAiBH,EAA2C,aAAaV,CAAS,EAAE,GAapFc,wBAA+C,OAS/CC,IAAgB,CAACC,MAAc;AAC7B,QAAA,EAAE,YAAAC,GAAY,KAAAC,EAAQ,IAAAF;AAAA,EAAA;AAG5B,EAAIC,KAAcE,EAASF,GAAYG,CAAe,MACpDH,EAAW,MAAM,SAAS,IAC1BI,EAAYJ,GAAYG,CAAe;AAAA,EACzC;AAGI,EAAAF,KAAWI,EAAA,MAAMJ,CAAG;AAC1B,GAOMK,IAAiB,CAACP,MAAc;AACpC,QAAM,EAAE,SAAAX,GAAS,YAAAY,GAAY,SAASO,GAAa,KAAAN,EAAQ,IAAAF,GACrD,EAAE,KAAAS,EAAA,IAASC,EAAcR,CAAG,KAAKJ,EAAW,IAAII,CAAG,KAAM,EAAE,KAAK,KAAK;AAAA,EAAA;AAAA,EAAG;AAG9E,MAAID,KAAcO,KAAeL,EAASK,GAAaG,CAAS,GAAG;AACjE,UAAM,EAAE,eAAAC,GAAe,YAAAC,EAAW,IAAIf,EAAW,IAAIT,CAAO,KAAK,EAAE,eAAe,GAAG,YAAY,EAAE;AAAA,IAAA;AAAA,IAAG;AAEtG,IAAIuB,MAAkBC,IAEpB,WAAW,MAAM;AACJ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I,EAAqBG,GAAS,MAAMD,EAAe,IAAI,CAAC,IAExDA,EAAe,IAAI;AAAA,QAGzB;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA;AAAA,EAaA,UAAU;AACR,SAAK,sBAAsB,GAC3B,MAAM,QAAQ;AAAA,EAChB;AACF;AAxIEmB,EADmB5C,GACZ,YAAWN,IAClBkD,EAFmB5C,GAEZ,QAAOD,KACd6C,EAHmB5C,GAGZ,eAAcJ;"} \ No newline at end of file +{"version":3,"file":"tab.mjs","sources":["../../src/strings/tabString.ts","../../src/strings/tabComponent.ts","../../src/components/tab.ts"],"sourcesContent":["/** @type {string} */\nconst tabString = \"tab\";\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = \"Tab\";\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport collapsingClass from \"../strings/collapsingClass\";\nimport activeClass from \"../strings/activeClass\";\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dropdownClasses from \"../strings/dropdownClasses\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport tabString from \"../strings/tabString\";\nimport tabComponent from \"../strings/tabComponent\";\n\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport type { /* TabOptions, */ TabEvent } from \"../interface/tab\";\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) =>\n getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(\n `show.bs.${tabString}`,\n);\nconst shownTabEvent = createCustomEvent(\n `shown.bs.${tabString}`,\n);\nconst hideTabEvent = createCustomEvent(\n `hide.bs.${tabString}`,\n);\nconst hiddenTabEvent = createCustomEvent(\n `hidden.bs.${tabString}`,\n);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = \"\";\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null };\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) ||\n // istanbul ignore next @preserve\n { currentHeight: 0, nextHeight: 0 };\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null, content: null };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, \"overflow-hidden\");\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight // istanbul ignore next @preserve\n : 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, \"overflow-hidden\");\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (\n self: Tab,\n): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (\n activeTabs.length === 1 &&\n !dropdownClasses.some((c) =>\n hasClass(activeTabs[0].parentElement as HTMLElement, c)\n )\n ) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement)\n ? getTargetElement(tab as HTMLElement)\n : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(\",.\")}`);\n return dropdown\n ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown)\n : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, \".nav\");\n const container = closest(content, \".tab-content\");\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, \"false\");\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (\n content &&\n (hasClass(content, fadeClass) ||\n (nextContent && hasClass(nextContent, fadeClass)))\n ) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n"],"names":["tabString","tabComponent","tabSelector","dataBsToggle","getTabInstance","element","getInstance","tabInitCallback","Tab","showTabEvent","createCustomEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","self","tabContent","nav","hasClass","collapsingClass","removeClass","Timer","triggerTabShow","nextContent","tab","isHTMLElement","fadeClass","currentHeight","nextHeight","reflow","emulateTransitionEnd","dispatchEvent","triggerTabHide","content","addClass","activeClass","c","showClass","getActiveTab","activeTabs","getElementsByClassName","dropdownClasses","getTargetElement","getParentDropdown","dropdown","closest","querySelector","tabClickHandler","e","BaseComponent","target","__publicField","add","addListener","removeListener","mouseclickEvent","container","firstTab","firstTabContent","setAttribute","ariaSelected","activeDropdown","toggleTab"],"mappings":";;;;;;;;;;;;;AACA,MAAMA,IAAY,OCAZC,IAAe,OCqCfC,IAAc,IAAIC,CAAY,KAAKH,CAAS,MAM5CI,IAAiB,CAACC,MACtBC,EAAiBD,GAASJ,CAAY,GAGlCM,KAAkB,CAACF,MAAyB,IAAIG,EAAIH,CAAO,GAQ3DI,IAAeC;AAAA,EACnB,WAAWV,CAAS;AACtB,GACMW,IAAgBD;AAAA,EACpB,YAAYV,CAAS;AACvB,GACMY,IAAeF;AAAA,EACnB,WAAWV,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AA,QAAA;AAE1C,YAAA,CAACA,EAAa,kBAAkB;AAClC,UAAAuB,EAAS9B,GAAS+B,CAAW,GAChBwB,EAAAvD,GAASwD,GAAc,MAAM;AAE1C,gBAAMC,IAAiBpC,EAAcD,CAAG,KAAKmB,EAAkBnB,CAAG;AAClE,UAAIqC,KAAkB3C,EAAS2C,GAAgB1B,CAAW,KACxDf,EAAYyC,GAAgB1B,CAAW;AAAA,UACzC;AAGA,cAAIlB,GAAK;AACP,kBAAM6C,IAAY,MAAM;AAAA,cAAA;AAEtB,cAAItC,MACFJ,EAAYI,GAAKW,CAAW,GACfwB,EAAAnC,GAAKoC,GAAc,OAAO,IAErChB,KAAY,CAAC1B,EAAS0B,GAAUT,CAAW,KAC7CD,EAASU,GAAUT,CAAW;AAAA,YAChC;AAIA,YAAAF,MACCf,EAASe,GAASP,CAAS,KACzBH,KAAeL,EAASK,GAAaG,CAAS,KAE3CL,EAAA,IAAIJ,GAAK6C,GAAW,CAAC,IACZA,EAAA;AAAA,UACnB;AAAA,UAAA;AAGA,UAAI7B,MACFb,EAAYa,GAASI,CAAS,GAC1BnB,EAASe,GAASP,CAAS,IAC7BI,EAAqBG,GAAS,MAAMD,EAAe,IAAI,CAAC,IAExDA,EAAe,IAAI;AAAA,QAGzB;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA;AAAA,EAaA,UAAU;AACR,SAAK,sBAAsB,GAC3B,MAAM,QAAQ;AAAA,EAChB;AACF;AA5IEmB,EADmB5C,GACZ,YAAWN,IAClBkD,EAFmB5C,GAEZ,QAAOD,KACd6C,EAHmB5C,GAGZ,eAAcJ;"} \ No newline at end of file diff --git a/dist/components/toast.cjs.map b/dist/components/toast.cjs.map index 8797ed37..6c840ea8 100644 --- a/dist/components/toast.cjs.map +++ b/dist/components/toast.cjs.map @@ -1 +1 @@ -{"version":3,"file":"toast.cjs","sources":["../../src/strings/toastString.ts","../../src/strings/toastComponent.ts","../../src/components/toast.ts"],"sourcesContent":["/** @type {string} */\nconst toastString = 'toast';\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = 'Toast';\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport fadeClass from '../strings/fadeClass';\nimport showClass from '../strings/showClass';\nimport dataBsDismiss from '../strings/dataBsDismiss';\nimport dataBsToggle from '../strings/dataBsToggle';\nimport toastString from '../strings/toastString';\nimport toastComponent from '../strings/toastComponent';\nimport getTargetElement from '../util/getTargetElement';\nimport BaseComponent from './base-component';\nimport { ToastEvent, ToastOptions } from '../interface/toast';\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = 'showing';\n/** @deprecated */\nconst hideClass = 'hide';\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) => getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(`show.bs.${toastString}`);\nconst shownToastEvent = createCustomEvent, ToastEvent>(`shown.bs.${toastString}`);\nconst hideToastEvent = createCustomEvent, ToastEvent>(`hide.bs.${toastString}`);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(`hidden.bs.${toastString}`);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === 'A') e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (self && element !== relatedTarget && !element.contains(relatedTarget as Node)) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [...querySelectorAll(toastToggleSelector, getDocument(element))].filter(\n btn => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(e =>\n action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach(btn => action(btn, mouseclickEvent, toastClickHandler));\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n"],"names":["toastString","toastComponent","toastSelector","toastDismissSelector","dataBsDismiss","toastToggleSelector","dataBsToggle","showingClass","hideClass","toastDefaults","getToastInstance","element","getInstance","toastInitCallback","Toast","showToastEvent","createCustomEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","self","options","removeClass","Timer","dispatchEvent","hideToastComplete","showClass","addClass","hideToast","reflow","emulateTransitionEnd","showToast","toastClickHandler","e","target","trigger","closest","getTargetElement","interactiveToastHandler","type","relatedTarget","mouseenterEvent","focusinEvent","BaseComponent","config","__publicField","isShown","add","action","addListener","removeListener","triggers","dismiss","hide","mouseclickEvent","focusoutEvent","mouseleaveEvent","btn","hasClass","fadeClass","querySelector","querySelectorAll","getDocument"],"mappings":"weACMA,EAAc,QCAdC,EAAiB,QCoCjBC,EAAgB,IAAIF,CAAW,GAC/BG,EAAuB,IAAIC,EAAAA,aAAa,KAAKJ,CAAW,KACxDK,EAAsB,IAAIC,EAAAA,YAAY,KAAKN,CAAW,KAC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EAAS,SAAA,CACzC,CAyDA,SAAU,CACF,KAAA,CAAE,QAAAhB,EAAS,QAAAoC,CAAY,EAAA,KAC7B,KAAK,sBAAsB,EACrBvB,EAAAA,MAAA,MAAMb,EAASX,CAAW,EAE5B+C,GACFxB,cAAYZ,EAASgB,EAAAA,SAAS,EAEhC,MAAM,QAAQ,CAChB,CACF,CAtHEmB,EADmBhC,EACZ,WAAWZ,GAClB4C,EAFmBhC,EAEZ,OAAOD,GACdiC,EAHmBhC,EAGZ,cAAcJ"} \ No newline at end of file +{"version":3,"file":"toast.cjs","sources":["../../src/strings/toastString.ts","../../src/strings/toastComponent.ts","../../src/components/toast.ts"],"sourcesContent":["/** @type {string} */\nconst toastString = \"toast\";\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = \"Toast\";\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport toastString from \"../strings/toastString\";\nimport toastComponent from \"../strings/toastComponent\";\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport { ToastEvent, ToastOptions } from \"../interface/toast\";\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = \"showing\";\n/** @deprecated */\nconst hideClass = \"hide\";\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) =>\n getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(\n `show.bs.${toastString}`,\n);\nconst shownToastEvent = createCustomEvent, ToastEvent>(\n `shown.bs.${toastString}`,\n);\nconst hideToastEvent = createCustomEvent, ToastEvent>(\n `hide.bs.${toastString}`,\n);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(\n `hidden.bs.${toastString}`,\n);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === \"A\") e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (\n self && element !== relatedTarget &&\n !element.contains(relatedTarget as Node)\n ) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [\n ...querySelectorAll(toastToggleSelector, getDocument(element)),\n ].filter(\n (btn) => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(\n (e) => action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach((btn) =>\n action(btn, mouseclickEvent, toastClickHandler)\n );\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n"],"names":["toastString","toastComponent","toastSelector","toastDismissSelector","dataBsDismiss","toastToggleSelector","dataBsToggle","showingClass","hideClass","toastDefaults","getToastInstance","element","getInstance","toastInitCallback","Toast","showToastEvent","createCustomEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","self","options","removeClass","Timer","dispatchEvent","hideToastComplete","showClass","addClass","hideToast","reflow","emulateTransitionEnd","showToast","toastClickHandler","e","target","trigger","closest","getTargetElement","interactiveToastHandler","type","relatedTarget","mouseenterEvent","focusinEvent","BaseComponent","config","__publicField","isShown","add","action","addListener","removeListener","triggers","dismiss","hide","mouseclickEvent","focusoutEvent","mouseleaveEvent","btn","hasClass","fadeClass","querySelector","querySelectorAll","getDocument"],"mappings":"weACMA,EAAc,QCAdC,EAAiB,QCoCjBC,EAAgB,IAAIF,CAAW,GAC/BG,EAAuB,IAAIC,EAAAA,aAAa,KAAKJ,CAAW,KACxDK,EAAsB,IAAIC,EAAAA,YAAY,KAAKN,CAAW,KACtDO,EAAe,UAEfC,EAAY,OAEZC,EAAgB,CACpB,UAAW,GACX,SAAU,GACV,MAAO,GACT,EAMMC,EAAoBC,GACxBC,EAAA,YAAmBD,EAASV,CAAc,EAKtCY,EAAqBF,GAAyB,IAAIG,EAAMH,CAAO,EAI/DI,EAAiBC,EAAA,kBACrB,WAAWhB,CAAW,EACxB,EACMiB,EAAkBD,EAAA,kBACtB,YAAYhB,CAAW,EACzB,EACMkB,EAAiBF,EAAA,kBACrB,WAAWhB,CAAW,EACxB,EACMmB,EAAmBH,EAAA,kBACvB,aAAahB,CAAW,EAC1B,EASMoB,EAAqBC,GAAgB,CACnC,KAAA,CAAE,QAAAV,EAAS,QAAAW,CAAY,EAAAD,EAC7BE,cAAYZ,EAASJ,CAAY,EAC3BiB,EAAAA,MAAA,MAAMb,EAASJ,CAAY,EAEjCkB,gBAAcd,EAASM,CAAe,EAAA;AAElCK,EAAQ,UACJE,QAAA,IAAIb,EAAS,IAAMU,EAAK,OAAQC,EAAQ,MAAOtB,CAAW,CAEpE,EAOM0B,EAAqBL,GAAgB,CACnC,KAAA,CAAE,QAAAV,CAAY,EAAAU,EAC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EAAS,SAAA,EACnDhC,WAASjB,EAASiD,EAAAA,SAAS,EAClB,CAACtC,EAAQ,WAAaqC,EAAAA,SAAShD,EAASiD,EAAAA,SAAS,GAC1DrC,cAAYZ,EAASiD,EAAAA,SAAS,EAI3B,KAAA,QAAUC,EAAAA,cAAc1D,EAAsBQ,CAAO,EAG1D,KAAK,SAAW,CACd,GAAGmD,mBAAiBzD,EAAqB0D,EAAA,YAAYpD,CAAO,CAAC,CAAA,EAC7D,OACC+C,GAAQpB,EAAAA,iBAAiBoB,CAAG,IAAM/C,CAAA,EAIrC,KAAK,sBAAsB,EAAI,CACjC,CAIA,IAAI,MAAO,CACF,OAAAV,CACT,CAIA,IAAI,UAAW,CACN,OAAAQ,CACT,CAIA,IAAI,SAAU,CACL,OAAAkD,WAAS,KAAK,QAAShC,EAAS,SAAA,CACzC,CA2DA,SAAU,CACF,KAAA,CAAE,QAAAhB,EAAS,QAAAoC,CAAY,EAAA,KAC7B,KAAK,sBAAsB,EACrBvB,EAAAA,MAAA,MAAMb,EAASX,CAAW,EAE5B+C,GACFxB,cAAYZ,EAASgB,EAAAA,SAAS,EAEhC,MAAM,QAAQ,CAChB,CACF,CA1HEmB,EADmBhC,EACZ,WAAWZ,GAClB4C,EAFmBhC,EAEZ,OAAOD,GACdiC,EAHmBhC,EAGZ,cAAcJ"} \ No newline at end of file diff --git a/dist/components/toast.d.ts b/dist/components/toast.d.ts index d3ba396e..78871324 100644 --- a/dist/components/toast.d.ts +++ b/dist/components/toast.d.ts @@ -1,5 +1,5 @@ export interface BaseOptions { - [key: string]: any; + [key: string]: unknown; } declare class BaseComponent { element: HTMLElement; diff --git a/dist/components/toast.mjs b/dist/components/toast.mjs index b1e889c9..b63b89b9 100644 --- a/dist/components/toast.mjs +++ b/dist/components/toast.mjs @@ -8,12 +8,20 @@ import { s as p } from "./showClass-C8hdJfjQ.mjs"; import { d as R } from "./dataBsDismiss-DdNPQYa-.mjs"; import { d as U } from "./dataBsToggle-B84TS15h.mjs"; import { g as k } from "./getTargetElement-DbfK8LsG.mjs"; -import { B as V } from "./base-component-nXu3wApu.mjs"; +import { B as V } from "./base-component-DHbs0JQk.mjs"; const i = "toast", _ = "Toast", W = `.${i}`, X = `[${R}="${i}"]`, q = `[${U}="${i}"]`, l = "showing", x = "hide", Y = { animation: !0, autohide: !0, delay: 5e3 -}, T = (s) => K(s, _), Z = (s) => new g(s), S = v(`show.bs.${i}`), tt = v(`shown.bs.${i}`), $ = v(`hide.bs.${i}`), et = v(`hidden.bs.${i}`), y = (s) => { +}, T = (s) => K(s, _), Z = (s) => new g(s), S = v( + `show.bs.${i}` +), tt = v( + `shown.bs.${i}` +), $ = v( + `hide.bs.${i}` +), et = v( + `hidden.bs.${i}` +), y = (s) => { const { element: t, options: e } = s; c(t, l), r.clear(t, l), u(t, tt); // istanbul ignore else @preserve @@ -81,10 +89,14 @@ class g extends V { (E) => o(n, E, it) ); // istanbul ignore else @preserve - m.length && m.forEach((E) => o(E, C, nt)); + m.length && m.forEach( + (E) => o(E, C, nt) + ); }); const { element: n, options: m } = this; - m.animation && !w(n, f) ? d(n, f) : !m.animation && w(n, f) && c(n, f), this.dismiss = j(X, n), this.triggers = [...z(q, F(n))].filter( + m.animation && !w(n, f) ? d(n, f) : !m.animation && w(n, f) && c(n, f), this.dismiss = j(X, n), this.triggers = [ + ...z(q, F(n)) + ].filter( (h) => k(h) === n ), this._toggleEventListeners(!0); } diff --git a/dist/components/toast.mjs.map b/dist/components/toast.mjs.map index a666764e..5bc7b610 100644 --- a/dist/components/toast.mjs.map +++ b/dist/components/toast.mjs.map @@ -1 +1 @@ -{"version":3,"file":"toast.mjs","sources":["../../src/strings/toastString.ts","../../src/strings/toastComponent.ts","../../src/components/toast.ts"],"sourcesContent":["/** @type {string} */\nconst toastString = 'toast';\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = 'Toast';\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport fadeClass from '../strings/fadeClass';\nimport showClass from '../strings/showClass';\nimport dataBsDismiss from '../strings/dataBsDismiss';\nimport dataBsToggle from '../strings/dataBsToggle';\nimport toastString from '../strings/toastString';\nimport toastComponent from '../strings/toastComponent';\nimport getTargetElement from '../util/getTargetElement';\nimport BaseComponent from './base-component';\nimport { ToastEvent, ToastOptions } from '../interface/toast';\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = 'showing';\n/** @deprecated */\nconst hideClass = 'hide';\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) => getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(`show.bs.${toastString}`);\nconst shownToastEvent = createCustomEvent, ToastEvent>(`shown.bs.${toastString}`);\nconst hideToastEvent = createCustomEvent, ToastEvent>(`hide.bs.${toastString}`);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(`hidden.bs.${toastString}`);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === 'A') e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (self && element !== relatedTarget && !element.contains(relatedTarget as Node)) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [...querySelectorAll(toastToggleSelector, getDocument(element))].filter(\n btn => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(e =>\n action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach(btn => action(btn, mouseclickEvent, toastClickHandler));\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n"],"names":["toastString","toastComponent","toastSelector","toastDismissSelector","dataBsDismiss","toastToggleSelector","dataBsToggle","showingClass","hideClass","toastDefaults","getToastInstance","element","getInstance","toastInitCallback","Toast","showToastEvent","createCustomEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","self","options","removeClass","Timer","dispatchEvent","hideToastComplete","showClass","addClass","hideToast","reflow","emulateTransitionEnd","showToast","toastClickHandler","e","target","trigger","closest","getTargetElement","interactiveToastHandler","type","relatedTarget","mouseenterEvent","focusinEvent","BaseComponent","config","__publicField","isShown","add","action","addListener","removeListener","triggers","dismiss","hide","mouseclickEvent","focusoutEvent","mouseleaveEvent","btn","hasClass","fadeClass","querySelector","querySelectorAll","getDocument"],"mappings":";;;;;;;;;;;AACA,MAAMA,IAAc,SCAdC,IAAiB,SCoCjBC,IAAgB,IAAIF,CAAW,IAC/BG,IAAuB,IAAIC,CAAa,KAAKJ,CAAW,MACxDK,IAAsB,IAAIC,CAAY,KAAKN,CAAW,MACtDO,IAAe,WAEfC,IAAY,QAEZC,IAAgB;AAAA,EACpB,WAAW;AAAA,EACX,UAAU;AAAA,EACV,OAAO;AACT,GAMMC,IAAmB,CAACC,MAAyBC,EAAmBD,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AACN,WAAAQ;AAAA,EACT;AAAA;AAAA;AAAA;AAAA,EAIA,IAAI,UAAU;AACL,WAAAkD,EAAS,KAAK,SAAShC,CAAS;AAAA,EACzC;AAAA;AAAA,EAyDA,UAAU;AACF,UAAA,EAAE,SAAAhB,GAAS,SAAAoC,EAAY,IAAA;AAC7B,SAAK,sBAAsB,GACrBvB,EAAA,MAAMb,GAASX,CAAW,GAE5B+C,KACFxB,EAAYZ,GAASgB,CAAS,GAEhC,MAAM,QAAQ;AAAA,EAChB;AACF;AAtHEmB,EADmBhC,GACZ,YAAWZ,IAClB4C,EAFmBhC,GAEZ,QAAOD,IACdiC,EAHmBhC,GAGZ,eAAcJ;"} \ No newline at end of file +{"version":3,"file":"toast.mjs","sources":["../../src/strings/toastString.ts","../../src/strings/toastComponent.ts","../../src/components/toast.ts"],"sourcesContent":["/** @type {string} */\nconst toastString = \"toast\";\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = \"Toast\";\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport toastString from \"../strings/toastString\";\nimport toastComponent from \"../strings/toastComponent\";\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport { ToastEvent, ToastOptions } from \"../interface/toast\";\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = \"showing\";\n/** @deprecated */\nconst hideClass = \"hide\";\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) =>\n getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(\n `show.bs.${toastString}`,\n);\nconst shownToastEvent = createCustomEvent, ToastEvent>(\n `shown.bs.${toastString}`,\n);\nconst hideToastEvent = createCustomEvent, ToastEvent>(\n `hide.bs.${toastString}`,\n);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(\n `hidden.bs.${toastString}`,\n);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === \"A\") e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (\n self && element !== relatedTarget &&\n !element.contains(relatedTarget as Node)\n ) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [\n ...querySelectorAll(toastToggleSelector, getDocument(element)),\n ].filter(\n (btn) => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(\n (e) => action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach((btn) =>\n action(btn, mouseclickEvent, toastClickHandler)\n );\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n"],"names":["toastString","toastComponent","toastSelector","toastDismissSelector","dataBsDismiss","toastToggleSelector","dataBsToggle","showingClass","hideClass","toastDefaults","getToastInstance","element","getInstance","toastInitCallback","Toast","showToastEvent","createCustomEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","self","options","removeClass","Timer","dispatchEvent","hideToastComplete","showClass","addClass","hideToast","reflow","emulateTransitionEnd","showToast","toastClickHandler","e","target","trigger","closest","getTargetElement","interactiveToastHandler","type","relatedTarget","mouseenterEvent","focusinEvent","BaseComponent","config","__publicField","isShown","add","action","addListener","removeListener","triggers","dismiss","hide","mouseclickEvent","focusoutEvent","mouseleaveEvent","btn","hasClass","fadeClass","querySelector","querySelectorAll","getDocument"],"mappings":";;;;;;;;;;;AACA,MAAMA,IAAc,SCAdC,IAAiB,SCoCjBC,IAAgB,IAAIF,CAAW,IAC/BG,IAAuB,IAAIC,CAAa,KAAKJ,CAAW,MACxDK,IAAsB,IAAIC,CAAY,KAAKN,CAAW,MACtDO,IAAe,WAEfC,IAAY,QAEZC,IAAgB;AAAA,EACpB,WAAW;AAAA,EACX,UAAU;AAAA,EACV,OAAO;AACT,GAMMC,IAAmB,CAACC,MACxBC,EAAmBD,GAASV,CAAc,GAKtCY,IAAoB,CAACF,MAAyB,IAAIG,EAAMH,CAAO,GAI/DI,IAAiBC;AAAA,EACrB,WAAWhB,CAAW;AACxB,GACMiB,KAAkBD;AAAA,EACtB,YAAYhB,CAAW;AACzB,GACMkB,IAAiBF;AAAA,EACrB,WAAWhB,CAAW;AACxB,GACMmB,KAAmBH;AAAA,EACvB,aAAahB,CAAW;AAC1B,GASMoB,IAAoB,CAACC,MAAgB;AACnC,QAAA,EAAE,SAAAV,GAAS,SAAAW,EAAY,IAAAD;AAC7B,EAAAE,EAAYZ,GAASJ,CAAY,GAC3BiB,EAAA,MAAMb,GAASJ,CAAY,GAEjCkB,EAAcd,GAASM,EAAe;AAAA,EAAA;AAEtC,EAAIK,EAAQ,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git a/dist/components/tooltip-B1BCkN2D.mjs.map b/dist/components/tooltip-B1BCkN2D.mjs.map deleted file mode 100644 index d942f6ab..00000000 --- a/dist/components/tooltip-B1BCkN2D.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tooltip-B1BCkN2D.mjs","sources":["../../src/strings/popoverString.ts","../../src/strings/popoverComponent.ts","../../src/strings/tooltipString.ts","../../src/util/getTipTemplate.ts","../../src/util/tipClassPositions.ts","../../src/util/styleTip.ts","../../src/util/tooltipDefaults.ts","../../src/strings/dataOriginalTitle.ts","../../src/strings/tooltipComponent.ts","../../src/util/setHtml.ts","../../src/util/createTip.ts","../../src/util/getElementContainer.ts","../../src/components/tooltip.ts"],"sourcesContent":["/** @type {string} */\nconst popoverString = 'popover';\nexport default popoverString;\n","/** @type {string} */\nconst popoverComponent = 'Popover';\nexport default popoverComponent;\n","/** @type {string} */\nconst tooltipString = 'tooltip';\nexport default tooltipString;\n","import tooltipString from '../strings/tooltipString';\n\n/**\n * Returns a template for Popover / Tooltip.\n *\n * @param tipType the expected markup type\n * @returns the template markup\n */\nconst getTipTemplate = (tipType: string) => {\n const isTooltip = tipType === tooltipString;\n const bodyClass = isTooltip ? `${tipType}-inner` : `${tipType}-body`;\n const header = !isTooltip ? `

` : '';\n const arrow = `
`;\n const body = `
`;\n return `
${header + arrow + body}
`;\n};\n\nexport default getTipTemplate;\n","const tipClassPositions = {\n top: 'top',\n bottom: 'bottom',\n left: 'start',\n right: 'end',\n};\n\nexport default tipClassPositions;\n","import {\n createCustomEvent,\n dispatchEvent,\n getBoundingClientRect,\n getDocumentElement,\n getElementStyle,\n isHTMLElement,\n isRTL,\n setElementStyle,\n toLowerCase,\n} from '@thednp/shorty';\n\nimport popoverComponent from '../strings/popoverComponent';\nimport tipClassPositions from './tipClassPositions';\nimport Tooltip from '../components/tooltip';\nimport type { TooltipEvent } from '../interface/tooltip';\nimport type { PopoverEvent } from '../interface/popover';\n\n/**\n * Style popovers and tooltips.\n *\n * @param self the `Popover` / `Tooltip` instance\n */\nconst styleTip = (self: T) => {\n const tipClasses = /\\b(top|bottom|start|end)+/;\n const { element, tooltip, container, options, arrow } = self;\n\n // istanbul ignore else @preserve\n if (tooltip) {\n const tipPositions = { ...tipClassPositions };\n const RTL = isRTL(element);\n\n // reset tooltip style (top: 0, left: 0 works best)\n setElementStyle(tooltip, {\n // top: '0px', left: '0px', right: '', bottom: '',\n top: '',\n left: '',\n right: '',\n bottom: '',\n });\n const isPopover = self.name === popoverComponent;\n const { offsetWidth: tipWidth, offsetHeight: tipHeight } = tooltip;\n const { clientWidth: htmlcw, clientHeight: htmlch, offsetWidth: htmlow } = getDocumentElement(element);\n let { placement } = options;\n const { clientWidth: parentCWidth, offsetWidth: parentOWidth } = container as HTMLElement;\n const parentPosition = getElementStyle(container as HTMLElement, 'position');\n const fixedParent = parentPosition === 'fixed';\n const scrollbarWidth = fixedParent ? Math.abs(parentCWidth - parentOWidth) : Math.abs(htmlcw - htmlow);\n const leftBoundry =\n RTL && fixedParent\n ? // istanbul ignore next @preserve\n scrollbarWidth\n : 0;\n const rightBoundry = htmlcw - (!RTL ? scrollbarWidth : 0) - 1;\n const {\n width: elemWidth,\n height: elemHeight,\n left: elemRectLeft,\n right: elemRectRight,\n top: elemRectTop,\n } = getBoundingClientRect(element, true);\n const { x, y } = {\n x: elemRectLeft,\n y: elemRectTop,\n };\n // reset arrow style\n setElementStyle(arrow as HTMLElement, {\n top: '',\n left: '',\n right: '',\n bottom: '',\n });\n let topPosition: number | string = 0;\n let bottomPosition: number | string = '';\n let leftPosition: number | string = 0;\n let rightPosition: number | string = '';\n let arrowTop: number | string = '';\n let arrowLeft: number | string = '';\n let arrowRight: number | string = '';\n\n const arrowWidth = (arrow as HTMLElement).offsetWidth || 0;\n const arrowHeight = (arrow as HTMLElement).offsetHeight || 0;\n const arrowAdjust = arrowWidth / 2;\n\n // check placement\n let topExceed = elemRectTop - tipHeight - arrowHeight < 0;\n let bottomExceed = elemRectTop + tipHeight + elemHeight + arrowHeight >= htmlch;\n let leftExceed = elemRectLeft - tipWidth - arrowWidth < leftBoundry;\n let rightExceed = elemRectLeft + tipWidth + elemWidth + arrowWidth >= rightBoundry;\n\n const horizontals = ['left', 'right'];\n const verticals = ['top', 'bottom'];\n\n topExceed = horizontals.includes(placement)\n ? elemRectTop + elemHeight / 2 - tipHeight / 2 - arrowHeight < 0\n : topExceed;\n bottomExceed = horizontals.includes(placement)\n ? elemRectTop + tipHeight / 2 + elemHeight / 2 + arrowHeight >= htmlch\n : bottomExceed;\n leftExceed = verticals.includes(placement) ? elemRectLeft + elemWidth / 2 - tipWidth / 2 < leftBoundry : leftExceed;\n rightExceed = verticals.includes(placement)\n ? elemRectLeft + tipWidth / 2 + elemWidth / 2 >= rightBoundry\n : rightExceed;\n\n // first remove side positions if both left and right limits are exceeded\n // we usually fall back to top|bottom\n placement = horizontals.includes(placement) && leftExceed && rightExceed ? 'top' : placement;\n // recompute placement\n placement = placement === 'top' && topExceed ? 'bottom' : placement;\n placement = placement === 'bottom' && bottomExceed ? 'top' : placement;\n placement = placement === 'left' && leftExceed ? 'right' : placement;\n placement =\n placement === 'right' && rightExceed\n ? 'left'\n : // istanbul ignore next @preserve\n placement;\n\n // update tooltip/popover class\n if (!tooltip.className.includes(placement)) {\n tooltip.className = tooltip.className.replace(tipClasses, tipPositions[placement]);\n }\n\n // compute tooltip / popover coordinates\n // istanbul ignore else @preserve\n if (horizontals.includes(placement)) {\n // secondary|side positions\n if (placement === 'left') {\n // LEFT\n leftPosition = x - tipWidth - (isPopover ? arrowWidth : 0);\n } else {\n // RIGHT\n leftPosition = x + elemWidth + (isPopover ? arrowWidth : 0);\n }\n\n // adjust top and arrow\n if (topExceed && bottomExceed) {\n topPosition = 0;\n bottomPosition = 0;\n arrowTop = elemRectTop + elemHeight / 2 - arrowHeight / 2;\n } else if (topExceed) {\n topPosition = y;\n bottomPosition = '';\n arrowTop = elemHeight / 2 - arrowWidth;\n } else if (bottomExceed) {\n topPosition = y - tipHeight + elemHeight;\n bottomPosition = '';\n arrowTop = tipHeight - elemHeight / 2 - arrowWidth;\n } else {\n topPosition = y - tipHeight / 2 + elemHeight / 2;\n arrowTop = tipHeight / 2 - arrowHeight / 2;\n }\n } else if (verticals.includes(placement)) {\n if (placement === 'top') {\n topPosition = y - tipHeight - (isPopover ? arrowHeight : 0);\n } else {\n // BOTTOM\n topPosition = y + elemHeight + (isPopover ? arrowHeight : 0);\n }\n\n // adjust left | right and also the arrow\n if (leftExceed) {\n leftPosition = 0;\n arrowLeft = x + elemWidth / 2 - arrowAdjust;\n } else if (rightExceed) {\n leftPosition = 'auto';\n rightPosition = 0;\n arrowRight = elemWidth / 2 + rightBoundry - elemRectRight - arrowAdjust;\n } else {\n leftPosition = x - tipWidth / 2 + elemWidth / 2;\n arrowLeft = tipWidth / 2 - arrowAdjust;\n }\n }\n\n // apply style to tooltip/popover\n setElementStyle(tooltip, {\n top: `${topPosition}px`,\n bottom: bottomPosition === '' ? '' : `${bottomPosition}px`,\n left: leftPosition === 'auto' ? leftPosition : `${leftPosition}px`,\n right: rightPosition !== '' ? `${rightPosition}px` : '',\n });\n\n // update arrow placement\n // istanbul ignore else @preserve\n if (isHTMLElement(arrow)) {\n if (arrowTop !== '') {\n arrow.style.top = `${arrowTop}px`;\n }\n if (arrowLeft !== '') {\n arrow.style.left = `${arrowLeft}px`;\n } else if (arrowRight !== '') {\n arrow.style.right = `${arrowRight}px`;\n }\n }\n const updatedTooltipEvent = createCustomEvent, TooltipEvent | PopoverEvent>(\n `updated.bs.${toLowerCase(self.name)}`,\n );\n dispatchEvent(element, updatedTooltipEvent);\n }\n};\n\nexport default styleTip;\n","import getTipTemplate from './getTipTemplate';\nimport tooltipString from '../strings/tooltipString';\nimport { TooltipOptions } from '../interface/tooltip';\n\nconst tooltipDefaults: TooltipOptions = {\n template: getTipTemplate(tooltipString),\n title: '',\n customClass: '',\n trigger: 'hover focus',\n placement: 'top',\n sanitizeFn: undefined,\n animation: true,\n delay: 200,\n container: document.body,\n content: '',\n dismissible: false,\n btnClose: '',\n};\nexport default tooltipDefaults;\n","/**\n * Global namespace for `data-bs-title` attribute.\n */\nconst dataOriginalTitle = 'data-original-title';\nexport default dataOriginalTitle;\n","/** @type {string} */\nconst tooltipComponent = 'Tooltip';\nexport default tooltipComponent;\n","import { isArray, isFunction, isHTMLElement, isNode, isNodeList, isString } from '@thednp/shorty';\n\n/**\n * Append an existing `Element` to Popover / Tooltip component or HTML\n * markup string to be parsed & sanitized to be used as popover / tooltip content.\n *\n * @param element target\n * @param content the `Element` to append / string\n * @param sanitizeFn a function to sanitize string content\n */\nconst setHtml = (element: HTMLElement, content: Node[] | Node | string, sanitizeFn?: (s: string) => string) => {\n // istanbul ignore else @preserve\n if (isString(content) && content.length) {\n let dirty = content.trim(); // fixing #233\n if (isFunction(sanitizeFn)) dirty = sanitizeFn(dirty);\n\n const domParser = new DOMParser();\n const tempDocument = domParser.parseFromString(dirty, 'text/html');\n element.append(...[...tempDocument.body.childNodes]);\n } else if (isHTMLElement(content)) {\n element.append(content);\n } else if (isNodeList(content) || (isArray(content) && content.every(isNode))) {\n element.append(...[...content]);\n }\n};\nexport default setHtml;\n","import { addClass, createElement, hasClass, isHTMLElement, isRTL, querySelector, setAttribute } from '@thednp/shorty';\n\nimport tooltipComponent from '../strings/tooltipComponent';\nimport tooltipString from '../strings/tooltipString';\nimport popoverString from '../strings/popoverString';\nimport fadeClass from '../strings/fadeClass';\nimport tipClassPositions from './tipClassPositions';\nimport setHtml from './setHtml';\nimport Tooltip from '../components/tooltip';\nimport Popover from '../components/popover';\n\n/**\n * Creates a new tooltip / popover.\n *\n * @param self the `Tooltip` / `Popover` instance\n */\nconst createTip = (self: Tooltip | Popover) => {\n const isTooltip = self.name === tooltipComponent;\n\n const { id, element, options } = self;\n const { title, placement, template, animation, customClass, sanitizeFn, dismissible, content, btnClose } = options;\n const tipString = isTooltip ? tooltipString : popoverString;\n const tipPositions = { ...tipClassPositions };\n let titleParts: Node[] = [];\n let contentParts: Node[] = [];\n\n if (isRTL(element)) {\n tipPositions.left = 'end';\n tipPositions.right = 'start';\n }\n\n // set initial popover class\n const placementClass = `bs-${tipString}-${tipPositions[placement]}`;\n\n // load template\n let tooltipTemplate: Node | string;\n if (isHTMLElement(template)) {\n tooltipTemplate = template;\n } else {\n const htmlMarkup = createElement('div') as HTMLElement;\n setHtml(htmlMarkup, template, sanitizeFn);\n tooltipTemplate = htmlMarkup.firstChild as HTMLElement;\n }\n\n // set popover markup\n self.tooltip = isHTMLElement(tooltipTemplate)\n ? (tooltipTemplate.cloneNode(true) as HTMLElement)\n : // istanbul ignore next @preserve\n undefined;\n\n const { tooltip } = self;\n // istanbul ignore else @preserve\n if (tooltip) {\n // set id and role attributes\n setAttribute(tooltip, 'id', id);\n setAttribute(tooltip, 'role', tooltipString);\n\n const bodyClass = isTooltip ? `${tooltipString}-inner` : `${popoverString}-body`;\n const tooltipHeader = isTooltip ? null : querySelector(`.${popoverString}-header`, tooltip);\n const tooltipBody = querySelector(`.${bodyClass}`, tooltip);\n\n // set arrow and enable access for styleTip\n self.arrow = querySelector(`.${tipString}-arrow`, tooltip) as HTMLElement;\n const { arrow } = self;\n\n if (isHTMLElement(title)) titleParts = [title.cloneNode(true)];\n else {\n const tempTitle = createElement('div') as HTMLElement;\n setHtml(tempTitle, title, sanitizeFn);\n titleParts = [...[...tempTitle.childNodes]];\n }\n\n if (isHTMLElement(content)) contentParts = [content.cloneNode(true)];\n else {\n const tempContent = createElement('div') as HTMLElement;\n setHtml(tempContent, content, sanitizeFn);\n contentParts = [...[...tempContent.childNodes]];\n }\n\n // set dismissible button\n if (dismissible) {\n if (title) {\n if (isHTMLElement(btnClose)) {\n titleParts = [...titleParts, btnClose.cloneNode(true)];\n } else {\n const tempBtn = createElement('div') as HTMLElement;\n setHtml(tempBtn, btnClose, sanitizeFn);\n titleParts = [...titleParts, tempBtn.firstChild as Node];\n }\n } else {\n // istanbul ignore else @preserve\n if (tooltipHeader) tooltipHeader.remove();\n if (isHTMLElement(btnClose)) {\n contentParts = [...contentParts, btnClose.cloneNode(true)];\n } else {\n const tempBtn = createElement('div') as HTMLElement;\n setHtml(tempBtn, btnClose, sanitizeFn);\n contentParts = [...contentParts, tempBtn.firstChild as Node];\n }\n }\n }\n\n // fill the template with content from options / data attributes\n // also sanitize title && content\n // istanbul ignore else @preserve\n if (!isTooltip) {\n // istanbul ignore else @preserve\n if (title && tooltipHeader) {\n setHtml(tooltipHeader, titleParts, sanitizeFn);\n }\n // istanbul ignore else @preserve\n if (content && tooltipBody) {\n setHtml(tooltipBody, contentParts, sanitizeFn);\n }\n // set btn\n self.btn = querySelector('.btn-close', tooltip) || undefined;\n } else if (title && tooltipBody) setHtml(tooltipBody, title, sanitizeFn);\n\n // Bootstrap 5.2.x\n // addClass(tooltip, 'position-absolute');\n addClass(tooltip, 'position-fixed');\n addClass(arrow, 'position-absolute');\n\n // set popover animation and placement\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, tipString)) addClass(tooltip, tipString);\n // istanbul ignore else @preserve\n if (animation && !hasClass(tooltip, fadeClass)) {\n addClass(tooltip, fadeClass);\n }\n // istanbul ignore else @preserve\n if (customClass && !hasClass(tooltip, customClass)) {\n addClass(tooltip, customClass);\n }\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, placementClass)) addClass(tooltip, placementClass);\n }\n};\n\nexport default createTip;\n","import { getDocument, getElementStyle, getParentNode, isShadowRoot, isTableElement } from '@thednp/shorty';\n\n/**\n * Returns an `HTMLElement` to be used as default value for *options.container*\n * for `Tooltip` / `Popover` components.\n *\n * @see https://github.com/floating-ui/floating-ui\n *\n * @param element the target\n * @returns the query result\n */\nconst getElementContainer = (element: HTMLElement): ParentNode => {\n const majorBlockTags = ['HTML', 'BODY'];\n const containers: ParentNode[] = [];\n let { parentNode } = element as Node;\n\n while (parentNode && !majorBlockTags.includes(parentNode.nodeName)) {\n parentNode = getParentNode(parentNode) as ParentNode;\n // istanbul ignore else @preserve\n if (!(isShadowRoot(parentNode) || isTableElement(parentNode))) {\n containers.push(parentNode);\n }\n }\n\n return (\n containers.find((c, i) => {\n if (\n getElementStyle(c as HTMLElement, 'position') !== 'relative' &&\n containers.slice(i + 1).every(r => getElementStyle(r as HTMLElement, 'position') === 'static')\n ) {\n return c;\n }\n return null;\n }) ||\n // istanbul ignore next: optional guard\n getDocument(element).body\n );\n};\n\nexport default getElementContainer;\n","/* Native JavaScript for Bootstrap 5 | Tooltip\n---------------------------------------------- */\nimport {\n addClass,\n ariaDescribedBy,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focus,\n focusEvent,\n focusinEvent,\n focusoutEvent,\n getAttribute,\n getDocument,\n getElementStyle,\n getInstance,\n getUID,\n getWindow,\n hasAttribute,\n hasClass,\n isApple,\n mouseclickEvent,\n mousedownEvent,\n mouseenterEvent,\n mousehoverEvent,\n mouseleaveEvent,\n ObjectAssign,\n passiveHandler,\n removeAttribute,\n removeClass,\n resizeEvent,\n scrollEvent,\n setAttribute,\n Timer,\n toLowerCase,\n touchstartEvent,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport dataBsToggle from '../strings/dataBsToggle';\nimport dataOriginalTitle from '../strings/dataOriginalTitle';\nimport showClass from '../strings/showClass';\nimport tooltipString from '../strings/tooltipString';\nimport tooltipComponent from '../strings/tooltipComponent';\nimport popoverString from '../strings/popoverString';\nimport popoverComponent from '../strings/popoverComponent';\nimport modalString from '../strings/modalString';\nimport offcanvasString from '../strings/offcanvasString';\n\nimport styleTip from '../util/styleTip';\nimport createTip from '../util/createTip';\nimport { appendPopup, hasPopup, removePopup } from '../util/popupContainer';\nimport getElementContainer from '../util/getElementContainer';\nimport tooltipDefaults from '../util/tooltipDefaults';\nimport BaseComponent from './base-component';\nimport type { TooltipEvent, TooltipOptions } from '../interface/tooltip';\nimport type { PopoverEvent, PopoverOptions } from '../interface/popover';\n\n// TOOLTIP PRIVATE GC\n// ==================\nconst tooltipSelector = `[${dataBsToggle}=\"${tooltipString}\"],[data-tip=\"${tooltipString}\"]`;\nconst titleAttr = 'title';\n\n/**\n * Static method which returns an existing `Tooltip` instance associated\n * to a target `Element`.\n */\nlet getTooltipInstance = (element: HTMLElement) => getInstance(element, tooltipComponent);\n\n/**\n * A `Tooltip` initialization callback.\n */\nconst tooltipInitCallback = (element: HTMLElement) => new Tooltip(element);\n\n// TOOLTIP PRIVATE METHODS\n// =======================\n/**\n * Removes the tooltip from the DOM.\n *\n * @param self the `Tooltip` instance\n */\nconst removeTooltip = (self: Tooltip) => {\n const { element, tooltip, container, offsetParent } = self;\n removeAttribute(element, ariaDescribedBy);\n removePopup(tooltip as HTMLElement, container === offsetParent ? container : offsetParent);\n};\n\n/**\n * Check if container contains the tooltip.\n *\n * @param self Tooltip\n */\nconst hasTip = (self: Tooltip): boolean | undefined => {\n const { tooltip, container, offsetParent } = self;\n\n return tooltip && hasPopup(tooltip, container === offsetParent ? container : offsetParent);\n};\n\n/**\n * Executes after the instance has been disposed.\n *\n * @param self the `Tooltip` instance\n * @param callback the parent dispose callback\n */\nconst disposeTooltipComplete = (self: Tooltip, callback?: () => void) => {\n const { element } = self;\n self._toggleEventListeners();\n\n // istanbul ignore else @preserve\n if (hasAttribute(element, dataOriginalTitle) && self.name === tooltipComponent) {\n toggleTooltipTitle(self);\n }\n // istanbul ignore else @preserve\n if (callback) callback();\n};\n\n/**\n * Toggles on/off the special `Tooltip` event listeners.\n *\n * @param self the `Tooltip` instance\n * @param add when `true`, event listeners are added\n */\nconst toggleTooltipAction = (self: Tooltip, add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element } = self;\n\n action(getDocument(element), touchstartEvent, self.handleTouch, passiveHandler);\n\n [scrollEvent, resizeEvent].forEach(ev => {\n action(getWindow(element), ev, self.update, passiveHandler);\n });\n};\n\n/**\n * Executes after the tooltip was shown to the user.\n *\n * @param self the `Tooltip` instance\n */\nconst tooltipShownAction = (self: Tooltip) => {\n const { element } = self;\n const shownTooltipEvent = createCustomEvent, TooltipEvent | PopoverEvent>(\n `shown.bs.${toLowerCase(self.name)}`,\n );\n\n toggleTooltipAction(self, true);\n dispatchEvent(element, shownTooltipEvent);\n Timer.clear(element, 'in');\n};\n\n/**\n * Executes after the tooltip was hidden to the user.\n *\n * @param self the `Tooltip` instance\n */\nconst tooltipHiddenAction = (self: Tooltip) => {\n const { element } = self;\n const hiddenTooltipEvent = createCustomEvent, TooltipEvent | PopoverEvent>(\n `hidden.bs.${toLowerCase(self.name)}`,\n );\n\n toggleTooltipAction(self);\n removeTooltip(self);\n dispatchEvent(element, hiddenTooltipEvent);\n\n Timer.clear(element, 'out');\n};\n\n/**\n * Toggles on/off the `Tooltip` event listeners that hide/update the tooltip.\n *\n * @param self the `Tooltip` instance\n * @param add when `true`, event listeners are added\n */\nconst toggleTooltipOpenHandlers = (self: Tooltip, add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, container, offsetParent } = self;\n const { offsetHeight, scrollHeight } = container as HTMLElement;\n const parentModal = closest(element, `.${modalString}`);\n const parentOffcanvas = closest(element, `.${offcanvasString}`);\n\n // istanbul ignore else @preserve\n const win = getWindow(element);\n const overflow = offsetHeight !== scrollHeight;\n const scrollTarget = container === offsetParent && overflow ? container : win;\n action(scrollTarget, resizeEvent, self.update, passiveHandler);\n action(scrollTarget, scrollEvent, self.update, passiveHandler);\n\n // dismiss tooltips inside modal / offcanvas\n if (parentModal) {\n action(parentModal, `hide.bs.${modalString}`, self.handleHide);\n }\n if (parentOffcanvas) {\n action(parentOffcanvas, `hide.bs.${offcanvasString}`, self.handleHide);\n }\n};\n\n/**\n * Toggles the `title` and `data-original-title` attributes.\n *\n * @param self the `Tooltip` instance\n * @param content when `true`, event listeners are added\n */\nconst toggleTooltipTitle = (self: Tooltip, content?: string) => {\n // [0 - add, 1 - remove] | [0 - remove, 1 - add]\n const titleAtt = [dataOriginalTitle, titleAttr];\n const { element } = self;\n\n setAttribute(\n element,\n titleAtt[content ? 0 : 1],\n content ||\n getAttribute(element, titleAtt[0]) ||\n // istanbul ignore next @preserve\n '',\n );\n removeAttribute(element, titleAtt[content ? 1 : 0]);\n};\n\n// TOOLTIP DEFINITION\n// ==================\n/** Creates a new `Tooltip` instance. */\nexport default class Tooltip extends BaseComponent {\n static selector = tooltipSelector;\n static init = tooltipInitCallback;\n static getInstance = getTooltipInstance;\n static styleTip = styleTip;\n declare options: TooltipOptions;\n declare btn?: HTMLElement;\n declare tooltip?: HTMLElement;\n declare container: ParentNode;\n declare arrow?: HTMLElement;\n declare offsetParent?: HTMLElement;\n declare enabled: boolean;\n declare id: string;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n\n const { element } = this;\n const isTooltip = this.name === tooltipComponent;\n const tipString = isTooltip ? tooltipString : popoverString;\n const tipComponent = isTooltip ? tooltipComponent : popoverComponent;\n\n // istanbul ignore next @preserve: this is to set Popover too\n getTooltipInstance = (elem: HTMLElement) => getInstance(elem, tipComponent);\n\n // additional properties\n this.enabled = true;\n /** Set unique ID for `aria-describedby`. */\n this.id = `${tipString}-${getUID(element, tipString)}`;\n\n // instance options\n const { options } = this;\n\n // invalidate\n if (!((!options.title && isTooltip) || (!isTooltip && !options.content))) {\n // reset default options\n ObjectAssign(tooltipDefaults, { titleAttr: '' });\n\n // set title attributes and add event listeners\n // istanbul ignore else @preserve\n if (hasAttribute(element, titleAttr) && isTooltip && typeof options.title === 'string') {\n toggleTooltipTitle(this, options.title);\n }\n\n // set containers\n this.container = getElementContainer(element);\n this.offsetParent = ['sticky', 'fixed'].some(\n position => getElementStyle(this.container as HTMLElement, 'position') === position,\n )\n ? (this.container as HTMLElement)\n : getDocument(this.element).body;\n\n // create tooltip here\n createTip(this);\n\n // attach events\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tooltipComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return tooltipDefaults;\n }\n\n // TOOLTIP PUBLIC METHODS\n // ======================\n /** Handles the focus event on iOS. */\n // istanbul ignore next @preserve - impossible to test without Apple device\n handleFocus = () => focus(this.element);\n /** Shows the tooltip. */\n handleShow = () => this.show();\n show() {\n const { options, tooltip, element, container, offsetParent, id } = this;\n const { animation } = options;\n const outTimer = Timer.get(element, 'out');\n const tipContainer = container === offsetParent ? container : offsetParent;\n\n Timer.clear(element, 'out');\n\n if (tooltip && !outTimer && !hasTip(this)) {\n Timer.set(\n element,\n () => {\n const showTooltipEvent = createCustomEvent, TooltipEvent | PopoverEvent>(\n `show.bs.${toLowerCase(this.name)}`,\n );\n dispatchEvent(element, showTooltipEvent);\n\n // istanbul ignore else @preserve\n if (!showTooltipEvent.defaultPrevented) {\n // append to container\n appendPopup(tooltip, tipContainer);\n\n setAttribute(element, ariaDescribedBy, `#${id}`);\n\n this.update();\n toggleTooltipOpenHandlers(this, true);\n\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, showClass)) addClass(tooltip, showClass);\n // istanbul ignore else @preserve\n if (animation) {\n emulateTransitionEnd(tooltip, () => tooltipShownAction(this));\n } else tooltipShownAction(this);\n }\n },\n 17,\n 'in',\n );\n }\n }\n\n /** Hides the tooltip. */\n handleHide = () => this.hide();\n hide() {\n const { options, tooltip, element } = this;\n const { animation, delay } = options;\n\n Timer.clear(element, 'in');\n\n // istanbul ignore else @preserve\n if (tooltip && hasTip(this)) {\n Timer.set(\n element,\n () => {\n const hideTooltipEvent = createCustomEvent, TooltipEvent | PopoverEvent>(\n `hide.bs.${toLowerCase(this.name)}`,\n );\n dispatchEvent(element, hideTooltipEvent);\n\n // istanbul ignore else @preserve\n if (!hideTooltipEvent.defaultPrevented) {\n this.update();\n removeClass(tooltip, showClass);\n toggleTooltipOpenHandlers(this);\n\n // istanbul ignore else @preserve\n if (animation) {\n emulateTransitionEnd(tooltip, () => tooltipHiddenAction(this));\n } else tooltipHiddenAction(this);\n }\n },\n delay + 17,\n 'out',\n );\n }\n }\n\n /** Updates the tooltip position. */\n update = () => {\n styleTip(this);\n };\n\n /** Toggles the tooltip visibility. */\n toggle = () => {\n const { tooltip } = this;\n\n if (tooltip && !hasTip(this)) this.show();\n else this.hide();\n };\n\n /** Enables the tooltip. */\n enable() {\n const { enabled } = this;\n // istanbul ignore else @preserve\n if (!enabled) {\n this._toggleEventListeners(true);\n this.enabled = !enabled;\n }\n }\n\n /** Disables the tooltip. */\n disable() {\n const { tooltip, enabled } = this;\n // istanbul ignore else @preserve\n if (enabled) {\n if (tooltip && hasTip(this)) this.hide();\n this._toggleEventListeners();\n this.enabled = !enabled;\n }\n }\n\n /** Toggles the `disabled` property. */\n toggleEnabled() {\n if (!this.enabled) this.enable();\n else this.disable();\n }\n\n /**\n * Handles the `touchstart` event listener for `Tooltip`\n *\n * @this {Tooltip}\n * @param {TouchEvent} e the `Event` object\n */\n handleTouch = ({ target }: TouchEvent) => {\n const { tooltip, element } = this;\n\n // istanbul ignore if @preserve\n if (\n (tooltip && tooltip.contains(target as HTMLElement)) ||\n target === element ||\n (target && element.contains(target as HTMLElement))\n ) {\n // smile for ESLint\n } else {\n this.hide();\n }\n };\n\n /**\n * Toggles on/off the `Tooltip` event listeners.\n *\n * @param add when `true`, event listeners are added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n // btn is only for dismissible popover\n const { element, options, btn } = this;\n const { trigger } = options;\n const isPopover = this.name !== tooltipComponent;\n const dismissible = isPopover && (options as PopoverOptions).dismissible ? true : false;\n\n // istanbul ignore else @preserve\n if (!trigger.includes('manual')) {\n this.enabled = !!add;\n\n const triggerOptions = trigger.split(' ');\n\n triggerOptions.forEach(tr => {\n // istanbul ignore else @preserve\n if (tr === mousehoverEvent) {\n action(element, mousedownEvent, this.handleShow);\n action(element, mouseenterEvent, this.handleShow);\n\n // istanbul ignore else @preserve\n if (!dismissible) {\n action(element, mouseleaveEvent, this.handleHide);\n action(getDocument(element), touchstartEvent, this.handleTouch, passiveHandler);\n }\n } else if (tr === mouseclickEvent) {\n action(element, tr, !dismissible ? this.toggle : this.handleShow);\n } else if (tr === focusEvent) {\n action(element, focusinEvent, this.handleShow);\n // istanbul ignore else @preserve\n if (!dismissible) action(element, focusoutEvent, this.handleHide);\n // istanbul ignore else @preserve\n if (isApple) {\n action(element, mouseclickEvent, this.handleFocus);\n }\n }\n // istanbul ignore else @preserve\n if (dismissible && btn) {\n action(btn, mouseclickEvent, this.handleHide);\n }\n });\n }\n };\n\n /** Removes the `Tooltip` from the target element. */\n dispose() {\n const { tooltip, options } = this;\n const clone = { ...this, name: this.name };\n const callback = () => setTimeout(() => disposeTooltipComplete(clone, () => super.dispose()), 17);\n\n if (options.animation && hasTip(clone)) {\n this.options.delay = 0; // reset delay\n this.hide();\n emulateTransitionEnd(tooltip as HTMLElement, callback);\n } else {\n callback();\n }\n }\n}\n"],"names":["popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","arrow","body","tipClassPositions","styleTip","self","tipClasses","element","tooltip","container","options","tipPositions","RTL","isRTL","setElementStyle","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","getDocumentElement","placement","parentCWidth","parentOWidth","fixedParent","getElementStyle","scrollbarWidth","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","getBoundingClientRect","x","y","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","topExceed","bottomExceed","leftExceed","rightExceed","horizontals","verticals","isHTMLElement","updatedTooltipEvent","createCustomEvent","toLowerCase","dispatchEvent","tooltipDefaults","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","isString","dirty","isFunction","tempDocument","isNodeList","isArray","isNode","createTip","id","title","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","createElement","setAttribute","tooltipHeader","querySelector","tooltipBody","tempTitle","tempContent","tempBtn","addClass","hasClass","fadeClass","getElementContainer","majorBlockTags","containers","parentNode","getParentNode","isShadowRoot","isTableElement","c","i","r","getDocument","tooltipSelector","dataBsToggle","titleAttr","getTooltipInstance","getInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","removeAttribute","ariaDescribedBy","removePopup","hasTip","hasPopup","disposeTooltipComplete","callback","hasAttribute","toggleTooltipTitle","toggleTooltipAction","add","action","addListener","removeListener","touchstartEvent","passiveHandler","scrollEvent","resizeEvent","ev","getWindow","tooltipShownAction","shownTooltipEvent","Timer","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","offsetHeight","scrollHeight","parentModal","closest","modalString","parentOffcanvas","offcanvasString","win","scrollTarget","titleAtt","getAttribute","BaseComponent","target","config","__publicField","focus","btn","trigger","tr","mousehoverEvent","mousedownEvent","mouseenterEvent","mouseleaveEvent","mouseclickEvent","focusEvent","focusinEvent","focusoutEvent","isApple","tipComponent","elem","getUID","ObjectAssign","position","outTimer","tipContainer","showTooltipEvent","appendPopup","showClass","emulateTransitionEnd","delay","hideTooltipEvent","removeClass","enabled","clone"],"mappings":";;;;;;;;;;AACA,MAAMA,KAAgB,WCAhBC,KAAmB,WCAnBC,IAAgB,WCOhBC,KAAiB,CAACC,MAAoB;AAC1C,QAAMC,IAAYD,MAAYF,GACxBI,IAAYD,IAAY,GAAGD,CAAO,WAAW,GAAGA,CAAO,SACvDG,IAAUF,IAAoD,KAAxC,cAAcD,CAAO,kBAC3CI,IAAQ,eAAeJ,CAAO,kBAC9BK,IAAO,eAAeH,CAAS;AACrC,SAAO,eAAeF,CAAO,WAAWF,CAAa,KAAKK,IAASC,IAAQC,CAAI;AACjF,GCfMC,KAAoB;AAAA,EACxB,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AACT,GCkBMC,KAAW,CAAoBC,MAAY;AAC/C,QAAMC,IAAa,6BACb,EAAE,SAAAC,GAAS,SAAAC,GAAS,WAAAC,GAAW,SAAAC,GAAS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AIlE,IACFyG,GAAqB7K,GAAS,MAAMoI,GAAoB,IAAI,CAAC,OACpC,IAAI;AAAA,QACjC;AAAA,MACF;AAAA,MACA0C,IAAQ;AAAA,MACR;AAAA,IAAA;AAAA,EAGN;AAAA;AAAA,EAgBA,SAAS;AACD,UAAA,EAAE,SAAAG,EAAY,IAAA;AAAA,IAAA;AAEpB,IAAKA,MACH,KAAK,sBAAsB,EAAI,GAC/B,KAAK,UAAU,CAACA;AAAA,EAEpB;AAAA;AAAA,EAGA,UAAU;AACF,UAAA,EAAE,SAAAjL,GAAS,SAAAiL,EAAY,IAAA;AAAA,IAAA;AAE7B,IAAIA,MACEjL,KAAWgH,EAAO,IAAI,UAAQ,KAAK,GACvC,KAAK,sBAAsB,GAC3B,KAAK,UAAU,CAACiE;AAAA,EAEpB;AAAA;AAAA,EAGA,gBAAgB;AACd,IAAK,KAAK,eACA,QAAQ,IADC,KAAK,OAAO;AAAA,EAEjC;AAAA;AAAA,EAyEA,UAAU;AACF,UAAA,EAAE,SAAAjL,GAAS,SAAAE,EAAY,IAAA,MACvBgL,IAAQ,EAAE,GAAG,MAAM,MAAM,KAAK,QAC9B/D,IAAW,MAAM,WAAW,MAAMD,GAAuBgE,GAAO,MAAM,MAAM,QAAA,CAAS,GAAG,EAAE;AAEhG,IAAIhL,EAAQ,aAAa8G,EAAOkE,CAAK,KACnC,KAAK,QAAQ,QAAQ,GACrB,KAAK,KAAK,GACVL,GAAqB7K,GAAwBmH,CAAQ,KAE5CA;EAEb;AACF;AA5REkC,EADmB3C,GACZ,YAAWN,KAClBiD,EAFmB3C,GAEZ,QAAOD,KACd4C,EAHmB3C,GAGZ,eAAcH,KACrB8C,EAJmB3C,GAIZ,YAAW9G;"} \ No newline at end of file diff --git a/dist/components/tooltip-B1BCkN2D.mjs b/dist/components/tooltip-Qmkn435O.mjs similarity index 92% rename from dist/components/tooltip-B1BCkN2D.mjs rename to dist/components/tooltip-Qmkn435O.mjs index de6831b0..29be614c 100644 --- a/dist/components/tooltip-B1BCkN2D.mjs +++ b/dist/components/tooltip-Qmkn435O.mjs @@ -7,7 +7,7 @@ import { d as ue } from "./dataBsToggle-B84TS15h.mjs"; import { s as ft } from "./showClass-C8hdJfjQ.mjs"; import { a as ge, h as ve, m as bt, o as wt, r as be } from "./popupContainer-BitC465I.mjs"; import { f as Et } from "./fadeClass-CLIYI_zn.mjs"; -import { B as we } from "./base-component-nXu3wApu.mjs"; +import { B as we } from "./base-component-DHbs0JQk.mjs"; const ot = "popover", Dt = "Popover", T = "tooltip", Ee = (e) => { const i = e === T, o = i ? `${e}-inner` : `${e}-body`, t = i ? "" : `

`, s = `
`, n = `
`; return `
${t + s + n}
`; @@ -30,10 +30,10 @@ const ot = "popover", Dt = "Popover", T = "tooltip", Ee = (e) => { }); const c = e.name === Dt, { offsetWidth: r, offsetHeight: d } = t, { clientWidth: b, clientHeight: w, offsetWidth: R } = Yt(o); let { placement: l } = n; - const { clientWidth: E, offsetWidth: $ } = s, S = it(s, "position") === "fixed", h = Math.abs(S ? E - $ : b - R), N = f && S ? ( - // istanbul ignore next @preserve - h - ) : 0, C = b - (f ? 0 : h) - 1, { + const { clientWidth: E, offsetWidth: $ } = s, S = it( + s, + "position" + ) === "fixed", h = Math.abs(S ? E - $ : b - R), N = f && S ? h : 0, C = b - (f ? 0 : h) - 1, { width: u, height: v, left: m, @@ -53,10 +53,10 @@ const ot = "popover", Dt = "Popover", T = "tooltip", Ee = (e) => { const A = a.offsetWidth || 0, y = a.offsetHeight || 0, rt = A / 2; let I = D - d - y < 0, _ = D + d + v + y >= w, j = m - r - A < N, z = m + r + u + A >= C; const tt = ["left", "right"], dt = ["top", "bottom"]; - I = tt.includes(l) ? D + v / 2 - d / 2 - y < 0 : I, _ = tt.includes(l) ? D + d / 2 + v / 2 + y >= w : _, j = dt.includes(l) ? m + u / 2 - r / 2 < N : j, z = dt.includes(l) ? m + r / 2 + u / 2 >= C : z, l = tt.includes(l) && j && z ? "top" : l, l = l === "top" && I ? "bottom" : l, l = l === "bottom" && _ ? "top" : l, l = l === "left" && j ? "right" : l, l = l === "right" && z ? "left" : ( - // istanbul ignore next @preserve - l - ), t.className.includes(l) || (t.className = t.className.replace(i, p[l])); + I = tt.includes(l) ? D + v / 2 - d / 2 - y < 0 : I, _ = tt.includes(l) ? D + d / 2 + v / 2 + y >= w : _, j = dt.includes(l) ? m + u / 2 - r / 2 < N : j, z = dt.includes(l) ? m + r / 2 + u / 2 >= C : z, l = tt.includes(l) && j && z ? "top" : l, l = l === "top" && I ? "bottom" : l, l = l === "bottom" && _ ? "top" : l, l = l === "left" && j ? "right" : l, l = l === "right" && z ? "left" : l, t.className.includes(l) || (t.className = t.className.replace( + i, + p[l] + )); // istanbul ignore else @preserve tt.includes(l) ? (l === "left" ? P = X - r - (c ? A : 0) : P = X + u + (c ? A : 0), I && _ ? (L = 0, F = 0, M = D + v / 2 - y / 2) : I ? (L = k, F = "", M = v / 2 - A) : _ ? (L = k - d + v, F = "", M = d - v / 2 - A) : (L = k - d / 2 + v / 2, M = d / 2 - y / 2)) : dt.includes(l) && (l === "top" ? L = k - d - (c ? y : 0) : L = k + v + (c ? y : 0), j ? (P = 0, Z = X + u / 2 - rt) : z ? (P = "auto", at = 0, ct = u / 2 + C - jt - rt) : (P = X - r / 2 + u / 2, Z = r / 2 - rt)), ht(t, { top: `${L}px`, @@ -93,7 +93,17 @@ const ot = "popover", Dt = "Popover", T = "tooltip", Ee = (e) => { e.append(...n.body.childNodes); } else x(i) ? e.append(i) : (Qt(i) || Vt(i) && i.every(Xt)) && e.append(...i); }, $e = (e) => { - const i = e.name === O, { id: o, element: t, options: s } = e, { title: n, placement: a, template: p, animation: f, customClass: c, sanitizeFn: r, dismissible: d, content: b, btnClose: w } = s, R = i ? T : ot, l = { ...Mt }; + const i = e.name === O, { id: o, element: t, options: s } = e, { + title: n, + placement: a, + template: p, + animation: f, + customClass: c, + sanitizeFn: r, + dismissible: d, + content: b, + btnClose: w + } = s, R = i ? T : ot, l = { ...Mt }; let E = [], $ = []; xt(t) && (l.left = "end", l.right = "start"); const lt = `bs-${R}-${l[a]}`; @@ -104,10 +114,7 @@ const ot = "popover", Dt = "Popover", T = "tooltip", Ee = (e) => { const N = q("div"); H(N, p, r), S = N.firstChild; } - e.tooltip = x(S) ? S.cloneNode(!0) : ( - // istanbul ignore next @preserve - void 0 - ); + e.tooltip = x(S) ? S.cloneNode(!0) : void 0; const { tooltip: h } = e; // istanbul ignore else @preserve if (h) { @@ -169,13 +176,18 @@ const ot = "popover", Dt = "Popover", T = "tooltip", Ee = (e) => { // istanbul ignore else @preserve te(t) || ee(t) || o.push(t); } - return o.find((s, n) => it(s, "position") !== "relative" && o.slice(n + 1).every((a) => it(a, "position") === "static") ? s : null) || // istanbul ignore next: optional guard + return o.find((s, n) => it(s, "position") !== "relative" && o.slice(n + 1).every( + (a) => it(a, "position") === "static" + ) ? s : null) || // istanbul ignore next: optional guard nt(e).body; }, Ce = `[${ue}="${T}"],[data-tip="${T}"]`, Ft = "title"; let Ct = (e) => St(e, O); const Pe = (e) => new G(e), ye = (e) => { const { element: i, tooltip: o, container: t, offsetParent: s } = e; - Rt(i, Lt), be(o, t === s ? t : s); + Rt(i, Lt), be( + o, + t === s ? t : s + ); }, U = (e) => { const { tooltip: i, container: o, offsetParent: t } = e; return i && ve(i, o === t ? o : t); @@ -188,7 +200,12 @@ const Pe = (e) => new G(e), ye = (e) => { i && i(); }, It = (e, i) => { const o = i ? ut : gt, { element: t } = e; - o(nt(t), At, e.handleTouch, V), [Ot, Bt].forEach((s) => { + o( + nt(t), + At, + e.handleTouch, + V + ), [Ot, Bt].forEach((s) => { o(Wt(t), s, e.update, V); }); }, Pt = (e) => { @@ -264,7 +281,12 @@ class G extends we { if (d === le) { t(s, ae, this.handleShow), t(s, ce, this.handleShow); // istanbul ignore else @preserve - c || (t(s, re, this.handleHide), t(nt(s), At, this.handleTouch, V)); + c || (t(s, re, this.handleHide), t( + nt(s), + At, + this.handleTouch, + V + )); } else if (d === mt) t(s, d, c ? this.handleShow : this.toggle); else if (d === de) { @@ -364,7 +386,10 @@ class G extends we { } /** Removes the `Tooltip` from the target element. */ dispose() { - const { tooltip: o, options: t } = this, s = { ...this, name: this.name }, n = () => setTimeout(() => He(s, () => super.dispose()), 17); + const { tooltip: o, options: t } = this, s = { ...this, name: this.name }, n = () => setTimeout( + () => He(s, () => super.dispose()), + 17 + ); t.animation && U(s) ? (this.options.delay = 0, this.hide(), pt(o, n)) : n(); } } @@ -377,4 +402,4 @@ export { $t as s, Tt as t }; -//# sourceMappingURL=tooltip-B1BCkN2D.mjs.map +//# sourceMappingURL=tooltip-Qmkn435O.mjs.map diff --git a/dist/components/tooltip-Qmkn435O.mjs.map b/dist/components/tooltip-Qmkn435O.mjs.map new file mode 100644 index 00000000..0f8d7ced --- /dev/null +++ b/dist/components/tooltip-Qmkn435O.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"tooltip-Qmkn435O.mjs","sources":["../../src/strings/popoverString.ts","../../src/strings/popoverComponent.ts","../../src/strings/tooltipString.ts","../../src/util/getTipTemplate.ts","../../src/util/tipClassPositions.ts","../../src/util/styleTip.ts","../../src/util/tooltipDefaults.ts","../../src/strings/dataOriginalTitle.ts","../../src/strings/tooltipComponent.ts","../../src/util/setHtml.ts","../../src/util/createTip.ts","../../src/util/getElementContainer.ts","../../src/components/tooltip.ts"],"sourcesContent":["/** @type {string} */\nconst popoverString = \"popover\";\nexport default popoverString;\n","/** @type {string} */\nconst popoverComponent = \"Popover\";\nexport default popoverComponent;\n","/** @type {string} */\nconst tooltipString = \"tooltip\";\nexport default tooltipString;\n","import tooltipString from \"../strings/tooltipString\";\n\n/**\n * Returns a template for Popover / Tooltip.\n *\n * @param tipType the expected markup type\n * @returns the template markup\n */\nconst getTipTemplate = (tipType: string) => {\n const isTooltip = tipType === tooltipString;\n const bodyClass = isTooltip ? `${tipType}-inner` : `${tipType}-body`;\n const header = !isTooltip ? `

` : \"\";\n const arrow = `
`;\n const body = `
`;\n return `
${\n header + arrow + body\n }
`;\n};\n\nexport default getTipTemplate;\n","const tipClassPositions = {\n top: \"top\",\n bottom: \"bottom\",\n left: \"start\",\n right: \"end\",\n};\n\nexport default tipClassPositions;\n","import {\n createCustomEvent,\n dispatchEvent,\n getBoundingClientRect,\n getDocumentElement,\n getElementStyle,\n isHTMLElement,\n isRTL,\n setElementStyle,\n toLowerCase,\n} from \"@thednp/shorty\";\n\nimport popoverComponent from \"../strings/popoverComponent\";\nimport tipClassPositions from \"./tipClassPositions\";\nimport Tooltip from \"../components/tooltip\";\nimport type { TooltipEvent } from \"../interface/tooltip\";\nimport type { PopoverEvent } from \"../interface/popover\";\n\n/**\n * Style popovers and tooltips.\n *\n * @param self the `Popover` / `Tooltip` instance\n */\nconst styleTip = (self: T) => {\n const tipClasses = /\\b(top|bottom|start|end)+/;\n const { element, tooltip, container, options, arrow } = self;\n\n // istanbul ignore else @preserve\n if (tooltip) {\n const tipPositions = { ...tipClassPositions };\n const RTL = isRTL(element);\n\n // reset tooltip style (top: 0, left: 0 works best)\n setElementStyle(tooltip, {\n // top: '0px', left: '0px', right: '', bottom: '',\n top: \"\",\n left: \"\",\n right: \"\",\n bottom: \"\",\n });\n const isPopover = self.name === popoverComponent;\n const { offsetWidth: tipWidth, offsetHeight: tipHeight } = tooltip;\n const { clientWidth: htmlcw, clientHeight: htmlch, offsetWidth: htmlow } =\n getDocumentElement(element);\n let { placement } = options;\n const { clientWidth: parentCWidth, offsetWidth: parentOWidth } =\n container as HTMLElement;\n const parentPosition = getElementStyle(\n container as HTMLElement,\n \"position\",\n );\n const fixedParent = parentPosition === \"fixed\";\n const scrollbarWidth = fixedParent\n ? Math.abs(parentCWidth - parentOWidth)\n : Math.abs(htmlcw - htmlow);\n const leftBoundry = RTL && fixedParent\n // istanbul ignore next @preserve\n ? scrollbarWidth\n : 0;\n const rightBoundry = htmlcw - (!RTL ? scrollbarWidth : 0) - 1;\n const {\n width: elemWidth,\n height: elemHeight,\n left: elemRectLeft,\n right: elemRectRight,\n top: elemRectTop,\n } = getBoundingClientRect(element, true);\n const { x, y } = {\n x: elemRectLeft,\n y: elemRectTop,\n };\n // reset arrow style\n setElementStyle(arrow as HTMLElement, {\n top: \"\",\n left: \"\",\n right: \"\",\n bottom: \"\",\n });\n let topPosition: number | string = 0;\n let bottomPosition: number | string = \"\";\n let leftPosition: number | string = 0;\n let rightPosition: number | string = \"\";\n let arrowTop: number | string = \"\";\n let arrowLeft: number | string = \"\";\n let arrowRight: number | string = \"\";\n\n const arrowWidth = (arrow as HTMLElement).offsetWidth || 0;\n const arrowHeight = (arrow as HTMLElement).offsetHeight || 0;\n const arrowAdjust = arrowWidth / 2;\n\n // check placement\n let topExceed = elemRectTop - tipHeight - arrowHeight < 0;\n let bottomExceed =\n elemRectTop + tipHeight + elemHeight + arrowHeight >= htmlch;\n let leftExceed = elemRectLeft - tipWidth - arrowWidth < leftBoundry;\n let rightExceed =\n elemRectLeft + tipWidth + elemWidth + arrowWidth >= rightBoundry;\n\n const horizontals = [\"left\", \"right\"];\n const verticals = [\"top\", \"bottom\"];\n\n topExceed = horizontals.includes(placement)\n ? elemRectTop + elemHeight / 2 - tipHeight / 2 - arrowHeight < 0\n : topExceed;\n bottomExceed = horizontals.includes(placement)\n ? elemRectTop + tipHeight / 2 + elemHeight / 2 + arrowHeight >= htmlch\n : bottomExceed;\n leftExceed = verticals.includes(placement)\n ? elemRectLeft + elemWidth / 2 - tipWidth / 2 < leftBoundry\n : leftExceed;\n rightExceed = verticals.includes(placement)\n ? elemRectLeft + tipWidth / 2 + elemWidth / 2 >= rightBoundry\n : rightExceed;\n\n // first remove side positions if both left and right limits are exceeded\n // we usually fall back to top|bottom\n placement = horizontals.includes(placement) && leftExceed && rightExceed\n ? \"top\"\n : placement;\n // recompute placement\n placement = placement === \"top\" && topExceed ? \"bottom\" : placement;\n placement = placement === \"bottom\" && bottomExceed ? \"top\" : placement;\n placement = placement === \"left\" && leftExceed ? \"right\" : placement;\n placement = placement === \"right\" && rightExceed\n ? \"left\"\n // istanbul ignore next @preserve\n : placement;\n\n // update tooltip/popover class\n if (!tooltip.className.includes(placement)) {\n tooltip.className = tooltip.className.replace(\n tipClasses,\n tipPositions[placement],\n );\n }\n\n // compute tooltip / popover coordinates\n // istanbul ignore else @preserve\n if (horizontals.includes(placement)) {\n // secondary|side positions\n if (placement === \"left\") {\n // LEFT\n leftPosition = x - tipWidth - (isPopover ? arrowWidth : 0);\n } else {\n // RIGHT\n leftPosition = x + elemWidth + (isPopover ? arrowWidth : 0);\n }\n\n // adjust top and arrow\n if (topExceed && bottomExceed) {\n topPosition = 0;\n bottomPosition = 0;\n arrowTop = elemRectTop + elemHeight / 2 - arrowHeight / 2;\n } else if (topExceed) {\n topPosition = y;\n bottomPosition = \"\";\n arrowTop = elemHeight / 2 - arrowWidth;\n } else if (bottomExceed) {\n topPosition = y - tipHeight + elemHeight;\n bottomPosition = \"\";\n arrowTop = tipHeight - elemHeight / 2 - arrowWidth;\n } else {\n topPosition = y - tipHeight / 2 + elemHeight / 2;\n arrowTop = tipHeight / 2 - arrowHeight / 2;\n }\n } else if (verticals.includes(placement)) {\n if (placement === \"top\") {\n topPosition = y - tipHeight - (isPopover ? arrowHeight : 0);\n } else {\n // BOTTOM\n topPosition = y + elemHeight + (isPopover ? arrowHeight : 0);\n }\n\n // adjust left | right and also the arrow\n if (leftExceed) {\n leftPosition = 0;\n arrowLeft = x + elemWidth / 2 - arrowAdjust;\n } else if (rightExceed) {\n leftPosition = \"auto\";\n rightPosition = 0;\n arrowRight = elemWidth / 2 + rightBoundry - elemRectRight - arrowAdjust;\n } else {\n leftPosition = x - tipWidth / 2 + elemWidth / 2;\n arrowLeft = tipWidth / 2 - arrowAdjust;\n }\n }\n\n // apply style to tooltip/popover\n setElementStyle(tooltip, {\n top: `${topPosition}px`,\n bottom: bottomPosition === \"\" ? \"\" : `${bottomPosition}px`,\n left: leftPosition === \"auto\" ? leftPosition : `${leftPosition}px`,\n right: rightPosition !== \"\" ? `${rightPosition}px` : \"\",\n });\n\n // update arrow placement\n // istanbul ignore else @preserve\n if (isHTMLElement(arrow)) {\n if (arrowTop !== \"\") {\n arrow.style.top = `${arrowTop}px`;\n }\n if (arrowLeft !== \"\") {\n arrow.style.left = `${arrowLeft}px`;\n } else if (arrowRight !== \"\") {\n arrow.style.right = `${arrowRight}px`;\n }\n }\n const updatedTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `updated.bs.${toLowerCase(self.name)}`,\n );\n dispatchEvent(element, updatedTooltipEvent);\n }\n};\n\nexport default styleTip;\n","import getTipTemplate from \"./getTipTemplate\";\nimport tooltipString from \"../strings/tooltipString\";\nimport { TooltipOptions } from \"../interface/tooltip\";\n\nconst tooltipDefaults: TooltipOptions = {\n template: getTipTemplate(tooltipString),\n title: \"\",\n customClass: \"\",\n trigger: \"hover focus\",\n placement: \"top\",\n sanitizeFn: undefined,\n animation: true,\n delay: 200,\n container: document.body,\n content: \"\",\n dismissible: false,\n btnClose: \"\",\n};\nexport default tooltipDefaults;\n","/**\n * Global namespace for `data-bs-title` attribute.\n */\nconst dataOriginalTitle = \"data-original-title\";\nexport default dataOriginalTitle;\n","/** @type {string} */\nconst tooltipComponent = \"Tooltip\";\nexport default tooltipComponent;\n","import {\n isArray,\n isFunction,\n isHTMLElement,\n isNode,\n isNodeList,\n isString,\n} from \"@thednp/shorty\";\n\n/**\n * Append an existing `Element` to Popover / Tooltip component or HTML\n * markup string to be parsed & sanitized to be used as popover / tooltip content.\n *\n * @param element target\n * @param content the `Element` to append / string\n * @param sanitizeFn a function to sanitize string content\n */\nconst setHtml = (\n element: HTMLElement,\n content: Node[] | Node | string,\n sanitizeFn?: (s: string) => string,\n) => {\n // istanbul ignore else @preserve\n if (isString(content) && content.length) {\n let dirty = content.trim(); // fixing #233\n if (isFunction(sanitizeFn)) dirty = sanitizeFn(dirty);\n\n const domParser = new DOMParser();\n const tempDocument = domParser.parseFromString(dirty, \"text/html\");\n element.append(...[...tempDocument.body.childNodes]);\n } else if (isHTMLElement(content)) {\n element.append(content);\n } else if (\n isNodeList(content) || (isArray(content) && content.every(isNode))\n ) {\n element.append(...[...content]);\n }\n};\nexport default setHtml;\n","import {\n addClass,\n createElement,\n hasClass,\n isHTMLElement,\n isRTL,\n querySelector,\n setAttribute,\n} from \"@thednp/shorty\";\n\nimport tooltipComponent from \"../strings/tooltipComponent\";\nimport tooltipString from \"../strings/tooltipString\";\nimport popoverString from \"../strings/popoverString\";\nimport fadeClass from \"../strings/fadeClass\";\nimport tipClassPositions from \"./tipClassPositions\";\nimport setHtml from \"./setHtml\";\nimport Tooltip from \"../components/tooltip\";\nimport Popover from \"../components/popover\";\n\n/**\n * Creates a new tooltip / popover.\n *\n * @param self the `Tooltip` / `Popover` instance\n */\nconst createTip = (self: Tooltip | Popover) => {\n const isTooltip = self.name === tooltipComponent;\n\n const { id, element, options } = self;\n const {\n title,\n placement,\n template,\n animation,\n customClass,\n sanitizeFn,\n dismissible,\n content,\n btnClose,\n } = options;\n const tipString = isTooltip ? tooltipString : popoverString;\n const tipPositions = { ...tipClassPositions };\n let titleParts: Node[] = [];\n let contentParts: Node[] = [];\n\n if (isRTL(element)) {\n tipPositions.left = \"end\";\n tipPositions.right = \"start\";\n }\n\n // set initial popover class\n const placementClass = `bs-${tipString}-${tipPositions[placement]}`;\n\n // load template\n let tooltipTemplate: Node | string;\n if (isHTMLElement(template)) {\n tooltipTemplate = template;\n } else {\n const htmlMarkup = createElement(\"div\") as HTMLElement;\n setHtml(htmlMarkup, template, sanitizeFn);\n tooltipTemplate = htmlMarkup.firstChild as HTMLElement;\n }\n\n // set popover markup\n self.tooltip = isHTMLElement(tooltipTemplate)\n ? (tooltipTemplate.cloneNode(true) as HTMLElement)\n // istanbul ignore next @preserve\n : undefined;\n\n const { tooltip } = self;\n // istanbul ignore else @preserve\n if (tooltip) {\n // set id and role attributes\n setAttribute(tooltip, \"id\", id);\n setAttribute(tooltip, \"role\", tooltipString);\n\n const bodyClass = isTooltip\n ? `${tooltipString}-inner`\n : `${popoverString}-body`;\n const tooltipHeader = isTooltip\n ? null\n : querySelector(`.${popoverString}-header`, tooltip);\n const tooltipBody = querySelector(`.${bodyClass}`, tooltip);\n\n // set arrow and enable access for styleTip\n self.arrow = querySelector(`.${tipString}-arrow`, tooltip) as HTMLElement;\n const { arrow } = self;\n\n if (isHTMLElement(title)) titleParts = [title.cloneNode(true)];\n else {\n const tempTitle = createElement(\"div\") as HTMLElement;\n setHtml(tempTitle, title, sanitizeFn);\n titleParts = [...[...tempTitle.childNodes]];\n }\n\n if (isHTMLElement(content)) contentParts = [content.cloneNode(true)];\n else {\n const tempContent = createElement(\"div\") as HTMLElement;\n setHtml(tempContent, content, sanitizeFn);\n contentParts = [...[...tempContent.childNodes]];\n }\n\n // set dismissible button\n if (dismissible) {\n if (title) {\n if (isHTMLElement(btnClose)) {\n titleParts = [...titleParts, btnClose.cloneNode(true)];\n } else {\n const tempBtn = createElement(\"div\") as HTMLElement;\n setHtml(tempBtn, btnClose, sanitizeFn);\n titleParts = [...titleParts, tempBtn.firstChild as Node];\n }\n } else {\n // istanbul ignore else @preserve\n if (tooltipHeader) tooltipHeader.remove();\n if (isHTMLElement(btnClose)) {\n contentParts = [...contentParts, btnClose.cloneNode(true)];\n } else {\n const tempBtn = createElement(\"div\") as HTMLElement;\n setHtml(tempBtn, btnClose, sanitizeFn);\n contentParts = [...contentParts, tempBtn.firstChild as Node];\n }\n }\n }\n\n // fill the template with content from options / data attributes\n // also sanitize title && content\n // istanbul ignore else @preserve\n if (!isTooltip) {\n // istanbul ignore else @preserve\n if (title && tooltipHeader) {\n setHtml(tooltipHeader, titleParts, sanitizeFn);\n }\n // istanbul ignore else @preserve\n if (content && tooltipBody) {\n setHtml(tooltipBody, contentParts, sanitizeFn);\n }\n // set btn\n self.btn = querySelector(\".btn-close\", tooltip) || undefined;\n } else if (title && tooltipBody) setHtml(tooltipBody, title, sanitizeFn);\n\n // Bootstrap 5.2.x\n // addClass(tooltip, 'position-absolute');\n addClass(tooltip, \"position-fixed\");\n addClass(arrow, \"position-absolute\");\n\n // set popover animation and placement\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, tipString)) addClass(tooltip, tipString);\n // istanbul ignore else @preserve\n if (animation && !hasClass(tooltip, fadeClass)) {\n addClass(tooltip, fadeClass);\n }\n // istanbul ignore else @preserve\n if (customClass && !hasClass(tooltip, customClass)) {\n addClass(tooltip, customClass);\n }\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, placementClass)) addClass(tooltip, placementClass);\n }\n};\n\nexport default createTip;\n","import {\n getDocument,\n getElementStyle,\n getParentNode,\n isShadowRoot,\n isTableElement,\n} from \"@thednp/shorty\";\n\n/**\n * Returns an `HTMLElement` to be used as default value for *options.container*\n * for `Tooltip` / `Popover` components.\n *\n * @see https://github.com/floating-ui/floating-ui\n *\n * @param element the target\n * @returns the query result\n */\nconst getElementContainer = (element: HTMLElement): ParentNode => {\n const majorBlockTags = [\"HTML\", \"BODY\"];\n const containers: ParentNode[] = [];\n let { parentNode } = element as Node;\n\n while (parentNode && !majorBlockTags.includes(parentNode.nodeName)) {\n parentNode = getParentNode(parentNode) as ParentNode;\n // istanbul ignore else @preserve\n if (!(isShadowRoot(parentNode) || isTableElement(parentNode))) {\n containers.push(parentNode);\n }\n }\n\n return (\n containers.find((c, i) => {\n if (\n getElementStyle(c as HTMLElement, \"position\") !== \"relative\" &&\n containers.slice(i + 1).every((r) =>\n getElementStyle(r as HTMLElement, \"position\") === \"static\"\n )\n ) {\n return c;\n }\n return null;\n }) ||\n // istanbul ignore next: optional guard\n getDocument(element).body\n );\n};\n\nexport default getElementContainer;\n","/* Native JavaScript for Bootstrap 5 | Tooltip\n---------------------------------------------- */\nimport {\n addClass,\n ariaDescribedBy,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focus,\n focusEvent,\n focusinEvent,\n focusoutEvent,\n getAttribute,\n getDocument,\n getElementStyle,\n getInstance,\n getUID,\n getWindow,\n hasAttribute,\n hasClass,\n isApple,\n mouseclickEvent,\n mousedownEvent,\n mouseenterEvent,\n mousehoverEvent,\n mouseleaveEvent,\n ObjectAssign,\n passiveHandler,\n removeAttribute,\n removeClass,\n resizeEvent,\n scrollEvent,\n setAttribute,\n Timer,\n toLowerCase,\n touchstartEvent,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport dataOriginalTitle from \"../strings/dataOriginalTitle\";\nimport showClass from \"../strings/showClass\";\nimport tooltipString from \"../strings/tooltipString\";\nimport tooltipComponent from \"../strings/tooltipComponent\";\nimport popoverString from \"../strings/popoverString\";\nimport popoverComponent from \"../strings/popoverComponent\";\nimport modalString from \"../strings/modalString\";\nimport offcanvasString from \"../strings/offcanvasString\";\n\nimport styleTip from \"../util/styleTip\";\nimport createTip from \"../util/createTip\";\nimport { appendPopup, hasPopup, removePopup } from \"../util/popupContainer\";\nimport getElementContainer from \"../util/getElementContainer\";\nimport tooltipDefaults from \"../util/tooltipDefaults\";\nimport BaseComponent from \"./base-component\";\nimport type { TooltipEvent, TooltipOptions } from \"../interface/tooltip\";\nimport type { PopoverEvent, PopoverOptions } from \"../interface/popover\";\n\n// TOOLTIP PRIVATE GC\n// ==================\nconst tooltipSelector =\n `[${dataBsToggle}=\"${tooltipString}\"],[data-tip=\"${tooltipString}\"]`;\nconst titleAttr = \"title\";\n\n/**\n * Static method which returns an existing `Tooltip` instance associated\n * to a target `Element`.\n */\nlet getTooltipInstance = (element: HTMLElement) =>\n getInstance(element, tooltipComponent);\n\n/**\n * A `Tooltip` initialization callback.\n */\nconst tooltipInitCallback = (element: HTMLElement) => new Tooltip(element);\n\n// TOOLTIP PRIVATE METHODS\n// =======================\n/**\n * Removes the tooltip from the DOM.\n *\n * @param self the `Tooltip` instance\n */\nconst removeTooltip = (self: Tooltip) => {\n const { element, tooltip, container, offsetParent } = self;\n removeAttribute(element, ariaDescribedBy);\n removePopup(\n tooltip as HTMLElement,\n container === offsetParent ? container : offsetParent,\n );\n};\n\n/**\n * Check if container contains the tooltip.\n *\n * @param self Tooltip\n */\nconst hasTip = (self: Tooltip): boolean | undefined => {\n const { tooltip, container, offsetParent } = self;\n\n return tooltip &&\n hasPopup(tooltip, container === offsetParent ? container : offsetParent);\n};\n\n/**\n * Executes after the instance has been disposed.\n *\n * @param self the `Tooltip` instance\n * @param callback the parent dispose callback\n */\nconst disposeTooltipComplete = (self: Tooltip, callback?: () => void) => {\n const { element } = self;\n self._toggleEventListeners();\n\n // istanbul ignore else @preserve\n if (\n hasAttribute(element, dataOriginalTitle) && self.name === tooltipComponent\n ) {\n toggleTooltipTitle(self);\n }\n // istanbul ignore else @preserve\n if (callback) callback();\n};\n\n/**\n * Toggles on/off the special `Tooltip` event listeners.\n *\n * @param self the `Tooltip` instance\n * @param add when `true`, event listeners are added\n */\nconst toggleTooltipAction = (self: Tooltip, add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element } = self;\n\n action(\n getDocument(element),\n touchstartEvent,\n self.handleTouch,\n passiveHandler,\n );\n\n [scrollEvent, resizeEvent].forEach((ev) => {\n action(getWindow(element), ev, self.update, passiveHandler);\n });\n};\n\n/**\n * Executes after the tooltip was shown to the user.\n *\n * @param self the `Tooltip` instance\n */\nconst tooltipShownAction = (self: Tooltip) => {\n const { element } = self;\n const shownTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `shown.bs.${toLowerCase(self.name)}`,\n );\n\n toggleTooltipAction(self, true);\n dispatchEvent(element, shownTooltipEvent);\n Timer.clear(element, \"in\");\n};\n\n/**\n * Executes after the tooltip was hidden to the user.\n *\n * @param self the `Tooltip` instance\n */\nconst tooltipHiddenAction = (self: Tooltip) => {\n const { element } = self;\n const hiddenTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `hidden.bs.${toLowerCase(self.name)}`,\n );\n\n toggleTooltipAction(self);\n removeTooltip(self);\n dispatchEvent(element, hiddenTooltipEvent);\n\n Timer.clear(element, \"out\");\n};\n\n/**\n * Toggles on/off the `Tooltip` event listeners that hide/update the tooltip.\n *\n * @param self the `Tooltip` instance\n * @param add when `true`, event listeners are added\n */\nconst toggleTooltipOpenHandlers = (self: Tooltip, add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, container, offsetParent } = self;\n const { offsetHeight, scrollHeight } = container as HTMLElement;\n const parentModal = closest(element, `.${modalString}`);\n const parentOffcanvas = closest(element, `.${offcanvasString}`);\n\n // istanbul ignore else @preserve\n const win = getWindow(element);\n const overflow = offsetHeight !== scrollHeight;\n const scrollTarget = container === offsetParent && overflow ? container : win;\n action(scrollTarget, resizeEvent, self.update, passiveHandler);\n action(scrollTarget, scrollEvent, self.update, passiveHandler);\n\n // dismiss tooltips inside modal / offcanvas\n if (parentModal) {\n action(parentModal, `hide.bs.${modalString}`, self.handleHide);\n }\n if (parentOffcanvas) {\n action(parentOffcanvas, `hide.bs.${offcanvasString}`, self.handleHide);\n }\n};\n\n/**\n * Toggles the `title` and `data-original-title` attributes.\n *\n * @param self the `Tooltip` instance\n * @param content when `true`, event listeners are added\n */\nconst toggleTooltipTitle = (self: Tooltip, content?: string) => {\n // [0 - add, 1 - remove] | [0 - remove, 1 - add]\n const titleAtt = [dataOriginalTitle, titleAttr];\n const { element } = self;\n\n setAttribute(\n element,\n titleAtt[content ? 0 : 1],\n content ||\n getAttribute(element, titleAtt[0]) ||\n // istanbul ignore next @preserve\n \"\",\n );\n removeAttribute(element, titleAtt[content ? 1 : 0]);\n};\n\n// TOOLTIP DEFINITION\n// ==================\n/** Creates a new `Tooltip` instance. */\nexport default class Tooltip extends BaseComponent {\n static selector = tooltipSelector;\n static init = tooltipInitCallback;\n static getInstance = getTooltipInstance;\n static styleTip = styleTip;\n declare options: TooltipOptions;\n declare btn?: HTMLElement;\n declare tooltip?: HTMLElement;\n declare container: ParentNode;\n declare arrow?: HTMLElement;\n declare offsetParent?: HTMLElement;\n declare enabled: boolean;\n declare id: string;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n\n const { element } = this;\n const isTooltip = this.name === tooltipComponent;\n const tipString = isTooltip ? tooltipString : popoverString;\n const tipComponent = isTooltip ? tooltipComponent : popoverComponent;\n\n // istanbul ignore next @preserve: this is to set Popover too\n getTooltipInstance = (elem: HTMLElement) =>\n getInstance(elem, tipComponent);\n\n // additional properties\n this.enabled = true;\n /** Set unique ID for `aria-describedby`. */\n this.id = `${tipString}-${getUID(element, tipString)}`;\n\n // instance options\n const { options } = this;\n\n // invalidate\n if (!((!options.title && isTooltip) || (!isTooltip && !options.content))) {\n // reset default options\n ObjectAssign(tooltipDefaults, { titleAttr: \"\" });\n\n // set title attributes and add event listeners\n // istanbul ignore else @preserve\n if (\n hasAttribute(element, titleAttr) && isTooltip &&\n typeof options.title === \"string\"\n ) {\n toggleTooltipTitle(this, options.title);\n }\n\n // set containers\n this.container = getElementContainer(element);\n this.offsetParent = [\"sticky\", \"fixed\"].some(\n (position) =>\n getElementStyle(this.container as HTMLElement, \"position\") ===\n position,\n )\n ? (this.container as HTMLElement)\n : getDocument(this.element).body;\n\n // create tooltip here\n createTip(this);\n\n // attach events\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tooltipComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return tooltipDefaults;\n }\n\n // TOOLTIP PUBLIC METHODS\n // ======================\n /** Handles the focus event on iOS. */\n // istanbul ignore next @preserve - impossible to test without Apple device\n handleFocus = () => focus(this.element);\n /** Shows the tooltip. */\n handleShow = () => this.show();\n show() {\n const { options, tooltip, element, container, offsetParent, id } = this;\n const { animation } = options;\n const outTimer = Timer.get(element, \"out\");\n const tipContainer = container === offsetParent ? container : offsetParent;\n\n Timer.clear(element, \"out\");\n\n if (tooltip && !outTimer && !hasTip(this)) {\n Timer.set(\n element,\n () => {\n const showTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `show.bs.${toLowerCase(this.name)}`,\n );\n dispatchEvent(element, showTooltipEvent);\n\n // istanbul ignore else @preserve\n if (!showTooltipEvent.defaultPrevented) {\n // append to container\n appendPopup(tooltip, tipContainer);\n\n setAttribute(element, ariaDescribedBy, `#${id}`);\n\n this.update();\n toggleTooltipOpenHandlers(this, true);\n\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, showClass)) addClass(tooltip, showClass);\n // istanbul ignore else @preserve\n if (animation) {\n emulateTransitionEnd(tooltip, () => tooltipShownAction(this));\n } else tooltipShownAction(this);\n }\n },\n 17,\n \"in\",\n );\n }\n }\n\n /** Hides the tooltip. */\n handleHide = () => this.hide();\n hide() {\n const { options, tooltip, element } = this;\n const { animation, delay } = options;\n\n Timer.clear(element, \"in\");\n\n // istanbul ignore else @preserve\n if (tooltip && hasTip(this)) {\n Timer.set(\n element,\n () => {\n const hideTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `hide.bs.${toLowerCase(this.name)}`,\n );\n dispatchEvent(element, hideTooltipEvent);\n\n // istanbul ignore else @preserve\n if (!hideTooltipEvent.defaultPrevented) {\n this.update();\n removeClass(tooltip, showClass);\n toggleTooltipOpenHandlers(this);\n\n // istanbul ignore else @preserve\n if (animation) {\n emulateTransitionEnd(tooltip, () => tooltipHiddenAction(this));\n } else tooltipHiddenAction(this);\n }\n },\n delay + 17,\n \"out\",\n );\n }\n }\n\n /** Updates the tooltip position. */\n update = () => {\n styleTip(this);\n };\n\n /** Toggles the tooltip visibility. */\n toggle = () => {\n const { tooltip } = this;\n\n if (tooltip && !hasTip(this)) this.show();\n else this.hide();\n };\n\n /** Enables the tooltip. */\n enable() {\n const { enabled } = this;\n // istanbul ignore else @preserve\n if (!enabled) {\n this._toggleEventListeners(true);\n this.enabled = !enabled;\n }\n }\n\n /** Disables the tooltip. */\n disable() {\n const { tooltip, enabled } = this;\n // istanbul ignore else @preserve\n if (enabled) {\n if (tooltip && hasTip(this)) this.hide();\n this._toggleEventListeners();\n this.enabled = !enabled;\n }\n }\n\n /** Toggles the `disabled` property. */\n toggleEnabled() {\n if (!this.enabled) this.enable();\n else this.disable();\n }\n\n /**\n * Handles the `touchstart` event listener for `Tooltip`\n *\n * @this {Tooltip}\n * @param {TouchEvent} e the `Event` object\n */\n handleTouch = ({ target }: TouchEvent) => {\n const { tooltip, element } = this;\n\n // istanbul ignore if @preserve\n if (\n (tooltip && tooltip.contains(target as HTMLElement)) ||\n target === element ||\n (target && element.contains(target as HTMLElement))\n ) {\n // smile for ESLint\n } else {\n this.hide();\n }\n };\n\n /**\n * Toggles on/off the `Tooltip` event listeners.\n *\n * @param add when `true`, event listeners are added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n // btn is only for dismissible popover\n const { element, options, btn } = this;\n const { trigger } = options;\n const isPopover = this.name !== tooltipComponent;\n const dismissible = isPopover && (options as PopoverOptions).dismissible\n ? true\n : false;\n\n // istanbul ignore else @preserve\n if (!trigger.includes(\"manual\")) {\n this.enabled = !!add;\n\n const triggerOptions = trigger.split(\" \");\n\n triggerOptions.forEach((tr) => {\n // istanbul ignore else @preserve\n if (tr === mousehoverEvent) {\n action(element, mousedownEvent, this.handleShow);\n action(element, mouseenterEvent, this.handleShow);\n\n // istanbul ignore else @preserve\n if (!dismissible) {\n action(element, mouseleaveEvent, this.handleHide);\n action(\n getDocument(element),\n touchstartEvent,\n this.handleTouch,\n passiveHandler,\n );\n }\n } else if (tr === mouseclickEvent) {\n action(element, tr, !dismissible ? this.toggle : this.handleShow);\n } else if (tr === focusEvent) {\n action(element, focusinEvent, this.handleShow);\n // istanbul ignore else @preserve\n if (!dismissible) action(element, focusoutEvent, this.handleHide);\n // istanbul ignore else @preserve\n if (isApple) {\n action(element, mouseclickEvent, this.handleFocus);\n }\n }\n // istanbul ignore else @preserve\n if (dismissible && btn) {\n action(btn, mouseclickEvent, this.handleHide);\n }\n });\n }\n };\n\n /** Removes the `Tooltip` from the target element. */\n dispose() {\n const { tooltip, options } = this;\n const clone = { ...this, name: this.name };\n const callback = () =>\n setTimeout(\n () => disposeTooltipComplete(clone, () => super.dispose()),\n 17,\n );\n\n if (options.animation && hasTip(clone)) {\n this.options.delay = 0; // reset delay\n this.hide();\n emulateTransitionEnd(tooltip as HTMLElement, callback);\n } else {\n callback();\n }\n }\n}\n"],"names":["popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","arrow","body","tipClassPositions","styleTip","self","tipClasses","element","tooltip","container","options","tipPositions","RTL","isRTL","setElementStyle","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","getDocumentElement","placement","parentCWidth","parentOWidth","fixedParent","getElementStyle","scrollbarWidth","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","getBoundingClientRect","x","y","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","topExceed","bottomExceed","leftExceed","rightExceed","horizontals","verticals","isHTMLElement","updatedTooltipEvent","createCustomEvent","toLowerCase","dispatchEvent","tooltipDefaults","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","isString","dirty","isFunction","tempDocument","isNodeList","isArray","isNode","createTip","id","title","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","createElement","setAttribute","tooltipHeader","querySelector","tooltipBody","tempTitle","tempContent","tempBtn","addClass","hasClass","fadeClass","getElementContainer","majorBlockTags","containers","parentNode","getParentNode","isShadowRoot","isTableElement","c","i","r","getDocument","tooltipSelector","dataBsToggle","titleAttr","getTooltipInstance","getInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","removeAttribute","ariaDescribedBy","removePopup","hasTip","hasPopup","disposeTooltipComplete","callback","hasAttribute","toggleTooltipTitle","toggleTooltipAction","add","action","addListener","removeListener","touchstartEvent","passiveHandler","scrollEvent","resizeEvent","ev","getWindow","tooltipShownAction","shownTooltipEvent","Timer","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","offsetHeight","scrollHeight","parentModal","closest","modalString","parentOffcanvas","offcanvasString","win","scrollTarget","titleAtt","getAttribute","BaseComponent","target","config","__publicField","focus","btn","trigger","tr","mousehoverEvent","mousedownEvent","mouseenterEvent","mouseleaveEvent","mouseclickEvent","focusEvent","focusinEvent","focusoutEvent","isApple","tipComponent","elem","getUID","ObjectAssign","position","outTimer","tipContainer","showTooltipEvent","appendPopup","showClass","emulateTransitionEnd","delay","hideTooltipEvent","removeClass","enabled","clone"],"mappings":";;;;;;;;;;AACA,MAAMA,KAAgB,WCAhBC,KAAmB,WCAnBC,IAAgB,WCOhBC,KAAiB,CAACC,MAAoB;AAC1C,QAAMC,IAAYD,MAAYF,GACxBI,IAAYD,IAAY,GAAGD,CAAO,WAAW,GAAGA,CAAO,SACvDG,IAAUF,IAAoD,KAAxC,cAAcD,CAAO,kBAC3CI,IAAQ,eAAeJ,CAAO,kBAC9BK,IAAO,eAAeH,CAAS;AACrC,SAAO,eAAeF,CAAO,WAAWF,CAAa,KACnDK,IAASC,IAAQC,CACnB;AACF,GCjBMC,KAAoB;AAAA,EACxB,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AACT,GCkBMC,KAAW,CAAoBC,MAAY;AAC/C,QAAMC,IAAa,6BACb,EAAE,SAAAC,GAAS,SAAAC,GAAS,WAAAC,GAAW,SAAAC,GAAS,OAAAT,EAAU,IAAAI;AAAA,EAAA;AAGxD,MAAIG,GAAS;AACL,UAAAG,IAAe,EAAE,GAAGR,MACpBS,IAAMC,GAAMN,CAAO;AAGzB,IAAAO,GAAgBN,GAAS;AAAA;AAAA,MAEvB,KAAK;AAAA,MACL,MAAM;AAAA,MACN,OAAO;AAAA,MACP,QAAQ;AAAA,IAAA,CACT;AACK,UAAAO,IAAYV,EAA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AA,EAAE,SAAAG,EAAY,IAAA;AAAA,IAAA;AAEpB,IAAKA,MACH,KAAK,sBAAsB,EAAI,GAC/B,KAAK,UAAU,CAACA;AAAA,EAEpB;AAAA;AAAA,EAGA,UAAU;AACF,UAAA,EAAE,SAAAjL,GAAS,SAAAiL,EAAY,IAAA;AAAA,IAAA;AAE7B,IAAIA,MACEjL,KAAWgH,EAAO,IAAI,UAAQ,KAAK,GACvC,KAAK,sBAAsB,GAC3B,KAAK,UAAU,CAACiE;AAAA,EAEpB;AAAA;AAAA,EAGA,gBAAgB;AACd,IAAK,KAAK,eACA,QAAQ,IADC,KAAK,OAAO;AAAA,EAEjC;AAAA;AAAA,EAgFA,UAAU;AACF,UAAA,EAAE,SAAAjL,GAAS,SAAAE,EAAY,IAAA,MACvBgL,IAAQ,EAAE,GAAG,MAAM,MAAM,KAAK,QAC9B/D,IAAW,MACf;AAAA,MACE,MAAMD,GAAuBgE,GAAO,MAAM,MAAM,SAAS;AAAA,MACzD;AAAA,IAAA;AAGJ,IAAIhL,EAAQ,aAAa8G,EAAOkE,CAAK,KACnC,KAAK,QAAQ,QAAQ,GACrB,KAAK,KAAK,GACVL,GAAqB7K,GAAwBmH,CAAQ,KAE5CA;EAEb;AACF;AAnTEkC,EADmB3C,GACZ,YAAWN,KAClBiD,EAFmB3C,GAEZ,QAAOD,KACd4C,EAHmB3C,GAGZ,eAAcH,KACrB8C,EAJmB3C,GAIZ,YAAW9G;"} \ No newline at end of file diff --git a/dist/components/tooltip-kta4uOnb.js.map b/dist/components/tooltip-kta4uOnb.js.map index 7449df70..3c0ba4b3 100644 --- a/dist/components/tooltip-kta4uOnb.js.map +++ b/dist/components/tooltip-kta4uOnb.js.map @@ -1 +1 @@ -{"version":3,"file":"tooltip-kta4uOnb.js","sources":["../../src/strings/popoverString.ts","../../src/strings/popoverComponent.ts","../../src/strings/tooltipString.ts","../../src/util/getTipTemplate.ts","../../src/util/tipClassPositions.ts","../../src/util/styleTip.ts","../../src/util/tooltipDefaults.ts","../../src/strings/dataOriginalTitle.ts","../../src/strings/tooltipComponent.ts","../../src/util/setHtml.ts","../../src/util/createTip.ts","../../src/util/getElementContainer.ts","../../src/components/tooltip.ts"],"sourcesContent":["/** @type {string} */\nconst popoverString = 'popover';\nexport default popoverString;\n","/** @type {string} */\nconst popoverComponent = 'Popover';\nexport default popoverComponent;\n","/** @type {string} */\nconst tooltipString = 'tooltip';\nexport default tooltipString;\n","import tooltipString from '../strings/tooltipString';\n\n/**\n * Returns a template for Popover / Tooltip.\n *\n * @param tipType the expected markup type\n * @returns the template markup\n */\nconst getTipTemplate = (tipType: string) => {\n const isTooltip = tipType === tooltipString;\n const bodyClass = isTooltip ? `${tipType}-inner` : `${tipType}-body`;\n const header = !isTooltip ? `

` : '';\n const arrow = `
`;\n const body = `
`;\n return `
${header + arrow + body}
`;\n};\n\nexport default getTipTemplate;\n","const tipClassPositions = {\n top: 'top',\n bottom: 'bottom',\n left: 'start',\n right: 'end',\n};\n\nexport default tipClassPositions;\n","import {\n createCustomEvent,\n dispatchEvent,\n getBoundingClientRect,\n getDocumentElement,\n getElementStyle,\n isHTMLElement,\n isRTL,\n setElementStyle,\n toLowerCase,\n} from '@thednp/shorty';\n\nimport popoverComponent from '../strings/popoverComponent';\nimport tipClassPositions from './tipClassPositions';\nimport Tooltip from '../components/tooltip';\nimport type { TooltipEvent } from '../interface/tooltip';\nimport type { PopoverEvent } from '../interface/popover';\n\n/**\n * Style popovers and tooltips.\n *\n * @param self the `Popover` / `Tooltip` instance\n */\nconst styleTip = (self: T) => {\n const tipClasses = /\\b(top|bottom|start|end)+/;\n const { element, tooltip, container, options, arrow } = self;\n\n // istanbul ignore else @preserve\n if (tooltip) {\n const tipPositions = { ...tipClassPositions };\n const RTL = isRTL(element);\n\n // reset tooltip style (top: 0, left: 0 works best)\n setElementStyle(tooltip, {\n // top: '0px', left: '0px', right: '', bottom: '',\n top: '',\n left: '',\n right: '',\n bottom: '',\n });\n const isPopover = self.name === popoverComponent;\n const { offsetWidth: tipWidth, offsetHeight: tipHeight } = tooltip;\n const { clientWidth: htmlcw, clientHeight: htmlch, offsetWidth: htmlow } = getDocumentElement(element);\n let { placement } = options;\n const { clientWidth: parentCWidth, offsetWidth: parentOWidth } = container as HTMLElement;\n const parentPosition = getElementStyle(container as HTMLElement, 'position');\n const fixedParent = parentPosition === 'fixed';\n const scrollbarWidth = fixedParent ? Math.abs(parentCWidth - parentOWidth) : Math.abs(htmlcw - htmlow);\n const leftBoundry =\n RTL && fixedParent\n ? // istanbul ignore next @preserve\n scrollbarWidth\n : 0;\n const rightBoundry = htmlcw - (!RTL ? scrollbarWidth : 0) - 1;\n const {\n width: elemWidth,\n height: elemHeight,\n left: elemRectLeft,\n right: elemRectRight,\n top: elemRectTop,\n } = getBoundingClientRect(element, true);\n const { x, y } = {\n x: elemRectLeft,\n y: elemRectTop,\n };\n // reset arrow style\n setElementStyle(arrow as HTMLElement, {\n top: '',\n left: '',\n right: '',\n bottom: '',\n });\n let topPosition: number | string = 0;\n let bottomPosition: number | string = '';\n let leftPosition: number | string = 0;\n let rightPosition: number | string = '';\n let arrowTop: number | string = '';\n let arrowLeft: number | string = '';\n let arrowRight: number | string = '';\n\n const arrowWidth = (arrow as HTMLElement).offsetWidth || 0;\n const arrowHeight = (arrow as HTMLElement).offsetHeight || 0;\n const arrowAdjust = arrowWidth / 2;\n\n // check placement\n let topExceed = elemRectTop - tipHeight - arrowHeight < 0;\n let bottomExceed = elemRectTop + tipHeight + elemHeight + arrowHeight >= htmlch;\n let leftExceed = elemRectLeft - tipWidth - arrowWidth < leftBoundry;\n let rightExceed = elemRectLeft + tipWidth + elemWidth + arrowWidth >= rightBoundry;\n\n const horizontals = ['left', 'right'];\n const verticals = ['top', 'bottom'];\n\n topExceed = horizontals.includes(placement)\n ? elemRectTop + elemHeight / 2 - tipHeight / 2 - arrowHeight < 0\n : topExceed;\n bottomExceed = horizontals.includes(placement)\n ? elemRectTop + tipHeight / 2 + elemHeight / 2 + arrowHeight >= htmlch\n : bottomExceed;\n leftExceed = verticals.includes(placement) ? elemRectLeft + elemWidth / 2 - tipWidth / 2 < leftBoundry : leftExceed;\n rightExceed = verticals.includes(placement)\n ? elemRectLeft + tipWidth / 2 + elemWidth / 2 >= rightBoundry\n : rightExceed;\n\n // first remove side positions if both left and right limits are exceeded\n // we usually fall back to top|bottom\n placement = horizontals.includes(placement) && leftExceed && rightExceed ? 'top' : placement;\n // recompute placement\n placement = placement === 'top' && topExceed ? 'bottom' : placement;\n placement = placement === 'bottom' && bottomExceed ? 'top' : placement;\n placement = placement === 'left' && leftExceed ? 'right' : placement;\n placement =\n placement === 'right' && rightExceed\n ? 'left'\n : // istanbul ignore next @preserve\n placement;\n\n // update tooltip/popover class\n if (!tooltip.className.includes(placement)) {\n tooltip.className = tooltip.className.replace(tipClasses, tipPositions[placement]);\n }\n\n // compute tooltip / popover coordinates\n // istanbul ignore else @preserve\n if (horizontals.includes(placement)) {\n // secondary|side positions\n if (placement === 'left') {\n // LEFT\n leftPosition = x - tipWidth - (isPopover ? arrowWidth : 0);\n } else {\n // RIGHT\n leftPosition = x + elemWidth + (isPopover ? arrowWidth : 0);\n }\n\n // adjust top and arrow\n if (topExceed && bottomExceed) {\n topPosition = 0;\n bottomPosition = 0;\n arrowTop = elemRectTop + elemHeight / 2 - arrowHeight / 2;\n } else if (topExceed) {\n topPosition = y;\n bottomPosition = '';\n arrowTop = elemHeight / 2 - arrowWidth;\n } else if (bottomExceed) {\n topPosition = y - tipHeight + elemHeight;\n bottomPosition = '';\n arrowTop = tipHeight - elemHeight / 2 - arrowWidth;\n } else {\n topPosition = y - tipHeight / 2 + elemHeight / 2;\n arrowTop = tipHeight / 2 - arrowHeight / 2;\n }\n } else if (verticals.includes(placement)) {\n if (placement === 'top') {\n topPosition = y - tipHeight - (isPopover ? arrowHeight : 0);\n } else {\n // BOTTOM\n topPosition = y + elemHeight + (isPopover ? arrowHeight : 0);\n }\n\n // adjust left | right and also the arrow\n if (leftExceed) {\n leftPosition = 0;\n arrowLeft = x + elemWidth / 2 - arrowAdjust;\n } else if (rightExceed) {\n leftPosition = 'auto';\n rightPosition = 0;\n arrowRight = elemWidth / 2 + rightBoundry - elemRectRight - arrowAdjust;\n } else {\n leftPosition = x - tipWidth / 2 + elemWidth / 2;\n arrowLeft = tipWidth / 2 - arrowAdjust;\n }\n }\n\n // apply style to tooltip/popover\n setElementStyle(tooltip, {\n top: `${topPosition}px`,\n bottom: bottomPosition === '' ? '' : `${bottomPosition}px`,\n left: leftPosition === 'auto' ? leftPosition : `${leftPosition}px`,\n right: rightPosition !== '' ? `${rightPosition}px` : '',\n });\n\n // update arrow placement\n // istanbul ignore else @preserve\n if (isHTMLElement(arrow)) {\n if (arrowTop !== '') {\n arrow.style.top = `${arrowTop}px`;\n }\n if (arrowLeft !== '') {\n arrow.style.left = `${arrowLeft}px`;\n } else if (arrowRight !== '') {\n arrow.style.right = `${arrowRight}px`;\n }\n }\n const updatedTooltipEvent = createCustomEvent, TooltipEvent | PopoverEvent>(\n `updated.bs.${toLowerCase(self.name)}`,\n );\n dispatchEvent(element, updatedTooltipEvent);\n }\n};\n\nexport default styleTip;\n","import getTipTemplate from './getTipTemplate';\nimport tooltipString from '../strings/tooltipString';\nimport { TooltipOptions } from '../interface/tooltip';\n\nconst tooltipDefaults: TooltipOptions = {\n template: getTipTemplate(tooltipString),\n title: '',\n customClass: '',\n trigger: 'hover focus',\n placement: 'top',\n sanitizeFn: undefined,\n animation: true,\n delay: 200,\n container: document.body,\n content: '',\n dismissible: false,\n btnClose: '',\n};\nexport default tooltipDefaults;\n","/**\n * Global namespace for `data-bs-title` attribute.\n */\nconst dataOriginalTitle = 'data-original-title';\nexport default dataOriginalTitle;\n","/** @type {string} */\nconst tooltipComponent = 'Tooltip';\nexport default tooltipComponent;\n","import { isArray, isFunction, isHTMLElement, isNode, isNodeList, isString } from '@thednp/shorty';\n\n/**\n * Append an existing `Element` to Popover / Tooltip component or HTML\n * markup string to be parsed & sanitized to be used as popover / tooltip content.\n *\n * @param element target\n * @param content the `Element` to append / string\n * @param sanitizeFn a function to sanitize string content\n */\nconst setHtml = (element: HTMLElement, content: Node[] | Node | string, sanitizeFn?: (s: string) => string) => {\n // istanbul ignore else @preserve\n if (isString(content) && content.length) {\n let dirty = content.trim(); // fixing #233\n if (isFunction(sanitizeFn)) dirty = sanitizeFn(dirty);\n\n const domParser = new DOMParser();\n const tempDocument = domParser.parseFromString(dirty, 'text/html');\n element.append(...[...tempDocument.body.childNodes]);\n } else if (isHTMLElement(content)) {\n element.append(content);\n } else if (isNodeList(content) || (isArray(content) && content.every(isNode))) {\n element.append(...[...content]);\n }\n};\nexport default setHtml;\n","import { addClass, createElement, hasClass, isHTMLElement, isRTL, querySelector, setAttribute } from '@thednp/shorty';\n\nimport tooltipComponent from '../strings/tooltipComponent';\nimport tooltipString from '../strings/tooltipString';\nimport popoverString from '../strings/popoverString';\nimport fadeClass from '../strings/fadeClass';\nimport tipClassPositions from './tipClassPositions';\nimport setHtml from './setHtml';\nimport Tooltip from '../components/tooltip';\nimport Popover from '../components/popover';\n\n/**\n * Creates a new tooltip / popover.\n *\n * @param self the `Tooltip` / `Popover` instance\n */\nconst createTip = (self: Tooltip | Popover) => {\n const isTooltip = self.name === tooltipComponent;\n\n const { id, element, options } = self;\n const { title, placement, template, animation, customClass, sanitizeFn, dismissible, content, btnClose } = options;\n const tipString = isTooltip ? tooltipString : popoverString;\n const tipPositions = { ...tipClassPositions };\n let titleParts: Node[] = [];\n let contentParts: Node[] = [];\n\n if (isRTL(element)) {\n tipPositions.left = 'end';\n tipPositions.right = 'start';\n }\n\n // set initial popover class\n const placementClass = `bs-${tipString}-${tipPositions[placement]}`;\n\n // load template\n let tooltipTemplate: Node | string;\n if (isHTMLElement(template)) {\n tooltipTemplate = template;\n } else {\n const htmlMarkup = createElement('div') as HTMLElement;\n setHtml(htmlMarkup, template, sanitizeFn);\n tooltipTemplate = htmlMarkup.firstChild as HTMLElement;\n }\n\n // set popover markup\n self.tooltip = isHTMLElement(tooltipTemplate)\n ? (tooltipTemplate.cloneNode(true) as HTMLElement)\n : // istanbul ignore next @preserve\n undefined;\n\n const { tooltip } = self;\n // istanbul ignore else @preserve\n if (tooltip) {\n // set id and role attributes\n setAttribute(tooltip, 'id', id);\n setAttribute(tooltip, 'role', tooltipString);\n\n const bodyClass = isTooltip ? `${tooltipString}-inner` : `${popoverString}-body`;\n const tooltipHeader = isTooltip ? null : querySelector(`.${popoverString}-header`, tooltip);\n const tooltipBody = querySelector(`.${bodyClass}`, tooltip);\n\n // set arrow and enable access for styleTip\n self.arrow = querySelector(`.${tipString}-arrow`, tooltip) as HTMLElement;\n const { arrow } = self;\n\n if (isHTMLElement(title)) titleParts = [title.cloneNode(true)];\n else {\n const tempTitle = createElement('div') as HTMLElement;\n setHtml(tempTitle, title, sanitizeFn);\n titleParts = [...[...tempTitle.childNodes]];\n }\n\n if (isHTMLElement(content)) contentParts = [content.cloneNode(true)];\n else {\n const tempContent = createElement('div') as HTMLElement;\n setHtml(tempContent, content, sanitizeFn);\n contentParts = [...[...tempContent.childNodes]];\n }\n\n // set dismissible button\n if (dismissible) {\n if (title) {\n if (isHTMLElement(btnClose)) {\n titleParts = [...titleParts, btnClose.cloneNode(true)];\n } else {\n const tempBtn = createElement('div') as HTMLElement;\n setHtml(tempBtn, btnClose, sanitizeFn);\n titleParts = [...titleParts, tempBtn.firstChild as Node];\n }\n } else {\n // istanbul ignore else @preserve\n if (tooltipHeader) tooltipHeader.remove();\n if (isHTMLElement(btnClose)) {\n contentParts = [...contentParts, btnClose.cloneNode(true)];\n } else {\n const tempBtn = createElement('div') as HTMLElement;\n setHtml(tempBtn, btnClose, sanitizeFn);\n contentParts = [...contentParts, tempBtn.firstChild as Node];\n }\n }\n }\n\n // fill the template with content from options / data attributes\n // also sanitize title && content\n // istanbul ignore else @preserve\n if (!isTooltip) {\n // istanbul ignore else @preserve\n if (title && tooltipHeader) {\n setHtml(tooltipHeader, titleParts, sanitizeFn);\n }\n // istanbul ignore else @preserve\n if (content && tooltipBody) {\n setHtml(tooltipBody, contentParts, sanitizeFn);\n }\n // set btn\n self.btn = querySelector('.btn-close', tooltip) || undefined;\n } else if (title && tooltipBody) setHtml(tooltipBody, title, sanitizeFn);\n\n // Bootstrap 5.2.x\n // addClass(tooltip, 'position-absolute');\n addClass(tooltip, 'position-fixed');\n addClass(arrow, 'position-absolute');\n\n // set popover animation and placement\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, tipString)) addClass(tooltip, tipString);\n // istanbul ignore else @preserve\n if (animation && !hasClass(tooltip, fadeClass)) {\n addClass(tooltip, fadeClass);\n }\n // istanbul ignore else @preserve\n if (customClass && !hasClass(tooltip, customClass)) {\n addClass(tooltip, customClass);\n }\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, placementClass)) addClass(tooltip, placementClass);\n }\n};\n\nexport default createTip;\n","import { getDocument, getElementStyle, getParentNode, isShadowRoot, isTableElement } from '@thednp/shorty';\n\n/**\n * Returns an `HTMLElement` to be used as default value for *options.container*\n * for `Tooltip` / `Popover` components.\n *\n * @see https://github.com/floating-ui/floating-ui\n *\n * @param element the target\n * @returns the query result\n */\nconst getElementContainer = (element: HTMLElement): ParentNode => {\n const majorBlockTags = ['HTML', 'BODY'];\n const containers: ParentNode[] = [];\n let { parentNode } = element as Node;\n\n while (parentNode && !majorBlockTags.includes(parentNode.nodeName)) {\n parentNode = getParentNode(parentNode) as ParentNode;\n // istanbul ignore else @preserve\n if (!(isShadowRoot(parentNode) || isTableElement(parentNode))) {\n containers.push(parentNode);\n }\n }\n\n return (\n containers.find((c, i) => {\n if (\n getElementStyle(c as HTMLElement, 'position') !== 'relative' &&\n containers.slice(i + 1).every(r => getElementStyle(r as HTMLElement, 'position') === 'static')\n ) {\n return c;\n }\n return null;\n }) ||\n // istanbul ignore next: optional guard\n getDocument(element).body\n );\n};\n\nexport default getElementContainer;\n","/* Native JavaScript for Bootstrap 5 | Tooltip\n---------------------------------------------- */\nimport {\n addClass,\n ariaDescribedBy,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focus,\n focusEvent,\n focusinEvent,\n focusoutEvent,\n getAttribute,\n getDocument,\n getElementStyle,\n getInstance,\n getUID,\n getWindow,\n hasAttribute,\n hasClass,\n isApple,\n mouseclickEvent,\n mousedownEvent,\n mouseenterEvent,\n mousehoverEvent,\n mouseleaveEvent,\n ObjectAssign,\n passiveHandler,\n removeAttribute,\n removeClass,\n resizeEvent,\n scrollEvent,\n setAttribute,\n Timer,\n toLowerCase,\n touchstartEvent,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport dataBsToggle from '../strings/dataBsToggle';\nimport dataOriginalTitle from '../strings/dataOriginalTitle';\nimport showClass from '../strings/showClass';\nimport tooltipString from '../strings/tooltipString';\nimport tooltipComponent from '../strings/tooltipComponent';\nimport popoverString from '../strings/popoverString';\nimport popoverComponent from '../strings/popoverComponent';\nimport modalString from '../strings/modalString';\nimport offcanvasString from '../strings/offcanvasString';\n\nimport styleTip from '../util/styleTip';\nimport createTip from '../util/createTip';\nimport { appendPopup, hasPopup, removePopup } from '../util/popupContainer';\nimport getElementContainer from '../util/getElementContainer';\nimport tooltipDefaults from '../util/tooltipDefaults';\nimport BaseComponent from './base-component';\nimport type { TooltipEvent, TooltipOptions } from '../interface/tooltip';\nimport type { PopoverEvent, PopoverOptions } from '../interface/popover';\n\n// TOOLTIP PRIVATE GC\n// ==================\nconst tooltipSelector = `[${dataBsToggle}=\"${tooltipString}\"],[data-tip=\"${tooltipString}\"]`;\nconst titleAttr = 'title';\n\n/**\n * Static method which returns an existing `Tooltip` instance associated\n * to a target `Element`.\n */\nlet getTooltipInstance = (element: HTMLElement) => getInstance(element, tooltipComponent);\n\n/**\n * A `Tooltip` initialization callback.\n */\nconst tooltipInitCallback = (element: HTMLElement) => new Tooltip(element);\n\n// TOOLTIP PRIVATE METHODS\n// =======================\n/**\n * Removes the tooltip from the DOM.\n *\n * @param self the `Tooltip` instance\n */\nconst removeTooltip = (self: Tooltip) => {\n const { element, tooltip, container, offsetParent } = self;\n removeAttribute(element, ariaDescribedBy);\n removePopup(tooltip as HTMLElement, container === offsetParent ? container : offsetParent);\n};\n\n/**\n * Check if container contains the tooltip.\n *\n * @param self Tooltip\n */\nconst hasTip = (self: Tooltip): boolean | undefined => {\n const { tooltip, container, offsetParent } = self;\n\n return tooltip && hasPopup(tooltip, container === offsetParent ? container : offsetParent);\n};\n\n/**\n * Executes after the instance has been disposed.\n *\n * @param self the `Tooltip` instance\n * @param callback the parent dispose callback\n */\nconst disposeTooltipComplete = (self: Tooltip, callback?: () => void) => {\n const { element } = self;\n self._toggleEventListeners();\n\n // istanbul ignore else @preserve\n if (hasAttribute(element, dataOriginalTitle) && self.name === tooltipComponent) {\n toggleTooltipTitle(self);\n }\n // istanbul ignore else @preserve\n if (callback) callback();\n};\n\n/**\n * Toggles on/off the special `Tooltip` event listeners.\n *\n * @param self the `Tooltip` instance\n * @param add when `true`, event listeners are added\n */\nconst toggleTooltipAction = (self: Tooltip, add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element } = self;\n\n action(getDocument(element), touchstartEvent, self.handleTouch, passiveHandler);\n\n [scrollEvent, resizeEvent].forEach(ev => {\n action(getWindow(element), ev, self.update, passiveHandler);\n });\n};\n\n/**\n * Executes after the tooltip was shown to the user.\n *\n * @param self the `Tooltip` instance\n */\nconst tooltipShownAction = (self: Tooltip) => {\n const { element } = self;\n const shownTooltipEvent = createCustomEvent, TooltipEvent | PopoverEvent>(\n `shown.bs.${toLowerCase(self.name)}`,\n );\n\n toggleTooltipAction(self, true);\n dispatchEvent(element, shownTooltipEvent);\n Timer.clear(element, 'in');\n};\n\n/**\n * Executes after the tooltip was hidden to the user.\n *\n * @param self the `Tooltip` instance\n */\nconst tooltipHiddenAction = (self: Tooltip) => {\n const { element } = self;\n const hiddenTooltipEvent = createCustomEvent, TooltipEvent | PopoverEvent>(\n `hidden.bs.${toLowerCase(self.name)}`,\n );\n\n toggleTooltipAction(self);\n removeTooltip(self);\n dispatchEvent(element, hiddenTooltipEvent);\n\n Timer.clear(element, 'out');\n};\n\n/**\n * Toggles on/off the `Tooltip` event listeners that hide/update the tooltip.\n *\n * @param self the `Tooltip` instance\n * @param add when `true`, event listeners are added\n */\nconst toggleTooltipOpenHandlers = (self: Tooltip, add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, container, offsetParent } = self;\n const { offsetHeight, scrollHeight } = container as HTMLElement;\n const parentModal = closest(element, `.${modalString}`);\n const parentOffcanvas = closest(element, `.${offcanvasString}`);\n\n // istanbul ignore else @preserve\n const win = getWindow(element);\n const overflow = offsetHeight !== scrollHeight;\n const scrollTarget = container === offsetParent && overflow ? container : win;\n action(scrollTarget, resizeEvent, self.update, passiveHandler);\n action(scrollTarget, scrollEvent, self.update, passiveHandler);\n\n // dismiss tooltips inside modal / offcanvas\n if (parentModal) {\n action(parentModal, `hide.bs.${modalString}`, self.handleHide);\n }\n if (parentOffcanvas) {\n action(parentOffcanvas, `hide.bs.${offcanvasString}`, self.handleHide);\n }\n};\n\n/**\n * Toggles the `title` and `data-original-title` attributes.\n *\n * @param self the `Tooltip` instance\n * @param content when `true`, event listeners are added\n */\nconst toggleTooltipTitle = (self: Tooltip, content?: string) => {\n // [0 - add, 1 - remove] | [0 - remove, 1 - add]\n const titleAtt = [dataOriginalTitle, titleAttr];\n const { element } = self;\n\n setAttribute(\n element,\n titleAtt[content ? 0 : 1],\n content ||\n getAttribute(element, titleAtt[0]) ||\n // istanbul ignore next @preserve\n '',\n );\n removeAttribute(element, titleAtt[content ? 1 : 0]);\n};\n\n// TOOLTIP DEFINITION\n// ==================\n/** Creates a new `Tooltip` instance. */\nexport default class Tooltip extends BaseComponent {\n static selector = tooltipSelector;\n static init = tooltipInitCallback;\n static getInstance = getTooltipInstance;\n static styleTip = styleTip;\n declare options: TooltipOptions;\n declare btn?: HTMLElement;\n declare tooltip?: HTMLElement;\n declare container: ParentNode;\n declare arrow?: HTMLElement;\n declare offsetParent?: HTMLElement;\n declare enabled: boolean;\n declare id: string;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n\n const { element } = this;\n const isTooltip = this.name === tooltipComponent;\n const tipString = isTooltip ? tooltipString : popoverString;\n const tipComponent = isTooltip ? tooltipComponent : popoverComponent;\n\n // istanbul ignore next @preserve: this is to set Popover too\n getTooltipInstance = (elem: HTMLElement) => getInstance(elem, tipComponent);\n\n // additional properties\n this.enabled = true;\n /** Set unique ID for `aria-describedby`. */\n this.id = `${tipString}-${getUID(element, tipString)}`;\n\n // instance options\n const { options } = this;\n\n // invalidate\n if (!((!options.title && isTooltip) || (!isTooltip && !options.content))) {\n // reset default options\n ObjectAssign(tooltipDefaults, { titleAttr: '' });\n\n // set title attributes and add event listeners\n // istanbul ignore else @preserve\n if (hasAttribute(element, titleAttr) && isTooltip && typeof options.title === 'string') {\n toggleTooltipTitle(this, options.title);\n }\n\n // set containers\n this.container = getElementContainer(element);\n this.offsetParent = ['sticky', 'fixed'].some(\n position => getElementStyle(this.container as HTMLElement, 'position') === position,\n )\n ? (this.container as HTMLElement)\n : getDocument(this.element).body;\n\n // create tooltip here\n createTip(this);\n\n // attach events\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tooltipComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return tooltipDefaults;\n }\n\n // TOOLTIP PUBLIC METHODS\n // ======================\n /** Handles the focus event on iOS. */\n // istanbul ignore next @preserve - impossible to test without Apple device\n handleFocus = () => focus(this.element);\n /** Shows the tooltip. */\n handleShow = () => this.show();\n show() {\n const { options, tooltip, element, container, offsetParent, id } = this;\n const { animation } = options;\n const outTimer = Timer.get(element, 'out');\n const tipContainer = container === offsetParent ? container : offsetParent;\n\n Timer.clear(element, 'out');\n\n if (tooltip && !outTimer && !hasTip(this)) {\n Timer.set(\n element,\n () => {\n const showTooltipEvent = createCustomEvent, TooltipEvent | PopoverEvent>(\n `show.bs.${toLowerCase(this.name)}`,\n );\n dispatchEvent(element, showTooltipEvent);\n\n // istanbul ignore else @preserve\n if (!showTooltipEvent.defaultPrevented) {\n // append to container\n appendPopup(tooltip, tipContainer);\n\n setAttribute(element, ariaDescribedBy, `#${id}`);\n\n this.update();\n toggleTooltipOpenHandlers(this, true);\n\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, showClass)) addClass(tooltip, showClass);\n // istanbul ignore else @preserve\n if (animation) {\n emulateTransitionEnd(tooltip, () => tooltipShownAction(this));\n } else tooltipShownAction(this);\n }\n },\n 17,\n 'in',\n );\n }\n }\n\n /** Hides the tooltip. */\n handleHide = () => this.hide();\n hide() {\n const { options, tooltip, element } = this;\n const { animation, delay } = options;\n\n Timer.clear(element, 'in');\n\n // istanbul ignore else @preserve\n if (tooltip && hasTip(this)) {\n Timer.set(\n element,\n () => {\n const hideTooltipEvent = createCustomEvent, TooltipEvent | PopoverEvent>(\n `hide.bs.${toLowerCase(this.name)}`,\n );\n dispatchEvent(element, hideTooltipEvent);\n\n // istanbul ignore else @preserve\n if (!hideTooltipEvent.defaultPrevented) {\n this.update();\n removeClass(tooltip, showClass);\n toggleTooltipOpenHandlers(this);\n\n // istanbul ignore else @preserve\n if (animation) {\n emulateTransitionEnd(tooltip, () => tooltipHiddenAction(this));\n } else tooltipHiddenAction(this);\n }\n },\n delay + 17,\n 'out',\n );\n }\n }\n\n /** Updates the tooltip position. */\n update = () => {\n styleTip(this);\n };\n\n /** Toggles the tooltip visibility. */\n toggle = () => {\n const { tooltip } = this;\n\n if (tooltip && !hasTip(this)) this.show();\n else this.hide();\n };\n\n /** Enables the tooltip. */\n enable() {\n const { enabled } = this;\n // istanbul ignore else @preserve\n if (!enabled) {\n this._toggleEventListeners(true);\n this.enabled = !enabled;\n }\n }\n\n /** Disables the tooltip. */\n disable() {\n const { tooltip, enabled } = this;\n // istanbul ignore else @preserve\n if (enabled) {\n if (tooltip && hasTip(this)) this.hide();\n this._toggleEventListeners();\n this.enabled = !enabled;\n }\n }\n\n /** Toggles the `disabled` property. */\n toggleEnabled() {\n if (!this.enabled) this.enable();\n else this.disable();\n }\n\n /**\n * Handles the `touchstart` event listener for `Tooltip`\n *\n * @this {Tooltip}\n * @param {TouchEvent} e the `Event` object\n */\n handleTouch = ({ target }: TouchEvent) => {\n const { tooltip, element } = this;\n\n // istanbul ignore if @preserve\n if (\n (tooltip && tooltip.contains(target as HTMLElement)) ||\n target === element ||\n (target && element.contains(target as HTMLElement))\n ) {\n // smile for ESLint\n } else {\n this.hide();\n }\n };\n\n /**\n * Toggles on/off the `Tooltip` event listeners.\n *\n * @param add when `true`, event listeners are added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n // btn is only for dismissible popover\n const { element, options, btn } = this;\n const { trigger } = options;\n const isPopover = this.name !== tooltipComponent;\n const dismissible = isPopover && (options as PopoverOptions).dismissible ? true : false;\n\n // istanbul ignore else @preserve\n if (!trigger.includes('manual')) {\n this.enabled = !!add;\n\n const triggerOptions = trigger.split(' ');\n\n triggerOptions.forEach(tr => {\n // istanbul ignore else @preserve\n if (tr === mousehoverEvent) {\n action(element, mousedownEvent, this.handleShow);\n action(element, mouseenterEvent, this.handleShow);\n\n // istanbul ignore else @preserve\n if (!dismissible) {\n action(element, mouseleaveEvent, this.handleHide);\n action(getDocument(element), touchstartEvent, this.handleTouch, passiveHandler);\n }\n } else if (tr === mouseclickEvent) {\n action(element, tr, !dismissible ? this.toggle : this.handleShow);\n } else if (tr === focusEvent) {\n action(element, focusinEvent, this.handleShow);\n // istanbul ignore else @preserve\n if (!dismissible) action(element, focusoutEvent, this.handleHide);\n // istanbul ignore else @preserve\n if (isApple) {\n action(element, mouseclickEvent, this.handleFocus);\n }\n }\n // istanbul ignore else @preserve\n if (dismissible && btn) {\n action(btn, mouseclickEvent, this.handleHide);\n }\n });\n }\n };\n\n /** Removes the `Tooltip` from the target element. */\n dispose() {\n const { tooltip, options } = this;\n const clone = { ...this, name: this.name };\n const callback = () => setTimeout(() => disposeTooltipComplete(clone, () => super.dispose()), 17);\n\n if (options.animation && hasTip(clone)) {\n this.options.delay = 0; // reset delay\n this.hide();\n emulateTransitionEnd(tooltip as HTMLElement, callback);\n } else {\n callback();\n }\n }\n}\n"],"names":["popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","arrow","body","tipClassPositions","styleTip","self","tipClasses","element","tooltip","container","options","tipPositions","RTL","isRTL","setElementStyle","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","getDocumentElement","placement","parentCWidth","parentOWidth","fixedParent","getElementStyle","scrollbarWidth","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","getBoundingClientRect","x","y","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","topExceed","bottomExceed","leftExceed","rightExceed","horizontals","verticals","isHTMLElement","updatedTooltipEvent","createCustomEvent","toLowerCase","dispatchEvent","tooltipDefaults","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","isString","dirty","isFunction","tempDocument","isNodeList","isArray","isNode","createTip","id","title","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","createElement","setAttribute","tooltipHeader","querySelector","tooltipBody","tempTitle","tempContent","tempBtn","addClass","hasClass","fadeClass","getElementContainer","majorBlockTags","containers","parentNode","getParentNode","isShadowRoot","isTableElement","c","i","getDocument","tooltipSelector","dataBsToggle","titleAttr","getTooltipInstance","getInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","removeAttribute","ariaDescribedBy","removePopup","hasTip","hasPopup","disposeTooltipComplete","callback","hasAttribute","toggleTooltipTitle","toggleTooltipAction","add","action","addListener","removeListener","touchstartEvent","passiveHandler","scrollEvent","resizeEvent","ev","getWindow","tooltipShownAction","shownTooltipEvent","Timer","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","offsetHeight","scrollHeight","parentModal","closest","modalString","parentOffcanvas","offcanvasString","win","scrollTarget","titleAtt","getAttribute","BaseComponent","target","config","__publicField","focus","btn","trigger","tr","mousehoverEvent","mousedownEvent","mouseenterEvent","mouseleaveEvent","mouseclickEvent","focusEvent","focusinEvent","focusoutEvent","isApple","tipComponent","elem","getUID","ObjectAssign","position","outTimer","tipContainer","showTooltipEvent","appendPopup","showClass","emulateTransitionEnd","delay","hideTooltipEvent","removeClass","enabled","clone"],"mappings":"qcACMA,EAAgB,UCAhBC,GAAmB,UCAnBC,EAAgB,UCOhBC,GAAkBC,GAAoB,CAC1C,MAAMC,EAAYD,IAAYF,EACxBI,EAAYD,EAAY,GAAGD,CAAO,SAAW,GAAGA,CAAO,QACvDG,EAAUF,EAAoD,GAAxC,cAAcD,CAAO,iBAC3CI,EAAQ,eAAeJ,CAAO,iBAC9BK,EAAO,eAAeH,CAAS,WACrC,MAAO,eAAeF,CAAO,WAAWF,CAAa,KAAKK,EAASC,EAAQC,CAAI,QACjF,ECfMC,GAAoB,CACxB,IAAK,MACL,OAAQ,SACR,KAAM,QACN,MAAO,KACT,ECkBMC,GAA+BC,GAAY,CAC/C,MAAMC,EAAa,4BACb,CAAE,QAAAC,EAAS,QAAAC,EAAS,UAAAC,EAAW,QAAAC,EAAS,MAAAT,CAAU,EAAAI,EAAA;AAGxD,GAAIG,EAAS,CACL,MAAAG,EAAe,CAAE,GAAGR,IACpBS,EAAMC,QAAMN,CAAO,EAGzBO,EAAAA,gBAAgBN,EAAS,CAEvB,IAAK,GACL,KAAM,GACN,MAAO,GACP,OAAQ,EAAA,CACT,EACK,MAAAO,EAAYV,EAAK,OAASX,GAC1B,CAAE,YAAasB,EAAU,aAAcC,GAAcT,EACrD,CAAE,YAAaU,EAAQ,aAAcC,EAAQ,YAAaC,CAAW,EAAAC,qBAAmBd,CAAO,EACjG,GAAA,CAAE,UAAAe,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2K,GAAAA,SAAS,EAC9BtC,GAA0B,IAAI,EAAA;AAG1BjE,EACFwG,EAAAA,qBAAqB5K,EAAS,IAAMmI,GAAoB,IAAI,CAAC,KACpC,IAAI,CACjC,CACF,EACA0C,EAAQ,GACR,KAAA,CAGN,CAgBA,QAAS,CACD,KAAA,CAAE,QAAAG,CAAY,EAAA,KAAA;AAEfA,IACH,KAAK,sBAAsB,EAAI,EAC/B,KAAK,QAAU,CAACA,EAEpB,CAGA,SAAU,CACF,KAAA,CAAE,QAAAhL,EAAS,QAAAgL,CAAY,EAAA,KAAA;AAEzBA,IACEhL,GAAW+G,EAAO,IAAI,QAAQ,KAAK,EACvC,KAAK,sBAAsB,EAC3B,KAAK,QAAU,CAACiE,EAEpB,CAGA,eAAgB,CACT,KAAK,aACA,QAAQ,EADC,KAAK,OAAO,CAEjC,CAyEA,SAAU,CACF,KAAA,CAAE,QAAAhL,EAAS,QAAAE,CAAY,EAAA,KACvB+K,EAAQ,CAAE,GAAG,KAAM,KAAM,KAAK,MAC9B/D,EAAW,IAAM,WAAW,IAAMD,GAAuBgE,EAAO,IAAM,MAAM,QAAA,CAAS,EAAG,EAAE,EAE5F/K,EAAQ,WAAa6G,EAAOkE,CAAK,GACnC,KAAK,QAAQ,MAAQ,EACrB,KAAK,KAAK,EACVL,uBAAqB5K,EAAwBkH,CAAQ,GAE5CA,GAEb,CACF,CA5REkC,EADmB3C,EACZ,WAAWN,IAClBiD,EAFmB3C,EAEZ,OAAOD,IACd4C,EAHmB3C,EAGZ,cAAcH,IACrB8C,EAJmB3C,EAIZ,WAAW7G"} \ No newline at end of file +{"version":3,"file":"tooltip-kta4uOnb.js","sources":["../../src/strings/popoverString.ts","../../src/strings/popoverComponent.ts","../../src/strings/tooltipString.ts","../../src/util/getTipTemplate.ts","../../src/util/tipClassPositions.ts","../../src/util/styleTip.ts","../../src/util/tooltipDefaults.ts","../../src/strings/dataOriginalTitle.ts","../../src/strings/tooltipComponent.ts","../../src/util/setHtml.ts","../../src/util/createTip.ts","../../src/util/getElementContainer.ts","../../src/components/tooltip.ts"],"sourcesContent":["/** @type {string} */\nconst popoverString = \"popover\";\nexport default popoverString;\n","/** @type {string} */\nconst popoverComponent = \"Popover\";\nexport default popoverComponent;\n","/** @type {string} */\nconst tooltipString = \"tooltip\";\nexport default tooltipString;\n","import tooltipString from \"../strings/tooltipString\";\n\n/**\n * Returns a template for Popover / Tooltip.\n *\n * @param tipType the expected markup type\n * @returns the template markup\n */\nconst getTipTemplate = (tipType: string) => {\n const isTooltip = tipType === tooltipString;\n const bodyClass = isTooltip ? `${tipType}-inner` : `${tipType}-body`;\n const header = !isTooltip ? `

` : \"\";\n const arrow = `
`;\n const body = `
`;\n return `
${\n header + arrow + body\n }
`;\n};\n\nexport default getTipTemplate;\n","const tipClassPositions = {\n top: \"top\",\n bottom: \"bottom\",\n left: \"start\",\n right: \"end\",\n};\n\nexport default tipClassPositions;\n","import {\n createCustomEvent,\n dispatchEvent,\n getBoundingClientRect,\n getDocumentElement,\n getElementStyle,\n isHTMLElement,\n isRTL,\n setElementStyle,\n toLowerCase,\n} from \"@thednp/shorty\";\n\nimport popoverComponent from \"../strings/popoverComponent\";\nimport tipClassPositions from \"./tipClassPositions\";\nimport Tooltip from \"../components/tooltip\";\nimport type { TooltipEvent } from \"../interface/tooltip\";\nimport type { PopoverEvent } from \"../interface/popover\";\n\n/**\n * Style popovers and tooltips.\n *\n * @param self the `Popover` / `Tooltip` instance\n */\nconst styleTip = (self: T) => {\n const tipClasses = /\\b(top|bottom|start|end)+/;\n const { element, tooltip, container, options, arrow } = self;\n\n // istanbul ignore else @preserve\n if (tooltip) {\n const tipPositions = { ...tipClassPositions };\n const RTL = isRTL(element);\n\n // reset tooltip style (top: 0, left: 0 works best)\n setElementStyle(tooltip, {\n // top: '0px', left: '0px', right: '', bottom: '',\n top: \"\",\n left: \"\",\n right: \"\",\n bottom: \"\",\n });\n const isPopover = self.name === popoverComponent;\n const { offsetWidth: tipWidth, offsetHeight: tipHeight } = tooltip;\n const { clientWidth: htmlcw, clientHeight: htmlch, offsetWidth: htmlow } =\n getDocumentElement(element);\n let { placement } = options;\n const { clientWidth: parentCWidth, offsetWidth: parentOWidth } =\n container as HTMLElement;\n const parentPosition = getElementStyle(\n container as HTMLElement,\n \"position\",\n );\n const fixedParent = parentPosition === \"fixed\";\n const scrollbarWidth = fixedParent\n ? Math.abs(parentCWidth - parentOWidth)\n : Math.abs(htmlcw - htmlow);\n const leftBoundry = RTL && fixedParent\n // istanbul ignore next @preserve\n ? scrollbarWidth\n : 0;\n const rightBoundry = htmlcw - (!RTL ? scrollbarWidth : 0) - 1;\n const {\n width: elemWidth,\n height: elemHeight,\n left: elemRectLeft,\n right: elemRectRight,\n top: elemRectTop,\n } = getBoundingClientRect(element, true);\n const { x, y } = {\n x: elemRectLeft,\n y: elemRectTop,\n };\n // reset arrow style\n setElementStyle(arrow as HTMLElement, {\n top: \"\",\n left: \"\",\n right: \"\",\n bottom: \"\",\n });\n let topPosition: number | string = 0;\n let bottomPosition: number | string = \"\";\n let leftPosition: number | string = 0;\n let rightPosition: number | string = \"\";\n let arrowTop: number | string = \"\";\n let arrowLeft: number | string = \"\";\n let arrowRight: number | string = \"\";\n\n const arrowWidth = (arrow as HTMLElement).offsetWidth || 0;\n const arrowHeight = (arrow as HTMLElement).offsetHeight || 0;\n const arrowAdjust = arrowWidth / 2;\n\n // check placement\n let topExceed = elemRectTop - tipHeight - arrowHeight < 0;\n let bottomExceed =\n elemRectTop + tipHeight + elemHeight + arrowHeight >= htmlch;\n let leftExceed = elemRectLeft - tipWidth - arrowWidth < leftBoundry;\n let rightExceed =\n elemRectLeft + tipWidth + elemWidth + arrowWidth >= rightBoundry;\n\n const horizontals = [\"left\", \"right\"];\n const verticals = [\"top\", \"bottom\"];\n\n topExceed = horizontals.includes(placement)\n ? elemRectTop + elemHeight / 2 - tipHeight / 2 - arrowHeight < 0\n : topExceed;\n bottomExceed = horizontals.includes(placement)\n ? elemRectTop + tipHeight / 2 + elemHeight / 2 + arrowHeight >= htmlch\n : bottomExceed;\n leftExceed = verticals.includes(placement)\n ? elemRectLeft + elemWidth / 2 - tipWidth / 2 < leftBoundry\n : leftExceed;\n rightExceed = verticals.includes(placement)\n ? elemRectLeft + tipWidth / 2 + elemWidth / 2 >= rightBoundry\n : rightExceed;\n\n // first remove side positions if both left and right limits are exceeded\n // we usually fall back to top|bottom\n placement = horizontals.includes(placement) && leftExceed && rightExceed\n ? \"top\"\n : placement;\n // recompute placement\n placement = placement === \"top\" && topExceed ? \"bottom\" : placement;\n placement = placement === \"bottom\" && bottomExceed ? \"top\" : placement;\n placement = placement === \"left\" && leftExceed ? \"right\" : placement;\n placement = placement === \"right\" && rightExceed\n ? \"left\"\n // istanbul ignore next @preserve\n : placement;\n\n // update tooltip/popover class\n if (!tooltip.className.includes(placement)) {\n tooltip.className = tooltip.className.replace(\n tipClasses,\n tipPositions[placement],\n );\n }\n\n // compute tooltip / popover coordinates\n // istanbul ignore else @preserve\n if (horizontals.includes(placement)) {\n // secondary|side positions\n if (placement === \"left\") {\n // LEFT\n leftPosition = x - tipWidth - (isPopover ? arrowWidth : 0);\n } else {\n // RIGHT\n leftPosition = x + elemWidth + (isPopover ? arrowWidth : 0);\n }\n\n // adjust top and arrow\n if (topExceed && bottomExceed) {\n topPosition = 0;\n bottomPosition = 0;\n arrowTop = elemRectTop + elemHeight / 2 - arrowHeight / 2;\n } else if (topExceed) {\n topPosition = y;\n bottomPosition = \"\";\n arrowTop = elemHeight / 2 - arrowWidth;\n } else if (bottomExceed) {\n topPosition = y - tipHeight + elemHeight;\n bottomPosition = \"\";\n arrowTop = tipHeight - elemHeight / 2 - arrowWidth;\n } else {\n topPosition = y - tipHeight / 2 + elemHeight / 2;\n arrowTop = tipHeight / 2 - arrowHeight / 2;\n }\n } else if (verticals.includes(placement)) {\n if (placement === \"top\") {\n topPosition = y - tipHeight - (isPopover ? arrowHeight : 0);\n } else {\n // BOTTOM\n topPosition = y + elemHeight + (isPopover ? arrowHeight : 0);\n }\n\n // adjust left | right and also the arrow\n if (leftExceed) {\n leftPosition = 0;\n arrowLeft = x + elemWidth / 2 - arrowAdjust;\n } else if (rightExceed) {\n leftPosition = \"auto\";\n rightPosition = 0;\n arrowRight = elemWidth / 2 + rightBoundry - elemRectRight - arrowAdjust;\n } else {\n leftPosition = x - tipWidth / 2 + elemWidth / 2;\n arrowLeft = tipWidth / 2 - arrowAdjust;\n }\n }\n\n // apply style to tooltip/popover\n setElementStyle(tooltip, {\n top: `${topPosition}px`,\n bottom: bottomPosition === \"\" ? \"\" : `${bottomPosition}px`,\n left: leftPosition === \"auto\" ? leftPosition : `${leftPosition}px`,\n right: rightPosition !== \"\" ? `${rightPosition}px` : \"\",\n });\n\n // update arrow placement\n // istanbul ignore else @preserve\n if (isHTMLElement(arrow)) {\n if (arrowTop !== \"\") {\n arrow.style.top = `${arrowTop}px`;\n }\n if (arrowLeft !== \"\") {\n arrow.style.left = `${arrowLeft}px`;\n } else if (arrowRight !== \"\") {\n arrow.style.right = `${arrowRight}px`;\n }\n }\n const updatedTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `updated.bs.${toLowerCase(self.name)}`,\n );\n dispatchEvent(element, updatedTooltipEvent);\n }\n};\n\nexport default styleTip;\n","import getTipTemplate from \"./getTipTemplate\";\nimport tooltipString from \"../strings/tooltipString\";\nimport { TooltipOptions } from \"../interface/tooltip\";\n\nconst tooltipDefaults: TooltipOptions = {\n template: getTipTemplate(tooltipString),\n title: \"\",\n customClass: \"\",\n trigger: \"hover focus\",\n placement: \"top\",\n sanitizeFn: undefined,\n animation: true,\n delay: 200,\n container: document.body,\n content: \"\",\n dismissible: false,\n btnClose: \"\",\n};\nexport default tooltipDefaults;\n","/**\n * Global namespace for `data-bs-title` attribute.\n */\nconst dataOriginalTitle = \"data-original-title\";\nexport default dataOriginalTitle;\n","/** @type {string} */\nconst tooltipComponent = \"Tooltip\";\nexport default tooltipComponent;\n","import {\n isArray,\n isFunction,\n isHTMLElement,\n isNode,\n isNodeList,\n isString,\n} from \"@thednp/shorty\";\n\n/**\n * Append an existing `Element` to Popover / Tooltip component or HTML\n * markup string to be parsed & sanitized to be used as popover / tooltip content.\n *\n * @param element target\n * @param content the `Element` to append / string\n * @param sanitizeFn a function to sanitize string content\n */\nconst setHtml = (\n element: HTMLElement,\n content: Node[] | Node | string,\n sanitizeFn?: (s: string) => string,\n) => {\n // istanbul ignore else @preserve\n if (isString(content) && content.length) {\n let dirty = content.trim(); // fixing #233\n if (isFunction(sanitizeFn)) dirty = sanitizeFn(dirty);\n\n const domParser = new DOMParser();\n const tempDocument = domParser.parseFromString(dirty, \"text/html\");\n element.append(...[...tempDocument.body.childNodes]);\n } else if (isHTMLElement(content)) {\n element.append(content);\n } else if (\n isNodeList(content) || (isArray(content) && content.every(isNode))\n ) {\n element.append(...[...content]);\n }\n};\nexport default setHtml;\n","import {\n addClass,\n createElement,\n hasClass,\n isHTMLElement,\n isRTL,\n querySelector,\n setAttribute,\n} from \"@thednp/shorty\";\n\nimport tooltipComponent from \"../strings/tooltipComponent\";\nimport tooltipString from \"../strings/tooltipString\";\nimport popoverString from \"../strings/popoverString\";\nimport fadeClass from \"../strings/fadeClass\";\nimport tipClassPositions from \"./tipClassPositions\";\nimport setHtml from \"./setHtml\";\nimport Tooltip from \"../components/tooltip\";\nimport Popover from \"../components/popover\";\n\n/**\n * Creates a new tooltip / popover.\n *\n * @param self the `Tooltip` / `Popover` instance\n */\nconst createTip = (self: Tooltip | Popover) => {\n const isTooltip = self.name === tooltipComponent;\n\n const { id, element, options } = self;\n const {\n title,\n placement,\n template,\n animation,\n customClass,\n sanitizeFn,\n dismissible,\n content,\n btnClose,\n } = options;\n const tipString = isTooltip ? tooltipString : popoverString;\n const tipPositions = { ...tipClassPositions };\n let titleParts: Node[] = [];\n let contentParts: Node[] = [];\n\n if (isRTL(element)) {\n tipPositions.left = \"end\";\n tipPositions.right = \"start\";\n }\n\n // set initial popover class\n const placementClass = `bs-${tipString}-${tipPositions[placement]}`;\n\n // load template\n let tooltipTemplate: Node | string;\n if (isHTMLElement(template)) {\n tooltipTemplate = template;\n } else {\n const htmlMarkup = createElement(\"div\") as HTMLElement;\n setHtml(htmlMarkup, template, sanitizeFn);\n tooltipTemplate = htmlMarkup.firstChild as HTMLElement;\n }\n\n // set popover markup\n self.tooltip = isHTMLElement(tooltipTemplate)\n ? (tooltipTemplate.cloneNode(true) as HTMLElement)\n // istanbul ignore next @preserve\n : undefined;\n\n const { tooltip } = self;\n // istanbul ignore else @preserve\n if (tooltip) {\n // set id and role attributes\n setAttribute(tooltip, \"id\", id);\n setAttribute(tooltip, \"role\", tooltipString);\n\n const bodyClass = isTooltip\n ? `${tooltipString}-inner`\n : `${popoverString}-body`;\n const tooltipHeader = isTooltip\n ? null\n : querySelector(`.${popoverString}-header`, tooltip);\n const tooltipBody = querySelector(`.${bodyClass}`, tooltip);\n\n // set arrow and enable access for styleTip\n self.arrow = querySelector(`.${tipString}-arrow`, tooltip) as HTMLElement;\n const { arrow } = self;\n\n if (isHTMLElement(title)) titleParts = [title.cloneNode(true)];\n else {\n const tempTitle = createElement(\"div\") as HTMLElement;\n setHtml(tempTitle, title, sanitizeFn);\n titleParts = [...[...tempTitle.childNodes]];\n }\n\n if (isHTMLElement(content)) contentParts = [content.cloneNode(true)];\n else {\n const tempContent = createElement(\"div\") as HTMLElement;\n setHtml(tempContent, content, sanitizeFn);\n contentParts = [...[...tempContent.childNodes]];\n }\n\n // set dismissible button\n if (dismissible) {\n if (title) {\n if (isHTMLElement(btnClose)) {\n titleParts = [...titleParts, btnClose.cloneNode(true)];\n } else {\n const tempBtn = createElement(\"div\") as HTMLElement;\n setHtml(tempBtn, btnClose, sanitizeFn);\n titleParts = [...titleParts, tempBtn.firstChild as Node];\n }\n } else {\n // istanbul ignore else @preserve\n if (tooltipHeader) tooltipHeader.remove();\n if (isHTMLElement(btnClose)) {\n contentParts = [...contentParts, btnClose.cloneNode(true)];\n } else {\n const tempBtn = createElement(\"div\") as HTMLElement;\n setHtml(tempBtn, btnClose, sanitizeFn);\n contentParts = [...contentParts, tempBtn.firstChild as Node];\n }\n }\n }\n\n // fill the template with content from options / data attributes\n // also sanitize title && content\n // istanbul ignore else @preserve\n if (!isTooltip) {\n // istanbul ignore else @preserve\n if (title && tooltipHeader) {\n setHtml(tooltipHeader, titleParts, sanitizeFn);\n }\n // istanbul ignore else @preserve\n if (content && tooltipBody) {\n setHtml(tooltipBody, contentParts, sanitizeFn);\n }\n // set btn\n self.btn = querySelector(\".btn-close\", tooltip) || undefined;\n } else if (title && tooltipBody) setHtml(tooltipBody, title, sanitizeFn);\n\n // Bootstrap 5.2.x\n // addClass(tooltip, 'position-absolute');\n addClass(tooltip, \"position-fixed\");\n addClass(arrow, \"position-absolute\");\n\n // set popover animation and placement\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, tipString)) addClass(tooltip, tipString);\n // istanbul ignore else @preserve\n if (animation && !hasClass(tooltip, fadeClass)) {\n addClass(tooltip, fadeClass);\n }\n // istanbul ignore else @preserve\n if (customClass && !hasClass(tooltip, customClass)) {\n addClass(tooltip, customClass);\n }\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, placementClass)) addClass(tooltip, placementClass);\n }\n};\n\nexport default createTip;\n","import {\n getDocument,\n getElementStyle,\n getParentNode,\n isShadowRoot,\n isTableElement,\n} from \"@thednp/shorty\";\n\n/**\n * Returns an `HTMLElement` to be used as default value for *options.container*\n * for `Tooltip` / `Popover` components.\n *\n * @see https://github.com/floating-ui/floating-ui\n *\n * @param element the target\n * @returns the query result\n */\nconst getElementContainer = (element: HTMLElement): ParentNode => {\n const majorBlockTags = [\"HTML\", \"BODY\"];\n const containers: ParentNode[] = [];\n let { parentNode } = element as Node;\n\n while (parentNode && !majorBlockTags.includes(parentNode.nodeName)) {\n parentNode = getParentNode(parentNode) as ParentNode;\n // istanbul ignore else @preserve\n if (!(isShadowRoot(parentNode) || isTableElement(parentNode))) {\n containers.push(parentNode);\n }\n }\n\n return (\n containers.find((c, i) => {\n if (\n getElementStyle(c as HTMLElement, \"position\") !== \"relative\" &&\n containers.slice(i + 1).every((r) =>\n getElementStyle(r as HTMLElement, \"position\") === \"static\"\n )\n ) {\n return c;\n }\n return null;\n }) ||\n // istanbul ignore next: optional guard\n getDocument(element).body\n );\n};\n\nexport default getElementContainer;\n","/* Native JavaScript for Bootstrap 5 | Tooltip\n---------------------------------------------- */\nimport {\n addClass,\n ariaDescribedBy,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focus,\n focusEvent,\n focusinEvent,\n focusoutEvent,\n getAttribute,\n getDocument,\n getElementStyle,\n getInstance,\n getUID,\n getWindow,\n hasAttribute,\n hasClass,\n isApple,\n mouseclickEvent,\n mousedownEvent,\n mouseenterEvent,\n mousehoverEvent,\n mouseleaveEvent,\n ObjectAssign,\n passiveHandler,\n removeAttribute,\n removeClass,\n resizeEvent,\n scrollEvent,\n setAttribute,\n Timer,\n toLowerCase,\n touchstartEvent,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport dataOriginalTitle from \"../strings/dataOriginalTitle\";\nimport showClass from \"../strings/showClass\";\nimport tooltipString from \"../strings/tooltipString\";\nimport tooltipComponent from \"../strings/tooltipComponent\";\nimport popoverString from \"../strings/popoverString\";\nimport popoverComponent from \"../strings/popoverComponent\";\nimport modalString from \"../strings/modalString\";\nimport offcanvasString from \"../strings/offcanvasString\";\n\nimport styleTip from \"../util/styleTip\";\nimport createTip from \"../util/createTip\";\nimport { appendPopup, hasPopup, removePopup } from \"../util/popupContainer\";\nimport getElementContainer from \"../util/getElementContainer\";\nimport tooltipDefaults from \"../util/tooltipDefaults\";\nimport BaseComponent from \"./base-component\";\nimport type { TooltipEvent, TooltipOptions } from \"../interface/tooltip\";\nimport type { PopoverEvent, PopoverOptions } from \"../interface/popover\";\n\n// TOOLTIP PRIVATE GC\n// ==================\nconst tooltipSelector =\n `[${dataBsToggle}=\"${tooltipString}\"],[data-tip=\"${tooltipString}\"]`;\nconst titleAttr = \"title\";\n\n/**\n * Static method which returns an existing `Tooltip` instance associated\n * to a target `Element`.\n */\nlet getTooltipInstance = (element: HTMLElement) =>\n getInstance(element, tooltipComponent);\n\n/**\n * A `Tooltip` initialization callback.\n */\nconst tooltipInitCallback = (element: HTMLElement) => new Tooltip(element);\n\n// TOOLTIP PRIVATE METHODS\n// =======================\n/**\n * Removes the tooltip from the DOM.\n *\n * @param self the `Tooltip` instance\n */\nconst removeTooltip = (self: Tooltip) => {\n const { element, tooltip, container, offsetParent } = self;\n removeAttribute(element, ariaDescribedBy);\n removePopup(\n tooltip as HTMLElement,\n container === offsetParent ? container : offsetParent,\n );\n};\n\n/**\n * Check if container contains the tooltip.\n *\n * @param self Tooltip\n */\nconst hasTip = (self: Tooltip): boolean | undefined => {\n const { tooltip, container, offsetParent } = self;\n\n return tooltip &&\n hasPopup(tooltip, container === offsetParent ? container : offsetParent);\n};\n\n/**\n * Executes after the instance has been disposed.\n *\n * @param self the `Tooltip` instance\n * @param callback the parent dispose callback\n */\nconst disposeTooltipComplete = (self: Tooltip, callback?: () => void) => {\n const { element } = self;\n self._toggleEventListeners();\n\n // istanbul ignore else @preserve\n if (\n hasAttribute(element, dataOriginalTitle) && self.name === tooltipComponent\n ) {\n toggleTooltipTitle(self);\n }\n // istanbul ignore else @preserve\n if (callback) callback();\n};\n\n/**\n * Toggles on/off the special `Tooltip` event listeners.\n *\n * @param self the `Tooltip` instance\n * @param add when `true`, event listeners are added\n */\nconst toggleTooltipAction = (self: Tooltip, add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element } = self;\n\n action(\n getDocument(element),\n touchstartEvent,\n self.handleTouch,\n passiveHandler,\n );\n\n [scrollEvent, resizeEvent].forEach((ev) => {\n action(getWindow(element), ev, self.update, passiveHandler);\n });\n};\n\n/**\n * Executes after the tooltip was shown to the user.\n *\n * @param self the `Tooltip` instance\n */\nconst tooltipShownAction = (self: Tooltip) => {\n const { element } = self;\n const shownTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `shown.bs.${toLowerCase(self.name)}`,\n );\n\n toggleTooltipAction(self, true);\n dispatchEvent(element, shownTooltipEvent);\n Timer.clear(element, \"in\");\n};\n\n/**\n * Executes after the tooltip was hidden to the user.\n *\n * @param self the `Tooltip` instance\n */\nconst tooltipHiddenAction = (self: Tooltip) => {\n const { element } = self;\n const hiddenTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `hidden.bs.${toLowerCase(self.name)}`,\n );\n\n toggleTooltipAction(self);\n removeTooltip(self);\n dispatchEvent(element, hiddenTooltipEvent);\n\n Timer.clear(element, \"out\");\n};\n\n/**\n * Toggles on/off the `Tooltip` event listeners that hide/update the tooltip.\n *\n * @param self the `Tooltip` instance\n * @param add when `true`, event listeners are added\n */\nconst toggleTooltipOpenHandlers = (self: Tooltip, add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, container, offsetParent } = self;\n const { offsetHeight, scrollHeight } = container as HTMLElement;\n const parentModal = closest(element, `.${modalString}`);\n const parentOffcanvas = closest(element, `.${offcanvasString}`);\n\n // istanbul ignore else @preserve\n const win = getWindow(element);\n const overflow = offsetHeight !== scrollHeight;\n const scrollTarget = container === offsetParent && overflow ? container : win;\n action(scrollTarget, resizeEvent, self.update, passiveHandler);\n action(scrollTarget, scrollEvent, self.update, passiveHandler);\n\n // dismiss tooltips inside modal / offcanvas\n if (parentModal) {\n action(parentModal, `hide.bs.${modalString}`, self.handleHide);\n }\n if (parentOffcanvas) {\n action(parentOffcanvas, `hide.bs.${offcanvasString}`, self.handleHide);\n }\n};\n\n/**\n * Toggles the `title` and `data-original-title` attributes.\n *\n * @param self the `Tooltip` instance\n * @param content when `true`, event listeners are added\n */\nconst toggleTooltipTitle = (self: Tooltip, content?: string) => {\n // [0 - add, 1 - remove] | [0 - remove, 1 - add]\n const titleAtt = [dataOriginalTitle, titleAttr];\n const { element } = self;\n\n setAttribute(\n element,\n titleAtt[content ? 0 : 1],\n content ||\n getAttribute(element, titleAtt[0]) ||\n // istanbul ignore next @preserve\n \"\",\n );\n removeAttribute(element, titleAtt[content ? 1 : 0]);\n};\n\n// TOOLTIP DEFINITION\n// ==================\n/** Creates a new `Tooltip` instance. */\nexport default class Tooltip extends BaseComponent {\n static selector = tooltipSelector;\n static init = tooltipInitCallback;\n static getInstance = getTooltipInstance;\n static styleTip = styleTip;\n declare options: TooltipOptions;\n declare btn?: HTMLElement;\n declare tooltip?: HTMLElement;\n declare container: ParentNode;\n declare arrow?: HTMLElement;\n declare offsetParent?: HTMLElement;\n declare enabled: boolean;\n declare id: string;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n\n const { element } = this;\n const isTooltip = this.name === tooltipComponent;\n const tipString = isTooltip ? tooltipString : popoverString;\n const tipComponent = isTooltip ? tooltipComponent : popoverComponent;\n\n // istanbul ignore next @preserve: this is to set Popover too\n getTooltipInstance = (elem: HTMLElement) =>\n getInstance(elem, tipComponent);\n\n // additional properties\n this.enabled = true;\n /** Set unique ID for `aria-describedby`. */\n this.id = `${tipString}-${getUID(element, tipString)}`;\n\n // instance options\n const { options } = this;\n\n // invalidate\n if (!((!options.title && isTooltip) || (!isTooltip && !options.content))) {\n // reset default options\n ObjectAssign(tooltipDefaults, { titleAttr: \"\" });\n\n // set title attributes and add event listeners\n // istanbul ignore else @preserve\n if (\n hasAttribute(element, titleAttr) && isTooltip &&\n typeof options.title === \"string\"\n ) {\n toggleTooltipTitle(this, options.title);\n }\n\n // set containers\n this.container = getElementContainer(element);\n this.offsetParent = [\"sticky\", \"fixed\"].some(\n (position) =>\n getElementStyle(this.container as HTMLElement, \"position\") ===\n position,\n )\n ? (this.container as HTMLElement)\n : getDocument(this.element).body;\n\n // create tooltip here\n createTip(this);\n\n // attach events\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tooltipComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return tooltipDefaults;\n }\n\n // TOOLTIP PUBLIC METHODS\n // ======================\n /** Handles the focus event on iOS. */\n // istanbul ignore next @preserve - impossible to test without Apple device\n handleFocus = () => focus(this.element);\n /** Shows the tooltip. */\n handleShow = () => this.show();\n show() {\n const { options, tooltip, element, container, offsetParent, id } = this;\n const { animation } = options;\n const outTimer = Timer.get(element, \"out\");\n const tipContainer = container === offsetParent ? container : offsetParent;\n\n Timer.clear(element, \"out\");\n\n if (tooltip && !outTimer && !hasTip(this)) {\n Timer.set(\n element,\n () => {\n const showTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `show.bs.${toLowerCase(this.name)}`,\n );\n dispatchEvent(element, showTooltipEvent);\n\n // istanbul ignore else @preserve\n if (!showTooltipEvent.defaultPrevented) {\n // append to container\n appendPopup(tooltip, tipContainer);\n\n setAttribute(element, ariaDescribedBy, `#${id}`);\n\n this.update();\n toggleTooltipOpenHandlers(this, true);\n\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, showClass)) addClass(tooltip, showClass);\n // istanbul ignore else @preserve\n if (animation) {\n emulateTransitionEnd(tooltip, () => tooltipShownAction(this));\n } else tooltipShownAction(this);\n }\n },\n 17,\n \"in\",\n );\n }\n }\n\n /** Hides the tooltip. */\n handleHide = () => this.hide();\n hide() {\n const { options, tooltip, element } = this;\n const { animation, delay } = options;\n\n Timer.clear(element, \"in\");\n\n // istanbul ignore else @preserve\n if (tooltip && hasTip(this)) {\n Timer.set(\n element,\n () => {\n const hideTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `hide.bs.${toLowerCase(this.name)}`,\n );\n dispatchEvent(element, hideTooltipEvent);\n\n // istanbul ignore else @preserve\n if (!hideTooltipEvent.defaultPrevented) {\n this.update();\n removeClass(tooltip, showClass);\n toggleTooltipOpenHandlers(this);\n\n // istanbul ignore else @preserve\n if (animation) {\n emulateTransitionEnd(tooltip, () => tooltipHiddenAction(this));\n } else tooltipHiddenAction(this);\n }\n },\n delay + 17,\n \"out\",\n );\n }\n }\n\n /** Updates the tooltip position. */\n update = () => {\n styleTip(this);\n };\n\n /** Toggles the tooltip visibility. */\n toggle = () => {\n const { tooltip } = this;\n\n if (tooltip && !hasTip(this)) this.show();\n else this.hide();\n };\n\n /** Enables the tooltip. */\n enable() {\n const { enabled } = this;\n // istanbul ignore else @preserve\n if (!enabled) {\n this._toggleEventListeners(true);\n this.enabled = !enabled;\n }\n }\n\n /** Disables the tooltip. */\n disable() {\n const { tooltip, enabled } = this;\n // istanbul ignore else @preserve\n if (enabled) {\n if (tooltip && hasTip(this)) this.hide();\n this._toggleEventListeners();\n this.enabled = !enabled;\n }\n }\n\n /** Toggles the `disabled` property. */\n toggleEnabled() {\n if (!this.enabled) this.enable();\n else this.disable();\n }\n\n /**\n * Handles the `touchstart` event listener for `Tooltip`\n *\n * @this {Tooltip}\n * @param {TouchEvent} e the `Event` object\n */\n handleTouch = ({ target }: TouchEvent) => {\n const { tooltip, element } = this;\n\n // istanbul ignore if @preserve\n if (\n (tooltip && tooltip.contains(target as HTMLElement)) ||\n target === element ||\n (target && element.contains(target as HTMLElement))\n ) {\n // smile for ESLint\n } else {\n this.hide();\n }\n };\n\n /**\n * Toggles on/off the `Tooltip` event listeners.\n *\n * @param add when `true`, event listeners are added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n // btn is only for dismissible popover\n const { element, options, btn } = this;\n const { trigger } = options;\n const isPopover = this.name !== tooltipComponent;\n const dismissible = isPopover && (options as PopoverOptions).dismissible\n ? true\n : false;\n\n // istanbul ignore else @preserve\n if (!trigger.includes(\"manual\")) {\n this.enabled = !!add;\n\n const triggerOptions = trigger.split(\" \");\n\n triggerOptions.forEach((tr) => {\n // istanbul ignore else @preserve\n if (tr === mousehoverEvent) {\n action(element, mousedownEvent, this.handleShow);\n action(element, mouseenterEvent, this.handleShow);\n\n // istanbul ignore else @preserve\n if (!dismissible) {\n action(element, mouseleaveEvent, this.handleHide);\n action(\n getDocument(element),\n touchstartEvent,\n this.handleTouch,\n passiveHandler,\n );\n }\n } else if (tr === mouseclickEvent) {\n action(element, tr, !dismissible ? this.toggle : this.handleShow);\n } else if (tr === focusEvent) {\n action(element, focusinEvent, this.handleShow);\n // istanbul ignore else @preserve\n if (!dismissible) action(element, focusoutEvent, this.handleHide);\n // istanbul ignore else @preserve\n if (isApple) {\n action(element, mouseclickEvent, this.handleFocus);\n }\n }\n // istanbul ignore else @preserve\n if (dismissible && btn) {\n action(btn, mouseclickEvent, this.handleHide);\n }\n });\n }\n };\n\n /** Removes the `Tooltip` from the target element. */\n dispose() {\n const { tooltip, options } = this;\n const clone = { ...this, name: this.name };\n const callback = () =>\n setTimeout(\n () => disposeTooltipComplete(clone, () => super.dispose()),\n 17,\n );\n\n if (options.animation && hasTip(clone)) {\n this.options.delay = 0; // reset delay\n this.hide();\n emulateTransitionEnd(tooltip as HTMLElement, callback);\n } else {\n callback();\n }\n }\n}\n"],"names":["popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","arrow","body","tipClassPositions","styleTip","self","tipClasses","element","tooltip","container","options","tipPositions","RTL","isRTL","setElementStyle","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","getDocumentElement","placement","parentCWidth","parentOWidth","fixedParent","getElementStyle","scrollbarWidth","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","getBoundingClientRect","x","y","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","topExceed","bottomExceed","leftExceed","rightExceed","horizontals","verticals","isHTMLElement","updatedTooltipEvent","createCustomEvent","toLowerCase","dispatchEvent","tooltipDefaults","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","isString","dirty","isFunction","tempDocument","isNodeList","isArray","isNode","createTip","id","title","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","createElement","setAttribute","tooltipHeader","querySelector","tooltipBody","tempTitle","tempContent","tempBtn","addClass","hasClass","fadeClass","getElementContainer","majorBlockTags","containers","parentNode","getParentNode","isShadowRoot","isTableElement","c","i","getDocument","tooltipSelector","dataBsToggle","titleAttr","getTooltipInstance","getInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","removeAttribute","ariaDescribedBy","removePopup","hasTip","hasPopup","disposeTooltipComplete","callback","hasAttribute","toggleTooltipTitle","toggleTooltipAction","add","action","addListener","removeListener","touchstartEvent","passiveHandler","scrollEvent","resizeEvent","ev","getWindow","tooltipShownAction","shownTooltipEvent","Timer","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","offsetHeight","scrollHeight","parentModal","closest","modalString","parentOffcanvas","offcanvasString","win","scrollTarget","titleAtt","getAttribute","BaseComponent","target","config","__publicField","focus","btn","trigger","tr","mousehoverEvent","mousedownEvent","mouseenterEvent","mouseleaveEvent","mouseclickEvent","focusEvent","focusinEvent","focusoutEvent","isApple","tipComponent","elem","getUID","ObjectAssign","position","outTimer","tipContainer","showTooltipEvent","appendPopup","showClass","emulateTransitionEnd","delay","hideTooltipEvent","removeClass","enabled","clone"],"mappings":"qcACMA,EAAgB,UCAhBC,GAAmB,UCAnBC,EAAgB,UCOhBC,GAAkBC,GAAoB,CAC1C,MAAMC,EAAYD,IAAYF,EACxBI,EAAYD,EAAY,GAAGD,CAAO,SAAW,GAAGA,CAAO,QACvDG,EAAUF,EAAoD,GAAxC,cAAcD,CAAO,iBAC3CI,EAAQ,eAAeJ,CAAO,iBAC9BK,EAAO,eAAeH,CAAS,WACrC,MAAO,eAAeF,CAAO,WAAWF,CAAa,KACnDK,EAASC,EAAQC,CACnB,QACF,ECjBMC,GAAoB,CACxB,IAAK,MACL,OAAQ,SACR,KA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,EACrB,KAAK,KAAK,EACVL,uBAAqB5K,EAAwBkH,CAAQ,GAE5CA,GAEb,CACF,CAnTEkC,EADmB3C,EACZ,WAAWN,IAClBiD,EAFmB3C,EAEZ,OAAOD,IACd4C,EAHmB3C,EAGZ,cAAcH,IACrB8C,EAJmB3C,EAIZ,WAAW7G"} \ No newline at end of file diff --git a/dist/components/tooltip.d.ts b/dist/components/tooltip.d.ts index a266fc05..4c6d5467 100644 --- a/dist/components/tooltip.d.ts +++ b/dist/components/tooltip.d.ts @@ -1,5 +1,5 @@ export interface BaseOptions { - [key: string]: any; + [key: string]: unknown; } declare class BaseComponent { element: HTMLElement; diff --git a/dist/components/tooltip.mjs b/dist/components/tooltip.mjs index e1c194a8..5688fc84 100644 --- a/dist/components/tooltip.mjs +++ b/dist/components/tooltip.mjs @@ -1,10 +1,10 @@ import "@thednp/shorty"; import "@thednp/event-listener"; import "./dataBsToggle-B84TS15h.mjs"; -import { T as f } from "./tooltip-B1BCkN2D.mjs"; +import { T as f } from "./tooltip-Qmkn435O.mjs"; import "./showClass-C8hdJfjQ.mjs"; import "./popupContainer-BitC465I.mjs"; -import "./base-component-nXu3wApu.mjs"; +import "./base-component-DHbs0JQk.mjs"; export { f as default }; diff --git a/docs/assets/js/bootstrap-native.js b/docs/assets/js/bootstrap-native.js index d9300832..b9d2bb42 100644 --- a/docs/assets/js/bootstrap-native.js +++ b/docs/assets/js/bootstrap-native.js @@ -147,10 +147,8 @@ a!==l&&Co(this,l);return}const{offsets:r}=this;// istanbul ignore else @preserve if(a&&n0){this.activeItem=null;// istanbul ignore else @preserve e&&yo(e);return}c.forEach((l,g)=>{a!==l&&n>=r[g]&&(typeof r[g+1]>"u"||n{(e?_:B)(this.scrollTarget,Ie,this.refresh,st)});const{element:o,options:i}=this;this.target=P(i.target,w(o)),this.target&&(this.scrollTarget=o.clientHeightW(t,So),Lc=t=>new se(t),As=$(`show.bs.${Ee}`),Do=$(`shown.bs.${Ee}`),Is=$(`hide.bs.${Ee}`),xo=$(`hidden.bs.${Ee}`),$e=new Map,Ao=t=>{const{tabContent:s,nav:e}=t;// istanbul ignore else @preserve s&&f(s,Nt)&&(s.style.height="",b(s,Nt));// istanbul ignore else @preserve -e&&u.clear(e)},Io=t=>{const{element:s,tabContent:e,content:n,nav:o}=t,{tab:i}=T(o)&&$e.get(o)||{tab:null};// istanbul ignore next @preserve -// istanbul ignore else @preserve -if(e&&n&&f(n,F)){const{currentHeight:c,nextHeight:a}=$e.get(s)||{currentHeight:0,nextHeight:0};// istanbul ignore next @preserve -// istanbul ignore else @preserve: vitest won't validate this branch +e&&u.clear(e)},Io=t=>{const{element:s,tabContent:e,content:n,nav:o}=t,{tab:i}=T(o)&&$e.get(o)||{tab:null};// istanbul ignore else @preserve +if(e&&n&&f(n,F)){const{currentHeight:c,nextHeight:a}=$e.get(s)||{currentHeight:0,nextHeight:0};// istanbul ignore else @preserve: vitest won't validate this branch c!==a?setTimeout(()=>{e.style.height=`${a}px`,Lt(e),A(e,()=>Ao(t))},50):Ao(t)}else o&&u.clear(o);Do.relatedTarget=i,E(s,Do)},Lo=t=>{const{element:s,content:e,tabContent:n,nav:o}=t,{tab:i,content:c}=o&&$e.get(o)||{tab:null,content:null};let a=0;// istanbul ignore else @preserve n&&e&&f(e,F)&&([c,e].forEach(r=>{// istanbul ignore else @preserve T(r)&&h(r,"overflow-hidden")}),a=T(c)?c.scrollHeight:0),As.relatedTarget=i,xo.relatedTarget=s,E(s,As);// istanbul ignore else @preserve diff --git a/docs/assets/js/bootstrap-native.js.map b/docs/assets/js/bootstrap-native.js.map index d19baaec..718764d5 100644 --- a/docs/assets/js/bootstrap-native.js.map +++ b/docs/assets/js/bootstrap-native.js.map @@ -1 +1 @@ -{"version":3,"file":"bootstrap-native.js","sources":["../node_modules/.pnpm/@thednp+shorty@2.0.5/node_modules/@thednp/shorty/dist/shorty.mjs","../node_modules/.pnpm/@thednp+event-listener@2.0.6/node_modules/@thednp/event-listener/dist/event-listener.mjs","../src/strings/fadeClass.ts","../src/strings/showClass.ts","../src/strings/dataBsDismiss.ts","../src/strings/alertString.ts","../src/strings/alertComponent.ts","../src/version.ts","../src/components/base-component.ts","../src/components/alert.ts","../src/strings/activeClass.ts","../src/strings/dataBsToggle.ts","../src/strings/buttonString.ts","../src/strings/buttonComponent.ts","../src/components/button.ts","../src/strings/dataBsTarget.ts","../src/strings/carouselString.ts","../src/strings/carouselComponent.ts","../src/strings/dataBsParent.ts","../src/strings/dataBsContainer.ts","../src/util/getTargetElement.ts","../src/components/carousel.ts","../src/strings/collapsingClass.ts","../src/strings/collapseString.ts","../src/strings/collapseComponent.ts","../src/components/collapse.ts","../src/strings/dropdownClasses.ts","../src/strings/dropdownComponent.ts","../src/strings/dropdownMenuClass.ts","../src/util/isEmptyAnchor.ts","../src/components/dropdown.ts","../src/strings/modalString.ts","../src/strings/modalComponent.ts","../src/strings/offcanvasComponent.ts","../src/strings/fixedTopClass.ts","../src/strings/fixedBottomClass.ts","../src/strings/stickyTopClass.ts","../src/strings/positionStickyClass.ts","../src/util/scrollbar.ts","../src/strings/offcanvasString.ts","../src/util/popupContainer.ts","../src/util/backdrop.ts","../src/util/isVisible.ts","../src/components/modal.ts","../src/components/offcanvas.ts","../src/strings/popoverString.ts","../src/strings/popoverComponent.ts","../src/strings/tooltipString.ts","../src/util/getTipTemplate.ts","../src/util/tipClassPositions.ts","../src/util/styleTip.ts","../src/util/tooltipDefaults.ts","../src/strings/dataOriginalTitle.ts","../src/strings/tooltipComponent.ts","../src/util/setHtml.ts","../src/util/createTip.ts","../src/util/getElementContainer.ts","../src/components/tooltip.ts","../src/components/popover.ts","../src/strings/scrollspyString.ts","../src/strings/scrollspyComponent.ts","../src/components/scrollspy.ts","../src/strings/tabString.ts","../src/strings/tabComponent.ts","../src/components/tab.ts","../src/strings/toastString.ts","../src/strings/toastComponent.ts","../src/components/toast.ts","../src/util/init.ts"],"sourcesContent":["const he = \"aria-checked\", ye = \"aria-description\", we = \"aria-describedby\", Ae = \"aria-expanded\", Se = \"aria-haspopup\", X = \"aria-hidden\", Ne = \"aria-label\", Me = \"aria-labelledby\", Te = \"aria-modal\", ke = \"aria-pressed\", De = \"aria-selected\", Ce = \"aria-valuemin\", Oe = \"aria-valuemax\", Le = \"aria-valuenow\", Ie = \"aria-valuetext\", Y = \"abort\", Z = \"beforeunload\", $ = \"blur\", _ = \"change\", tt = \"contextmenu\", P = \"DOMContentLoaded\", et = \"DOMMouseScroll\", nt = \"error\", ot = \"focus\", st = \"focusin\", ct = \"focusout\", rt = \"gesturechange\", at = \"gestureend\", it = \"gesturestart\", ut = \"keydown\", lt = \"keypress\", dt = \"keyup\", pt = \"load\", ft = \"click\", mt = \"dblclick\", gt = \"mousedown\", vt = \"mouseup\", Et = \"hover\", bt = \"mouseenter\", ht = \"mouseleave\", yt = \"mousein\", wt = \"mouseout\", At = \"mouseover\", St = \"mousemove\", Nt = \"mousewheel\", Mt = \"move\", Tt = \"orientationchange\", kt = \"pointercancel\", Dt = \"pointerdown\", Ct = \"pointerleave\", Ot = \"pointermove\", Lt = \"pointerup\", It = \"readystatechange\", xt = \"reset\", zt = \"resize\", Vt = \"select\", Bt = \"selectend\", Ft = \"selectstart\", Ht = \"scroll\", Pt = \"submit\", Ut = \"touchstart\", Wt = \"touchmove\", Rt = \"touchcancel\", Qt = \"touchend\", jt = \"unload\", xe = {\n DOMContentLoaded: P,\n DOMMouseScroll: et,\n abort: Y,\n beforeunload: Z,\n blur: $,\n change: _,\n click: ft,\n contextmenu: tt,\n dblclick: mt,\n error: nt,\n focus: ot,\n focusin: st,\n focusout: ct,\n gesturechange: rt,\n gestureend: at,\n gesturestart: it,\n hover: Et,\n keydown: ut,\n keypress: lt,\n keyup: dt,\n load: pt,\n mousedown: gt,\n mousemove: St,\n mousein: yt,\n mouseout: wt,\n mouseenter: bt,\n mouseleave: ht,\n mouseover: At,\n mouseup: vt,\n mousewheel: Nt,\n move: Mt,\n orientationchange: Tt,\n pointercancel: kt,\n pointerdown: Dt,\n pointerleave: Ct,\n pointermove: Ot,\n pointerup: Lt,\n readystatechange: It,\n reset: xt,\n resize: zt,\n scroll: Ht,\n select: Vt,\n selectend: Bt,\n selectstart: Ft,\n submit: Pt,\n touchcancel: Rt,\n touchend: Qt,\n touchmove: Wt,\n touchstart: Ut,\n unload: jt\n}, ze = \"drag\", Ve = \"dragstart\", Be = \"dragenter\", Fe = \"dragleave\", He = \"dragover\", Pe = \"dragend\", Ue = \"loadstart\", We = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, Re = { down: \"mousedown\", up: \"mouseup\" }, Qe = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : (\n /* istanbul ignore next */\n [\"mouseover\", \"mouseout\"]\n), je = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, qe = { in: \"focusin\", out: \"focusout\" }, qt = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]', Ge = {\n Backspace: \"Backspace\",\n // 8\n Tab: \"Tab\",\n // 9\n Enter: \"Enter\",\n // 13\n Shift: \"Shift\",\n // 16\n Control: \"Control\",\n // 17\n Alt: \"Alt\",\n // 18\n Pause: \"Pause\",\n // 19\n CapsLock: \"CapsLock\",\n // 20\n Escape: \"Escape\",\n // 27\n Scape: \"Space\",\n // 32\n ArrowLeft: \"ArrowLeft\",\n // 37\n ArrowUp: \"ArrowUp\",\n // 38\n ArrowRight: \"ArrowRight\",\n // 39\n ArrowDown: \"ArrowDown\",\n // 40\n Insert: \"Insert\",\n // 45\n Delete: \"Delete\",\n // 46\n Meta: \"Meta\",\n // 91 windows key\n ContextMenu: \"ContextMenu\",\n // 93\n ScrollLock: \"ScrollLock\"\n // 145\n}, Ke = \"Alt\", Je = \"ArrowDown\", Xe = \"ArrowUp\", Ye = \"ArrowLeft\", Ze = \"ArrowRight\", $e = \"Backspace\", _e = \"CapsLock\", tn = \"Control\", en = \"Delete\", nn = \"Enter\", on = \"NumpadEnter\", sn = \"Escape\", cn = \"Insert\", rn = \"Meta\", an = \"Pause\", un = \"ScrollLock\", ln = \"Shift\", dn = \"Space\", pn = \"Tab\", Gt = \"animationDuration\", Kt = \"animationDelay\", U = \"animationName\", D = \"animationend\", Jt = \"transitionDuration\", Xt = \"transitionDelay\", C = \"transitionend\", W = \"transitionProperty\", fn = \"addEventListener\", mn = \"removeEventListener\", gn = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\"\n}, vn = \"offsetHeight\", En = \"offsetWidth\", bn = \"scrollHeight\", hn = \"scrollWidth\", yn = \"tabindex\", Yt = navigator.userAgentData, A = Yt, { userAgent: Zt } = navigator, S = Zt, z = /iPhone|iPad|iPod|Android/i;\nlet O = !1;\n// istanbul ignore else @preserve\nA ? O = A.brands.some((t) => z.test(t.brand)) : O = z.test(S);\nconst wn = O, V = /(iPhone|iPod|iPad)/, An = A ? A.brands.some((t) => V.test(t.brand)) : (\n /* istanbul ignore next @preserve */\n V.test(S)\n), Sn = S ? S.includes(\"Firefox\") : (\n /* istanbul ignore next @preserve */\n !1\n), { head: N } = document, Nn = [\"webkitPerspective\", \"perspective\"].some((t) => t in N.style), R = (t, e, n, o) => {\n const s = o || !1;\n t.addEventListener(e, n, s);\n}, Q = (t, e, n, o) => {\n const s = o || !1;\n t.removeEventListener(e, n, s);\n}, $t = (t, e, n, o) => {\n const s = (c) => {\n /* istanbul ignore else @preserve */\n (c.target === t || c.currentTarget === t) && (n.apply(t, [c]), Q(t, e, s, o));\n };\n R(t, e, s, o);\n}, _t = () => {\n}, Mn = (() => {\n let t = !1;\n try {\n const e = Object.defineProperty({}, \"passive\", {\n get: () => (t = !0, t)\n });\n // istanbul ignore next @preserve\n $t(document, P, _t, e);\n } catch {\n }\n return t;\n})(), Tn = [\"webkitTransform\", \"transform\"].some((t) => t in N.style), kn = \"ontouchstart\" in window || /* istanbul ignore next */\n\"msMaxTouchPoints\" in navigator, Dn = [\"webkitAnimation\", \"animation\"].some((t) => t in N.style), Cn = [\"webkitTransition\", \"transition\"].some((t) => t in N.style), j = (t, e) => t.getAttribute(e), On = (t, e, n) => e.getAttributeNS(t, n), te = (t, e) => t.hasAttribute(e), Ln = (t, e, n) => e.hasAttributeNS(t, n), In = (t, e, n) => t.setAttribute(e, n), xn = (t, e, n, o) => e.setAttributeNS(t, n, o), zn = (t, e) => t.removeAttribute(e), Vn = (t, e, n) => e.removeAttributeNS(t, n), Bn = (t, ...e) => {\n t.classList.add(...e);\n}, Fn = (t, ...e) => {\n t.classList.remove(...e);\n}, Hn = (t, e) => t.classList.contains(e), { body: Pn } = document, { documentElement: Un } = document, Wn = (t) => Array.from(t), v = (t) => t != null && typeof t == \"object\" || !1, i = (t) => v(t) && typeof t.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some((e) => t.nodeType === e) || !1, l = (t) => i(t) && t.nodeType === 1 || !1, E = /* @__PURE__ */ new Map(), L = {\n data: E,\n /**\n * Sets web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @param instance the component instance\n */\n set: (t, e, n) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n E.has(e) || E.set(e, /* @__PURE__ */ new Map()), E.get(e).set(t, n);\n },\n /**\n * Returns all instances for specified component.\n *\n * @param component the component's name or a unique key\n * @returns all the component instances\n */\n getAllFor: (t) => E.get(t) || null,\n /**\n * Returns the instance associated with the target.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @returns the instance\n */\n get: (t, e) => {\n if (!l(t) || !e) return null;\n const n = L.getAllFor(e);\n return t && n && n.get(t) || null;\n },\n /**\n * Removes web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n */\n remove: (t, e) => {\n const n = L.getAllFor(e);\n if (!n || !l(t)) return;\n n.delete(t);\n // istanbul ignore else @preserve\n n.size === 0 && E.delete(e);\n }\n}, Rn = (t, e) => L.get(t, e), M = (t) => typeof t == \"string\" || !1, q = (t) => v(t) && t.constructor.name === \"Window\" || !1, G = (t) => i(t) && t.nodeType === 9 || !1, d = (t) => q(t) ? t.document : G(t) ? t : i(t) ? t.ownerDocument : window.document, T = (t, ...e) => Object.assign(t, ...e), ee = (t) => {\n if (!t) return;\n if (M(t))\n return d().createElement(t);\n const { tagName: e } = t, n = ee(e);\n if (!n) return;\n const o = { ...t };\n return delete o.tagName, T(n, o);\n}, ne = (t, e) => {\n if (!t || !e) return;\n if (M(e))\n return d().createElementNS(t, e);\n const { tagName: n } = e, o = ne(t, n);\n if (!o) return;\n const s = { ...e };\n return delete s.tagName, T(o, s);\n}, K = (t, e) => t.dispatchEvent(e), Qn = (t, e, n) => n.indexOf(t) === e, g = (t, e) => {\n const n = getComputedStyle(t), o = e.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return n.getPropertyValue(o);\n}, oe = (t) => {\n const e = g(t, U), n = g(t, Kt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, se = (t) => {\n const e = g(t, U), n = g(t, Gt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, jn = (t, e) => {\n let n = 0;\n const o = new Event(D), s = se(t), c = oe(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(D, a), n = 1);\n };\n t.addEventListener(D, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else {\n // istanbul ignore next @preserve\n e.apply(t, [o]);\n }\n}, ce = (t) => {\n const e = g(t, W), n = g(t, Xt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, re = (t) => {\n const e = g(t, W), n = g(t, Jt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, qn = (t, e) => {\n let n = 0;\n const o = new Event(C), s = re(t), c = ce(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(C, a), n = 1);\n };\n t.addEventListener(C, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else\n e.apply(t, [o]);\n}, Gn = (t) => Float32Array.from(Array.from(t)), Kn = (t) => Float64Array.from(Array.from(t)), Jn = (t, e) => t.focus(e), B = (t) => [\"true\", !0].includes(t) ? !0 : [\"false\", !1].includes(t) ? !1 : [\"null\", \"\", null, void 0].includes(t) ? null : t !== \"\" && !Number.isNaN(+t) ? +t : t, w = (t) => Object.entries(t), ae = (t) => t.toLowerCase(), Xn = (t, e, n, o) => {\n const s = { ...n }, c = { ...t.dataset }, a = { ...e }, u = {}, p = \"title\";\n return w(c).forEach(([r, f]) => {\n const y = o && typeof r == \"string\" && r.includes(o) ? r.replace(o, \"\").replace(/[A-Z]/g, (J) => ae(J)) : (\n /* istanbul ignore next @preserve */\n r\n );\n u[y] = B(f);\n }), w(s).forEach(([r, f]) => {\n s[r] = B(f);\n }), w(e).forEach(([r, f]) => {\n // istanbul ignore else @preserve\n r in s ? a[r] = s[r] : r in u ? a[r] = u[r] : a[r] = r === p ? j(t, p) : f;\n }), a;\n}, Yn = (t, e) => v(t) && (Object.hasOwn(t, e) || e in t), Zn = (t) => Object.keys(t), $n = (t) => Object.values(t), _n = (t) => Object.fromEntries(t), to = (t, e) => {\n const n = new CustomEvent(t, {\n cancelable: !0,\n bubbles: !0\n });\n // istanbul ignore else @preserve\n return v(e) && T(n, e), n;\n}, eo = { passive: !0 }, no = (t) => t.offsetHeight, oo = (t, e) => {\n w(e).forEach(([n, o]) => {\n if (o && M(n) && n.includes(\"--\"))\n t.style.setProperty(n, o);\n else {\n const s = {};\n s[n] = o, T(t.style, s);\n }\n });\n}, I = (t) => v(t) && t.constructor.name === \"Map\" || !1, ie = (t) => typeof t == \"number\" || !1, m = /* @__PURE__ */ new Map(), so = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n *\n * @param element target element\n * @param callback the callback\n * @param delay the execution delay\n * @param key a unique key\n */\n set: (t, e, n, o) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n if (o && o.length) {\n // istanbul ignore else @preserve\n m.has(t) || m.set(t, /* @__PURE__ */ new Map()), m.get(t).set(o, setTimeout(e, n));\n } else\n m.set(t, setTimeout(e, n));\n },\n /**\n * Returns the timer associated with the target.\n *\n * @param element target element\n * @param key a unique\n * @returns the timer\n */\n get: (t, e) => {\n if (!l(t)) return null;\n const n = m.get(t);\n return e && n && I(n) ? n.get(e) || /* istanbul ignore next */\n null : ie(n) ? n : null;\n },\n /**\n * Clears the element's timer.\n *\n * @param element target element\n * @param key a unique key\n */\n clear: (t, e) => {\n if (!l(t)) return;\n const n = m.get(t);\n if (e && e.length && I(n)) {\n clearTimeout(n.get(e)), n.delete(e);\n // istanbul ignore else @preserve\n n.size === 0 && m.delete(t);\n } else\n clearTimeout(n), m.delete(t);\n }\n}, co = (t) => t.toUpperCase(), ue = (t, e) => (i(e) ? e : d()).querySelectorAll(t), x = /* @__PURE__ */ new Map();\nfunction le(t) {\n const { shiftKey: e, code: n } = t, o = d(this), s = [...ue(qt, this)].filter(\n (u) => !te(u, \"disabled\") && !j(u, X)\n );\n if (!s.length) return;\n const c = s[0], a = s[s.length - 1];\n // istanbul ignore else @preserve\n n === \"Tab\" && (e && o.activeElement === c ? (a.focus(), t.preventDefault()) : !e && o.activeElement === a && (c.focus(), t.preventDefault()));\n}\nconst de = (t) => x.has(t) === !0, ro = (t) => {\n const e = de(t);\n (e ? Q : R)(t, \"keydown\", le), e ? x.delete(t) : x.set(t, !0);\n}, h = (t, e) => {\n const { width: n, height: o, top: s, right: c, bottom: a, left: u } = t.getBoundingClientRect();\n let p = 1, r = 1;\n if (e && l(t)) {\n const { offsetWidth: f, offsetHeight: y } = t;\n p = f > 0 ? Math.round(n) / f : (\n /* istanbul ignore next */\n 1\n ), r = y > 0 ? Math.round(o) / y : (\n /* istanbul ignore next */\n 1\n );\n }\n return {\n width: n / p,\n height: o / r,\n top: s / r,\n right: c / p,\n bottom: a / r,\n left: u / p,\n x: u / p,\n y: s / r\n };\n}, ao = (t) => d(t).body, k = (t) => d(t).documentElement, io = (t) => d(t).head, uo = (t) => {\n const e = q(t), n = e ? t.scrollX : t.scrollLeft, o = e ? t.scrollY : t.scrollTop;\n return { x: n, y: o };\n}, pe = (t) => i(t) && t.constructor.name === \"ShadowRoot\" || !1, lo = (t) => t.nodeName === \"HTML\" ? t : l(t) && t.assignedSlot || // step into the shadow DOM of the parent of a slotted node\ni(t) && t.parentNode || // DOM Element detected\npe(t) && t.host || // ShadowRoot detected\nk(t), fe = (t) => {\n if (!l(t)) return !1;\n const { width: e, height: n } = h(t), { offsetWidth: o, offsetHeight: s } = t;\n return Math.round(e) !== o || Math.round(n) !== s;\n}, po = (t, e, n) => {\n const o = l(e), s = h(t, o && fe(e)), c = { x: 0, y: 0 };\n // istanbul ignore else @preserve\n if (o) {\n const a = h(e, !0);\n c.x = a.x + e.clientLeft, c.y = a.y + e.clientTop;\n }\n return {\n x: s.left + n.x - c.x,\n y: s.top + n.y - c.y,\n width: s.width,\n height: s.height\n };\n};\nlet F = 0, H = 0;\nconst b = /* @__PURE__ */ new Map(), me = (t, e) => {\n let n = e ? F : H;\n if (e) {\n const o = me(t), s = b.get(o) || /* @__PURE__ */ new Map();\n b.has(o) || b.set(o, s), I(s) && !s.has(e) ? (s.set(e, n), F += 1) : n = s.get(e);\n } else {\n const o = t.id || t;\n b.has(o) ? n = b.get(o) : (b.set(o, n), H += 1);\n }\n return n;\n}, fo = (t) => {\n var e;\n return t ? G(t) ? t.defaultView : i(t) ? (e = t == null ? void 0 : t.ownerDocument) == null ? void 0 : e.defaultView : t : window;\n}, ge = (t) => Array.isArray(t) || !1, mo = (t) => i(t) && t.nodeName === \"CANVAS\" || !1, ve = (t) => l(t) && !!t.shadowRoot || !1, go = (t) => i(t) && [1, 2, 3, 4, 5, 6, 7, 8].some((e) => t.nodeType === e) || !1, vo = (t) => {\n if (!i(t)) return !1;\n const { top: e, bottom: n } = h(t), { clientHeight: o } = k(t);\n return e <= o && n >= 0;\n}, Eo = (t) => {\n if (!i(t)) return !1;\n const { clientWidth: e, clientHeight: n } = k(t), { top: o, left: s, bottom: c, right: a } = h(t, !0);\n return o >= 0 && s >= 0 && c <= n && a <= e;\n}, bo = (t) => ge(t) && t.every(l) || !1, ho = (t) => typeof t == \"function\" || !1, yo = (t) => v(t) && t.constructor.name === \"HTMLCollection\" || !1, wo = (t) => l(t) && t.tagName === \"IMG\" || !1, Ao = (t) => {\n if (!M(t)) return !1;\n try {\n JSON.parse(t);\n } catch {\n return !1;\n }\n return !0;\n}, So = (t) => v(t) && t.constructor.name === \"WeakMap\" || !1, No = (t) => i(t) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some((e) => t.constructor.name.includes(e)) || !1, Mo = (t) => v(t) && t.constructor.name === \"NodeList\" || !1, To = (t) => k(t).dir === \"rtl\", ko = (t) => i(t) && t.constructor.name.includes(\"SVG\") || !1, Do = (t) => i(t) && [\"TABLE\", \"TD\", \"TH\"].includes(t.nodeName) || !1, Ee = (t, e) => t ? t.closest(e) || // break out of `ShadowRoot`\nEe(t.getRootNode().host, e) : null, Co = (t, e) => l(t) ? t : (i(e) ? e : d()).querySelector(t), be = (t, e) => (i(e) ? e : d()).getElementsByTagName(t), Oo = (t) => [...be(\"*\", t)].filter(ve), Lo = (t, e) => d(e).getElementById(t) || null, Io = (t, e) => (e && i(e) ? e : d()).getElementsByClassName(t), xo = (t, e) => t.matches(e), zo = \"2.0.5\";\nexport {\n Wn as ArrayFrom,\n P as DOMContentLoadedEvent,\n et as DOMMouseScrollEvent,\n L as Data,\n Gn as Float32ArrayFrom,\n Kn as Float64ArrayFrom,\n T as ObjectAssign,\n w as ObjectEntries,\n _n as ObjectFromEntries,\n Yn as ObjectHasOwn,\n Zn as ObjectKeys,\n $n as ObjectValues,\n so as Timer,\n Y as abortEvent,\n Bn as addClass,\n fn as addEventListener,\n Kt as animationDelay,\n Gt as animationDuration,\n D as animationEndEvent,\n U as animationName,\n he as ariaChecked,\n we as ariaDescribedBy,\n ye as ariaDescription,\n Ae as ariaExpanded,\n Se as ariaHasPopup,\n X as ariaHidden,\n Ne as ariaLabel,\n Me as ariaLabelledBy,\n Te as ariaModal,\n ke as ariaPressed,\n De as ariaSelected,\n Oe as ariaValueMax,\n Ce as ariaValueMin,\n Le as ariaValueNow,\n Ie as ariaValueText,\n Z as beforeunloadEvent,\n gn as bezierEasings,\n $ as blurEvent,\n _ as changeEvent,\n Ee as closest,\n tt as contextmenuEvent,\n to as createCustomEvent,\n ee as createElement,\n ne as createElementNS,\n K as dispatchEvent,\n Qn as distinct,\n Pn as documentBody,\n Un as documentElement,\n N as documentHead,\n ze as dragEvent,\n Pe as dragendEvent,\n Be as dragenterEvent,\n Fe as dragleaveEvent,\n He as dragoverEvent,\n Ve as dragstartEvent,\n jn as emulateAnimationEnd,\n qn as emulateTransitionEnd,\n nt as errorEvent,\n Jn as focus,\n ot as focusEvent,\n qe as focusEvents,\n qt as focusableSelector,\n st as focusinEvent,\n ct as focusoutEvent,\n rt as gesturechangeEvent,\n at as gestureendEvent,\n it as gesturestartEvent,\n j as getAttribute,\n On as getAttributeNS,\n h as getBoundingClientRect,\n Oo as getCustomElements,\n d as getDocument,\n ao as getDocumentBody,\n k as getDocumentElement,\n io as getDocumentHead,\n oe as getElementAnimationDelay,\n se as getElementAnimationDuration,\n Lo as getElementById,\n g as getElementStyle,\n ce as getElementTransitionDelay,\n re as getElementTransitionDuration,\n Io as getElementsByClassName,\n be as getElementsByTagName,\n Rn as getInstance,\n uo as getNodeScroll,\n lo as getParentNode,\n po as getRectRelativeToOffsetParent,\n me as getUID,\n fo as getWindow,\n te as hasAttribute,\n Ln as hasAttributeNS,\n Hn as hasClass,\n de as hasFocusTrap,\n An as isApple,\n ge as isArray,\n mo as isCanvas,\n ve as isCustomElement,\n G as isDocument,\n go as isElement,\n vo as isElementInScrollRange,\n Eo as isElementInViewport,\n bo as isElementsArray,\n Sn as isFirefox,\n ho as isFunction,\n yo as isHTMLCollection,\n l as isHTMLElement,\n wo as isHTMLImageElement,\n Ao as isJSON,\n I as isMap,\n No as isMedia,\n wn as isMobile,\n i as isNode,\n Mo as isNodeList,\n ie as isNumber,\n v as isObject,\n To as isRTL,\n ko as isSVGElement,\n fe as isScaledElement,\n pe as isShadowRoot,\n M as isString,\n Do as isTableElement,\n So as isWeakMap,\n q as isWindow,\n Ke as keyAlt,\n Je as keyArrowDown,\n Ye as keyArrowLeft,\n Ze as keyArrowRight,\n Xe as keyArrowUp,\n $e as keyBackspace,\n _e as keyCapsLock,\n tn as keyControl,\n en as keyDelete,\n nn as keyEnter,\n sn as keyEscape,\n cn as keyInsert,\n rn as keyMeta,\n on as keyNumpadEnter,\n an as keyPause,\n un as keyScrollLock,\n ln as keyShift,\n dn as keySpace,\n pn as keyTab,\n Ge as keyboardEventKeys,\n ut as keydownEvent,\n lt as keypressEvent,\n dt as keyupEvent,\n pt as loadEvent,\n Ue as loadstartEvent,\n xo as matches,\n Re as mouseClickEvents,\n Qe as mouseHoverEvents,\n We as mouseSwipeEvents,\n ft as mouseclickEvent,\n mt as mousedblclickEvent,\n gt as mousedownEvent,\n bt as mouseenterEvent,\n Et as mousehoverEvent,\n yt as mouseinEvent,\n ht as mouseleaveEvent,\n St as mousemoveEvent,\n wt as mouseoutEvent,\n At as mouseoverEvent,\n vt as mouseupEvent,\n Nt as mousewheelEvent,\n Mt as moveEvent,\n xe as nativeEvents,\n _t as noop,\n Xn as normalizeOptions,\n B as normalizeValue,\n Q as off,\n vn as offsetHeight,\n En as offsetWidth,\n R as on,\n $t as one,\n Tt as orientationchangeEvent,\n eo as passiveHandler,\n kt as pointercancelEvent,\n Dt as pointerdownEvent,\n Ct as pointerleaveEvent,\n Ot as pointermoveEvent,\n Lt as pointerupEvent,\n Co as querySelector,\n ue as querySelectorAll,\n It as readystatechangeEvent,\n no as reflow,\n zn as removeAttribute,\n Vn as removeAttributeNS,\n Fn as removeClass,\n mn as removeEventListener,\n xt as resetEvent,\n zt as resizeEvent,\n Ht as scrollEvent,\n bn as scrollHeight,\n hn as scrollWidth,\n Vt as selectEvent,\n Bt as selectendEvent,\n Ft as selectstartEvent,\n In as setAttribute,\n xn as setAttributeNS,\n oo as setElementStyle,\n Pt as submitEvent,\n Nn as support3DTransform,\n Dn as supportAnimation,\n Mn as supportPassive,\n kn as supportTouch,\n Tn as supportTransform,\n Cn as supportTransition,\n yn as tabindex,\n ae as toLowerCase,\n co as toUpperCase,\n ro as toggleFocusTrap,\n je as touchEvents,\n Rt as touchcancelEvent,\n Qt as touchendEvent,\n Wt as touchmoveEvent,\n Ut as touchstartEvent,\n Xt as transitionDelay,\n Jt as transitionDuration,\n C as transitionEndEvent,\n W as transitionProperty,\n jt as unloadEvent,\n S as userAgent,\n A as userAgentData,\n zo as version\n};\n//# sourceMappingURL=shorty.mjs.map\n","const e = {}, f = (t) => {\n const { type: c, currentTarget: i } = t;\n [...e[c]].forEach(([n, s]) => {\n /* istanbul ignore else @preserve */\n i === n && [...s].forEach(([o, a]) => {\n o.apply(n, [t]), typeof a == \"object\" && a.once && r(n, c, o, a);\n });\n });\n}, E = (t, c, i, n) => {\n /* istanbul ignore else @preserve */\n e[c] || (e[c] = /* @__PURE__ */ new Map());\n const s = e[c];\n /* istanbul ignore else @preserve */\n s.has(t) || s.set(t, /* @__PURE__ */ new Map());\n const o = s.get(t), { size: a } = o;\n o.set(i, n);\n /* istanbul ignore else @preserve */\n a || t.addEventListener(c, f, n);\n}, r = (t, c, i, n) => {\n const s = e[c], o = s && s.get(t), a = o && o.get(i), d = a !== void 0 ? a : n;\n /* istanbul ignore else @preserve */\n o && o.has(i) && o.delete(i);\n /* istanbul ignore else @preserve */\n s && (!o || !o.size) && s.delete(t);\n /* istanbul ignore else @preserve */\n (!s || !s.size) && delete e[c];\n /* istanbul ignore else @preserve */\n (!o || !o.size) && t.removeEventListener(\n c,\n f,\n d\n );\n}, g = E, M = r;\nexport {\n E as addListener,\n f as globalListener,\n M as off,\n g as on,\n e as registry,\n r as removeListener\n};\n//# sourceMappingURL=event-listener.mjs.map\n","/**\n * Global namespace for most components `fade` class.\n */\nconst fadeClass = 'fade';\nexport default fadeClass;\n","/**\n * Global namespace for most components `show` class.\n */\nconst showClass = 'show';\nexport default showClass;\n","/**\n * Global namespace for most components `dismiss` option.\n */\nconst dataBsDismiss = 'data-bs-dismiss';\nexport default dataBsDismiss;\n","/** @type {string} */\nconst alertString = 'alert';\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = 'Alert';\nexport default alertComponent;\n","import { version } from '../package.json';\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport { Data, isHTMLElement, isString, normalizeOptions, ObjectKeys, querySelector } from '@thednp/shorty';\n\nimport type { BaseOptions } from '../interface/baseComponent';\nimport Version from '../version';\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options =\n this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, 'bs')\n : // istanbul ignore next @preserve\n {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return 'BaseComponent';\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach(prop => {\n delete this[prop];\n });\n }\n}\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport fadeClass from '../strings/fadeClass';\nimport showClass from '../strings/showClass';\nimport dataBsDismiss from '../strings/dataBsDismiss';\nimport alertString from '../strings/alertString';\nimport alertComponent from '../strings/alertComponent';\nimport type { AlertEvent } from '../interface/alert';\n\nimport BaseComponent from './base-component';\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) => getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(`close.bs.${alertString}`);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(`closed.bs.${alertString}`);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/**\n * Global namespace for most components active class.\n */\nconst activeClass = 'active';\nexport default activeClass;\n","/**\n * Global namespace for most components `toggle` option.\n */\nconst dataBsToggle = 'data-bs-toggle';\nexport default dataBsToggle;\n","/** @type {string} */\nconst buttonString = 'button';\nexport default buttonString;\n","/** @type {string} */\nconst buttonComponent = 'Button';\nexport default buttonComponent;\n","/* Native JavaScript for Bootstrap 5 | Button\n---------------------------------------------*/\nimport {\n addClass,\n ariaPressed,\n getAttribute,\n getInstance,\n hasClass,\n mouseclickEvent,\n removeClass,\n setAttribute,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport activeClass from '../strings/activeClass';\nimport dataBsToggle from '../strings/dataBsToggle';\nimport buttonString from '../strings/buttonString';\nimport buttonComponent from '../strings/buttonComponent';\n\nimport BaseComponent from './base-component';\n\n// BUTTON PRIVATE GC\n// =================\nconst buttonSelector = `[${dataBsToggle}=\"${buttonString}\"]`;\n\n/**\n * Static method which returns an existing `Button` instance associated\n * to a target `Element`.\n */\nconst getButtonInstance = (element: HTMLElement) => getInstance',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) => getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n","/** @type {string} */\nconst scrollspyString = 'scrollspy';\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = 'ScrollSpy';\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n getWindow,\n hasClass,\n isHTMLElement,\n isWindow,\n passiveHandler,\n querySelector,\n removeClass,\n scrollEvent,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport activeClass from '../strings/activeClass';\nimport scrollspyString from '../strings/scrollspyString';\nimport scrollspyComponent from '../strings/scrollspyComponent';\n\nimport BaseComponent from './base-component';\nimport { ScrollSpyEvent, ScrollSpyOptions } from '../interface/scrollspy';\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) => getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } = self;\n const { offset } = options;\n const isWin = isWindow(scrollTarget as Node | Window);\n\n const links = target && getElementsByTagName('A', target);\n const scrollHEIGHT = scrollTarget\n ? getScrollHeight(scrollTarget)\n : // istanbul ignore next @preserve\n scrollHeight;\n\n self.scrollTop = isWin ? (scrollTarget as Window).scrollY : (scrollTarget as HTMLElement).scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n [...links].forEach(link => {\n href = getAttribute(link, 'href');\n targetItem =\n href && href.charAt(0) === '#' && href.slice(-1) !== '#' && querySelector(href, getDocument(element));\n\n if (targetItem) {\n self.items.push(link);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push((isWin ? rect.top + self.scrollTop : targetItem.offsetTop) - offset);\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: Node | Window) => {\n return isHTMLElement(scrollTarget as Node)\n ? (scrollTarget as HTMLElement).scrollHeight\n : getDocumentElement(scrollTarget as Node).scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return isWindow(scrollTarget as Node) ? (scrollTarget as Window).innerHeight : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName('A', target)].forEach(item => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, 'nav') || hasClass(parentItem, 'dropdown-menu')) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach(menuItem => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement | Window;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(options.target as HTMLElement | string, getDocument(element));\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight ? element : getWindow(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // add event handlers\n this._toggleEventListeners(true);\n\n this.refresh();\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === 'undefined' || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /**\n * Toggles on/off the component event listener.\n *\n * @param add when `true`, listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.scrollTarget as EventTarget, scrollEvent, this.refresh, passiveHandler);\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst tabString = 'tab';\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = 'Tab';\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport collapsingClass from '../strings/collapsingClass';\nimport activeClass from '../strings/activeClass';\nimport fadeClass from '../strings/fadeClass';\nimport showClass from '../strings/showClass';\nimport dropdownClasses from '../strings/dropdownClasses';\nimport dataBsToggle from '../strings/dataBsToggle';\nimport tabString from '../strings/tabString';\nimport tabComponent from '../strings/tabComponent';\n\nimport getTargetElement from '../util/getTargetElement';\nimport BaseComponent from './base-component';\nimport type { /* TabOptions, */ TabEvent } from '../interface/tab';\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) => getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(`show.bs.${tabString}`);\nconst shownTabEvent = createCustomEvent(`shown.bs.${tabString}`);\nconst hideTabEvent = createCustomEvent(`hide.bs.${tabString}`);\nconst hiddenTabEvent = createCustomEvent(`hidden.bs.${tabString}`);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = '';\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) || { tab: null }; // istanbul ignore next @preserve\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) || { currentHeight: 0, nextHeight: 0 }; // istanbul ignore next @preserve\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) || {\n // istanbul ignore next @preserve\n tab: null,\n content: null,\n };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach(c => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, 'overflow-hidden');\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight\n : // istanbul ignore next @preserve\n 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach(c => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, 'overflow-hidden');\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (self: Tab): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (activeTabs.length === 1 && !dropdownClasses.some(c => hasClass(activeTabs[0].parentElement as HTMLElement, c))) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement) ? getTargetElement(tab as HTMLElement) : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(',.')}`);\n return dropdown ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown) : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, '.nav');\n const container = closest(content, '.tab-content');\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, 'true');\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, 'true');\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, 'false');\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (content && (hasClass(content, fadeClass) || (nextContent && hasClass(nextContent, fadeClass)))) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst toastString = 'toast';\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = 'Toast';\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from '@thednp/shorty';\n\nimport { addListener, removeListener } from '@thednp/event-listener';\n\nimport fadeClass from '../strings/fadeClass';\nimport showClass from '../strings/showClass';\nimport dataBsDismiss from '../strings/dataBsDismiss';\nimport dataBsToggle from '../strings/dataBsToggle';\nimport toastString from '../strings/toastString';\nimport toastComponent from '../strings/toastComponent';\nimport getTargetElement from '../util/getTargetElement';\nimport BaseComponent from './base-component';\nimport { ToastEvent, ToastOptions } from '../interface/toast';\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = 'showing';\n/** @deprecated */\nconst hideClass = 'hide';\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) => getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(`show.bs.${toastString}`);\nconst shownToastEvent = createCustomEvent, ToastEvent>(`shown.bs.${toastString}`);\nconst hideToastEvent = createCustomEvent, ToastEvent>(`hide.bs.${toastString}`);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(`hidden.bs.${toastString}`);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === 'A') e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (self && element !== relatedTarget && !element.contains(relatedTarget as Node)) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [...querySelectorAll(toastToggleSelector, getDocument(element))].filter(\n btn => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(e =>\n action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach(btn => action(btn, mouseclickEvent, toastClickHandler));\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n","import { Data, getElementsByTagName, matches } from '@thednp/shorty';\n\nimport { addListener } from '@thednp/event-listener';\n\nimport Alert from '../components/alert';\nimport Button from '../components/button';\nimport Carousel from '../components/carousel';\nimport Collapse from '../components/collapse';\nimport Dropdown from '../components/dropdown';\nimport Modal from '../components/modal';\nimport Offcanvas from '../components/offcanvas';\nimport Popover from '../components/popover';\nimport ScrollSpy from '../components/scrollspy';\nimport Tab from '../components/tab';\nimport Toast from '../components/toast';\nimport Tooltip from '../components/tooltip';\n\nconst componentsList = new Map<\n string,\n | typeof Alert\n | typeof Button\n | typeof Carousel\n | typeof Collapse\n | typeof Dropdown\n | typeof Modal\n | typeof Offcanvas\n | typeof Popover\n | typeof ScrollSpy\n | typeof Tab\n | typeof Toast\n | typeof Tooltip\n>();\n\ntype Component =\n | Alert\n | Button\n | Carousel\n | Collapse\n | Dropdown\n | Modal\n | Offcanvas\n | Popover\n | ScrollSpy\n | Tab\n | Toast\n | Tooltip;\n\n[Alert, Button, Carousel, Collapse, Dropdown, Modal, Offcanvas, Popover, ScrollSpy, Tab, Toast, Tooltip].forEach(c =>\n componentsList.set(c.prototype.name, c),\n);\n\n/**\n * Initialize all matched `Element`s for one component.\n *\n * @param callback\n * @param collection\n */\nconst initComponentDataAPI = (\n callback: (el: HTMLElement) => Component,\n collection: HTMLCollectionOf | HTMLElement[],\n) => {\n [...collection].forEach(x => callback(x));\n};\n\n/**\n * Remove one component from a target container element or all in the page.\n *\n * @param component the component name\n * @param context parent `Node`\n */\nconst removeComponentDataAPI = (component: string, context: ParentNode) => {\n const compData = Data.getAllFor(component) as Map;\n\n if (compData) {\n [...compData].forEach(([element, instance]) => {\n if (context.contains(element)) {\n (instance as T & { dispose: () => void }).dispose();\n }\n });\n }\n};\n\n/**\n * Initialize all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const initCallback = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n const elemCollection = [...getElementsByTagName('*', lookUp)];\n\n componentsList.forEach(cs => {\n const { init, selector } = cs;\n initComponentDataAPI(\n init,\n elemCollection.filter(item => matches(item, selector)),\n );\n });\n};\n\n/**\n * Remove all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const removeDataAPI = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n\n componentsList.forEach(comp => {\n removeComponentDataAPI(comp.prototype.name, lookUp);\n });\n};\n\n// Bulk initialize all components\nif (document.body) initCallback();\nelse {\n addListener(document, 'DOMContentLoaded', () => initCallback(), {\n once: true,\n });\n}\n"],"names":["we","Ae","X","Te","ke","De","P","ot","st","ct","ut","dt","ft","gt","Et","bt","ht","Dt","Ot","Lt","zt","Ht","Ut","Ve","qt","Je","Xe","Ye","Ze","sn","Jt","Xt","C","W","Yt","A","Zt","S","z","V","An","N","R","e","n","o","s","Q","$t","c","_t","j","te","In","zn","Bn","Fn","Hn","v","i","l","E","L","Rn","M","q","G","d","T","ee","K","g","ce","re","qn","a","u","Jn","B","w","ae","Xn","p","r","f","y","J","Zn","to","eo","no","oo","I","ie","m","so","ue","x","le","de","ro","h","ao","k","pe","lo","F","H","b","me","fo","ge","vo","ho","Mo","To","Do","Ee","Co","be","Io","xo","fadeClass","showClass","dataBsDismiss","alertString","alertComponent","Version","BaseComponent","target","config","__publicField","element","isHTMLElement","isString","querySelector","prevInstance","Data","ObjectKeys","normalizeOptions","prop","alertSelector","alertDismissSelector","getAlertInstance","getInstance","alertInitCallback","Alert","closeAlertEvent","createCustomEvent","closedAlertEvent","alertTransitionEnd","self","dispatchEvent","hasClass","removeClass","emulateTransitionEnd","add","action","addListener","removeListener","dismiss","close","mouseclickEvent","activeClass","dataBsToggle","buttonString","buttonComponent","buttonSelector","getButtonInstance","buttonInitCallback","Button","isActive","getAttribute","addClass","setAttribute","ariaPressed","dataBsTarget","carouselString","carouselComponent","dataBsParent","dataBsContainer","getTargetElement","targetAttr","doc","getDocument","att","attValue","closest","carouselSelector","carouselItem","dataBsSlideTo","dataBsSlide","pausedClass","carouselDefaults","getCarouselInstance","carouselInitCallback","Carousel","startX","currentX","endX","carouselSlideEvent","carouselSlidEvent","carouselTransitionEndHandler","index","direction","slides","options","activeItem","getActiveIndex","orientation","directionClass","Timer","carouselPauseHandler","carouselResumeHandler","carouselIndicatorHandler","newIndex","carouselControlsHandler","carouselKeyHandler","code","querySelectorAll","isElementInScrollRange","RTL","isRTL","arrowKeyNext","keyArrowLeft","keyArrowRight","arrowKeyPrev","carouselDragHandler","carouselPointerDownHandler","controls","indicators","el","toggleCarouselTouchHandlers","carouselPointerMoveHandler","carouselPointerUpHandler","_a","activateCarouselIndicator","pointermoveEvent","passiveHandler","pointerupEvent","touch","pause","interval","keyboard","mouseenterEvent","mouseleaveEvent","pointerdownEvent","touchstartEvent","dragstartEvent","arrow","indicator","keydownEvent","getElementsByClassName","activeIndex","transitionItem","matches","ar","isPaused","idx","next","eventProperties","ObjectAssign","getElementTransitionDuration","reflow","isAnimating","clone","collapsingClass","collapseString","collapseComponent","collapseSelector","collapseToggleSelector","collapseDefaults","getCollapseInstance","collapseInitCallback","Collapse","showCollapseEvent","shownCollapseEvent","hideCollapseEvent","hiddenCollapseEvent","expandCollapse","parent","triggers","noop","setElementStyle","btn","ariaExpanded","collapseContent","collapseClickHandler","trigger","activeCollapse","activeCollapseInstance","dropdownMenuClasses","dropdownComponent","dropdownMenuClass","isEmptyAnchor","parentAnchor","hasAttribute","dropdownString","dropupString","dropstartString","dropendString","dropdownClasses","dropdownSelector","getDropdownInstance","dropdownInitCallback","Dropdown","dropdownMenuEndClass","verticalClass","horizontalClass","menuFocusTags","dropdownDefaults","showDropdownEvent","shownDropdownEvent","hideDropdownEvent","hiddenDropdownEvent","updatedDropdownEvent","styleDropdown","menu","parentElement","offset","getElementStyle","menuEnd","style","positionClass","dropdownMargin","dropdownPosition","menuWidth","menuHeight","clientWidth","clientHeight","getDocumentElement","targetLeft","targetTop","targetWidth","targetHeight","getBoundingClientRect","leftFullExceed","rightFullExceed","bottomExceed","bottomFullExceed","topExceed","leftExceed","rightExceed","posAjust","margins","getMenuItems","firstElementChild","toggleDropdownDismiss","dropdownDismissHandler","focusEvent","dropdownPreventScroll","keyupEvent","dropdownKeyHandler","scrollEvent","resizeEvent","ev","getWindow","dropdownLayoutHandler","getCurrentOpenDropdown","currentParent","type","isForm","mousedownEvent","dropdownClickHandler","keyArrowDown","keyArrowUp","activeElement","open","menuItems","focus","keyEscape","currentElement","currentInstance","modalString","modalComponent","offcanvasComponent","fixedTopClass","fixedBottomClass","stickyTopClass","positionStickyClass","getFixedItems","resetScrollbar","bd","getDocumentBody","fixedItems","fixed","measureScrollbar","innerWidth","setScrollbar","overflow","bodyPad","sbWidth","itemPadValue","itemMValue","offcanvasString","popupContainer","createElement","appendPopup","customContainer","containerIsBody","isNode","lookup","BODY","removePopup","hasPopup","backdropString","modalBackdropClass","offcanvasBackdropClass","modalActiveSelector","offcanvasActiveSelector","overlay","getCurrentOpen","toggleOverlayType","isModal","targetClass","appendOverlay","hasFade","showOverlay","hideOverlay","removeOverlay","isVisible","modalSelector","modalToggleSelector","modalDismissSelector","modalStaticClass","modalDefaults","getModalInstance","modalInitCallback","Modal","showModalEvent","shownModalEvent","hideModalEvent","hiddenModalEvent","setModalScrollbar","scrollbarWidth","scrollHeight","modalHeight","modalScrollHeight","modalOverflow","padStyle","toggleModalDismiss","update","modalDismissHandler","modalKeyHandler","afterModalHide","relatedTarget","focusElement","toggleFocusTrap","afterModalShow","beforeModalShow","removeAttribute","ariaHidden","ariaModal","beforeModalHide","modalClickHandler","currentTarget","isStatic","modalDialog","backdrop","selectedText","targetInsideDialog","staticTransitionEnd","duration","overlayDelay","currentOpen","that","callback","offcanvasSelector","offcanvasToggleSelector","offcanvasDismissSelector","offcanvasTogglingClass","offcanvasDefaults","getOffcanvasInstance","offcanvasInitCallback","Offcanvas","showOffcanvasEvent","shownOffcanvasEvent","hideOffcanvasEvent","hiddenOffcanvasEvent","setOffCanvasScrollbar","toggleOffCanvasDismiss","offcanvasKeyDismissHandler","offcanvasDismissHandler","beforeOffcanvasShow","showOffcanvasComplete","beforeOffcanvasHide","hideOffcanvasComplete","offcanvasTriggerHandler","offCanvasDismiss","selection","visibleTrigger","isOpen","popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","body","tipClassPositions","styleTip","tipClasses","tooltip","container","tipPositions","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","placement","parentCWidth","parentOWidth","fixedParent","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","horizontals","verticals","updatedTooltipEvent","toLowerCase","tooltipDefaults","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","dirty","isFunction","tempDocument","isNodeList","isArray","createTip","id","title","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","tooltipHeader","tooltipBody","tempTitle","tempContent","tempBtn","getElementContainer","majorBlockTags","containers","parentNode","getParentNode","isShadowRoot","isTableElement","tooltipSelector","titleAttr","getTooltipInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","ariaDescribedBy","hasTip","disposeTooltipComplete","toggleTooltipTitle","toggleTooltipAction","tooltipShownAction","shownTooltipEvent","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","offsetHeight","parentModal","parentOffcanvas","win","scrollTarget","titleAtt","tr","mousehoverEvent","focusinEvent","focusoutEvent","isApple","tipComponent","elem","getUID","position","outTimer","tipContainer","showTooltipEvent","delay","hideTooltipEvent","enabled","popoverSelector","popoverDefaults","getPopoverInstance","popoverInitCallback","Popover","scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","updateSpyTargets","itemsLength","isWin","isWindow","links","getElementsByTagName","scrollHEIGHT","getScrollHeight","href","targetItem","rect","getOffsetHeight","link","clear","item","activate","parents","parentItem","menuItem","parentLink","scrollTop","maxScroll","items","newActiveItem","offsets","tabString","tabComponent","tabSelector","getTabInstance","tabInitCallback","Tab","showTabEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","tabContent","nav","triggerTabShow","nextContent","tab","currentHeight","nextHeight","triggerTabHide","getActiveTab","activeTabs","getParentDropdown","dropdown","tabClickHandler","firstTab","firstTabContent","ariaSelected","activeDropdown","toggleTab","toastString","toastComponent","toastSelector","toastDismissSelector","toastToggleSelector","showingClass","hideClass","toastDefaults","getToastInstance","toastInitCallback","Toast","showToastEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","hideToastComplete","hideToast","showToast","toastClickHandler","interactiveToastHandler","isShown","hide","componentsList","initComponentDataAPI","collection","removeComponentDataAPI","component","context","compData","instance","initCallback","lookUp","elemCollection","cs","init","selector","removeDataAPI","comp"],"mappings":"sNAAoD,MAAAA,GAAK,mBAAoBC,GAAK,gBAAuCC,GAAI,cAA0DC,GAAK,aAAcC,GAAK,eAAgBC,GAAK,gBAAyLC,GAAI,mBAAyDC,GAAK,QAASC,GAAK,UAAWC,GAAK,WAA0EC,GAAK,UAA4BC,GAAK,QAAsBC,EAAK,QAA0BC,GAAK,YAA6BC,GAAK,QAASC,GAAK,aAAcC,GAAK,aAAmKC,GAAK,cAAoCC,GAAK,cAAeC,GAAK,YAAoDC,GAAK,SAA+DC,GAAK,SAAyBC,GAAK,aAmD1lCC,GAAK,YAauBC,GAAK,oFAuClCC,GAAK,YAAaC,GAAK,UAAWC,GAAK,YAAaC,GAAK,aAAkHC,GAAK,SAAyMC,GAAK,qBAAsBC,GAAK,kBAAmBC,GAAI,gBAAiBC,GAAI,qBA0B9WC,GAAK,UAAU,cAAeC,GAAID,GAAI,CAAE,UAAWE,EAAE,EAAK,UAAWC,GAAID,GAAIE,GAAI,4BAEvL;AACAH,GAAQA,GAAE,OAAO,KAAM,GAAMG,GAAE,KAAK,EAAE,KAAK,CAAC,EAAQA,GAAE,KAAKD,EAAC,EAC9C,MAAAE,GAAI,qBAAsBC,GAAKL,GAAIA,GAAE,O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AAC9iB,GAAOwB,GAAQ0B,GAAU8E,GAAU+B,GAAU2H,GAAO8C,GAAW+I,GAASO,GAAWgC,GAAKmC,GAAOhH,EAAO,EAAE,WACvG6H,GAAe,IAAI/oB,EAAE,UAAU,KAAMA,CAAC,CACxC,EAQA,MAAMgpB,GAAuB,CAC3B/O,EACAgP,IACG,CACH,CAAC,GAAGA,CAAU,EAAE,QAAajmB,GAAAiX,EAASjX,CAAC,CAAC,CAC1C,EAQMkmB,GAAyB,CAAIC,EAAmBC,IAAwB,CACtE,MAAAC,EAAW7jB,GAAK,UAAU2jB,CAAS,EAErCE,GACD,CAAA,GAAGA,CAAQ,EAAE,QAAQ,CAAC,CAAClkB,EAASmkB,CAAQ,IAAM,CACzCF,EAAQ,SAASjkB,CAAO,GACzBmkB,EAAyC,QAAQ,CACpD,CACD,CAEL,EAOaC,GAAgBH,GAAyB,CACpD,MAAMI,EAASJ,GAAWA,EAAQ,SAAWA,EAAU,SACjDK,EAAiB,CAAC,GAAGnF,GAAqB,IAAKkF,CAAM,CAAC,EAE5DT,GAAe,QAAcW,GAAA,CACrB,KAAA,CAAE,KAAAC,EAAM,SAAAC,CAAa,EAAAF,EAC3BV,GACEW,EACAF,EAAe,OAAO1E,GAAQjY,GAAQiY,EAAM6E,CAAQ,CAAC,CAAA,CACvD,CACD,CACH,EAOaC,GAAiBT,GAAyB,CACrD,MAAMI,EAASJ,GAAWA,EAAQ,SAAWA,EAAU,SAEvDL,GAAe,QAAgBe,GAAA,CACNZ,GAAAY,EAAK,UAAU,KAAMN,CAAM,CAAA,CACnD,CACH,EAGA,OAAI,SAAS,KAAmBD,KAE9B1iB,EAAY,SAAU,mBAAoB,IAAM0iB,GAAA,EAAgB,CAC9D,KAAM,EAAA,CACP","x_google_ignoreList":[0,1]} \ No newline at end of file +{"version":3,"file":"bootstrap-native.js","sources":["../node_modules/.pnpm/@thednp+shorty@2.0.5/node_modules/@thednp/shorty/dist/shorty.mjs","../node_modules/.pnpm/@thednp+event-listener@2.0.6/node_modules/@thednp/event-listener/dist/event-listener.mjs","../src/strings/fadeClass.ts","../src/strings/showClass.ts","../src/strings/dataBsDismiss.ts","../src/strings/alertString.ts","../src/strings/alertComponent.ts","../src/version.ts","../src/components/base-component.ts","../src/components/alert.ts","../src/strings/activeClass.ts","../src/strings/dataBsToggle.ts","../src/strings/buttonString.ts","../src/strings/buttonComponent.ts","../src/components/button.ts","../src/strings/dataBsTarget.ts","../src/strings/carouselString.ts","../src/strings/carouselComponent.ts","../src/strings/dataBsParent.ts","../src/strings/dataBsContainer.ts","../src/util/getTargetElement.ts","../src/components/carousel.ts","../src/strings/collapsingClass.ts","../src/strings/collapseString.ts","../src/strings/collapseComponent.ts","../src/components/collapse.ts","../src/strings/dropdownClasses.ts","../src/strings/dropdownComponent.ts","../src/strings/dropdownMenuClass.ts","../src/util/isEmptyAnchor.ts","../src/components/dropdown.ts","../src/strings/modalString.ts","../src/strings/modalComponent.ts","../src/strings/offcanvasComponent.ts","../src/strings/fixedTopClass.ts","../src/strings/fixedBottomClass.ts","../src/strings/stickyTopClass.ts","../src/strings/positionStickyClass.ts","../src/util/scrollbar.ts","../src/strings/offcanvasString.ts","../src/util/popupContainer.ts","../src/util/backdrop.ts","../src/util/isVisible.ts","../src/components/modal.ts","../src/components/offcanvas.ts","../src/strings/popoverString.ts","../src/strings/popoverComponent.ts","../src/strings/tooltipString.ts","../src/util/getTipTemplate.ts","../src/util/tipClassPositions.ts","../src/util/styleTip.ts","../src/util/tooltipDefaults.ts","../src/strings/dataOriginalTitle.ts","../src/strings/tooltipComponent.ts","../src/util/setHtml.ts","../src/util/createTip.ts","../src/util/getElementContainer.ts","../src/components/tooltip.ts","../src/components/popover.ts","../src/strings/scrollspyString.ts","../src/strings/scrollspyComponent.ts","../src/components/scrollspy.ts","../src/strings/tabString.ts","../src/strings/tabComponent.ts","../src/components/tab.ts","../src/strings/toastString.ts","../src/strings/toastComponent.ts","../src/components/toast.ts","../src/util/init.ts"],"sourcesContent":["const he = \"aria-checked\", ye = \"aria-description\", we = \"aria-describedby\", Ae = \"aria-expanded\", Se = \"aria-haspopup\", X = \"aria-hidden\", Ne = \"aria-label\", Me = \"aria-labelledby\", Te = \"aria-modal\", ke = \"aria-pressed\", De = \"aria-selected\", Ce = \"aria-valuemin\", Oe = \"aria-valuemax\", Le = \"aria-valuenow\", Ie = \"aria-valuetext\", Y = \"abort\", Z = \"beforeunload\", $ = \"blur\", _ = \"change\", tt = \"contextmenu\", P = \"DOMContentLoaded\", et = \"DOMMouseScroll\", nt = \"error\", ot = \"focus\", st = \"focusin\", ct = \"focusout\", rt = \"gesturechange\", at = \"gestureend\", it = \"gesturestart\", ut = \"keydown\", lt = \"keypress\", dt = \"keyup\", pt = \"load\", ft = \"click\", mt = \"dblclick\", gt = \"mousedown\", vt = \"mouseup\", Et = \"hover\", bt = \"mouseenter\", ht = \"mouseleave\", yt = \"mousein\", wt = \"mouseout\", At = \"mouseover\", St = \"mousemove\", Nt = \"mousewheel\", Mt = \"move\", Tt = \"orientationchange\", kt = \"pointercancel\", Dt = \"pointerdown\", Ct = \"pointerleave\", Ot = \"pointermove\", Lt = \"pointerup\", It = \"readystatechange\", xt = \"reset\", zt = \"resize\", Vt = \"select\", Bt = \"selectend\", Ft = \"selectstart\", Ht = \"scroll\", Pt = \"submit\", Ut = \"touchstart\", Wt = \"touchmove\", Rt = \"touchcancel\", Qt = \"touchend\", jt = \"unload\", xe = {\n DOMContentLoaded: P,\n DOMMouseScroll: et,\n abort: Y,\n beforeunload: Z,\n blur: $,\n change: _,\n click: ft,\n contextmenu: tt,\n dblclick: mt,\n error: nt,\n focus: ot,\n focusin: st,\n focusout: ct,\n gesturechange: rt,\n gestureend: at,\n gesturestart: it,\n hover: Et,\n keydown: ut,\n keypress: lt,\n keyup: dt,\n load: pt,\n mousedown: gt,\n mousemove: St,\n mousein: yt,\n mouseout: wt,\n mouseenter: bt,\n mouseleave: ht,\n mouseover: At,\n mouseup: vt,\n mousewheel: Nt,\n move: Mt,\n orientationchange: Tt,\n pointercancel: kt,\n pointerdown: Dt,\n pointerleave: Ct,\n pointermove: Ot,\n pointerup: Lt,\n readystatechange: It,\n reset: xt,\n resize: zt,\n scroll: Ht,\n select: Vt,\n selectend: Bt,\n selectstart: Ft,\n submit: Pt,\n touchcancel: Rt,\n touchend: Qt,\n touchmove: Wt,\n touchstart: Ut,\n unload: jt\n}, ze = \"drag\", Ve = \"dragstart\", Be = \"dragenter\", Fe = \"dragleave\", He = \"dragover\", Pe = \"dragend\", Ue = \"loadstart\", We = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, Re = { down: \"mousedown\", up: \"mouseup\" }, Qe = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : (\n /* istanbul ignore next */\n [\"mouseover\", \"mouseout\"]\n), je = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, qe = { in: \"focusin\", out: \"focusout\" }, qt = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]', Ge = {\n Backspace: \"Backspace\",\n // 8\n Tab: \"Tab\",\n // 9\n Enter: \"Enter\",\n // 13\n Shift: \"Shift\",\n // 16\n Control: \"Control\",\n // 17\n Alt: \"Alt\",\n // 18\n Pause: \"Pause\",\n // 19\n CapsLock: \"CapsLock\",\n // 20\n Escape: \"Escape\",\n // 27\n Scape: \"Space\",\n // 32\n ArrowLeft: \"ArrowLeft\",\n // 37\n ArrowUp: \"ArrowUp\",\n // 38\n ArrowRight: \"ArrowRight\",\n // 39\n ArrowDown: \"ArrowDown\",\n // 40\n Insert: \"Insert\",\n // 45\n Delete: \"Delete\",\n // 46\n Meta: \"Meta\",\n // 91 windows key\n ContextMenu: \"ContextMenu\",\n // 93\n ScrollLock: \"ScrollLock\"\n // 145\n}, Ke = \"Alt\", Je = \"ArrowDown\", Xe = \"ArrowUp\", Ye = \"ArrowLeft\", Ze = \"ArrowRight\", $e = \"Backspace\", _e = \"CapsLock\", tn = \"Control\", en = \"Delete\", nn = \"Enter\", on = \"NumpadEnter\", sn = \"Escape\", cn = \"Insert\", rn = \"Meta\", an = \"Pause\", un = \"ScrollLock\", ln = \"Shift\", dn = \"Space\", pn = \"Tab\", Gt = \"animationDuration\", Kt = \"animationDelay\", U = \"animationName\", D = \"animationend\", Jt = \"transitionDuration\", Xt = \"transitionDelay\", C = \"transitionend\", W = \"transitionProperty\", fn = \"addEventListener\", mn = \"removeEventListener\", gn = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\"\n}, vn = \"offsetHeight\", En = \"offsetWidth\", bn = \"scrollHeight\", hn = \"scrollWidth\", yn = \"tabindex\", Yt = navigator.userAgentData, A = Yt, { userAgent: Zt } = navigator, S = Zt, z = /iPhone|iPad|iPod|Android/i;\nlet O = !1;\n// istanbul ignore else @preserve\nA ? O = A.brands.some((t) => z.test(t.brand)) : O = z.test(S);\nconst wn = O, V = /(iPhone|iPod|iPad)/, An = A ? A.brands.some((t) => V.test(t.brand)) : (\n /* istanbul ignore next @preserve */\n V.test(S)\n), Sn = S ? S.includes(\"Firefox\") : (\n /* istanbul ignore next @preserve */\n !1\n), { head: N } = document, Nn = [\"webkitPerspective\", \"perspective\"].some((t) => t in N.style), R = (t, e, n, o) => {\n const s = o || !1;\n t.addEventListener(e, n, s);\n}, Q = (t, e, n, o) => {\n const s = o || !1;\n t.removeEventListener(e, n, s);\n}, $t = (t, e, n, o) => {\n const s = (c) => {\n /* istanbul ignore else @preserve */\n (c.target === t || c.currentTarget === t) && (n.apply(t, [c]), Q(t, e, s, o));\n };\n R(t, e, s, o);\n}, _t = () => {\n}, Mn = (() => {\n let t = !1;\n try {\n const e = Object.defineProperty({}, \"passive\", {\n get: () => (t = !0, t)\n });\n // istanbul ignore next @preserve\n $t(document, P, _t, e);\n } catch {\n }\n return t;\n})(), Tn = [\"webkitTransform\", \"transform\"].some((t) => t in N.style), kn = \"ontouchstart\" in window || /* istanbul ignore next */\n\"msMaxTouchPoints\" in navigator, Dn = [\"webkitAnimation\", \"animation\"].some((t) => t in N.style), Cn = [\"webkitTransition\", \"transition\"].some((t) => t in N.style), j = (t, e) => t.getAttribute(e), On = (t, e, n) => e.getAttributeNS(t, n), te = (t, e) => t.hasAttribute(e), Ln = (t, e, n) => e.hasAttributeNS(t, n), In = (t, e, n) => t.setAttribute(e, n), xn = (t, e, n, o) => e.setAttributeNS(t, n, o), zn = (t, e) => t.removeAttribute(e), Vn = (t, e, n) => e.removeAttributeNS(t, n), Bn = (t, ...e) => {\n t.classList.add(...e);\n}, Fn = (t, ...e) => {\n t.classList.remove(...e);\n}, Hn = (t, e) => t.classList.contains(e), { body: Pn } = document, { documentElement: Un } = document, Wn = (t) => Array.from(t), v = (t) => t != null && typeof t == \"object\" || !1, i = (t) => v(t) && typeof t.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some((e) => t.nodeType === e) || !1, l = (t) => i(t) && t.nodeType === 1 || !1, E = /* @__PURE__ */ new Map(), L = {\n data: E,\n /**\n * Sets web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @param instance the component instance\n */\n set: (t, e, n) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n E.has(e) || E.set(e, /* @__PURE__ */ new Map()), E.get(e).set(t, n);\n },\n /**\n * Returns all instances for specified component.\n *\n * @param component the component's name or a unique key\n * @returns all the component instances\n */\n getAllFor: (t) => E.get(t) || null,\n /**\n * Returns the instance associated with the target.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @returns the instance\n */\n get: (t, e) => {\n if (!l(t) || !e) return null;\n const n = L.getAllFor(e);\n return t && n && n.get(t) || null;\n },\n /**\n * Removes web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n */\n remove: (t, e) => {\n const n = L.getAllFor(e);\n if (!n || !l(t)) return;\n n.delete(t);\n // istanbul ignore else @preserve\n n.size === 0 && E.delete(e);\n }\n}, Rn = (t, e) => L.get(t, e), M = (t) => typeof t == \"string\" || !1, q = (t) => v(t) && t.constructor.name === \"Window\" || !1, G = (t) => i(t) && t.nodeType === 9 || !1, d = (t) => q(t) ? t.document : G(t) ? t : i(t) ? t.ownerDocument : window.document, T = (t, ...e) => Object.assign(t, ...e), ee = (t) => {\n if (!t) return;\n if (M(t))\n return d().createElement(t);\n const { tagName: e } = t, n = ee(e);\n if (!n) return;\n const o = { ...t };\n return delete o.tagName, T(n, o);\n}, ne = (t, e) => {\n if (!t || !e) return;\n if (M(e))\n return d().createElementNS(t, e);\n const { tagName: n } = e, o = ne(t, n);\n if (!o) return;\n const s = { ...e };\n return delete s.tagName, T(o, s);\n}, K = (t, e) => t.dispatchEvent(e), Qn = (t, e, n) => n.indexOf(t) === e, g = (t, e) => {\n const n = getComputedStyle(t), o = e.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return n.getPropertyValue(o);\n}, oe = (t) => {\n const e = g(t, U), n = g(t, Kt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, se = (t) => {\n const e = g(t, U), n = g(t, Gt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, jn = (t, e) => {\n let n = 0;\n const o = new Event(D), s = se(t), c = oe(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(D, a), n = 1);\n };\n t.addEventListener(D, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else {\n // istanbul ignore next @preserve\n e.apply(t, [o]);\n }\n}, ce = (t) => {\n const e = g(t, W), n = g(t, Xt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, re = (t) => {\n const e = g(t, W), n = g(t, Jt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, qn = (t, e) => {\n let n = 0;\n const o = new Event(C), s = re(t), c = ce(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(C, a), n = 1);\n };\n t.addEventListener(C, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else\n e.apply(t, [o]);\n}, Gn = (t) => Float32Array.from(Array.from(t)), Kn = (t) => Float64Array.from(Array.from(t)), Jn = (t, e) => t.focus(e), B = (t) => [\"true\", !0].includes(t) ? !0 : [\"false\", !1].includes(t) ? !1 : [\"null\", \"\", null, void 0].includes(t) ? null : t !== \"\" && !Number.isNaN(+t) ? +t : t, w = (t) => Object.entries(t), ae = (t) => t.toLowerCase(), Xn = (t, e, n, o) => {\n const s = { ...n }, c = { ...t.dataset }, a = { ...e }, u = {}, p = \"title\";\n return w(c).forEach(([r, f]) => {\n const y = o && typeof r == \"string\" && r.includes(o) ? r.replace(o, \"\").replace(/[A-Z]/g, (J) => ae(J)) : (\n /* istanbul ignore next @preserve */\n r\n );\n u[y] = B(f);\n }), w(s).forEach(([r, f]) => {\n s[r] = B(f);\n }), w(e).forEach(([r, f]) => {\n // istanbul ignore else @preserve\n r in s ? a[r] = s[r] : r in u ? a[r] = u[r] : a[r] = r === p ? j(t, p) : f;\n }), a;\n}, Yn = (t, e) => v(t) && (Object.hasOwn(t, e) || e in t), Zn = (t) => Object.keys(t), $n = (t) => Object.values(t), _n = (t) => Object.fromEntries(t), to = (t, e) => {\n const n = new CustomEvent(t, {\n cancelable: !0,\n bubbles: !0\n });\n // istanbul ignore else @preserve\n return v(e) && T(n, e), n;\n}, eo = { passive: !0 }, no = (t) => t.offsetHeight, oo = (t, e) => {\n w(e).forEach(([n, o]) => {\n if (o && M(n) && n.includes(\"--\"))\n t.style.setProperty(n, o);\n else {\n const s = {};\n s[n] = o, T(t.style, s);\n }\n });\n}, I = (t) => v(t) && t.constructor.name === \"Map\" || !1, ie = (t) => typeof t == \"number\" || !1, m = /* @__PURE__ */ new Map(), so = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n *\n * @param element target element\n * @param callback the callback\n * @param delay the execution delay\n * @param key a unique key\n */\n set: (t, e, n, o) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n if (o && o.length) {\n // istanbul ignore else @preserve\n m.has(t) || m.set(t, /* @__PURE__ */ new Map()), m.get(t).set(o, setTimeout(e, n));\n } else\n m.set(t, setTimeout(e, n));\n },\n /**\n * Returns the timer associated with the target.\n *\n * @param element target element\n * @param key a unique\n * @returns the timer\n */\n get: (t, e) => {\n if (!l(t)) return null;\n const n = m.get(t);\n return e && n && I(n) ? n.get(e) || /* istanbul ignore next */\n null : ie(n) ? n : null;\n },\n /**\n * Clears the element's timer.\n *\n * @param element target element\n * @param key a unique key\n */\n clear: (t, e) => {\n if (!l(t)) return;\n const n = m.get(t);\n if (e && e.length && I(n)) {\n clearTimeout(n.get(e)), n.delete(e);\n // istanbul ignore else @preserve\n n.size === 0 && m.delete(t);\n } else\n clearTimeout(n), m.delete(t);\n }\n}, co = (t) => t.toUpperCase(), ue = (t, e) => (i(e) ? e : d()).querySelectorAll(t), x = /* @__PURE__ */ new Map();\nfunction le(t) {\n const { shiftKey: e, code: n } = t, o = d(this), s = [...ue(qt, this)].filter(\n (u) => !te(u, \"disabled\") && !j(u, X)\n );\n if (!s.length) return;\n const c = s[0], a = s[s.length - 1];\n // istanbul ignore else @preserve\n n === \"Tab\" && (e && o.activeElement === c ? (a.focus(), t.preventDefault()) : !e && o.activeElement === a && (c.focus(), t.preventDefault()));\n}\nconst de = (t) => x.has(t) === !0, ro = (t) => {\n const e = de(t);\n (e ? Q : R)(t, \"keydown\", le), e ? x.delete(t) : x.set(t, !0);\n}, h = (t, e) => {\n const { width: n, height: o, top: s, right: c, bottom: a, left: u } = t.getBoundingClientRect();\n let p = 1, r = 1;\n if (e && l(t)) {\n const { offsetWidth: f, offsetHeight: y } = t;\n p = f > 0 ? Math.round(n) / f : (\n /* istanbul ignore next */\n 1\n ), r = y > 0 ? Math.round(o) / y : (\n /* istanbul ignore next */\n 1\n );\n }\n return {\n width: n / p,\n height: o / r,\n top: s / r,\n right: c / p,\n bottom: a / r,\n left: u / p,\n x: u / p,\n y: s / r\n };\n}, ao = (t) => d(t).body, k = (t) => d(t).documentElement, io = (t) => d(t).head, uo = (t) => {\n const e = q(t), n = e ? t.scrollX : t.scrollLeft, o = e ? t.scrollY : t.scrollTop;\n return { x: n, y: o };\n}, pe = (t) => i(t) && t.constructor.name === \"ShadowRoot\" || !1, lo = (t) => t.nodeName === \"HTML\" ? t : l(t) && t.assignedSlot || // step into the shadow DOM of the parent of a slotted node\ni(t) && t.parentNode || // DOM Element detected\npe(t) && t.host || // ShadowRoot detected\nk(t), fe = (t) => {\n if (!l(t)) return !1;\n const { width: e, height: n } = h(t), { offsetWidth: o, offsetHeight: s } = t;\n return Math.round(e) !== o || Math.round(n) !== s;\n}, po = (t, e, n) => {\n const o = l(e), s = h(t, o && fe(e)), c = { x: 0, y: 0 };\n // istanbul ignore else @preserve\n if (o) {\n const a = h(e, !0);\n c.x = a.x + e.clientLeft, c.y = a.y + e.clientTop;\n }\n return {\n x: s.left + n.x - c.x,\n y: s.top + n.y - c.y,\n width: s.width,\n height: s.height\n };\n};\nlet F = 0, H = 0;\nconst b = /* @__PURE__ */ new Map(), me = (t, e) => {\n let n = e ? F : H;\n if (e) {\n const o = me(t), s = b.get(o) || /* @__PURE__ */ new Map();\n b.has(o) || b.set(o, s), I(s) && !s.has(e) ? (s.set(e, n), F += 1) : n = s.get(e);\n } else {\n const o = t.id || t;\n b.has(o) ? n = b.get(o) : (b.set(o, n), H += 1);\n }\n return n;\n}, fo = (t) => {\n var e;\n return t ? G(t) ? t.defaultView : i(t) ? (e = t == null ? void 0 : t.ownerDocument) == null ? void 0 : e.defaultView : t : window;\n}, ge = (t) => Array.isArray(t) || !1, mo = (t) => i(t) && t.nodeName === \"CANVAS\" || !1, ve = (t) => l(t) && !!t.shadowRoot || !1, go = (t) => i(t) && [1, 2, 3, 4, 5, 6, 7, 8].some((e) => t.nodeType === e) || !1, vo = (t) => {\n if (!i(t)) return !1;\n const { top: e, bottom: n } = h(t), { clientHeight: o } = k(t);\n return e <= o && n >= 0;\n}, Eo = (t) => {\n if (!i(t)) return !1;\n const { clientWidth: e, clientHeight: n } = k(t), { top: o, left: s, bottom: c, right: a } = h(t, !0);\n return o >= 0 && s >= 0 && c <= n && a <= e;\n}, bo = (t) => ge(t) && t.every(l) || !1, ho = (t) => typeof t == \"function\" || !1, yo = (t) => v(t) && t.constructor.name === \"HTMLCollection\" || !1, wo = (t) => l(t) && t.tagName === \"IMG\" || !1, Ao = (t) => {\n if (!M(t)) return !1;\n try {\n JSON.parse(t);\n } catch {\n return !1;\n }\n return !0;\n}, So = (t) => v(t) && t.constructor.name === \"WeakMap\" || !1, No = (t) => i(t) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some((e) => t.constructor.name.includes(e)) || !1, Mo = (t) => v(t) && t.constructor.name === \"NodeList\" || !1, To = (t) => k(t).dir === \"rtl\", ko = (t) => i(t) && t.constructor.name.includes(\"SVG\") || !1, Do = (t) => i(t) && [\"TABLE\", \"TD\", \"TH\"].includes(t.nodeName) || !1, Ee = (t, e) => t ? t.closest(e) || // break out of `ShadowRoot`\nEe(t.getRootNode().host, e) : null, Co = (t, e) => l(t) ? t : (i(e) ? e : d()).querySelector(t), be = (t, e) => (i(e) ? e : d()).getElementsByTagName(t), Oo = (t) => [...be(\"*\", t)].filter(ve), Lo = (t, e) => d(e).getElementById(t) || null, Io = (t, e) => (e && i(e) ? e : d()).getElementsByClassName(t), xo = (t, e) => t.matches(e), zo = \"2.0.5\";\nexport {\n Wn as ArrayFrom,\n P as DOMContentLoadedEvent,\n et as DOMMouseScrollEvent,\n L as Data,\n Gn as Float32ArrayFrom,\n Kn as Float64ArrayFrom,\n T as ObjectAssign,\n w as ObjectEntries,\n _n as ObjectFromEntries,\n Yn as ObjectHasOwn,\n Zn as ObjectKeys,\n $n as ObjectValues,\n so as Timer,\n Y as abortEvent,\n Bn as addClass,\n fn as addEventListener,\n Kt as animationDelay,\n Gt as animationDuration,\n D as animationEndEvent,\n U as animationName,\n he as ariaChecked,\n we as ariaDescribedBy,\n ye as ariaDescription,\n Ae as ariaExpanded,\n Se as ariaHasPopup,\n X as ariaHidden,\n Ne as ariaLabel,\n Me as ariaLabelledBy,\n Te as ariaModal,\n ke as ariaPressed,\n De as ariaSelected,\n Oe as ariaValueMax,\n Ce as ariaValueMin,\n Le as ariaValueNow,\n Ie as ariaValueText,\n Z as beforeunloadEvent,\n gn as bezierEasings,\n $ as blurEvent,\n _ as changeEvent,\n Ee as closest,\n tt as contextmenuEvent,\n to as createCustomEvent,\n ee as createElement,\n ne as createElementNS,\n K as dispatchEvent,\n Qn as distinct,\n Pn as documentBody,\n Un as documentElement,\n N as documentHead,\n ze as dragEvent,\n Pe as dragendEvent,\n Be as dragenterEvent,\n Fe as dragleaveEvent,\n He as dragoverEvent,\n Ve as dragstartEvent,\n jn as emulateAnimationEnd,\n qn as emulateTransitionEnd,\n nt as errorEvent,\n Jn as focus,\n ot as focusEvent,\n qe as focusEvents,\n qt as focusableSelector,\n st as focusinEvent,\n ct as focusoutEvent,\n rt as gesturechangeEvent,\n at as gestureendEvent,\n it as gesturestartEvent,\n j as getAttribute,\n On as getAttributeNS,\n h as getBoundingClientRect,\n Oo as getCustomElements,\n d as getDocument,\n ao as getDocumentBody,\n k as getDocumentElement,\n io as getDocumentHead,\n oe as getElementAnimationDelay,\n se as getElementAnimationDuration,\n Lo as getElementById,\n g as getElementStyle,\n ce as getElementTransitionDelay,\n re as getElementTransitionDuration,\n Io as getElementsByClassName,\n be as getElementsByTagName,\n Rn as getInstance,\n uo as getNodeScroll,\n lo as getParentNode,\n po as getRectRelativeToOffsetParent,\n me as getUID,\n fo as getWindow,\n te as hasAttribute,\n Ln as hasAttributeNS,\n Hn as hasClass,\n de as hasFocusTrap,\n An as isApple,\n ge as isArray,\n mo as isCanvas,\n ve as isCustomElement,\n G as isDocument,\n go as isElement,\n vo as isElementInScrollRange,\n Eo as isElementInViewport,\n bo as isElementsArray,\n Sn as isFirefox,\n ho as isFunction,\n yo as isHTMLCollection,\n l as isHTMLElement,\n wo as isHTMLImageElement,\n Ao as isJSON,\n I as isMap,\n No as isMedia,\n wn as isMobile,\n i as isNode,\n Mo as isNodeList,\n ie as isNumber,\n v as isObject,\n To as isRTL,\n ko as isSVGElement,\n fe as isScaledElement,\n pe as isShadowRoot,\n M as isString,\n Do as isTableElement,\n So as isWeakMap,\n q as isWindow,\n Ke as keyAlt,\n Je as keyArrowDown,\n Ye as keyArrowLeft,\n Ze as keyArrowRight,\n Xe as keyArrowUp,\n $e as keyBackspace,\n _e as keyCapsLock,\n tn as keyControl,\n en as keyDelete,\n nn as keyEnter,\n sn as keyEscape,\n cn as keyInsert,\n rn as keyMeta,\n on as keyNumpadEnter,\n an as keyPause,\n un as keyScrollLock,\n ln as keyShift,\n dn as keySpace,\n pn as keyTab,\n Ge as keyboardEventKeys,\n ut as keydownEvent,\n lt as keypressEvent,\n dt as keyupEvent,\n pt as loadEvent,\n Ue as loadstartEvent,\n xo as matches,\n Re as mouseClickEvents,\n Qe as mouseHoverEvents,\n We as mouseSwipeEvents,\n ft as mouseclickEvent,\n mt as mousedblclickEvent,\n gt as mousedownEvent,\n bt as mouseenterEvent,\n Et as mousehoverEvent,\n yt as mouseinEvent,\n ht as mouseleaveEvent,\n St as mousemoveEvent,\n wt as mouseoutEvent,\n At as mouseoverEvent,\n vt as mouseupEvent,\n Nt as mousewheelEvent,\n Mt as moveEvent,\n xe as nativeEvents,\n _t as noop,\n Xn as normalizeOptions,\n B as normalizeValue,\n Q as off,\n vn as offsetHeight,\n En as offsetWidth,\n R as on,\n $t as one,\n Tt as orientationchangeEvent,\n eo as passiveHandler,\n kt as pointercancelEvent,\n Dt as pointerdownEvent,\n Ct as pointerleaveEvent,\n Ot as pointermoveEvent,\n Lt as pointerupEvent,\n Co as querySelector,\n ue as querySelectorAll,\n It as readystatechangeEvent,\n no as reflow,\n zn as removeAttribute,\n Vn as removeAttributeNS,\n Fn as removeClass,\n mn as removeEventListener,\n xt as resetEvent,\n zt as resizeEvent,\n Ht as scrollEvent,\n bn as scrollHeight,\n hn as scrollWidth,\n Vt as selectEvent,\n Bt as selectendEvent,\n Ft as selectstartEvent,\n In as setAttribute,\n xn as setAttributeNS,\n oo as setElementStyle,\n Pt as submitEvent,\n Nn as support3DTransform,\n Dn as supportAnimation,\n Mn as supportPassive,\n kn as supportTouch,\n Tn as supportTransform,\n Cn as supportTransition,\n yn as tabindex,\n ae as toLowerCase,\n co as toUpperCase,\n ro as toggleFocusTrap,\n je as touchEvents,\n Rt as touchcancelEvent,\n Qt as touchendEvent,\n Wt as touchmoveEvent,\n Ut as touchstartEvent,\n Xt as transitionDelay,\n Jt as transitionDuration,\n C as transitionEndEvent,\n W as transitionProperty,\n jt as unloadEvent,\n S as userAgent,\n A as userAgentData,\n zo as version\n};\n//# sourceMappingURL=shorty.mjs.map\n","const e = {}, f = (t) => {\n const { type: c, currentTarget: i } = t;\n [...e[c]].forEach(([n, s]) => {\n /* istanbul ignore else @preserve */\n i === n && [...s].forEach(([o, a]) => {\n o.apply(n, [t]), typeof a == \"object\" && a.once && r(n, c, o, a);\n });\n });\n}, E = (t, c, i, n) => {\n /* istanbul ignore else @preserve */\n e[c] || (e[c] = /* @__PURE__ */ new Map());\n const s = e[c];\n /* istanbul ignore else @preserve */\n s.has(t) || s.set(t, /* @__PURE__ */ new Map());\n const o = s.get(t), { size: a } = o;\n o.set(i, n);\n /* istanbul ignore else @preserve */\n a || t.addEventListener(c, f, n);\n}, r = (t, c, i, n) => {\n const s = e[c], o = s && s.get(t), a = o && o.get(i), d = a !== void 0 ? a : n;\n /* istanbul ignore else @preserve */\n o && o.has(i) && o.delete(i);\n /* istanbul ignore else @preserve */\n s && (!o || !o.size) && s.delete(t);\n /* istanbul ignore else @preserve */\n (!s || !s.size) && delete e[c];\n /* istanbul ignore else @preserve */\n (!o || !o.size) && t.removeEventListener(\n c,\n f,\n d\n );\n}, g = E, M = r;\nexport {\n E as addListener,\n f as globalListener,\n M as off,\n g as on,\n e as registry,\n r as removeListener\n};\n//# sourceMappingURL=event-listener.mjs.map\n","/**\n * Global namespace for most components `fade` class.\n */\nconst fadeClass = \"fade\";\nexport default fadeClass;\n","/**\n * Global namespace for most components `show` class.\n */\nconst showClass = \"show\";\nexport default showClass;\n","/**\n * Global namespace for most components `dismiss` option.\n */\nconst dataBsDismiss = \"data-bs-dismiss\";\nexport default dataBsDismiss;\n","/** @type {string} */\nconst alertString = \"alert\";\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = \"Alert\";\nexport default alertComponent;\n","import { version } from \"../package.json\";\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport {\n Data,\n isHTMLElement,\n isString,\n normalizeOptions,\n ObjectKeys,\n querySelector,\n} from \"@thednp/shorty\";\n\nimport type { BaseOptions } from \"../interface/baseComponent\";\nimport Version from \"../version\";\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options = this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, \"bs\")\n // istanbul ignore next @preserve\n : {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return \"BaseComponent\";\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach((prop) => {\n delete this[prop];\n });\n }\n}\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport alertString from \"../strings/alertString\";\nimport alertComponent from \"../strings/alertComponent\";\nimport type { AlertEvent } from \"../interface/alert\";\n\nimport BaseComponent from \"./base-component\";\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) =>\n getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(\n `close.bs.${alertString}`,\n);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(\n `closed.bs.${alertString}`,\n);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/**\n * Global namespace for most components active class.\n */\nconst activeClass = \"active\";\nexport default activeClass;\n","/**\n * Global namespace for most components `toggle` option.\n */\nconst dataBsToggle = \"data-bs-toggle\";\nexport default dataBsToggle;\n","/** @type {string} */\nconst buttonString = \"button\";\nexport default buttonString;\n","/** @type {string} */\nconst buttonComponent = \"Button\";\nexport default buttonComponent;\n","/* Native JavaScript for Bootstrap 5 | Button\n---------------------------------------------*/\nimport {\n addClass,\n ariaPressed,\n getAttribute,\n getInstance,\n hasClass,\n mouseclickEvent,\n removeClass,\n setAttribute,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport activeClass from \"../strings/activeClass\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport buttonString from \"../strings/buttonString\";\nimport buttonComponent from \"../strings/buttonComponent\";\n\nimport BaseComponent from \"./base-component\";\n\n// BUTTON PRIVATE GC\n// =================\nconst buttonSelector = `[${dataBsToggle}=\"${buttonString}\"]`;\n\n/**\n * Static method which returns an existing `Button` instance associated\n * to a target `Element`.\n */\nconst getButtonInstance = (element: HTMLElement) =>\n getInstance',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) =>\n getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n","/** @type {string} */\nconst scrollspyString = \"scrollspy\";\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = \"ScrollSpy\";\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n getWindow,\n hasClass,\n isHTMLElement,\n isWindow,\n passiveHandler,\n querySelector,\n removeClass,\n scrollEvent,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport activeClass from \"../strings/activeClass\";\nimport scrollspyString from \"../strings/scrollspyString\";\nimport scrollspyComponent from \"../strings/scrollspyComponent\";\n\nimport BaseComponent from \"./base-component\";\nimport { ScrollSpyEvent, ScrollSpyOptions } from \"../interface/scrollspy\";\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) =>\n getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent<\n ScrollSpyEventProps,\n ScrollSpyEvent\n>(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } =\n self;\n const { offset } = options;\n const isWin = isWindow(scrollTarget as Node | Window);\n\n const links = target && getElementsByTagName(\"A\", target);\n const scrollHEIGHT = scrollTarget\n ? getScrollHeight(scrollTarget)\n // istanbul ignore next @preserve\n : scrollHeight;\n\n self.scrollTop = isWin\n ? (scrollTarget as Window).scrollY\n : (scrollTarget as HTMLElement).scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (\n links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)\n ) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n [...links].forEach((link) => {\n href = getAttribute(link, \"href\");\n targetItem = href && href.charAt(0) === \"#\" && href.slice(-1) !== \"#\" &&\n querySelector(href, getDocument(element));\n\n if (targetItem) {\n self.items.push(link);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push(\n (isWin ? rect.top + self.scrollTop : targetItem.offsetTop) - offset,\n );\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: Node | Window) => {\n return isHTMLElement(scrollTarget as Node)\n ? (scrollTarget as HTMLElement).scrollHeight\n : getDocumentElement(scrollTarget as Node).scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return isWindow(scrollTarget as Node)\n ? (scrollTarget as Window).innerHeight\n : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName(\"A\", target)].forEach((item) => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, \"nav\") || hasClass(parentItem, \"dropdown-menu\")) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach((menuItem) => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement | Window;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(\n target: HTMLElement | string,\n config?: Partial,\n ) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(\n options.target as HTMLElement | string,\n getDocument(element),\n );\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight\n ? element\n : getWindow(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // add event handlers\n this._toggleEventListeners(true);\n\n this.refresh();\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === \"undefined\" || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /**\n * Toggles on/off the component event listener.\n *\n * @param add when `true`, listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(\n this.scrollTarget as EventTarget,\n scrollEvent,\n this.refresh,\n passiveHandler,\n );\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst tabString = \"tab\";\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = \"Tab\";\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport collapsingClass from \"../strings/collapsingClass\";\nimport activeClass from \"../strings/activeClass\";\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dropdownClasses from \"../strings/dropdownClasses\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport tabString from \"../strings/tabString\";\nimport tabComponent from \"../strings/tabComponent\";\n\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport type { /* TabOptions, */ TabEvent } from \"../interface/tab\";\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) =>\n getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(\n `show.bs.${tabString}`,\n);\nconst shownTabEvent = createCustomEvent(\n `shown.bs.${tabString}`,\n);\nconst hideTabEvent = createCustomEvent(\n `hide.bs.${tabString}`,\n);\nconst hiddenTabEvent = createCustomEvent(\n `hidden.bs.${tabString}`,\n);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = \"\";\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null };\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) ||\n // istanbul ignore next @preserve\n { currentHeight: 0, nextHeight: 0 };\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null, content: null };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, \"overflow-hidden\");\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight // istanbul ignore next @preserve\n : 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, \"overflow-hidden\");\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (\n self: Tab,\n): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (\n activeTabs.length === 1 &&\n !dropdownClasses.some((c) =>\n hasClass(activeTabs[0].parentElement as HTMLElement, c)\n )\n ) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement)\n ? getTargetElement(tab as HTMLElement)\n : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(\",.\")}`);\n return dropdown\n ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown)\n : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, \".nav\");\n const container = closest(content, \".tab-content\");\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, \"false\");\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (\n content &&\n (hasClass(content, fadeClass) ||\n (nextContent && hasClass(nextContent, fadeClass)))\n ) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst toastString = \"toast\";\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = \"Toast\";\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport toastString from \"../strings/toastString\";\nimport toastComponent from \"../strings/toastComponent\";\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport { ToastEvent, ToastOptions } from \"../interface/toast\";\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = \"showing\";\n/** @deprecated */\nconst hideClass = \"hide\";\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) =>\n getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(\n `show.bs.${toastString}`,\n);\nconst shownToastEvent = createCustomEvent, ToastEvent>(\n `shown.bs.${toastString}`,\n);\nconst hideToastEvent = createCustomEvent, ToastEvent>(\n `hide.bs.${toastString}`,\n);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(\n `hidden.bs.${toastString}`,\n);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === \"A\") e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (\n self && element !== relatedTarget &&\n !element.contains(relatedTarget as Node)\n ) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [\n ...querySelectorAll(toastToggleSelector, getDocument(element)),\n ].filter(\n (btn) => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(\n (e) => action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach((btn) =>\n action(btn, mouseclickEvent, toastClickHandler)\n );\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n","import { Data, getElementsByTagName, matches } from \"@thednp/shorty\";\n\nimport { addListener } from \"@thednp/event-listener\";\n\nimport Alert from \"../components/alert\";\nimport Button from \"../components/button\";\nimport Carousel from \"../components/carousel\";\nimport Collapse from \"../components/collapse\";\nimport Dropdown from \"../components/dropdown\";\nimport Modal from \"../components/modal\";\nimport Offcanvas from \"../components/offcanvas\";\nimport Popover from \"../components/popover\";\nimport ScrollSpy from \"../components/scrollspy\";\nimport Tab from \"../components/tab\";\nimport Toast from \"../components/toast\";\nimport Tooltip from \"../components/tooltip\";\n\nconst componentsList = new Map<\n string,\n | typeof Alert\n | typeof Button\n | typeof Carousel\n | typeof Collapse\n | typeof Dropdown\n | typeof Modal\n | typeof Offcanvas\n | typeof Popover\n | typeof ScrollSpy\n | typeof Tab\n | typeof Toast\n | typeof Tooltip\n>();\n\ntype Component =\n | Alert\n | Button\n | Carousel\n | Collapse\n | Dropdown\n | Modal\n | Offcanvas\n | Popover\n | ScrollSpy\n | Tab\n | Toast\n | Tooltip;\n\n[\n Alert,\n Button,\n Carousel,\n Collapse,\n Dropdown,\n Modal,\n Offcanvas,\n Popover,\n ScrollSpy,\n Tab,\n Toast,\n Tooltip,\n].forEach((c) => componentsList.set(c.prototype.name, c));\n\n/**\n * Initialize all matched `Element`s for one component.\n *\n * @param callback\n * @param collection\n */\nconst initComponentDataAPI = (\n callback: (el: HTMLElement) => Component,\n collection: HTMLCollectionOf | HTMLElement[],\n) => {\n [...collection].forEach((x) => callback(x));\n};\n\n/**\n * Remove one component from a target container element or all in the page.\n *\n * @param component the component name\n * @param context parent `Node`\n */\nconst removeComponentDataAPI = (component: string, context: ParentNode) => {\n const compData = Data.getAllFor(component) as Map;\n\n if (compData) {\n [...compData].forEach(([element, instance]) => {\n if (context.contains(element)) {\n (instance as T & { dispose: () => void }).dispose();\n }\n });\n }\n};\n\n/**\n * Initialize all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const initCallback = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n const elemCollection = [...getElementsByTagName(\"*\", lookUp)];\n\n componentsList.forEach((cs) => {\n const { init, selector } = cs;\n initComponentDataAPI(\n init,\n elemCollection.filter((item) => matches(item, selector)),\n );\n });\n};\n\n/**\n * Remove all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const removeDataAPI = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n\n componentsList.forEach((comp) => {\n removeComponentDataAPI(comp.prototype.name, lookUp);\n });\n};\n\n// Bulk initialize all components\nif (document.body) initCallback();\nelse {\n addListener(document, \"DOMContentLoaded\", () => initCallback(), {\n once: true,\n });\n}\n"],"names":["we","Ae","X","Te","ke","De","P","ot","st","ct","ut","dt","ft","gt","Et","bt","ht","Dt","Ot","Lt","zt","Ht","Ut","Ve","qt","Je","Xe","Ye","Ze","sn","Jt","Xt","C","W","Yt","A","Zt","S","z","V","An","N","R","e","n","o","s","Q","$t","c","_t","j","te","In","zn","Bn","Fn","Hn","v","i","l","E","L","Rn","M","q","G","d","T","ee","K","g","ce","re","qn","a","u","Jn","B","w","ae","Xn","p","r","f","y","J","Zn","to","eo","no","oo","I","ie","m","so","ue","x","le","de","ro","h","ao","k","pe","lo","F","H","b","me","fo","ge","vo","ho","Mo","To","Do","Ee","Co","be","Io","xo","fadeClass","showClass","dataBsDismiss","alertString","alertComponent","Version","BaseComponent","target","config","__publicField","element","isHTMLElement","isString","querySelector","prevInstance","Data","ObjectKeys","normalizeOptions","prop","alertSelector","alertDismissSelector","getAlertInstance","getInstance","alertInitCallback","Alert","closeAlertEvent","createCustomEvent","closedAlertEvent","alertTransitionEnd","self","dispatchEvent","hasClass","removeClass","emulateTransitionEnd","add","action","addListener","removeListener","dismiss","close","mouseclickEvent","activeClass","dataBsToggle","buttonString","buttonComponent","buttonSelector","getButtonInstance","buttonInitCallback","Button","isActive","getAttribute","addClass","setAttribute","ariaPressed","dataBsTarget","carouselString","carouselComponent","dataBsParent","dataBsContainer","getTargetElement","targetAttr","doc","getDocument","att","attValue","closest","carouselSelector","carouselItem","dataBsSlideTo","dataBsSlide","pausedClass","carouselDefaults","getCarouselInstance","carouselInitCallback","Carousel","startX","currentX","endX","carouselSlideEvent","carouselSlidEvent","carouselTransitionEndHandler","index","direction","slides","options","activeItem","getActiveIndex","orientation","directionClass","Timer","carouselPauseHandler","carouselResumeHandler","carouselIndicatorHandler","newIndex","carouselControlsHandler","carouselKeyHandler","code","querySelectorAll","isElementInScrollRange","RTL","isRTL","arrowKeyNext","keyArrowLeft","keyArrowRight","arrowKeyPrev","carouselDragHandler","carouselPointerDownHandler","controls","indicators","el","toggleCarouselTouchHandlers","carouselPointerMoveHandler","carouselPointerUpHandler","_a","activateCarouselIndicator","pointermoveEvent","passiveHandler","pointerupEvent","touch","pause","interval","keyboard","mouseenterEvent","mouseleaveEvent","pointerdownEvent","touchstartEvent","dragstartEvent","arrow","indicator","keydownEvent","getElementsByClassName","activeIndex","transitionItem","matches","ar","isPaused","idx","next","eventProperties","ObjectAssign","getElementTransitionDuration","reflow","isAnimating","clone","collapsingClass","collapseString","collapseComponent","collapseSelector","collapseToggleSelector","collapseDefaults","getCollapseInstance","collapseInitCallback","Collapse","showCollapseEvent","shownCollapseEvent","hideCollapseEvent","hiddenCollapseEvent","expandCollapse","parent","triggers","noop","setElementStyle","btn","ariaExpanded","collapseContent","collapseClickHandler","trigger","activeCollapse","activeCollapseInstance","dropdownMenuClasses","dropdownComponent","dropdownMenuClass","isEmptyAnchor","parentAnchor","hasAttribute","dropdownString","dropupString","dropstartString","dropendString","dropdownClasses","dropdownSelector","getDropdownInstance","dropdownInitCallback","Dropdown","dropdownMenuEndClass","verticalClass","horizontalClass","menuFocusTags","dropdownDefaults","showDropdownEvent","shownDropdownEvent","hideDropdownEvent","hiddenDropdownEvent","updatedDropdownEvent","styleDropdown","menu","parentElement","offset","getElementStyle","menuEnd","style","positionClass","dropdownMargin","dropdownPosition","menuWidth","menuHeight","clientWidth","clientHeight","getDocumentElement","targetLeft","targetTop","targetWidth","targetHeight","getBoundingClientRect","leftFullExceed","rightFullExceed","bottomExceed","bottomFullExceed","topExceed","leftExceed","rightExceed","posAjust","margins","getMenuItems","firstElementChild","toggleDropdownDismiss","dropdownDismissHandler","focusEvent","dropdownPreventScroll","keyupEvent","dropdownKeyHandler","scrollEvent","resizeEvent","ev","getWindow","dropdownLayoutHandler","getCurrentOpenDropdown","currentParent","type","isForm","mousedownEvent","dropdownClickHandler","keyArrowDown","keyArrowUp","activeElement","open","menuItems","focus","keyEscape","currentElement","currentInstance","modalString","modalComponent","offcanvasComponent","fixedTopClass","fixedBottomClass","stickyTopClass","positionStickyClass","getFixedItems","resetScrollbar","bd","getDocumentBody","fixedItems","fixed","measureScrollbar","innerWidth","setScrollbar","overflow","bodyPad","sbWidth","itemPadValue","itemMValue","offcanvasString","popupContainer","createElement","appendPopup","customContainer","containerIsBody","isNode","lookup","BODY","removePopup","hasPopup","backdropString","modalBackdropClass","offcanvasBackdropClass","modalActiveSelector","offcanvasActiveSelector","overlay","getCurrentOpen","toggleOverlayType","isModal","targetClass","appendOverlay","hasFade","showOverlay","hideOverlay","removeOverlay","isVisible","modalSelector","modalToggleSelector","modalDismissSelector","modalStaticClass","modalDefaults","getModalInstance","modalInitCallback","Modal","showModalEvent","shownModalEvent","hideModalEvent","hiddenModalEvent","setModalScrollbar","scrollbarWidth","scrollHeight","modalHeight","modalScrollHeight","modalOverflow","padStyle","toggleModalDismiss","update","modalDismissHandler","modalKeyHandler","afterModalHide","relatedTarget","focusElement","toggleFocusTrap","afterModalShow","beforeModalShow","removeAttribute","ariaHidden","ariaModal","beforeModalHide","modalClickHandler","currentTarget","isStatic","modalDialog","backdrop","selectedText","targetInsideDialog","staticTransitionEnd","duration","overlayDelay","currentOpen","that","callback","offcanvasSelector","offcanvasToggleSelector","offcanvasDismissSelector","offcanvasTogglingClass","offcanvasDefaults","getOffcanvasInstance","offcanvasInitCallback","Offcanvas","showOffcanvasEvent","shownOffcanvasEvent","hideOffcanvasEvent","hiddenOffcanvasEvent","setOffCanvasScrollbar","toggleOffCanvasDismiss","offcanvasKeyDismissHandler","offcanvasDismissHandler","beforeOffcanvasShow","showOffcanvasComplete","beforeOffcanvasHide","hideOffcanvasComplete","offcanvasTriggerHandler","offCanvasDismiss","selection","visibleTrigger","isOpen","popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","body","tipClassPositions","styleTip","tipClasses","tooltip","container","tipPositions","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","placement","parentCWidth","parentOWidth","fixedParent","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","horizontals","verticals","updatedTooltipEvent","toLowerCase","tooltipDefaults","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","dirty","isFunction","tempDocument","isNodeList","isArray","createTip","id","title","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","tooltipHeader","tooltipBody","tempTitle","tempContent","tempBtn","getElementContainer","majorBlockTags","containers","parentNode","getParentNode","isShadowRoot","isTableElement","tooltipSelector","titleAttr","getTooltipInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","ariaDescribedBy","hasTip","disposeTooltipComplete","toggleTooltipTitle","toggleTooltipAction","tooltipShownAction","shownTooltipEvent","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","offsetHeight","parentModal","parentOffcanvas","win","scrollTarget","titleAtt","tr","mousehoverEvent","focusinEvent","focusoutEvent","isApple","tipComponent","elem","getUID","position","outTimer","tipContainer","showTooltipEvent","delay","hideTooltipEvent","enabled","popoverSelector","popoverDefaults","getPopoverInstance","popoverInitCallback","Popover","scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","updateSpyTargets","itemsLength","isWin","isWindow","links","getElementsByTagName","scrollHEIGHT","getScrollHeight","href","targetItem","rect","getOffsetHeight","link","clear","item","activate","parents","parentItem","menuItem","parentLink","scrollTop","maxScroll","items","newActiveItem","offsets","tabString","tabComponent","tabSelector","getTabInstance","tabInitCallback","Tab","showTabEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","tabContent","nav","triggerTabShow","nextContent","tab","currentHeight","nextHeight","triggerTabHide","getActiveTab","activeTabs","getParentDropdown","dropdown","tabClickHandler","firstTab","firstTabContent","ariaSelected","activeDropdown","toggleTab","toastString","toastComponent","toastSelector","toastDismissSelector","toastToggleSelector","showingClass","hideClass","toastDefaults","getToastInstance","toastInitCallback","Toast","showToastEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","hideToastComplete","hideToast","showToast","toastClickHandler","interactiveToastHandler","isShown","hide","componentsList","initComponentDataAPI","collection","removeComponentDataAPI","component","context","compData","instance","initCallback","lookUp","elemCollection","cs","init","selector","removeDataAPI","comp"],"mappings":"sNAAoD,MAAAA,GAAK,mBAAoBC,GAAK,gBAAuCC,GAAI,cAA0DC,GAAK,aAAcC,GAAK,eAAgBC,GAAK,gBAAyLC,GAAI,mBAAyDC,GAAK,QAASC,GAAK,UAAWC,GAAK,WAA0EC,G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N,CAAM,CAAA,CACnD,CACH,EAGA,OAAI,SAAS,KAAmBD,KAE9B1iB,EAAY,SAAU,mBAAoB,IAAM0iB,GAAA,EAAgB,CAC9D,KAAM,EAAA,CACP","x_google_ignoreList":[0,1]} \ No newline at end of file diff --git a/package.json b/package.json index 003d5dd2..25a164a9 100644 --- a/package.json +++ b/package.json @@ -76,24 +76,21 @@ } }, "scripts": { - "format": "prettier --write \"src/**/*.ts\"", "pre-test": "pnpm clean-coverage", "dev": "vite --open ./docs/index-dev.html --port 8577", "test": "pnpm pre-test && vitest --config vitest.config.mts", "test-ui": "pnpm pre-test && vitest --config vitest.config-ui.mts --browser=chrome", "clean-coverage": "rm -rf coverage .nyc_output", - "badges": "npx -p dependency-version-badge update-badge typescript eslint vitest vite", + "badges": "npx -p dependency-version-badge update-badge typescript vitest vite", "build": "pnpm build-vite && pnpm build-components && pnpm dts && pnpm copy-docs", "build-vite-with-dts": "vite build && pnpm copy-docs", "build-vite": "vite build && pnpm copy-docs", "build-components": "vite build --config vite.config.components.mts", "dts": "dts-bundle-generator --config ./dts.config.cjs --project ./tsconfig.json", "copy-docs": "cp dist/bootstrap-native.js docs/assets/js/bootstrap-native.js && cp dist/bootstrap-native.js.map docs/assets/js/bootstrap-native.js.map", - "lint": "pnpm lint:ts && pnpm check:ts", + "lint": "deno lint src && pnpm check:ts", "check:ts": "tsc --noEmit", - "lint:ts": "eslint -c .eslintrc.cjs --ext .ts src", - "fix:ts": "eslint -c .eslintrc.cjs --ext .ts src --fix", - "prepublishOnly": "pnpm up && pnpm lint && pnpm format && pnpm build && pnpm badges" + "prepublishOnly": "pnpm up && pnpm lint && deno fmt src && pnpm build && pnpm badges" }, "bugs": { "url": "https://github.com/thednp/bootstrap.native/issues" @@ -124,11 +121,7 @@ "@vitest/coverage-istanbul": "^2.1.3", "@vitest/ui": "^2.1.3", "dts-bundle-generator": "^9.5.1", - "eslint": "^8.57.1", - "eslint-plugin-jsdoc": "^46.10.1", - "eslint-plugin-prefer-arrow": "^1.2.3", - "eslint-plugin-prettier": "^4.2.1", - "playwright": "^1.48.1", + "playwright": "^1.48.2", "prettier": "^2.8.8", "typescript": "^5.6.3", "vite": "^5.4.10", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0fe8c530..6ff4f034 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,7 +26,7 @@ importers: version: 5.62.0(eslint@8.57.1)(typescript@5.6.3) '@vitest/browser': specifier: ^2.1.3 - version: 2.1.3(@types/node@20.17.1)(@vitest/spy@2.1.3)(playwright@1.48.1)(typescript@5.6.3)(vite@5.4.10(@types/node@20.17.1)(terser@5.33.0))(vitest@2.1.3) + version: 2.1.3(@types/node@20.17.1)(@vitest/spy@2.1.3)(playwright@1.48.2)(typescript@5.6.3)(vite@5.4.10(@types/node@20.17.1)(terser@5.33.0))(vitest@2.1.3) '@vitest/coverage-istanbul': specifier: ^2.1.3 version: 2.1.3(vitest@2.1.3(@types/node@20.17.1)(@vitest/browser@2.1.3)(@vitest/ui@2.1.3)(msw@2.5.1(@types/node@20.17.1)(typescript@5.6.3))(terser@5.33.0)) @@ -36,21 +36,9 @@ importers: dts-bundle-generator: specifier: ^9.5.1 version: 9.5.1 - eslint: - specifier: ^8.57.1 - version: 8.57.1 - eslint-plugin-jsdoc: - specifier: ^46.10.1 - version: 46.10.1(eslint@8.57.1) - eslint-plugin-prefer-arrow: - specifier: ^1.2.3 - version: 1.2.3(eslint@8.57.1) - eslint-plugin-prettier: - specifier: ^4.2.1 - version: 4.2.1(eslint@8.57.1)(prettier@2.8.8) playwright: - specifier: ^1.48.1 - version: 1.48.1 + specifier: ^1.48.2 + version: 1.48.2 prettier: specifier: ^2.8.8 version: 2.8.8 @@ -116,8 +104,8 @@ packages: resolution: {integrity: sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==} engines: {node: '>=6.9.0'} - '@babel/parser@7.26.0': - resolution: {integrity: sha512-aP8x5pIw3xvYr/sXT+SEUwyhrXT8rUJRZltK/qN3Db80dcKpTett8cJxHyjk+xYSVXvNnl2SfcJVjbwxpOSscA==} + '@babel/parser@7.26.1': + resolution: {integrity: sha512-reoQYNiAJreZNsJzyrDNzFQ+IQ5JFiIzAHJg9bn94S3l+4++J7RsIhNMoB+lgP/9tpmiAQqspv+xfdxTSzREOw==} engines: {node: '>=6.0.0'} hasBin: true @@ -146,10 +134,6 @@ packages: '@bundled-es-modules/tough-cookie@0.1.6': resolution: {integrity: sha512-dvMHbL464C0zI+Yqxbz6kZ5TOEp7GLW+pry/RWndAR8MJQAXZ2rPmIs8tziTZjeIyhSNZgZbCePtfSbdWqStJw==} - '@es-joy/jsdoccomment@0.41.0': - resolution: {integrity: sha512-aKUhyn1QI5Ksbqcr3fFJj16p99QdjUxXAEuFst1Z47DRyoiMwivIH9MV/ARcJOCXVjPfjITciej8ZD2O/6qUmw==} - engines: {node: '>=16'} - '@esbuild/aix-ppc64@0.21.5': resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} engines: {node: '>=12'} @@ -288,14 +272,14 @@ packages: cpu: [x64] os: [win32] - '@eslint-community/eslint-utils@4.4.0': - resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + '@eslint-community/eslint-utils@4.4.1': + resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.11.1': - resolution: {integrity: sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==} + '@eslint-community/regexpp@4.11.2': + resolution: {integrity: sha512-2WwyTYNVaMNUWPZTOJdkax9iqTdirrApgTbk+Qoq5EPX6myqZvG8QGFRgdKmkjKVG6/G/a565vpPauHk0+hpBA==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} '@eslint/eslintrc@2.1.4': @@ -319,12 +303,14 @@ packages: resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} deprecated: Use @eslint/object-schema instead - '@inquirer/confirm@5.0.0': - resolution: {integrity: sha512-6QEzj6bZg8atviRIL+pR0tODC854cYSjvZxkyCarr8DVaOJPEyuGys7GmEG3W0Rb8kKSQec7P6okt0sJvNneFw==} + '@inquirer/confirm@5.0.1': + resolution: {integrity: sha512-6ycMm7k7NUApiMGfVc32yIPp28iPKxhGRMqoNDiUjq2RyTAkbs5Fx0TdzBqhabcKvniDdAAvHCmsRjnNfTsogw==} engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' - '@inquirer/core@10.0.0': - resolution: {integrity: sha512-7dwoKCGvgZGHWTZfOj2KLmbIAIdiXP9NTrwGaTO/XDfKMEmyBahZpnombiG6JDHmiOrmK3GLEJRXrWExXCDLmQ==} + '@inquirer/core@10.0.1': + resolution: {integrity: sha512-KKTgjViBQUi3AAssqjUFMnMO3CM3qwCHvePV9EW+zTKGKafFGFF01sc1yOIYjLJ7QU52G/FbzKc+c01WLzXmVQ==} engines: {node: '>=18'} '@inquirer/figures@1.0.7': @@ -673,10 +659,6 @@ packages: resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} engines: {node: '>=12'} - are-docs-informative@0.0.2: - resolution: {integrity: sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==} - engines: {node: '>=14'} - argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} @@ -712,10 +694,6 @@ packages: buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - builtin-modules@3.3.0: - resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} - engines: {node: '>=6'} - cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} @@ -724,8 +702,8 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - caniuse-lite@1.0.30001669: - resolution: {integrity: sha512-DlWzFDJqstqtIVx1zeSpIMLjunf5SmwOw0N2Ck/QSQdS8PLS4+9HrLaYei4w8BIAL7IB/UEDu889d8vhCTPA0w==} + caniuse-lite@1.0.30001671: + resolution: {integrity: sha512-jocyVaSSfXg2faluE6hrWkMgDOiULBMca4QLtDT39hw1YxaIPHWc1CcTCKkPmHgGH6tKji6ZNbMSmUAvENf2/A==} chai@5.1.2: resolution: {integrity: sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==} @@ -757,10 +735,6 @@ packages: commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - comment-parser@1.4.1: - resolution: {integrity: sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==} - engines: {node: '>= 12.0.0'} - concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} @@ -814,8 +788,8 @@ packages: eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - electron-to-chromium@1.5.45: - resolution: {integrity: sha512-vOzZS6uZwhhbkZbcRyiy99Wg+pYFV5hk+5YaECvx0+Z31NR3Tt5zS6dze2OepT6PCTzVzT0dIJItti+uAW5zmw==} + electron-to-chromium@1.5.47: + resolution: {integrity: sha512-zS5Yer0MOYw4rtK2iq43cJagHZ8sXN0jDHDKzB+86gSBSAI4v07S97mcq+Gs2vclAxSh1j7vOAHxSVgduiiuVQ==} emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -836,28 +810,6 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - eslint-plugin-jsdoc@46.10.1: - resolution: {integrity: sha512-x8wxIpv00Y50NyweDUpa+58ffgSAI5sqe+zcZh33xphD0AVh+1kqr1ombaTRb7Fhpove1zfUuujlX9DWWBP5ag==} - engines: {node: '>=16'} - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 - - eslint-plugin-prefer-arrow@1.2.3: - resolution: {integrity: sha512-J9I5PKCOJretVuiZRGvPQxCbllxGAV/viI20JO3LYblAodofBxyMnZAJ+WGeClHgANnSJberTNoFWWjrWKBuXQ==} - peerDependencies: - eslint: '>=2.0.0' - - eslint-plugin-prettier@4.2.1: - resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} - engines: {node: '>=12.0.0'} - peerDependencies: - eslint: '>=7.28.0' - eslint-config-prettier: '*' - prettier: '>=2.0.0' - peerDependenciesMeta: - eslint-config-prettier: - optional: true - eslint-scope@5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} @@ -906,9 +858,6 @@ packages: fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - fast-diff@1.3.0: - resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} - fast-glob@3.3.2: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} @@ -1041,10 +990,6 @@ packages: inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - is-builtin-module@3.2.1: - resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} - engines: {node: '>=6'} - is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -1101,10 +1046,6 @@ packages: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true - jsdoc-type-pratt-parser@4.0.0: - resolution: {integrity: sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==} - engines: {node: '>=12.0.0'} - jsesc@3.0.2: resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} engines: {node: '>=6'} @@ -1281,13 +1222,13 @@ packages: resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} engines: {node: '>=12'} - playwright-core@1.48.1: - resolution: {integrity: sha512-Yw/t4VAFX/bBr1OzwCuOMZkY1Cnb4z/doAFSwf4huqAGWmf9eMNjmK7NiOljCdLmxeRYcGPPmcDgU0zOlzP0YA==} + playwright-core@1.48.2: + resolution: {integrity: sha512-sjjw+qrLFlriJo64du+EK0kJgZzoQPsabGF4lBvsid+3CNIZIYLgnMj9V6JY5VhM2Peh20DJWIVpVljLLnlawA==} engines: {node: '>=18'} hasBin: true - playwright@1.48.1: - resolution: {integrity: sha512-j8CiHW/V6HxmbntOfyB4+T/uk08tBy6ph0MpBXwuoofkSnLmlfdYNNkFTYD6ofzzlSqLA1fwH4vwvVFvJgLN0w==} + playwright@1.48.2: + resolution: {integrity: sha512-NjYvYgp4BPmiwfe31j4gHLa3J7bD2WiBz8Lk2RoSsmX38SVIARZ18VYjxLjAcDsAhA+F4iSEXTSGgjua0rrlgQ==} engines: {node: '>=18'} hasBin: true @@ -1299,10 +1240,6 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - prettier-linter-helpers@1.0.0: - resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} - engines: {node: '>=6.0.0'} - prettier@2.8.8: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} @@ -1402,15 +1339,6 @@ packages: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} - spdx-exceptions@2.5.0: - resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} - - spdx-expression-parse@4.0.0: - resolution: {integrity: sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==} - - spdx-license-ids@3.0.20: - resolution: {integrity: sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==} - stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} @@ -1691,7 +1619,7 @@ snapshots: '@babel/helper-compilation-targets': 7.25.9 '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) '@babel/helpers': 7.26.0 - '@babel/parser': 7.26.0 + '@babel/parser': 7.26.1 '@babel/template': 7.25.9 '@babel/traverse': 7.25.9 '@babel/types': 7.26.0 @@ -1705,7 +1633,7 @@ snapshots: '@babel/generator@7.26.0': dependencies: - '@babel/parser': 7.26.0 + '@babel/parser': 7.26.1 '@babel/types': 7.26.0 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 @@ -1746,7 +1674,7 @@ snapshots: '@babel/template': 7.25.9 '@babel/types': 7.26.0 - '@babel/parser@7.26.0': + '@babel/parser@7.26.1': dependencies: '@babel/types': 7.26.0 @@ -1757,14 +1685,14 @@ snapshots: '@babel/template@7.25.9': dependencies: '@babel/code-frame': 7.26.0 - '@babel/parser': 7.26.0 + '@babel/parser': 7.26.1 '@babel/types': 7.26.0 '@babel/traverse@7.25.9': dependencies: '@babel/code-frame': 7.26.0 '@babel/generator': 7.26.0 - '@babel/parser': 7.26.0 + '@babel/parser': 7.26.1 '@babel/template': 7.25.9 '@babel/types': 7.26.0 debug: 4.3.7 @@ -1790,12 +1718,6 @@ snapshots: '@types/tough-cookie': 4.0.5 tough-cookie: 4.1.4 - '@es-joy/jsdoccomment@0.41.0': - dependencies: - comment-parser: 1.4.1 - esquery: 1.6.0 - jsdoc-type-pratt-parser: 4.0.0 - '@esbuild/aix-ppc64@0.21.5': optional: true @@ -1865,12 +1787,12 @@ snapshots: '@esbuild/win32-x64@0.21.5': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@8.57.1)': + '@eslint-community/eslint-utils@4.4.1(eslint@8.57.1)': dependencies: eslint: 8.57.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.11.1': {} + '@eslint-community/regexpp@4.11.2': {} '@eslint/eslintrc@2.1.4': dependencies: @@ -1900,14 +1822,13 @@ snapshots: '@humanwhocodes/object-schema@2.0.3': {} - '@inquirer/confirm@5.0.0(@types/node@20.17.1)': + '@inquirer/confirm@5.0.1(@types/node@20.17.1)': dependencies: - '@inquirer/core': 10.0.0(@types/node@20.17.1) + '@inquirer/core': 10.0.1(@types/node@20.17.1) '@inquirer/type': 3.0.0(@types/node@20.17.1) - transitivePeerDependencies: - - '@types/node' + '@types/node': 20.17.1 - '@inquirer/core@10.0.0(@types/node@20.17.1)': + '@inquirer/core@10.0.1(@types/node@20.17.1)': dependencies: '@inquirer/figures': 1.0.7 '@inquirer/type': 3.0.0(@types/node@20.17.1) @@ -2083,7 +2004,7 @@ snapshots: '@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3)': dependencies: - '@eslint-community/regexpp': 4.11.1 + '@eslint-community/regexpp': 4.11.2 '@typescript-eslint/parser': 5.62.0(eslint@8.57.1)(typescript@5.6.3) '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/type-utils': 5.62.0(eslint@8.57.1)(typescript@5.6.3) @@ -2147,7 +2068,7 @@ snapshots: '@typescript-eslint/utils@5.62.0(eslint@8.57.1)(typescript@5.6.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 5.62.0 @@ -2167,7 +2088,7 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@vitest/browser@2.1.3(@types/node@20.17.1)(@vitest/spy@2.1.3)(playwright@1.48.1)(typescript@5.6.3)(vite@5.4.10(@types/node@20.17.1)(terser@5.33.0))(vitest@2.1.3)': + '@vitest/browser@2.1.3(@types/node@20.17.1)(@vitest/spy@2.1.3)(playwright@1.48.2)(typescript@5.6.3)(vite@5.4.10(@types/node@20.17.1)(terser@5.33.0))(vitest@2.1.3)': dependencies: '@testing-library/dom': 10.4.0 '@testing-library/user-event': 14.5.2(@testing-library/dom@10.4.0) @@ -2180,7 +2101,7 @@ snapshots: vitest: 2.1.3(@types/node@20.17.1)(@vitest/browser@2.1.3)(@vitest/ui@2.1.3)(msw@2.5.1(@types/node@20.17.1)(typescript@5.6.3))(terser@5.33.0) ws: 8.18.0 optionalDependencies: - playwright: 1.48.1 + playwright: 1.48.2 transitivePeerDependencies: - '@types/node' - '@vitest/spy' @@ -2286,8 +2207,6 @@ snapshots: ansi-styles@6.2.1: {} - are-docs-informative@0.0.2: {} - argparse@2.0.1: {} aria-query@5.3.0: @@ -2315,21 +2234,19 @@ snapshots: browserslist@4.24.2: dependencies: - caniuse-lite: 1.0.30001669 - electron-to-chromium: 1.5.45 + caniuse-lite: 1.0.30001671 + electron-to-chromium: 1.5.47 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.2) buffer-from@1.1.2: optional: true - builtin-modules@3.3.0: {} - cac@6.7.14: {} callsites@3.1.0: {} - caniuse-lite@1.0.30001669: {} + caniuse-lite@1.0.30001671: {} chai@5.1.2: dependencies: @@ -2363,8 +2280,6 @@ snapshots: commander@2.20.3: optional: true - comment-parser@1.4.1: {} - concat-map@0.0.1: {} convert-source-map@2.0.0: {} @@ -2404,7 +2319,7 @@ snapshots: eastasianwidth@0.2.0: {} - electron-to-chromium@1.5.45: {} + electron-to-chromium@1.5.47: {} emoji-regex@8.0.0: {} @@ -2440,31 +2355,6 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-plugin-jsdoc@46.10.1(eslint@8.57.1): - dependencies: - '@es-joy/jsdoccomment': 0.41.0 - are-docs-informative: 0.0.2 - comment-parser: 1.4.1 - debug: 4.3.7 - escape-string-regexp: 4.0.0 - eslint: 8.57.1 - esquery: 1.6.0 - is-builtin-module: 3.2.1 - semver: 7.6.3 - spdx-expression-parse: 4.0.0 - transitivePeerDependencies: - - supports-color - - eslint-plugin-prefer-arrow@1.2.3(eslint@8.57.1): - dependencies: - eslint: 8.57.1 - - eslint-plugin-prettier@4.2.1(eslint@8.57.1)(prettier@2.8.8): - dependencies: - eslint: 8.57.1 - prettier: 2.8.8 - prettier-linter-helpers: 1.0.0 - eslint-scope@5.1.1: dependencies: esrecurse: 4.3.0 @@ -2479,8 +2369,8 @@ snapshots: eslint@8.57.1: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - '@eslint-community/regexpp': 4.11.1 + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) + '@eslint-community/regexpp': 4.11.2 '@eslint/eslintrc': 2.1.4 '@eslint/js': 8.57.1 '@humanwhocodes/config-array': 0.13.0 @@ -2546,8 +2436,6 @@ snapshots: fast-deep-equal@3.1.3: {} - fast-diff@1.3.0: {} - fast-glob@3.3.2: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -2675,10 +2563,6 @@ snapshots: inherits@2.0.4: {} - is-builtin-module@3.2.1: - dependencies: - builtin-modules: 3.3.0 - is-extglob@2.1.1: {} is-fullwidth-code-point@3.0.0: {} @@ -2700,7 +2584,7 @@ snapshots: istanbul-lib-instrument@6.0.3: dependencies: '@babel/core': 7.26.0 - '@babel/parser': 7.26.0 + '@babel/parser': 7.26.1 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 semver: 7.6.3 @@ -2738,8 +2622,6 @@ snapshots: dependencies: argparse: 2.0.1 - jsdoc-type-pratt-parser@4.0.0: {} - jsesc@3.0.2: {} json-buffer@3.0.1: {} @@ -2781,7 +2663,7 @@ snapshots: magicast@0.3.5: dependencies: - '@babel/parser': 7.26.0 + '@babel/parser': 7.26.1 '@babel/types': 7.26.0 source-map-js: 1.2.1 @@ -2815,7 +2697,7 @@ snapshots: '@bundled-es-modules/cookie': 2.0.0 '@bundled-es-modules/statuses': 1.0.1 '@bundled-es-modules/tough-cookie': 0.1.6 - '@inquirer/confirm': 5.0.0(@types/node@20.17.1) + '@inquirer/confirm': 5.0.1(@types/node@20.17.1) '@mswjs/interceptors': 0.36.6 '@open-draft/until': 2.1.0 '@types/cookie': 0.6.0 @@ -2898,11 +2780,11 @@ snapshots: picomatch@4.0.2: {} - playwright-core@1.48.1: {} + playwright-core@1.48.2: {} - playwright@1.48.1: + playwright@1.48.2: dependencies: - playwright-core: 1.48.1 + playwright-core: 1.48.2 optionalDependencies: fsevents: 2.3.2 @@ -2914,10 +2796,6 @@ snapshots: prelude-ls@1.2.1: {} - prettier-linter-helpers@1.0.0: - dependencies: - fast-diff: 1.3.0 - prettier@2.8.8: {} pretty-format@27.5.1: @@ -3009,15 +2887,6 @@ snapshots: source-map@0.6.1: optional: true - spdx-exceptions@2.5.0: {} - - spdx-expression-parse@4.0.0: - dependencies: - spdx-exceptions: 2.5.0 - spdx-license-ids: 3.0.20 - - spdx-license-ids@3.0.20: {} - stackback@0.0.2: {} statuses@2.0.1: {} @@ -3184,7 +3053,7 @@ snapshots: why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 20.17.1 - '@vitest/browser': 2.1.3(@types/node@20.17.1)(@vitest/spy@2.1.3)(playwright@1.48.1)(typescript@5.6.3)(vite@5.4.10(@types/node@20.17.1)(terser@5.33.0))(vitest@2.1.3) + '@vitest/browser': 2.1.3(@types/node@20.17.1)(@vitest/spy@2.1.3)(playwright@1.48.2)(typescript@5.6.3)(vite@5.4.10(@types/node@20.17.1)(terser@5.33.0))(vitest@2.1.3) '@vitest/ui': 2.1.3(vitest@2.1.3) transitivePeerDependencies: - less diff --git a/src/components/alert.ts b/src/components/alert.ts index f8ef1695..258c18de 100644 --- a/src/components/alert.ts +++ b/src/components/alert.ts @@ -9,18 +9,18 @@ import { mouseclickEvent, querySelector, removeClass, -} from '@thednp/shorty'; +} from "@thednp/shorty"; -import { addListener, removeListener } from '@thednp/event-listener'; +import { addListener, removeListener } from "@thednp/event-listener"; -import fadeClass from '../strings/fadeClass'; -import showClass from '../strings/showClass'; -import dataBsDismiss from '../strings/dataBsDismiss'; -import alertString from '../strings/alertString'; -import alertComponent from '../strings/alertComponent'; -import type { AlertEvent } from '../interface/alert'; +import fadeClass from "../strings/fadeClass"; +import showClass from "../strings/showClass"; +import dataBsDismiss from "../strings/dataBsDismiss"; +import alertString from "../strings/alertString"; +import alertComponent from "../strings/alertComponent"; +import type { AlertEvent } from "../interface/alert"; -import BaseComponent from './base-component'; +import BaseComponent from "./base-component"; // ALERT PRIVATE GC // ================ @@ -31,7 +31,8 @@ const alertDismissSelector = `[${dataBsDismiss}="${alertString}"]`; * Static method which returns an existing `Alert` instance associated * to a target `Element`. */ -const getAlertInstance = (element: HTMLElement) => getInstance(element, alertComponent); +const getAlertInstance = (element: HTMLElement) => + getInstance(element, alertComponent); /** * An `Alert` initialization callback. @@ -40,8 +41,12 @@ const alertInitCallback = (element: HTMLElement) => new Alert(element); // ALERT CUSTOM EVENTS // =================== -const closeAlertEvent = createCustomEvent, AlertEvent>(`close.bs.${alertString}`); -const closedAlertEvent = createCustomEvent, AlertEvent>(`closed.bs.${alertString}`); +const closeAlertEvent = createCustomEvent, AlertEvent>( + `close.bs.${alertString}`, +); +const closedAlertEvent = createCustomEvent, AlertEvent>( + `closed.bs.${alertString}`, +); // ALERT EVENT HANDLER // =================== diff --git a/src/components/base-component.ts b/src/components/base-component.ts index 01c2a6e5..dd337324 100644 --- a/src/components/base-component.ts +++ b/src/components/base-component.ts @@ -1,9 +1,16 @@ /* Native JavaScript for Bootstrap 5 | Base Component ----------------------------------------------------- */ -import { Data, isHTMLElement, isString, normalizeOptions, ObjectKeys, querySelector } from '@thednp/shorty'; +import { + Data, + isHTMLElement, + isString, + normalizeOptions, + ObjectKeys, + querySelector, +} from "@thednp/shorty"; -import type { BaseOptions } from '../interface/baseComponent'; -import Version from '../version'; +import type { BaseOptions } from "../interface/baseComponent"; +import Version from "../version"; /** Returns a new `BaseComponent` instance. */ export default class BaseComponent { @@ -40,11 +47,10 @@ export default class BaseComponent { } this.element = element; - this.options = - this.defaults && ObjectKeys(this.defaults).length - ? normalizeOptions(element, this.defaults, config || {}, 'bs') - : // istanbul ignore next @preserve - {}; + this.options = this.defaults && ObjectKeys(this.defaults).length + ? normalizeOptions(element, this.defaults, config || {}, "bs") + // istanbul ignore next @preserve + : {}; Data.set(element, this.name, this); } @@ -56,7 +62,7 @@ export default class BaseComponent { // istanbul ignore next @preserve get name() { - return 'BaseComponent'; + return "BaseComponent"; } // istanbul ignore next @preserve @@ -73,7 +79,7 @@ export default class BaseComponent { /** Removes component from target element. */ dispose() { Data.remove(this.element, this.name); - ObjectKeys(this).forEach(prop => { + ObjectKeys(this).forEach((prop) => { delete this[prop]; }); } diff --git a/src/components/button.ts b/src/components/button.ts index 775961f7..080fab51 100644 --- a/src/components/button.ts +++ b/src/components/button.ts @@ -9,16 +9,16 @@ import { mouseclickEvent, removeClass, setAttribute, -} from '@thednp/shorty'; +} from "@thednp/shorty"; -import { addListener, removeListener } from '@thednp/event-listener'; +import { addListener, removeListener } from "@thednp/event-listener"; -import activeClass from '../strings/activeClass'; -import dataBsToggle from '../strings/dataBsToggle'; -import buttonString from '../strings/buttonString'; -import buttonComponent from '../strings/buttonComponent'; +import activeClass from "../strings/activeClass"; +import dataBsToggle from "../strings/dataBsToggle"; +import buttonString from "../strings/buttonString"; +import buttonComponent from "../strings/buttonComponent"; -import BaseComponent from './base-component'; +import BaseComponent from "./base-component"; // BUTTON PRIVATE GC // ================= @@ -28,7 +28,8 @@ const buttonSelector = `[${dataBsToggle}="${buttonString}"]`; * Static method which returns an existing `Button` instance associated * to a target `Element`. */ -const getButtonInstance = (element: HTMLElement) => getInstance', }); @@ -28,7 +29,8 @@ const popoverDefaults: PopoverOptions = ObjectAssign({}, tooltipDefaults, { * Static method which returns an existing `Popover` instance associated * to a target `Element`. */ -const getPopoverInstance = (element: HTMLElement) => getInstance(element, popoverComponent); +const getPopoverInstance = (element: HTMLElement) => + getInstance(element, popoverComponent); /** * A `Popover` initialization callback. diff --git a/src/components/scrollspy.ts b/src/components/scrollspy.ts index 1a825213..2e86554e 100644 --- a/src/components/scrollspy.ts +++ b/src/components/scrollspy.ts @@ -19,16 +19,16 @@ import { querySelector, removeClass, scrollEvent, -} from '@thednp/shorty'; +} from "@thednp/shorty"; -import { addListener, removeListener } from '@thednp/event-listener'; +import { addListener, removeListener } from "@thednp/event-listener"; -import activeClass from '../strings/activeClass'; -import scrollspyString from '../strings/scrollspyString'; -import scrollspyComponent from '../strings/scrollspyComponent'; +import activeClass from "../strings/activeClass"; +import scrollspyString from "../strings/scrollspyString"; +import scrollspyComponent from "../strings/scrollspyComponent"; -import BaseComponent from './base-component'; -import { ScrollSpyEvent, ScrollSpyOptions } from '../interface/scrollspy'; +import BaseComponent from "./base-component"; +import { ScrollSpyEvent, ScrollSpyOptions } from "../interface/scrollspy"; // SCROLLSPY PRIVATE GC // ==================== @@ -47,7 +47,8 @@ type ScrollSpyEventProps = { * Static method which returns an existing `ScrollSpy` instance associated * to a target `Element`. */ -const getScrollSpyInstance = (element: HTMLElement) => getInstance(element, scrollspyComponent); +const getScrollSpyInstance = (element: HTMLElement) => + getInstance(element, scrollspyComponent); /** * A `ScrollSpy` initialization callback. @@ -56,7 +57,10 @@ const scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element); // SCROLLSPY CUSTOM EVENT // ====================== -const activateScrollSpy = createCustomEvent(`activate.bs.${scrollspyString}`); +const activateScrollSpy = createCustomEvent< + ScrollSpyEventProps, + ScrollSpyEvent +>(`activate.bs.${scrollspyString}`); // SCROLLSPY PRIVATE METHODS // ========================= @@ -66,21 +70,26 @@ const activateScrollSpy = createCustomEvent * @param self the `ScrollSpy` instance */ const updateSpyTargets = (self: ScrollSpy) => { - const { target, scrollTarget, options, itemsLength, scrollHeight, element } = self; + const { target, scrollTarget, options, itemsLength, scrollHeight, element } = + self; const { offset } = options; const isWin = isWindow(scrollTarget as Node | Window); - const links = target && getElementsByTagName('A', target); + const links = target && getElementsByTagName("A", target); const scrollHEIGHT = scrollTarget ? getScrollHeight(scrollTarget) - : // istanbul ignore next @preserve - scrollHeight; + // istanbul ignore next @preserve + : scrollHeight; - self.scrollTop = isWin ? (scrollTarget as Window).scrollY : (scrollTarget as HTMLElement).scrollTop; + self.scrollTop = isWin + ? (scrollTarget as Window).scrollY + : (scrollTarget as HTMLElement).scrollTop; // only update items/offsets once or with each mutation // istanbul ignore else @preserve - if (links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)) { + if ( + links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length) + ) { let href; let targetItem; let rect; @@ -91,15 +100,17 @@ const updateSpyTargets = (self: ScrollSpy) => { self.scrollHeight = scrollHEIGHT; self.maxScroll = self.scrollHeight - getOffsetHeight(self); - [...links].forEach(link => { - href = getAttribute(link, 'href'); - targetItem = - href && href.charAt(0) === '#' && href.slice(-1) !== '#' && querySelector(href, getDocument(element)); + [...links].forEach((link) => { + href = getAttribute(link, "href"); + targetItem = href && href.charAt(0) === "#" && href.slice(-1) !== "#" && + querySelector(href, getDocument(element)); if (targetItem) { self.items.push(link); rect = getBoundingClientRect(targetItem); - self.offsets.push((isWin ? rect.top + self.scrollTop : targetItem.offsetTop) - offset); + self.offsets.push( + (isWin ? rect.top + self.scrollTop : targetItem.offsetTop) - offset, + ); } }); self.itemsLength = self.items.length; @@ -124,7 +135,9 @@ const getScrollHeight = (scrollTarget: Node | Window) => { * @param params the `ScrollSpy` instance */ const getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => { - return isWindow(scrollTarget as Node) ? (scrollTarget as Window).innerHeight : getBoundingClientRect(element).height; + return isWindow(scrollTarget as Node) + ? (scrollTarget as Window).innerHeight + : getBoundingClientRect(element).height; }; /** @@ -133,7 +146,7 @@ const getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => { * @param target a single item */ const clear = (target: HTMLElement) => { - [...getElementsByTagName('A', target)].forEach(item => { + [...getElementsByTagName("A", target)].forEach((item) => { if (hasClass(item, activeClass)) removeClass(item, activeClass); }); }; @@ -158,12 +171,12 @@ const activate = (self: ScrollSpy, item: HTMLElement) => { let parentItem = item; while (parentItem !== getDocumentBody(element)) { parentItem = parentItem.parentElement as HTMLElement; - if (hasClass(parentItem, 'nav') || hasClass(parentItem, 'dropdown-menu')) { + if (hasClass(parentItem, "nav") || hasClass(parentItem, "dropdown-menu")) { parents.push(parentItem); } } - parents.forEach(menuItem => { + parents.forEach((menuItem) => { const parentLink = menuItem.previousElementSibling as HTMLElement | null; // istanbul ignore else @preserve @@ -199,19 +212,27 @@ export default class ScrollSpy extends BaseComponent { * @param target the target element * @param config the instance options */ - constructor(target: HTMLElement | string, config?: Partial) { + constructor( + target: HTMLElement | string, + config?: Partial, + ) { super(target, config); // initialization element & options const { element, options } = this; // additional properties - this.target = querySelector(options.target as HTMLElement | string, getDocument(element)); + this.target = querySelector( + options.target as HTMLElement | string, + getDocument(element), + ); // invalidate if (this.target) { // set initial state - this.scrollTarget = element.clientHeight < element.scrollHeight ? element : getWindow(element); + this.scrollTarget = element.clientHeight < element.scrollHeight + ? element + : getWindow(element); this.scrollHeight = getScrollHeight(this.scrollTarget); // add event handlers @@ -273,7 +294,7 @@ export default class ScrollSpy extends BaseComponent { if ( activeItem !== item && scrollTop >= offsets[i] && - (typeof offsets[i + 1] === 'undefined' || scrollTop < offsets[i + 1]) + (typeof offsets[i + 1] === "undefined" || scrollTop < offsets[i + 1]) ) { activate(this, item); } @@ -288,7 +309,12 @@ export default class ScrollSpy extends BaseComponent { */ _toggleEventListeners = (add?: boolean) => { const action = add ? addListener : removeListener; - action(this.scrollTarget as EventTarget, scrollEvent, this.refresh, passiveHandler); + action( + this.scrollTarget as EventTarget, + scrollEvent, + this.refresh, + passiveHandler, + ); }; /** Removes `ScrollSpy` from the target element. */ diff --git a/src/components/tab.ts b/src/components/tab.ts index e007fb4a..fa828025 100644 --- a/src/components/tab.ts +++ b/src/components/tab.ts @@ -17,22 +17,22 @@ import { removeClass, setAttribute, Timer, -} from '@thednp/shorty'; +} from "@thednp/shorty"; -import { addListener, removeListener } from '@thednp/event-listener'; +import { addListener, removeListener } from "@thednp/event-listener"; -import collapsingClass from '../strings/collapsingClass'; -import activeClass from '../strings/activeClass'; -import fadeClass from '../strings/fadeClass'; -import showClass from '../strings/showClass'; -import dropdownClasses from '../strings/dropdownClasses'; -import dataBsToggle from '../strings/dataBsToggle'; -import tabString from '../strings/tabString'; -import tabComponent from '../strings/tabComponent'; +import collapsingClass from "../strings/collapsingClass"; +import activeClass from "../strings/activeClass"; +import fadeClass from "../strings/fadeClass"; +import showClass from "../strings/showClass"; +import dropdownClasses from "../strings/dropdownClasses"; +import dataBsToggle from "../strings/dataBsToggle"; +import tabString from "../strings/tabString"; +import tabComponent from "../strings/tabComponent"; -import getTargetElement from '../util/getTargetElement'; -import BaseComponent from './base-component'; -import type { /* TabOptions, */ TabEvent } from '../interface/tab'; +import getTargetElement from "../util/getTargetElement"; +import BaseComponent from "./base-component"; +import type { /* TabOptions, */ TabEvent } from "../interface/tab"; // TAB PRIVATE GC // ================ @@ -42,7 +42,8 @@ const tabSelector = `[${dataBsToggle}="${tabString}"]`; * Static method which returns an existing `Tab` instance associated * to a target `Element`. */ -const getTabInstance = (element: HTMLElement) => getInstance(element, tabComponent); +const getTabInstance = (element: HTMLElement) => + getInstance(element, tabComponent); /** A `Tab` initialization callback. */ const tabInitCallback = (element: HTMLElement) => new Tab(element); @@ -53,10 +54,18 @@ type TabEventProps = { // TAB CUSTOM EVENTS // ================= -const showTabEvent = createCustomEvent(`show.bs.${tabString}`); -const shownTabEvent = createCustomEvent(`shown.bs.${tabString}`); -const hideTabEvent = createCustomEvent(`hide.bs.${tabString}`); -const hiddenTabEvent = createCustomEvent(`hidden.bs.${tabString}`); +const showTabEvent = createCustomEvent( + `show.bs.${tabString}`, +); +const shownTabEvent = createCustomEvent( + `shown.bs.${tabString}`, +); +const hideTabEvent = createCustomEvent( + `hide.bs.${tabString}`, +); +const hiddenTabEvent = createCustomEvent( + `hidden.bs.${tabString}`, +); interface TabPrivate { tab: HTMLElement | null; @@ -83,7 +92,7 @@ const triggerTabEnd = (self: Tab) => { // istanbul ignore else @preserve if (tabContent && hasClass(tabContent, collapsingClass)) { - tabContent.style.height = ''; + tabContent.style.height = ""; removeClass(tabContent, collapsingClass); } @@ -98,11 +107,15 @@ const triggerTabEnd = (self: Tab) => { */ const triggerTabShow = (self: Tab) => { const { element, tabContent, content: nextContent, nav } = self; - const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) || { tab: null }; // istanbul ignore next @preserve + const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) || + // istanbul ignore next @preserve + { tab: null }; // istanbul ignore else @preserve if (tabContent && nextContent && hasClass(nextContent, fadeClass)) { - const { currentHeight, nextHeight } = tabPrivate.get(element) || { currentHeight: 0, nextHeight: 0 }; // istanbul ignore next @preserve + const { currentHeight, nextHeight } = tabPrivate.get(element) || + // istanbul ignore next @preserve + { currentHeight: 0, nextHeight: 0 }; // istanbul ignore else @preserve: vitest won't validate this branch if (currentHeight !== nextHeight) { // enables height animation @@ -128,23 +141,20 @@ const triggerTabShow = (self: Tab) => { */ const triggerTabHide = (self: Tab) => { const { element, content: nextContent, tabContent, nav } = self; - const { tab, content } = (nav && tabPrivate.get(nav)) || { + const { tab, content } = (nav && tabPrivate.get(nav)) || // istanbul ignore next @preserve - tab: null, - content: null, - }; + { tab: null, content: null }; let currentHeight = 0; // istanbul ignore else @preserve if (tabContent && nextContent && hasClass(nextContent, fadeClass)) { - [content, nextContent].forEach(c => { + [content, nextContent].forEach((c) => { // istanbul ignore else @preserve - if (isHTMLElement(c)) addClass(c, 'overflow-hidden'); + if (isHTMLElement(c)) addClass(c, "overflow-hidden"); }); currentHeight = isHTMLElement(content) - ? content.scrollHeight - : // istanbul ignore next @preserve - 0; + ? content.scrollHeight // istanbul ignore next @preserve + : 0; } // update relatedTarget and dispatch event @@ -172,9 +182,9 @@ const triggerTabHide = (self: Tab) => { addClass(tabContent, collapsingClass); tabContent.style.height = `${currentHeight}px`; reflow(tabContent); - [content, nextContent].forEach(c => { + [content, nextContent].forEach((c) => { // istanbul ignore else @preserve - if (c) removeClass(c, 'overflow-hidden'); + if (c) removeClass(c, "overflow-hidden"); }); } @@ -202,7 +212,9 @@ const triggerTabHide = (self: Tab) => { * @param self the `Tab` instance * @returns the query result */ -const getActiveTab = (self: Tab): { tab: HTMLElement | null; content: HTMLElement | null } => { +const getActiveTab = ( + self: Tab, +): { tab: HTMLElement | null; content: HTMLElement | null } => { const { nav } = self; // istanbul ignore next @preserve if (!isHTMLElement(nav as HTMLElement | undefined)) { @@ -212,12 +224,19 @@ const getActiveTab = (self: Tab): { tab: HTMLElement | null; content: HTMLElemen const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement); let tab: HTMLElement | null = null; // istanbul ignore else @preserve - if (activeTabs.length === 1 && !dropdownClasses.some(c => hasClass(activeTabs[0].parentElement as HTMLElement, c))) { + if ( + activeTabs.length === 1 && + !dropdownClasses.some((c) => + hasClass(activeTabs[0].parentElement as HTMLElement, c) + ) + ) { [tab] = activeTabs; } else if (activeTabs.length > 1) { tab = activeTabs[activeTabs.length - 1]; } - const content = isHTMLElement(tab as HTMLElement) ? getTargetElement(tab as HTMLElement) : null; + const content = isHTMLElement(tab as HTMLElement) + ? getTargetElement(tab as HTMLElement) + : null; return { tab, content }; }; @@ -230,8 +249,10 @@ const getActiveTab = (self: Tab): { tab: HTMLElement | null; content: HTMLElemen const getParentDropdown = (element?: HTMLElement): HTMLElement | null => { // istanbul ignore next @preserve if (!isHTMLElement(element)) return null; - const dropdown = closest(element, `.${dropdownClasses.join(',.')}`); - return dropdown ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown) : null; + const dropdown = closest(element, `.${dropdownClasses.join(",.")}`); + return dropdown + ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown) + : null; }; // TAB EVENT HANDLER @@ -275,8 +296,8 @@ export default class Tab extends BaseComponent { // no point initializing a tab without a corresponding content // istanbul ignore else @preserve if (content) { - const nav = closest(element, '.nav'); - const container = closest(content, '.tab-content'); + const nav = closest(element, ".nav"); + const container = closest(content, ".tab-content"); this.nav = nav; this.content = content; @@ -297,7 +318,7 @@ export default class Tab extends BaseComponent { addClass(firstTab, activeClass); addClass(firstTabContent, showClass); addClass(firstTabContent, activeClass); - setAttribute(element, ariaSelected, 'true'); + setAttribute(element, ariaSelected, "true"); } } @@ -337,7 +358,7 @@ export default class Tab extends BaseComponent { // istanbul ignore else @preserve if (!hideTabEvent.defaultPrevented) { addClass(element, activeClass); - setAttribute(element, ariaSelected, 'true'); + setAttribute(element, ariaSelected, "true"); const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab); if (activeDropdown && hasClass(activeDropdown, activeClass)) { @@ -350,14 +371,18 @@ export default class Tab extends BaseComponent { // istanbul ignore else @preserve if (tab) { removeClass(tab, activeClass); - setAttribute(tab, ariaSelected, 'false'); + setAttribute(tab, ariaSelected, "false"); } if (dropdown && !hasClass(dropdown, activeClass)) { addClass(dropdown, activeClass); } }; - if (content && (hasClass(content, fadeClass) || (nextContent && hasClass(nextContent, fadeClass)))) { + if ( + content && + (hasClass(content, fadeClass) || + (nextContent && hasClass(nextContent, fadeClass))) + ) { Timer.set(nav, toggleTab, 1); } else toggleTab(); } diff --git a/src/components/toast.ts b/src/components/toast.ts index 4ac557f0..e95ff1de 100644 --- a/src/components/toast.ts +++ b/src/components/toast.ts @@ -19,28 +19,28 @@ import { reflow, removeClass, Timer, -} from '@thednp/shorty'; +} from "@thednp/shorty"; -import { addListener, removeListener } from '@thednp/event-listener'; +import { addListener, removeListener } from "@thednp/event-listener"; -import fadeClass from '../strings/fadeClass'; -import showClass from '../strings/showClass'; -import dataBsDismiss from '../strings/dataBsDismiss'; -import dataBsToggle from '../strings/dataBsToggle'; -import toastString from '../strings/toastString'; -import toastComponent from '../strings/toastComponent'; -import getTargetElement from '../util/getTargetElement'; -import BaseComponent from './base-component'; -import { ToastEvent, ToastOptions } from '../interface/toast'; +import fadeClass from "../strings/fadeClass"; +import showClass from "../strings/showClass"; +import dataBsDismiss from "../strings/dataBsDismiss"; +import dataBsToggle from "../strings/dataBsToggle"; +import toastString from "../strings/toastString"; +import toastComponent from "../strings/toastComponent"; +import getTargetElement from "../util/getTargetElement"; +import BaseComponent from "./base-component"; +import { ToastEvent, ToastOptions } from "../interface/toast"; // TOAST PRIVATE GC // ================ const toastSelector = `.${toastString}`; const toastDismissSelector = `[${dataBsDismiss}="${toastString}"]`; const toastToggleSelector = `[${dataBsToggle}="${toastString}"]`; -const showingClass = 'showing'; +const showingClass = "showing"; /** @deprecated */ -const hideClass = 'hide'; +const hideClass = "hide"; const toastDefaults = { animation: true, @@ -52,7 +52,8 @@ const toastDefaults = { * Static method which returns an existing `Toast` instance associated * to a target `Element`. */ -const getToastInstance = (element: HTMLElement) => getInstance(element, toastComponent); +const getToastInstance = (element: HTMLElement) => + getInstance(element, toastComponent); /** * A `Toast` initialization callback. @@ -61,10 +62,18 @@ const toastInitCallback = (element: HTMLElement) => new Toast(element); // TOAST CUSTOM EVENTS // =================== -const showToastEvent = createCustomEvent, ToastEvent>(`show.bs.${toastString}`); -const shownToastEvent = createCustomEvent, ToastEvent>(`shown.bs.${toastString}`); -const hideToastEvent = createCustomEvent, ToastEvent>(`hide.bs.${toastString}`); -const hiddenToastEvent = createCustomEvent, ToastEvent>(`hidden.bs.${toastString}`); +const showToastEvent = createCustomEvent, ToastEvent>( + `show.bs.${toastString}`, +); +const shownToastEvent = createCustomEvent, ToastEvent>( + `shown.bs.${toastString}`, +); +const hideToastEvent = createCustomEvent, ToastEvent>( + `hide.bs.${toastString}`, +); +const hiddenToastEvent = createCustomEvent, ToastEvent>( + `hidden.bs.${toastString}`, +); // TOAST PRIVATE METHODS // ===================== @@ -159,7 +168,7 @@ const toastClickHandler = (e: Event) => { // istanbul ignore else @preserve if (self) { // istanbul ignore else @preserve - if (trigger && trigger.tagName === 'A') e.preventDefault(); + if (trigger && trigger.tagName === "A") e.preventDefault(); self.relatedTarget = trigger; self.show(); } @@ -177,7 +186,10 @@ const interactiveToastHandler = (e: MouseEvent) => { const { type, relatedTarget } = e; // istanbul ignore else @preserve: a solid filter is required - if (self && element !== relatedTarget && !element.contains(relatedTarget as Node)) { + if ( + self && element !== relatedTarget && + !element.contains(relatedTarget as Node) + ) { if ([mouseenterEvent, focusinEvent].includes(type)) { Timer.clear(element, toastString); } else { @@ -217,8 +229,10 @@ export default class Toast extends BaseComponent { this.dismiss = querySelector(toastDismissSelector, element); // toast can have multiple triggering elements - this.triggers = [...querySelectorAll(toastToggleSelector, getDocument(element))].filter( - btn => getTargetElement(btn) === element, + this.triggers = [ + ...querySelectorAll(toastToggleSelector, getDocument(element)), + ].filter( + (btn) => getTargetElement(btn) === element, ); // add event listener @@ -287,13 +301,15 @@ export default class Toast extends BaseComponent { // istanbul ignore else @preserve if (options.autohide) { - [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(e => - action(element, e, interactiveToastHandler), + [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach( + (e) => action(element, e, interactiveToastHandler), ); } // istanbul ignore else @preserve if (triggers.length) { - triggers.forEach(btn => action(btn, mouseclickEvent, toastClickHandler)); + triggers.forEach((btn) => + action(btn, mouseclickEvent, toastClickHandler) + ); } }; diff --git a/src/components/tooltip.ts b/src/components/tooltip.ts index b3c9761c..ecb26651 100644 --- a/src/components/tooltip.ts +++ b/src/components/tooltip.ts @@ -35,39 +35,41 @@ import { Timer, toLowerCase, touchstartEvent, -} from '@thednp/shorty'; - -import { addListener, removeListener } from '@thednp/event-listener'; - -import dataBsToggle from '../strings/dataBsToggle'; -import dataOriginalTitle from '../strings/dataOriginalTitle'; -import showClass from '../strings/showClass'; -import tooltipString from '../strings/tooltipString'; -import tooltipComponent from '../strings/tooltipComponent'; -import popoverString from '../strings/popoverString'; -import popoverComponent from '../strings/popoverComponent'; -import modalString from '../strings/modalString'; -import offcanvasString from '../strings/offcanvasString'; - -import styleTip from '../util/styleTip'; -import createTip from '../util/createTip'; -import { appendPopup, hasPopup, removePopup } from '../util/popupContainer'; -import getElementContainer from '../util/getElementContainer'; -import tooltipDefaults from '../util/tooltipDefaults'; -import BaseComponent from './base-component'; -import type { TooltipEvent, TooltipOptions } from '../interface/tooltip'; -import type { PopoverEvent, PopoverOptions } from '../interface/popover'; +} from "@thednp/shorty"; + +import { addListener, removeListener } from "@thednp/event-listener"; + +import dataBsToggle from "../strings/dataBsToggle"; +import dataOriginalTitle from "../strings/dataOriginalTitle"; +import showClass from "../strings/showClass"; +import tooltipString from "../strings/tooltipString"; +import tooltipComponent from "../strings/tooltipComponent"; +import popoverString from "../strings/popoverString"; +import popoverComponent from "../strings/popoverComponent"; +import modalString from "../strings/modalString"; +import offcanvasString from "../strings/offcanvasString"; + +import styleTip from "../util/styleTip"; +import createTip from "../util/createTip"; +import { appendPopup, hasPopup, removePopup } from "../util/popupContainer"; +import getElementContainer from "../util/getElementContainer"; +import tooltipDefaults from "../util/tooltipDefaults"; +import BaseComponent from "./base-component"; +import type { TooltipEvent, TooltipOptions } from "../interface/tooltip"; +import type { PopoverEvent, PopoverOptions } from "../interface/popover"; // TOOLTIP PRIVATE GC // ================== -const tooltipSelector = `[${dataBsToggle}="${tooltipString}"],[data-tip="${tooltipString}"]`; -const titleAttr = 'title'; +const tooltipSelector = + `[${dataBsToggle}="${tooltipString}"],[data-tip="${tooltipString}"]`; +const titleAttr = "title"; /** * Static method which returns an existing `Tooltip` instance associated * to a target `Element`. */ -let getTooltipInstance = (element: HTMLElement) => getInstance(element, tooltipComponent); +let getTooltipInstance = (element: HTMLElement) => + getInstance(element, tooltipComponent); /** * A `Tooltip` initialization callback. @@ -84,7 +86,10 @@ const tooltipInitCallback = (element: HTMLElement) => new Tooltip(element); const removeTooltip = (self: Tooltip) => { const { element, tooltip, container, offsetParent } = self; removeAttribute(element, ariaDescribedBy); - removePopup(tooltip as HTMLElement, container === offsetParent ? container : offsetParent); + removePopup( + tooltip as HTMLElement, + container === offsetParent ? container : offsetParent, + ); }; /** @@ -95,7 +100,8 @@ const removeTooltip = (self: Tooltip) => { const hasTip = (self: Tooltip): boolean | undefined => { const { tooltip, container, offsetParent } = self; - return tooltip && hasPopup(tooltip, container === offsetParent ? container : offsetParent); + return tooltip && + hasPopup(tooltip, container === offsetParent ? container : offsetParent); }; /** @@ -109,7 +115,9 @@ const disposeTooltipComplete = (self: Tooltip, callback?: () => void) => { self._toggleEventListeners(); // istanbul ignore else @preserve - if (hasAttribute(element, dataOriginalTitle) && self.name === tooltipComponent) { + if ( + hasAttribute(element, dataOriginalTitle) && self.name === tooltipComponent + ) { toggleTooltipTitle(self); } // istanbul ignore else @preserve @@ -126,9 +134,14 @@ const toggleTooltipAction = (self: Tooltip, add?: boolean) => { const action = add ? addListener : removeListener; const { element } = self; - action(getDocument(element), touchstartEvent, self.handleTouch, passiveHandler); + action( + getDocument(element), + touchstartEvent, + self.handleTouch, + passiveHandler, + ); - [scrollEvent, resizeEvent].forEach(ev => { + [scrollEvent, resizeEvent].forEach((ev) => { action(getWindow(element), ev, self.update, passiveHandler); }); }; @@ -140,13 +153,16 @@ const toggleTooltipAction = (self: Tooltip, add?: boolean) => { */ const tooltipShownAction = (self: Tooltip) => { const { element } = self; - const shownTooltipEvent = createCustomEvent, TooltipEvent | PopoverEvent>( + const shownTooltipEvent = createCustomEvent< + Record, + TooltipEvent | PopoverEvent + >( `shown.bs.${toLowerCase(self.name)}`, ); toggleTooltipAction(self, true); dispatchEvent(element, shownTooltipEvent); - Timer.clear(element, 'in'); + Timer.clear(element, "in"); }; /** @@ -156,7 +172,10 @@ const tooltipShownAction = (self: Tooltip) => { */ const tooltipHiddenAction = (self: Tooltip) => { const { element } = self; - const hiddenTooltipEvent = createCustomEvent, TooltipEvent | PopoverEvent>( + const hiddenTooltipEvent = createCustomEvent< + Record, + TooltipEvent | PopoverEvent + >( `hidden.bs.${toLowerCase(self.name)}`, ); @@ -164,7 +183,7 @@ const tooltipHiddenAction = (self: Tooltip) => { removeTooltip(self); dispatchEvent(element, hiddenTooltipEvent); - Timer.clear(element, 'out'); + Timer.clear(element, "out"); }; /** @@ -213,7 +232,7 @@ const toggleTooltipTitle = (self: Tooltip, content?: string) => { content || getAttribute(element, titleAtt[0]) || // istanbul ignore next @preserve - '', + "", ); removeAttribute(element, titleAtt[content ? 1 : 0]); }; @@ -248,7 +267,8 @@ export default class Tooltip extends BaseComponent { const tipComponent = isTooltip ? tooltipComponent : popoverComponent; // istanbul ignore next @preserve: this is to set Popover too - getTooltipInstance = (elem: HTMLElement) => getInstance(elem, tipComponent); + getTooltipInstance = (elem: HTMLElement) => + getInstance(elem, tipComponent); // additional properties this.enabled = true; @@ -261,19 +281,24 @@ export default class Tooltip extends BaseComponent { // invalidate if (!((!options.title && isTooltip) || (!isTooltip && !options.content))) { // reset default options - ObjectAssign(tooltipDefaults, { titleAttr: '' }); + ObjectAssign(tooltipDefaults, { titleAttr: "" }); // set title attributes and add event listeners // istanbul ignore else @preserve - if (hasAttribute(element, titleAttr) && isTooltip && typeof options.title === 'string') { + if ( + hasAttribute(element, titleAttr) && isTooltip && + typeof options.title === "string" + ) { toggleTooltipTitle(this, options.title); } // set containers this.container = getElementContainer(element); - this.offsetParent = ['sticky', 'fixed'].some( - position => getElementStyle(this.container as HTMLElement, 'position') === position, - ) + this.offsetParent = ["sticky", "fixed"].some( + (position) => + getElementStyle(this.container as HTMLElement, "position") === + position, + ) ? (this.container as HTMLElement) : getDocument(this.element).body; @@ -308,16 +333,19 @@ export default class Tooltip extends BaseComponent { show() { const { options, tooltip, element, container, offsetParent, id } = this; const { animation } = options; - const outTimer = Timer.get(element, 'out'); + const outTimer = Timer.get(element, "out"); const tipContainer = container === offsetParent ? container : offsetParent; - Timer.clear(element, 'out'); + Timer.clear(element, "out"); if (tooltip && !outTimer && !hasTip(this)) { Timer.set( element, () => { - const showTooltipEvent = createCustomEvent, TooltipEvent | PopoverEvent>( + const showTooltipEvent = createCustomEvent< + Record, + TooltipEvent | PopoverEvent + >( `show.bs.${toLowerCase(this.name)}`, ); dispatchEvent(element, showTooltipEvent); @@ -341,7 +369,7 @@ export default class Tooltip extends BaseComponent { } }, 17, - 'in', + "in", ); } } @@ -352,14 +380,17 @@ export default class Tooltip extends BaseComponent { const { options, tooltip, element } = this; const { animation, delay } = options; - Timer.clear(element, 'in'); + Timer.clear(element, "in"); // istanbul ignore else @preserve if (tooltip && hasTip(this)) { Timer.set( element, () => { - const hideTooltipEvent = createCustomEvent, TooltipEvent | PopoverEvent>( + const hideTooltipEvent = createCustomEvent< + Record, + TooltipEvent | PopoverEvent + >( `hide.bs.${toLowerCase(this.name)}`, ); dispatchEvent(element, hideTooltipEvent); @@ -377,7 +408,7 @@ export default class Tooltip extends BaseComponent { } }, delay + 17, - 'out', + "out", ); } } @@ -454,15 +485,17 @@ export default class Tooltip extends BaseComponent { const { element, options, btn } = this; const { trigger } = options; const isPopover = this.name !== tooltipComponent; - const dismissible = isPopover && (options as PopoverOptions).dismissible ? true : false; + const dismissible = isPopover && (options as PopoverOptions).dismissible + ? true + : false; // istanbul ignore else @preserve - if (!trigger.includes('manual')) { + if (!trigger.includes("manual")) { this.enabled = !!add; - const triggerOptions = trigger.split(' '); + const triggerOptions = trigger.split(" "); - triggerOptions.forEach(tr => { + triggerOptions.forEach((tr) => { // istanbul ignore else @preserve if (tr === mousehoverEvent) { action(element, mousedownEvent, this.handleShow); @@ -471,7 +504,12 @@ export default class Tooltip extends BaseComponent { // istanbul ignore else @preserve if (!dismissible) { action(element, mouseleaveEvent, this.handleHide); - action(getDocument(element), touchstartEvent, this.handleTouch, passiveHandler); + action( + getDocument(element), + touchstartEvent, + this.handleTouch, + passiveHandler, + ); } } else if (tr === mouseclickEvent) { action(element, tr, !dismissible ? this.toggle : this.handleShow); @@ -496,7 +534,11 @@ export default class Tooltip extends BaseComponent { dispose() { const { tooltip, options } = this; const clone = { ...this, name: this.name }; - const callback = () => setTimeout(() => disposeTooltipComplete(clone, () => super.dispose()), 17); + const callback = () => + setTimeout( + () => disposeTooltipComplete(clone, () => super.dispose()), + 17, + ); if (options.animation && hasTip(clone)) { this.options.delay = 0; // reset delay diff --git a/src/index.ts b/src/index.ts index 7b264e83..5adbbc63 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,17 +1,17 @@ -import Alert from './components/alert'; -import Button from './components/button'; -import Carousel from './components/carousel'; -import Collapse from './components/collapse'; -import Dropdown from './components/dropdown'; -import Modal from './components/modal'; -import Offcanvas from './components/offcanvas'; -import Popover from './components/popover'; -import ScrollSpy from './components/scrollspy'; -import Tab from './components/tab'; -import Toast from './components/toast'; -import Tooltip from './components/tooltip'; +import Alert from "./components/alert"; +import Button from "./components/button"; +import Carousel from "./components/carousel"; +import Collapse from "./components/collapse"; +import Dropdown from "./components/dropdown"; +import Modal from "./components/modal"; +import Offcanvas from "./components/offcanvas"; +import Popover from "./components/popover"; +import ScrollSpy from "./components/scrollspy"; +import Tab from "./components/tab"; +import Toast from "./components/toast"; +import Tooltip from "./components/tooltip"; -import { initCallback, removeDataAPI } from './util/init'; +import { initCallback, removeDataAPI } from "./util/init"; export { Alert, diff --git a/src/interface/alert.ts b/src/interface/alert.ts index 66a377ea..e7e6ffea 100644 --- a/src/interface/alert.ts +++ b/src/interface/alert.ts @@ -1,5 +1,5 @@ -import { OriginalEvent } from '@thednp/shorty'; +import { OriginalEvent } from "@thednp/shorty"; export interface AlertEvent extends OriginalEvent { - readonly type: string | 'close.bs.alert' | 'closed.bs.alert'; + readonly type: string | "close.bs.alert" | "closed.bs.alert"; } diff --git a/src/interface/baseComponent.ts b/src/interface/baseComponent.ts index 9466cc14..ab568fa3 100644 --- a/src/interface/baseComponent.ts +++ b/src/interface/baseComponent.ts @@ -1,3 +1,3 @@ export interface BaseOptions { - [key: string]: any; + [key: string]: unknown; } diff --git a/src/interface/carousel.ts b/src/interface/carousel.ts index 1432214f..66284732 100644 --- a/src/interface/carousel.ts +++ b/src/interface/carousel.ts @@ -1,16 +1,16 @@ -import { OriginalEvent } from '@thednp/shorty'; -import { BaseOptions } from './baseComponent'; +import { OriginalEvent } from "@thednp/shorty"; +import { BaseOptions } from "./baseComponent"; export interface CarouselOptions extends BaseOptions { - pause: boolean | 'hover'; + pause: boolean | "hover"; keyboard: boolean; touch: boolean; interval: number | boolean; } export interface CarouselEvent extends OriginalEvent { - readonly type: string | 'slide.bs.carousel' | 'slid.bs.carousel'; - readonly direction: 'left' | 'right'; + readonly type: string | "slide.bs.carousel" | "slid.bs.carousel"; + readonly direction: "left" | "right"; readonly from: number; readonly to: number; } diff --git a/src/interface/collapse.ts b/src/interface/collapse.ts index 5c6fd1d4..93b63055 100644 --- a/src/interface/collapse.ts +++ b/src/interface/collapse.ts @@ -1,10 +1,15 @@ -import { OriginalEvent } from '@thednp/shorty'; -import { BaseOptions } from './baseComponent'; +import { OriginalEvent } from "@thednp/shorty"; +import { BaseOptions } from "./baseComponent"; export interface CollapseOptions extends BaseOptions { parent: string | HTMLElement | null; } export interface CollapseEvent extends OriginalEvent { - readonly type: string | 'show.bs.collapse' | 'shown.bs.collapse' | 'hide.bs.collapse' | 'hidden.bs.collapse'; + readonly type: + | string + | "show.bs.collapse" + | "shown.bs.collapse" + | "hide.bs.collapse" + | "hidden.bs.collapse"; } diff --git a/src/interface/dropdown.ts b/src/interface/dropdown.ts index 78c81d16..8b0ce6c6 100644 --- a/src/interface/dropdown.ts +++ b/src/interface/dropdown.ts @@ -1,17 +1,17 @@ -import { OriginalEvent } from '@thednp/shorty'; -import { BaseOptions } from './baseComponent'; +import { OriginalEvent } from "@thednp/shorty"; +import { BaseOptions } from "./baseComponent"; export interface DropdownOptions extends BaseOptions { offset: number; - display: string | 'dynamic' | 'static'; + display: string | "dynamic" | "static"; } export interface DropdownEvent extends OriginalEvent { readonly type: | string - | 'show.bs.dropdown' - | 'shown.bs.dropdown' - | 'hide.bs.dropdown' - | 'hidden.bs.dropdown' - | 'updated.bs.dropdown'; + | "show.bs.dropdown" + | "shown.bs.dropdown" + | "hide.bs.dropdown" + | "hidden.bs.dropdown" + | "updated.bs.dropdown"; } diff --git a/src/interface/modal.ts b/src/interface/modal.ts index 673d1713..b83819b8 100644 --- a/src/interface/modal.ts +++ b/src/interface/modal.ts @@ -1,11 +1,16 @@ -import { OriginalEvent } from '@thednp/shorty'; -import { BaseOptions } from './baseComponent'; +import { OriginalEvent } from "@thednp/shorty"; +import { BaseOptions } from "./baseComponent"; export interface ModalOptions extends BaseOptions { - backdrop: boolean | 'static'; + backdrop: boolean | "static"; keyboard: boolean; } export interface ModalEvent extends OriginalEvent { - readonly type: string | 'show.bs.modal' | 'shown.bs.modal' | 'hide.bs.modal' | 'hidden.bs.modal'; + readonly type: + | string + | "show.bs.modal" + | "shown.bs.modal" + | "hide.bs.modal" + | "hidden.bs.modal"; } diff --git a/src/interface/offcanvas.ts b/src/interface/offcanvas.ts index fbfaea15..d5533790 100644 --- a/src/interface/offcanvas.ts +++ b/src/interface/offcanvas.ts @@ -1,11 +1,16 @@ -import { OriginalEvent } from '@thednp/shorty'; -import { BaseOptions } from './baseComponent'; +import { OriginalEvent } from "@thednp/shorty"; +import { BaseOptions } from "./baseComponent"; export interface OffcanvasOptions extends BaseOptions { - backdrop: boolean | 'static'; + backdrop: boolean | "static"; keyboard: boolean; } export interface OffcanvasEvent extends OriginalEvent { - readonly type: string | 'show.bs.offcanvas' | 'shown.bs.offcanvas' | 'hide.bs.offcanvas' | 'hidden.bs.offcanvas'; + readonly type: + | string + | "show.bs.offcanvas" + | "shown.bs.offcanvas" + | "hide.bs.offcanvas" + | "hidden.bs.offcanvas"; } diff --git a/src/interface/popover.ts b/src/interface/popover.ts index b5fc6bf7..60009821 100644 --- a/src/interface/popover.ts +++ b/src/interface/popover.ts @@ -1,5 +1,5 @@ -import { OriginalEvent } from '@thednp/shorty'; -import { TooltipOptions } from './tooltip'; +import { OriginalEvent } from "@thednp/shorty"; +import { TooltipOptions } from "./tooltip"; export interface PopoverOptions extends TooltipOptions { title: string | HTMLElement; @@ -11,9 +11,9 @@ export interface PopoverOptions extends TooltipOptions { export interface PopoverEvent extends OriginalEvent { readonly type: | string - | 'show.bs.popover' - | 'shown.bs.popover' - | 'hide.bs.popover' - | 'hidden.bs.popover' - | 'updated.bs.popover'; + | "show.bs.popover" + | "shown.bs.popover" + | "hide.bs.popover" + | "hidden.bs.popover" + | "updated.bs.popover"; } diff --git a/src/interface/scrollspy.ts b/src/interface/scrollspy.ts index 96d1e9f3..11b6ae35 100644 --- a/src/interface/scrollspy.ts +++ b/src/interface/scrollspy.ts @@ -1,5 +1,5 @@ -import { OriginalEvent } from '@thednp/shorty'; -import { BaseOptions } from './baseComponent'; +import { OriginalEvent } from "@thednp/shorty"; +import { BaseOptions } from "./baseComponent"; export interface ScrollSpyOptions extends BaseOptions { offset: number; @@ -7,5 +7,5 @@ export interface ScrollSpyOptions extends BaseOptions { } export interface ScrollSpyEvent extends OriginalEvent { - readonly type: string | 'activate.bs.scrollspy'; + readonly type: string | "activate.bs.scrollspy"; } diff --git a/src/interface/tab.ts b/src/interface/tab.ts index d4d236d9..f6bae5bd 100644 --- a/src/interface/tab.ts +++ b/src/interface/tab.ts @@ -1,11 +1,16 @@ -import { OriginalEvent } from '@thednp/shorty'; -import { BaseOptions } from './baseComponent'; +import { OriginalEvent } from "@thednp/shorty"; +import { BaseOptions } from "./baseComponent"; export interface TabOptions extends BaseOptions { parent?: HTMLElement; } export interface TabEvent extends OriginalEvent { - readonly type: string | 'show.bs.tab' | 'shown.bs.tab' | 'hide.bs.tab' | 'hidden.bs.tab'; + readonly type: + | string + | "show.bs.tab" + | "shown.bs.tab" + | "hide.bs.tab" + | "hidden.bs.tab"; // relatedTarget: EventTarget | null; } diff --git a/src/interface/toast.ts b/src/interface/toast.ts index c44086c9..5624355b 100644 --- a/src/interface/toast.ts +++ b/src/interface/toast.ts @@ -1,5 +1,5 @@ -import { OriginalEvent } from '@thednp/shorty'; -import { BaseOptions } from './baseComponent'; +import { OriginalEvent } from "@thednp/shorty"; +import { BaseOptions } from "./baseComponent"; export interface ToastOptions extends BaseOptions { animation: boolean; @@ -8,5 +8,10 @@ export interface ToastOptions extends BaseOptions { } export interface ToastEvent extends OriginalEvent { - readonly type: string | 'show.bs.toast' | 'shown.bs.toast' | 'hide.bs.toast' | 'hidden.bs.toast'; + readonly type: + | string + | "show.bs.toast" + | "shown.bs.toast" + | "hide.bs.toast" + | "hidden.bs.toast"; } diff --git a/src/interface/tooltip.ts b/src/interface/tooltip.ts index f0b14343..55ceb556 100644 --- a/src/interface/tooltip.ts +++ b/src/interface/tooltip.ts @@ -1,12 +1,12 @@ -import { OriginalEvent } from '@thednp/shorty'; -import { BaseOptions } from './baseComponent'; +import { OriginalEvent } from "@thednp/shorty"; +import { BaseOptions } from "./baseComponent"; export interface TooltipOptions extends BaseOptions { template: string | HTMLElement; title: string | HTMLElement; customClass: string; trigger: string; - placement: 'top' | 'bottom' | 'left' | 'right'; + placement: "top" | "bottom" | "left" | "right"; sanitizeFn?: (str: string) => string; animation: boolean; delay: number; @@ -19,9 +19,9 @@ export interface TooltipOptions extends BaseOptions { export interface TooltipEvent extends OriginalEvent { readonly type: | string - | 'show.bs.tooltip' - | 'shown.bs.tooltip' - | 'hide.bs.tooltip' - | 'hidden.bs.tooltip' - | 'updated.bs.tooltip'; + | "show.bs.tooltip" + | "shown.bs.tooltip" + | "hide.bs.tooltip" + | "hidden.bs.tooltip" + | "updated.bs.tooltip"; } diff --git a/src/strings/activeClass.ts b/src/strings/activeClass.ts index 8af52ce2..d00dc9fb 100644 --- a/src/strings/activeClass.ts +++ b/src/strings/activeClass.ts @@ -1,5 +1,5 @@ /** * Global namespace for most components active class. */ -const activeClass = 'active'; +const activeClass = "active"; export default activeClass; diff --git a/src/strings/alertComponent.ts b/src/strings/alertComponent.ts index a873f464..80bf6c63 100644 --- a/src/strings/alertComponent.ts +++ b/src/strings/alertComponent.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const alertComponent = 'Alert'; +const alertComponent = "Alert"; export default alertComponent; diff --git a/src/strings/alertString.ts b/src/strings/alertString.ts index d9ffbdc1..2ea9d241 100644 --- a/src/strings/alertString.ts +++ b/src/strings/alertString.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const alertString = 'alert'; +const alertString = "alert"; export default alertString; diff --git a/src/strings/buttonComponent.ts b/src/strings/buttonComponent.ts index fad98d2d..ea82ddd0 100644 --- a/src/strings/buttonComponent.ts +++ b/src/strings/buttonComponent.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const buttonComponent = 'Button'; +const buttonComponent = "Button"; export default buttonComponent; diff --git a/src/strings/buttonString.ts b/src/strings/buttonString.ts index 0b9fea1a..db3d84ab 100644 --- a/src/strings/buttonString.ts +++ b/src/strings/buttonString.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const buttonString = 'button'; +const buttonString = "button"; export default buttonString; diff --git a/src/strings/carouselComponent.ts b/src/strings/carouselComponent.ts index 39768dae..f792492c 100644 --- a/src/strings/carouselComponent.ts +++ b/src/strings/carouselComponent.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const carouselComponent = 'Carousel'; +const carouselComponent = "Carousel"; export default carouselComponent; diff --git a/src/strings/carouselString.ts b/src/strings/carouselString.ts index e35c6d56..8ff324ec 100644 --- a/src/strings/carouselString.ts +++ b/src/strings/carouselString.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const carouselString = 'carousel'; +const carouselString = "carousel"; export default carouselString; diff --git a/src/strings/collapseComponent.ts b/src/strings/collapseComponent.ts index 79617edf..0b70616d 100644 --- a/src/strings/collapseComponent.ts +++ b/src/strings/collapseComponent.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const collapseComponent = 'Collapse'; +const collapseComponent = "Collapse"; export default collapseComponent; diff --git a/src/strings/collapseString.ts b/src/strings/collapseString.ts index 5cd17930..bc5733b1 100644 --- a/src/strings/collapseString.ts +++ b/src/strings/collapseString.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const collapseString = 'collapse'; +const collapseString = "collapse"; export default collapseString; diff --git a/src/strings/collapsingClass.ts b/src/strings/collapsingClass.ts index 2087e66b..3f23c93c 100644 --- a/src/strings/collapsingClass.ts +++ b/src/strings/collapsingClass.ts @@ -2,5 +2,5 @@ * Global namespace for most components `collapsing` class. * As used by `Collapse` / `Tab`. */ -const collapsingClass = 'collapsing'; +const collapsingClass = "collapsing"; export default collapsingClass; diff --git a/src/strings/dataBsContainer.ts b/src/strings/dataBsContainer.ts index c8a56cbd..e08c8d3a 100644 --- a/src/strings/dataBsContainer.ts +++ b/src/strings/dataBsContainer.ts @@ -1,5 +1,5 @@ /** * Global namespace for most components `container` option. */ -const dataBsContainer = 'data-bs-container'; +const dataBsContainer = "data-bs-container"; export default dataBsContainer; diff --git a/src/strings/dataBsDismiss.ts b/src/strings/dataBsDismiss.ts index fc886a24..5ce64624 100644 --- a/src/strings/dataBsDismiss.ts +++ b/src/strings/dataBsDismiss.ts @@ -1,5 +1,5 @@ /** * Global namespace for most components `dismiss` option. */ -const dataBsDismiss = 'data-bs-dismiss'; +const dataBsDismiss = "data-bs-dismiss"; export default dataBsDismiss; diff --git a/src/strings/dataBsParent.ts b/src/strings/dataBsParent.ts index e408b036..a7f4ad77 100644 --- a/src/strings/dataBsParent.ts +++ b/src/strings/dataBsParent.ts @@ -1,5 +1,5 @@ /** * Global namespace for most components `parent` option. */ -const dataBsParent = 'data-bs-parent'; +const dataBsParent = "data-bs-parent"; export default dataBsParent; diff --git a/src/strings/dataBsTarget.ts b/src/strings/dataBsTarget.ts index a2dcf7b5..2fa1199c 100644 --- a/src/strings/dataBsTarget.ts +++ b/src/strings/dataBsTarget.ts @@ -1,5 +1,5 @@ /** * Global namespace for most components `target` option. */ -const dataBsTarget = 'data-bs-target'; +const dataBsTarget = "data-bs-target"; export default dataBsTarget; diff --git a/src/strings/dataBsToggle.ts b/src/strings/dataBsToggle.ts index ac2c6e71..c1ad03d3 100644 --- a/src/strings/dataBsToggle.ts +++ b/src/strings/dataBsToggle.ts @@ -1,5 +1,5 @@ /** * Global namespace for most components `toggle` option. */ -const dataBsToggle = 'data-bs-toggle'; +const dataBsToggle = "data-bs-toggle"; export default dataBsToggle; diff --git a/src/strings/dataOriginalTitle.ts b/src/strings/dataOriginalTitle.ts index 7bdabae2..fcad2e61 100644 --- a/src/strings/dataOriginalTitle.ts +++ b/src/strings/dataOriginalTitle.ts @@ -1,5 +1,5 @@ /** * Global namespace for `data-bs-title` attribute. */ -const dataOriginalTitle = 'data-original-title'; +const dataOriginalTitle = "data-original-title"; export default dataOriginalTitle; diff --git a/src/strings/dropdownClasses.ts b/src/strings/dropdownClasses.ts index 4b1a5f3d..a2b31128 100644 --- a/src/strings/dropdownClasses.ts +++ b/src/strings/dropdownClasses.ts @@ -1,5 +1,5 @@ /** * Global namespace for `Dropdown` types / classes. */ -const dropdownMenuClasses = ['dropdown', 'dropup', 'dropstart', 'dropend']; +const dropdownMenuClasses = ["dropdown", "dropup", "dropstart", "dropend"]; export default dropdownMenuClasses; diff --git a/src/strings/dropdownComponent.ts b/src/strings/dropdownComponent.ts index bc9632a3..e3c1bcc2 100644 --- a/src/strings/dropdownComponent.ts +++ b/src/strings/dropdownComponent.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const dropdownComponent = 'Dropdown'; +const dropdownComponent = "Dropdown"; export default dropdownComponent; diff --git a/src/strings/dropdownMenuClass.ts b/src/strings/dropdownMenuClass.ts index d060df5e..bc64b1fe 100644 --- a/src/strings/dropdownMenuClass.ts +++ b/src/strings/dropdownMenuClass.ts @@ -1,5 +1,5 @@ /** * Global namespace for `.dropdown-menu`. */ -const dropdownMenuClass = 'dropdown-menu'; +const dropdownMenuClass = "dropdown-menu"; export default dropdownMenuClass; diff --git a/src/strings/fadeClass.ts b/src/strings/fadeClass.ts index bab98a75..871d5c85 100644 --- a/src/strings/fadeClass.ts +++ b/src/strings/fadeClass.ts @@ -1,5 +1,5 @@ /** * Global namespace for most components `fade` class. */ -const fadeClass = 'fade'; +const fadeClass = "fade"; export default fadeClass; diff --git a/src/strings/fixedBottomClass.ts b/src/strings/fixedBottomClass.ts index 405219b3..b54075c2 100644 --- a/src/strings/fixedBottomClass.ts +++ b/src/strings/fixedBottomClass.ts @@ -1,5 +1,5 @@ /** * Global namespace for components `fixed-bottom` class. */ -const fixedBottomClass = 'fixed-bottom'; +const fixedBottomClass = "fixed-bottom"; export default fixedBottomClass; diff --git a/src/strings/fixedTopClass.ts b/src/strings/fixedTopClass.ts index fdbe2074..b5ca8f36 100644 --- a/src/strings/fixedTopClass.ts +++ b/src/strings/fixedTopClass.ts @@ -1,5 +1,5 @@ /** * Global namespace for components `fixed-top` class. */ -const fixedTopClass = 'fixed-top'; +const fixedTopClass = "fixed-top"; export default fixedTopClass; diff --git a/src/strings/modalComponent.ts b/src/strings/modalComponent.ts index 8ffb981b..010b1313 100644 --- a/src/strings/modalComponent.ts +++ b/src/strings/modalComponent.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const modalComponent = 'Modal'; +const modalComponent = "Modal"; export default modalComponent; diff --git a/src/strings/modalString.ts b/src/strings/modalString.ts index 9249e2db..c5cfcb09 100644 --- a/src/strings/modalString.ts +++ b/src/strings/modalString.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const modalString = 'modal'; +const modalString = "modal"; export default modalString; diff --git a/src/strings/offcanvasComponent.ts b/src/strings/offcanvasComponent.ts index 8874362f..e8637fa8 100644 --- a/src/strings/offcanvasComponent.ts +++ b/src/strings/offcanvasComponent.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const offcanvasComponent = 'Offcanvas'; +const offcanvasComponent = "Offcanvas"; export default offcanvasComponent; diff --git a/src/strings/offcanvasString.ts b/src/strings/offcanvasString.ts index 5e1820f8..bfc70d51 100644 --- a/src/strings/offcanvasString.ts +++ b/src/strings/offcanvasString.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const offcanvasString = 'offcanvas'; +const offcanvasString = "offcanvas"; export default offcanvasString; diff --git a/src/strings/popoverComponent.ts b/src/strings/popoverComponent.ts index 497b0f07..566c22b6 100644 --- a/src/strings/popoverComponent.ts +++ b/src/strings/popoverComponent.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const popoverComponent = 'Popover'; +const popoverComponent = "Popover"; export default popoverComponent; diff --git a/src/strings/popoverString.ts b/src/strings/popoverString.ts index 81fa5bc2..017f2d38 100644 --- a/src/strings/popoverString.ts +++ b/src/strings/popoverString.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const popoverString = 'popover'; +const popoverString = "popover"; export default popoverString; diff --git a/src/strings/positionStickyClass.ts b/src/strings/positionStickyClass.ts index e83b3347..45175c9d 100644 --- a/src/strings/positionStickyClass.ts +++ b/src/strings/positionStickyClass.ts @@ -1,5 +1,5 @@ /** * Global namespace for components `position-sticky` class. */ -const positionStickyClass = 'position-sticky'; +const positionStickyClass = "position-sticky"; export default positionStickyClass; diff --git a/src/strings/scrollspyComponent.ts b/src/strings/scrollspyComponent.ts index 0c5966db..6d86bd5a 100644 --- a/src/strings/scrollspyComponent.ts +++ b/src/strings/scrollspyComponent.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const scrollspyComponent = 'ScrollSpy'; +const scrollspyComponent = "ScrollSpy"; export default scrollspyComponent; diff --git a/src/strings/scrollspyString.ts b/src/strings/scrollspyString.ts index 089399ec..5f040048 100644 --- a/src/strings/scrollspyString.ts +++ b/src/strings/scrollspyString.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const scrollspyString = 'scrollspy'; +const scrollspyString = "scrollspy"; export default scrollspyString; diff --git a/src/strings/showClass.ts b/src/strings/showClass.ts index 1d2eacc1..8689ea87 100644 --- a/src/strings/showClass.ts +++ b/src/strings/showClass.ts @@ -1,5 +1,5 @@ /** * Global namespace for most components `show` class. */ -const showClass = 'show'; +const showClass = "show"; export default showClass; diff --git a/src/strings/stickyTopClass.ts b/src/strings/stickyTopClass.ts index e53d2435..7069728a 100644 --- a/src/strings/stickyTopClass.ts +++ b/src/strings/stickyTopClass.ts @@ -1,5 +1,5 @@ /** * Global namespace for components `sticky-top` class. */ -const stickyTopClass = 'sticky-top'; +const stickyTopClass = "sticky-top"; export default stickyTopClass; diff --git a/src/strings/tabComponent.ts b/src/strings/tabComponent.ts index ece29be2..f835f478 100644 --- a/src/strings/tabComponent.ts +++ b/src/strings/tabComponent.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const tabComponent = 'Tab'; +const tabComponent = "Tab"; export default tabComponent; diff --git a/src/strings/tabString.ts b/src/strings/tabString.ts index 31126ffb..06dc0108 100644 --- a/src/strings/tabString.ts +++ b/src/strings/tabString.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const tabString = 'tab'; +const tabString = "tab"; export default tabString; diff --git a/src/strings/toastComponent.ts b/src/strings/toastComponent.ts index fe7edece..67bde358 100644 --- a/src/strings/toastComponent.ts +++ b/src/strings/toastComponent.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const toastComponent = 'Toast'; +const toastComponent = "Toast"; export default toastComponent; diff --git a/src/strings/toastString.ts b/src/strings/toastString.ts index 78d99b18..9b5b9296 100644 --- a/src/strings/toastString.ts +++ b/src/strings/toastString.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const toastString = 'toast'; +const toastString = "toast"; export default toastString; diff --git a/src/strings/tooltipComponent.ts b/src/strings/tooltipComponent.ts index 4af1150f..2da9ebc5 100644 --- a/src/strings/tooltipComponent.ts +++ b/src/strings/tooltipComponent.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const tooltipComponent = 'Tooltip'; +const tooltipComponent = "Tooltip"; export default tooltipComponent; diff --git a/src/strings/tooltipString.ts b/src/strings/tooltipString.ts index 3250bf82..41b8de00 100644 --- a/src/strings/tooltipString.ts +++ b/src/strings/tooltipString.ts @@ -1,3 +1,3 @@ /** @type {string} */ -const tooltipString = 'tooltip'; +const tooltipString = "tooltip"; export default tooltipString; diff --git a/src/util/backdrop.ts b/src/util/backdrop.ts index 5f14d42b..cf51da46 100644 --- a/src/util/backdrop.ts +++ b/src/util/backdrop.ts @@ -7,23 +7,23 @@ import { querySelector, reflow, removeClass, -} from '@thednp/shorty'; +} from "@thednp/shorty"; -import fadeClass from '../strings/fadeClass'; -import showClass from '../strings/showClass'; -import modalString from '../strings/modalString'; -import offcanvasString from '../strings/offcanvasString'; -import { resetScrollbar } from './scrollbar'; -import { appendPopup, removePopup } from './popupContainer'; +import fadeClass from "../strings/fadeClass"; +import showClass from "../strings/showClass"; +import modalString from "../strings/modalString"; +import offcanvasString from "../strings/offcanvasString"; +import { resetScrollbar } from "./scrollbar"; +import { appendPopup, removePopup } from "./popupContainer"; -const backdropString = 'backdrop'; +const backdropString = "backdrop"; const modalBackdropClass = `${modalString}-${backdropString}`; const offcanvasBackdropClass = `${offcanvasString}-${backdropString}`; const modalActiveSelector = `.${modalString}.${showClass}`; const offcanvasActiveSelector = `.${offcanvasString}.${showClass}`; // any document would suffice -const overlay = createElement('div') as HTMLElement; +const overlay = createElement("div") as HTMLElement; /** * Returns the current active modal / offcancas element. @@ -32,7 +32,10 @@ const overlay = createElement('div') as HTMLElement; * @returns the requested element */ const getCurrentOpen = (element?: HTMLElement): HTMLElement | null => { - return querySelector(`${modalActiveSelector},${offcanvasActiveSelector}`, getDocument(element)); + return querySelector( + `${modalActiveSelector},${offcanvasActiveSelector}`, + getDocument(element), + ); }; /** @@ -42,7 +45,7 @@ const getCurrentOpen = (element?: HTMLElement): HTMLElement | null => { */ const toggleOverlayType = (isModal?: boolean) => { const targetClass = isModal ? modalBackdropClass : offcanvasBackdropClass; - [modalBackdropClass, offcanvasBackdropClass].forEach(c => { + [modalBackdropClass, offcanvasBackdropClass].forEach((c) => { removeClass(overlay, c); }); addClass(overlay, targetClass); @@ -55,7 +58,11 @@ const toggleOverlayType = (isModal?: boolean) => { * @param hasFade * @param isModal */ -const appendOverlay = (element: HTMLElement, hasFade: boolean, isModal?: boolean) => { +const appendOverlay = ( + element: HTMLElement, + hasFade: boolean, + isModal?: boolean, +) => { toggleOverlayType(isModal); appendPopup(overlay, getDocumentBody(element)); if (hasFade) addClass(overlay, fadeClass); diff --git a/src/util/createTip.ts b/src/util/createTip.ts index 7817999e..2ed57d9f 100644 --- a/src/util/createTip.ts +++ b/src/util/createTip.ts @@ -1,13 +1,21 @@ -import { addClass, createElement, hasClass, isHTMLElement, isRTL, querySelector, setAttribute } from '@thednp/shorty'; - -import tooltipComponent from '../strings/tooltipComponent'; -import tooltipString from '../strings/tooltipString'; -import popoverString from '../strings/popoverString'; -import fadeClass from '../strings/fadeClass'; -import tipClassPositions from './tipClassPositions'; -import setHtml from './setHtml'; -import Tooltip from '../components/tooltip'; -import Popover from '../components/popover'; +import { + addClass, + createElement, + hasClass, + isHTMLElement, + isRTL, + querySelector, + setAttribute, +} from "@thednp/shorty"; + +import tooltipComponent from "../strings/tooltipComponent"; +import tooltipString from "../strings/tooltipString"; +import popoverString from "../strings/popoverString"; +import fadeClass from "../strings/fadeClass"; +import tipClassPositions from "./tipClassPositions"; +import setHtml from "./setHtml"; +import Tooltip from "../components/tooltip"; +import Popover from "../components/popover"; /** * Creates a new tooltip / popover. @@ -18,15 +26,25 @@ const createTip = (self: Tooltip | Popover) => { const isTooltip = self.name === tooltipComponent; const { id, element, options } = self; - const { title, placement, template, animation, customClass, sanitizeFn, dismissible, content, btnClose } = options; + const { + title, + placement, + template, + animation, + customClass, + sanitizeFn, + dismissible, + content, + btnClose, + } = options; const tipString = isTooltip ? tooltipString : popoverString; const tipPositions = { ...tipClassPositions }; let titleParts: Node[] = []; let contentParts: Node[] = []; if (isRTL(element)) { - tipPositions.left = 'end'; - tipPositions.right = 'start'; + tipPositions.left = "end"; + tipPositions.right = "start"; } // set initial popover class @@ -37,7 +55,7 @@ const createTip = (self: Tooltip | Popover) => { if (isHTMLElement(template)) { tooltipTemplate = template; } else { - const htmlMarkup = createElement('div') as HTMLElement; + const htmlMarkup = createElement("div") as HTMLElement; setHtml(htmlMarkup, template, sanitizeFn); tooltipTemplate = htmlMarkup.firstChild as HTMLElement; } @@ -45,18 +63,22 @@ const createTip = (self: Tooltip | Popover) => { // set popover markup self.tooltip = isHTMLElement(tooltipTemplate) ? (tooltipTemplate.cloneNode(true) as HTMLElement) - : // istanbul ignore next @preserve - undefined; + // istanbul ignore next @preserve + : undefined; const { tooltip } = self; // istanbul ignore else @preserve if (tooltip) { // set id and role attributes - setAttribute(tooltip, 'id', id); - setAttribute(tooltip, 'role', tooltipString); - - const bodyClass = isTooltip ? `${tooltipString}-inner` : `${popoverString}-body`; - const tooltipHeader = isTooltip ? null : querySelector(`.${popoverString}-header`, tooltip); + setAttribute(tooltip, "id", id); + setAttribute(tooltip, "role", tooltipString); + + const bodyClass = isTooltip + ? `${tooltipString}-inner` + : `${popoverString}-body`; + const tooltipHeader = isTooltip + ? null + : querySelector(`.${popoverString}-header`, tooltip); const tooltipBody = querySelector(`.${bodyClass}`, tooltip); // set arrow and enable access for styleTip @@ -65,14 +87,14 @@ const createTip = (self: Tooltip | Popover) => { if (isHTMLElement(title)) titleParts = [title.cloneNode(true)]; else { - const tempTitle = createElement('div') as HTMLElement; + const tempTitle = createElement("div") as HTMLElement; setHtml(tempTitle, title, sanitizeFn); titleParts = [...[...tempTitle.childNodes]]; } if (isHTMLElement(content)) contentParts = [content.cloneNode(true)]; else { - const tempContent = createElement('div') as HTMLElement; + const tempContent = createElement("div") as HTMLElement; setHtml(tempContent, content, sanitizeFn); contentParts = [...[...tempContent.childNodes]]; } @@ -83,7 +105,7 @@ const createTip = (self: Tooltip | Popover) => { if (isHTMLElement(btnClose)) { titleParts = [...titleParts, btnClose.cloneNode(true)]; } else { - const tempBtn = createElement('div') as HTMLElement; + const tempBtn = createElement("div") as HTMLElement; setHtml(tempBtn, btnClose, sanitizeFn); titleParts = [...titleParts, tempBtn.firstChild as Node]; } @@ -93,7 +115,7 @@ const createTip = (self: Tooltip | Popover) => { if (isHTMLElement(btnClose)) { contentParts = [...contentParts, btnClose.cloneNode(true)]; } else { - const tempBtn = createElement('div') as HTMLElement; + const tempBtn = createElement("div") as HTMLElement; setHtml(tempBtn, btnClose, sanitizeFn); contentParts = [...contentParts, tempBtn.firstChild as Node]; } @@ -113,13 +135,13 @@ const createTip = (self: Tooltip | Popover) => { setHtml(tooltipBody, contentParts, sanitizeFn); } // set btn - self.btn = querySelector('.btn-close', tooltip) || undefined; + self.btn = querySelector(".btn-close", tooltip) || undefined; } else if (title && tooltipBody) setHtml(tooltipBody, title, sanitizeFn); // Bootstrap 5.2.x // addClass(tooltip, 'position-absolute'); - addClass(tooltip, 'position-fixed'); - addClass(arrow, 'position-absolute'); + addClass(tooltip, "position-fixed"); + addClass(arrow, "position-absolute"); // set popover animation and placement // istanbul ignore else @preserve diff --git a/src/util/getElementContainer.ts b/src/util/getElementContainer.ts index 5475e351..46a4345d 100644 --- a/src/util/getElementContainer.ts +++ b/src/util/getElementContainer.ts @@ -1,4 +1,10 @@ -import { getDocument, getElementStyle, getParentNode, isShadowRoot, isTableElement } from '@thednp/shorty'; +import { + getDocument, + getElementStyle, + getParentNode, + isShadowRoot, + isTableElement, +} from "@thednp/shorty"; /** * Returns an `HTMLElement` to be used as default value for *options.container* @@ -10,7 +16,7 @@ import { getDocument, getElementStyle, getParentNode, isShadowRoot, isTableEleme * @returns the query result */ const getElementContainer = (element: HTMLElement): ParentNode => { - const majorBlockTags = ['HTML', 'BODY']; + const majorBlockTags = ["HTML", "BODY"]; const containers: ParentNode[] = []; let { parentNode } = element as Node; @@ -25,8 +31,10 @@ const getElementContainer = (element: HTMLElement): ParentNode => { return ( containers.find((c, i) => { if ( - getElementStyle(c as HTMLElement, 'position') !== 'relative' && - containers.slice(i + 1).every(r => getElementStyle(r as HTMLElement, 'position') === 'static') + getElementStyle(c as HTMLElement, "position") !== "relative" && + containers.slice(i + 1).every((r) => + getElementStyle(r as HTMLElement, "position") === "static" + ) ) { return c; } diff --git a/src/util/getTargetElement.ts b/src/util/getTargetElement.ts index e1d8d220..059345ef 100644 --- a/src/util/getTargetElement.ts +++ b/src/util/getTargetElement.ts @@ -1,8 +1,13 @@ -import { closest, getAttribute, getDocument, querySelector } from '@thednp/shorty'; +import { + closest, + getAttribute, + getDocument, + querySelector, +} from "@thednp/shorty"; -import dataBsTarget from '../strings/dataBsTarget'; -import dataBsParent from '../strings/dataBsParent'; -import dataBsContainer from '../strings/dataBsContainer'; +import dataBsTarget from "../strings/dataBsTarget"; +import dataBsParent from "../strings/dataBsParent"; +import dataBsContainer from "../strings/dataBsContainer"; /** * Returns the `Element` that THIS one targets @@ -12,18 +17,20 @@ import dataBsContainer from '../strings/dataBsContainer'; * @returns the query result */ const getTargetElement = (element: HTMLElement) => { - const targetAttr = [dataBsTarget, dataBsParent, dataBsContainer, 'href']; + const targetAttr = [dataBsTarget, dataBsParent, dataBsContainer, "href"]; const doc = getDocument(element); return targetAttr - .map(att => { + .map((att) => { const attValue = getAttribute(element, att); if (attValue) { - return att === dataBsParent ? closest(element, attValue) : querySelector(attValue, doc); + return att === dataBsParent + ? closest(element, attValue) + : querySelector(attValue, doc); } return null; }) - .filter(x => x)[0]; + .filter((x) => x)[0]; }; export default getTargetElement; diff --git a/src/util/getTipTemplate.ts b/src/util/getTipTemplate.ts index a65d09b3..344866e8 100644 --- a/src/util/getTipTemplate.ts +++ b/src/util/getTipTemplate.ts @@ -1,4 +1,4 @@ -import tooltipString from '../strings/tooltipString'; +import tooltipString from "../strings/tooltipString"; /** * Returns a template for Popover / Tooltip. @@ -9,10 +9,12 @@ import tooltipString from '../strings/tooltipString'; const getTipTemplate = (tipType: string) => { const isTooltip = tipType === tooltipString; const bodyClass = isTooltip ? `${tipType}-inner` : `${tipType}-body`; - const header = !isTooltip ? `

` : ''; + const header = !isTooltip ? `

` : ""; const arrow = `
`; const body = `
`; - return `
${header + arrow + body}
`; + return `
${ + header + arrow + body + }
`; }; export default getTipTemplate; diff --git a/src/util/init.ts b/src/util/init.ts index 13479173..667cd03f 100644 --- a/src/util/init.ts +++ b/src/util/init.ts @@ -1,19 +1,19 @@ -import { Data, getElementsByTagName, matches } from '@thednp/shorty'; +import { Data, getElementsByTagName, matches } from "@thednp/shorty"; -import { addListener } from '@thednp/event-listener'; +import { addListener } from "@thednp/event-listener"; -import Alert from '../components/alert'; -import Button from '../components/button'; -import Carousel from '../components/carousel'; -import Collapse from '../components/collapse'; -import Dropdown from '../components/dropdown'; -import Modal from '../components/modal'; -import Offcanvas from '../components/offcanvas'; -import Popover from '../components/popover'; -import ScrollSpy from '../components/scrollspy'; -import Tab from '../components/tab'; -import Toast from '../components/toast'; -import Tooltip from '../components/tooltip'; +import Alert from "../components/alert"; +import Button from "../components/button"; +import Carousel from "../components/carousel"; +import Collapse from "../components/collapse"; +import Dropdown from "../components/dropdown"; +import Modal from "../components/modal"; +import Offcanvas from "../components/offcanvas"; +import Popover from "../components/popover"; +import ScrollSpy from "../components/scrollspy"; +import Tab from "../components/tab"; +import Toast from "../components/toast"; +import Tooltip from "../components/tooltip"; const componentsList = new Map< string, @@ -45,9 +45,20 @@ type Component = | Toast | Tooltip; -[Alert, Button, Carousel, Collapse, Dropdown, Modal, Offcanvas, Popover, ScrollSpy, Tab, Toast, Tooltip].forEach(c => - componentsList.set(c.prototype.name, c), -); +[ + Alert, + Button, + Carousel, + Collapse, + Dropdown, + Modal, + Offcanvas, + Popover, + ScrollSpy, + Tab, + Toast, + Tooltip, +].forEach((c) => componentsList.set(c.prototype.name, c)); /** * Initialize all matched `Element`s for one component. @@ -59,7 +70,7 @@ const initComponentDataAPI = ( callback: (el: HTMLElement) => Component, collection: HTMLCollectionOf | HTMLElement[], ) => { - [...collection].forEach(x => callback(x)); + [...collection].forEach((x) => callback(x)); }; /** @@ -87,13 +98,13 @@ const removeComponentDataAPI = (component: string, context: ParentNode) => { */ export const initCallback = (context?: ParentNode) => { const lookUp = context && context.nodeName ? context : document; - const elemCollection = [...getElementsByTagName('*', lookUp)]; + const elemCollection = [...getElementsByTagName("*", lookUp)]; - componentsList.forEach(cs => { + componentsList.forEach((cs) => { const { init, selector } = cs; initComponentDataAPI( init, - elemCollection.filter(item => matches(item, selector)), + elemCollection.filter((item) => matches(item, selector)), ); }); }; @@ -106,7 +117,7 @@ export const initCallback = (context?: ParentNode) => { export const removeDataAPI = (context?: ParentNode) => { const lookUp = context && context.nodeName ? context : document; - componentsList.forEach(comp => { + componentsList.forEach((comp) => { removeComponentDataAPI(comp.prototype.name, lookUp); }); }; @@ -114,7 +125,7 @@ export const removeDataAPI = (context?: ParentNode) => { // Bulk initialize all components if (document.body) initCallback(); else { - addListener(document, 'DOMContentLoaded', () => initCallback(), { + addListener(document, "DOMContentLoaded", () => initCallback(), { once: true, }); } diff --git a/src/util/isEmptyAnchor.ts b/src/util/isEmptyAnchor.ts index 42af6f35..b93213d7 100644 --- a/src/util/isEmptyAnchor.ts +++ b/src/util/isEmptyAnchor.ts @@ -1,4 +1,4 @@ -import { closest, getAttribute, hasAttribute } from '@thednp/shorty'; +import { closest, getAttribute, hasAttribute } from "@thednp/shorty"; /** * Checks if an *event.target* or its parent has an `href="#"` value. @@ -9,16 +9,16 @@ import { closest, getAttribute, hasAttribute } from '@thednp/shorty'; */ const isEmptyAnchor = (element: HTMLElement) => { // `EventTarget` must be `HTMLElement` - const parentAnchor = closest(element, 'A'); + const parentAnchor = closest(element, "A"); return ( - (element.tagName === 'A' && + (element.tagName === "A" && // anchor href starts with # - hasAttribute(element, 'href') && - (getAttribute(element, 'href') as string).slice(-1) === '#') || + hasAttribute(element, "href") && + (getAttribute(element, "href") as string).slice(-1) === "#") || // OR a child of an anchor with href starts with # (parentAnchor && - hasAttribute(parentAnchor, 'href') && - (getAttribute(parentAnchor, 'href') as string).slice(-1) === '#') + hasAttribute(parentAnchor, "href") && + (getAttribute(parentAnchor, "href") as string).slice(-1) === "#") ); }; export default isEmptyAnchor; diff --git a/src/util/isVisible.ts b/src/util/isVisible.ts index c3cb5aad..d935070c 100644 --- a/src/util/isVisible.ts +++ b/src/util/isVisible.ts @@ -1,10 +1,12 @@ -import { getElementStyle, isHTMLElement } from '@thednp/shorty'; +import { getElementStyle, isHTMLElement } from "@thednp/shorty"; /** * @param element target * @returns the check result */ const isVisible = (element: HTMLElement) => { - return isHTMLElement(element) && getElementStyle(element, 'visibility') !== 'hidden' && element.offsetParent !== null; + return isHTMLElement(element) && + getElementStyle(element, "visibility") !== "hidden" && + element.offsetParent !== null; }; export default isVisible; diff --git a/src/util/popupContainer.ts b/src/util/popupContainer.ts index 4f14099a..731cb93a 100644 --- a/src/util/popupContainer.ts +++ b/src/util/popupContainer.ts @@ -1,14 +1,17 @@ -import { createElement, getDocumentBody, isNode } from '@thednp/shorty'; +import { createElement, getDocumentBody, isNode } from "@thednp/shorty"; // the default container for Modal, Offcanvas, Popover and Tooltip const popupContainer = createElement({ - tagName: 'div', - className: 'popup-container', + tagName: "div", + className: "popup-container", }) as HTMLElement; const appendPopup = (target: HTMLElement, customContainer?: ParentNode) => { - const containerIsBody = isNode(customContainer) && customContainer.nodeName === 'BODY'; - const lookup = isNode(customContainer) && !containerIsBody ? customContainer : popupContainer; + const containerIsBody = isNode(customContainer) && + customContainer.nodeName === "BODY"; + const lookup = isNode(customContainer) && !containerIsBody + ? customContainer + : popupContainer; const BODY = containerIsBody ? customContainer : getDocumentBody(target); // istanbul ignore else @preserve @@ -21,8 +24,11 @@ const appendPopup = (target: HTMLElement, customContainer?: ParentNode) => { }; const removePopup = (target: HTMLElement, customContainer?: ParentNode) => { - const containerIsBody = isNode(customContainer) && customContainer.nodeName === 'BODY'; - const lookup = isNode(customContainer) && !containerIsBody ? customContainer : popupContainer; + const containerIsBody = isNode(customContainer) && + customContainer.nodeName === "BODY"; + const lookup = isNode(customContainer) && !containerIsBody + ? customContainer + : popupContainer; // istanbul ignore else @preserve if (isNode(target)) { @@ -35,7 +41,9 @@ const removePopup = (target: HTMLElement, customContainer?: ParentNode) => { }; const hasPopup = (target: HTMLElement, customContainer?: ParentNode) => { - const lookup = isNode(customContainer) && customContainer.nodeName !== 'BODY' ? customContainer : popupContainer; + const lookup = isNode(customContainer) && customContainer.nodeName !== "BODY" + ? customContainer + : popupContainer; return isNode(target) && lookup.contains(target); }; diff --git a/src/util/scrollbar.ts b/src/util/scrollbar.ts index b0d60c51..3dc33eda 100644 --- a/src/util/scrollbar.ts +++ b/src/util/scrollbar.ts @@ -6,19 +6,19 @@ import { getWindow, hasClass, setElementStyle, -} from '@thednp/shorty'; +} from "@thednp/shorty"; -import fixedTopClass from '../strings/fixedTopClass'; -import fixedBottomClass from '../strings/fixedBottomClass'; -import stickyTopClass from '../strings/stickyTopClass'; -import positionStickyClass from '../strings/positionStickyClass'; +import fixedTopClass from "../strings/fixedTopClass"; +import fixedBottomClass from "../strings/fixedBottomClass"; +import stickyTopClass from "../strings/stickyTopClass"; +import positionStickyClass from "../strings/positionStickyClass"; const getFixedItems = (parent?: ParentNode) => [ ...getElementsByClassName(fixedTopClass, parent), ...getElementsByClassName(fixedBottomClass, parent), ...getElementsByClassName(stickyTopClass, parent), ...getElementsByClassName(positionStickyClass, parent), - ...getElementsByClassName('is-fixed', parent), + ...getElementsByClassName("is-fixed", parent), ]; /** @@ -30,18 +30,18 @@ const getFixedItems = (parent?: ParentNode) => [ export const resetScrollbar = (element?: HTMLElement) => { const bd = getDocumentBody(element); setElementStyle(bd, { - paddingRight: '', - overflow: '', + paddingRight: "", + overflow: "", }); const fixedItems = getFixedItems(bd); // istanbul ignore else @preserve if (fixedItems.length) { - fixedItems.forEach(fixed => { + fixedItems.forEach((fixed) => { setElementStyle(fixed, { - paddingRight: '', - marginRight: '', + paddingRight: "", + marginRight: "", }); }); } @@ -69,26 +69,28 @@ export const measureScrollbar = (element: HTMLElement) => { */ export const setScrollbar = (element: HTMLElement, overflow?: boolean) => { const bd = getDocumentBody(element); - const bodyPad = parseInt(getElementStyle(bd, 'paddingRight'), 10); - const isOpen = getElementStyle(bd, 'overflow') === 'hidden'; + const bodyPad = parseInt(getElementStyle(bd, "paddingRight"), 10); + const isOpen = getElementStyle(bd, "overflow") === "hidden"; const sbWidth = isOpen && bodyPad ? 0 : measureScrollbar(element); const fixedItems = getFixedItems(bd); // istanbul ignore else @preserve if (overflow) { setElementStyle(bd, { - overflow: 'hidden', + overflow: "hidden", paddingRight: `${bodyPad + sbWidth}px`, }); // istanbul ignore else @preserve if (fixedItems.length) { - fixedItems.forEach(fixed => { - const itemPadValue = getElementStyle(fixed, 'paddingRight'); + fixedItems.forEach((fixed) => { + const itemPadValue = getElementStyle(fixed, "paddingRight"); fixed.style.paddingRight = `${parseInt(itemPadValue, 10) + sbWidth}px`; // istanbul ignore else @preserve - if ([stickyTopClass, positionStickyClass].some(c => hasClass(fixed, c))) { - const itemMValue = getElementStyle(fixed, 'marginRight'); + if ( + [stickyTopClass, positionStickyClass].some((c) => hasClass(fixed, c)) + ) { + const itemMValue = getElementStyle(fixed, "marginRight"); fixed.style.marginRight = `${parseInt(itemMValue, 10) - sbWidth}px`; } }); diff --git a/src/util/setHtml.ts b/src/util/setHtml.ts index c399e0d8..15182d38 100644 --- a/src/util/setHtml.ts +++ b/src/util/setHtml.ts @@ -1,4 +1,11 @@ -import { isArray, isFunction, isHTMLElement, isNode, isNodeList, isString } from '@thednp/shorty'; +import { + isArray, + isFunction, + isHTMLElement, + isNode, + isNodeList, + isString, +} from "@thednp/shorty"; /** * Append an existing `Element` to Popover / Tooltip component or HTML @@ -8,18 +15,24 @@ import { isArray, isFunction, isHTMLElement, isNode, isNodeList, isString } from * @param content the `Element` to append / string * @param sanitizeFn a function to sanitize string content */ -const setHtml = (element: HTMLElement, content: Node[] | Node | string, sanitizeFn?: (s: string) => string) => { +const setHtml = ( + element: HTMLElement, + content: Node[] | Node | string, + sanitizeFn?: (s: string) => string, +) => { // istanbul ignore else @preserve if (isString(content) && content.length) { let dirty = content.trim(); // fixing #233 if (isFunction(sanitizeFn)) dirty = sanitizeFn(dirty); const domParser = new DOMParser(); - const tempDocument = domParser.parseFromString(dirty, 'text/html'); + const tempDocument = domParser.parseFromString(dirty, "text/html"); element.append(...[...tempDocument.body.childNodes]); } else if (isHTMLElement(content)) { element.append(content); - } else if (isNodeList(content) || (isArray(content) && content.every(isNode))) { + } else if ( + isNodeList(content) || (isArray(content) && content.every(isNode)) + ) { element.append(...[...content]); } }; diff --git a/src/util/styleTip.ts b/src/util/styleTip.ts index b7650f60..72c771c8 100644 --- a/src/util/styleTip.ts +++ b/src/util/styleTip.ts @@ -8,13 +8,13 @@ import { isRTL, setElementStyle, toLowerCase, -} from '@thednp/shorty'; +} from "@thednp/shorty"; -import popoverComponent from '../strings/popoverComponent'; -import tipClassPositions from './tipClassPositions'; -import Tooltip from '../components/tooltip'; -import type { TooltipEvent } from '../interface/tooltip'; -import type { PopoverEvent } from '../interface/popover'; +import popoverComponent from "../strings/popoverComponent"; +import tipClassPositions from "./tipClassPositions"; +import Tooltip from "../components/tooltip"; +import type { TooltipEvent } from "../interface/tooltip"; +import type { PopoverEvent } from "../interface/popover"; /** * Style popovers and tooltips. @@ -33,24 +33,30 @@ const styleTip = (self: T) => { // reset tooltip style (top: 0, left: 0 works best) setElementStyle(tooltip, { // top: '0px', left: '0px', right: '', bottom: '', - top: '', - left: '', - right: '', - bottom: '', + top: "", + left: "", + right: "", + bottom: "", }); const isPopover = self.name === popoverComponent; const { offsetWidth: tipWidth, offsetHeight: tipHeight } = tooltip; - const { clientWidth: htmlcw, clientHeight: htmlch, offsetWidth: htmlow } = getDocumentElement(element); + const { clientWidth: htmlcw, clientHeight: htmlch, offsetWidth: htmlow } = + getDocumentElement(element); let { placement } = options; - const { clientWidth: parentCWidth, offsetWidth: parentOWidth } = container as HTMLElement; - const parentPosition = getElementStyle(container as HTMLElement, 'position'); - const fixedParent = parentPosition === 'fixed'; - const scrollbarWidth = fixedParent ? Math.abs(parentCWidth - parentOWidth) : Math.abs(htmlcw - htmlow); - const leftBoundry = - RTL && fixedParent - ? // istanbul ignore next @preserve - scrollbarWidth - : 0; + const { clientWidth: parentCWidth, offsetWidth: parentOWidth } = + container as HTMLElement; + const parentPosition = getElementStyle( + container as HTMLElement, + "position", + ); + const fixedParent = parentPosition === "fixed"; + const scrollbarWidth = fixedParent + ? Math.abs(parentCWidth - parentOWidth) + : Math.abs(htmlcw - htmlow); + const leftBoundry = RTL && fixedParent + // istanbul ignore next @preserve + ? scrollbarWidth + : 0; const rightBoundry = htmlcw - (!RTL ? scrollbarWidth : 0) - 1; const { width: elemWidth, @@ -65,18 +71,18 @@ const styleTip = (self: T) => { }; // reset arrow style setElementStyle(arrow as HTMLElement, { - top: '', - left: '', - right: '', - bottom: '', + top: "", + left: "", + right: "", + bottom: "", }); let topPosition: number | string = 0; - let bottomPosition: number | string = ''; + let bottomPosition: number | string = ""; let leftPosition: number | string = 0; - let rightPosition: number | string = ''; - let arrowTop: number | string = ''; - let arrowLeft: number | string = ''; - let arrowRight: number | string = ''; + let rightPosition: number | string = ""; + let arrowTop: number | string = ""; + let arrowLeft: number | string = ""; + let arrowRight: number | string = ""; const arrowWidth = (arrow as HTMLElement).offsetWidth || 0; const arrowHeight = (arrow as HTMLElement).offsetHeight || 0; @@ -84,12 +90,14 @@ const styleTip = (self: T) => { // check placement let topExceed = elemRectTop - tipHeight - arrowHeight < 0; - let bottomExceed = elemRectTop + tipHeight + elemHeight + arrowHeight >= htmlch; + let bottomExceed = + elemRectTop + tipHeight + elemHeight + arrowHeight >= htmlch; let leftExceed = elemRectLeft - tipWidth - arrowWidth < leftBoundry; - let rightExceed = elemRectLeft + tipWidth + elemWidth + arrowWidth >= rightBoundry; + let rightExceed = + elemRectLeft + tipWidth + elemWidth + arrowWidth >= rightBoundry; - const horizontals = ['left', 'right']; - const verticals = ['top', 'bottom']; + const horizontals = ["left", "right"]; + const verticals = ["top", "bottom"]; topExceed = horizontals.includes(placement) ? elemRectTop + elemHeight / 2 - tipHeight / 2 - arrowHeight < 0 @@ -97,34 +105,40 @@ const styleTip = (self: T) => { bottomExceed = horizontals.includes(placement) ? elemRectTop + tipHeight / 2 + elemHeight / 2 + arrowHeight >= htmlch : bottomExceed; - leftExceed = verticals.includes(placement) ? elemRectLeft + elemWidth / 2 - tipWidth / 2 < leftBoundry : leftExceed; + leftExceed = verticals.includes(placement) + ? elemRectLeft + elemWidth / 2 - tipWidth / 2 < leftBoundry + : leftExceed; rightExceed = verticals.includes(placement) ? elemRectLeft + tipWidth / 2 + elemWidth / 2 >= rightBoundry : rightExceed; // first remove side positions if both left and right limits are exceeded // we usually fall back to top|bottom - placement = horizontals.includes(placement) && leftExceed && rightExceed ? 'top' : placement; + placement = horizontals.includes(placement) && leftExceed && rightExceed + ? "top" + : placement; // recompute placement - placement = placement === 'top' && topExceed ? 'bottom' : placement; - placement = placement === 'bottom' && bottomExceed ? 'top' : placement; - placement = placement === 'left' && leftExceed ? 'right' : placement; - placement = - placement === 'right' && rightExceed - ? 'left' - : // istanbul ignore next @preserve - placement; + placement = placement === "top" && topExceed ? "bottom" : placement; + placement = placement === "bottom" && bottomExceed ? "top" : placement; + placement = placement === "left" && leftExceed ? "right" : placement; + placement = placement === "right" && rightExceed + ? "left" + // istanbul ignore next @preserve + : placement; // update tooltip/popover class if (!tooltip.className.includes(placement)) { - tooltip.className = tooltip.className.replace(tipClasses, tipPositions[placement]); + tooltip.className = tooltip.className.replace( + tipClasses, + tipPositions[placement], + ); } // compute tooltip / popover coordinates // istanbul ignore else @preserve if (horizontals.includes(placement)) { // secondary|side positions - if (placement === 'left') { + if (placement === "left") { // LEFT leftPosition = x - tipWidth - (isPopover ? arrowWidth : 0); } else { @@ -139,18 +153,18 @@ const styleTip = (self: T) => { arrowTop = elemRectTop + elemHeight / 2 - arrowHeight / 2; } else if (topExceed) { topPosition = y; - bottomPosition = ''; + bottomPosition = ""; arrowTop = elemHeight / 2 - arrowWidth; } else if (bottomExceed) { topPosition = y - tipHeight + elemHeight; - bottomPosition = ''; + bottomPosition = ""; arrowTop = tipHeight - elemHeight / 2 - arrowWidth; } else { topPosition = y - tipHeight / 2 + elemHeight / 2; arrowTop = tipHeight / 2 - arrowHeight / 2; } } else if (verticals.includes(placement)) { - if (placement === 'top') { + if (placement === "top") { topPosition = y - tipHeight - (isPopover ? arrowHeight : 0); } else { // BOTTOM @@ -162,7 +176,7 @@ const styleTip = (self: T) => { leftPosition = 0; arrowLeft = x + elemWidth / 2 - arrowAdjust; } else if (rightExceed) { - leftPosition = 'auto'; + leftPosition = "auto"; rightPosition = 0; arrowRight = elemWidth / 2 + rightBoundry - elemRectRight - arrowAdjust; } else { @@ -174,24 +188,27 @@ const styleTip = (self: T) => { // apply style to tooltip/popover setElementStyle(tooltip, { top: `${topPosition}px`, - bottom: bottomPosition === '' ? '' : `${bottomPosition}px`, - left: leftPosition === 'auto' ? leftPosition : `${leftPosition}px`, - right: rightPosition !== '' ? `${rightPosition}px` : '', + bottom: bottomPosition === "" ? "" : `${bottomPosition}px`, + left: leftPosition === "auto" ? leftPosition : `${leftPosition}px`, + right: rightPosition !== "" ? `${rightPosition}px` : "", }); // update arrow placement // istanbul ignore else @preserve if (isHTMLElement(arrow)) { - if (arrowTop !== '') { + if (arrowTop !== "") { arrow.style.top = `${arrowTop}px`; } - if (arrowLeft !== '') { + if (arrowLeft !== "") { arrow.style.left = `${arrowLeft}px`; - } else if (arrowRight !== '') { + } else if (arrowRight !== "") { arrow.style.right = `${arrowRight}px`; } } - const updatedTooltipEvent = createCustomEvent, TooltipEvent | PopoverEvent>( + const updatedTooltipEvent = createCustomEvent< + Record, + TooltipEvent | PopoverEvent + >( `updated.bs.${toLowerCase(self.name)}`, ); dispatchEvent(element, updatedTooltipEvent); diff --git a/src/util/tipClassPositions.ts b/src/util/tipClassPositions.ts index b1032e08..4279fd14 100644 --- a/src/util/tipClassPositions.ts +++ b/src/util/tipClassPositions.ts @@ -1,8 +1,8 @@ const tipClassPositions = { - top: 'top', - bottom: 'bottom', - left: 'start', - right: 'end', + top: "top", + bottom: "bottom", + left: "start", + right: "end", }; export default tipClassPositions; diff --git a/src/util/tooltipDefaults.ts b/src/util/tooltipDefaults.ts index 127a1fb2..d9c4d956 100644 --- a/src/util/tooltipDefaults.ts +++ b/src/util/tooltipDefaults.ts @@ -1,19 +1,19 @@ -import getTipTemplate from './getTipTemplate'; -import tooltipString from '../strings/tooltipString'; -import { TooltipOptions } from '../interface/tooltip'; +import getTipTemplate from "./getTipTemplate"; +import tooltipString from "../strings/tooltipString"; +import { TooltipOptions } from "../interface/tooltip"; const tooltipDefaults: TooltipOptions = { template: getTipTemplate(tooltipString), - title: '', - customClass: '', - trigger: 'hover focus', - placement: 'top', + title: "", + customClass: "", + trigger: "hover focus", + placement: "top", sanitizeFn: undefined, animation: true, delay: 200, container: document.body, - content: '', + content: "", dismissible: false, - btnClose: '', + btnClose: "", }; export default tooltipDefaults; diff --git a/src/version.ts b/src/version.ts index 05f95e5b..ebbaa2ae 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,4 +1,4 @@ -import { version } from '../package.json'; +import { version } from "../package.json"; const Version = version; diff --git a/test/tooltip.test.ts b/test/tooltip.test.ts index 9f5eda82..ebfa04d0 100644 --- a/test/tooltip.test.ts +++ b/test/tooltip.test.ts @@ -487,87 +487,28 @@ describe("Tooltip Class Tests", () => { instance.dispose(); }); - it("Can handle small devices", async () => { - await page.viewport(800, 150); - const container = getMarkup("tooltip"); - wrapper.append(container); - await vi.waitFor(() => container.querySelector('[data-test="tooltip"]'), 200); - Object.assign(container.style, { padding: "5rem" }); - - const element = container.querySelectorAll('[data-test="tooltip"]')[1]!; - // horizontal - const instance = new Tooltip(element, { placement: "left" }); - instance.show(); - await vi.waitFor(() => { - expect(instance.tooltip?.className).to.contain("show"); - }, 101); - instance.dispose(); - - await new Promise(res => setTimeout(res, 251)); - const instance1 = new Tooltip(element, { placement: "right" }); - - instance1.show(); - await vi.waitFor(() => { - expect(instance1.tooltip?.className).to.contain("show"); - }, 101); - instance1.dispose(); - - await new Promise(res => setTimeout(res, 251)); - const instance2 = new Tooltip(element, { placement: "top" }); - - instance2.show(); - await vi.waitFor(() => { - expect(instance2.tooltip?.className).to.contain("show"); - }, 101); - instance2.dispose(); - - await new Promise(res => setTimeout(res, 251)); - const instance3 = new Tooltip(element, { placement: "bottom" }); - - instance3.show(); - await vi.waitFor(() => { - expect(instance3.tooltip?.className).to.contain("show"); - }, 151); - instance3.dispose(); - await new Promise(res => setTimeout(res, 251)); - - // vertical - await page.viewport(150, 800); - await new Promise(res => setTimeout(res, 251)); - const instance4 = new Tooltip(element, { placement: "left" }); - instance4.show(); - await vi.waitFor(() => { - expect(instance4.tooltip?.className).to.contain("show"); - }, 151); - instance4.dispose(); - - await new Promise(res => setTimeout(res, 251)); - const instance5 = new Tooltip(element, { placement: "right" }); - - instance5.show(); - await vi.waitFor(() => { - expect(instance5.tooltip?.className).to.contain("show"); - }, 151); - instance5.dispose(); - - await new Promise(res => setTimeout(res, 251)); - const instance6 = new Tooltip(element, { placement: "top" }); - - instance6.show(); - await vi.waitFor(() => { - expect(instance6.tooltip?.className).to.contain("show"); - }, 151); - instance6.dispose(); - - await new Promise(res => setTimeout(res, 251)); - const instance7 = new Tooltip(element, { placement: "bottom" }); - - instance7.show(); - await vi.waitFor(() => { - expect(instance7.tooltip?.className).to.contain("show"); - }, 151); - instance7.dispose(); - }); + const viewports = [[800,150], [150,800]]; + const placements = ['top', 'right', 'bottom', 'left']; + + viewports.forEach(([width, height]) => { + placements.forEach((placement) => { + it(`Can handle small devices ${placement} - ${width}, ${height}`, async () => { + await page.viewport(width, height); + const container = getMarkup("tooltip"); + wrapper.append(container); + await vi.waitFor(() => container.querySelector('[data-test="tooltip"]'), 200); + Object.assign(container.style, { padding: "5rem" }); + + const element = container.querySelectorAll('[data-test="tooltip"]')[1]!; + // horizontal + const instance = new Tooltip(element, { placement: placement as 'top' | 'left' | 'right' | 'bottom' }); + instance.show(); + await vi.waitFor(() => { + expect(instance.tooltip?.className).to.contain("show"); + }, 151); + }) + }) + }) it("Can dispose()", async () => { const container = getMarkup("tooltip");