@coreui/coreui 5.4.3 → 5.6.0
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/LICENSE +1 -1
- package/README.md +5 -3
- 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 +2 -2
- package/dist/css/coreui-grid.rtl.css.map +1 -1
- package/dist/css/coreui-grid.rtl.min.css +2 -2
- package/dist/css/coreui-grid.rtl.min.css.map +1 -1
- package/dist/css/coreui-reboot.css +11 -2
- package/dist/css/coreui-reboot.css.map +1 -1
- package/dist/css/coreui-reboot.min.css +3 -3
- package/dist/css/coreui-reboot.min.css.map +1 -1
- package/dist/css/coreui-reboot.rtl.css +11 -2
- 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 +11 -2
- package/dist/css/coreui-utilities.css.map +1 -1
- package/dist/css/coreui-utilities.min.css +3 -3
- package/dist/css/coreui-utilities.min.css.map +1 -1
- package/dist/css/coreui-utilities.rtl.css +11 -2
- 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 +337 -2
- package/dist/css/coreui.css.map +1 -1
- package/dist/css/coreui.min.css +3 -3
- package/dist/css/coreui.min.css.map +1 -1
- package/dist/css/coreui.rtl.css +332 -2
- 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/css/themes/bootstrap/bootstrap.css +337 -2
- package/dist/css/themes/bootstrap/bootstrap.css.map +1 -1
- package/dist/css/themes/bootstrap/bootstrap.min.css +3 -3
- package/dist/css/themes/bootstrap/bootstrap.min.css.map +1 -1
- package/dist/css/themes/bootstrap/bootstrap.rtl.css +332 -2
- package/dist/css/themes/bootstrap/bootstrap.rtl.css.map +1 -1
- package/dist/css/themes/bootstrap/bootstrap.rtl.min.css +3 -3
- package/dist/css/themes/bootstrap/bootstrap.rtl.min.css.map +1 -1
- package/dist/js/bootstrap.bundle.js +874 -60
- package/dist/js/bootstrap.bundle.js.map +1 -1
- package/dist/js/bootstrap.bundle.min.js +3 -3
- package/dist/js/bootstrap.bundle.min.js.map +1 -1
- package/dist/js/bootstrap.esm.js +873 -53
- package/dist/js/bootstrap.esm.js.map +1 -1
- package/dist/js/bootstrap.esm.min.js +3 -3
- package/dist/js/bootstrap.esm.min.js.map +1 -1
- package/dist/js/bootstrap.js +874 -52
- package/dist/js/bootstrap.js.map +1 -1
- package/dist/js/bootstrap.min.js +3 -3
- package/dist/js/bootstrap.min.js.map +1 -1
- package/dist/js/coreui.bundle.js +874 -60
- package/dist/js/coreui.bundle.js.map +1 -1
- package/dist/js/coreui.bundle.min.js +3 -3
- package/dist/js/coreui.bundle.min.js.map +1 -1
- package/dist/js/coreui.esm.js +873 -53
- package/dist/js/coreui.esm.js.map +1 -1
- package/dist/js/coreui.esm.min.js +3 -3
- package/dist/js/coreui.esm.min.js.map +1 -1
- package/dist/js/coreui.js +874 -52
- package/dist/js/coreui.js.map +1 -1
- package/dist/js/coreui.min.js +3 -3
- package/dist/js/coreui.min.js.map +1 -1
- package/js/dist/alert.js +2 -2
- 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/carousel.js +2 -2
- package/js/dist/chip-input.js +528 -0
- package/js/dist/chip-input.js.map +1 -0
- package/js/dist/chip.js +322 -0
- package/js/dist/chip.js.map +1 -0
- package/js/dist/collapse.js +2 -2
- package/js/dist/dom/data.js +2 -2
- package/js/dist/dom/event-handler.js +2 -2
- package/js/dist/dom/manipulator.js +2 -2
- package/js/dist/dom/selector-engine.js +2 -2
- package/js/dist/dropdown.js +2 -2
- package/js/dist/modal.js +2 -2
- package/js/dist/navigation.js +2 -2
- package/js/dist/offcanvas.js +2 -2
- package/js/dist/popover.js +2 -2
- package/js/dist/scrollspy.js +2 -2
- package/js/dist/sidebar.js +2 -2
- package/js/dist/tab.js +2 -2
- package/js/dist/toast.js +2 -2
- package/js/dist/tooltip.js +2 -2
- package/js/dist/util/backdrop.js +2 -2
- package/js/dist/util/component-functions.js +2 -2
- package/js/dist/util/config.js +2 -2
- package/js/dist/util/focustrap.js +2 -2
- package/js/dist/util/index.js +2 -2
- package/js/dist/util/sanitizer.js +2 -2
- package/js/dist/util/scrollbar.js +2 -2
- package/js/dist/util/swipe.js +2 -2
- package/js/dist/util/template-factory.js +2 -2
- package/js/index.esm.js +2 -0
- package/js/index.umd.js +4 -0
- package/js/src/base-component.js +1 -1
- package/js/src/chip-input.js +595 -0
- package/js/src/chip.js +365 -0
- package/package.json +34 -33
- package/scss/_banner.scss +2 -2
- package/scss/_buttons.scss +9 -5
- package/scss/_card.scss +2 -1
- package/scss/_carousel.scss +4 -2
- package/scss/_chip.import.scss +1 -0
- package/scss/_chip.scss +261 -0
- package/scss/_dropdown.scss +5 -3
- package/scss/_forms.scss +1 -0
- package/scss/_header.scss +3 -2
- package/scss/_list-group.scss +1 -1
- package/scss/_maps.scss +16 -1
- package/scss/_modal.scss +2 -1
- package/scss/_nav.scss +3 -2
- package/scss/_navbar.scss +5 -3
- package/scss/_pagination.scss +3 -2
- package/scss/_root.scss +5 -0
- package/scss/coreui.scss +1 -0
- package/scss/forms/_chip-input.import.scss +1 -0
- package/scss/forms/_chip-input.scss +109 -0
- package/scss/forms/_form-control.scss +2 -1
- package/scss/functions/_color.scss +5 -1
- package/scss/functions/_contrast-ratio.scss +3 -2
- package/scss/functions/_maps.scss +9 -1
- package/scss/functions/_math.scss +4 -3
- package/scss/helpers/_color-bg.scss +8 -4
- package/scss/helpers/_colored-links.scss +18 -9
- package/scss/mixins/_breakpoints.scss +9 -4
- package/scss/mixins/_buttons.scss +4 -4
- package/scss/mixins/_chip.scss +14 -0
- package/scss/mixins/_focus-ring.scss +9 -0
- package/scss/mixins/_forms.scss +3 -3
- package/scss/mixins/_grid.scss +4 -2
- package/scss/mixins/_ltr-rtl.scss +24 -12
- package/scss/mixins/_table-variants.scss +6 -4
- package/scss/mixins/_utilities.scss +22 -12
- package/scss/vendor/_rfs.scss +27 -19
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* CoreUI v5.
|
|
3
|
-
* Copyright
|
|
2
|
+
* CoreUI v5.6.0 (https://coreui.io)
|
|
3
|
+
* Copyright 2026 The CoreUI Team (https://github.com/orgs/coreui/people)
|
|
4
4
|
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
5
5
|
*/
|
|
6
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).coreui=e()}(this,function(){"use strict";const t=new Map,e={set(e,i,n){t.has(e)||t.set(e,new Map);const s=t.get(e);s.has(i)||0===s.size?s.set(i,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(e,i)=>t.has(e)&&t.get(e).get(i)||null,remove(e,i){if(!t.has(e))return;const n=t.get(e);n.delete(i),0===n.size&&t.delete(e)}},i="transitionend",n=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,(t,e)=>`#${CSS.escape(e)}`)),t),s=t=>null==t?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),o=t=>{t.dispatchEvent(new Event(i))},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},f=()=>window.jQuery&&!document.body.hasAttribute("data-coreui-no-jquery")?window.jQuery:null,p=[],g=()=>"rtl"===document.documentElement.dir,m=t=>{var e;e=()=>{const e=f();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}},"loading"===document.readyState?(p.length||document.addEventListener("DOMContentLoaded",()=>{for(const t of p)t()}),p.push(e)):e()},_=(t,e=[],i=t)=>"function"==typeof t?t.call(...e):i,b=(t,e,n=!0)=>{if(!n)return void _(t);const s=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let r=!1;const a=({target:n})=>{n===e&&(r=!0,e.removeEventListener(i,a),_(t))};e.addEventListener(i,a),setTimeout(()=>{r||o(e)},s)},v=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},y=/[^.]*(?=\..*)\.|.*/,w=/\..*/,A=/::\d+$/,E={};let C=1;const T={mouseenter:"mouseover",mouseleave:"mouseout"},O=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 k(t,e){return e&&`${e}::${C++}`||t.uidEvent||C++}function x(t){const e=k(t);return t.uidEvent=e,E[e]=E[e]||{},E[e]}function L(t,e,i=null){return Object.values(t).find(t=>t.callable===e&&t.delegationSelector===i)}function S(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=I(t);return O.has(o)||(o=t),[n,s,o]}function D(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=S(e,i,n);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=x(t),c=l[a]||(l[a]={}),h=L(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=k(r,e.replace(y,"")),u=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return P(s,{delegateTarget:r}),n.oneOff&&M.off(t,s.type,e,i),i.apply(r,[s])}}(t,i,r):function(t,e){return function i(n){return P(n,{delegateTarget:t}),i.oneOff&&M.off(t,n.type,e),e.apply(t,[n])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=s,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function $(t,e,i,n,s){const o=L(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function N(t,e,i,n){const s=e[i]||{};for(const[o,r]of Object.entries(s))o.includes(n)&&$(t,e,i,r.callable,r.delegationSelector)}function I(t){return t=t.replace(w,""),T[t]||t}const M={on(t,e,i,n){D(t,e,i,n,!1)},one(t,e,i,n){D(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=S(e,i,n),a=r!==e,l=x(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))N(t,l,i,e.slice(1));for(const[i,n]of Object.entries(c)){const s=i.replace(A,"");a&&!e.includes(s)||$(t,l,r,n.callable,n.delegationSelector)}}else{if(!Object.keys(c).length)return;$(t,l,r,o,s?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=f();let s=null,o=!0,r=!0,a=!1;e!==I(e)&&n&&(s=n.Event(e,i),n(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());const l=P(new Event(e,{bubbles:o,cancelable:!0}),i);return a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function P(t,e={}){for(const[i,n]of Object.entries(e))try{t[i]=n}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}function j(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 F(t){return t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const H={setDataAttribute(t,e,i){t.setAttribute(`data-coreui-${F(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-coreui-${F(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter(t=>t.startsWith("coreui")&&!t.startsWith("coreuiConfig"));for(const n of i){let i=n.replace(/^coreui/,"");i=i.charAt(0).toLowerCase()+i.slice(1),e[i]=j(t.dataset[n])}return e},getDataAttribute:(t,e)=>j(t.getAttribute(`data-coreui-${F(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)?H.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...r(e)?H.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[i,n]of Object.entries(e)){const e=t[i],o=r(e)?"element":s(e);if(!new RegExp(n).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${o}" but expected type "${n}".`)}}}class W extends B{constructor(t,i){super(),(t=a(t))&&(this._element=t,this._config=this._getConfig(i),e.set(this._element,this.constructor.DATA_KEY,this))}dispose(){e.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 e.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"5.4.3"}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 z=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 e?e.split(",").map(t=>n(t)).join(","):null},q={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 n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.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=z(t);return e&&q.findOne(e)?e:null},getElementFromSelector(t){const e=z(t);return e?q.findOne(e):null},getMultipleElementsFromSelector(t){const e=z(t);return e?q.find(e):[]}},R=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;M.on(document,i,`[data-coreui-dismiss="${n}"]`,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),c(this))return;const s=q.getElementFromSelector(this)||this.closest(`.${n}`);t.getOrCreateInstance(s)[e]()})},V=".coreui.alert",U=`close${V}`,K=`closed${V}`;class Q extends W{static get NAME(){return"alert"}close(){if(M.trigger(this._element,U).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,K),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)}})}}R(Q,"close"),m(Q);const Y='[data-coreui-toggle="button"]';class X 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=X.getOrCreateInstance(this);"toggle"===t&&e[t]()})}}M.on(document,"click.coreui.button.data-api",Y,t=>{t.preventDefault();const e=t.target.closest(Y);X.getOrCreateInstance(e).toggle()}),m(X);const G=".coreui.swipe",J=`touchstart${G}`,Z=`touchmove${G}`,tt=`touchend${G}`,et=`pointerdown${G}`,it=`pointerup${G}`,nt={endCallback:null,leftCallback:null,rightCallback:null},st={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class ot extends B{constructor(t,e){super(),this._element=t,t&&ot.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return nt}static get DefaultType(){return st}static get NAME(){return"swipe"}dispose(){M.off(this._element,G)}_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(),_(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&&_(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(M.on(this._element,et,t=>this._start(t)),M.on(this._element,it,t=>this._end(t)),this._element.classList.add("pointer-event")):(M.on(this._element,J,t=>this._start(t)),M.on(this._element,Z,t=>this._move(t)),M.on(this._element,tt,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 rt=".coreui.carousel",at=".data-api",lt="ArrowLeft",ct="ArrowRight",ht="next",dt="prev",ut="left",ft="right",pt=`slide${rt}`,gt=`slid${rt}`,mt=`keydown${rt}`,_t=`mouseenter${rt}`,bt=`mouseleave${rt}`,vt=`dragstart${rt}`,yt=`load${rt}${at}`,wt=`click${rt}${at}`,At="carousel",Et="active",Ct=".active",Tt=".carousel-item",Ot=Ct+Tt,kt={[lt]:ft,[ct]:ut},xt={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Lt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class St 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=q.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===At&&this.cycle()}static get Default(){return xt}static get DefaultType(){return Lt}static get NAME(){return"carousel"}next(){this._slide(ht)}nextWhenVisible(){!document.hidden&&l(this._element)&&this.next()}prev(){this._slide(dt)}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,gt,()=>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,gt,()=>this.to(t));const i=this._getItemIndex(this._getActive());if(i===t)return;const n=t>i?ht:dt;this._slide(n,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,mt,t=>this._keydown(t)),"hover"===this._config.pause&&(M.on(this._element,_t,()=>this.pause()),M.on(this._element,bt,()=>this._maybeEnableCycle())),this._config.touch&&ot.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of q.find(".carousel-item img",this._element))M.on(t,vt,t=>t.preventDefault());const t={leftCallback:()=>this._slide(this._directionToOrder(ut)),rightCallback:()=>this._slide(this._directionToOrder(ft)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new ot(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=kt[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=q.findOne(Ct,this._indicatorsElement);e.classList.remove(Et),e.removeAttribute("aria-current");const i=q.findOne(`[data-coreui-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(Et),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(),n=t===ht,s=e||v(this._getItems(),i,n,this._config.wrap);if(s===i)return;const o=this._getItemIndex(s),r=e=>M.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r(pt).defaultPrevented)return;if(!i||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=n?"carousel-item-start":"carousel-item-end",c=n?"carousel-item-next":"carousel-item-prev";s.classList.add(c),u(s),i.classList.add(l),s.classList.add(l),this._queueCallback(()=>{s.classList.remove(l,c),s.classList.add(Et),i.classList.remove(Et,c,l),this._isSliding=!1,r(gt)},i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return q.findOne(Ot,this._element)}_getItems(){return q.find(Tt,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return g()?t===ut?dt:ht:t===ut?ht:dt}_orderToDirection(t){return g()?t===dt?ut:ft:t===dt?ft:ut}static jQueryInterface(t){return this.each(function(){const e=St.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,wt,"[data-coreui-slide], [data-coreui-slide-to]",function(t){const e=q.getElementFromSelector(this);if(!e||!e.classList.contains(At))return;t.preventDefault();const i=St.getOrCreateInstance(e),n=this.getAttribute("data-coreui-slide-to");return n?(i.to(n),void i._maybeEnableCycle()):"next"===H.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())}),M.on(window,yt,()=>{const t=q.find('[data-coreui-ride="carousel"]');for(const e of t)St.getOrCreateInstance(e)}),m(St);const Dt=".coreui.collapse",$t=`show${Dt}`,Nt=`shown${Dt}`,It=`hide${Dt}`,Mt=`hidden${Dt}`,Pt=`click${Dt}.data-api`,jt="show",Ft="collapse",Ht="collapsing",Bt=`:scope .${Ft} .${Ft}`,Wt='[data-coreui-toggle="collapse"]',zt={parent:null,toggle:!0},qt={parent:"(null|element)",toggle:"boolean"};class Rt extends W{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=q.find(Wt);for(const t of i){const e=q.getSelectorFromElement(t),i=q.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 zt}static get DefaultType(){return qt}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=>Rt.getOrCreateInstance(t,{toggle:!1}))),t.length&&t[0]._isTransitioning)return;if(M.trigger(this._element,$t).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(Ft),this._element.classList.add(Ht),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(Ht),this._element.classList.add(Ft,jt),this._element.style[e]="",M.trigger(this._element,Nt)},this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(M.trigger(this._element,It).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,u(this._element),this._element.classList.add(Ht),this._element.classList.remove(Ft,jt);for(const t of this._triggerArray){const e=q.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(Ht),this._element.classList.add(Ft),M.trigger(this._element,Mt)},this._element,!0)}_isShown(t=this._element){return t.classList.contains(jt)}_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(Wt);for(const e of t){const t=q.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=q.find(Bt,this._config.parent);return q.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=Rt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}})}}M.on(document,Pt,Wt,function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of q.getMultipleElementsFromSelector(this))Rt.getOrCreateInstance(t,{toggle:!1}).toggle()}),m(Rt);var Vt="top",Ut="bottom",Kt="right",Qt="left",Yt="auto",Xt=[Vt,Ut,Kt,Qt],Gt="start",Jt="end",Zt="clippingParents",te="viewport",ee="popper",ie="reference",ne=Xt.reduce(function(t,e){return t.concat([e+"-"+Gt,e+"-"+Jt])},[]),se=[].concat(Xt,[Yt]).reduce(function(t,e){return t.concat([e,e+"-"+Gt,e+"-"+Jt])},[]),oe="beforeRead",re="read",ae="afterRead",le="beforeMain",ce="main",he="afterMain",de="beforeWrite",ue="write",fe="afterWrite",pe=[oe,re,ae,le,ce,he,de,ue,fe];function ge(t){return t?(t.nodeName||"").toLowerCase():null}function me(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function _e(t){return t instanceof me(t).Element||t instanceof Element}function be(t){return t instanceof me(t).HTMLElement||t instanceof HTMLElement}function ve(t){return"undefined"!=typeof ShadowRoot&&(t instanceof me(t).ShadowRoot||t instanceof ShadowRoot)}const ye={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];be(s)&&ge(s)&&(Object.assign(s.style,i),Object.keys(n).forEach(function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach(function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce(function(t,e){return t[e]="",t},{});be(n)&&ge(n)&&(Object.assign(n.style,o),Object.keys(s).forEach(function(t){n.removeAttribute(t)}))})}},requires:["computeStyles"]};function we(t){return t.split("-")[0]}var Ae=Math.max,Ee=Math.min,Ce=Math.round;function Te(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Oe(){return!/^((?!chrome|android).)*safari/i.test(Te())}function ke(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,o=1;e&&be(t)&&(s=t.offsetWidth>0&&Ce(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Ce(n.height)/t.offsetHeight||1);var r=(_e(t)?me(t):window).visualViewport,a=!Oe()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/s,c=(n.top+(a&&r?r.offsetTop:0))/o,h=n.width/s,d=n.height/o;return{width:h,height:d,top:c,right:l+h,bottom:c+d,left:l,x:l,y:c}}function xe(t){var e=ke(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function Le(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&ve(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Se(t){return me(t).getComputedStyle(t)}function De(t){return["table","td","th"].indexOf(ge(t))>=0}function $e(t){return((_e(t)?t.ownerDocument:t.document)||window.document).documentElement}function Ne(t){return"html"===ge(t)?t:t.assignedSlot||t.parentNode||(ve(t)?t.host:null)||$e(t)}function Ie(t){return be(t)&&"fixed"!==Se(t).position?t.offsetParent:null}function Me(t){for(var e=me(t),i=Ie(t);i&&De(i)&&"static"===Se(i).position;)i=Ie(i);return i&&("html"===ge(i)||"body"===ge(i)&&"static"===Se(i).position)?e:i||function(t){var e=/firefox/i.test(Te());if(/Trident/i.test(Te())&&be(t)&&"fixed"===Se(t).position)return null;var i=Ne(t);for(ve(i)&&(i=i.host);be(i)&&["html","body"].indexOf(ge(i))<0;){var n=Se(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function Pe(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function je(t,e,i){return Ae(t,Ee(e,i))}function Fe(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function He(t,e){return e.reduce(function(e,i){return e[i]=t,e},{})}const Be={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,s=t.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=we(i.placement),l=Pe(a),c=[Qt,Kt].indexOf(a)>=0?"height":"width";if(o&&r){var h=function(t,e){return Fe("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:He(t,Xt))}(s.padding,i),d=xe(o),u="y"===l?Vt:Qt,f="y"===l?Ut:Kt,p=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],g=r[l]-i.rects.reference[l],m=Me(o),_=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,b=p/2-g/2,v=h[u],y=_-d[c]-h[f],w=_/2-d[c]/2+b,A=je(v,w,y),E=l;i.modifiersData[n]=((e={})[E]=A,e.centerOffset=A-w,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&Le(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function We(t){return t.split("-")[1]}var ze={top:"auto",right:"auto",bottom:"auto",left:"auto"};function qe(t){var e,i=t.popper,n=t.popperRect,s=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,h=t.roundOffsets,d=t.isFixed,u=r.x,f=void 0===u?0:u,p=r.y,g=void 0===p?0:p,m="function"==typeof h?h({x:f,y:g}):{x:f,y:g};f=m.x,g=m.y;var _=r.hasOwnProperty("x"),b=r.hasOwnProperty("y"),v=Qt,y=Vt,w=window;if(c){var A=Me(i),E="clientHeight",C="clientWidth";A===me(i)&&"static"!==Se(A=$e(i)).position&&"absolute"===a&&(E="scrollHeight",C="scrollWidth"),(s===Vt||(s===Qt||s===Kt)&&o===Jt)&&(y=Ut,g-=(d&&A===w&&w.visualViewport?w.visualViewport.height:A[E])-n.height,g*=l?1:-1),s!==Qt&&(s!==Vt&&s!==Ut||o!==Jt)||(v=Kt,f-=(d&&A===w&&w.visualViewport?w.visualViewport.width:A[C])-n.width,f*=l?1:-1)}var T,O=Object.assign({position:a},c&&ze),k=!0===h?function(t,e){var i=t.x,n=t.y,s=e.devicePixelRatio||1;return{x:Ce(i*s)/s||0,y:Ce(n*s)/s||0}}({x:f,y:g},me(i)):{x:f,y:g};return f=k.x,g=k.y,l?Object.assign({},O,((T={})[y]=b?"0":"",T[v]=_?"0":"",T.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",T)):Object.assign({},O,((e={})[y]=b?g+"px":"",e[v]=_?f+"px":"",e.transform="",e))}const Re={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:we(e.placement),variation:We(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,qe(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,qe(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var Ve={passive:!0};const Ue={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=me(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(t){t.addEventListener("scroll",i.update,Ve)}),a&&l.addEventListener("resize",i.update,Ve),function(){o&&c.forEach(function(t){t.removeEventListener("scroll",i.update,Ve)}),a&&l.removeEventListener("resize",i.update,Ve)}},data:{}};var Ke={left:"right",right:"left",bottom:"top",top:"bottom"};function Qe(t){return t.replace(/left|right|bottom|top/g,function(t){return Ke[t]})}var Ye={start:"end",end:"start"};function Xe(t){return t.replace(/start|end/g,function(t){return Ye[t]})}function Ge(t){var e=me(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Je(t){return ke($e(t)).left+Ge(t).scrollLeft}function Ze(t){var e=Se(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function ti(t){return["html","body","#document"].indexOf(ge(t))>=0?t.ownerDocument.body:be(t)&&Ze(t)?t:ti(Ne(t))}function ei(t,e){var i;void 0===e&&(e=[]);var n=ti(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),o=me(n),r=s?[o].concat(o.visualViewport||[],Ze(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(ei(Ne(r)))}function ii(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function ni(t,e,i){return e===te?ii(function(t,e){var i=me(t),n=$e(t),s=i.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=Oe();(c||!c&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+Je(t),y:l}}(t,i)):_e(e)?function(t,e){var i=ke(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):ii(function(t){var e,i=$e(t),n=Ge(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=Ae(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=Ae(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+Je(t),l=-n.scrollTop;return"rtl"===Se(s||i).direction&&(a+=Ae(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}($e(t)))}function si(t){var e,i=t.reference,n=t.element,s=t.placement,o=s?we(s):null,r=s?We(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case Vt:e={x:a,y:i.y-n.height};break;case Ut:e={x:a,y:i.y+i.height};break;case Kt:e={x:i.x+i.width,y:l};break;case Qt:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?Pe(o):null;if(null!=c){var h="y"===c?"height":"width";switch(r){case Gt:e[c]=e[c]-(i[h]/2-n[h]/2);break;case Jt:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}function oi(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=void 0===n?t.placement:n,o=i.strategy,r=void 0===o?t.strategy:o,a=i.boundary,l=void 0===a?Zt:a,c=i.rootBoundary,h=void 0===c?te:c,d=i.elementContext,u=void 0===d?ee:d,f=i.altBoundary,p=void 0!==f&&f,g=i.padding,m=void 0===g?0:g,_=Fe("number"!=typeof m?m:He(m,Xt)),b=u===ee?ie:ee,v=t.rects.popper,y=t.elements[p?b:u],w=function(t,e,i,n){var s="clippingParents"===e?function(t){var e=ei(Ne(t)),i=["absolute","fixed"].indexOf(Se(t).position)>=0&&be(t)?Me(t):t;return _e(i)?e.filter(function(t){return _e(t)&&Le(t,i)&&"body"!==ge(t)}):[]}(t):[].concat(e),o=[].concat(s,[i]),r=o[0],a=o.reduce(function(e,i){var s=ni(t,i,n);return e.top=Ae(s.top,e.top),e.right=Ee(s.right,e.right),e.bottom=Ee(s.bottom,e.bottom),e.left=Ae(s.left,e.left),e},ni(t,r,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(_e(y)?y:y.contextElement||$e(t.elements.popper),l,h,r),A=ke(t.elements.reference),E=si({reference:A,element:v,placement:s}),C=ii(Object.assign({},v,E)),T=u===ee?C:A,O={top:w.top-T.top+_.top,bottom:T.bottom-w.bottom+_.bottom,left:w.left-T.left+_.left,right:T.right-w.right+_.right},k=t.modifiersData.offset;if(u===ee&&k){var x=k[s];Object.keys(O).forEach(function(t){var e=[Kt,Ut].indexOf(t)>=0?1:-1,i=[Vt,Ut].indexOf(t)>=0?"y":"x";O[t]+=x[i]*e})}return O}function ri(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?se:l,h=We(n),d=h?a?ne:ne.filter(function(t){return We(t)===h}):Xt,u=d.filter(function(t){return c.indexOf(t)>=0});0===u.length&&(u=d);var f=u.reduce(function(e,i){return e[i]=oi(t,{placement:i,boundary:s,rootBoundary:o,padding:r})[we(i)],e},{});return Object.keys(f).sort(function(t,e){return f[t]-f[e]})}const ai={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,c=i.padding,h=i.boundary,d=i.rootBoundary,u=i.altBoundary,f=i.flipVariations,p=void 0===f||f,g=i.allowedAutoPlacements,m=e.options.placement,_=we(m),b=l||(_!==m&&p?function(t){if(we(t)===Yt)return[];var e=Qe(t);return[Xe(t),e,Xe(e)]}(m):[Qe(m)]),v=[m].concat(b).reduce(function(t,i){return t.concat(we(i)===Yt?ri(e,{placement:i,boundary:h,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:g}):i)},[]),y=e.rects.reference,w=e.rects.popper,A=new Map,E=!0,C=v[0],T=0;T<v.length;T++){var O=v[T],k=we(O),x=We(O)===Gt,L=[Vt,Ut].indexOf(k)>=0,S=L?"width":"height",D=oi(e,{placement:O,boundary:h,rootBoundary:d,altBoundary:u,padding:c}),$=L?x?Kt:Qt:x?Ut:Vt;y[S]>w[S]&&($=Qe($));var N=Qe($),I=[];if(o&&I.push(D[k]<=0),a&&I.push(D[$]<=0,D[N]<=0),I.every(function(t){return t})){C=O,E=!1;break}A.set(O,I)}if(E)for(var M=function(t){var e=v.find(function(e){var i=A.get(e);if(i)return i.slice(0,t).every(function(t){return t})});if(e)return C=e,"break"},P=p?3:1;P>0&&"break"!==M(P);P--);e.placement!==C&&(e.modifiersData[n]._skip=!0,e.placement=C,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function li(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function ci(t){return[Vt,Kt,Ut,Qt].some(function(e){return t[e]>=0})}const hi={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=oi(e,{elementContext:"reference"}),a=oi(e,{altBoundary:!0}),l=li(r,n),c=li(a,s,o),h=ci(l),d=ci(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}},di={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.offset,o=void 0===s?[0,0]:s,r=se.reduce(function(t,i){return t[i]=function(t,e,i){var n=we(t),s=[Qt,Vt].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[Qt,Kt].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}(i,e.rects,o),t},{}),a=r[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=r}},ui={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=si({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})},data:{}},fi={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,d=i.padding,u=i.tether,f=void 0===u||u,p=i.tetherOffset,g=void 0===p?0:p,m=oi(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),_=we(e.placement),b=We(e.placement),v=!b,y=Pe(_),w="x"===y?"y":"x",A=e.modifiersData.popperOffsets,E=e.rects.reference,C=e.rects.popper,T="function"==typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,O="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),k=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,x={x:0,y:0};if(A){if(o){var L,S="y"===y?Vt:Qt,D="y"===y?Ut:Kt,$="y"===y?"height":"width",N=A[y],I=N+m[S],M=N-m[D],P=f?-C[$]/2:0,j=b===Gt?E[$]:C[$],F=b===Gt?-C[$]:-E[$],H=e.elements.arrow,B=f&&H?xe(H):{width:0,height:0},W=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},z=W[S],q=W[D],R=je(0,E[$],B[$]),V=v?E[$]/2-P-R-z-O.mainAxis:j-R-z-O.mainAxis,U=v?-E[$]/2+P+R+q+O.mainAxis:F+R+q+O.mainAxis,K=e.elements.arrow&&Me(e.elements.arrow),Q=K?"y"===y?K.clientTop||0:K.clientLeft||0:0,Y=null!=(L=null==k?void 0:k[y])?L:0,X=N+U-Y,G=je(f?Ee(I,N+V-Y-Q):I,N,f?Ae(M,X):M);A[y]=G,x[y]=G-N}if(a){var J,Z="x"===y?Vt:Qt,tt="x"===y?Ut:Kt,et=A[w],it="y"===w?"height":"width",nt=et+m[Z],st=et-m[tt],ot=-1!==[Vt,Qt].indexOf(_),rt=null!=(J=null==k?void 0:k[w])?J:0,at=ot?nt:et-E[it]-C[it]-rt+O.altAxis,lt=ot?et+E[it]+C[it]-rt-O.altAxis:st,ct=f&&ot?function(t,e,i){var n=je(t,e,i);return n>i?i:n}(at,et,lt):je(f?at:nt,et,f?lt:st);A[w]=ct,x[w]=ct-et}e.modifiersData[n]=x}},requiresIfExists:["offset"]};function pi(t,e,i){void 0===i&&(i=!1);var n,s,o=be(e),r=be(e)&&function(t){var e=t.getBoundingClientRect(),i=Ce(e.width)/t.offsetWidth||1,n=Ce(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),a=$e(e),l=ke(t,r,i),c={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(o||!o&&!i)&&(("body"!==ge(e)||Ze(a))&&(c=(n=e)!==me(n)&&be(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:Ge(n)),be(e)?((h=ke(e,!0)).x+=e.clientLeft,h.y+=e.clientTop):a&&(h.x=Je(a))),{x:l.left+c.scrollLeft-h.x,y:l.top+c.scrollTop-h.y,width:l.width,height:l.height}}function gi(t){var e=new Map,i=new Set,n=[];function s(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!i.has(t)){var n=e.get(t);n&&s(n)}}),n.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){i.has(t.name)||s(t)}),n}var mi={placement:"bottom",modifiers:[],strategy:"absolute"};function _i(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function bi(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,s=e.defaultOptions,o=void 0===s?mi:s;return function(t,e,i){void 0===i&&(i=o);var s,r,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},mi,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,h={state:a,setOptions:function(i){var s="function"==typeof i?i(a.options):i;d(),a.options=Object.assign({},o,a.options,s),a.scrollParents={reference:_e(t)?ei(t):t.contextElement?ei(t.contextElement):[],popper:ei(e)};var r,c,u=function(t){var e=gi(t);return pe.reduce(function(t,i){return t.concat(e.filter(function(t){return t.phase===i}))},[])}((r=[].concat(n,a.options.modifiers),c=r.reduce(function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t},{}),Object.keys(c).map(function(t){return c[t]})));return a.orderedModifiers=u.filter(function(t){return t.enabled}),a.orderedModifiers.forEach(function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,s=t.effect;if("function"==typeof s){var o=s({state:a,name:e,instance:h,options:n});l.push(o||function(){})}}),h.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,i=t.popper;if(_i(e,i)){a.rects={reference:pi(e,Me(i),"fixed"===a.options.strategy),popper:xe(i)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(t){return a.modifiersData[t.name]=Object.assign({},t.data)});for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var s=a.orderedModifiers[n],o=s.fn,r=s.options,l=void 0===r?{}:r,d=s.name;"function"==typeof o&&(a=o({state:a,options:l,name:d,instance:h})||a)}else a.reset=!1,n=-1}}},update:(s=function(){return new Promise(function(t){h.forceUpdate(),t(a)})},function(){return r||(r=new Promise(function(t){Promise.resolve().then(function(){r=void 0,t(s())})})),r}),destroy:function(){d(),c=!0}};if(!_i(t,e))return h;function d(){l.forEach(function(t){return t()}),l=[]}return h.setOptions(i).then(function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)}),h}}var vi=bi(),yi=bi({defaultModifiers:[Ue,ui,Re,ye]}),wi=bi({defaultModifiers:[Ue,ui,Re,ye,di,ai,fi,Be,hi]});const Ai=Object.freeze(Object.defineProperty({__proto__:null,afterMain:he,afterRead:ae,afterWrite:fe,applyStyles:ye,arrow:Be,auto:Yt,basePlacements:Xt,beforeMain:le,beforeRead:oe,beforeWrite:de,bottom:Ut,clippingParents:Zt,computeStyles:Re,createPopper:wi,createPopperBase:vi,createPopperLite:yi,detectOverflow:oi,end:Jt,eventListeners:Ue,flip:ai,hide:hi,left:Qt,main:ce,modifierPhases:pe,offset:di,placements:se,popper:ee,popperGenerator:bi,popperOffsets:ui,preventOverflow:fi,read:re,reference:ie,right:Kt,start:Gt,top:Vt,variationPlacements:ne,viewport:te,write:ue},Symbol.toStringTag,{value:"Module"})),Ei="dropdown",Ci=".coreui.dropdown",Ti=".data-api",Oi="ArrowUp",ki="ArrowDown",xi=`hide${Ci}`,Li=`hidden${Ci}`,Si=`show${Ci}`,Di=`shown${Ci}`,$i=`click${Ci}${Ti}`,Ni=`keydown${Ci}${Ti}`,Ii=`keyup${Ci}${Ti}`,Mi="show",Pi='[data-coreui-toggle="dropdown"]:not(.disabled):not(:disabled)',ji=`${Pi}.${Mi}`,Fi=".dropdown-menu",Hi=g()?"top-end":"top-start",Bi=g()?"top-start":"top-end",Wi=g()?"bottom-end":"bottom-start",zi=g()?"bottom-start":"bottom-end",qi=g()?"left-start":"right-start",Ri=g()?"right-start":"left-start",Vi={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Ui={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Ki extends W{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=q.next(this._element,Fi)[0]||q.prev(this._element,Fi)[0]||q.findOne(Fi,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Vi}static get DefaultType(){return Ui}static get NAME(){return Ei}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,Si,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(Mi),this._element.classList.add(Mi),M.trigger(this._element,Di,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,xi,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(Mi),this._element.classList.remove(Mi),this._element.setAttribute("aria-expanded","false"),H.removeDataAttribute(this._menu,"popper"),M.trigger(this._element,Li,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!r(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Ei.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===Ai)throw new TypeError("CoreUI's dropdowns require Popper (https://popper.js.org/docs/v2/)");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=wi(t,this._menu,e)}_isShown(){return this._menu.classList.contains(Mi)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return qi;if(t.classList.contains("dropstart"))return Ri;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?Bi:Hi:e?zi:Wi}_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)&&(H.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..._(this._config.popperConfig,[void 0,t])}}_selectMenuItem({key:t,target:e}){const i=q.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(t=>l(t));i.length&&v(i,e,t===ki,!i.includes(e)).focus()}static jQueryInterface(t){return this.each(function(){const e=Ki.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=q.find(ji);for(const i of e){const e=Ki.getInstance(i);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),s=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!s||"outside"===e._config.autoClose&&s)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,n=[Oi,ki].includes(t.key);if(!n&&!i)return;if(e&&!i)return;t.preventDefault();const s=this.matches(Pi)?this:q.prev(this,Pi)[0]||q.next(this,Pi)[0]||q.findOne(Pi,t.delegateTarget.parentNode),o=Ki.getOrCreateInstance(s);if(n)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),s.focus())}}M.on(document,Ni,Pi,Ki.dataApiKeydownHandler),M.on(document,Ni,Fi,Ki.dataApiKeydownHandler),M.on(document,$i,Ki.clearMenus),M.on(document,Ii,Ki.clearMenus),M.on(document,$i,Pi,function(t){t.preventDefault(),Ki.getOrCreateInstance(this).toggle()}),m(Ki);const Qi="backdrop",Yi="show",Xi=`mousedown.coreui.${Qi}`,Gi={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Ji={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Zi extends B{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Gi}static get DefaultType(){return Ji}static get NAME(){return Qi}show(t){if(!this._config.isVisible)return void _(t);this._append();const e=this._getElement();this._config.isAnimated&&u(e),e.classList.add(Yi),this._emulateAnimation(()=>{_(t)})}hide(t){this._config.isVisible?(this._getElement().classList.remove(Yi),this._emulateAnimation(()=>{this.dispose(),_(t)})):_(t)}dispose(){this._isAppended&&(M.off(this._element,Xi),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,Xi,()=>{_(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(t){b(t,this._getElement(),this._config.isAnimated)}}const tn=".coreui.focustrap",en=`focusin${tn}`,nn=`keydown.tab${tn}`,sn="backward",on={autofocus:!0,trapElement:null},rn={autofocus:"boolean",trapElement:"element"};class an extends B{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return on}static get DefaultType(){return rn}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),M.off(document,tn),M.on(document,en,t=>this._handleFocusin(t)),M.on(document,nn,t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,M.off(document,tn))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=q.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===sn?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?sn:"forward")}}const ln=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",cn=".sticky-top",hn="padding-right",dn="margin-right";class un{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,hn,e=>e+t),this._setElementAttributes(ln,hn,e=>e+t),this._setElementAttributes(cn,dn,e=>e-t)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,hn),this._resetElementAttributes(ln,hn),this._resetElementAttributes(cn,dn)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth();this._applyManipulationCallback(t,t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(s))}px`)})}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&H.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,t=>{const i=H.getDataAttribute(t,e);null!==i?(H.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 q.find(t,this._element))e(i)}}const fn=".coreui.modal",pn=`hide${fn}`,gn=`hidePrevented${fn}`,mn=`hidden${fn}`,_n=`show${fn}`,bn=`shown${fn}`,vn=`resize${fn}`,yn=`click.dismiss${fn}`,wn=`mousedown.dismiss${fn}`,An=`keydown.dismiss${fn}`,En=`click${fn}.data-api`,Cn="modal-open",Tn="show",On="modal-static",kn={backdrop:!0,focus:!0,keyboard:!0},xn={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Ln extends W{constructor(t,e){super(t,e),this._dialog=q.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new un,this._addEventListeners()}static get Default(){return kn}static get DefaultType(){return xn}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,_n,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Cn),this._adjustDialog(),this._backdrop.show(()=>this._showElement(t)))}hide(){this._isShown&&!this._isTransitioning&&(M.trigger(this._element,pn).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Tn),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){M.off(window,fn),M.off(this._dialog,fn),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Zi({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new an({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=q.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),u(this._element),this._element.classList.add(Tn),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,M.trigger(this._element,bn,{relatedTarget:t})},this._dialog,this._isAnimated())}_addEventListeners(){M.on(this._element,An,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),M.on(window,vn,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),M.on(this._element,wn,t=>{M.one(this._element,yn,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(Cn),this._resetAdjustments(),this._scrollBar.reset(),M.trigger(this._element,mn)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(M.trigger(this._element,gn).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(On)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(On),this._queueCallback(()=>{this._element.classList.remove(On),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=g()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=g()?"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=Ln.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,En,'[data-coreui-toggle="modal"]',function(t){const e=q.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),M.one(e,_n,t=>{t.defaultPrevented||M.one(e,mn,()=>{l(this)&&this.focus()})});const i=q.findOne(".modal.show");i&&Ln.getInstance(i).hide(),Ln.getOrCreateInstance(e).toggle(this)}),R(Ln),m(Ln);const Sn="coreui.navigation",Dn=`.${Sn}`,$n=".data-api",Nn={activeLinksExact:!0,groupsAutoCollapse:!0},In={activeLinksExact:"boolean",groupsAutoCollapse:"(string|boolean)"},Mn="active",Pn="show",jn="nav-group-toggle",Fn=`click${Dn}${$n}`,Hn=`load${Dn}${$n}`,Bn=".nav-group",Wn=".nav-group-items",zn=".nav-group-toggle";class qn extends W{constructor(t,i){super(t),this._config=this._getConfig(i),this._setActiveLink(),this._addEventListeners(),e.set(t,Sn,this)}static get Default(){return Nn}static get DATA_KEY(){return Sn}static get DefaultType(){return In}static get NAME(){return"navigation"}_setActiveLink(){for(const t of Array.from(this._element.querySelectorAll(".nav-link"))){if(t.classList.contains(jn))continue;let e=String(window.location);const i=/\?./,n=/#./;(/\?.*=/.test(e)||i.test(e))&&(e=e.split("?")[0]),n.test(e)&&(e=e.split("#")[0]),this._config.activeLinksExact&&t.href===e&&(t.classList.add(Mn),Array.from(this._getParents(t,Bn)).forEach(t=>{t.classList.add(Pn),t.setAttribute("aria-expanded",!0)})),!this._config.activeLinksExact&&e.startsWith(t.href)&&(t.classList.add(Mn),Array.from(this._getParents(t,Bn)).forEach(t=>{t.classList.add(Pn),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(jn)||(e=e.closest(zn));const i=t=>Boolean(t.classList.contains("nav-group")&&t.classList.contains(Pn));if(!0===this._config.groupsAutoCollapse)for(const t of this._getSiblings(e.parentNode,i))this._slideUp(q.findOne(Wn,t),()=>{t.classList.remove(Pn),t.setAttribute("aria-expanded",!1)});e.parentNode.classList.contains(Pn)?this._slideUp(q.findOne(Wn,e.parentNode),()=>{e.parentNode.classList.remove(Pn),e.parentNode.setAttribute("aria-expanded",!1)}):(e.parentNode.classList.add(Pn),e.parentNode.setAttribute("aria-expanded",!0),this._slideDown(q.findOne(Wn,e.parentNode)))}_addEventListeners(){M.on(this._element,Fn,zn,t=>{t.preventDefault(),this._toggleGroupItems(t,this)})}static navigationInterface(t,e){const i=qn.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(){qn.navigationInterface(this,t)})}}M.on(window,Hn,()=>{for(const t of Array.from(document.querySelectorAll('[data-coreui="navigation"]')))qn.navigationInterface(t)}),m(qn);const Rn=".coreui.offcanvas",Vn=".data-api",Un=`load${Rn}${Vn}`,Kn="show",Qn="showing",Yn="hiding",Xn=".offcanvas.show",Gn=`show${Rn}`,Jn=`shown${Rn}`,Zn=`hide${Rn}`,ts=`hidePrevented${Rn}`,es=`hidden${Rn}`,is=`resize${Rn}`,ns=`click${Rn}${Vn}`,ss=`keydown.dismiss${Rn}`,os={backdrop:!0,keyboard:!0,scroll:!1},rs={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class as 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 os}static get DefaultType(){return rs}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||M.trigger(this._element,Gn,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new un).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Qn),this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(Kn),this._element.classList.remove(Qn),M.trigger(this._element,Jn,{relatedTarget:t})},this._element,!0))}hide(){this._isShown&&(M.trigger(this._element,Zn).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Yn),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove(Kn,Yn),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new un).reset(),M.trigger(this._element,es)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new Zi({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():M.trigger(this._element,ts)}:null})}_initializeFocusTrap(){return new an({trapElement:this._element})}_addEventListeners(){M.on(this._element,ss,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():M.trigger(this._element,ts))})}static jQueryInterface(t){return this.each(function(){const e=as.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,ns,'[data-coreui-toggle="offcanvas"]',function(t){const e=q.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),c(this))return;M.one(e,es,()=>{l(this)&&this.focus()});const i=q.findOne(Xn);i&&i!==e&&as.getInstance(i).hide(),as.getOrCreateInstance(e).toggle(this)}),M.on(window,Un,()=>{for(const t of q.find(Xn))as.getOrCreateInstance(t).show()}),M.on(window,is,()=>{for(const t of q.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&as.getOrCreateInstance(t).hide()}),R(as),m(as);const ls={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],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:[]},cs=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),hs=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,ds=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!cs.has(i)||Boolean(hs.test(t.nodeValue)):e.filter(t=>t instanceof RegExp).some(t=>t.test(i))},us={allowList:ls,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},fs={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ps={entry:"(string|element|function|null)",selector:"(string|element)"};class gs extends B{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return us}static get DefaultType(){return fs}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},ps)}_setContent(t,e,i){const n=q.findOne(i,t);n&&((e=this._resolvePossibleFunction(e))?r(e)?this._putElementInTemplate(a(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.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 n=(new window.DOMParser).parseFromString(t,"text/html"),s=[].concat(...n.body.querySelectorAll("*"));for(const t of s){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const n=[].concat(...t.attributes),s=[].concat(e["*"]||[],e[i]||[]);for(const e of n)ds(e,s)||t.removeAttribute(e.nodeName)}return n.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return _(t,[void 0,this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const ms=new Set(["sanitize","allowList","sanitizeFn"]),_s="fade",bs="show",vs=".tooltip-inner",ys=".modal",ws="hide.coreui.modal",As="hover",Es="focus",Cs="click",Ts={AUTO:"auto",TOP:"top",RIGHT:g()?"left":"right",BOTTOM:"bottom",LEFT:g()?"right":"left"},Os={allowList:ls,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],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"},ks={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 xs extends W{constructor(t,e){if(void 0===Ai)throw new TypeError("CoreUI's dropdowns require Popper (https://popper.js.org/docs/v2/)");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 Os}static get DefaultType(){return ks}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),M.off(this._element.closest(ys),ws,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:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(i),M.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(bs),"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(bs),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))M.off(t,"mouseover",d);this._activeTrigger[Cs]=!1,this._activeTrigger[Es]=!1,this._activeTrigger[As]=!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(_s,bs),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(_s),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new gs({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[vs]: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(_s)}_isShown(){return this.tip&&this.tip.classList.contains(bs)}_createPopper(t){const e=_(this._config.placement,[this,t,this._element]),i=Ts[e.toUpperCase()];return wi(this._element,t,this._getPopperConfig(i))}_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 _(t,[this._element,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,..._(this._config.popperConfig,[void 0,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=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger[Cs]=!(e._isShown()&&e._activeTrigger[Cs]),e.toggle()});else if("manual"!==e){const t=e===As?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===As?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?Es:As]=!0,e._enter()}),M.on(this._element,i,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?Es:As]=e._element.contains(t.relatedTarget),e._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},M.on(this._element.closest(ys),ws,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=H.getDataAttributes(this._element);for(const t of Object.keys(e))ms.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=xs.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}m(xs);const Ls=".popover-header",Ss=".popover-body",Ds={...xs.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"},$s={...xs.DefaultType,content:"(null|string|element|function)"};class Ns extends xs{static get Default(){return Ds}static get DefaultType(){return $s}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[Ls]:this._getTitle(),[Ss]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each(function(){const e=Ns.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}m(Ns);const Is=".coreui.scrollspy",Ms=`activate${Is}`,Ps=`click${Is}`,js=`load${Is}.data-api`,Fs="active",Hs="[href]",Bs=".nav-link",Ws=`${Bs}, .nav-item > ${Bs}, .list-group-item`,zs={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},qs={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Rs 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 zs}static get DefaultType(){return qs}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,Ps),M.on(this._config.target,Ps,Hs,t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,n=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:n,behavior:"smooth"});i.scrollTop=n}}))}_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))},n=(this._rootElement||document.documentElement).scrollTop,s=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;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(s&&t){if(i(o),!n)return}else s||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=q.find(Hs,this._config.target);for(const e of t){if(!e.hash||c(e))continue;const t=q.findOne(decodeURI(e.hash),this._element);l(t)&&(this._targetLinks.set(decodeURI(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(Fs),this._activateParents(t),M.trigger(this._element,Ms,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))q.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Fs);else for(const e of q.parents(t,".nav, .list-group"))for(const t of q.prev(e,Ws))t.classList.add(Fs)}_clearActiveClass(t){t.classList.remove(Fs);const e=q.find(`${Hs}.${Fs}`,t);for(const t of e)t.classList.remove(Fs)}static jQueryInterface(t){return this.each(function(){const e=Rs.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,js,()=>{for(const t of q.find('[data-coreui-spy="scroll"]'))Rs.getOrCreateInstance(t)}),m(Rs);const Vs=".coreui.sidebar",Us=".data-api",Ks={},Qs={},Ys="hide",Xs="show",Gs="sidebar-narrow",Js="sidebar-narrow-unfoldable",Zs=`hide${Vs}`,to=`hidden${Vs}`,eo=`show${Vs}`,io=`shown${Vs}`,no=`click${Vs}${Us}`,so=`load${Vs}${Us}`,oo=".sidebar";class ro 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 Ks}static get DefaultType(){return Qs}static get NAME(){return"sidebar"}show(){M.trigger(this._element,eo),this._element.classList.contains(Ys)&&this._element.classList.remove(Ys),this._overlaid&&this._element.classList.add(Xs),this._isMobile()&&(this._element.classList.add(Xs),this._backdrop.show(),(new un).hide()),this._queueCallback(()=>{!0===this._isVisible()&&(this._show=!0,(this._isMobile()||this._isOverlaid())&&this._addClickOutListener(),M.trigger(this._element,io))},this._element,!0)}hide(){M.trigger(this._element,Zs),this._element.classList.contains(Xs)&&this._element.classList.remove(Xs),this._isMobile()&&(this._backdrop.hide(),(new un).reset()),this._isMobile()||this._overlaid||this._element.classList.add(Ys),this._queueCallback(()=>{!1===this._isVisible()&&(this._show=!1,(this._isMobile()||this._isOverlaid())&&this._removeClickOutListener(),M.trigger(this._element,to))},this._element,!0)}toggle(){this._isVisible()?this.hide():this.show()}narrow(){this._isMobile()||(this._addClassName(Gs),this._narrow=!0)}unfoldable(){this._isMobile()||(this._addClassName(Js),this._unfoldable=!0)}reset(){this._isMobile()||(this._narrow&&(this._element.classList.remove(Gs),this._narrow=!1),this._unfoldable&&(this._element.classList.remove(Js),this._unfoldable=!1))}toggleNarrow(){this._narrow?this.reset():this.narrow()}toggleUnfoldable(){this._unfoldable?this.reset():this.unfoldable()}_initializeBackDrop(){return new Zi({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(Gs)}_isOverlaid(){return this._element.classList.contains("sidebar-overlaid")}_isUnfoldable(){return this._element.classList.contains(Js)}_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(oo)&&(t.preventDefault(),t.stopPropagation(),e.hide())}_addClickOutListener(){M.on(document,no,t=>{this._clickOutListener(t,this)})}_removeClickOutListener(){M.off(document,no)}_addEventListeners(){this._mobile&&this._show&&this._addClickOutListener(),this._overlaid&&this._show&&this._addClickOutListener(),M.on(this._element,no,"[data-coreui-toggle]",t=>{t.preventDefault();const e=H.getDataAttribute(t.target,"toggle");"narrow"===e&&this.toggleNarrow(),"unfoldable"===e&&this.toggleUnfoldable()}),M.on(this._element,no,'[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=ro.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(){ro.sidebarInterface(this,t)})}}M.on(window,so,()=>{for(const t of Array.from(document.querySelectorAll(oo)))ro.sidebarInterface(t)}),m(ro);const ao=".coreui.tab",lo=`hide${ao}`,co=`hidden${ao}`,ho=`show${ao}`,uo=`shown${ao}`,fo=`click${ao}`,po=`keydown${ao}`,go=`load${ao}`,mo="ArrowLeft",_o="ArrowRight",bo="ArrowUp",vo="ArrowDown",yo="Home",wo="End",Ao="active",Eo="fade",Co="show",To=".dropdown-toggle",Oo=`:not(${To})`,ko='[data-coreui-toggle="tab"], [data-coreui-toggle="pill"], [data-coreui-toggle="list"]',xo=`.nav-link${Oo}, .list-group-item${Oo}, [role="tab"]${Oo}, ${ko}`,Lo=`.${Ao}[data-coreui-toggle="tab"], .${Ao}[data-coreui-toggle="pill"], .${Ao}[data-coreui-toggle="list"]`;class So 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,po,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,lo,{relatedTarget:t}):null;M.trigger(t,ho,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(Ao),this._activate(q.getElementFromSelector(t)),this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),M.trigger(t,uo,{relatedTarget:e})):t.classList.add(Co)},t,t.classList.contains(Eo)))}_deactivate(t,e){t&&(t.classList.remove(Ao),t.blur(),this._deactivate(q.getElementFromSelector(t)),this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),M.trigger(t,co,{relatedTarget:e})):t.classList.remove(Co)},t,t.classList.contains(Eo)))}_keydown(t){if(![mo,_o,bo,vo,yo,wo].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter(t=>!c(t));let i;if([yo,wo].includes(t.key))i=e[t.key===yo?0:e.length-1];else{const n=[_o,vo].includes(t.key);i=v(e,t.target,n,!0)}i&&(i.focus({preventScroll:!0}),So.getOrCreateInstance(i).show())}_getChildren(){return q.find(xo,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=q.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 n=(t,n)=>{const s=q.findOne(t,i);s&&s.classList.toggle(n,e)};n(To,Ao),n(".dropdown-menu",Co),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(Ao)}_getInnerElement(t){return t.matches(xo)?t:q.findOne(xo,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each(function(){const e=So.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,fo,ko,function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),c(this)||So.getOrCreateInstance(this).show()}),M.on(window,go,()=>{for(const t of q.find(Lo))So.getOrCreateInstance(t)}),m(So);const Do=".coreui.toast",$o=`mouseover${Do}`,No=`mouseout${Do}`,Io=`focusin${Do}`,Mo=`focusout${Do}`,Po=`hide${Do}`,jo=`hidden${Do}`,Fo=`show${Do}`,Ho=`shown${Do}`,Bo="hide",Wo="show",zo="showing",qo={animation:"boolean",autohide:"boolean",delay:"number"},Ro={animation:!0,autohide:!0,delay:5e3};class Vo extends W{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Ro}static get DefaultType(){return qo}static get NAME(){return"toast"}show(){M.trigger(this._element,Fo).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(Bo),u(this._element),this._element.classList.add(Wo,zo),this._queueCallback(()=>{this._element.classList.remove(zo),M.trigger(this._element,Ho),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&(M.trigger(this._element,Po).defaultPrevented||(this._element.classList.add(zo),this._queueCallback(()=>{this._element.classList.add(Bo),this._element.classList.remove(zo,Wo),M.trigger(this._element,jo)},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Wo),super.dispose()}isShown(){return this._element.classList.contains(Wo)}_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,$o,t=>this._onInteraction(t,!0)),M.on(this._element,No,t=>this._onInteraction(t,!1)),M.on(this._element,Io,t=>this._onInteraction(t,!0)),M.on(this._element,Mo,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){const e=Vo.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}})}}return R(Vo),m(Vo),{Alert:Q,Button:X,Carousel:St,Collapse:Rt,Dropdown:Ki,Modal:Ln,Navigation:qn,OffCanvas:as,Popover:Ns,ScrollSpy:Rs,Sidebar:ro,Tab:So,Toast:Vo,Tooltip:xs}});
|
|
6
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).coreui=t()}(this,function(){"use strict";const e=new Map,t={set(t,i,n){e.has(t)||e.set(t,new Map);const s=e.get(t);s.has(i)||0===s.size?s.set(i,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(t,i)=>e.has(t)&&e.get(t).get(i)||null,remove(t,i){if(!e.has(t))return;const n=e.get(t);n.delete(i),0===n.size&&e.delete(t)}},i="transitionend",n=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),e),s=e=>null==e?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),o=e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e},r=e=>{e.dispatchEvent(new Event(i))},a=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),l=e=>a(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(n(e)):null,c=e=>{if(!a(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),i=e.closest("details:not([open])");if(!i)return t;if(i!==e){const t=e.closest("summary");if(t&&t.parentNode!==i)return!1;if(null===t)return!1}return t},h=e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")),d=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?d(e.parentNode):null},u=()=>{},f=e=>{e.offsetHeight},p=()=>window.jQuery&&!document.body.hasAttribute("data-coreui-no-jquery")?window.jQuery:null,_=[],g=()=>"rtl"===document.documentElement.dir,m=e=>{var t;t=()=>{const t=p();if(t){const i=e.NAME,n=t.fn[i];t.fn[i]=e.jQueryInterface,t.fn[i].Constructor=e,t.fn[i].noConflict=()=>(t.fn[i]=n,e.jQueryInterface)}},"loading"===document.readyState?(_.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of _)e()}),_.push(t)):t()},b=(e,t=[],i=e)=>"function"==typeof e?e.call(...t):i,v=(e,t,n=!0)=>{if(!n)return void b(e);const s=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:i}=window.getComputedStyle(e);const n=Number.parseFloat(t),s=Number.parseFloat(i);return n||s?(t=t.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(i))):0})(t)+5;let o=!1;const a=({target:n})=>{n===t&&(o=!0,t.removeEventListener(i,a),b(e))};t.addEventListener(i,a),setTimeout(()=>{o||r(t)},s)},y=(e,t,i,n)=>{const s=e.length;let o=e.indexOf(t);return-1===o?!i&&n?e[s-1]:e[0]:(o+=i?1:-1,n&&(o=(o+s)%s),e[Math.max(0,Math.min(o,s-1))])},w=/[^.]*(?=\..*)\.|.*/,C=/\..*/,E=/::\d+$/,A={};let T=1;const k={mouseenter:"mouseover",mouseleave:"mouseout"},x=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 O(e,t){return t&&`${t}::${T++}`||e.uidEvent||T++}function L(e){const t=O(e);return e.uidEvent=t,A[t]=A[t]||{},A[t]}function S(e,t,i=null){return Object.values(e).find(e=>e.callable===t&&e.delegationSelector===i)}function I(e,t,i){const n="string"==typeof t,s=n?i:t||i;let o=M(e);return x.has(o)||(o=e),[n,s,o]}function D(e,t,i,n,s){if("string"!=typeof t||!e)return;let[o,r,a]=I(t,i,n);if(t in k){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};r=e(r)}const l=L(e),c=l[a]||(l[a]={}),h=S(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=O(r,t.replace(w,"")),u=o?function(e,t,i){return function n(s){const o=e.querySelectorAll(t);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return j(s,{delegateTarget:r}),n.oneOff&&P.off(e,s.type,t,i),i.apply(r,[s])}}(e,i,r):function(e,t){return function i(n){return j(n,{delegateTarget:e}),i.oneOff&&P.off(e,n.type,t),t.apply(e,[n])}}(e,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=s,u.uidEvent=d,c[d]=u,e.addEventListener(a,u,o)}function $(e,t,i,n,s){const o=S(t[i],n,s);o&&(e.removeEventListener(i,o,Boolean(s)),delete t[i][o.uidEvent])}function N(e,t,i,n){const s=t[i]||{};for(const[o,r]of Object.entries(s))o.includes(n)&&$(e,t,i,r.callable,r.delegationSelector)}function M(e){return e=e.replace(C,""),k[e]||e}const P={on(e,t,i,n){D(e,t,i,n,!1)},one(e,t,i,n){D(e,t,i,n,!0)},off(e,t,i,n){if("string"!=typeof t||!e)return;const[s,o,r]=I(t,i,n),a=r!==t,l=L(e),c=l[r]||{},h=t.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))N(e,l,i,t.slice(1));for(const[i,n]of Object.entries(c)){const s=i.replace(E,"");a&&!t.includes(s)||$(e,l,r,n.callable,n.delegationSelector)}}else{if(!Object.keys(c).length)return;$(e,l,r,o,s?i:null)}},trigger(e,t,i){if("string"!=typeof t||!e)return null;const n=p();let s=null,o=!0,r=!0,a=!1;t!==M(t)&&n&&(s=n.Event(t,i),n(e).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());const l=j(new Event(t,{bubbles:o,cancelable:!0}),i);return a&&l.preventDefault(),r&&e.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function j(e,t={}){for(const[i,n]of Object.entries(t))try{e[i]=n}catch(t){Object.defineProperty(e,i,{configurable:!0,get:()=>n})}return e}function F(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function B(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const H={setDataAttribute(e,t,i){e.setAttribute(`data-coreui-${B(t)}`,i)},removeDataAttribute(e,t){e.removeAttribute(`data-coreui-${B(t)}`)},getDataAttributes(e){if(!e)return{};const t={},i=Object.keys(e.dataset).filter(e=>e.startsWith("coreui")&&!e.startsWith("coreuiConfig"));for(const n of i){let i=n.replace(/^coreui/,"");i=i.charAt(0).toLowerCase()+i.slice(1),t[i]=F(e.dataset[n])}return t},getDataAttribute:(e,t)=>F(e.getAttribute(`data-coreui-${B(t)}`))};class R{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(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const i=a(t)?H.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...a(t)?H.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[i,n]of Object.entries(t)){const t=e[i],o=a(t)?"element":s(t);if(!new RegExp(n).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${o}" but expected type "${n}".`)}}}class z extends R{constructor(e,i){super(),(e=l(e))&&(this._element=e,this._config=this._getConfig(i),t.set(this._element,this.constructor.DATA_KEY,this))}dispose(){t.remove(this._element,this.constructor.DATA_KEY),P.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,i=!0){v(e,t,i)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return t.get(l(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.6.0"}static get DATA_KEY(){return`coreui.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const V=e=>{let t=e.getAttribute("data-coreui-target");if(!t||"#"===t){let i=e.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),t=i&&"#"!==i?i.trim():null}return t?t.split(",").map(e=>n(e)).join(","):null},W={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter(e=>e.matches(t)),parents(e,t){const i=[];let n=e.parentNode.closest(t);for(;n;)i.push(n),n=n.parentNode.closest(t);return i},prev(e,t){let i=e.previousElementSibling;for(;i;){if(i.matches(t))return[i];i=i.previousElementSibling}return[]},next(e,t){let i=e.nextElementSibling;for(;i;){if(i.matches(t))return[i];i=i.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(e=>`${e}:not([tabindex^="-"])`).join(",");return this.find(t,e).filter(e=>!h(e)&&c(e))},getSelectorFromElement(e){const t=V(e);return t&&W.findOne(t)?t:null},getElementFromSelector(e){const t=V(e);return t?W.findOne(t):null},getMultipleElementsFromSelector(e){const t=V(e);return t?W.find(t):[]}},q=(e,t="hide")=>{const i=`click.dismiss${e.EVENT_KEY}`,n=e.NAME;P.on(document,i,`[data-coreui-dismiss="${n}"]`,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),h(this))return;const s=W.getElementFromSelector(this)||this.closest(`.${n}`);e.getOrCreateInstance(s)[t]()})},U=".coreui.alert",K=`close${U}`,Q=`closed${U}`;class Y extends z{static get NAME(){return"alert"}close(){if(P.trigger(this._element,K).defaultPrevented)return;this._element.classList.remove("show");const e=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,e)}_destroyElement(){this._element.remove(),P.trigger(this._element,Q),this.dispose()}static jQueryInterface(e){return this.each(function(){const t=Y.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}})}}q(Y,"close"),m(Y);const X='[data-coreui-toggle="button"]';class G extends z{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each(function(){const t=G.getOrCreateInstance(this);"toggle"===e&&t[e]()})}}P.on(document,"click.coreui.button.data-api",X,e=>{e.preventDefault();const t=e.target.closest(X);G.getOrCreateInstance(t).toggle()}),m(G);const J=".coreui.swipe",Z=`touchstart${J}`,ee=`touchmove${J}`,te=`touchend${J}`,ie=`pointerdown${J}`,ne=`pointerup${J}`,se={endCallback:null,leftCallback:null,rightCallback:null},oe={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class re extends R{constructor(e,t){super(),this._element=e,e&&re.isSupported()&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return se}static get DefaultType(){return oe}static get NAME(){return"swipe"}dispose(){P.off(this._element,J)}_start(e){this._supportPointerEvents?this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX):this._deltaX=e.touches[0].clientX}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),b(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=40)return;const t=e/this._deltaX;this._deltaX=0,t&&b(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(P.on(this._element,ie,e=>this._start(e)),P.on(this._element,ne,e=>this._end(e)),this._element.classList.add("pointer-event")):(P.on(this._element,Z,e=>this._start(e)),P.on(this._element,ee,e=>this._move(e)),P.on(this._element,te,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&("pen"===e.pointerType||"touch"===e.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const ae=".coreui.carousel",le=".data-api",ce="ArrowLeft",he="ArrowRight",de="next",ue="prev",fe="left",pe="right",_e=`slide${ae}`,ge=`slid${ae}`,me=`keydown${ae}`,be=`mouseenter${ae}`,ve=`mouseleave${ae}`,ye=`dragstart${ae}`,we=`load${ae}${le}`,Ce=`click${ae}${le}`,Ee="carousel",Ae="active",Te=".active",ke=".carousel-item",xe=Te+ke,Oe={[ce]:pe,[he]:fe},Le={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Se={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Ie extends z{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=W.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===Ee&&this.cycle()}static get Default(){return Le}static get DefaultType(){return Se}static get NAME(){return"carousel"}next(){this._slide(de)}nextWhenVisible(){!document.hidden&&c(this._element)&&this.next()}prev(){this._slide(ue)}pause(){this._isSliding&&r(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?P.one(this._element,ge,()=>this.cycle()):this.cycle())}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding)return void P.one(this._element,ge,()=>this.to(e));const i=this._getItemIndex(this._getActive());if(i===e)return;const n=e>i?de:ue;this._slide(n,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&P.on(this._element,me,e=>this._keydown(e)),"hover"===this._config.pause&&(P.on(this._element,be,()=>this.pause()),P.on(this._element,ve,()=>this._maybeEnableCycle())),this._config.touch&&re.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of W.find(".carousel-item img",this._element))P.on(e,ye,e=>e.preventDefault());const e={leftCallback:()=>this._slide(this._directionToOrder(fe)),rightCallback:()=>this._slide(this._directionToOrder(pe)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new re(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=Oe[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=W.findOne(Te,this._indicatorsElement);t.classList.remove(Ae),t.removeAttribute("aria-current");const i=W.findOne(`[data-coreui-slide-to="${e}"]`,this._indicatorsElement);i&&(i.classList.add(Ae),i.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-coreui-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const i=this._getActive(),n=e===de,s=t||y(this._getItems(),i,n,this._config.wrap);if(s===i)return;const o=this._getItemIndex(s),r=t=>P.trigger(this._element,t,{relatedTarget:s,direction:this._orderToDirection(e),from:this._getItemIndex(i),to:o});if(r(_e).defaultPrevented)return;if(!i||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=n?"carousel-item-start":"carousel-item-end",c=n?"carousel-item-next":"carousel-item-prev";s.classList.add(c),f(s),i.classList.add(l),s.classList.add(l),this._queueCallback(()=>{s.classList.remove(l,c),s.classList.add(Ae),i.classList.remove(Ae,c,l),this._isSliding=!1,r(ge)},i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return W.findOne(xe,this._element)}_getItems(){return W.find(ke,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return g()?e===fe?ue:de:e===fe?de:ue}_orderToDirection(e){return g()?e===ue?fe:pe:e===ue?pe:fe}static jQueryInterface(e){return this.each(function(){const t=Ie.getOrCreateInstance(this,e);if("number"!=typeof e){if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}else t.to(e)})}}P.on(document,Ce,"[data-coreui-slide], [data-coreui-slide-to]",function(e){const t=W.getElementFromSelector(this);if(!t||!t.classList.contains(Ee))return;e.preventDefault();const i=Ie.getOrCreateInstance(t),n=this.getAttribute("data-coreui-slide-to");return n?(i.to(n),void i._maybeEnableCycle()):"next"===H.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())}),P.on(window,we,()=>{const e=W.find('[data-coreui-ride="carousel"]');for(const t of e)Ie.getOrCreateInstance(t)}),m(Ie);const De=".coreui.chip",$e=`remove${De}`,Ne=`removed${De}`,Me=`select${De}`,Pe=`selected${De}`,je=`deselect${De}`,Fe=`deselected${De}`,Be=".chip-remove",He=".chip:not(.disabled)",Re="active",ze="disabled",Ve={ariaRemoveLabel:"Remove",disabled:!1,removable:!1,removeIcon:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="4" y1="4" x2="12" y2="12"/><line x1="12" y1="4" x2="4" y2="12"/></svg>',selectable:!1,selected:!1},We={ariaRemoveLabel:"string",disabled:"boolean",removable:"boolean",removeIcon:"string",selectable:"boolean",selected:"boolean"};class qe extends z{constructor(e,t){super(e,t),this._disabled=this._config.disabled||this._element.classList.contains(ze),this._selected=this._config.selected||this._element.classList.contains(Re),this._ensureRemoveButton(),this._applyState(),(this._config.selectable||this._config.removable)&&this._makeFocusable(),this._addEventListeners()}static get Default(){return Ve}static get DefaultType(){return We}static get NAME(){return"chip"}remove(){P.trigger(this._element,$e).defaultPrevented||this._destroyElement()}toggle(){this._config.selectable&&(this._selected?this.deselect():this.select())}select(){this._config.selectable&&(this._selected||P.trigger(this._element,Me).defaultPrevented||(this._selected=!0,this._applyState(),P.trigger(this._element,Pe)))}deselect(){this._config.selectable&&this._selected&&(P.trigger(this._element,je).defaultPrevented||(this._selected=!1,this._applyState(),P.trigger(this._element,Fe)))}_addEventListeners(){P.on(this._element,"keydown",e=>this._handleKeydown(e)),P.on(this._element,"click",e=>{this._disabled||e.target.closest(Be)||this.toggle()}),P.on(this._element,"click",Be,e=>{e.stopPropagation(),this.remove()})}_applyState(){this._disabled||!this._config.clickable&&!this._config.selectable||this._element.classList.add("chip-clickable"),this._disabled?(this._element.classList.add(ze),this._element.setAttribute("aria-disabled","true")):(this._element.classList.remove(ze),"true"===this._element.getAttribute("aria-disabled")&&this._element.setAttribute("aria-disabled","false")),this._config.selectable?(this._element.classList.toggle(Re,this._selected),this._element.setAttribute("aria-selected",this._selected?"true":"false")):(this._element.classList.remove(Re),"true"===this._element.getAttribute("aria-selected")&&this._element.setAttribute("aria-selected","false"))}_createRemoveButton(){const e=document.createElement("button");return e.type="button",e.className="chip-remove",e.setAttribute("aria-label",this._config.ariaRemoveLabel),e.setAttribute("tabindex","-1"),e.innerHTML=this._config.removeIcon,e}_ensureRemoveButton(){this._config.removable&&(W.findOne(Be,this._element)||this._element.append(this._createRemoveButton()))}_makeFocusable(){this._element.hasAttribute("tabindex")||this._disabled||this._element.setAttribute("tabindex","0")}_handleKeydown(e){const{key:t}=e;if(!this._disabled)switch(t){case"Enter":case" ":case"Spacebar":if(!this._config.selectable)return;e.preventDefault(),this.toggle();break;case"Backspace":case"Delete":if(this._config.removable){e.preventDefault();const t=this._getFocusableSibling(!1)||this._getFocusableSibling(!0);null==t||t.focus(),this.remove()}break;case"ArrowLeft":{e.preventDefault();const t=this._getFocusableSibling(!1);null==t||t.focus();break}case"ArrowRight":{e.preventDefault();const t=this._getFocusableSibling(!0);null==t||t.focus();break}case"Home":e.preventDefault(),this._navigateToEdge(0);break;case"End":e.preventDefault(),this._navigateToEdge(-1)}}_getFocusableSibling(e){const t=W.find(He,this._element.parentElement),i=y(t,this._element,e,!t.includes(this._element));return i===this._element?null:i}_navigateToEdge(e){const t=W.find(He,this._element.parentElement);if(0===t.length)return;const i=t.at(e);null==i||i.focus()}_destroyElement(){P.trigger(this._element,Ne),this._element.remove(),this.dispose()}static chipInterface(e,t){const i=qe.getOrCreateInstance(e,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}static jQueryInterface(e){return this.each(function(){const t=qe.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}})}}P.on(document,`DOMContentLoaded${De}.data-api`,()=>{for(const e of W.find("[data-coreui-chip]"))qe.chipInterface(e)}),m(qe);const Ue=".coreui.chip-input",Ke=`add${Ue}`,Qe=`remove${Ue}`,Ye=`change${Ue}`,Xe=`select${Ue}`,Ge=`input${Ue}`,Je=".chip",Ze=`${Je}.active`,et=".chip-remove",tt="disabled",it={chipClassName:null,createOnBlur:!0,disabled:!1,id:null,maxChips:null,name:null,placeholder:"",readonly:!1,removable:!0,removeIcon:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="4" y1="4" x2="12" y2="12"/><line x1="12" y1="4" x2="4" y2="12"/></svg>',selectable:!1,separator:","},nt={chipClassName:"(string|function|null)",createOnBlur:"boolean",disabled:"boolean",maxChips:"(number|null)",id:"(string|null)",name:"(string|null)",placeholder:"string",readonly:"boolean",removable:"boolean",removeIcon:"string",selectable:"boolean",separator:"(string|null)"};class st extends z{constructor(e,t){var i;super(e,t),this._uniqueId=null!=(i=this._config.id)?i:o(`${this.constructor.NAME}`),this._disabled=this._config.disabled||this._element.classList.contains(tt),this._readonly=this._config.readonly,this._chips=[],this._input=W.findOne("input",this._element),this._hiddenInput=null,this._input?this._setInputSize():this._createInput(),this._applyInteractionState(),this._initializeExistingChips(),this._createHiddenInput(),this._addEventListeners()}static get Default(){return it}static get DefaultType(){return nt}static get NAME(){return"chip-input"}add(e){if(this._disabled||this._readonly)return null;const t=String(e).trim();if(!t)return null;if(this._chips.includes(t))return null;if(null!==this._config.maxChips&&this._chips.length>=this._config.maxChips)return null;if(P.trigger(this._element,Ke,{value:t,relatedTarget:this._input}).defaultPrevented)return null;const i=this._createChip(t);this._element.insertBefore(i,this._input),this._chips.push(t);const n=this.getValues();return this._hiddenInput.value=n.join(","),P.trigger(this._element,Ye,{values:n}),i}remove(e){if(this._disabled||this._readonly)return!1;let t,i;if("string"==typeof e?(i=e,t=this._findChipByValue(i)):(t=e,i=this._getChipValue(t)),!t||!i)return!1;if(P.trigger(this._element,Qe,{value:i,chip:t,relatedTarget:this._input}).defaultPrevented)return!1;const n=qe.getInstance(t);return n?n.remove():(t.remove(),this._handleChipRemoved(t,i)),!t.isConnected}removeSelected(){var e;const t=this._getSelectedChipElements();for(const e of t)this.remove(e);null==(e=this._input)||e.focus()}getValues(){return[...this._chips]}getSelectedValues(){return this._getSelectedChipElements().map(e=>this._getChipValue(e))}clear(){const e=W.find(Je,this._element);for(const t of e)this.remove(t)}clearSelection(){for(const t of this._getSelectedChipElements()){var e;null==(e=qe.getInstance(t))||e.deselect()}P.trigger(this._element,Xe,{selected:[]})}selectChip(e){if(!this._getChipElements().includes(e))return;const t=qe.getInstance(e);t&&t.select()}focus(){var e;null==(e=this._input)||e.focus()}_emitSelectionChange(){P.trigger(this._element,Xe,{selected:this.getSelectedValues()})}_getChipElements(){return W.find(Je,this._element)}_getSelectedChipElements(){return W.find(Ze,this._element)}_createInput(){const e=document.createElement("input"),t=W.findOne(".chip-input-label",this._element),i=null==t?void 0:t.getAttribute("for"),n=i||o(`${this.constructor.NAME}-input`);e.type="text",e.className="chip-input-field",e.id=n,this._config.placeholder&&(e.placeholder=this._config.placeholder),t&&!i&&t.setAttribute("for",n),this._input=e,this._setInputSize(),this._element.append(e)}_createHiddenInput(){const e=document.createElement("input");e.type="hidden",e.id=this._uniqueId,e.name=this._config.name||this._uniqueId,this._element.append(e),this._hiddenInput=e,this._hiddenInput.value=this.getValues().join(",")}_createChip(e){const t=document.createElement("span");return t.className="chip",t.dataset.coreuiChipValue=e,t.append(document.createTextNode(e)),this._applyChipClassName(t,e),this._setupChip(t),t}_createChipFromInput(){if(this._disabled||this._readonly)return;const e=this._input.value.trim();e&&(this.add(e),this._input.value="",this._setInputSize())}_findChipByValue(e){return this._getChipElements().find(t=>this._getChipValue(t)===e)}_getChipValue(e){var t;if(e.dataset.coreuiChipValue)return e.dataset.coreuiChipValue;const i=e.cloneNode(!0),n=W.findOne(et,i);return n&&n.remove(),(null==(t=i.textContent)?void 0:t.trim())||""}_initializeExistingChips(){const e=W.find(Je,this._element);for(const t of e){const e=this._getChipValue(t);e&&(this._chips.push(e),this._applyChipClassName(t,e),this._setupChip(t))}}_applyChipClassName(e,t){const i=this._resolveChipClassName(t);i&&e.classList.add(...i.split(/\s+/).filter(Boolean))}_resolveChipClassName(e){const{chipClassName:t}=this._config;if(!t)return"";if("function"==typeof t){const i=t(e);return"string"==typeof i?i:""}return"string"==typeof t?t:""}_setupChip(e){qe.getOrCreateInstance(e,{ariaRemoveLabel:`Remove ${this._getChipValue(e)}`,disabled:this._disabled,removable:this._config.removable&&!this._readonly&&!this._disabled,removeIcon:this._config.removeIcon,selectable:this._config.selectable});const t=W.findOne(et,e);t&&(t.disabled=this._disabled||this._readonly)}_applyInteractionState(){this._element.classList.toggle(tt,this._disabled),this._input.disabled=this._disabled,this._input.readOnly=!this._disabled&&this._readonly,this._element.setAttribute("aria-disabled",this._disabled?"true":"false"),this._element.setAttribute("aria-readonly",this._readonly?"true":"false")}_addEventListeners(){P.on(this._element,"keydown",e=>{e.target!==this._input&&1===e.key.length&&(console.log(e.key.length),this._input.focus())}),P.on(this._input,"keydown",e=>this._handleInputKeydown(e)),P.on(this._input,"input",e=>this._handleInput(e)),P.on(this._input,"paste",e=>this._handlePaste(e)),P.on(this._input,"focus",()=>this.clearSelection()),this._config.createOnBlur&&P.on(this._input,"blur",e=>{var t;null!=(t=e.relatedTarget)&&t.closest(Je)||this._createChipFromInput()}),P.on(this._element,"selected.coreui.chip",Je,()=>{this._emitSelectionChange()}),P.on(this._element,"deselected.coreui.chip",Je,()=>{this._emitSelectionChange()}),P.on(this._element,"remove.coreui.chip",Je,e=>{(this._disabled||this._readonly)&&e.preventDefault()}),P.on(this._element,"removed.coreui.chip",Je,e=>{const t=e.target.closest(Je);var i;t&&(this._handleChipRemoved(t),W.find(".chip:not(.disabled)",this._element).length>0&&(null==(i=this._input)||i.focus()),this._emitSelectionChange())}),P.on(this._element,"click",e=>{var t;e.target===this._element&&(null==(t=this._input)||t.focus())})}_handleInputKeydown(e){const{key:t}=e;switch(t){case"Enter":e.preventDefault(),this._createChipFromInput();break;case"Backspace":case"Delete":if(""===this._input.value){e.preventDefault();const t=this._getChipElements();t.length>0&&t.at(-1).focus()}break;case"ArrowLeft":if(0===this._input.selectionStart&&0===this._input.selectionEnd){e.preventDefault();const t=this._getChipElements();t.length>0&&t.at(-1).focus()}break;case"Escape":this._input.value="",this._input.blur()}}_handleChipRemoved(e,t=null){const i=t||this._getChipValue(e),n=this._chips.indexOf(i);-1!==n&&this._chips.splice(n,1);const s=this.getValues();this._hiddenInput.value=s.join(","),P.trigger(this._element,Ye,{values:s})}_handleInput(e){if(this._disabled||this._readonly)return;const{value:t}=e.target,{separator:i}=this._config;if(i&&t.includes(i)){const e=t.split(i);for(const t of e.slice(0,-1))this.add(t.trim());this._input.value=e.at(-1)}this._setInputSize(),P.trigger(this._element,Ge,{value:this._input.value,relatedTarget:this._input})}_handlePaste(e){if(this._disabled||this._readonly)return;const{separator:t}=this._config;if(!t)return;const i=(e.clipboardData||window.clipboardData).getData("text");if(i.includes(t)){e.preventDefault();const n=i.split(t);for(const e of n)this.add(e.trim())}}_setInputSize(){this._input&&(this._input.size=Math.max(this._input.placeholder.length,this._input.value.length)||1)}}P.on(document,`DOMContentLoaded${Ue}.data-api`,()=>{for(const e of W.find("[data-coreui-chip-input]"))st.getOrCreateInstance(e)});const ot=".coreui.collapse",rt=`show${ot}`,at=`shown${ot}`,lt=`hide${ot}`,ct=`hidden${ot}`,ht=`click${ot}.data-api`,dt="show",ut="collapse",ft="collapsing",pt=`:scope .${ut} .${ut}`,_t='[data-coreui-toggle="collapse"]',gt={parent:null,toggle:!0},mt={parent:"(null|element)",toggle:"boolean"};class bt extends z{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const i=W.find(_t);for(const e of i){const t=W.getSelectorFromElement(e),i=W.find(t).filter(e=>e===this._element);null!==t&&i.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return gt}static get DefaultType(){return mt}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(e=>e!==this._element).map(e=>bt.getOrCreateInstance(e,{toggle:!1}))),e.length&&e[0]._isTransitioning)return;if(P.trigger(this._element,rt).defaultPrevented)return;for(const t of e)t.hide();const t=this._getDimension();this._element.classList.remove(ut),this._element.classList.add(ft),this._element.style[t]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${t[0].toUpperCase()+t.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(ft),this._element.classList.add(ut,dt),this._element.style[t]="",P.trigger(this._element,at)},this._element,!0),this._element.style[t]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(P.trigger(this._element,lt).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,f(this._element),this._element.classList.add(ft),this._element.classList.remove(ut,dt);for(const e of this._triggerArray){const t=W.getElementFromSelector(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0,this._element.style[e]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(ft),this._element.classList.add(ut),P.trigger(this._element,ct)},this._element,!0)}_isShown(e=this._element){return e.classList.contains(dt)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=l(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(_t);for(const t of e){const e=W.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=W.find(pt,this._config.parent);return W.find(e,this._config.parent).filter(e=>!t.includes(e))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const i of e)i.classList.toggle("collapsed",!t),i.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1),this.each(function(){const i=bt.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e]()}})}}P.on(document,ht,_t,function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const e of W.getMultipleElementsFromSelector(this))bt.getOrCreateInstance(e,{toggle:!1}).toggle()}),m(bt);var vt="top",yt="bottom",wt="right",Ct="left",Et="auto",At=[vt,yt,wt,Ct],Tt="start",kt="end",xt="clippingParents",Ot="viewport",Lt="popper",St="reference",It=At.reduce(function(e,t){return e.concat([t+"-"+Tt,t+"-"+kt])},[]),Dt=[].concat(At,[Et]).reduce(function(e,t){return e.concat([t,t+"-"+Tt,t+"-"+kt])},[]),$t="beforeRead",Nt="read",Mt="afterRead",Pt="beforeMain",jt="main",Ft="afterMain",Bt="beforeWrite",Ht="write",Rt="afterWrite",zt=[$t,Nt,Mt,Pt,jt,Ft,Bt,Ht,Rt];function Vt(e){return e?(e.nodeName||"").toLowerCase():null}function Wt(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function qt(e){return e instanceof Wt(e).Element||e instanceof Element}function Ut(e){return e instanceof Wt(e).HTMLElement||e instanceof HTMLElement}function Kt(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Wt(e).ShadowRoot||e instanceof ShadowRoot)}const Qt={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var i=t.styles[e]||{},n=t.attributes[e]||{},s=t.elements[e];Ut(s)&&Vt(s)&&(Object.assign(s.style,i),Object.keys(n).forEach(function(e){var t=n[e];!1===t?s.removeAttribute(e):s.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach(function(e){var n=t.elements[e],s=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:i[e]).reduce(function(e,t){return e[t]="",e},{});Ut(n)&&Vt(n)&&(Object.assign(n.style,o),Object.keys(s).forEach(function(e){n.removeAttribute(e)}))})}},requires:["computeStyles"]};function Yt(e){return e.split("-")[0]}var Xt=Math.max,Gt=Math.min,Jt=Math.round;function Zt(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function ei(){return!/^((?!chrome|android).)*safari/i.test(Zt())}function ti(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1);var n=e.getBoundingClientRect(),s=1,o=1;t&&Ut(e)&&(s=e.offsetWidth>0&&Jt(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Jt(n.height)/e.offsetHeight||1);var r=(qt(e)?Wt(e):window).visualViewport,a=!ei()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/s,c=(n.top+(a&&r?r.offsetTop:0))/o,h=n.width/s,d=n.height/o;return{width:h,height:d,top:c,right:l+h,bottom:c+d,left:l,x:l,y:c}}function ii(e){var t=ti(e),i=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:n}}function ni(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&Kt(i)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function si(e){return Wt(e).getComputedStyle(e)}function oi(e){return["table","td","th"].indexOf(Vt(e))>=0}function ri(e){return((qt(e)?e.ownerDocument:e.document)||window.document).documentElement}function ai(e){return"html"===Vt(e)?e:e.assignedSlot||e.parentNode||(Kt(e)?e.host:null)||ri(e)}function li(e){return Ut(e)&&"fixed"!==si(e).position?e.offsetParent:null}function ci(e){for(var t=Wt(e),i=li(e);i&&oi(i)&&"static"===si(i).position;)i=li(i);return i&&("html"===Vt(i)||"body"===Vt(i)&&"static"===si(i).position)?t:i||function(e){var t=/firefox/i.test(Zt());if(/Trident/i.test(Zt())&&Ut(e)&&"fixed"===si(e).position)return null;var i=ai(e);for(Kt(i)&&(i=i.host);Ut(i)&&["html","body"].indexOf(Vt(i))<0;){var n=si(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(e)||t}function hi(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function di(e,t,i){return Xt(e,Gt(t,i))}function ui(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function fi(e,t){return t.reduce(function(t,i){return t[i]=e,t},{})}const pi={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,i=e.state,n=e.name,s=e.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=Yt(i.placement),l=hi(a),c=[Ct,wt].indexOf(a)>=0?"height":"width";if(o&&r){var h=function(e,t){return ui("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:fi(e,At))}(s.padding,i),d=ii(o),u="y"===l?vt:Ct,f="y"===l?yt:wt,p=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],_=r[l]-i.rects.reference[l],g=ci(o),m=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=p/2-_/2,v=h[u],y=m-d[c]-h[f],w=m/2-d[c]/2+b,C=di(v,w,y),E=l;i.modifiersData[n]=((t={})[E]=C,t.centerOffset=C-w,t)}},effect:function(e){var t=e.state,i=e.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&ni(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function _i(e){return e.split("-")[1]}var gi={top:"auto",right:"auto",bottom:"auto",left:"auto"};function mi(e){var t,i=e.popper,n=e.popperRect,s=e.placement,o=e.variation,r=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,h=e.roundOffsets,d=e.isFixed,u=r.x,f=void 0===u?0:u,p=r.y,_=void 0===p?0:p,g="function"==typeof h?h({x:f,y:_}):{x:f,y:_};f=g.x,_=g.y;var m=r.hasOwnProperty("x"),b=r.hasOwnProperty("y"),v=Ct,y=vt,w=window;if(c){var C=ci(i),E="clientHeight",A="clientWidth";C===Wt(i)&&"static"!==si(C=ri(i)).position&&"absolute"===a&&(E="scrollHeight",A="scrollWidth"),(s===vt||(s===Ct||s===wt)&&o===kt)&&(y=yt,_-=(d&&C===w&&w.visualViewport?w.visualViewport.height:C[E])-n.height,_*=l?1:-1),s!==Ct&&(s!==vt&&s!==yt||o!==kt)||(v=wt,f-=(d&&C===w&&w.visualViewport?w.visualViewport.width:C[A])-n.width,f*=l?1:-1)}var T,k=Object.assign({position:a},c&&gi),x=!0===h?function(e,t){var i=e.x,n=e.y,s=t.devicePixelRatio||1;return{x:Jt(i*s)/s||0,y:Jt(n*s)/s||0}}({x:f,y:_},Wt(i)):{x:f,y:_};return f=x.x,_=x.y,l?Object.assign({},k,((T={})[y]=b?"0":"",T[v]=m?"0":"",T.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+_+"px)":"translate3d("+f+"px, "+_+"px, 0)",T)):Object.assign({},k,((t={})[y]=b?_+"px":"",t[v]=m?f+"px":"",t.transform="",t))}const bi={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,i=e.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:Yt(t.placement),variation:_i(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,mi(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,mi(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var vi={passive:!0};const yi={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,i=e.instance,n=e.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=Wt(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(e){e.addEventListener("scroll",i.update,vi)}),a&&l.addEventListener("resize",i.update,vi),function(){o&&c.forEach(function(e){e.removeEventListener("scroll",i.update,vi)}),a&&l.removeEventListener("resize",i.update,vi)}},data:{}};var wi={left:"right",right:"left",bottom:"top",top:"bottom"};function Ci(e){return e.replace(/left|right|bottom|top/g,function(e){return wi[e]})}var Ei={start:"end",end:"start"};function Ai(e){return e.replace(/start|end/g,function(e){return Ei[e]})}function Ti(e){var t=Wt(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ki(e){return ti(ri(e)).left+Ti(e).scrollLeft}function xi(e){var t=si(e),i=t.overflow,n=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function Oi(e){return["html","body","#document"].indexOf(Vt(e))>=0?e.ownerDocument.body:Ut(e)&&xi(e)?e:Oi(ai(e))}function Li(e,t){var i;void 0===t&&(t=[]);var n=Oi(e),s=n===(null==(i=e.ownerDocument)?void 0:i.body),o=Wt(n),r=s?[o].concat(o.visualViewport||[],xi(n)?n:[]):n,a=t.concat(r);return s?a:a.concat(Li(ai(r)))}function Si(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ii(e,t,i){return t===Ot?Si(function(e,t){var i=Wt(e),n=ri(e),s=i.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=ei();(c||!c&&"fixed"===t)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+ki(e),y:l}}(e,i)):qt(t)?function(e,t){var i=ti(e,!1,"fixed"===t);return i.top=i.top+e.clientTop,i.left=i.left+e.clientLeft,i.bottom=i.top+e.clientHeight,i.right=i.left+e.clientWidth,i.width=e.clientWidth,i.height=e.clientHeight,i.x=i.left,i.y=i.top,i}(t,i):Si(function(e){var t,i=ri(e),n=Ti(e),s=null==(t=e.ownerDocument)?void 0:t.body,o=Xt(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=Xt(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+ki(e),l=-n.scrollTop;return"rtl"===si(s||i).direction&&(a+=Xt(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}(ri(e)))}function Di(e){var t,i=e.reference,n=e.element,s=e.placement,o=s?Yt(s):null,r=s?_i(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case vt:t={x:a,y:i.y-n.height};break;case yt:t={x:a,y:i.y+i.height};break;case wt:t={x:i.x+i.width,y:l};break;case Ct:t={x:i.x-n.width,y:l};break;default:t={x:i.x,y:i.y}}var c=o?hi(o):null;if(null!=c){var h="y"===c?"height":"width";switch(r){case Tt:t[c]=t[c]-(i[h]/2-n[h]/2);break;case kt:t[c]=t[c]+(i[h]/2-n[h]/2)}}return t}function $i(e,t){void 0===t&&(t={});var i=t,n=i.placement,s=void 0===n?e.placement:n,o=i.strategy,r=void 0===o?e.strategy:o,a=i.boundary,l=void 0===a?xt:a,c=i.rootBoundary,h=void 0===c?Ot:c,d=i.elementContext,u=void 0===d?Lt:d,f=i.altBoundary,p=void 0!==f&&f,_=i.padding,g=void 0===_?0:_,m=ui("number"!=typeof g?g:fi(g,At)),b=u===Lt?St:Lt,v=e.rects.popper,y=e.elements[p?b:u],w=function(e,t,i,n){var s="clippingParents"===t?function(e){var t=Li(ai(e)),i=["absolute","fixed"].indexOf(si(e).position)>=0&&Ut(e)?ci(e):e;return qt(i)?t.filter(function(e){return qt(e)&&ni(e,i)&&"body"!==Vt(e)}):[]}(e):[].concat(t),o=[].concat(s,[i]),r=o[0],a=o.reduce(function(t,i){var s=Ii(e,i,n);return t.top=Xt(s.top,t.top),t.right=Gt(s.right,t.right),t.bottom=Gt(s.bottom,t.bottom),t.left=Xt(s.left,t.left),t},Ii(e,r,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(qt(y)?y:y.contextElement||ri(e.elements.popper),l,h,r),C=ti(e.elements.reference),E=Di({reference:C,element:v,placement:s}),A=Si(Object.assign({},v,E)),T=u===Lt?A:C,k={top:w.top-T.top+m.top,bottom:T.bottom-w.bottom+m.bottom,left:w.left-T.left+m.left,right:T.right-w.right+m.right},x=e.modifiersData.offset;if(u===Lt&&x){var O=x[s];Object.keys(k).forEach(function(e){var t=[wt,yt].indexOf(e)>=0?1:-1,i=[vt,yt].indexOf(e)>=0?"y":"x";k[e]+=O[i]*t})}return k}function Ni(e,t){void 0===t&&(t={});var i=t,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?Dt:l,h=_i(n),d=h?a?It:It.filter(function(e){return _i(e)===h}):At,u=d.filter(function(e){return c.indexOf(e)>=0});0===u.length&&(u=d);var f=u.reduce(function(t,i){return t[i]=$i(e,{placement:i,boundary:s,rootBoundary:o,padding:r})[Yt(i)],t},{});return Object.keys(f).sort(function(e,t){return f[e]-f[t]})}const Mi={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,c=i.padding,h=i.boundary,d=i.rootBoundary,u=i.altBoundary,f=i.flipVariations,p=void 0===f||f,_=i.allowedAutoPlacements,g=t.options.placement,m=Yt(g),b=l||(m!==g&&p?function(e){if(Yt(e)===Et)return[];var t=Ci(e);return[Ai(e),t,Ai(t)]}(g):[Ci(g)]),v=[g].concat(b).reduce(function(e,i){return e.concat(Yt(i)===Et?Ni(t,{placement:i,boundary:h,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:_}):i)},[]),y=t.rects.reference,w=t.rects.popper,C=new Map,E=!0,A=v[0],T=0;T<v.length;T++){var k=v[T],x=Yt(k),O=_i(k)===Tt,L=[vt,yt].indexOf(x)>=0,S=L?"width":"height",I=$i(t,{placement:k,boundary:h,rootBoundary:d,altBoundary:u,padding:c}),D=L?O?wt:Ct:O?yt:vt;y[S]>w[S]&&(D=Ci(D));var $=Ci(D),N=[];if(o&&N.push(I[x]<=0),a&&N.push(I[D]<=0,I[$]<=0),N.every(function(e){return e})){A=k,E=!1;break}C.set(k,N)}if(E)for(var M=function(e){var t=v.find(function(t){var i=C.get(t);if(i)return i.slice(0,e).every(function(e){return e})});if(t)return A=t,"break"},P=p?3:1;P>0&&"break"!==M(P);P--);t.placement!==A&&(t.modifiersData[n]._skip=!0,t.placement=A,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Pi(e,t,i){return void 0===i&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function ji(e){return[vt,wt,yt,Ct].some(function(t){return e[t]>=0})}const Fi={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,i=e.name,n=t.rects.reference,s=t.rects.popper,o=t.modifiersData.preventOverflow,r=$i(t,{elementContext:"reference"}),a=$i(t,{altBoundary:!0}),l=Pi(r,n),c=Pi(a,s,o),h=ji(l),d=ji(c);t.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}},Bi={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,i=e.options,n=e.name,s=i.offset,o=void 0===s?[0,0]:s,r=Dt.reduce(function(e,i){return e[i]=function(e,t,i){var n=Yt(e),s=[Ct,vt].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},t,{placement:e})):i,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[Ct,wt].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}(i,t.rects,o),e},{}),a=r[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=r}},Hi={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,i=e.name;t.modifiersData[i]=Di({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})},data:{}},Ri={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,n=e.name,s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,d=i.padding,u=i.tether,f=void 0===u||u,p=i.tetherOffset,_=void 0===p?0:p,g=$i(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),m=Yt(t.placement),b=_i(t.placement),v=!b,y=hi(m),w="x"===y?"y":"x",C=t.modifiersData.popperOffsets,E=t.rects.reference,A=t.rects.popper,T="function"==typeof _?_(Object.assign({},t.rects,{placement:t.placement})):_,k="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),x=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(C){if(o){var L,S="y"===y?vt:Ct,I="y"===y?yt:wt,D="y"===y?"height":"width",$=C[y],N=$+g[S],M=$-g[I],P=f?-A[D]/2:0,j=b===Tt?E[D]:A[D],F=b===Tt?-A[D]:-E[D],B=t.elements.arrow,H=f&&B?ii(B):{width:0,height:0},R=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},z=R[S],V=R[I],W=di(0,E[D],H[D]),q=v?E[D]/2-P-W-z-k.mainAxis:j-W-z-k.mainAxis,U=v?-E[D]/2+P+W+V+k.mainAxis:F+W+V+k.mainAxis,K=t.elements.arrow&&ci(t.elements.arrow),Q=K?"y"===y?K.clientTop||0:K.clientLeft||0:0,Y=null!=(L=null==x?void 0:x[y])?L:0,X=$+U-Y,G=di(f?Gt(N,$+q-Y-Q):N,$,f?Xt(M,X):M);C[y]=G,O[y]=G-$}if(a){var J,Z="x"===y?vt:Ct,ee="x"===y?yt:wt,te=C[w],ie="y"===w?"height":"width",ne=te+g[Z],se=te-g[ee],oe=-1!==[vt,Ct].indexOf(m),re=null!=(J=null==x?void 0:x[w])?J:0,ae=oe?ne:te-E[ie]-A[ie]-re+k.altAxis,le=oe?te+E[ie]+A[ie]-re-k.altAxis:se,ce=f&&oe?function(e,t,i){var n=di(e,t,i);return n>i?i:n}(ae,te,le):di(f?ae:ne,te,f?le:se);C[w]=ce,O[w]=ce-te}t.modifiersData[n]=O}},requiresIfExists:["offset"]};function zi(e,t,i){void 0===i&&(i=!1);var n,s,o=Ut(t),r=Ut(t)&&function(e){var t=e.getBoundingClientRect(),i=Jt(t.width)/e.offsetWidth||1,n=Jt(t.height)/e.offsetHeight||1;return 1!==i||1!==n}(t),a=ri(t),l=ti(e,r,i),c={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(o||!o&&!i)&&(("body"!==Vt(t)||xi(a))&&(c=(n=t)!==Wt(n)&&Ut(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:Ti(n)),Ut(t)?((h=ti(t,!0)).x+=t.clientLeft,h.y+=t.clientTop):a&&(h.x=ki(a))),{x:l.left+c.scrollLeft-h.x,y:l.top+c.scrollTop-h.y,width:l.width,height:l.height}}function Vi(e){var t=new Map,i=new Set,n=[];function s(e){i.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!i.has(e)){var n=t.get(e);n&&s(n)}}),n.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){i.has(e.name)||s(e)}),n}var Wi={placement:"bottom",modifiers:[],strategy:"absolute"};function qi(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function Ui(e){void 0===e&&(e={});var t=e,i=t.defaultModifiers,n=void 0===i?[]:i,s=t.defaultOptions,o=void 0===s?Wi:s;return function(e,t,i){void 0===i&&(i=o);var s,r,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Wi,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,h={state:a,setOptions:function(i){var s="function"==typeof i?i(a.options):i;d(),a.options=Object.assign({},o,a.options,s),a.scrollParents={reference:qt(e)?Li(e):e.contextElement?Li(e.contextElement):[],popper:Li(t)};var r,c,u=function(e){var t=Vi(e);return zt.reduce(function(e,i){return e.concat(t.filter(function(e){return e.phase===i}))},[])}((r=[].concat(n,a.options.modifiers),c=r.reduce(function(e,t){var i=e[t.name];return e[t.name]=i?Object.assign({},i,t,{options:Object.assign({},i.options,t.options),data:Object.assign({},i.data,t.data)}):t,e},{}),Object.keys(c).map(function(e){return c[e]})));return a.orderedModifiers=u.filter(function(e){return e.enabled}),a.orderedModifiers.forEach(function(e){var t=e.name,i=e.options,n=void 0===i?{}:i,s=e.effect;if("function"==typeof s){var o=s({state:a,name:t,instance:h,options:n});l.push(o||function(){})}}),h.update()},forceUpdate:function(){if(!c){var e=a.elements,t=e.reference,i=e.popper;if(qi(t,i)){a.rects={reference:zi(t,ci(i),"fixed"===a.options.strategy),popper:ii(i)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(e){return a.modifiersData[e.name]=Object.assign({},e.data)});for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var s=a.orderedModifiers[n],o=s.fn,r=s.options,l=void 0===r?{}:r,d=s.name;"function"==typeof o&&(a=o({state:a,options:l,name:d,instance:h})||a)}else a.reset=!1,n=-1}}},update:(s=function(){return new Promise(function(e){h.forceUpdate(),e(a)})},function(){return r||(r=new Promise(function(e){Promise.resolve().then(function(){r=void 0,e(s())})})),r}),destroy:function(){d(),c=!0}};if(!qi(e,t))return h;function d(){l.forEach(function(e){return e()}),l=[]}return h.setOptions(i).then(function(e){!c&&i.onFirstUpdate&&i.onFirstUpdate(e)}),h}}var Ki=Ui({defaultModifiers:[yi,Hi,bi,Qt,Bi,Mi,Ri,pi,Fi]});const Qi=Object.freeze(Object.defineProperty({__proto__:null,afterMain:Ft,afterRead:Mt,afterWrite:Rt,applyStyles:Qt,arrow:pi,auto:Et,basePlacements:At,beforeMain:Pt,beforeRead:$t,beforeWrite:Bt,bottom:yt,clippingParents:xt,computeStyles:bi,createPopper:Ki,detectOverflow:$i,end:kt,eventListeners:yi,flip:Mi,hide:Fi,left:Ct,main:jt,modifierPhases:zt,offset:Bi,placements:Dt,popper:Lt,popperGenerator:Ui,popperOffsets:Hi,preventOverflow:Ri,read:Nt,reference:St,right:wt,start:Tt,top:vt,variationPlacements:It,viewport:Ot,write:Ht},Symbol.toStringTag,{value:"Module"})),Yi="dropdown",Xi=".coreui.dropdown",Gi=".data-api",Ji="ArrowUp",Zi="ArrowDown",en=`hide${Xi}`,tn=`hidden${Xi}`,nn=`show${Xi}`,sn=`shown${Xi}`,on=`click${Xi}${Gi}`,rn=`keydown${Xi}${Gi}`,an=`keyup${Xi}${Gi}`,ln="show",cn='[data-coreui-toggle="dropdown"]:not(.disabled):not(:disabled)',hn=`${cn}.${ln}`,dn=".dropdown-menu",un=g()?"top-end":"top-start",fn=g()?"top-start":"top-end",pn=g()?"bottom-end":"bottom-start",_n=g()?"bottom-start":"bottom-end",gn=g()?"left-start":"right-start",mn=g()?"right-start":"left-start",bn={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},vn={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class yn extends z{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=W.next(this._element,dn)[0]||W.prev(this._element,dn)[0]||W.findOne(dn,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return bn}static get DefaultType(){return vn}static get NAME(){return Yi}toggle(){return this._isShown()?this.hide():this.show()}show(){if(h(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!P.trigger(this._element,nn,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const e of[].concat(...document.body.children))P.on(e,"mouseover",u);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(ln),this._element.classList.add(ln),P.trigger(this._element,sn,e)}}hide(){if(h(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!P.trigger(this._element,en,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))P.off(e,"mouseover",u);this._popper&&this._popper.destroy(),this._menu.classList.remove(ln),this._element.classList.remove(ln),this._element.setAttribute("aria-expanded","false"),H.removeDataAttribute(this._menu,"popper"),P.trigger(this._element,tn,e)}}_getConfig(e){if("object"==typeof(e=super._getConfig(e)).reference&&!a(e.reference)&&"function"!=typeof e.reference.getBoundingClientRect)throw new TypeError(`${Yi.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(void 0===Qi)throw new TypeError("CoreUI's dropdowns require Popper (https://popper.js.org/docs/v2/)");let e=this._element;"parent"===this._config.reference?e=this._parent:a(this._config.reference)?e=l(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=Ki(e,this._menu,t)}_isShown(){return this._menu.classList.contains(ln)}_getPlacement(){const e=this._parent;if(e.classList.contains("dropend"))return gn;if(e.classList.contains("dropstart"))return mn;if(e.classList.contains("dropup-center"))return"top";if(e.classList.contains("dropdown-center"))return"bottom";const t="end"===getComputedStyle(this._menu).getPropertyValue("--cui-position").trim();return e.classList.contains("dropup")?t?fn:un:t?_n:pn}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map(e=>Number.parseInt(e,10)):"function"==typeof e?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(H.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...b(this._config.popperConfig,[void 0,e])}}_selectMenuItem({key:e,target:t}){const i=W.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(e=>c(e));i.length&&y(i,t,e===Zi,!i.includes(t)).focus()}static jQueryInterface(e){return this.each(function(){const t=yn.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}})}static clearMenus(e){if(2===e.button||"keyup"===e.type&&"Tab"!==e.key)return;const t=W.find(hn);for(const i of t){const t=yn.getInstance(i);if(!t||!1===t._config.autoClose)continue;const n=e.composedPath(),s=n.includes(t._menu);if(n.includes(t._element)||"inside"===t._config.autoClose&&!s||"outside"===t._config.autoClose&&s)continue;if(t._menu.contains(e.target)&&("keyup"===e.type&&"Tab"===e.key||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const o={relatedTarget:t._element};"click"===e.type&&(o.clickEvent=e),t._completeHide(o)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),i="Escape"===e.key,n=[Ji,Zi].includes(e.key);if(!n&&!i)return;if(t&&!i)return;e.preventDefault();const s=this.matches(cn)?this:W.prev(this,cn)[0]||W.next(this,cn)[0]||W.findOne(cn,e.delegateTarget.parentNode),o=yn.getOrCreateInstance(s);if(n)return e.stopPropagation(),o.show(),void o._selectMenuItem(e);o._isShown()&&(e.stopPropagation(),o.hide(),s.focus())}}P.on(document,rn,cn,yn.dataApiKeydownHandler),P.on(document,rn,dn,yn.dataApiKeydownHandler),P.on(document,on,yn.clearMenus),P.on(document,an,yn.clearMenus),P.on(document,on,cn,function(e){e.preventDefault(),yn.getOrCreateInstance(this).toggle()}),m(yn);const wn="backdrop",Cn="show",En=`mousedown.coreui.${wn}`,An={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Tn={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class kn extends R{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return An}static get DefaultType(){return Tn}static get NAME(){return wn}show(e){if(!this._config.isVisible)return void b(e);this._append();const t=this._getElement();this._config.isAnimated&&f(t),t.classList.add(Cn),this._emulateAnimation(()=>{b(e)})}hide(e){this._config.isVisible?(this._getElement().classList.remove(Cn),this._emulateAnimation(()=>{this.dispose(),b(e)})):b(e)}dispose(){this._isAppended&&(P.off(this._element,En),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=l(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),P.on(e,En,()=>{b(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){v(e,this._getElement(),this._config.isAnimated)}}const xn=".coreui.focustrap",On=`focusin${xn}`,Ln=`keydown.tab${xn}`,Sn="backward",In={autofocus:!0,trapElement:null},Dn={autofocus:"boolean",trapElement:"element"};class $n extends R{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return In}static get DefaultType(){return Dn}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),P.off(document,xn),P.on(document,On,e=>this._handleFocusin(e)),P.on(document,Ln,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,P.off(document,xn))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const i=W.focusableChildren(t);0===i.length?t.focus():this._lastTabNavDirection===Sn?i[i.length-1].focus():i[0].focus()}_handleKeydown(e){"Tab"===e.key&&(this._lastTabNavDirection=e.shiftKey?Sn:"forward")}}const Nn=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Mn=".sticky-top",Pn="padding-right",jn="margin-right";class Fn{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Pn,t=>t+e),this._setElementAttributes(Nn,Pn,t=>t+e),this._setElementAttributes(Mn,jn,t=>t-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Pn),this._resetElementAttributes(Nn,Pn),this._resetElementAttributes(Mn,jn)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,i){const n=this.getWidth();this._applyManipulationCallback(e,e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+n)return;this._saveInitialAttribute(e,t);const s=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${i(Number.parseFloat(s))}px`)})}_saveInitialAttribute(e,t){const i=e.style.getPropertyValue(t);i&&H.setDataAttribute(e,t,i)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,e=>{const i=H.getDataAttribute(e,t);null!==i?(H.removeDataAttribute(e,t),e.style.setProperty(t,i)):e.style.removeProperty(t)})}_applyManipulationCallback(e,t){if(a(e))t(e);else for(const i of W.find(e,this._element))t(i)}}const Bn=".coreui.modal",Hn=`hide${Bn}`,Rn=`hidePrevented${Bn}`,zn=`hidden${Bn}`,Vn=`show${Bn}`,Wn=`shown${Bn}`,qn=`resize${Bn}`,Un=`click.dismiss${Bn}`,Kn=`mousedown.dismiss${Bn}`,Qn=`keydown.dismiss${Bn}`,Yn=`click${Bn}.data-api`,Xn="modal-open",Gn="show",Jn="modal-static",Zn={backdrop:!0,focus:!0,keyboard:!0},es={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class ts extends z{constructor(e,t){super(e,t),this._dialog=W.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Fn,this._addEventListeners()}static get Default(){return Zn}static get DefaultType(){return es}static get NAME(){return"modal"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||P.trigger(this._element,Vn,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Xn),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){this._isShown&&!this._isTransitioning&&(P.trigger(this._element,Hn).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Gn),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){P.off(window,Bn),P.off(this._dialog,Bn),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new kn({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new $n({trapElement:this._element})}_showElement(e){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 t=W.findOne(".modal-body",this._dialog);t&&(t.scrollTop=0),f(this._element),this._element.classList.add(Gn),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,P.trigger(this._element,Wn,{relatedTarget:e})},this._dialog,this._isAnimated())}_addEventListeners(){P.on(this._element,Qn,e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),P.on(window,qn,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),P.on(this._element,Kn,e=>{P.one(this._element,Un,t=>{this._element===e.target&&this._element===t.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(Xn),this._resetAdjustments(),this._scrollBar.reset(),P.trigger(this._element,zn)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(P.trigger(this._element,Rn).defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;"hidden"===t||this._element.classList.contains(Jn)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(Jn),this._queueCallback(()=>{this._element.classList.remove(Jn),this._queueCallback(()=>{this._element.style.overflowY=t},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),i=t>0;if(i&&!e){const e=g()?"paddingLeft":"paddingRight";this._element.style[e]=`${t}px`}if(!i&&e){const e=g()?"paddingRight":"paddingLeft";this._element.style[e]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each(function(){const i=ts.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e](t)}})}}P.on(document,Yn,'[data-coreui-toggle="modal"]',function(e){const t=W.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),P.one(t,Vn,e=>{e.defaultPrevented||P.one(t,zn,()=>{c(this)&&this.focus()})});const i=W.findOne(".modal.show");i&&ts.getInstance(i).hide(),ts.getOrCreateInstance(t).toggle(this)}),q(ts),m(ts);const is="coreui.navigation",ns=`.${is}`,ss=".data-api",os={activeLinksExact:!0,groupsAutoCollapse:!0},rs={activeLinksExact:"boolean",groupsAutoCollapse:"(string|boolean)"},as="active",ls="show",cs="nav-group-toggle",hs=`click${ns}${ss}`,ds=`load${ns}${ss}`,us=".nav-group",fs=".nav-group-items",ps=".nav-group-toggle";class _s extends z{constructor(e,i){super(e),this._config=this._getConfig(i),this._setActiveLink(),this._addEventListeners(),t.set(e,is,this)}static get Default(){return os}static get DATA_KEY(){return is}static get DefaultType(){return rs}static get NAME(){return"navigation"}_setActiveLink(){for(const e of Array.from(this._element.querySelectorAll(".nav-link"))){if(e.classList.contains(cs))continue;let t=String(window.location);const i=/\?./,n=/#./;(/\?.*=/.test(t)||i.test(t))&&(t=t.split("?")[0]),n.test(t)&&(t=t.split("#")[0]),this._config.activeLinksExact&&e.href===t&&(e.classList.add(as),Array.from(this._getParents(e,us)).forEach(e=>{e.classList.add(ls),e.setAttribute("aria-expanded",!0)})),!this._config.activeLinksExact&&t.startsWith(e.href)&&(e.classList.add(as),Array.from(this._getParents(e,us)).forEach(e=>{e.classList.add(ls),e.setAttribute("aria-expanded",!0)}))}}_getParents(e,t){const i=[];for(;e&&e!==document;e=e.parentNode)t?e.matches(t)&&i.push(e):i.push(e);return i}_getAllSiblings(e,t){const i=[];e=e.parentNode.firstChild;do{3!==e.nodeType&&8!==e.nodeType&&(t&&!t(e)||i.push(e))}while(e=e.nextSibling);return i}_getChildren(e,t){const i=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i}_getSiblings(e,t){return this._getChildren(e.parentNode.firstChild,e).filter(t)}_slideDown(e){e.style.height="auto";const t=e.clientHeight;e.style.height="0px",setTimeout(()=>{e.style.height=`${t}px`},0),this._queueCallback(()=>{e.style.height="auto"},e,!0)}_slideUp(e,t){const i=e.clientHeight;e.style.height=`${i}px`,setTimeout(()=>{e.style.height="0px"},0),this._queueCallback(()=>{"function"==typeof t&&t()},e,!0)}_toggleGroupItems(e){let t=e.target;t.classList.contains(cs)||(t=t.closest(ps));const i=e=>Boolean(e.classList.contains("nav-group")&&e.classList.contains(ls));if(!0===this._config.groupsAutoCollapse)for(const e of this._getSiblings(t.parentNode,i))this._slideUp(W.findOne(fs,e),()=>{e.classList.remove(ls),e.setAttribute("aria-expanded",!1)});t.parentNode.classList.contains(ls)?this._slideUp(W.findOne(fs,t.parentNode),()=>{t.parentNode.classList.remove(ls),t.parentNode.setAttribute("aria-expanded",!1)}):(t.parentNode.classList.add(ls),t.parentNode.setAttribute("aria-expanded",!0),this._slideDown(W.findOne(fs,t.parentNode)))}_addEventListeners(){P.on(this._element,hs,ps,e=>{e.preventDefault(),this._toggleGroupItems(e,this)})}static navigationInterface(e,t){const i=_s.getOrCreateInstance(e,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}static jQueryInterface(e){return this.each(function(){_s.navigationInterface(this,e)})}}P.on(window,ds,()=>{for(const e of Array.from(document.querySelectorAll('[data-coreui="navigation"]')))_s.navigationInterface(e)}),m(_s);const gs=".coreui.offcanvas",ms=".data-api",bs=`load${gs}${ms}`,vs="show",ys="showing",ws="hiding",Cs=".offcanvas.show",Es=`show${gs}`,As=`shown${gs}`,Ts=`hide${gs}`,ks=`hidePrevented${gs}`,xs=`hidden${gs}`,Os=`resize${gs}`,Ls=`click${gs}${ms}`,Ss=`keydown.dismiss${gs}`,Is={backdrop:!0,keyboard:!0,scroll:!1},Ds={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class $s extends z{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Is}static get DefaultType(){return Ds}static get NAME(){return"offcanvas"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||P.trigger(this._element,Es,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new Fn).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(ys),this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(vs),this._element.classList.remove(ys),P.trigger(this._element,As,{relatedTarget:e})},this._element,!0))}hide(){this._isShown&&(P.trigger(this._element,Ts).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(ws),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove(vs,ws),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new Fn).reset(),P.trigger(this._element,xs)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=Boolean(this._config.backdrop);return new kn({className:"offcanvas-backdrop",isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?()=>{"static"!==this._config.backdrop?this.hide():P.trigger(this._element,ks)}:null})}_initializeFocusTrap(){return new $n({trapElement:this._element})}_addEventListeners(){P.on(this._element,Ss,e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():P.trigger(this._element,ks))})}static jQueryInterface(e){return this.each(function(){const t=$s.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}})}}P.on(document,Ls,'[data-coreui-toggle="offcanvas"]',function(e){const t=W.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),h(this))return;P.one(t,xs,()=>{c(this)&&this.focus()});const i=W.findOne(Cs);i&&i!==t&&$s.getInstance(i).hide(),$s.getOrCreateInstance(t).toggle(this)}),P.on(window,bs,()=>{for(const e of W.find(Cs))$s.getOrCreateInstance(e).show()}),P.on(window,Os,()=>{for(const e of W.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(e).position&&$s.getOrCreateInstance(e).hide()}),q($s),m($s);const Ns={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],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:[]},Ms=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Ps=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,js=(e,t)=>{const i=e.nodeName.toLowerCase();return t.includes(i)?!Ms.has(i)||Boolean(Ps.test(e.nodeValue)):t.filter(e=>e instanceof RegExp).some(e=>e.test(i))},Fs={allowList:Ns,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},Bs={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Hs={entry:"(string|element|function|null)",selector:"(string|element)"};class Rs extends R{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return Fs}static get DefaultType(){return Bs}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[t,i]of Object.entries(this._config.content))this._setContent(e,i,t);const t=e.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&t.classList.add(...i.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,i]of Object.entries(e))super._typeCheckConfig({selector:t,entry:i},Hs)}_setContent(e,t,i){const n=W.findOne(i,e);n&&((t=this._resolvePossibleFunction(t))?a(t)?this._putElementInTemplate(l(t),n):this._config.html?n.innerHTML=this._maybeSanitize(t):n.textContent=t:n.remove())}_maybeSanitize(e){return this._config.sanitize?function(e,t,i){if(!e.length)return e;if(i&&"function"==typeof i)return i(e);const n=(new window.DOMParser).parseFromString(e,"text/html"),s=[].concat(...n.body.querySelectorAll("*"));for(const e of s){const i=e.nodeName.toLowerCase();if(!Object.keys(t).includes(i)){e.remove();continue}const n=[].concat(...e.attributes),s=[].concat(t["*"]||[],t[i]||[]);for(const t of n)js(t,s)||e.removeAttribute(t.nodeName)}return n.body.innerHTML}(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return b(e,[void 0,this])}_putElementInTemplate(e,t){if(this._config.html)return t.innerHTML="",void t.append(e);t.textContent=e.textContent}}const zs=new Set(["sanitize","allowList","sanitizeFn"]),Vs="fade",Ws="show",qs=".tooltip-inner",Us=".modal",Ks="hide.coreui.modal",Qs="hover",Ys="focus",Xs="click",Gs={AUTO:"auto",TOP:"top",RIGHT:g()?"left":"right",BOTTOM:"bottom",LEFT:g()?"right":"left"},Js={allowList:Ns,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],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"},Zs={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 eo extends z{constructor(e,t){if(void 0===Qi)throw new TypeError("CoreUI's dropdowns require Popper (https://popper.js.org/docs/v2/)");super(e,t),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 Js}static get DefaultType(){return Zs}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),P.off(this._element.closest(Us),Ks,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 e=P.trigger(this._element,this.constructor.eventName("show")),t=(d(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!t)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(i),P.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(Ws),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))P.on(e,"mouseover",u);this._queueCallback(()=>{P.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!P.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(Ws),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))P.off(e,"mouseover",u);this._activeTrigger[Xs]=!1,this._activeTrigger[Ys]=!1,this._activeTrigger[Qs]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),P.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(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(Vs,Ws),t.classList.add(`bs-${this.constructor.NAME}-auto`);const i=o(this.constructor.NAME).toString();return t.setAttribute("id",i),this._isAnimated()&&t.classList.add(Vs),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new Rs({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[qs]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-coreui-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Vs)}_isShown(){return this.tip&&this.tip.classList.contains(Ws)}_createPopper(e){const t=b(this._config.placement,[this,e,this._element]),i=Gs[t.toUpperCase()];return Ki(this._element,e,this._getPopperConfig(i))}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map(e=>Number.parseInt(e,10)):"function"==typeof e?t=>e(t,this._element):e}_resolvePossibleFunction(e){return b(e,[this._element,this._element])}_getPopperConfig(e){const t={placement:e,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:e=>{this._getTipElement().setAttribute("data-popper-placement",e.state.placement)}}]};return{...t,...b(this._config.popperConfig,[void 0,t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if("click"===t)P.on(this._element,this.constructor.eventName("click"),this._config.selector,e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger[Xs]=!(t._isShown()&&t._activeTrigger[Xs]),t.toggle()});else if("manual"!==t){const e=t===Qs?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=t===Qs?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");P.on(this._element,e,this._config.selector,e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusin"===e.type?Ys:Qs]=!0,t._enter()}),P.on(this._element,i,this._config.selector,e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusout"===e.type?Ys:Qs]=t._element.contains(e.relatedTarget),t._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},P.on(this._element.closest(Us),Ks,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",e),this._element.setAttribute("data-coreui-original-title",e),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(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=H.getDataAttributes(this._element);for(const e of Object.keys(t))zs.has(e)&&delete t[e];return e={...t,..."object"==typeof e&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=!1===e.container?document.body:l(e.container),"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,i]of Object.entries(this._config))this.constructor.Default[t]!==i&&(e[t]=i);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){const t=eo.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}})}}m(eo);const to=".popover-header",io=".popover-body",no={...eo.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"},so={...eo.DefaultType,content:"(null|string|element|function)"};class oo extends eo{static get Default(){return no}static get DefaultType(){return so}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[to]:this._getTitle(),[io]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const t=oo.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}})}}m(oo);const ro=".coreui.scrollspy",ao=`activate${ro}`,lo=`click${ro}`,co=`load${ro}.data-api`,ho="active",uo="[href]",fo=".nav-link",po=`${fo}, .nav-item > ${fo}, .list-group-item`,_o={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},go={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class mo extends z{constructor(e,t){super(e,t),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 _o}static get DefaultType(){return go}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=l(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,"string"==typeof e.threshold&&(e.threshold=e.threshold.split(",").map(e=>Number.parseFloat(e))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(P.off(this._config.target,lo),P.on(this._config.target,lo,uo,e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const i=this._rootElement||window,n=t.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:n,behavior:"smooth"});i.scrollTop=n}}))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(e=>this._observerCallback(e),e)}_observerCallback(e){const t=e=>this._targetLinks.get(`#${e.target.id}`),i=e=>{this._previousScrollData.visibleEntryTop=e.target.offsetTop,this._process(t(e))},n=(this._rootElement||document.documentElement).scrollTop,s=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const o of e){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(o));continue}const e=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&e){if(i(o),!n)return}else s||e||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=W.find(uo,this._config.target);for(const t of e){if(!t.hash||h(t))continue;const e=W.findOne(decodeURI(t.hash),this._element);c(e)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,e))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(ho),this._activateParents(e),P.trigger(this._element,ao,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains("dropdown-item"))W.findOne(".dropdown-toggle",e.closest(".dropdown")).classList.add(ho);else for(const t of W.parents(e,".nav, .list-group"))for(const e of W.prev(t,po))e.classList.add(ho)}_clearActiveClass(e){e.classList.remove(ho);const t=W.find(`${uo}.${ho}`,e);for(const e of t)e.classList.remove(ho)}static jQueryInterface(e){return this.each(function(){const t=mo.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}})}}P.on(window,co,()=>{for(const e of W.find('[data-coreui-spy="scroll"]'))mo.getOrCreateInstance(e)}),m(mo);const bo=".coreui.sidebar",vo=".data-api",yo={},wo={},Co="hide",Eo="show",Ao="sidebar-narrow",To="sidebar-narrow-unfoldable",ko=`hide${bo}`,xo=`hidden${bo}`,Oo=`show${bo}`,Lo=`shown${bo}`,So=`click${bo}${vo}`,Io=`load${bo}${vo}`,Do=".sidebar";class $o extends z{constructor(e,t){super(e),this._config=this._getConfig(t),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 yo}static get DefaultType(){return wo}static get NAME(){return"sidebar"}show(){P.trigger(this._element,Oo),this._element.classList.contains(Co)&&this._element.classList.remove(Co),this._overlaid&&this._element.classList.add(Eo),this._isMobile()&&(this._element.classList.add(Eo),this._backdrop.show(),(new Fn).hide()),this._queueCallback(()=>{!0===this._isVisible()&&(this._show=!0,(this._isMobile()||this._isOverlaid())&&this._addClickOutListener(),P.trigger(this._element,Lo))},this._element,!0)}hide(){P.trigger(this._element,ko),this._element.classList.contains(Eo)&&this._element.classList.remove(Eo),this._isMobile()&&(this._backdrop.hide(),(new Fn).reset()),this._isMobile()||this._overlaid||this._element.classList.add(Co),this._queueCallback(()=>{!1===this._isVisible()&&(this._show=!1,(this._isMobile()||this._isOverlaid())&&this._removeClickOutListener(),P.trigger(this._element,xo))},this._element,!0)}toggle(){this._isVisible()?this.hide():this.show()}narrow(){this._isMobile()||(this._addClassName(Ao),this._narrow=!0)}unfoldable(){this._isMobile()||(this._addClassName(To),this._unfoldable=!0)}reset(){this._isMobile()||(this._narrow&&(this._element.classList.remove(Ao),this._narrow=!1),this._unfoldable&&(this._element.classList.remove(To),this._unfoldable=!1))}toggleNarrow(){this._narrow?this.reset():this.narrow()}toggleUnfoldable(){this._unfoldable?this.reset():this.unfoldable()}_initializeBackDrop(){return new kn({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(Ao)}_isOverlaid(){return this._element.classList.contains("sidebar-overlaid")}_isUnfoldable(){return this._element.classList.contains(To)}_isVisible(){const e=this._element.getBoundingClientRect();return e.top>=0&&e.left>=0&&Math.floor(e.bottom)<=(window.innerHeight||document.documentElement.clientHeight)&&Math.floor(e.right)<=(window.innerWidth||document.documentElement.clientWidth)}_addClassName(e){this._element.classList.add(e)}_clickOutListener(e,t){null===e.target.closest(Do)&&(e.preventDefault(),e.stopPropagation(),t.hide())}_addClickOutListener(){P.on(document,So,e=>{this._clickOutListener(e,this)})}_removeClickOutListener(){P.off(document,So)}_addEventListeners(){this._mobile&&this._show&&this._addClickOutListener(),this._overlaid&&this._show&&this._addClickOutListener(),P.on(this._element,So,"[data-coreui-toggle]",e=>{e.preventDefault();const t=H.getDataAttribute(e.target,"toggle");"narrow"===t&&this.toggleNarrow(),"unfoldable"===t&&this.toggleUnfoldable()}),P.on(this._element,So,'[data-coreui-close="sidebar"]',e=>{e.preventDefault(),this.hide()}),P.on(window,"resize",()=>{this._isMobile()&&this._isVisible()&&(this.hide(),this._backdrop=this._initializeBackDrop())})}static sidebarInterface(e,t){const i=$o.getOrCreateInstance(e,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}static jQueryInterface(e){return this.each(function(){$o.sidebarInterface(this,e)})}}P.on(window,Io,()=>{for(const e of Array.from(document.querySelectorAll(Do)))$o.sidebarInterface(e)}),m($o);const No=".coreui.tab",Mo=`hide${No}`,Po=`hidden${No}`,jo=`show${No}`,Fo=`shown${No}`,Bo=`click${No}`,Ho=`keydown${No}`,Ro=`load${No}`,zo="ArrowLeft",Vo="ArrowRight",Wo="ArrowUp",qo="ArrowDown",Uo="Home",Ko="End",Qo="active",Yo="fade",Xo="show",Go=".dropdown-toggle",Jo=`:not(${Go})`,Zo='[data-coreui-toggle="tab"], [data-coreui-toggle="pill"], [data-coreui-toggle="list"]',er=`.nav-link${Jo}, .list-group-item${Jo}, [role="tab"]${Jo}, ${Zo}`,tr=`.${Qo}[data-coreui-toggle="tab"], .${Qo}[data-coreui-toggle="pill"], .${Qo}[data-coreui-toggle="list"]`;class ir extends z{constructor(e){super(e),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),P.on(this._element,Ho,e=>this._keydown(e)))}static get NAME(){return"tab"}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),i=t?P.trigger(t,Mo,{relatedTarget:e}):null;P.trigger(e,jo,{relatedTarget:t}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){e&&(e.classList.add(Qo),this._activate(W.getElementFromSelector(e)),this._queueCallback(()=>{"tab"===e.getAttribute("role")?(e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),P.trigger(e,Fo,{relatedTarget:t})):e.classList.add(Xo)},e,e.classList.contains(Yo)))}_deactivate(e,t){e&&(e.classList.remove(Qo),e.blur(),this._deactivate(W.getElementFromSelector(e)),this._queueCallback(()=>{"tab"===e.getAttribute("role")?(e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),P.trigger(e,Po,{relatedTarget:t})):e.classList.remove(Xo)},e,e.classList.contains(Yo)))}_keydown(e){if(![zo,Vo,Wo,qo,Uo,Ko].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=this._getChildren().filter(e=>!h(e));let i;if([Uo,Ko].includes(e.key))i=t[e.key===Uo?0:t.length-1];else{const n=[Vo,qo].includes(e.key);i=y(t,e.target,n,!0)}i&&(i.focus({preventScroll:!0}),ir.getOrCreateInstance(i).show())}_getChildren(){return W.find(er,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const e of t)this._setInitialAttributesOnChild(e)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),i=this._getOuterElement(e);e.setAttribute("aria-selected",t),i!==e&&this._setAttributeIfNotExists(i,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=W.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const i=this._getOuterElement(e);if(!i.classList.contains("dropdown"))return;const n=(e,n)=>{const s=W.findOne(e,i);s&&s.classList.toggle(n,t)};n(Go,Qo),n(".dropdown-menu",Xo),i.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,i){e.hasAttribute(t)||e.setAttribute(t,i)}_elemIsActive(e){return e.classList.contains(Qo)}_getInnerElement(e){return e.matches(er)?e:W.findOne(er,e)}_getOuterElement(e){return e.closest(".nav-item, .list-group-item")||e}static jQueryInterface(e){return this.each(function(){const t=ir.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}})}}P.on(document,Bo,Zo,function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),h(this)||ir.getOrCreateInstance(this).show()}),P.on(window,Ro,()=>{for(const e of W.find(tr))ir.getOrCreateInstance(e)}),m(ir);const nr=".coreui.toast",sr=`mouseover${nr}`,or=`mouseout${nr}`,rr=`focusin${nr}`,ar=`focusout${nr}`,lr=`hide${nr}`,cr=`hidden${nr}`,hr=`show${nr}`,dr=`shown${nr}`,ur="hide",fr="show",pr="showing",_r={animation:"boolean",autohide:"boolean",delay:"number"},gr={animation:!0,autohide:!0,delay:5e3};class mr extends z{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return gr}static get DefaultType(){return _r}static get NAME(){return"toast"}show(){P.trigger(this._element,hr).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(ur),f(this._element),this._element.classList.add(fr,pr),this._queueCallback(()=>{this._element.classList.remove(pr),P.trigger(this._element,dr),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&(P.trigger(this._element,lr).defaultPrevented||(this._element.classList.add(pr),this._queueCallback(()=>{this._element.classList.add(ur),this._element.classList.remove(pr,fr),P.trigger(this._element,cr)},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(fr),super.dispose()}isShown(){return this._element.classList.contains(fr)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const i=e.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){P.on(this._element,sr,e=>this._onInteraction(e,!0)),P.on(this._element,or,e=>this._onInteraction(e,!1)),P.on(this._element,rr,e=>this._onInteraction(e,!0)),P.on(this._element,ar,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const t=mr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}})}}return q(mr),m(mr),{Alert:Y,Button:G,Carousel:Ie,Chip:qe,ChipInput:st,Collapse:bt,Dropdown:yn,Modal:ts,Navigation:_s,OffCanvas:$s,Popover:oo,ScrollSpy:mo,Sidebar:$o,Tab:ir,Toast:mr,Tooltip:eo}});
|
|
7
7
|
//# sourceMappingURL=coreui.bundle.min.js.map
|