Current File : /home/pacjaorg/public_html/kmm/media/vendor/bootstrap/js/dom.min.js |
const g=new Map;var D={set(e,t,n){g.has(e)||g.set(e,new Map);const s=g.get(e);if(!s.has(t)&&s.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`);return}s.set(t,n)},get(e,t){return g.has(e)&&g.get(e).get(t)||null},remove(e,t){if(!g.has(e))return;const n=g.get(e);n.delete(t),n.size===0&&g.delete(e)}};const at=1e6,ct=1e3,w="transitionend",L=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(t,n)=>`#${CSS.escape(n)}`)),e),ut=e=>e==null?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),lt=e=>{do e+=Math.floor(Math.random()*at);while(document.getElementById(e));return e},ft=e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const s=Number.parseFloat(t),r=Number.parseFloat(n);return!s&&!r?0:(t=t.split(",")[0],n=n.split(",")[0],(Number.parseFloat(t)+Number.parseFloat(n))*ct)},x=e=>{e.dispatchEvent(new Event(w))},m=e=>!e||typeof e!="object"?!1:(typeof e.jquery<"u"&&(e=e[0]),typeof e.nodeType<"u"),y=e=>m(e)?e.jquery?e[0]:e:typeof e=="string"&&e.length>0?document.querySelector(L(e)):null,F=e=>{if(!m(e)||e.getClientRects().length===0)return!1;const t=getComputedStyle(e).getPropertyValue("visibility")==="visible",n=e.closest("details:not([open])");if(!n)return t;if(n!==e){const s=e.closest("summary");if(s&&s.parentNode!==n||s===null)return!1}return t},v=e=>!e||e.nodeType!==Node.ELEMENT_NODE||e.classList.contains("disabled")?!0:typeof e.disabled<"u"?e.disabled:e.hasAttribute("disabled")&&e.getAttribute("disabled")!=="false",V=e=>{if(!document.documentElement.attachShadow)return null;if(typeof e.getRootNode=="function"){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?V(e.parentNode):null},dt=()=>{},K=e=>{e.offsetHeight},W=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,O=[],ht=e=>{document.readyState==="loading"?(O.length||document.addEventListener("DOMContentLoaded",()=>{for(const t of O)t()}),O.push(e)):e()},gt=()=>document.documentElement.dir==="rtl",mt=e=>{ht(()=>{const t=W();if(t){const n=e.NAME,s=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=s,e.jQueryInterface)}})},f=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e;return typeof e=="function"?e(...t):n},j=function(e,t){if(!(arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0)){f(e);return}const s=5,r=ft(t)+s;let o=!1;const i=a=>{let{target:u}=a;u===t&&(o=!0,t.removeEventListener(w,i),f(e))};t.addEventListener(w,i),setTimeout(()=>{o||x(t)},r)},pt=(e,t,n,s)=>{const r=e.length;let o=e.indexOf(t);return o===-1?!n&&s?e[r-1]:e[0]:(o+=n?1:-1,s&&(o=(o+r)%r),e[Math.max(0,Math.min(o,r-1))])},_t=/[^.]*(?=\..*)\.|.*/,Et=/\..*/,bt=/::\d+$/,S={};let Y=1;const H={mouseenter:"mouseover",mouseleave:"mouseout"},At=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 B(e,t){return t&&`${t}::${Y++}`||e.uidEvent||Y++}function U(e){const t=B(e);return e.uidEvent=t,S[t]=S[t]||{},S[t]}function yt(e,t){return function n(s){return k(s,{delegateTarget:e}),n.oneOff&&c.off(e,s.type,t),t.apply(e,[s])}}function Tt(e,t,n){return function s(r){const o=e.querySelectorAll(t);for(let{target:i}=r;i&&i!==this;i=i.parentNode)for(const a of o)if(a===i)return k(r,{delegateTarget:i}),s.oneOff&&c.off(e,r.type,t,n),n.apply(i,[r])}}function X(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;return Object.values(e).find(s=>s.callable===t&&s.delegationSelector===n)}function z(e,t,n){const s=typeof t=="string",r=s?n:t||n;let o=Q(e);return At.has(o)||(o=e),[s,r,o]}function q(e,t,n,s,r){if(typeof t!="string"||!e)return;let[o,i,a]=z(t,n,s);t in H&&(i=(ot=>function(E){if(!E.relatedTarget||E.relatedTarget!==E.delegateTarget&&!E.delegateTarget.contains(E.relatedTarget))return ot.call(this,E)})(i));const u=U(e),d=u[a]||(u[a]={}),l=X(d,i,o?n:null);if(l){l.oneOff=l.oneOff&&r;return}const _=B(i,t.replace(_t,"")),h=o?Tt(e,n,i):yt(e,i);h.delegationSelector=o?n:null,h.callable=i,h.oneOff=r,h.uidEvent=_,d[_]=h,e.addEventListener(a,h,o)}function M(e,t,n,s,r){const o=X(t[n],s,r);o&&(e.removeEventListener(n,o,!!r),delete t[n][o.uidEvent])}function Nt(e,t,n,s){const r=t[n]||{};for(const[o,i]of Object.entries(r))o.includes(s)&&M(e,t,n,i.callable,i.delegationSelector)}function Q(e){return e=e.replace(Et,""),H[e]||e}const c={on(e,t,n,s){q(e,t,n,s,!1)},one(e,t,n,s){q(e,t,n,s,!0)},off(e,t,n,s){if(typeof t!="string"||!e)return;const[r,o,i]=z(t,n,s),a=i!==t,u=U(e),d=u[i]||{},l=t.startsWith(".");if(typeof o<"u"){if(!Object.keys(d).length)return;M(e,u,i,o,r?n:null);return}if(l)for(const _ of Object.keys(u))Nt(e,u,_,t.slice(1));for(const[_,h]of Object.entries(d)){const R=_.replace(bt,"");(!a||t.includes(R))&&M(e,u,i,h.callable,h.delegationSelector)}},trigger(e,t,n){if(typeof t!="string"||!e)return null;const s=W(),r=Q(t),o=t!==r;let i=null,a=!0,u=!0,d=!1;o&&s&&(i=s.Event(t,n),s(e).trigger(i),a=!i.isPropagationStopped(),u=!i.isImmediatePropagationStopped(),d=i.isDefaultPrevented());const l=k(new Event(t,{bubbles:a,cancelable:!0}),n);return d&&l.preventDefault(),u&&e.dispatchEvent(l),l.defaultPrevented&&i&&i.preventDefault(),l}};function k(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(const[n,s]of Object.entries(t))try{e[n]=s}catch{Object.defineProperty(e,n,{configurable:!0,get(){return s}})}return e}function J(e){if(e==="true")return!0;if(e==="false")return!1;if(e===Number(e).toString())return Number(e);if(e===""||e==="null")return null;if(typeof e!="string")return e;try{return JSON.parse(decodeURIComponent(e))}catch{return e}}function P(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const b={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${P(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${P(t)}`)},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter(s=>s.startsWith("bs")&&!s.startsWith("bsConfig"));for(const s of n){let r=s.replace(/^bs/,"");r=r.charAt(0).toLowerCase()+r.slice(1,r.length),t[r]=J(e.dataset[s])}return t},getDataAttribute(e,t){return J(e.getAttribute(`data-bs-${P(t)}`))}};class T{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,n){const s=m(n)?b.getDataAttribute(n,"config"):{};return{...this.constructor.Default,...typeof s=="object"?s:{},...m(n)?b.getDataAttributes(n):{},...typeof t=="object"?t:{}}}_typeCheckConfig(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.constructor.DefaultType;for(const[s,r]of Object.entries(n)){const o=t[s],i=m(o)?"element":ut(o);if(!new RegExp(r).test(i))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${s}" provided type "${i}" but expected type "${r}".`)}}}const Ct="5.3.2";class Dt extends T{constructor(t,n){super(),t=y(t),t&&(this._element=t,this._config=this._getConfig(n),D.set(this._element,this.constructor.DATA_KEY,this))}dispose(){D.remove(this._element,this.constructor.DATA_KEY),c.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;j(t,n,s)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return D.get(y(t),this.DATA_KEY)}static getOrCreateInstance(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.getInstance(t)||new this(t,typeof n=="object"?n:null)}static get VERSION(){return Ct}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const $=e=>{let t=e.getAttribute("data-bs-target");if(!t||t==="#"){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&n!=="#"?L(n.trim()):null}return t},p={find(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document.documentElement;return[].concat(...Element.prototype.querySelectorAll.call(t,e))},findOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document.documentElement;return Element.prototype.querySelector.call(t,e)},children(e,t){return[].concat(...e.children).filter(n=>n.matches(t))},parents(e,t){const n=[];let s=e.parentNode.closest(t);for(;s;)n.push(s),s=s.parentNode.closest(t);return n},prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(n=>`${n}:not([tabindex^="-"])`).join(",");return this.find(t,e).filter(n=>!v(n)&&F(n))},getSelectorFromElement(e){const t=$(e);return t&&p.findOne(t)?t:null},getElementFromSelector(e){const t=$(e);return t?p.findOne(t):null},getMultipleElementsFromSelector(e){const t=$(e);return t?p.find(t):[]}},wt=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"hide";const n=`click.dismiss${e.EVENT_KEY}`,s=e.NAME;c.on(document,n,`[data-bs-dismiss="${s}"]`,function(r){if(["A","AREA"].includes(this.tagName)&&r.preventDefault(),v(this))return;const o=p.getElementFromSelector(this)||this.closest(`.${s}`);e.getOrCreateInstance(o)[t]()})},vt="swipe",A=".bs.swipe",Ot=`touchstart${A}`,St=`touchmove${A}`,Mt=`touchend${A}`,kt=`pointerdown${A}`,Pt=`pointerup${A}`,$t="touch",It="pen",Rt="pointer-event",Lt=40,xt={endCallback:null,leftCallback:null,rightCallback:null},Ft={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class I extends T{constructor(t,n){super(),this._element=t,!(!t||!I.isSupported())&&(this._config=this._getConfig(n),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return xt}static get DefaultType(){return Ft}static get NAME(){return vt}dispose(){c.off(this._element,A)}_start(t){if(!this._supportPointerEvents){this._deltaX=t.touches[0].clientX;return}this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX)}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),f(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<=Lt)return;const n=t/this._deltaX;this._deltaX=0,n&&f(n>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(c.on(this._element,kt,t=>this._start(t)),c.on(this._element,Pt,t=>this._end(t)),this._element.classList.add(Rt)):(c.on(this._element,Ot,t=>this._start(t)),c.on(this._element,St,t=>this._move(t)),c.on(this._element,Mt,t=>this._end(t)))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&(t.pointerType===It||t.pointerType===$t)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const G="backdrop",Vt="fade",Z="show",tt=`mousedown.bs.${G}`,Kt={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Wt={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class jt extends T{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Kt}static get DefaultType(){return Wt}static get NAME(){return G}show(t){if(!this._config.isVisible){f(t);return}this._append();const n=this._getElement();this._config.isAnimated&&K(n),n.classList.add(Z),this._emulateAnimation(()=>{f(t)})}hide(t){if(!this._config.isVisible){f(t);return}this._getElement().classList.remove(Z),this._emulateAnimation(()=>{this.dispose(),f(t)})}dispose(){this._isAppended&&(c.off(this._element,tt),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(Vt),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=y(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),c.on(t,tt,()=>{f(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(t){j(t,this._getElement(),this._config.isAnimated)}}const Yt="focustrap",Ht="bs.focustrap",N=`.${Ht}`,Bt=`focusin${N}`,Ut=`keydown.tab${N}`,Xt="Tab",zt="forward",et="backward",qt={autofocus:!0,trapElement:null},Qt={autofocus:"boolean",trapElement:"element"};class Jt extends T{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return qt}static get DefaultType(){return Qt}static get NAME(){return Yt}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),c.off(document,N),c.on(document,Bt,t=>this._handleFocusin(t)),c.on(document,Ut,t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,c.off(document,N))}_handleFocusin(t){const{trapElement:n}=this._config;if(t.target===document||t.target===n||n.contains(t.target))return;const s=p.focusableChildren(n);s.length===0?n.focus():this._lastTabNavDirection===et?s[s.length-1].focus():s[0].focus()}_handleKeydown(t){t.key===Xt&&(this._lastTabNavDirection=t.shiftKey?et:zt)}}const nt=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",st=".sticky-top",C="padding-right",rt="margin-right";class Gt{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,C,n=>n+t),this._setElementAttributes(nt,C,n=>n+t),this._setElementAttributes(st,rt,n=>n-t)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,C),this._resetElementAttributes(nt,C),this._resetElementAttributes(st,rt)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,n,s){const r=this.getWidth(),o=i=>{if(i!==this._element&&window.innerWidth>i.clientWidth+r)return;this._saveInitialAttribute(i,n);const a=window.getComputedStyle(i).getPropertyValue(n);i.style.setProperty(n,`${s(Number.parseFloat(a))}px`)};this._applyManipulationCallback(t,o)}_saveInitialAttribute(t,n){const s=t.style.getPropertyValue(n);s&&b.setDataAttribute(t,n,s)}_resetElementAttributes(t,n){const s=r=>{const o=b.getDataAttribute(r,n);if(o===null){r.style.removeProperty(n);return}b.removeDataAttribute(r,n),r.style.setProperty(n,o)};this._applyManipulationCallback(t,s)}_applyManipulationCallback(t,n){if(m(t)){n(t);return}for(const s of p.find(t,this._element))n(s)}}const Zt=/^aria-[\w-]*$/i,it={"*":["class","dir","id","lang","role",Zt],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},te=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),ee=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,ne=(e,t)=>{const n=e.nodeName.toLowerCase();return t.includes(n)?te.has(n)?!!ee.test(e.nodeValue):!0:t.filter(s=>s instanceof RegExp).some(s=>s.test(n))};function se(e,t,n){if(!e.length)return e;if(n&&typeof n=="function")return n(e);const r=new window.DOMParser().parseFromString(e,"text/html"),o=[].concat(...r.body.querySelectorAll("*"));for(const i of o){const a=i.nodeName.toLowerCase();if(!Object.keys(t).includes(a)){i.remove();continue}const u=[].concat(...i.attributes),d=[].concat(t["*"]||[],t[a]||[]);for(const l of u)ne(l,d)||i.removeAttribute(l.nodeName)}return r.body.innerHTML}const re="TemplateFactory",ie={allowList:it,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},oe={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ae={entry:"(string|element|function|null)",selector:"(string|element)"};class ce extends T{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return ie}static get DefaultType(){return oe}static get NAME(){return re}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[r,o]of Object.entries(this._config.content))this._setContent(t,o,r);const n=t.children[0],s=this._resolvePossibleFunction(this._config.extraClass);return s&&n.classList.add(...s.split(" ")),n}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[n,s]of Object.entries(t))super._typeCheckConfig({selector:n,entry:s},ae)}_setContent(t,n,s){const r=p.findOne(s,t);if(r){if(n=this._resolvePossibleFunction(n),!n){r.remove();return}if(m(n)){this._putElementInTemplate(y(n),r);return}if(this._config.html){r.innerHTML=this._maybeSanitize(n);return}r.textContent=n}}_maybeSanitize(t){return this._config.sanitize?se(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return f(t,[this])}_putElementInTemplate(t,n){if(this._config.html){n.innerHTML="",n.append(t);return}n.textContent=t.textContent}}export{Dt as B,it as D,c as E,Jt as F,b as M,p as S,ce as T,I as a,gt as b,y as c,mt as d,wt as e,v as f,pt as g,m as h,F as i,f as j,Gt as k,jt as l,V as m,dt as n,lt as o,K as r,x as t};