@unlk/keymaster 1.6.4 → 1.6.5
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/CHANGELOG.md +5 -0
- package/dist/css/keymaster.css +4 -4
- package/dist/css/keymaster.css.map +1 -1
- package/dist/css/keymaster.min.css +1 -1
- package/dist/js/keymaster.js +1 -1
- package/dist/js/keymaster.min.js +2 -2
- package/dist/js/keymaster.min.js.map +1 -1
- package/package.json +1 -1
- package/scss/theme/_buttons.scss +8 -11
- package/scss/theme/_version.scss +1 -1
package/dist/js/keymaster.js
CHANGED
package/dist/js/keymaster.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Unlock Keymaster v1.6.
|
|
2
|
+
* Unlock Keymaster v1.6.5 (https://keymaster.unlock.com)
|
|
3
3
|
* Copyright 2022-2026 Unlk Developers
|
|
4
4
|
*/
|
|
5
5
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).keymaster={})}(this,function(e){"use strict";function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})}),n}var i,s={exports:{}},o={exports:{}},r={exports:{}};function a(){return i||(i=1,function(e){e.exports=function(){const e=new Map,t={set(t,n,i){e.has(t)||e.set(t,new Map);const s=e.get(t);(s.has(n)||0===s.size)&&s.set(n,i)},get:(t,n)=>e.has(t)&&e.get(t).get(n)||null,remove(t,n){if(!e.has(t))return;const i=e.get(t);i.delete(n),0===i.size&&e.delete(t)}};return t}()}(r)),r.exports}var l,c={exports:{}},u={exports:{}};function d(){return l||(l=1,function(e,t){!function(e){const t=1e6,n=1e3,i="transitionend",s=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),e),o=e=>null==e?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),r=e=>{do{e+=Math.floor(Math.random()*t)}while(document.getElementById(e));return e},a=e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:i}=window.getComputedStyle(e);const s=Number.parseFloat(t),o=Number.parseFloat(i);return s||o?(t=t.split(",")[0],i=i.split(",")[0],(Number.parseFloat(t)+Number.parseFloat(i))*n):0},l=e=>{e.dispatchEvent(new Event(i))},c=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),u=e=>c(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(s(e)):null,d=e=>{if(!c(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),n=e.closest("details:not([open])");if(!n)return t;if(n!==e){const t=e.closest("summary");if(t&&t.parentNode!==n)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")),f=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?f(e.parentNode):null},p=()=>{},g=e=>{e.offsetHeight},m=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,_=[],b=e=>{"loading"===document.readyState?(_.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of _)e()}),_.push(e)):e()},v=()=>"rtl"===document.documentElement.dir,y=e=>{b(()=>{const t=m();if(t){const n=e.NAME,i=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=i,e.jQueryInterface)}})},w=(e,t=[],n=e)=>"function"==typeof e?e.call(...t):n,E=(e,t,n=!0)=>{if(!n)return void w(e);const s=5,o=a(t)+s;let r=!1;const c=({target:n})=>{n===t&&(r=!0,t.removeEventListener(i,c),w(e))};t.addEventListener(i,c),setTimeout(()=>{r||l(t)},o)},A=(e,t,n,i)=>{const s=e.length;let o=e.indexOf(t);return-1===o?!n&&i?e[s-1]:e[0]:(o+=n?1:-1,i&&(o=(o+s)%s),e[Math.max(0,Math.min(o,s-1))])};e.defineJQueryPlugin=y,e.execute=w,e.executeAfterTransition=E,e.findShadowRoot=f,e.getElement=u,e.getNextActiveElement=A,e.getTransitionDurationFromElement=a,e.getUID=r,e.getjQuery=m,e.isDisabled=h,e.isElement=c,e.isRTL=v,e.isVisible=d,e.noop=p,e.onDOMContentLoaded=b,e.parseSelector=s,e.reflow=g,e.toType=o,e.triggerTransitionEnd=l,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}(t)}(0,u.exports)),u.exports}
|
|
@@ -63,4 +63,4 @@
|
|
|
63
63
|
* Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
|
64
64
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
65
65
|
*/var an;var ln,cn=(an||(an=1,function(e){e.exports=function(e,t){const n="popover",i=".popover-header",s=".popover-body",o={...e.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"},r={...e.DefaultType,content:"(null|string|element|function)"};class a extends e{static get Default(){return o}static get DefaultType(){return r}static get NAME(){return n}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[i]:this._getTitle(),[s]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const t=a.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}})}}return t.defineJQueryPlugin(a),a}(rn(),d())}(Jt)),Jt.exports),un=t(cn),dn={exports:{}};var hn,fn=(ln||(ln=1,function(e){e.exports=function(e,t,n,i){const s="toast",o="bs.toast",r=`.${o}`,a=`mouseover${r}`,l=`mouseout${r}`,c=`focusin${r}`,u=`focusout${r}`,d=`hide${r}`,h=`hidden${r}`,f=`show${r}`,p=`shown${r}`,g="fade",m="hide",_="show",b="showing",v={animation:"boolean",autohide:"boolean",delay:"number"},y={animation:!0,autohide:!0,delay:5e3};class w extends e{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return y}static get DefaultType(){return v}static get NAME(){return s}show(){if(t.trigger(this._element,f).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(g);const e=()=>{this._element.classList.remove(b),t.trigger(this._element,p),this._maybeScheduleHide()};this._element.classList.remove(m),i.reflow(this._element),this._element.classList.add(_,b),this._queueCallback(e,this._element,this._config.animation)}hide(){if(!this.isShown())return;if(t.trigger(this._element,d).defaultPrevented)return;const e=()=>{this._element.classList.add(m),this._element.classList.remove(b,_),t.trigger(this._element,h)};this._element.classList.add(b),this._queueCallback(e,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(_),super.dispose()}isShown(){return this._element.classList.contains(_)}_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 n=e.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){t.on(this._element,a,e=>this._onInteraction(e,!0)),t.on(this._element,l,e=>this._onInteraction(e,!1)),t.on(this._element,c,e=>this._onInteraction(e,!0)),t.on(this._element,u,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const t=w.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}})}}return n.enableDismissTrigger(w),i.defineJQueryPlugin(w),w}(w(),f(),C(),d())}(dn)),dn.exports),pn=t(fn),gn={exports:{}};var mn=(hn||(hn=1,function(e){e.exports=function(e,t,n,i){const s="tab",o="bs.tab",r=`.${o}`,a=`hide${r}`,l=`hidden${r}`,c=`show${r}`,u=`shown${r}`,d=`click${r}`,h=`keydown${r}`,f=`load${r}`,p="ArrowLeft",g="ArrowRight",m="ArrowUp",_="ArrowDown",b="Home",v="End",y="active",w="fade",E="show",A="dropdown",x=".dropdown-toggle",T=".dropdown-menu",O=`:not(${x})`,C='.list-group, .nav, [role="tablist"]',S=".nav-item, .list-group-item",k=`.nav-link${O}, .list-group-item${O}, [role="tab"]${O}`,D='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',L=`${k}, ${D}`,P=`.${y}[data-bs-toggle="tab"], .${y}[data-bs-toggle="pill"], .${y}[data-bs-toggle="list"]`;class $ extends e{constructor(e){super(e),this._parent=this._element.closest(C),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),t.on(this._element,h,e=>this._keydown(e)))}static get NAME(){return s}show(){const e=this._element;if(this._elemIsActive(e))return;const n=this._getActiveElem(),i=n?t.trigger(n,a,{relatedTarget:e}):null;t.trigger(e,c,{relatedTarget:n}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(n,e),this._activate(e,n))}_activate(e,i){if(!e)return;e.classList.add(y),this._activate(n.getElementFromSelector(e));const s=()=>{"tab"===e.getAttribute("role")?(e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),t.trigger(e,u,{relatedTarget:i})):e.classList.add(E)};this._queueCallback(s,e,e.classList.contains(w))}_deactivate(e,i){if(!e)return;e.classList.remove(y),e.blur(),this._deactivate(n.getElementFromSelector(e));const s=()=>{"tab"===e.getAttribute("role")?(e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),t.trigger(e,l,{relatedTarget:i})):e.classList.remove(E)};this._queueCallback(s,e,e.classList.contains(w))}_keydown(e){if(![p,g,m,_,b,v].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=this._getChildren().filter(e=>!i.isDisabled(e));let n;if([b,v].includes(e.key))n=t[e.key===b?0:t.length-1];else{const s=[g,_].includes(e.key);n=i.getNextActiveElement(t,e.target,s,!0)}n&&(n.focus({preventScroll:!0}),$.getOrCreateInstance(n).show())}_getChildren(){return n.find(L,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),n=this._getOuterElement(e);e.setAttribute("aria-selected",t),n!==e&&this._setAttributeIfNotExists(n,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=n.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(A))return;const s=(e,s)=>{const o=n.findOne(e,i);o&&o.classList.toggle(s,t)};s(x,y),s(T,E),i.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,n){e.hasAttribute(t)||e.setAttribute(t,n)}_elemIsActive(e){return e.classList.contains(y)}_getInnerElement(e){return e.matches(L)?e:n.findOne(L,e)}_getOuterElement(e){return e.closest(S)||e}static jQueryInterface(e){return this.each(function(){const t=$.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}})}}return t.on(document,d,D,function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),i.isDisabled(this)||$.getOrCreateInstance(this).show()}),t.on(window,f,()=>{for(const e of n.find(P))$.getOrCreateInstance(e)}),i.defineJQueryPlugin($),$}(w(),f(),T(),d())}(gn)),gn.exports),_n=t(mn),bn=t(rn());const vn=new Map;var yn={set(e,t,n){vn.has(e)||vn.set(e,new Map);const i=vn.get(e);(i.has(t)||0===i.size)&&i.set(t,n)},get:(e,t)=>vn.has(e)&&vn.get(e).get(t)||null,remove(e,t){if(!vn.has(e))return;const n=vn.get(e);n.delete(t),0===n.size&&vn.delete(e)}};const wn="transitionend",En=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),e),An=e=>null==e?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),xn=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),Tn=e=>xn(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(En(e)):null,On=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Cn=[],Sn=e=>{var t;t=()=>{const t=On();if(t){const n=e.NAME,i=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=i,e.jQueryInterface)}},"loading"===document.readyState?(Cn.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of Cn)e()}),Cn.push(t)):t()},kn=(e,t=[],n=e)=>"function"==typeof e?e.call(...t):n,Dn=(e,t,n=!0)=>{if(!n)return void kn(e);const i=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const i=Number.parseFloat(t),s=Number.parseFloat(n);return i||s?(t=t.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(n))):0})(t)+5;let s=!1;const o=({target:n})=>{n===t&&(s=!0,t.removeEventListener(wn,o),kn(e))};t.addEventListener(wn,o),setTimeout(()=>{s||t.dispatchEvent(new Event(wn))},i)},Ln=/[^.]*(?=\..*)\.|.*/,Pn=/\..*/,$n=/::\d+$/,In={};let jn=1;const Nn={mouseenter:"mouseover",mouseleave:"mouseout"},Mn=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 Fn(e,t){return t&&`${t}::${jn++}`||e.uidEvent||jn++}function Hn(e){const t=Fn(e);return e.uidEvent=t,In[t]=In[t]||{},In[t]}function Rn(e,t,n=null){return Object.values(e).find(e=>e.callable===t&&e.delegationSelector===n)}function Wn(e,t,n){const i="string"==typeof t,s=i?n:t||n;let o=Bn(e);return Mn.has(o)||(o=e),[i,s,o]}function zn(e,t,n,i,s){if("string"!=typeof t||!e)return;let[o,r,a]=Wn(t,n,i);if(t in Nn){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=Hn(e),c=l[a]||(l[a]={}),u=Rn(c,r,o?n:null);if(u)return void(u.oneOff=u.oneOff&&s);const d=Fn(r,t.replace(Ln,"")),h=o?function(e,t,n){return function i(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 Yn(s,{delegateTarget:r}),i.oneOff&&Qn.off(e,s.type,t,n),n.apply(r,[s])}}(e,n,r):function(e,t){return function n(i){return Yn(i,{delegateTarget:e}),n.oneOff&&Qn.off(e,i.type,t),t.apply(e,[i])}}(e,r);h.delegationSelector=o?n:null,h.callable=r,h.oneOff=s,h.uidEvent=d,c[d]=h,e.addEventListener(a,h,o)}function Vn(e,t,n,i,s){const o=Rn(t[n],i,s);o&&(e.removeEventListener(n,o,Boolean(s)),delete t[n][o.uidEvent])}function qn(e,t,n,i){const s=t[n]||{};for(const[o,r]of Object.entries(s))o.includes(i)&&Vn(e,t,n,r.callable,r.delegationSelector)}function Bn(e){return e=e.replace(Pn,""),Nn[e]||e}const Qn={on(e,t,n,i){zn(e,t,n,i,!1)},one(e,t,n,i){zn(e,t,n,i,!0)},off(e,t,n,i){if("string"!=typeof t||!e)return;const[s,o,r]=Wn(t,n,i),a=r!==t,l=Hn(e),c=l[r]||{},u=t.startsWith(".");if(void 0===o){if(u)for(const n of Object.keys(l))qn(e,l,n,t.slice(1));for(const[n,i]of Object.entries(c)){const s=n.replace($n,"");a&&!t.includes(s)||Vn(e,l,r,i.callable,i.delegationSelector)}}else{if(!Object.keys(c).length)return;Vn(e,l,r,o,s?n:null)}},trigger(e,t,n){if("string"!=typeof t||!e)return null;const i=On();let s=null,o=!0,r=!0,a=!1;t!==Bn(t)&&i&&(s=i.Event(t,n),i(e).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());const l=Yn(new Event(t,{bubbles:o,cancelable:!0}),n);return a&&l.preventDefault(),r&&e.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function Yn(e,t={}){for(const[n,i]of Object.entries(t))try{e[n]=i}catch{Object.defineProperty(e,n,{configurable:!0,get:()=>i})}return e}function Kn(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{return e}}function Un(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const Xn={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${Un(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${Un(t)}`)},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter(e=>e.startsWith("bs")&&!e.startsWith("bsConfig"));for(const i of n){let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1),t[n]=Kn(e.dataset[i])}return t},getDataAttribute:(e,t)=>Kn(e.getAttribute(`data-bs-${Un(t)}`))};class Jn{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 n=xn(t)?Xn.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...xn(t)?Xn.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[n,i]of Object.entries(t)){const t=e[n],s=xn(t)?"element":An(t);if(!new RegExp(i).test(s))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${s}" but expected type "${i}".`)}}}class Gn extends Jn{constructor(e,t){super(),(e=Tn(e))&&(this._element=e,this._config=this._getConfig(t),yn.set(this._element,this.constructor.DATA_KEY,this))}dispose(){yn.remove(this._element,this.constructor.DATA_KEY),Qn.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,n=!0){Dn(e,t,n)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return yn.get(Tn(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.3.8"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const Zn='[data-bs-toggle="datepicker"]';class ei extends Gn{static get NAME(){return"datepicker"}static jQueryInterface(e){return this.each(function(){const t=ei.getOrCreateInstance(this);"toggle"===e&&t[e]()})}}Qn.on(document,"focus.bs.datepicker.data-api",Zn,e=>{const t=e.target.closest(Zn);if("ontouchstart"in globalThis||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0){const e=t.cloneNode(!0);e.type="date",e.removeAttribute("data-bs-toggle"),t.parentNode.prepend(e),e.focus(),e.showPicker(),t.remove(),e.addEventListener("blur",function n(){e.value||(e.parentNode.prepend(t),e.remove(),e.removeEventListener("blur",n))})}else t.type="date",t.addEventListener("blur",function e(){t.value||(t.type="text"),t.removeEventListener("blur",e)})}),Sn(ei);const ti=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?n.trim():null}return t?t.split(",").map(e=>En(e)).join(","):null},ni={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 n=[];let i=e.parentNode.closest(t);for(;i;)n.push(i),i=i.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(e=>`${e}:not([tabindex^="-"])`).join(",");return this.find(t,e).filter(e=>!(e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")))(e)&&(e=>{if(!xn(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),n=e.closest("details:not([open])");if(!n)return t;if(n!==e){const t=e.closest("summary");if(t&&t.parentNode!==n)return!1;if(null===t)return!1}return t})(e))},getSelectorFromElement(e){const t=ti(e);return t&&ni.findOne(t)?t:null},getElementFromSelector(e){const t=ti(e);return t?ni.findOne(t):null},getMultipleElementsFromSelector(e){const t=ti(e);return t?ni.find(t):[]}},ii=new WeakMap;class si{constructor(e){this._element=e,this._captionEl=e.querySelector(".carousel-caption-container p")||null,this._updateCaption(),ii.set(e,this)}_updateCaption(){if(!this._captionEl)return;const e=ni.findOne(".carousel-item.active",this._element);this._captionEl.textContent=e?.getAttribute("data-caption")??""}static getOrCreateInstance(e){return ii.get(e)||new si(e)}}Qn.on(document,"slid.bs.carousel",".carousel",function(){si.getOrCreateInstance(this)._updateCaption()});const oi="slide.bs.carousel",ri="slid.bs.carousel",ai=new WeakMap;class li{constructor(e){this._element=e,this._inner=ni.findOne(".carousel-inner",e),this._inner&&this._bindEvents(),ai.set(e,this)}dispose(){Qn.off(this._element,oi),Qn.off(this._element,ri),ai.delete(this._element)}_bindEvents(){Qn.on(this._element,oi,e=>this._onSlide(e)),Qn.on(this._element,ri,()=>this._onSlid())}_onSlide(e){const t=e.relatedTarget;t&&(this._inner.style.height=`${this._inner.offsetHeight}px`,requestAnimationFrame(()=>{this._inner.style.height=`${t.offsetHeight}px`}))}_onSlid(){this._inner.style.height=""}static getOrCreateInstance(e){return ai.get(e)||new li(e)}}document.addEventListener("DOMContentLoaded",()=>{for(const e of ni.find(".carousel"))li.getOrCreateInstance(e)});const ci=".modal",ui=".modal-dialog-media",di=new Promise(e=>{if(globalThis.YT?.Player)e();else{const t=globalThis.onYouTubeIframeAPIReady;globalThis.onYouTubeIframeAPIReady=()=>{try{"function"==typeof t&&t()}catch{}e()};const n=document.createElement("script");n.src="https://www.youtube.com/iframe_api",document.head.append(n)}}),hi=new Promise(e=>{if(globalThis.Vimeo?.Player)e();else{const t=document.createElement("script");t.src="https://player.vimeo.com/api/player.js",t.addEventListener("load",()=>{e()}),document.head.append(t)}});class fi extends Gn{constructor(e){super(e),this._dialog=ni.findOne(ui,this._element),this._container=ni.findOne(".ratio",this._element),this._youtubeSrc=this._container?.getAttribute("data-src"),this._vimeoUrl=this._container?.getAttribute("data-vimeo-url"),this._youtubePlayer=null,this._vimeoPlayer=null}dispose(){this._onHide(),super.dispose()}async _onShow(){const{id:e}=this._element,t=`video-${e}-youtube-player`;if(this._vimeoUrl){await hi;const e=this._getVimeoId(this._vimeoUrl);return this._vimeoPlayer=new globalThis.Vimeo.Player(this._container,{id:e,autoplay:!0}),this._element.dataset.vimeoId=String(e),this._element.__unlkVimeoPlayer=this._vimeoPlayer,void this._element.dispatchEvent(new CustomEvent("videomodal.ready",{bubbles:!0,detail:{provider:"vimeo",player:this._vimeoPlayer,videoId:e}}))}if(this._youtubeSrc){await di;const e=this._getYouTubeId(this._youtubeSrc),n=this._container.querySelector(`#${t}`);this._youtubePlayer=new globalThis.YT.Player(n,{videoId:e,playerVars:{autoplay:1,rel:0}}),this._element.dataset.ytId=e,this._element.__unlkYtPlayer=this._youtubePlayer,this._element.dispatchEvent(new CustomEvent("videomodal.ready",{bubbles:!0,detail:{provider:"youtube",player:this._youtubePlayer,videoId:e}}))}}_onHide(){this._vimeoPlayer&&(this._vimeoPlayer.unload().catch(()=>{}),this._vimeoPlayer=null),this._youtubePlayer&&(this._youtubePlayer.destroy(),this._youtubePlayer=null),delete this._element.__unlkYtPlayer,delete this._element.dataset.ytId,delete this._element.__unlkVimeoPlayer,delete this._element.dataset.vimeoId}_getYouTubeId(e){const t=e.match(/(?:youtube\.com\/(?:watch\?v=|embed\/|v\/)|youtu\.be\/)([\w-]{11})/);return t?t[1]:""}_getVimeoId(e){const t=e.match(/vimeo\.com\/(\d+)/);return t?t[1]:""}static get NAME(){return"videoModal"}static jQueryInterface(e){return this.each(function(){fi.getOrCreateInstance(this,e)})}}Qn.on(document,"show.bs.modal",ci,function(){ni.findOne(ui,this)&&fi.getOrCreateInstance(this)._onShow()}),Qn.on(document,"hidden.bs.modal",ci,function(){ni.findOne(ui,this)&&fi.getOrCreateInstance(this)._onHide()}),Sn(fi);class pi extends Gn{_onShown(e){const t=e.target.closest(".accordion-item");if(!t)return;const n=ni.findOne(".accordion-header",t);if(!n)return;n.getBoundingClientRect().top<0&&n.scrollIntoView({behavior:"smooth",block:"start"})}static get NAME(){return"accordionScroll"}static jQueryInterface(e){return this.each(function(){pi.getOrCreateInstance(this,e)})}}Qn.on(document,"shown.bs.collapse",".accordion",function(e){pi.getOrCreateInstance(this)._onShown(e)}),Sn(pi),e.AccordionScroll=pi,e.Alert=L,e.Button=W,e.Carousel=F,e.CarouselCaption=si,e.CarouselHeight=li,e.Collapse=kt,e.Datepicker=ei,e.Dropdown=Tt,e.Modal=Qt,e.Offcanvas=zt,e.Popover=un,e.Scrollspy=Xt,e.Tab=_n,e.Toast=pn,e.Tooltip=bn,e.VideoModal=fi});
|
|
66
|
-
//# sourceMappingURL=
|
|
66
|
+
//# sourceMappingURL=keymaster.min.js.map
|