mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-12-04 23:43:45 +03:00
ece12ebe34
generated from commit 6821b53b3a
1 line
34 KiB
JavaScript
1 line
34 KiB
JavaScript
(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?t(require('bootstrap/js/src/alert'),require('bootstrap/js/src/button'),require('bootstrap/js/src/carousel'),require('bootstrap/js/src/collapse'),require('bootstrap/js/src/modal'),require('bootstrap/js/src/popover'),require('bootstrap/js/src/scrollspy'),require('bootstrap/js/src/tab'),require('bootstrap/js/src/tooltip'),require('bootstrap/js/src/util')):'function'==typeof define&&define.amd?define(['bootstrap/js/src/alert','bootstrap/js/src/button','bootstrap/js/src/carousel','bootstrap/js/src/collapse','bootstrap/js/src/modal','bootstrap/js/src/popover','bootstrap/js/src/scrollspy','bootstrap/js/src/tab','bootstrap/js/src/tooltip','bootstrap/js/src/util'],t):t(null,null,null,null,null,null,null,null,null,e.Util)})(this,function(e,t,n,o,r,a,l,s,i,d){'use strict';function c(e,t){for(var n,o=0;o<t.length;o++)n=t[o],n.enumerable=n.enumerable||!1,n.configurable=!0,'value'in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}function p(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function u(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}d=d&&d.hasOwnProperty('default')?d['default']:d;var m=function(){function e(){if(window.QUnit)return!1;var e=document.createElement('bmd');for(var t in o)if(void 0!==e.style[t])return o[t];return!1}var t=!1,n='',o={WebkitTransition:'webkitTransitionEnd',MozTransition:'transitionend',OTransition:'oTransitionEnd otransitionend',transition:'transitionend'};return function(){for(var r in t=e(),o)n+=' '+o[r]}(),{transitionEndSupported:function(){return t},transitionEndSelector:function(){return n},isChar:function(e){return!('undefined'!=typeof e.which)||'number'==typeof e.which&&0<e.which&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&8!==e.which&&9!==e.which&&13!==e.which&&16!==e.which&&17!==e.which&&20!==e.which&&27!==e.which},assert:function(e,t,n){if(t)throw void 0===!e&&e.css('border','1px solid red'),console.error(n,e),n},describe:function(e){return void 0===e?'undefined':0===e.length?'(no matching elements)':e[0].outerHTML.split('>')[0]+'>'}}}(jQuery),f=function(e){var t={BMD_FORM_GROUP:'bmd-form-group',IS_FILLED:'is-filled',IS_FOCUSED:'is-focused'},n={BMD_FORM_GROUP:'.'+t.BMD_FORM_GROUP},o={},r=function(){function r(t,n,r){for(var a in void 0===r&&(r={}),this.$element=t,this.config=e.extend(!0,{},o,n),r)this[a]=r[a]}var a=r.prototype;return a.dispose=function(e){this.$element.data(e,null),this.$element=null,this.config=null},a.addFormGroupFocus=function(){this.$element.prop('disabled')||this.$bmdFormGroup.addClass(t.IS_FOCUSED)},a.removeFormGroupFocus=function(){this.$bmdFormGroup.removeClass(t.IS_FOCUSED)},a.removeIsFilled=function(){this.$bmdFormGroup.removeClass(t.IS_FILLED)},a.addIsFilled=function(){this.$bmdFormGroup.addClass(t.IS_FILLED)},a.findMdbFormGroup=function(t){void 0===t&&(t=!0);var o=this.$element.closest(n.BMD_FORM_GROUP);return 0===o.length&&t&&e.error('Failed to find '+n.BMD_FORM_GROUP+' for '+m.describe(this.$element)),o},r}();return r}(jQuery),_=function(e){var t={FORM_GROUP:'form-group',BMD_FORM_GROUP:'bmd-form-group',BMD_LABEL:'bmd-label',BMD_LABEL_STATIC:'bmd-label-static',BMD_LABEL_PLACEHOLDER:'bmd-label-placeholder',BMD_LABEL_FLOATING:'bmd-label-floating',HAS_DANGER:'has-danger',IS_FILLED:'is-filled',IS_FOCUSED:'is-focused',INPUT_GROUP:'input-group'},n={FORM_GROUP:'.'+t.FORM_GROUP,BMD_FORM_GROUP:'.'+t.BMD_FORM_GROUP,BMD_LABEL_WILDCARD:'label[class^=\''+t.BMD_LABEL+'\'], label[class*=\' '+t.BMD_LABEL+'\']'},o={validate:!1,formGroup:{required:!1},bmdFormGroup:{template:'<span class=\''+t.BMD_FORM_GROUP+'\'></span>',create:!0,required:!0},label:{required:!1,selectors:['.form-control-label','> label'],className:t.BMD_LABEL_STATIC},requiredClasses:[],invalidComponentMatches:[],convertInputSizeVariations:!0},r={"form-control-lg":'bmd-form-group-lg',"form-control-sm":'bmd-form-group-sm'},a=function(a){function l(t,n,r){var l;return void 0===r&&(r={}),l=a.call(this,t,e.extend(!0,{},o,n),r)||this,l._rejectInvalidComponentMatches(),l.rejectWithoutRequiredStructure(),l._rejectWithoutRequiredClasses(),l.$formGroup=l.findFormGroup(l.config.formGroup.required),l.$bmdFormGroup=l.resolveMdbFormGroup(),l.$bmdLabel=l.resolveMdbLabel(),l.resolveMdbFormGroupSizing(),l.addFocusListener(),l.addChangeListener(),''!=l.$element.val()&&l.addIsFilled(),l}u(l,a);var s=l.prototype;return s.dispose=function(e){a.prototype.dispose.call(this,e),this.$bmdFormGroup=null,this.$formGroup=null},s.rejectWithoutRequiredStructure=function(){},s.addFocusListener=function(){var e=this;this.$element.on('focus',function(){e.addFormGroupFocus()}).on('blur',function(){e.removeFormGroupFocus()})},s.addChangeListener=function(){var e=this;this.$element.on('keydown paste',function(t){m.isChar(t)&&e.addIsFilled()}).on('keyup change',function(){if(e.isEmpty()?e.removeIsFilled():e.addIsFilled(),e.config.validate){var t='undefined'==typeof e.$element[0].checkValidity||e.$element[0].checkValidity();t?e.removeHasDanger():e.addHasDanger()}})},s.addHasDanger=function(){this.$bmdFormGroup.addClass(t.HAS_DANGER)},s.removeHasDanger=function(){this.$bmdFormGroup.removeClass(t.HAS_DANGER)},s.isEmpty=function(){return null===this.$element.val()||void 0===this.$element.val()||''===this.$element.val()},s.resolveMdbFormGroup=function(){var e=this.findMdbFormGroup(!1);return(void 0===e||0===e.length)&&(this.config.bmdFormGroup.create&&(void 0===this.$formGroup||0===this.$formGroup.length)?this.outerElement().parent().hasClass(t.INPUT_GROUP)?this.outerElement().parent().wrap(this.config.bmdFormGroup.template):this.outerElement().wrap(this.config.bmdFormGroup.template):this.$formGroup.addClass(t.BMD_FORM_GROUP),e=this.findMdbFormGroup(this.config.bmdFormGroup.required)),e},s.outerElement=function(){return this.$element},s.resolveMdbLabel=function(){var e=this.$bmdFormGroup.find(n.BMD_LABEL_WILDCARD);return(void 0===e||0===e.length)&&(e=this.findMdbLabel(this.config.label.required),void 0===e||0===e.length||e.addClass(this.config.label.className)),e},s.findMdbLabel=function(t){void 0===t&&(t=!0);for(var o=null,r=this.config.label.selectors,a=Array.isArray(r),l=0,r=a?r:r[Symbol.iterator]();;){var s;if(a){if(l>=r.length)break;s=r[l++]}else{if(l=r.next(),l.done)break;s=l.value}var i=s;if(o=e.isFunction(i)?i(this):this.$bmdFormGroup.find(i),void 0!==o&&0<o.length)break}return 0===o.length&&t&&e.error('Failed to find '+n.BMD_LABEL_WILDCARD+' within form-group for '+m.describe(this.$element)),o},s.findFormGroup=function(t){void 0===t&&(t=!0);var o=this.$element.closest(n.FORM_GROUP);return 0===o.length&&t&&e.error('Failed to find '+n.FORM_GROUP+' for '+m.describe(this.$element)),o},s.resolveMdbFormGroupSizing=function(){if(this.config.convertInputSizeVariations)for(var e in r)this.$element.hasClass(e)&&this.$bmdFormGroup.addClass(r[e])},s._rejectInvalidComponentMatches=function(){for(var e=this.config.invalidComponentMatches,t=Array.isArray(e),n=0,e=t?e:e[Symbol.iterator]();;){var o;if(t){if(n>=e.length)break;o=e[n++]}else{if(n=e.next(),n.done)break;o=n.value}var r=o;r.rejectMatch(this.constructor.name,this.$element)}},s._rejectWithoutRequiredClasses=function(){for(var e=this.config.requiredClasses,t=Array.isArray(e),n=0,e=t?e:e[Symbol.iterator]();;){var o;if(t){if(n>=e.length)break;o=e[n++]}else{if(n=e.next(),n.done)break;o=n.value}var r=o;if(-1!==r.indexOf('||'))for(var a=r.split('||'),l=a,s=Array.isArray(l),i=0,l=s?l:l[Symbol.iterator]();;){var d;if(s){if(i>=l.length)break;d=l[i++]}else{if(i=l.next(),i.done)break;d=i.value}var c=d;if(this.$element.hasClass(c))break}else if(this.$element.hasClass(r));}},l}(f);return a}(jQuery),E=function(e){var t={label:{required:!1}},n={LABEL:'label'},o=function(o){function r(n,r,a){var l;return l=o.call(this,n,e.extend(!0,{},t,r),a)||this,l.decorateMarkup(),l}u(r,o);var a=r.prototype;return a.decorateMarkup=function(){var t=e(this.config.template);this.$element.after(t),!1!==this.config.ripples&&t.bmdRipples()},a.outerElement=function(){return this.$element.parent().closest('.'+this.outerClass)},a.rejectWithoutRequiredStructure=function(){m.assert(this.$element,'label'===!this.$element.parent().prop('tagName'),this.constructor.name+'\'s '+m.describe(this.$element)+' parent element should be <label>.'),m.assert(this.$element,!this.outerElement().hasClass(this.outerClass),this.constructor.name+'\'s '+m.describe(this.$element)+' outer element should have class '+this.outerClass+'.')},a.addFocusListener=function(){var e=this;this.$element.closest(n.LABEL).hover(function(){e.addFormGroupFocus()},function(){e.removeFormGroupFocus()})},a.addChangeListener=function(){var e=this;this.$element.change(function(){e.$element.blur()})},r}(_);return o}(jQuery),h=function(e){var t='checkbox',n='bmd.'+t,o='bmd'+(t.charAt(0).toUpperCase()+t.slice(1)),r=e.fn[o],a={template:'<span class=\'checkbox-decorator\'><span class=\'check\'></span></span>'},l=function(o){function r(n,r,l){return void 0===l&&(l={inputType:t,outerClass:t}),o.call(this,n,e.extend(!0,a,r),l)||this}u(r,o);var l=r.prototype;return l.dispose=function(e){void 0===e&&(e=n),o.prototype.dispose.call(this,e)},r.matches=function(e){return'checkbox'===e.attr('type')},r.rejectMatch=function(e,t){m.assert(this.$element,this.matches(t),e+' component element '+m.describe(t)+' is invalid for type=\'checkbox\'.')},r._jQueryInterface=function(t){return this.each(function(){var o=e(this),a=o.data(n);a||(a=new r(o,t),o.data(n,a))})},r}(E);return e.fn[o]=l._jQueryInterface,e.fn[o].Constructor=l,e.fn[o].noConflict=function(){return e.fn[o]=r,l._jQueryInterface},l}(jQuery),g=function(e){var t='checkboxInline',n='bmd.'+t,o='bmd'+(t.charAt(0).toUpperCase()+t.slice(1)),r=e.fn[o],a={bmdFormGroup:{create:!1,required:!1}},l=function(t){function o(n,o,r){return void 0===r&&(r={inputType:'checkbox',outerClass:'checkbox-inline'}),t.call(this,n,e.extend(!0,{},a,o),r)||this}u(o,t);var r=o.prototype;return r.dispose=function(){t.prototype.dispose.call(this,n)},o._jQueryInterface=function(t){return this.each(function(){var r=e(this),a=r.data(n);a||(a=new o(r,t),r.data(n,a))})},o}(h);return e.fn[o]=l._jQueryInterface,e.fn[o].Constructor=l,e.fn[o].noConflict=function(){return e.fn[o]=r,l._jQueryInterface},l}(jQuery),b=function(e){var t='collapseInline',n='bmd.'+t,o='bmd'+(t.charAt(0).toUpperCase()+t.slice(1)),r=e.fn[o],a={ANY_INPUT:'input, select, textarea'},l={IN:'in',COLLAPSE:'collapse',COLLAPSING:'collapsing',COLLAPSED:'collapsed',WIDTH:'width'},s={},i=function(t){function o(n,o){var r;r=t.call(this,n,e.extend(!0,{},s,o))||this,r.$bmdFormGroup=r.findMdbFormGroup(!0);var i=n.data('target');r.$collapse=e(i),m.assert(n,0===r.$collapse.length,'Cannot find collapse target for '+m.describe(n)),m.assert(r.$collapse,!r.$collapse.hasClass(l.COLLAPSE),m.describe(r.$collapse)+' is expected to have the \''+l.COLLAPSE+'\' class. It is being targeted by '+m.describe(n));var d=r.$bmdFormGroup.find(a.ANY_INPUT);return 0<d.length&&(r.$input=d.first()),r.$collapse.hasClass(l.WIDTH)||r.$collapse.addClass(l.WIDTH),r.$input&&(r.$collapse.on('shown.bs.collapse',function(){r.$input.focus()}),r.$input.blur(function(){r.$collapse.collapse('hide')})),r}u(o,t);var r=o.prototype;return r.dispose=function(){t.prototype.dispose.call(this,n),this.$bmdFormGroup=null,this.$collapse=null,this.$input=null},o._jQueryInterface=function(t){return this.each(function(){var r=e(this),a=r.data(n);a||(a=new o(r,t),r.data(n,a))})},o}(f);return e.fn[o]=i._jQueryInterface,e.fn[o].Constructor=i,e.fn[o].noConflict=function(){return e.fn[o]=r,i._jQueryInterface},i}(jQuery),A=function(e){var t='file',n='bmd.'+t,o='bmd'+(t.charAt(0).toUpperCase()+t.slice(1)),r=e.fn[o],a={},l={FILE:t,IS_FILE:'is-file'},s={FILENAMES:'input.form-control[readonly]'},i=function(t){function o(n,o){var r;return r=t.call(this,n,e.extend(!0,a,o))||this,r.$bmdFormGroup.addClass(l.IS_FILE),r}u(o,t);var r=o.prototype;return r.dispose=function(){t.prototype.dispose.call(this,n)},o.matches=function(e){return'file'===e.attr('type')},o.rejectMatch=function(e,t){m.assert(this.$element,this.matches(t),e+' component element '+m.describe(t)+' is invalid for type=\'file\'.')},r.outerElement=function(){return this.$element.parent().closest('.'+l.FILE)},r.rejectWithoutRequiredStructure=function(){m.assert(this.$element,'label'===!this.outerElement().prop('tagName'),this.constructor.name+'\'s '+m.describe(this.$element)+' parent element '+m.describe(this.outerElement())+' should be <label>.'),m.assert(this.$element,!this.outerElement().hasClass(l.FILE),this.constructor.name+'\'s '+m.describe(this.$element)+' parent element '+m.describe(this.outerElement())+' should have class .'+l.FILE+'.')},r.addFocusListener=function(){var e=this;this.$bmdFormGroup.on('focus',function(){e.addFormGroupFocus()}).on('blur',function(){e.removeFormGroupFocus()})},r.addChangeListener=function(){var t=this;this.$element.on('change',function(){var n='';e.each(t.$element.files,function(e,t){n+=t.name+' , '}),n=n.substring(0,n.length-2),n?t.addIsFilled():t.removeIsFilled(),t.$bmdFormGroup.find(s.FILENAMES).val(n)})},o._jQueryInterface=function(t){return this.each(function(){var r=e(this),a=r.data(n);a||(a=new o(r,t),r.data(n,a))})},o}(_);return e.fn[o]=i._jQueryInterface,e.fn[o].Constructor=i,e.fn[o].noConflict=function(){return e.fn[o]=r,i._jQueryInterface},i}(jQuery),C=function(e){var t='radio',n='bmd.'+t,o='bmd'+(t.charAt(0).toUpperCase()+t.slice(1)),r=e.fn[o],a={template:'<span class=\'bmd-radio\'></span>'},l=function(o){function r(n,r,l){return void 0===l&&(l={inputType:t,outerClass:t}),o.call(this,n,e.extend(!0,a,r),l)||this}u(r,o);var l=r.prototype;return l.dispose=function(e){void 0===e&&(e=n),o.prototype.dispose.call(this,e)},r.matches=function(e){return'radio'===e.attr('type')},r.rejectMatch=function(e,t){m.assert(this.$element,this.matches(t),e+' component element '+m.describe(t)+' is invalid for type=\'radio\'.')},r._jQueryInterface=function(t){return this.each(function(){var o=e(this),a=o.data(n);a||(a=new r(o,t),o.data(n,a))})},r}(E);return e.fn[o]=l._jQueryInterface,e.fn[o].Constructor=l,e.fn[o].noConflict=function(){return e.fn[o]=r,l._jQueryInterface},l}(jQuery),N=function(e){var t='radioInline',n='bmd.'+t,o='bmd'+(t.charAt(0).toUpperCase()+t.slice(1)),r=e.fn[o],a={bmdFormGroup:{create:!1,required:!1}},l=function(t){function o(n,o,r){return void 0===r&&(r={inputType:'radio',outerClass:'radio-inline'}),t.call(this,n,e.extend(!0,{},a,o),r)||this}u(o,t);var r=o.prototype;return r.dispose=function(){t.prototype.dispose.call(this,n)},o._jQueryInterface=function(t){return this.each(function(){var r=e(this),a=r.data(n);a||(a=new o(r,t),r.data(n,a))})},o}(C);return e.fn[o]=l._jQueryInterface,e.fn[o].Constructor=l,e.fn[o].noConflict=function(){return e.fn[o]=r,l._jQueryInterface},l}(jQuery),R=function(e){var t={requiredClasses:['form-control']},n=function(n){function o(o,r){var a;return a=n.call(this,o,e.extend(!0,t,r))||this,a.isEmpty()&&a.removeIsFilled(),a}return u(o,n),o}(_);return n}(jQuery),y=function(e){var t='select',n='bmd.'+t,o='bmd'+(t.charAt(0).toUpperCase()+t.slice(1)),r=e.fn[o],a={requiredClasses:['form-control||custom-select']},l=function(t){function o(n,o){var r;return r=t.call(this,n,e.extend(!0,a,o))||this,r.addIsFilled(),r}u(o,t);var r=o.prototype;return r.dispose=function(){t.prototype.dispose.call(this,n)},o.matches=function(e){return'select'===e.prop('tagName')},o.rejectMatch=function(e,t){m.assert(this.$element,this.matches(t),e+' component element '+m.describe(t)+' is invalid for <select>.')},o._jQueryInterface=function(t){return this.each(function(){var r=e(this),a=r.data(n);a||(a=new o(r,t),r.data(n,a))})},o}(R);return e.fn[o]=l._jQueryInterface,e.fn[o].Constructor=l,e.fn[o].noConflict=function(){return e.fn[o]=r,l._jQueryInterface},l}(jQuery),I=function(e){var t='switch',n='bmd.'+t,o='bmd'+(t.charAt(0).toUpperCase()+t.slice(1)),r=e.fn[o],a={template:'<span class=\'bmd-switch-track\'></span>'},l=function(t){function o(n,o,r){return void 0===r&&(r={inputType:'checkbox',outerClass:'switch'}),t.call(this,n,e.extend(!0,{},a,o),r)||this}u(o,t);var r=o.prototype;return r.dispose=function(){t.prototype.dispose.call(this,n)},o._jQueryInterface=function(t){return this.each(function(){var r=e(this),a=r.data(n);a||(a=new o(r,t),r.data(n,a))})},o}(h);return e.fn[o]=l._jQueryInterface,e.fn[o].Constructor=l,e.fn[o].noConflict=function(){return e.fn[o]=r,l._jQueryInterface},l}(jQuery),$=function(e){var t='text',n='bmd.'+t,o='bmd'+(t.charAt(0).toUpperCase()+t.slice(1)),r=e.fn[o],a={},l=function(t){function o(n,o){return t.call(this,n,e.extend(!0,a,o))||this}u(o,t);var r=o.prototype;return r.dispose=function(e){void 0===e&&(e=n),t.prototype.dispose.call(this,e)},o.matches=function(e){return'text'===e.attr('type')},o.rejectMatch=function(e,t){m.assert(this.$element,this.matches(t),e+' component element '+m.describe(t)+' is invalid for type=\'text\'.')},o._jQueryInterface=function(t){return this.each(function(){var r=e(this),a=r.data(n);a||(a=new o(r,t),r.data(n,a))})},o}(R);return e.fn[o]=l._jQueryInterface,e.fn[o].Constructor=l,e.fn[o].noConflict=function(){return e.fn[o]=r,l._jQueryInterface},l}(jQuery),M=function(e){var t='textarea',n='bmd.'+t,o='bmd'+(t.charAt(0).toUpperCase()+t.slice(1)),r=e.fn[o],a={},l=function(t){function o(n,o){return t.call(this,n,e.extend(!0,a,o))||this}u(o,t);var r=o.prototype;return r.dispose=function(){t.prototype.dispose.call(this,n)},o.matches=function(e){return'textarea'===e.prop('tagName')},o.rejectMatch=function(e,t){m.assert(this.$element,this.matches(t),e+' component element '+m.describe(t)+' is invalid for <textarea>.')},o._jQueryInterface=function(t){return this.each(function(){var r=e(this),a=r.data(n);a||(a=new o(r,t),r.data(n,a))})},o}(R);return e.fn[o]=l._jQueryInterface,e.fn[o].Constructor=l,e.fn[o].noConflict=function(){return e.fn[o]=r,l._jQueryInterface},l}(jQuery),O=function(e){if('undefined'==typeof Popper)throw new Error('Bootstrap dropdown require Popper.js (https://popper.js.org)');var t='dropdown',n='bs.dropdown',o='.'+n,r='.data-api',a=e.fn[t],l=27,s=32,c=9,i=/38|40|27/,u={HIDE:'hide'+o,HIDDEN:'hidden'+o,SHOW:'show'+o,SHOWN:'shown'+o,CLICK:'click'+o,CLICK_DATA_API:'click'+o+r,KEYDOWN_DATA_API:'keydown'+o+r,KEYUP_DATA_API:'keyup'+o+r,TRANSITION_END:'transitionend webkitTransitionEnd oTransitionEnd animationend webkitAnimationEnd oAnimationEnd'},m={DISABLED:'disabled',SHOW:'show',SHOWING:'showing',HIDING:'hiding',DROPUP:'dropup',MENURIGHT:'dropdown-menu-right',MENULEFT:'dropdown-menu-left'},f={DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:'.dropdown form',MENU:'.dropdown-menu',NAVBAR_NAV:'.navbar-nav',VISIBLE_ITEMS:'.dropdown-menu .dropdown-item:not(.disabled)'},_={TOP:'top-start',TOPEND:'top-end',BOTTOM:'bottom-start',BOTTOMEND:'bottom-end'},E={placement:_.BOTTOM,offset:0,flip:!0},h={placement:'string',offset:'(number|string)',flip:'boolean'},g=function(){function r(e,t){this._element=e,this._popper=null,this._config=this._getConfig(t),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var a=r.prototype;return a.toggle=function(){var t=this;if(!(this._element.disabled||e(this._element).hasClass(m.DISABLED))){var n=r._getParentFromElement(this._element),o=e(this._menu).hasClass(m.SHOW);if(r._clearMenus(),!o){var a={relatedTarget:this._element},l=e.Event(u.SHOW,a);if(e(n).trigger(l),!l.isDefaultPrevented()){var s=this._element;e(n).hasClass(m.DROPUP)&&(e(this._menu).hasClass(m.MENULEFT)||e(this._menu).hasClass(m.MENURIGHT))&&(s=n),this._popper=new Popper(s,this._menu,this._getPopperConfig()),'ontouchstart'in document.documentElement&&!e(n).closest(f.NAVBAR_NAV).length&&e('body').children().on('mouseover',null,e.noop),this._element.focus(),this._element.setAttribute('aria-expanded',!0),e(this._menu).one(u.TRANSITION_END,function(){e(n).trigger(e.Event(u.SHOWN,a)),e(t._menu).removeClass(m.SHOWING)}),e(this._menu).addClass(m.SHOW+' '+m.SHOWING),e(n).addClass(m.SHOW)}}}},a.dispose=function(){e.removeData(this._element,n),e(this._element).off(o),this._element=null,this._menu=null,null!==this._popper&&this._popper.destroy(),this._popper=null},a.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},a._addEventListeners=function(){var t=this;e(this._element).on(u.CLICK,function(e){e.preventDefault(),e.stopPropagation(),t.toggle()})},a._getConfig=function(n){var o=e(this._element).data();return void 0!==o.placement&&(o.placement=_[o.placement.toUpperCase()]),n=e.extend({},this.constructor.Default,e(this._element).data(),n),d.typeCheckConfig(t,n,this.constructor.DefaultType),n},a._getMenuElement=function(){if(!this._menu){var t=r._getParentFromElement(this._element);this._menu=e(t).find(f.MENU)[0]}return this._menu},a._getPlacement=function(){var t=e(this._element).parent(),n=this._config.placement;return t.hasClass(m.DROPUP)||this._config.placement===_.TOP?(n=_.TOP,e(this._menu).hasClass(m.MENURIGHT)&&(n=_.TOPEND)):e(this._menu).hasClass(m.MENURIGHT)&&(n=_.BOTTOMEND),n},a._detectNavbar=function(){return 0<e(this._element).closest('.navbar').length},a._getPopperConfig=function(){var e={placement:this._getPlacement(),modifiers:{offset:{offset:this._config.offset},flip:{enabled:this._config.flip}}};return this._inNavbar&&(e.modifiers.applyStyle={enabled:!this._inNavbar}),e},r._jQueryInterface=function(t){return this.each(function(){var o=e(this).data(n),a='object'==typeof t?t:null;if(o||(o=new r(this,a),e(this).data(n,o)),'string'==typeof t){if(void 0===o[t])throw new Error('No method named "'+t+'"');o[t]()}})},r._clearMenus=function(t){if(!(t&&(t.which===3||'keyup'===t.type&&t.which!==c)))for(var o,a=e.makeArray(e(f.DATA_TOGGLE)),l=function(o){var l=r._getParentFromElement(a[o]),s=e(a[o]).data(n),i={relatedTarget:a[o]};if(!s)return'continue';var d=s._menu;if(!e(l).hasClass(m.SHOW))return'continue';if(t&&('click'===t.type&&/input|textarea/i.test(t.target.tagName)||'keyup'===t.type&&t.which===c)&&e.contains(l,t.target))return'continue';var p=e.Event(u.HIDE,i);return e(l).trigger(p),p.isDefaultPrevented()?'continue':void(('ontouchstart'in document.documentElement)&&e('body').children().off('mouseover',null,e.noop),a[o].setAttribute('aria-expanded','false'),e(d).addClass(m.HIDING).removeClass(m.SHOW),e(l).removeClass(m.SHOW),e(d).one(u.TRANSITION_END,function(){e(l).trigger(e.Event(u.HIDDEN,i)),e(d).removeClass(m.HIDING)}))},s=0;s<a.length;s++)o=l(s),'continue'===o},r._getParentFromElement=function(t){var n,o=d.getSelectorFromElement(t);return o&&(n=e(o)[0]),n||t.parentNode},r._dataApiKeydownHandler=function(t){if(!(!i.test(t.which)||/button/i.test(t.target.tagName)&&t.which===s||/input|textarea/i.test(t.target.tagName))&&(t.preventDefault(),t.stopPropagation(),!(this.disabled||e(this).hasClass(m.DISABLED)))){var n=r._getParentFromElement(this),o=e(n).hasClass(m.SHOW);if(!o&&(t.which!==l||t.which!==s)||o&&(t.which===l||t.which===s)){if(t.which===l){var a=e(n).find(f.DATA_TOGGLE)[0];e(a).trigger('focus')}return void e(this).trigger('click')}var d=e(n).find(f.VISIBLE_ITEMS).get();if(d.length){var c=d.indexOf(t.target);t.which===38&&0<c&&c--,t.which===40&&c<d.length-1&&c++,0>c&&(c=0),d[c].focus()}}},p(r,null,[{key:'VERSION',get:function(){return'4.1.0'}},{key:'Default',get:function(){return E}},{key:'DefaultType',get:function(){return h}}]),r}();return e(document).on(u.KEYDOWN_DATA_API,f.DATA_TOGGLE,g._dataApiKeydownHandler).on(u.KEYDOWN_DATA_API,f.MENU,g._dataApiKeydownHandler).on(u.CLICK_DATA_API+' '+u.KEYUP_DATA_API,g._clearMenus).on(u.CLICK_DATA_API,f.DATA_TOGGLE,function(t){t.preventDefault(),t.stopPropagation(),g._jQueryInterface.call(e(this),'toggle')}).on(u.CLICK_DATA_API,f.FORM_CHILD,function(t){t.stopPropagation()}),e.fn[t]=g._jQueryInterface,e.fn[t].Constructor=g,e.fn[t].noConflict=function(){return e.fn[t]=a,g._jQueryInterface},g}(jQuery),U=function(e){var t={CANVAS:'bmd-layout-canvas',CONTAINER:'bmd-layout-container',BACKDROP:'bmd-layout-backdrop'},n={CANVAS:'.'+t.CANVAS,CONTAINER:'.'+t.CONTAINER,BACKDROP:'.'+t.BACKDROP},o={canvas:{create:!0,required:!0,template:'<div class="'+t.CANVAS+'"></div>'},backdrop:{create:!0,required:!0,template:'<div class="'+t.BACKDROP+'"></div>'}},r=function(t){function r(n,r,a){var l;return void 0===a&&(a={}),l=t.call(this,n,e.extend(!0,{},o,r),a)||this,l.$container=l.findContainer(!0),l.$backdrop=l.resolveBackdrop(),l.resolveCanvas(),l}u(r,t);var a=r.prototype;return a.dispose=function(e){t.prototype.dispose.call(this,e),this.$container=null,this.$backdrop=null},a.resolveCanvas=function(){var e=this.findCanvas(!1);return(void 0===e||0===e.length)&&(this.config.canvas.create&&this.$container.wrap(this.config.canvas.template),e=this.findCanvas(this.config.canvas.required)),e},a.findCanvas=function(t,o){void 0===t&&(t=!0),void 0===o&&(o=this.$container);var r=o.closest(n.CANVAS);return 0===r.length&&t&&e.error('Failed to find '+n.CANVAS+' for '+m.describe(o)),r},a.resolveBackdrop=function(){var e=this.findBackdrop(!1);return(void 0===e||0===e.length)&&(this.config.backdrop.create&&this.$container.append(this.config.backdrop.template),e=this.findBackdrop(this.config.backdrop.required)),e},a.findBackdrop=function(t,o){void 0===t&&(t=!0),void 0===o&&(o=this.$container);var r=o.find('> '+n.BACKDROP);return 0===r.length&&t&&e.error('Failed to find '+n.BACKDROP+' for '+m.describe(o)),r},a.findContainer=function(t,o){void 0===t&&(t=!0),void 0===o&&(o=this.$element);var r=o.closest(n.CONTAINER);return 0===r.length&&t&&e.error('Failed to find '+n.CONTAINER+' for '+m.describe(o)),r},r}(f);return r}(jQuery),v=function(e){var t='drawer',n='bmd.'+t,o='bmd'+(t.charAt(0).toUpperCase()+t.slice(1)),r=e.fn[o],a={ESCAPE:27},l={IN:'in',DRAWER_IN:'bmd-drawer-in',DRAWER_OUT:'bmd-drawer-out',DRAWER:'bmd-layout-drawer',CONTAINER:'bmd-layout-container'},s={focusSelector:'a, button, input'},i=function(t){function o(n,o){var r;return r=t.call(this,n,e.extend(!0,{},s,o))||this,r.$toggles=e('[data-toggle="drawer"][href="#'+r.$element[0].id+'"], [data-toggle="drawer"][data-target="#'+r.$element[0].id+'"]'),r._addAria(),r.$backdrop.keydown(function(e){e.which===a.ESCAPE&&r.hide()}).click(function(){r.hide()}),r.$element.keydown(function(e){e.which===a.ESCAPE&&r.hide()}),r.$toggles.click(function(){r.toggle()}),r}u(o,t);var r=o.prototype;return r.dispose=function(){t.prototype.dispose.call(this,n),this.$toggles=null},r.toggle=function(){this._isOpen()?this.hide():this.show()},r.show=function(){if(!(this._isForcedClosed()||this._isOpen())){this.$toggles.attr('aria-expanded',!0),this.$element.attr('aria-expanded',!0),this.$element.attr('aria-hidden',!1);var e=this.$element.find(this.config.focusSelector);0<e.length&&e.first().focus(),this.$container.addClass(l.DRAWER_IN),this.$backdrop.addClass(l.IN)}},r.hide=function(){this._isOpen()&&(this.$toggles.attr('aria-expanded',!1),this.$element.attr('aria-expanded',!1),this.$element.attr('aria-hidden',!0),this.$container.removeClass(l.DRAWER_IN),this.$backdrop.removeClass(l.IN))},r._isOpen=function(){return this.$container.hasClass(l.DRAWER_IN)},r._isForcedClosed=function(){return this.$container.hasClass(l.DRAWER_OUT)},r._addAria=function(){var e=this._isOpen();this.$element.attr('aria-expanded',e),this.$element.attr('aria-hidden',e),this.$toggles.length&&this.$toggles.attr('aria-expanded',e)},o._jQueryInterface=function(t){return this.each(function(){var r=e(this),a=r.data(n);a||(a=new o(r,t),r.data(n,a))})},o}(U);return e.fn[o]=i._jQueryInterface,e.fn[o].Constructor=i,e.fn[o].noConflict=function(){return e.fn[o]=r,i._jQueryInterface},i}(jQuery),D=function(e){var t='ripples',n='bmd.'+t,o='bmd'+(t.charAt(0).toUpperCase()+t.slice(1)),r=e.fn[o],a={CONTAINER:'ripple-container',DECORATOR:'ripple-decorator'},l={CONTAINER:'.'+a.CONTAINER,DECORATOR:'.'+a.DECORATOR},s={container:{template:'<div class=\''+a.CONTAINER+'\'></div>'},decorator:{template:'<div class=\''+a.DECORATOR+'\'></div>'},trigger:{start:'mousedown touchstart',end:'mouseup mouseleave touchend'},touchUserAgentRegex:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i,duration:500},i=function(){function t(t,n){var o=this;this.$element=t,this.config=e.extend(!0,{},s,n),this.$element.on(this.config.trigger.start,function(e){o._onStartRipple(e)})}var o=Math.max,r=t.prototype;return r.dispose=function(){this.$element.data(n,null),this.$element=null,this.$container=null,this.$decorator=null,this.config=null},r._onStartRipple=function(e){var t=this;if(!(this._isTouch()&&'mousedown'===e.type)){this._findOrCreateContainer();var n=this._getRelY(e),o=this._getRelX(e);(n||o)&&(this.$decorator.css({left:o,top:n,"background-color":this._getRipplesColor()}),this._forceStyleApplication(),this.rippleOn(),setTimeout(function(){t.rippleEnd()},this.config.duration),this.$element.on(this.config.trigger.end,function(){t.$decorator&&(t.$decorator.data('mousedown','off'),'off'===t.$decorator.data('animating')&&t.rippleOut())}))}},r._findOrCreateContainer=function(){(!this.$container||0<!this.$container.length)&&(this.$element.append(this.config.container.template),this.$container=this.$element.find(l.CONTAINER)),this.$container.append(this.config.decorator.template),this.$decorator=this.$container.find(l.DECORATOR)},r._forceStyleApplication=function(){return window.getComputedStyle(this.$decorator[0]).opacity},r._getRelX=function(e){var t=this.$container.offset(),n=null;return this._isTouch()?(e=e.originalEvent,n=1===e.touches.length&&e.touches[0].pageX-t.left):n=e.pageX-t.left,n},r._getRelY=function(e){var t=this.$container.offset(),n=null;return this._isTouch()?(e=e.originalEvent,n=1===e.touches.length&&e.touches[0].pageY-t.top):n=e.pageY-t.top,n},r._getRipplesColor=function(){var e=this.$element.data('ripple-color')?this.$element.data('ripple-color'):window.getComputedStyle(this.$element[0]).color;return e},r._isTouch=function(){return this.config.touchUserAgentRegex.test(navigator.userAgent)},r.rippleEnd=function(){this.$decorator&&(this.$decorator.data('animating','off'),'off'===this.$decorator.data('mousedown')&&this.rippleOut(this.$decorator))},r.rippleOut=function(){var e=this;this.$decorator.off(),m.transitionEndSupported()?this.$decorator.addClass('ripple-out'):this.$decorator.animate({opacity:0},100,function(){e.$decorator.trigger('transitionend')}),this.$decorator.on(m.transitionEndSelector(),function(){e.$decorator&&(e.$decorator.remove(),e.$decorator=null)})},r.rippleOn=function(){var e=this,t=this._getNewSize();m.transitionEndSupported()?this.$decorator.css({"-ms-transform":'scale('+t+')',"-moz-transform":'scale('+t+')',"-webkit-transform":'scale('+t+')',transform:'scale('+t+')'}).addClass('ripple-on').data('animating','on').data('mousedown','on'):this.$decorator.animate({width:2*o(this.$element.outerWidth(),this.$element.outerHeight()),height:2*o(this.$element.outerWidth(),this.$element.outerHeight()),"margin-left":-1*o(this.$element.outerWidth(),this.$element.outerHeight()),"margin-top":-1*o(this.$element.outerWidth(),this.$element.outerHeight()),opacity:0.2},this.config.duration,function(){e.$decorator.trigger('transitionend')})},r._getNewSize=function(){return 2.5*(o(this.$element.outerWidth(),this.$element.outerHeight())/this.$decorator.outerWidth())},t._jQueryInterface=function(o){return this.each(function(){var r=e(this),a=r.data(n);a||(a=new t(r,o),r.data(n,a))})},t}();return e.fn[o]=i._jQueryInterface,e.fn[o].Constructor=i,e.fn[o].noConflict=function(){return e.fn[o]=r,i._jQueryInterface},i}(jQuery),F=function(e){var t='autofill',n='bmd.'+t,o='bmd'+(t.charAt(0).toUpperCase()+t.slice(1)),r=e.fn[o],a={},l=function(t){function o(n,o){var r;return r=t.call(this,n,e.extend(!0,{},a,o))||this,r._watchLoading(),r._attachEventHandlers(),r}u(o,t);var r=o.prototype;return r.dispose=function(){t.prototype.dispose.call(this,n)},r._watchLoading=function(){var e=this;setTimeout(function(){clearInterval(e._onLoading)},1e4)},r._onLoading=function(){setInterval(function(){e('input[type!=checkbox]').each(function(t,n){var o=e(n);o.val()&&o.val()!==o.attr('value')&&o.trigger('change')})},100)},r._attachEventHandlers=function(){var t=null;e(document).on('focus','input',function(n){var o=e(n.currentTarget).closest('form').find('input').not('[type=file]');t=setInterval(function(){o.each(function(t,n){var o=e(n);o.val()!==o.attr('value')&&o.trigger('change')})},100)}).on('blur','.form-group input',function(){clearInterval(t)})},o._jQueryInterface=function(t){return this.each(function(){var r=e(this),a=r.data(n);a||(a=new o(r,t),r.data(n,a))})},o}(f);return e.fn[o]=l._jQueryInterface,e.fn[o].Constructor=l,e.fn[o].noConflict=function(){return e.fn[o]=r,l._jQueryInterface},l}(jQuery);Popper.Defaults.modifiers.computeStyle.gpuAcceleration=!1;(function(t){var e='bootstrapMaterialDesign',n='bmd.'+e,o=e,r=t.fn[o],a={global:{validate:!1,label:{className:'bmd-label-static'}},autofill:{selector:'body'},checkbox:{selector:'.checkbox > label > input[type=checkbox]'},checkboxInline:{selector:'label.checkbox-inline > input[type=checkbox]'},collapseInline:{selector:'.bmd-collapse-inline [data-toggle="collapse"]'},drawer:{selector:'.bmd-layout-drawer'},file:{selector:'input[type=file]'},radio:{selector:'.radio > label > input[type=radio]'},radioInline:{selector:'label.radio-inline > input[type=radio]'},ripples:{selector:['.btn:not(.btn-link):not(.ripple-none)','.card-image:not(.ripple-none)','.navbar a:not(.ripple-none)','.dropdown-menu a:not(.ripple-none)','.nav-tabs a:not(.ripple-none)','.pagination li:not(.active):not(.disabled) a:not(.ripple-none)','.ripple']},select:{selector:['select']},switch:{selector:'.switch > label > input[type=checkbox]'},text:{selector:['input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=button]):not([type=submit]):not([type=reset])']},textarea:{selector:['textarea']},arrive:!0,instantiation:['ripples','checkbox','checkboxInline','collapseInline','drawer','radio','radioInline','switch','text','textarea','select','autofill']},l=function(){function e(e,n){var o=this;this.$element=e,this.config=t.extend(!0,{},a,n);for(var r=t(document),l=function(e){var n=o.config[e];if(n){var a=o._resolveSelector(n);n=t.extend(!0,{},o.config.global,n);var l=''+(e.charAt(0).toUpperCase()+e.slice(1)),s='bmd'+l;try{t(a)[s](n),document.arrive&&o.config.arrive&&r.arrive(a,function(){t(this)[s](n)})}catch(o){var i='Failed to instantiate component: $(\''+a+'\')['+s+']('+n+')';throw console.error(i,o,'\nSelected elements: ',t(a)),o}}},s=this.config.instantiation,i=Array.isArray(s),d=0,s=i?s:s[Symbol.iterator]();;){var c;if(i){if(d>=s.length)break;c=s[d++]}else{if(d=s.next(),d.done)break;c=d.value}var p=c;l(p)}}var o=e.prototype;return o.dispose=function(){this.$element.data(n,null),this.$element=null,this.config=null},o._resolveSelector=function(e){var t=e.selector;return Array.isArray(t)&&(t=t.join(', ')),t},e._jQueryInterface=function(o){return this.each(function(){var r=t(this),a=r.data(n);a||(a=new e(r,o),r.data(n,a))})},e}();return t.fn[o]=l._jQueryInterface,t.fn[o].Constructor=l,t.fn[o].noConflict=function(){return t.fn[o]=r,l._jQueryInterface},l})(jQuery)}); |