@coreui/coreui 4.2.5 → 4.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/css/coreui-grid.css +2 -2
- package/dist/css/coreui-grid.css.map +1 -1
- package/dist/css/coreui-grid.min.css +2 -2
- package/dist/css/coreui-grid.min.css.map +1 -1
- package/dist/css/coreui-grid.rtl.css +3 -3
- package/dist/css/coreui-grid.rtl.css.map +1 -1
- package/dist/css/coreui-grid.rtl.min.css +3 -3
- package/dist/css/coreui-grid.rtl.min.css.map +1 -1
- package/dist/css/coreui-reboot.css +2 -2
- package/dist/css/coreui-reboot.css.map +1 -1
- package/dist/css/coreui-reboot.min.css +2 -2
- package/dist/css/coreui-reboot.min.css.map +1 -1
- package/dist/css/coreui-reboot.rtl.css +3 -3
- package/dist/css/coreui-reboot.rtl.css.map +1 -1
- package/dist/css/coreui-reboot.rtl.min.css +3 -3
- package/dist/css/coreui-reboot.rtl.min.css.map +1 -1
- package/dist/css/coreui-utilities.css +2 -2
- package/dist/css/coreui-utilities.css.map +1 -1
- package/dist/css/coreui-utilities.min.css +2 -2
- package/dist/css/coreui-utilities.min.css.map +1 -1
- package/dist/css/coreui-utilities.rtl.css +3 -3
- package/dist/css/coreui-utilities.rtl.css.map +1 -1
- package/dist/css/coreui-utilities.rtl.min.css +3 -3
- package/dist/css/coreui-utilities.rtl.min.css.map +1 -1
- package/dist/css/coreui.css +2 -2
- package/dist/css/coreui.css.map +1 -1
- package/dist/css/coreui.min.css +2 -2
- package/dist/css/coreui.min.css.map +1 -1
- package/dist/css/coreui.rtl.css +3 -3
- package/dist/css/coreui.rtl.css.map +1 -1
- package/dist/css/coreui.rtl.min.css +3 -3
- package/dist/css/coreui.rtl.min.css.map +1 -1
- package/dist/js/coreui.bundle.js +31 -31
- package/dist/js/coreui.bundle.js.map +1 -1
- package/dist/js/coreui.bundle.min.js +2 -2
- package/dist/js/coreui.bundle.min.js.map +1 -1
- package/dist/js/coreui.esm.js +30 -30
- package/dist/js/coreui.esm.js.map +1 -1
- package/dist/js/coreui.esm.min.js +2 -2
- package/dist/js/coreui.esm.min.js.map +1 -1
- package/dist/js/coreui.js +31 -31
- package/dist/js/coreui.js.map +1 -1
- package/dist/js/coreui.min.js +2 -2
- package/dist/js/coreui.min.js.map +1 -1
- package/js/dist/alert.js +2 -2
- package/js/dist/alert.js.map +1 -1
- package/js/dist/base-component.js +3 -3
- package/js/dist/base-component.js.map +1 -1
- package/js/dist/button.js +2 -2
- package/js/dist/button.js.map +1 -1
- package/js/dist/carousel.js +2 -2
- package/js/dist/carousel.js.map +1 -1
- package/js/dist/collapse.js +2 -2
- package/js/dist/collapse.js.map +1 -1
- package/js/dist/dom/data.js +2 -2
- package/js/dist/dom/data.js.map +1 -1
- package/js/dist/dom/event-handler.js +2 -2
- package/js/dist/dom/event-handler.js.map +1 -1
- package/js/dist/dom/manipulator.js +2 -2
- package/js/dist/dom/manipulator.js.map +1 -1
- package/js/dist/dom/selector-engine.js +2 -2
- package/js/dist/dom/selector-engine.js.map +1 -1
- package/js/dist/dropdown.js +2 -2
- package/js/dist/dropdown.js.map +1 -1
- package/js/dist/modal.js +2 -2
- package/js/dist/modal.js.map +1 -1
- package/js/dist/navigation.js +2 -2
- package/js/dist/navigation.js.map +1 -1
- package/js/dist/offcanvas.js +2 -2
- package/js/dist/offcanvas.js.map +1 -1
- package/js/dist/popover.js +2 -2
- package/js/dist/popover.js.map +1 -1
- package/js/dist/scrollspy.js +2 -2
- package/js/dist/scrollspy.js.map +1 -1
- package/js/dist/sidebar.js +2 -2
- package/js/dist/sidebar.js.map +1 -1
- package/js/dist/tab.js +2 -2
- package/js/dist/tab.js.map +1 -1
- package/js/dist/toast.js +2 -2
- package/js/dist/toast.js.map +1 -1
- package/js/dist/tooltip.js +2 -2
- package/js/dist/tooltip.js.map +1 -1
- package/js/dist/util/backdrop.js +2 -2
- package/js/dist/util/backdrop.js.map +1 -1
- package/js/dist/util/component-functions.js +2 -2
- package/js/dist/util/component-functions.js.map +1 -1
- package/js/dist/util/config.js +2 -2
- package/js/dist/util/config.js.map +1 -1
- package/js/dist/util/focustrap.js +2 -2
- package/js/dist/util/focustrap.js.map +1 -1
- package/js/dist/util/index.js +2 -2
- package/js/dist/util/index.js.map +1 -1
- package/js/dist/util/sanitizer.js +2 -2
- package/js/dist/util/sanitizer.js.map +1 -1
- package/js/dist/util/scrollbar.js +2 -2
- package/js/dist/util/scrollbar.js.map +1 -1
- package/js/dist/util/swipe.js +2 -2
- package/js/dist/util/swipe.js.map +1 -1
- package/js/dist/util/template-factory.js +2 -2
- package/js/dist/util/template-factory.js.map +1 -1
- package/js/src/alert.js +1 -1
- package/js/src/base-component.js +2 -2
- package/js/src/button.js +1 -1
- package/js/src/carousel.js +1 -1
- package/js/src/collapse.js +1 -1
- package/js/src/dom/data.js +1 -1
- package/js/src/dom/event-handler.js +1 -1
- package/js/src/dom/manipulator.js +1 -1
- package/js/src/dom/selector-engine.js +1 -1
- package/js/src/dropdown.js +1 -1
- package/js/src/modal.js +1 -1
- package/js/src/navigation.js +1 -1
- package/js/src/offcanvas.js +1 -1
- package/js/src/popover.js +1 -1
- package/js/src/scrollspy.js +1 -1
- package/js/src/sidebar.js +1 -1
- package/js/src/tab.js +1 -1
- package/js/src/toast.js +1 -1
- package/js/src/tooltip.js +1 -1
- package/js/src/util/backdrop.js +1 -1
- package/js/src/util/component-functions.js +1 -1
- package/js/src/util/config.js +1 -1
- package/js/src/util/focustrap.js +1 -1
- package/js/src/util/index.js +1 -1
- package/js/src/util/sanitizer.js +1 -1
- package/js/src/util/scrollbar.js +1 -1
- package/js/src/util/swipe.js +1 -1
- package/js/src/util/template-factory.js +1 -1
- package/package.json +2 -2
- package/scss/_navbar.scss +1 -1
- package/scss/_root.scss +1 -1
- package/scss/_variables.scss +5 -5
- package/scss/coreui-grid.rtl.scss +1 -1
- package/scss/coreui-grid.scss +1 -1
- package/scss/coreui-reboot.rtl.scss +1 -1
- package/scss/coreui-reboot.scss +1 -1
- package/scss/coreui-utilities.rtl.scss +1 -1
- package/scss/coreui-utilities.scss +1 -1
- package/scss/coreui.rtl.scss +1 -1
- package/scss/coreui.scss +1 -1
package/dist/js/coreui.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* CoreUI [object Object] v4.2.
|
|
2
|
+
* CoreUI [object Object] v4.2.6 (https://coreui.io)
|
|
3
3
|
* Copyright 2022 The CoreUI Team (https://github.com/orgs/coreui/people)
|
|
4
4
|
* Licensed under MIT (https://coreui.io)
|
|
5
5
|
*/
|
|
6
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).coreui=e(t.Popper)}(this,(function(t){"use strict";function e(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const i=e(t),s="transitionend",n=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`))),t),o=t=>{t.dispatchEvent(new Event(s))},r=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),a=t=>r(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(n(t)):null,l=t=>{if(!r(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},c=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),h=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?h(t.parentNode):null},d=()=>{},u=t=>{t.offsetHeight},_=()=>window.jQuery&&!document.body.hasAttribute("data-coreui-no-jquery")?window.jQuery:null,g=[],f=()=>"rtl"===document.documentElement.dir,m=t=>{var e;e=()=>{const e=_();if(e){const i=t.NAME,s=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=s,t.jQueryInterface)}},"loading"===document.readyState?(g.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of g)t()})),g.push(e)):e()},p=(t,e=[],i=t)=>"function"==typeof t?t(...e):i,b=(t,e,i=!0)=>{if(!i)return void p(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const s=Number.parseFloat(e),n=Number.parseFloat(i);return s||n?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let r=!1;const a=({target:i})=>{i===e&&(r=!0,e.removeEventListener(s,a),p(t))};e.addEventListener(s,a),setTimeout((()=>{r||o(e)}),n)},v=(t,e,i,s)=>{const n=t.length;let o=t.indexOf(e);return-1===o?!i&&s?t[n-1]:t[0]:(o+=i?1:-1,s&&(o=(o+n)%n),t[Math.max(0,Math.min(o,n-1))])},y=/[^.]*(?=\..*)\.|.*/,w=/\..*/,A=/::\d+$/,E={};let C=1;const T={mouseenter:"mouseover",mouseleave:"mouseout"},k=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function L(t,e){return e&&`${e}::${C++}`||t.uidEvent||C++}function S(t){const e=L(t);return t.uidEvent=e,E[e]=E[e]||{},E[e]}function O(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function N(t,e,i){const s="string"==typeof e,n=s?i:e||i;let o=x(t);return k.has(o)||(o=t),[s,n,o]}function I(t,e,i,s,n){if("string"!=typeof e||!t)return;let[o,r,a]=N(e,i,s);if(e in T){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=S(t),c=l[a]||(l[a]={}),h=O(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&n);const d=L(r,e.replace(y,"")),u=o?function(t,e,i){return function s(n){const o=t.querySelectorAll(e);for(let{target:r}=n;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return P(n,{delegateTarget:r}),s.oneOff&&M.off(t,n.type,e,i),i.apply(r,[n])}}(t,i,r):function(t,e){return function i(s){return P(s,{delegateTarget:t}),i.oneOff&&M.off(t,s.type,e),e.apply(t,[s])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=n,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function D(t,e,i,s,n){const o=O(e[i],s,n);o&&(t.removeEventListener(i,o,Boolean(n)),delete e[i][o.uidEvent])}function $(t,e,i,s){const n=e[i]||{};for(const[o,r]of Object.entries(n))o.includes(s)&&D(t,e,i,r.callable,r.delegationSelector)}function x(t){return t=t.replace(w,""),T[t]||t}const M={on(t,e,i,s){I(t,e,i,s,!1)},one(t,e,i,s){I(t,e,i,s,!0)},off(t,e,i,s){if("string"!=typeof e||!t)return;const[n,o,r]=N(e,i,s),a=r!==e,l=S(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))$(t,l,i,e.slice(1));for(const[i,s]of Object.entries(c)){const n=i.replace(A,"");a&&!e.includes(n)||D(t,l,r,s.callable,s.delegationSelector)}}else{if(!Object.keys(c).length)return;D(t,l,r,o,n?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const s=_();let n=null,o=!0,r=!0,a=!1;e!==x(e)&&s&&(n=s.Event(e,i),s(t).trigger(n),o=!n.isPropagationStopped(),r=!n.isImmediatePropagationStopped(),a=n.isDefaultPrevented());let l=new Event(e,{bubbles:o,cancelable:!0});return l=P(l,i),a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&n&&n.preventDefault(),l}};function P(t,e={}){for(const[i,s]of Object.entries(e))try{t[i]=s}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>s})}return t}const j=new Map,F={set(t,e,i){j.has(t)||j.set(t,new Map);const s=j.get(t);s.has(e)||0===s.size?s.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(t,e)=>j.has(t)&&j.get(t).get(e)||null,remove(t,e){if(!j.has(t))return;const i=j.get(t);i.delete(e),0===i.size&&j.delete(t)}};function z(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function H(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const q={setDataAttribute(t,e,i){t.setAttribute(`data-coreui-${H(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-coreui-${H(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("coreui")&&!t.startsWith("coreuiConfig")));for(const s of i){let i=s.replace(/^coreui/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=z(t.dataset[s])}return e},getDataAttribute:(t,e)=>z(t.getAttribute(`data-coreui-${H(e)}`))};class B{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=r(e)?q.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...r(e)?q.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[s,n]of Object.entries(e)){const e=t[s],o=r(e)?"element":null==(i=e)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(n).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${s}" provided type "${o}" but expected type "${n}".`)}var i}}class W extends B{constructor(t,e){super(),(t=a(t))&&(this._element=t,this._config=this._getConfig(e),F.set(this._element,this.constructor.DATA_KEY,this))}dispose(){F.remove(this._element,this.constructor.DATA_KEY),M.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){b(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return F.get(a(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"4.2.5"}static get DATA_KEY(){return`coreui.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const V=t=>{let e=t.getAttribute("data-coreui-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return n(e)},R={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let s=t.parentNode.closest(e);for(;s;)i.push(s),s=s.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!c(t)&&l(t)))},getSelectorFromElement(t){const e=V(t);return e&&R.findOne(e)?e:null},getElementFromSelector(t){const e=V(t);return e?R.findOne(e):null},getMultipleElementsFromSelector(t){const e=V(t);return e?R.find(e):[]}},K=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,s=t.NAME;M.on(document,i,`[data-coreui-dismiss="${s}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),c(this))return;const n=R.getElementFromSelector(this)||this.closest(`.${s}`);t.getOrCreateInstance(n)[e]()}))};class Q extends W{static get NAME(){return"alert"}close(){if(M.trigger(this._element,"close.coreui.alert").defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),M.trigger(this._element,"closed.coreui.alert"),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=Q.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}K(Q,"close"),m(Q);const U='[data-coreui-toggle="button"]';class Y extends W{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=Y.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}M.on(document,"click.coreui.button.data-api",U,(t=>{t.preventDefault();const e=t.target.closest(U);Y.getOrCreateInstance(e).toggle()})),m(Y);const X={endCallback:null,leftCallback:null,rightCallback:null},G={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class J extends B{constructor(t,e){super(),this._element=t,t&&J.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return X}static get DefaultType(){return G}static get NAME(){return"swipe"}dispose(){M.off(this._element,".coreui.swipe")}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),p(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&p(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(M.on(this._element,"pointerdown.coreui.swipe",(t=>this._start(t))),M.on(this._element,"pointerup.coreui.swipe",(t=>this._end(t))),this._element.classList.add("pointer-event")):(M.on(this._element,"touchstart.coreui.swipe",(t=>this._start(t))),M.on(this._element,"touchmove.coreui.swipe",(t=>this._move(t))),M.on(this._element,"touchend.coreui.swipe",(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Z=".coreui.carousel",tt="next",et="prev",it="left",st="right",nt=`slide${Z}`,ot=`slid${Z}`,rt=`keydown${Z}`,at=`mouseenter${Z}`,lt=`mouseleave${Z}`,ct=`dragstart${Z}`,ht=`load${Z}.data-api`,dt=`click${Z}.data-api`,ut="carousel",_t="active",gt={ArrowLeft:st,ArrowRight:it},ft={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},mt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class pt extends W{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=R.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===ut&&this.cycle()}static get Default(){return ft}static get DefaultType(){return mt}static get NAME(){return"carousel"}next(){this._slide(tt)}nextWhenVisible(){!document.hidden&&l(this._element)&&this.next()}prev(){this._slide(et)}pause(){this._isSliding&&o(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?M.one(this._element,ot,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void M.one(this._element,ot,(()=>this.to(t)));const i=this._getItemIndex(this._getActive());if(i===t)return;const s=t>i?tt:et;this._slide(s,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&M.on(this._element,rt,(t=>this._keydown(t))),"hover"===this._config.pause&&(M.on(this._element,at,(()=>this.pause())),M.on(this._element,lt,(()=>this._maybeEnableCycle()))),this._config.touch&&J.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of R.find(".carousel-item img",this._element))M.on(t,ct,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(it)),rightCallback:()=>this._slide(this._directionToOrder(st)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new J(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=gt[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=R.findOne(".active",this._indicatorsElement);e.classList.remove(_t),e.removeAttribute("aria-current");const i=R.findOne(`[data-coreui-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(_t),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-coreui-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),s=t===tt,n=e||v(this._getItems(),i,s,this._config.wrap);if(n===i)return;const o=this._getItemIndex(n),r=e=>M.trigger(this._element,e,{relatedTarget:n,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r(nt).defaultPrevented)return;if(!i||!n)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=n;const l=s?"carousel-item-start":"carousel-item-end",c=s?"carousel-item-next":"carousel-item-prev";n.classList.add(c),u(n),i.classList.add(l),n.classList.add(l),this._queueCallback((()=>{n.classList.remove(l,c),n.classList.add(_t),i.classList.remove(_t,c,l),this._isSliding=!1,r(ot)}),i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return R.findOne(".active.carousel-item",this._element)}_getItems(){return R.find(".carousel-item",this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return f()?t===it?et:tt:t===it?tt:et}_orderToDirection(t){return f()?t===et?it:st:t===et?st:it}static jQueryInterface(t){return this.each((function(){const e=pt.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}M.on(document,dt,"[data-coreui-slide], [data-coreui-slide-to]",(function(t){const e=R.getElementFromSelector(this);if(!e||!e.classList.contains(ut))return;t.preventDefault();const i=pt.getOrCreateInstance(e),s=this.getAttribute("data-coreui-slide-to");return s?(i.to(s),void i._maybeEnableCycle()):"next"===q.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),M.on(window,ht,(()=>{const t=R.find('[data-coreui-ride="carousel"]');for(const e of t)pt.getOrCreateInstance(e)})),m(pt);const bt=".coreui.collapse",vt=`show${bt}`,yt=`shown${bt}`,wt=`hide${bt}`,At=`hidden${bt}`,Et=`click${bt}.data-api`,Ct="show",Tt="collapse",kt="collapsing",Lt='[data-coreui-toggle="collapse"]',St={parent:null,toggle:!0},Ot={parent:"(null|element)",toggle:"boolean"};class Nt extends W{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=R.find(Lt);for(const t of i){const e=R.getSelectorFromElement(t),i=R.find(e).filter((t=>t===this._element));null!==e&&i.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return St}static get DefaultType(){return Ot}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>Nt.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(M.trigger(this._element,vt).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(Tt),this._element.classList.add(kt),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(kt),this._element.classList.add(Tt,Ct),this._element.style[e]="",M.trigger(this._element,yt)}),this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(M.trigger(this._element,wt).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,u(this._element),this._element.classList.add(kt),this._element.classList.remove(Tt,Ct);for(const t of this._triggerArray){const e=R.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(kt),this._element.classList.add(Tt),M.trigger(this._element,At)}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(Ct)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=a(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Lt);for(const e of t){const t=R.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=R.find(":scope .collapse .collapse",this._config.parent);return R.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle("collapsed",!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const i=Nt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}M.on(document,Et,Lt,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of R.getMultipleElementsFromSelector(this))Nt.getOrCreateInstance(t,{toggle:!1}).toggle()})),m(Nt);const It="dropdown",Dt=".coreui.dropdown",$t="ArrowUp",xt="ArrowDown",Mt=`hide${Dt}`,Pt=`hidden${Dt}`,jt=`show${Dt}`,Ft=`shown${Dt}`,zt=`click${Dt}.data-api`,Ht=`keydown${Dt}.data-api`,qt=`keyup${Dt}.data-api`,Bt="show",Wt='[data-coreui-toggle="dropdown"]:not(.disabled):not(:disabled)',Vt=`${Wt}.show`,Rt=".dropdown-menu",Kt=f()?"top-end":"top-start",Qt=f()?"top-start":"top-end",Ut=f()?"bottom-end":"bottom-start",Yt=f()?"bottom-start":"bottom-end",Xt=f()?"left-start":"right-start",Gt=f()?"right-start":"left-start",Jt={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Zt={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class te extends W{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=R.next(this._element,Rt)[0]||R.prev(this._element,Rt)[0]||R.findOne(Rt,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Jt}static get DefaultType(){return Zt}static get NAME(){return It}toggle(){return this._isShown()?this.hide():this.show()}show(){if(c(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!M.trigger(this._element,jt,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))M.on(t,"mouseover",d);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Bt),this._element.classList.add(Bt),M.trigger(this._element,Ft,t)}}hide(){if(c(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!M.trigger(this._element,Mt,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))M.off(t,"mouseover",d);this._popper&&this._popper.destroy(),this._menu.classList.remove(Bt),this._element.classList.remove(Bt),this._element.setAttribute("aria-expanded","false"),q.removeDataAttribute(this._menu,"popper"),M.trigger(this._element,Pt,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!r(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${It.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===i)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:r(this._config.reference)?t=a(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=i.createPopper(t,this._menu,e)}_isShown(){return this._menu.classList.contains(Bt)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return Xt;if(t.classList.contains("dropstart"))return Gt;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--cui-position").trim();return t.classList.contains("dropup")?e?Qt:Kt:e?Yt:Ut}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(q.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...p(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:e}){const i=R.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>l(t)));i.length&&v(i,e,t===xt,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=te.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=R.find(Vt);for(const i of e){const e=te.getInstance(i);if(!e||!1===e._config.autoClose)continue;const s=t.composedPath(),n=s.includes(e._menu);if(s.includes(e._element)||"inside"===e._config.autoClose&&!n||"outside"===e._config.autoClose&&n)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i="Escape"===t.key,s=[$t,xt].includes(t.key);if(!s&&!i)return;if(e&&!i)return;t.preventDefault();const n=this.matches(Wt)?this:R.prev(this,Wt)[0]||R.next(this,Wt)[0]||R.findOne(Wt,t.delegateTarget.parentNode),o=te.getOrCreateInstance(n);if(s)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),n.focus())}}M.on(document,Ht,Wt,te.dataApiKeydownHandler),M.on(document,Ht,Rt,te.dataApiKeydownHandler),M.on(document,zt,te.clearMenus),M.on(document,qt,te.clearMenus),M.on(document,zt,Wt,(function(t){t.preventDefault(),te.getOrCreateInstance(this).toggle()})),m(te);const ee=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",ie=".sticky-top",se="padding-right",ne="margin-right";class oe{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,se,(e=>e+t)),this._setElementAttributes(ee,se,(e=>e+t)),this._setElementAttributes(ie,ne,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,se),this._resetElementAttributes(ee,se),this._resetElementAttributes(ie,ne)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const s=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+s)return;this._saveInitialAttribute(t,e);const n=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(n))}px`)}))}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&q.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const i=q.getDataAttribute(t,e);null!==i?(q.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(r(t))e(t);else for(const i of R.find(t,this._element))e(i)}}const re="show",ae="mousedown.coreui.backdrop",le={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},ce={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class he extends B{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return le}static get DefaultType(){return ce}static get NAME(){return"backdrop"}show(t){if(!this._config.isVisible)return void p(t);this._append();const e=this._getElement();this._config.isAnimated&&u(e),e.classList.add(re),this._emulateAnimation((()=>{p(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(re),this._emulateAnimation((()=>{this.dispose(),p(t)}))):p(t)}dispose(){this._isAppended&&(M.off(this._element,ae),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=a(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),M.on(t,ae,(()=>{p(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){b(t,this._getElement(),this._config.isAnimated)}}const de=".coreui.focustrap",ue=`focusin${de}`,_e=`keydown.tab${de}`,ge="backward",fe={autofocus:!0,trapElement:null},me={autofocus:"boolean",trapElement:"element"};class pe extends B{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return fe}static get DefaultType(){return me}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),M.off(document,de),M.on(document,ue,(t=>this._handleFocusin(t))),M.on(document,_e,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,M.off(document,de))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=R.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===ge?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?ge:"forward")}}const be="hidden.coreui.modal",ve="show.coreui.modal",ye="modal-open",we="show",Ae="modal-static",Ee={backdrop:!0,focus:!0,keyboard:!0},Ce={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Te extends W{constructor(t,e){super(t,e),this._dialog=R.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new oe,this._addEventListeners()}static get Default(){return Ee}static get DefaultType(){return Ce}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||M.trigger(this._element,ve,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(ye),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(M.trigger(this._element,"hide.coreui.modal").defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(we),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){for(const t of[window,this._dialog])M.off(t,".coreui.modal");this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new he({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new pe({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=R.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),u(this._element),this._element.classList.add(we),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,M.trigger(this._element,"shown.coreui.modal",{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){M.on(this._element,"keydown.dismiss.coreui.modal",(t=>{if("Escape"===t.key)return this._config.keyboard?(t.preventDefault(),void this.hide()):void this._triggerBackdropTransition()})),M.on(window,"resize.coreui.modal",(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),M.on(this._element,"mousedown.dismiss.coreui.modal",(t=>{M.one(this._element,"click.dismiss.coreui.modal",(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(ye),this._resetAdjustments(),this._scrollBar.reset(),M.trigger(this._element,be)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(M.trigger(this._element,"hidePrevented.coreui.modal").defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(Ae)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Ae),this._queueCallback((()=>{this._element.classList.remove(Ae),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=f()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=f()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=Te.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}M.on(document,"click.coreui.modal.data-api",'[data-coreui-toggle="modal"]',(function(t){const e=R.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),M.one(e,ve,(t=>{t.defaultPrevented||M.one(e,be,(()=>{l(this)&&this.focus()}))}));const i=R.findOne(".modal.show");i&&Te.getInstance(i).hide(),Te.getOrCreateInstance(e).toggle(this)})),K(Te),m(Te);const ke="coreui.navigation",Le=`.${ke}`,Se={activeLinksExact:!0,groupsAutoCollapse:!0},Oe={activeLinksExact:"boolean",groupsAutoCollapse:"(string|boolean)"},Ne="active",Ie="show",De="nav-group-toggle",$e=`click${Le}.data-api`,xe=`load${Le}.data-api`,Me=".nav-group",Pe=".nav-group-items",je=".nav-group-toggle";class Fe extends W{constructor(t,e){super(t),this._config=this._getConfig(e),this._setActiveLink(),this._addEventListeners(),F.set(t,ke,this)}static get Default(){return Se}static get DATA_KEY(){return ke}static get DefaultType(){return Oe}static get NAME(){return"navigation"}_getConfig(t){return{...Se,...q.getDataAttributes(this._element),..."object"==typeof t?t:{}}}_setActiveLink(){for(const t of Array.from(this._element.querySelectorAll(".nav-link"))){if(t.classList.contains(De))continue;let e=String(window.location);const i=/\?./,s=/#./;(/\?.*=/.test(e)||i.test(e))&&(e=e.split("?")[0]),s.test(e)&&(e=e.split("#")[0]),this._config.activeLinksExact&&t.href===e&&(t.classList.add(Ne),Array.from(this._getParents(t,Me)).forEach((t=>{t.classList.add(Ie),t.setAttribute("aria-expanded",!0)}))),!this._config.activeLinksExact&&t.href.startsWith(e)&&(t.classList.add(Ne),Array.from(this._getParents(t,Me)).forEach((t=>{t.classList.add(Ie),t.setAttribute("aria-expanded",!0)})))}}_getParents(t,e){const i=[];for(;t&&t!==document;t=t.parentNode)e?t.matches(e)&&i.push(t):i.push(t);return i}_getAllSiblings(t,e){const i=[];t=t.parentNode.firstChild;do{3!==t.nodeType&&8!==t.nodeType&&(e&&!e(t)||i.push(t))}while(t=t.nextSibling);return i}_getChildren(t,e){const i=[];for(;t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i}_getSiblings(t,e){return this._getChildren(t.parentNode.firstChild,t).filter(e)}_slideDown(t){t.style.height="auto";const e=t.clientHeight;t.style.height="0px",setTimeout((()=>{t.style.height=`${e}px`}),0),this._queueCallback((()=>{t.style.height="auto"}),t,!0)}_slideUp(t,e){const i=t.clientHeight;t.style.height=`${i}px`,setTimeout((()=>{t.style.height="0px"}),0),this._queueCallback((()=>{"function"==typeof e&&e()}),t,!0)}_toggleGroupItems(t){let e=t.target;e.classList.contains(De)||(e=e.closest(je));const i=t=>Boolean(t.classList.contains("nav-group")&&t.classList.contains(Ie));if(!0===this._config.groupsAutoCollapse)for(const t of this._getSiblings(e.parentNode,i))this._slideUp(R.findOne(Pe,t),(()=>{t.classList.remove(Ie),t.setAttribute("aria-expanded",!1)}));e.parentNode.classList.contains(Ie)?this._slideUp(R.findOne(Pe,e.parentNode),(()=>{e.parentNode.classList.remove(Ie),e.parentNode.setAttribute("aria-expanded",!1)})):(e.parentNode.classList.add(Ie),e.parentNode.setAttribute("aria-expanded",!0),this._slideDown(R.findOne(Pe,e.parentNode)))}_addEventListeners(){M.on(this._element,$e,je,(t=>{t.preventDefault(),this._toggleGroupItems(t,this)}))}static navigationInterface(t,e){const i=Fe.getOrCreateInstance(t,e);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e]()}}static jQueryInterface(t){return this.each((function(){Fe.navigationInterface(this,t)}))}}M.on(window,xe,(()=>{for(const t of Array.from(document.querySelectorAll('[data-coreui="navigation"]')))Fe.navigationInterface(t)})),m(Fe);const ze=".coreui.offcanvas",He=`load${ze}.data-api`,qe="show",Be="showing",We="hiding",Ve=".offcanvas.show",Re=`show${ze}`,Ke=`shown${ze}`,Qe=`hide${ze}`,Ue=`hidePrevented${ze}`,Ye=`hidden${ze}`,Xe=`resize${ze}`,Ge=`click${ze}.data-api`,Je=`keydown.dismiss${ze}`,Ze={backdrop:!0,keyboard:!0,scroll:!1},ti={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class ei extends W{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Ze}static get DefaultType(){return ti}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||M.trigger(this._element,Re,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new oe).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Be),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(qe),this._element.classList.remove(Be),M.trigger(this._element,Ke,{relatedTarget:t})}),this._element,!0))}hide(){this._isShown&&(M.trigger(this._element,Qe).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(We),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove(qe,We),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new oe).reset(),M.trigger(this._element,Ye)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new he({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():M.trigger(this._element,Ue)}:null})}_initializeFocusTrap(){return new pe({trapElement:this._element})}_addEventListeners(){M.on(this._element,Je,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():M.trigger(this._element,Ue))}))}static jQueryInterface(t){return this.each((function(){const e=ei.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}M.on(document,Ge,'[data-coreui-toggle="offcanvas"]',(function(t){const e=R.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),c(this))return;M.one(e,Ye,(()=>{l(this)&&this.focus()}));const i=R.findOne(Ve);i&&i!==e&&ei.getInstance(i).hide(),ei.getOrCreateInstance(e).toggle(this)})),M.on(window,He,(()=>{for(const t of R.find(Ve))ei.getOrCreateInstance(t).show()})),M.on(window,Xe,(()=>{for(const t of R.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&ei.getOrCreateInstance(t).hide()})),K(ei),m(ei);const ii=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),si=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,ni=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,oi=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!ii.has(i)||Boolean(si.test(t.nodeValue)||ni.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(i)))},ri={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},ai={allowList:ri,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},li={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ci={entry:"(string|element|function|null)",selector:"(string|element)"};class hi extends B{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return ai}static get DefaultType(){return li}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},ci)}_setContent(t,e,i){const s=R.findOne(i,t);s&&((e=this._resolvePossibleFunction(e))?r(e)?this._putElementInTemplate(a(e),s):this._config.html?s.innerHTML=this._maybeSanitize(e):s.textContent=e:s.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const s=(new window.DOMParser).parseFromString(t,"text/html"),n=[].concat(...s.body.querySelectorAll("*"));for(const t of n){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const s=[].concat(...t.attributes),n=[].concat(e["*"]||[],e[i]||[]);for(const e of s)oi(e,n)||t.removeAttribute(e.nodeName)}return s.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return p(t,[this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const di=new Set(["sanitize","allowList","sanitizeFn"]),ui="fade",_i="show",gi=".modal",fi="hide.coreui.modal",mi="hover",pi="focus",bi={AUTO:"auto",TOP:"top",RIGHT:f()?"left":"right",BOTTOM:"bottom",LEFT:f()?"right":"left"},vi={allowList:ri,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},yi={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class wi extends W{constructor(t,e){if(void 0===i)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return vi}static get DefaultType(){return yi}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),M.off(this._element.closest(gi),fi,this._hideModalHandler),this._element.getAttribute("data-coreui-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-coreui-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=M.trigger(this._element,this.constructor.eventName("show")),e=(h(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:s}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(i),M.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(_i),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))M.on(t,"mouseover",d);this._queueCallback((()=>{M.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(this._isShown()&&!M.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(_i),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))M.off(t,"mouseover",d);this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),M.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(ui,_i),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(ui),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new hi({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-coreui-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(ui)}_isShown(){return this.tip&&this.tip.classList.contains(_i)}_createPopper(t){const e=p(this._config.placement,[this,t,this._element]),s=bi[e.toUpperCase()];return i.createPopper(this._element,t,this._getPopperConfig(s))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return p(t,[this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,...p(this._config.popperConfig,[e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)M.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===mi?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===mi?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");M.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?pi:mi]=!0,e._enter()})),M.on(this._element,i,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?pi:mi]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},M.on(this._element.closest(gi),fi,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-coreui-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=q.getDataAttributes(this._element);for(const t of Object.keys(e))di.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:a(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,i]of Object.entries(this._config))this.constructor.Default[e]!==i&&(t[e]=i);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each((function(){const e=wi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}m(wi);const Ai={...wi.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},Ei={...wi.DefaultType,content:"(null|string|element|function)"};class Ci extends wi{static get Default(){return Ai}static get DefaultType(){return Ei}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=Ci.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}m(Ci);const Ti=".coreui.scrollspy",ki=`activate${Ti}`,Li=`click${Ti}`,Si=`load${Ti}.data-api`,Oi="active",Ni="[href]",Ii={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Di={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class $i extends W{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Ii}static get DefaultType(){return Di}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=a(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(M.off(this._config.target,Li),M.on(this._config.target,Li,Ni,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,s=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:s,behavior:"smooth"});i.scrollTop=s}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},s=(this._rootElement||document.documentElement).scrollTop,n=s>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=s;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(n&&t){if(i(o),!s)return}else n||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=R.find(Ni,this._config.target);for(const e of t){if(!e.hash||c(e))continue;const t=R.findOne(e.hash,this._element);l(t)&&(this._targetLinks.set(e.hash,e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Oi),this._activateParents(t),M.trigger(this._element,ki,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))R.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Oi);else for(const e of R.parents(t,".nav, .list-group"))for(const t of R.prev(e,".nav-link, .nav-item > .nav-link, .list-group-item"))t.classList.add(Oi)}_clearActiveClass(t){t.classList.remove(Oi);const e=R.find("[href].active",t);for(const t of e)t.classList.remove(Oi)}static jQueryInterface(t){return this.each((function(){const e=$i.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}M.on(window,Si,(()=>{for(const t of R.find('[data-coreui-spy="scroll"]'))$i.getOrCreateInstance(t)})),m($i);const xi=".coreui.sidebar",Mi={},Pi={},ji="hide",Fi="show",zi="sidebar-narrow",Hi="sidebar-narrow-unfoldable",qi=`hide${xi}`,Bi=`hidden${xi}`,Wi=`show${xi}`,Vi=`shown${xi}`,Ri=`click${xi}.data-api`,Ki=`load${xi}.data-api`,Qi=".sidebar";class Ui extends W{constructor(t,e){super(t),this._config=this._getConfig(e),this._show=this._isVisible(),this._mobile=this._isMobile(),this._overlaid=this._isOverlaid(),this._narrow=this._isNarrow(),this._unfoldable=this._isUnfoldable(),this._backdrop=this._initializeBackDrop(),this._addEventListeners()}static get Default(){return Mi}static get DefaultType(){return Pi}static get NAME(){return"sidebar"}show(){M.trigger(this._element,Wi),this._element.classList.contains(ji)&&this._element.classList.remove(ji),this._isMobile()&&(this._element.classList.add(Fi),this._backdrop.show(),(new oe).hide()),this._queueCallback((()=>{!0===this._isVisible()&&(this._show=!0,(this._isMobile()||this._isOverlaid())&&this._addClickOutListener(),M.trigger(this._element,Vi))}),this._element,!0)}hide(){M.trigger(this._element,qi),this._element.classList.contains(Fi)&&this._element.classList.remove(Fi),this._isMobile()?(this._backdrop.hide(),(new oe).reset()):this._element.classList.add(ji),this._queueCallback((()=>{!1===this._isVisible()&&(this._show=!1,(this._isMobile()||this._isOverlaid())&&this._removeClickOutListener(),M.trigger(this._element,Bi))}),this._element,!0)}toggle(){this._isVisible()?this.hide():this.show()}narrow(){this._isMobile()||(this._addClassName(zi),this._narrow=!0)}unfoldable(){this._isMobile()||(this._addClassName(Hi),this._unfoldable=!0)}reset(){this._isMobile()||(this._narrow&&(this._element.classList.remove(zi),this._narrow=!1),this._unfoldable&&(this._element.classList.remove(Hi),this._unfoldable=!1))}toggleNarrow(){this._narrow?this.reset():this.narrow()}toggleUnfoldable(){this._unfoldable?this.reset():this.unfoldable()}_getConfig(t){return{...Mi,...q.getDataAttributes(this._element),..."object"==typeof t?t:{}}}_initializeBackDrop(){return new he({className:"sidebar-backdrop",isVisible:this._isMobile(),isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_isMobile(){return Boolean(window.getComputedStyle(this._element,null).getPropertyValue("--cui-is-mobile"))}_isNarrow(){return this._element.classList.contains(zi)}_isOverlaid(){return this._element.classList.contains("sidebar-overlaid")}_isUnfoldable(){return this._element.classList.contains(Hi)}_isVisible(){const t=this._element.getBoundingClientRect();return t.top>=0&&t.left>=0&&Math.floor(t.bottom)<=(window.innerHeight||document.documentElement.clientHeight)&&Math.floor(t.right)<=(window.innerWidth||document.documentElement.clientWidth)}_addClassName(t){this._element.classList.add(t)}_clickOutListener(t,e){null===t.target.closest(Qi)&&(t.preventDefault(),t.stopPropagation(),e.hide())}_addClickOutListener(){M.on(document,Ri,(t=>{this._clickOutListener(t,this)}))}_removeClickOutListener(){M.off(document,Ri)}_addEventListeners(){this._mobile&&this._show&&this._addClickOutListener(),this._overlaid&&this._show&&this._addClickOutListener(),M.on(this._element,Ri,"[data-coreui-toggle]",(t=>{t.preventDefault();const e=q.getDataAttribute(t.target,"toggle");"narrow"===e&&this.toggleNarrow(),"unfoldable"===e&&this.toggleUnfoldable()})),M.on(this._element,Ri,'[data-coreui-close="sidebar"]',(t=>{t.preventDefault(),this.hide()})),M.on(window,"resize",(()=>{this._isMobile()&&this._isVisible()&&(this.hide(),this._backdrop=this._initializeBackDrop())}))}static sidebarInterface(t,e){const i=Ui.getOrCreateInstance(t,e);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e]()}}static jQueryInterface(t){return this.each((function(){Ui.sidebarInterface(this,t)}))}}M.on(window,Ki,(()=>{for(const t of Array.from(document.querySelectorAll(Qi)))Ui.sidebarInterface(t)})),m(Ui);const Yi="ArrowLeft",Xi="ArrowRight",Gi="ArrowUp",Ji="ArrowDown",Zi="active",ts="fade",es="show",is='[data-coreui-toggle="tab"], [data-coreui-toggle="pill"], [data-coreui-toggle="list"]',ss=`.nav-link:not(.dropdown-toggle), .list-group-item:not(.dropdown-toggle), [role="tab"]:not(.dropdown-toggle), ${is}`;class ns extends W{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),M.on(this._element,"keydown.coreui.tab",(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?M.trigger(e,"hide.coreui.tab",{relatedTarget:t}):null;M.trigger(t,"show.coreui.tab",{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(Zi),this._activate(R.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),M.trigger(t,"shown.coreui.tab",{relatedTarget:e})):t.classList.add(es)}),t,t.classList.contains(ts)))}_deactivate(t,e){t&&(t.classList.remove(Zi),t.blur(),this._deactivate(R.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),M.trigger(t,"hidden.coreui.tab",{relatedTarget:e})):t.classList.remove(es)}),t,t.classList.contains(ts)))}_keydown(t){if(![Yi,Xi,Gi,Ji].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=[Xi,Ji].includes(t.key),i=v(this._getChildren().filter((t=>!c(t))),t.target,e,!0);i&&(i.focus({preventScroll:!0}),ns.getOrCreateInstance(i).show())}_getChildren(){return R.find(ss,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=R.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`#${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const s=(t,s)=>{const n=R.findOne(t,i);n&&n.classList.toggle(s,e)};s(".dropdown-toggle",Zi),s(".dropdown-menu",es),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(Zi)}_getInnerElement(t){return t.matches(ss)?t:R.findOne(ss,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=ns.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}M.on(document,"click.coreui.tab",is,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),c(this)||ns.getOrCreateInstance(this).show()})),M.on(window,"load.coreui.tab",(()=>{for(const t of R.find('.active[data-coreui-toggle="tab"], .active[data-coreui-toggle="pill"], .active[data-coreui-toggle="list"]'))ns.getOrCreateInstance(t)})),m(ns);const os=".coreui.toast",rs=`mouseover${os}`,as=`mouseout${os}`,ls=`focusin${os}`,cs=`focusout${os}`,hs=`hide${os}`,ds=`hidden${os}`,us=`show${os}`,_s=`shown${os}`,gs="hide",fs="show",ms="showing",ps={animation:"boolean",autohide:"boolean",delay:"number"},bs={animation:!0,autohide:!0,delay:5e3};class vs extends W{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return bs}static get DefaultType(){return ps}static get NAME(){return"toast"}show(){M.trigger(this._element,us).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(gs),u(this._element),this._element.classList.add(fs,ms),this._queueCallback((()=>{this._element.classList.remove(ms),M.trigger(this._element,_s),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(M.trigger(this._element,hs).defaultPrevented||(this._element.classList.add(ms),this._queueCallback((()=>{this._element.classList.add(gs),this._element.classList.remove(ms,fs),M.trigger(this._element,ds)}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(fs),super.dispose()}isShown(){return this._element.classList.contains(fs)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){M.on(this._element,rs,(t=>this._onInteraction(t,!0))),M.on(this._element,as,(t=>this._onInteraction(t,!1))),M.on(this._element,ls,(t=>this._onInteraction(t,!0))),M.on(this._element,cs,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=vs.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return K(vs),m(vs),{Alert:Q,Button:Y,Carousel:pt,Collapse:Nt,Dropdown:te,Modal:Te,Navigation:Fe,OffCanvas:ei,Popover:Ci,ScrollSpy:$i,Sidebar:Ui,Tab:ns,Toast:vs,Tooltip:wi}}));
|
|
6
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).coreui=e(t.Popper)}(this,(function(t){"use strict";function e(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const i=e(t),s="transitionend",n=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`))),t),o=t=>{t.dispatchEvent(new Event(s))},r=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),a=t=>r(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(n(t)):null,l=t=>{if(!r(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},c=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),h=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?h(t.parentNode):null},d=()=>{},u=t=>{t.offsetHeight},_=()=>window.jQuery&&!document.body.hasAttribute("data-coreui-no-jquery")?window.jQuery:null,g=[],f=()=>"rtl"===document.documentElement.dir,m=t=>{var e;e=()=>{const e=_();if(e){const i=t.NAME,s=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=s,t.jQueryInterface)}},"loading"===document.readyState?(g.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of g)t()})),g.push(e)):e()},p=(t,e=[],i=t)=>"function"==typeof t?t(...e):i,b=(t,e,i=!0)=>{if(!i)return void p(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const s=Number.parseFloat(e),n=Number.parseFloat(i);return s||n?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let r=!1;const a=({target:i})=>{i===e&&(r=!0,e.removeEventListener(s,a),p(t))};e.addEventListener(s,a),setTimeout((()=>{r||o(e)}),n)},v=(t,e,i,s)=>{const n=t.length;let o=t.indexOf(e);return-1===o?!i&&s?t[n-1]:t[0]:(o+=i?1:-1,s&&(o=(o+n)%n),t[Math.max(0,Math.min(o,n-1))])},y=/[^.]*(?=\..*)\.|.*/,w=/\..*/,A=/::\d+$/,E={};let C=1;const T={mouseenter:"mouseover",mouseleave:"mouseout"},k=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function L(t,e){return e&&`${e}::${C++}`||t.uidEvent||C++}function S(t){const e=L(t);return t.uidEvent=e,E[e]=E[e]||{},E[e]}function O(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function N(t,e,i){const s="string"==typeof e,n=s?i:e||i;let o=x(t);return k.has(o)||(o=t),[s,n,o]}function I(t,e,i,s,n){if("string"!=typeof e||!t)return;let[o,r,a]=N(e,i,s);if(e in T){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=S(t),c=l[a]||(l[a]={}),h=O(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&n);const d=L(r,e.replace(y,"")),u=o?function(t,e,i){return function s(n){const o=t.querySelectorAll(e);for(let{target:r}=n;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return P(n,{delegateTarget:r}),s.oneOff&&M.off(t,n.type,e,i),i.apply(r,[n])}}(t,i,r):function(t,e){return function i(s){return P(s,{delegateTarget:t}),i.oneOff&&M.off(t,s.type,e),e.apply(t,[s])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=n,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function D(t,e,i,s,n){const o=O(e[i],s,n);o&&(t.removeEventListener(i,o,Boolean(n)),delete e[i][o.uidEvent])}function $(t,e,i,s){const n=e[i]||{};for(const[o,r]of Object.entries(n))o.includes(s)&&D(t,e,i,r.callable,r.delegationSelector)}function x(t){return t=t.replace(w,""),T[t]||t}const M={on(t,e,i,s){I(t,e,i,s,!1)},one(t,e,i,s){I(t,e,i,s,!0)},off(t,e,i,s){if("string"!=typeof e||!t)return;const[n,o,r]=N(e,i,s),a=r!==e,l=S(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))$(t,l,i,e.slice(1));for(const[i,s]of Object.entries(c)){const n=i.replace(A,"");a&&!e.includes(n)||D(t,l,r,s.callable,s.delegationSelector)}}else{if(!Object.keys(c).length)return;D(t,l,r,o,n?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const s=_();let n=null,o=!0,r=!0,a=!1;e!==x(e)&&s&&(n=s.Event(e,i),s(t).trigger(n),o=!n.isPropagationStopped(),r=!n.isImmediatePropagationStopped(),a=n.isDefaultPrevented());let l=new Event(e,{bubbles:o,cancelable:!0});return l=P(l,i),a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&n&&n.preventDefault(),l}};function P(t,e={}){for(const[i,s]of Object.entries(e))try{t[i]=s}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>s})}return t}const j=new Map,F={set(t,e,i){j.has(t)||j.set(t,new Map);const s=j.get(t);s.has(e)||0===s.size?s.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(t,e)=>j.has(t)&&j.get(t).get(e)||null,remove(t,e){if(!j.has(t))return;const i=j.get(t);i.delete(e),0===i.size&&j.delete(t)}};function z(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function H(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const q={setDataAttribute(t,e,i){t.setAttribute(`data-coreui-${H(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-coreui-${H(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("coreui")&&!t.startsWith("coreuiConfig")));for(const s of i){let i=s.replace(/^coreui/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=z(t.dataset[s])}return e},getDataAttribute:(t,e)=>z(t.getAttribute(`data-coreui-${H(e)}`))};class B{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=r(e)?q.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...r(e)?q.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[s,n]of Object.entries(e)){const e=t[s],o=r(e)?"element":null==(i=e)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(n).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${s}" provided type "${o}" but expected type "${n}".`)}var i}}class W extends B{constructor(t,e){super(),(t=a(t))&&(this._element=t,this._config=this._getConfig(e),F.set(this._element,this.constructor.DATA_KEY,this))}dispose(){F.remove(this._element,this.constructor.DATA_KEY),M.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){b(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return F.get(a(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"4.2.6"}static get DATA_KEY(){return`coreui.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const V=t=>{let e=t.getAttribute("data-coreui-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return n(e)},R={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let s=t.parentNode.closest(e);for(;s;)i.push(s),s=s.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!c(t)&&l(t)))},getSelectorFromElement(t){const e=V(t);return e&&R.findOne(e)?e:null},getElementFromSelector(t){const e=V(t);return e?R.findOne(e):null},getMultipleElementsFromSelector(t){const e=V(t);return e?R.find(e):[]}},K=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,s=t.NAME;M.on(document,i,`[data-coreui-dismiss="${s}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),c(this))return;const n=R.getElementFromSelector(this)||this.closest(`.${s}`);t.getOrCreateInstance(n)[e]()}))};class Q extends W{static get NAME(){return"alert"}close(){if(M.trigger(this._element,"close.coreui.alert").defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),M.trigger(this._element,"closed.coreui.alert"),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=Q.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}K(Q,"close"),m(Q);const U='[data-coreui-toggle="button"]';class Y extends W{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=Y.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}M.on(document,"click.coreui.button.data-api",U,(t=>{t.preventDefault();const e=t.target.closest(U);Y.getOrCreateInstance(e).toggle()})),m(Y);const X={endCallback:null,leftCallback:null,rightCallback:null},G={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class J extends B{constructor(t,e){super(),this._element=t,t&&J.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return X}static get DefaultType(){return G}static get NAME(){return"swipe"}dispose(){M.off(this._element,".coreui.swipe")}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),p(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&p(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(M.on(this._element,"pointerdown.coreui.swipe",(t=>this._start(t))),M.on(this._element,"pointerup.coreui.swipe",(t=>this._end(t))),this._element.classList.add("pointer-event")):(M.on(this._element,"touchstart.coreui.swipe",(t=>this._start(t))),M.on(this._element,"touchmove.coreui.swipe",(t=>this._move(t))),M.on(this._element,"touchend.coreui.swipe",(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Z=".coreui.carousel",tt="next",et="prev",it="left",st="right",nt=`slide${Z}`,ot=`slid${Z}`,rt=`keydown${Z}`,at=`mouseenter${Z}`,lt=`mouseleave${Z}`,ct=`dragstart${Z}`,ht=`load${Z}.data-api`,dt=`click${Z}.data-api`,ut="carousel",_t="active",gt={ArrowLeft:st,ArrowRight:it},ft={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},mt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class pt extends W{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=R.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===ut&&this.cycle()}static get Default(){return ft}static get DefaultType(){return mt}static get NAME(){return"carousel"}next(){this._slide(tt)}nextWhenVisible(){!document.hidden&&l(this._element)&&this.next()}prev(){this._slide(et)}pause(){this._isSliding&&o(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?M.one(this._element,ot,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void M.one(this._element,ot,(()=>this.to(t)));const i=this._getItemIndex(this._getActive());if(i===t)return;const s=t>i?tt:et;this._slide(s,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&M.on(this._element,rt,(t=>this._keydown(t))),"hover"===this._config.pause&&(M.on(this._element,at,(()=>this.pause())),M.on(this._element,lt,(()=>this._maybeEnableCycle()))),this._config.touch&&J.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of R.find(".carousel-item img",this._element))M.on(t,ct,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(it)),rightCallback:()=>this._slide(this._directionToOrder(st)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new J(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=gt[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=R.findOne(".active",this._indicatorsElement);e.classList.remove(_t),e.removeAttribute("aria-current");const i=R.findOne(`[data-coreui-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(_t),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-coreui-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),s=t===tt,n=e||v(this._getItems(),i,s,this._config.wrap);if(n===i)return;const o=this._getItemIndex(n),r=e=>M.trigger(this._element,e,{relatedTarget:n,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r(nt).defaultPrevented)return;if(!i||!n)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=n;const l=s?"carousel-item-start":"carousel-item-end",c=s?"carousel-item-next":"carousel-item-prev";n.classList.add(c),u(n),i.classList.add(l),n.classList.add(l),this._queueCallback((()=>{n.classList.remove(l,c),n.classList.add(_t),i.classList.remove(_t,c,l),this._isSliding=!1,r(ot)}),i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return R.findOne(".active.carousel-item",this._element)}_getItems(){return R.find(".carousel-item",this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return f()?t===it?et:tt:t===it?tt:et}_orderToDirection(t){return f()?t===et?it:st:t===et?st:it}static jQueryInterface(t){return this.each((function(){const e=pt.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}M.on(document,dt,"[data-coreui-slide], [data-coreui-slide-to]",(function(t){const e=R.getElementFromSelector(this);if(!e||!e.classList.contains(ut))return;t.preventDefault();const i=pt.getOrCreateInstance(e),s=this.getAttribute("data-coreui-slide-to");return s?(i.to(s),void i._maybeEnableCycle()):"next"===q.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),M.on(window,ht,(()=>{const t=R.find('[data-coreui-ride="carousel"]');for(const e of t)pt.getOrCreateInstance(e)})),m(pt);const bt=".coreui.collapse",vt=`show${bt}`,yt=`shown${bt}`,wt=`hide${bt}`,At=`hidden${bt}`,Et=`click${bt}.data-api`,Ct="show",Tt="collapse",kt="collapsing",Lt='[data-coreui-toggle="collapse"]',St={parent:null,toggle:!0},Ot={parent:"(null|element)",toggle:"boolean"};class Nt extends W{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=R.find(Lt);for(const t of i){const e=R.getSelectorFromElement(t),i=R.find(e).filter((t=>t===this._element));null!==e&&i.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return St}static get DefaultType(){return Ot}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>Nt.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(M.trigger(this._element,vt).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(Tt),this._element.classList.add(kt),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(kt),this._element.classList.add(Tt,Ct),this._element.style[e]="",M.trigger(this._element,yt)}),this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(M.trigger(this._element,wt).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,u(this._element),this._element.classList.add(kt),this._element.classList.remove(Tt,Ct);for(const t of this._triggerArray){const e=R.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(kt),this._element.classList.add(Tt),M.trigger(this._element,At)}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(Ct)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=a(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Lt);for(const e of t){const t=R.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=R.find(":scope .collapse .collapse",this._config.parent);return R.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle("collapsed",!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const i=Nt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}M.on(document,Et,Lt,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of R.getMultipleElementsFromSelector(this))Nt.getOrCreateInstance(t,{toggle:!1}).toggle()})),m(Nt);const It="dropdown",Dt=".coreui.dropdown",$t="ArrowUp",xt="ArrowDown",Mt=`hide${Dt}`,Pt=`hidden${Dt}`,jt=`show${Dt}`,Ft=`shown${Dt}`,zt=`click${Dt}.data-api`,Ht=`keydown${Dt}.data-api`,qt=`keyup${Dt}.data-api`,Bt="show",Wt='[data-coreui-toggle="dropdown"]:not(.disabled):not(:disabled)',Vt=`${Wt}.show`,Rt=".dropdown-menu",Kt=f()?"top-end":"top-start",Qt=f()?"top-start":"top-end",Ut=f()?"bottom-end":"bottom-start",Yt=f()?"bottom-start":"bottom-end",Xt=f()?"left-start":"right-start",Gt=f()?"right-start":"left-start",Jt={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Zt={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class te extends W{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=R.next(this._element,Rt)[0]||R.prev(this._element,Rt)[0]||R.findOne(Rt,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Jt}static get DefaultType(){return Zt}static get NAME(){return It}toggle(){return this._isShown()?this.hide():this.show()}show(){if(c(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!M.trigger(this._element,jt,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))M.on(t,"mouseover",d);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Bt),this._element.classList.add(Bt),M.trigger(this._element,Ft,t)}}hide(){if(c(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!M.trigger(this._element,Mt,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))M.off(t,"mouseover",d);this._popper&&this._popper.destroy(),this._menu.classList.remove(Bt),this._element.classList.remove(Bt),this._element.setAttribute("aria-expanded","false"),q.removeDataAttribute(this._menu,"popper"),M.trigger(this._element,Pt,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!r(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${It.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===i)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:r(this._config.reference)?t=a(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=i.createPopper(t,this._menu,e)}_isShown(){return this._menu.classList.contains(Bt)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return Xt;if(t.classList.contains("dropstart"))return Gt;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--cui-position").trim();return t.classList.contains("dropup")?e?Qt:Kt:e?Yt:Ut}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(q.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...p(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:e}){const i=R.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>l(t)));i.length&&v(i,e,t===xt,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=te.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=R.find(Vt);for(const i of e){const e=te.getInstance(i);if(!e||!1===e._config.autoClose)continue;const s=t.composedPath(),n=s.includes(e._menu);if(s.includes(e._element)||"inside"===e._config.autoClose&&!n||"outside"===e._config.autoClose&&n)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i="Escape"===t.key,s=[$t,xt].includes(t.key);if(!s&&!i)return;if(e&&!i)return;t.preventDefault();const n=this.matches(Wt)?this:R.prev(this,Wt)[0]||R.next(this,Wt)[0]||R.findOne(Wt,t.delegateTarget.parentNode),o=te.getOrCreateInstance(n);if(s)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),n.focus())}}M.on(document,Ht,Wt,te.dataApiKeydownHandler),M.on(document,Ht,Rt,te.dataApiKeydownHandler),M.on(document,zt,te.clearMenus),M.on(document,qt,te.clearMenus),M.on(document,zt,Wt,(function(t){t.preventDefault(),te.getOrCreateInstance(this).toggle()})),m(te);const ee=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",ie=".sticky-top",se="padding-right",ne="margin-right";class oe{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,se,(e=>e+t)),this._setElementAttributes(ee,se,(e=>e+t)),this._setElementAttributes(ie,ne,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,se),this._resetElementAttributes(ee,se),this._resetElementAttributes(ie,ne)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const s=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+s)return;this._saveInitialAttribute(t,e);const n=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(n))}px`)}))}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&q.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const i=q.getDataAttribute(t,e);null!==i?(q.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(r(t))e(t);else for(const i of R.find(t,this._element))e(i)}}const re="show",ae="mousedown.coreui.backdrop",le={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},ce={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class he extends B{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return le}static get DefaultType(){return ce}static get NAME(){return"backdrop"}show(t){if(!this._config.isVisible)return void p(t);this._append();const e=this._getElement();this._config.isAnimated&&u(e),e.classList.add(re),this._emulateAnimation((()=>{p(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(re),this._emulateAnimation((()=>{this.dispose(),p(t)}))):p(t)}dispose(){this._isAppended&&(M.off(this._element,ae),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=a(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),M.on(t,ae,(()=>{p(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){b(t,this._getElement(),this._config.isAnimated)}}const de=".coreui.focustrap",ue=`focusin${de}`,_e=`keydown.tab${de}`,ge="backward",fe={autofocus:!0,trapElement:null},me={autofocus:"boolean",trapElement:"element"};class pe extends B{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return fe}static get DefaultType(){return me}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),M.off(document,de),M.on(document,ue,(t=>this._handleFocusin(t))),M.on(document,_e,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,M.off(document,de))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=R.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===ge?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?ge:"forward")}}const be="hidden.coreui.modal",ve="show.coreui.modal",ye="modal-open",we="show",Ae="modal-static",Ee={backdrop:!0,focus:!0,keyboard:!0},Ce={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Te extends W{constructor(t,e){super(t,e),this._dialog=R.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new oe,this._addEventListeners()}static get Default(){return Ee}static get DefaultType(){return Ce}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||M.trigger(this._element,ve,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(ye),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(M.trigger(this._element,"hide.coreui.modal").defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(we),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){for(const t of[window,this._dialog])M.off(t,".coreui.modal");this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new he({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new pe({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=R.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),u(this._element),this._element.classList.add(we),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,M.trigger(this._element,"shown.coreui.modal",{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){M.on(this._element,"keydown.dismiss.coreui.modal",(t=>{if("Escape"===t.key)return this._config.keyboard?(t.preventDefault(),void this.hide()):void this._triggerBackdropTransition()})),M.on(window,"resize.coreui.modal",(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),M.on(this._element,"mousedown.dismiss.coreui.modal",(t=>{M.one(this._element,"click.dismiss.coreui.modal",(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(ye),this._resetAdjustments(),this._scrollBar.reset(),M.trigger(this._element,be)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(M.trigger(this._element,"hidePrevented.coreui.modal").defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(Ae)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Ae),this._queueCallback((()=>{this._element.classList.remove(Ae),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=f()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=f()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=Te.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}M.on(document,"click.coreui.modal.data-api",'[data-coreui-toggle="modal"]',(function(t){const e=R.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),M.one(e,ve,(t=>{t.defaultPrevented||M.one(e,be,(()=>{l(this)&&this.focus()}))}));const i=R.findOne(".modal.show");i&&Te.getInstance(i).hide(),Te.getOrCreateInstance(e).toggle(this)})),K(Te),m(Te);const ke="coreui.navigation",Le=`.${ke}`,Se={activeLinksExact:!0,groupsAutoCollapse:!0},Oe={activeLinksExact:"boolean",groupsAutoCollapse:"(string|boolean)"},Ne="active",Ie="show",De="nav-group-toggle",$e=`click${Le}.data-api`,xe=`load${Le}.data-api`,Me=".nav-group",Pe=".nav-group-items",je=".nav-group-toggle";class Fe extends W{constructor(t,e){super(t),this._config=this._getConfig(e),this._setActiveLink(),this._addEventListeners(),F.set(t,ke,this)}static get Default(){return Se}static get DATA_KEY(){return ke}static get DefaultType(){return Oe}static get NAME(){return"navigation"}_getConfig(t){return{...Se,...q.getDataAttributes(this._element),..."object"==typeof t?t:{}}}_setActiveLink(){for(const t of Array.from(this._element.querySelectorAll(".nav-link"))){if(t.classList.contains(De))continue;let e=String(window.location);const i=/\?./,s=/#./;(/\?.*=/.test(e)||i.test(e))&&(e=e.split("?")[0]),s.test(e)&&(e=e.split("#")[0]),this._config.activeLinksExact&&t.href===e&&(t.classList.add(Ne),Array.from(this._getParents(t,Me)).forEach((t=>{t.classList.add(Ie),t.setAttribute("aria-expanded",!0)}))),!this._config.activeLinksExact&&t.href.startsWith(e)&&(t.classList.add(Ne),Array.from(this._getParents(t,Me)).forEach((t=>{t.classList.add(Ie),t.setAttribute("aria-expanded",!0)})))}}_getParents(t,e){const i=[];for(;t&&t!==document;t=t.parentNode)e?t.matches(e)&&i.push(t):i.push(t);return i}_getAllSiblings(t,e){const i=[];t=t.parentNode.firstChild;do{3!==t.nodeType&&8!==t.nodeType&&(e&&!e(t)||i.push(t))}while(t=t.nextSibling);return i}_getChildren(t,e){const i=[];for(;t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i}_getSiblings(t,e){return this._getChildren(t.parentNode.firstChild,t).filter(e)}_slideDown(t){t.style.height="auto";const e=t.clientHeight;t.style.height="0px",setTimeout((()=>{t.style.height=`${e}px`}),0),this._queueCallback((()=>{t.style.height="auto"}),t,!0)}_slideUp(t,e){const i=t.clientHeight;t.style.height=`${i}px`,setTimeout((()=>{t.style.height="0px"}),0),this._queueCallback((()=>{"function"==typeof e&&e()}),t,!0)}_toggleGroupItems(t){let e=t.target;e.classList.contains(De)||(e=e.closest(je));const i=t=>Boolean(t.classList.contains("nav-group")&&t.classList.contains(Ie));if(!0===this._config.groupsAutoCollapse)for(const t of this._getSiblings(e.parentNode,i))this._slideUp(R.findOne(Pe,t),(()=>{t.classList.remove(Ie),t.setAttribute("aria-expanded",!1)}));e.parentNode.classList.contains(Ie)?this._slideUp(R.findOne(Pe,e.parentNode),(()=>{e.parentNode.classList.remove(Ie),e.parentNode.setAttribute("aria-expanded",!1)})):(e.parentNode.classList.add(Ie),e.parentNode.setAttribute("aria-expanded",!0),this._slideDown(R.findOne(Pe,e.parentNode)))}_addEventListeners(){M.on(this._element,$e,je,(t=>{t.preventDefault(),this._toggleGroupItems(t,this)}))}static navigationInterface(t,e){const i=Fe.getOrCreateInstance(t,e);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e]()}}static jQueryInterface(t){return this.each((function(){Fe.navigationInterface(this,t)}))}}M.on(window,xe,(()=>{for(const t of Array.from(document.querySelectorAll('[data-coreui="navigation"]')))Fe.navigationInterface(t)})),m(Fe);const ze=".coreui.offcanvas",He=`load${ze}.data-api`,qe="show",Be="showing",We="hiding",Ve=".offcanvas.show",Re=`show${ze}`,Ke=`shown${ze}`,Qe=`hide${ze}`,Ue=`hidePrevented${ze}`,Ye=`hidden${ze}`,Xe=`resize${ze}`,Ge=`click${ze}.data-api`,Je=`keydown.dismiss${ze}`,Ze={backdrop:!0,keyboard:!0,scroll:!1},ti={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class ei extends W{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Ze}static get DefaultType(){return ti}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||M.trigger(this._element,Re,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new oe).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Be),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(qe),this._element.classList.remove(Be),M.trigger(this._element,Ke,{relatedTarget:t})}),this._element,!0))}hide(){this._isShown&&(M.trigger(this._element,Qe).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(We),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove(qe,We),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new oe).reset(),M.trigger(this._element,Ye)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new he({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():M.trigger(this._element,Ue)}:null})}_initializeFocusTrap(){return new pe({trapElement:this._element})}_addEventListeners(){M.on(this._element,Je,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():M.trigger(this._element,Ue))}))}static jQueryInterface(t){return this.each((function(){const e=ei.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}M.on(document,Ge,'[data-coreui-toggle="offcanvas"]',(function(t){const e=R.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),c(this))return;M.one(e,Ye,(()=>{l(this)&&this.focus()}));const i=R.findOne(Ve);i&&i!==e&&ei.getInstance(i).hide(),ei.getOrCreateInstance(e).toggle(this)})),M.on(window,He,(()=>{for(const t of R.find(Ve))ei.getOrCreateInstance(t).show()})),M.on(window,Xe,(()=>{for(const t of R.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&ei.getOrCreateInstance(t).hide()})),K(ei),m(ei);const ii=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),si=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,ni=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,oi=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!ii.has(i)||Boolean(si.test(t.nodeValue)||ni.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(i)))},ri={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},ai={allowList:ri,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},li={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ci={entry:"(string|element|function|null)",selector:"(string|element)"};class hi extends B{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return ai}static get DefaultType(){return li}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},ci)}_setContent(t,e,i){const s=R.findOne(i,t);s&&((e=this._resolvePossibleFunction(e))?r(e)?this._putElementInTemplate(a(e),s):this._config.html?s.innerHTML=this._maybeSanitize(e):s.textContent=e:s.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const s=(new window.DOMParser).parseFromString(t,"text/html"),n=[].concat(...s.body.querySelectorAll("*"));for(const t of n){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const s=[].concat(...t.attributes),n=[].concat(e["*"]||[],e[i]||[]);for(const e of s)oi(e,n)||t.removeAttribute(e.nodeName)}return s.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return p(t,[this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const di=new Set(["sanitize","allowList","sanitizeFn"]),ui="fade",_i="show",gi=".modal",fi="hide.coreui.modal",mi="hover",pi="focus",bi={AUTO:"auto",TOP:"top",RIGHT:f()?"left":"right",BOTTOM:"bottom",LEFT:f()?"right":"left"},vi={allowList:ri,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},yi={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class wi extends W{constructor(t,e){if(void 0===i)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return vi}static get DefaultType(){return yi}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),M.off(this._element.closest(gi),fi,this._hideModalHandler),this._element.getAttribute("data-coreui-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-coreui-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=M.trigger(this._element,this.constructor.eventName("show")),e=(h(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:s}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(i),M.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(_i),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))M.on(t,"mouseover",d);this._queueCallback((()=>{M.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(this._isShown()&&!M.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(_i),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))M.off(t,"mouseover",d);this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),M.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(ui,_i),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(ui),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new hi({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-coreui-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(ui)}_isShown(){return this.tip&&this.tip.classList.contains(_i)}_createPopper(t){const e=p(this._config.placement,[this,t,this._element]),s=bi[e.toUpperCase()];return i.createPopper(this._element,t,this._getPopperConfig(s))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return p(t,[this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,...p(this._config.popperConfig,[e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)M.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===mi?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===mi?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");M.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?pi:mi]=!0,e._enter()})),M.on(this._element,i,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?pi:mi]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},M.on(this._element.closest(gi),fi,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-coreui-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=q.getDataAttributes(this._element);for(const t of Object.keys(e))di.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:a(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,i]of Object.entries(this._config))this.constructor.Default[e]!==i&&(t[e]=i);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each((function(){const e=wi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}m(wi);const Ai={...wi.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},Ei={...wi.DefaultType,content:"(null|string|element|function)"};class Ci extends wi{static get Default(){return Ai}static get DefaultType(){return Ei}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=Ci.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}m(Ci);const Ti=".coreui.scrollspy",ki=`activate${Ti}`,Li=`click${Ti}`,Si=`load${Ti}.data-api`,Oi="active",Ni="[href]",Ii={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Di={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class $i extends W{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Ii}static get DefaultType(){return Di}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=a(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(M.off(this._config.target,Li),M.on(this._config.target,Li,Ni,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,s=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:s,behavior:"smooth"});i.scrollTop=s}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},s=(this._rootElement||document.documentElement).scrollTop,n=s>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=s;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(n&&t){if(i(o),!s)return}else n||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=R.find(Ni,this._config.target);for(const e of t){if(!e.hash||c(e))continue;const t=R.findOne(e.hash,this._element);l(t)&&(this._targetLinks.set(e.hash,e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Oi),this._activateParents(t),M.trigger(this._element,ki,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))R.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Oi);else for(const e of R.parents(t,".nav, .list-group"))for(const t of R.prev(e,".nav-link, .nav-item > .nav-link, .list-group-item"))t.classList.add(Oi)}_clearActiveClass(t){t.classList.remove(Oi);const e=R.find("[href].active",t);for(const t of e)t.classList.remove(Oi)}static jQueryInterface(t){return this.each((function(){const e=$i.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}M.on(window,Si,(()=>{for(const t of R.find('[data-coreui-spy="scroll"]'))$i.getOrCreateInstance(t)})),m($i);const xi=".coreui.sidebar",Mi={},Pi={},ji="hide",Fi="show",zi="sidebar-narrow",Hi="sidebar-narrow-unfoldable",qi=`hide${xi}`,Bi=`hidden${xi}`,Wi=`show${xi}`,Vi=`shown${xi}`,Ri=`click${xi}.data-api`,Ki=`load${xi}.data-api`,Qi=".sidebar";class Ui extends W{constructor(t,e){super(t),this._config=this._getConfig(e),this._show=this._isVisible(),this._mobile=this._isMobile(),this._overlaid=this._isOverlaid(),this._narrow=this._isNarrow(),this._unfoldable=this._isUnfoldable(),this._backdrop=this._initializeBackDrop(),this._addEventListeners()}static get Default(){return Mi}static get DefaultType(){return Pi}static get NAME(){return"sidebar"}show(){M.trigger(this._element,Wi),this._element.classList.contains(ji)&&this._element.classList.remove(ji),this._isMobile()&&(this._element.classList.add(Fi),this._backdrop.show(),(new oe).hide()),this._queueCallback((()=>{!0===this._isVisible()&&(this._show=!0,(this._isMobile()||this._isOverlaid())&&this._addClickOutListener(),M.trigger(this._element,Vi))}),this._element,!0)}hide(){M.trigger(this._element,qi),this._element.classList.contains(Fi)&&this._element.classList.remove(Fi),this._isMobile()?(this._backdrop.hide(),(new oe).reset()):this._element.classList.add(ji),this._queueCallback((()=>{!1===this._isVisible()&&(this._show=!1,(this._isMobile()||this._isOverlaid())&&this._removeClickOutListener(),M.trigger(this._element,Bi))}),this._element,!0)}toggle(){this._isVisible()?this.hide():this.show()}narrow(){this._isMobile()||(this._addClassName(zi),this._narrow=!0)}unfoldable(){this._isMobile()||(this._addClassName(Hi),this._unfoldable=!0)}reset(){this._isMobile()||(this._narrow&&(this._element.classList.remove(zi),this._narrow=!1),this._unfoldable&&(this._element.classList.remove(Hi),this._unfoldable=!1))}toggleNarrow(){this._narrow?this.reset():this.narrow()}toggleUnfoldable(){this._unfoldable?this.reset():this.unfoldable()}_getConfig(t){return{...Mi,...q.getDataAttributes(this._element),..."object"==typeof t?t:{}}}_initializeBackDrop(){return new he({className:"sidebar-backdrop",isVisible:this._isMobile(),isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_isMobile(){return Boolean(window.getComputedStyle(this._element,null).getPropertyValue("--cui-is-mobile"))}_isNarrow(){return this._element.classList.contains(zi)}_isOverlaid(){return this._element.classList.contains("sidebar-overlaid")}_isUnfoldable(){return this._element.classList.contains(Hi)}_isVisible(){const t=this._element.getBoundingClientRect();return t.top>=0&&t.left>=0&&Math.floor(t.bottom)<=(window.innerHeight||document.documentElement.clientHeight)&&Math.floor(t.right)<=(window.innerWidth||document.documentElement.clientWidth)}_addClassName(t){this._element.classList.add(t)}_clickOutListener(t,e){null===t.target.closest(Qi)&&(t.preventDefault(),t.stopPropagation(),e.hide())}_addClickOutListener(){M.on(document,Ri,(t=>{this._clickOutListener(t,this)}))}_removeClickOutListener(){M.off(document,Ri)}_addEventListeners(){this._mobile&&this._show&&this._addClickOutListener(),this._overlaid&&this._show&&this._addClickOutListener(),M.on(this._element,Ri,"[data-coreui-toggle]",(t=>{t.preventDefault();const e=q.getDataAttribute(t.target,"toggle");"narrow"===e&&this.toggleNarrow(),"unfoldable"===e&&this.toggleUnfoldable()})),M.on(this._element,Ri,'[data-coreui-close="sidebar"]',(t=>{t.preventDefault(),this.hide()})),M.on(window,"resize",(()=>{this._isMobile()&&this._isVisible()&&(this.hide(),this._backdrop=this._initializeBackDrop())}))}static sidebarInterface(t,e){const i=Ui.getOrCreateInstance(t,e);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e]()}}static jQueryInterface(t){return this.each((function(){Ui.sidebarInterface(this,t)}))}}M.on(window,Ki,(()=>{for(const t of Array.from(document.querySelectorAll(Qi)))Ui.sidebarInterface(t)})),m(Ui);const Yi="ArrowLeft",Xi="ArrowRight",Gi="ArrowUp",Ji="ArrowDown",Zi="active",ts="fade",es="show",is='[data-coreui-toggle="tab"], [data-coreui-toggle="pill"], [data-coreui-toggle="list"]',ss=`.nav-link:not(.dropdown-toggle), .list-group-item:not(.dropdown-toggle), [role="tab"]:not(.dropdown-toggle), ${is}`;class ns extends W{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),M.on(this._element,"keydown.coreui.tab",(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?M.trigger(e,"hide.coreui.tab",{relatedTarget:t}):null;M.trigger(t,"show.coreui.tab",{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(Zi),this._activate(R.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),M.trigger(t,"shown.coreui.tab",{relatedTarget:e})):t.classList.add(es)}),t,t.classList.contains(ts)))}_deactivate(t,e){t&&(t.classList.remove(Zi),t.blur(),this._deactivate(R.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),M.trigger(t,"hidden.coreui.tab",{relatedTarget:e})):t.classList.remove(es)}),t,t.classList.contains(ts)))}_keydown(t){if(![Yi,Xi,Gi,Ji].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=[Xi,Ji].includes(t.key),i=v(this._getChildren().filter((t=>!c(t))),t.target,e,!0);i&&(i.focus({preventScroll:!0}),ns.getOrCreateInstance(i).show())}_getChildren(){return R.find(ss,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=R.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`#${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const s=(t,s)=>{const n=R.findOne(t,i);n&&n.classList.toggle(s,e)};s(".dropdown-toggle",Zi),s(".dropdown-menu",es),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(Zi)}_getInnerElement(t){return t.matches(ss)?t:R.findOne(ss,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=ns.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}M.on(document,"click.coreui.tab",is,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),c(this)||ns.getOrCreateInstance(this).show()})),M.on(window,"load.coreui.tab",(()=>{for(const t of R.find('.active[data-coreui-toggle="tab"], .active[data-coreui-toggle="pill"], .active[data-coreui-toggle="list"]'))ns.getOrCreateInstance(t)})),m(ns);const os=".coreui.toast",rs=`mouseover${os}`,as=`mouseout${os}`,ls=`focusin${os}`,cs=`focusout${os}`,hs=`hide${os}`,ds=`hidden${os}`,us=`show${os}`,_s=`shown${os}`,gs="hide",fs="show",ms="showing",ps={animation:"boolean",autohide:"boolean",delay:"number"},bs={animation:!0,autohide:!0,delay:5e3};class vs extends W{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return bs}static get DefaultType(){return ps}static get NAME(){return"toast"}show(){M.trigger(this._element,us).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(gs),u(this._element),this._element.classList.add(fs,ms),this._queueCallback((()=>{this._element.classList.remove(ms),M.trigger(this._element,_s),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(M.trigger(this._element,hs).defaultPrevented||(this._element.classList.add(ms),this._queueCallback((()=>{this._element.classList.add(gs),this._element.classList.remove(ms,fs),M.trigger(this._element,ds)}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(fs),super.dispose()}isShown(){return this._element.classList.contains(fs)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){M.on(this._element,rs,(t=>this._onInteraction(t,!0))),M.on(this._element,as,(t=>this._onInteraction(t,!1))),M.on(this._element,ls,(t=>this._onInteraction(t,!0))),M.on(this._element,cs,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=vs.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return K(vs),m(vs),{Alert:Q,Button:Y,Carousel:pt,Collapse:Nt,Dropdown:te,Modal:Te,Navigation:Fe,OffCanvas:ei,Popover:Ci,ScrollSpy:$i,Sidebar:Ui,Tab:ns,Toast:vs,Tooltip:wi}}));
|
|
7
7
|
//# sourceMappingURL=coreui.min.js.map
|