f0ckv2/public/s/js/bootstrap-native.min.js

3 lines
31 KiB
JavaScript
Raw Normal View History

2021-03-03 04:34:57 +00:00
// Native JavaScript for Bootstrap v3.0.14f | 2021 © dnp_theme | MIT-License
!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).BSN=e()}(this,(function(){"use strict";var t="webkitTransition"in document.head.style?"webkitTransitionEnd":"transitionend",e="webkitTransition"in document.head.style||"transition"in document.head.style,i="webkitTransition"in document.head.style?"webkitTransitionDuration":"transitionDuration",n="webkitTransition"in document.head.style?"webkitTransitionProperty":"transitionProperty";function o(t){var o=getComputedStyle(t),a=o[n],s=o[i],l=s.includes("ms")?1:1e3,c=e&&a&&"none"!==a?parseFloat(s)*l:0;return isNaN(c)?0:c}function a(e,i){var n=0,a=new Event(t),s=o(e);s?(e.addEventListener(t,(function o(a){a.target===e&&(i.apply(e,[a]),e.removeEventListener(t,o),n=1)})),setTimeout((function(){!n&&e.dispatchEvent(a)}),s+17)):i.apply(e,[a])}function s(t,e){var i=e&&e instanceof Element?e:document;return t instanceof Element?t:i.querySelector(t)}function l(t,e,i){var n=new CustomEvent(t+".bs."+e,{cancelable:!0});return void 0!==i&&Object.keys(i).forEach((function(t){Object.defineProperty(n,t,{value:i[t]})})),n}function c(t){this&&this.dispatchEvent(t)}function r(t){var e,i=this,n=l("close","alert"),o=l("closed","alert");function r(e){t[e=e?"addEventListener":"removeEventListener"]("click",d,!1)}function d(n){e=n&&n.target.closest(".alert"),(t=s('[data-dismiss="alert"]',e))&&e&&(t===n.target||t.contains(n.target))&&i.close()}function u(){r(),e.parentNode.removeChild(e),c.call(e,o)}i.close=function(){if(e&&t&&e.classList.contains("show")){if(c.call(e,n),n.defaultPrevented)return;i.dispose(),e.classList.remove("show"),e.classList.contains("fade")?a(e,u):u()}},i.dispose=function(){r(),delete t.Alert},t=s(t),e=t.closest(".alert"),t.Alert&&t.Alert.dispose(),t.Alert||r(1),i.element=t,t.Alert=i}function d(t){var e,i=l("change","button");function n(n){var o,a="LABEL"===n.target.tagName?n.target:n.target.closest("LABEL")?n.target.closest("LABEL"):null;if(o=a&&a.getElementsByTagName("INPUT")[0]){if(c.call(o,i),c.call(t,i),"checkbox"===o.type){if(i.defaultPrevented)return;o.checked?(a.classList.remove("active"),o.getAttribute("checked"),o.removeAttribute("checked"),o.checked=!1):(a.classList.add("active"),o.getAttribute("checked"),o.setAttribute("checked","checked"),o.checked=!0),t.toggled||(t.toggled=!0)}if("radio"===o.type&&!t.toggled){if(i.defaultPrevented)return;(!o.checked||0===n.screenX&&0==n.screenY)&&(a.classList.add("active"),a.classList.add("focus"),o.setAttribute("checked","checked"),o.checked=!0,t.toggled=!0,Array.from(e).map((function(t){var e=t.getElementsByTagName("INPUT")[0];t!==a&&t.classList.contains("active")&&(c.call(e,i),t.classList.remove("active"),e.removeAttribute("checked"),e.checked=!1)})))}setTimeout((function(){t.toggled=!1}),50)}}function o(t){32===(t.which||t.keyCode)&&t.target===document.activeElement&&n(t)}function a(t){32===(t.which||t.keyCode)&&t.preventDefault()}function r(t){if("INPUT"===t.target.tagName){var e="focusin"===t.type?"add":"remove";t.target.closest(".btn").classList[e]("focus")}}function d(e){t[e=e?"addEventListener":"removeEventListener"]("click",n,!1),t[e]("keyup",o,!1),t[e]("keydown",a,!1),t[e]("focusin",r,!1),t[e]("focusout",r,!1)}this.dispose=function(){d(),delete t.Button},(t=s(t)).Button&&t.Button.dispose(),(e=t.getElementsByClassName("btn")).length&&(t.Button||d(1),t.toggled=!1,t.Button=this,Array.from(e).map((function(t){!t.classList.contains("active")&&s("input:checked",t)&&t.classList.add("active"),t.classList.contains("active")&&!s("input:checked",t)&&t.classList.remove("active")})))}var u="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],m=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});document.addEventListener("DOMContentLoaded",(function t(){document.removeEventListener("DOMContentLoaded",t,e)}),e)}catch(t){}return t}()&&{passive:!0};function f(t,e){e=e||{};var i,n,r,d,f,h,g,p,v,L=this;function b(){!1===n.interval||t.class