bootstrap.min.js 42.3 KB
/*!
 * Jasny Bootstrap v3.0.1-p7, maintained by @ArnoldDaniels
 * Copyright 2013 Twitter, Inc
 * Licensed under http://www.apache.org/licenses/LICENSE-2.0
 */if(typeof jQuery=="undefined")throw new Error("Bootstrap requires jQuery");+function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(e.style[n]!==undefined)return{end:t[n]}}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this;e(this).one(e.support.transition.end,function(){n=!0});var i=function(){n||e(r).trigger(e.support.transition.end)};setTimeout(i,t);return this};e(function(){e.support.transition=t()})}(window.jQuery);+function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed.bs.alert").remove()}var n=e(this),r=n.attr("data-target");if(!r){r=n.attr("href");r=r&&r.replace(/.*(?=#[^\s]*$)/,"")}var i=e(r);t&&t.preventDefault();i.length||(i=n.hasClass("alert")?n:n.parent());i.trigger(t=e.Event("close.bs.alert"));if(t.isDefaultPrevented())return;i.removeClass("in");e.support.transition&&i.hasClass("fade")?i.one(e.support.transition.end,s).emulateTransitionEnd(150):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("bs.alert");i||r.data("bs.alert",i=new n(this));typeof t=="string"&&i[t].call(r)})};e.fn.alert.Constructor=n;e.fn.alert.noConflict=function(){e.fn.alert=r;return this};e(document).on("click.bs.alert.data-api",t,n.prototype.close)}(window.jQuery);+function(e){"use strict";var t=function(n,r){this.$element=e(n);this.options=e.extend({},t.DEFAULTS,r)};t.DEFAULTS={loadingText:"loading..."};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.is("input")?"val":"html",i=n.data();e+="Text";i.resetText||n.data("resetText",n[r]());n[r](i[e]||this.options[e]);setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)};t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var t=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change");t.prop("type")==="radio"&&e.find(".active").removeClass("active")}this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("bs.button"),s=typeof n=="object"&&n;i||r.data("bs.button",i=new t(this,s));n=="toggle"?i.toggle():n&&i.setState(n)})};e.fn.button.Constructor=t;e.fn.button.noConflict=function(){e.fn.button=n;return this};e(document).on("click.bs.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn"));n.button("toggle");t.preventDefault()})}(window.jQuery);+function(e){"use strict";var t=function(t,n){this.$element=e(t);this.$indicators=this.$element.find(".carousel-indicators");this.options=n;this.paused=this.sliding=this.interval=this.$active=this.$items=null;this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0};t.prototype.cycle=function(t){t||(this.paused=!1);this.interval&&clearInterval(this.interval);this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval));return this};t.prototype.getActiveIndex=function(){this.$active=this.$element.find(".item.active");this.$items=this.$active.parent().children();return this.$items.index(this.$active)};t.prototype.to=function(t){var n=this,r=this.getActiveIndex();if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){n.to(t)}):r==t?this.pause().cycle():this.slide(t>r?"next":"prev",e(this.$items[t]))};t.prototype.pause=function(t){t||(this.paused=!0);if(this.$element.find(".next, .prev").length&&e.support.transition.end){this.$element.trigger(e.support.transition.end);this.cycle(!0)}this.interval=clearInterval(this.interval);return this};t.prototype.next=function(){if(this.sliding)return;return this.slide("next")};t.prototype.prev=function(){if(this.sliding)return;return this.slide("prev")};t.prototype.slide=function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this;if(!i.length){if(!this.options.wrap)return;i=this.$element.find(".item")[u]()}this.sliding=!0;s&&this.pause();var f=e.Event("slide.bs.carousel",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;if(this.$indicators.length){this.$indicators.find(".active").removeClass("active");this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")})}if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t);i[0].offsetWidth;r.addClass(o);i.addClass(o);r.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active");r.removeClass(["active",o].join(" "));a.sliding=!1;setTimeout(function(){a.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active");i.addClass("active");this.sliding=!1;this.$element.trigger("slid")}s&&this.cycle();return this};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("bs.carousel"),s=e.extend({},t.DEFAULTS,r.data(),typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("bs.carousel",i=new t(this,s));typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})};e.fn.carousel.Constructor=t;e.fn.carousel.noConflict=function(){e.fn.carousel=n;return this};e(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o=n.attr("data-slide-to");o&&(s.interval=!1);i.carousel(s);(o=n.attr("data-slide-to"))&&i.data("bs.carousel").to(o);t.preventDefault()});e(window).on("load",function(){e('[data-ride="carousel"]').each(function(){var t=e(this);t.carousel(t.data())})})}(window.jQuery);+function(e){"use strict";var t=function(n,r){this.$element=e(n);this.options=e.extend({},t.DEFAULTS,r);this.transitioning=null;this.options.parent&&(this.$parent=e(this.options.parent));this.options.toggle&&this.toggle()};t.DEFAULTS={toggle:!0};t.prototype.dimension=function(){var e=this.$element.hasClass("width");return e?"width":"height"};t.prototype.show=function(){if(this.transitioning||this.$element.hasClass("in"))return;var t=e.Event("show.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.$parent&&this.$parent.find("> .panel > .in");if(n&&n.length){var r=n.data("bs.collapse");if(r&&r.transitioning)return;n.collapse("hide");r||n.data("bs.collapse",null)}var i=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[i](0);this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("in")[i]("auto");this.transitioning=0;this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var o=e.camelCase(["scroll",i].join("-"));this.$element.one(e.support.transition.end,e.proxy(s,this)).emulateTransitionEnd(350)[i](this.$element[0][o])};t.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("in"))return;var t=e.Event("hide.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight;this.$element.addClass("collapsing").removeClass("collapse").removeClass("in");this.transitioning=1;var r=function(){this.transitioning=0;this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};if(!e.support.transition)return r.call(this);this.$element[n](0).one(e.support.transition.end,e.proxy(r,this)).emulateTransitionEnd(350)};t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("bs.collapse"),s=e.extend({},t.DEFAULTS,r.data(),typeof n=="object"&&n);i||r.data("bs.collapse",i=new t(this,s));typeof n=="string"&&i[n]()})};e.fn.collapse.Constructor=t;e.fn.collapse.noConflict=function(){e.fn.collapse=n;return this};e(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i),o=s.data("bs.collapse"),u=o?"toggle":n.data(),a=n.attr("data-parent"),f=a&&e(a);if(!o||!o.transitioning){f&&f.find('[data-toggle=collapse][data-parent="'+a+'"]').not(n).addClass("collapsed");n[s.hasClass("in")?"addClass":"removeClass"]("collapsed")}s.collapse(u)})}(window.jQuery);+function(e){"use strict";function i(){e(t).remove();e(n).each(function(t){var n=s(e(this));if(!n.hasClass("open"))return;n.trigger(t=e.Event("hide.bs.dropdown"));if(t.isDefaultPrevented())return;n.removeClass("open").trigger("hidden.bs.dropdown")})}function s(t){var n=t.attr("data-target");if(!n){n=t.attr("href");n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")}var r=n&&e(n);return r&&r.length?r:t.parent()}var t=".dropdown-backdrop",n="[data-toggle=dropdown]",r=function(t){var n=e(t).on("click.bs.dropdown",this.toggle)};r.prototype.toggle=function(t){var n=e(this);if(n.is(".disabled, :disabled"))return;var r=s(n),o=r.hasClass("open");i();if(!o){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&e('<div class="dropdown-backdrop"/>').insertAfter(e(this)).on("click",i);r.trigger(t=e.Event("show.bs.dropdown"));if(t.isDefaultPrevented())return;r.toggleClass("open").trigger("shown.bs.dropdown");n.focus()}return!1};r.prototype.keydown=function(t){if(!/(38|40|27)/.test(t.keyCode))return;var r=e(this);t.preventDefault();t.stopPropagation();if(r.is(".disabled, :disabled"))return;var i=s(r),o=i.hasClass("open");if(!o||o&&t.keyCode==27){t.which==27&&i.find(n).focus();return r.click()}var u=e("[role=menu] li:not(.divider):visible a",i);if(!u.length)return;var a=u.index(u.filter(":focus"));t.keyCode==38&&a>0&&a--;t.keyCode==40&&a<u.length-1&&a++;~a||(a=0);u.eq(a).focus()};var o=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var n=e(this),i=n.data("dropdown");i||n.data("dropdown",i=new r(this));typeof t=="string"&&i[t].call(n)})};e.fn.dropdown.Constructor=r;e.fn.dropdown.noConflict=function(){e.fn.dropdown=o;return this};e(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",n,r.prototype.toggle).on("keydown.bs.dropdown.data-api",n+", [role=menu]",r.prototype.keydown)}(window.jQuery);+function(e){"use strict";var t=function(t,n){this.options=n;this.$element=e(t);this.$backdrop=this.isShown=null;this.options.remote&&this.$element.load(this.options.remote)};t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};t.prototype.toggle=function(e){return this[this.isShown?"hide":"show"](e)};t.prototype.show=function(t){var n=this,r=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r);if(this.isShown||r.isDefaultPrevented())return;this.isShown=!0;this.escape();this.$element.on("click.dismiss.modal",'[data-dismiss="modal"]',e.proxy(this.hide,this));this.backdrop(function(){var r=e.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(document.body);n.$element.show();r&&n.$element[0].offsetWidth;n.$element.addClass("in").attr("aria-hidden",!1);n.enforceFocus();var i=e.Event("shown.bs.modal",{relatedTarget:t});r?n.$element.find(".modal-dialog").one(e.support.transition.end,function(){n.$element.focus().trigger(i)}).emulateTransitionEnd(300):n.$element.focus().trigger(i)})};t.prototype.hide=function(t){t&&t.preventDefault();t=e.Event("hide.bs.modal");this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1;this.escape();e(document).off("focusin.bs.modal");this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.modal");e.support.transition&&this.$element.hasClass("fade")?this.$element.one(e.support.transition.end,e.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()};t.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]!==e.target&&!this.$element.has(e.target).length&&this.$element.focus()},this))};t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",e.proxy(function(e){e.which==27&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")};t.prototype.hideModal=function(){var e=this;this.$element.hide();this.backdrop(function(){e.removeBackdrop();e.$element.trigger("hidden.bs.modal")})};t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};t.prototype.backdrop=function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body);this.$element.on("click.dismiss.modal",e.proxy(function(e){if(e.target!==e.currentTarget)return;this.options.backdrop=="static"?this.$element[0].focus.call(this.$element[0]):this.hide.call(this)},this));i&&this.$backdrop[0].offsetWidth;this.$backdrop.addClass("in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()}else t&&t()};var n=e.fn.modal;e.fn.modal=function(n,r){return this.each(function(){var i=e(this),s=i.data("bs.modal"),o=e.extend({},t.DEFAULTS,i.data(),typeof n=="object"&&n);s||i.data("bs.modal",s=new t(this,o));typeof n=="string"?s[n](r):o.show&&s.show(r)})};e.fn.modal.Constructor=t;e.fn.modal.noConflict=function(){e.fn.modal=n;return this};e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault();i.modal(s,this).one("hide",function(){n.is(":visible")&&n.focus()})});e(document).on("show.bs.modal",".modal",function(){e(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){e(document.body).removeClass("modal-open")})}(window.jQuery);+function(e){"use strict";var t=function(e,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null;this.init("tooltip",e,t)};t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1};t.prototype.init=function(t,n,r){this.enabled=!0;this.type=t;this.$element=e(n);this.options=this.getOptions(r);var i=this.options.trigger.split(" ");for(var s=i.length;s--;){var o=i[s];if(o=="click")this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if(o!="manual"){var u=o=="hover"?"mouseenter":"focus",a=o=="hover"?"mouseleave":"blur";this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.enter,this));this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.getOptions=function(t){t=e.extend({},this.getDefaults(),this.$element.data(),t);t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay});return t};t.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();this._options&&e.each(this._options,function(e,r){n[e]!=r&&(t[e]=r)});return t};t.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout);n.hoverState="in";if(!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)};t.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout);n.hoverState="out";if(!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)};t.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.tip();this.setContent();this.options.animation&&n.addClass("fade");var r=typeof this.options.placement=="function"?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,s=i.test(r);s&&(r=r.replace(i,"")||"top");n.detach().css({top:0,left:0,display:"block"}).addClass(r);this.options.container?n.appendTo(this.options.container):n.insertAfter(this.$element);var o=this.getPosition(),u=n[0].offsetWidth,a=n[0].offsetHeight;if(s){var f=this.$element.parent(),l=r,c=document.documentElement.scrollTop||document.body.scrollTop,h=this.options.container=="body"?window.innerWidth:f.outerWidth(),p=this.options.container=="body"?window.innerHeight:f.outerHeight(),d=this.options.container=="body"?0:f.offset().left;r=r=="bottom"&&o.top+o.height+a-c>p?"top":r=="top"&&o.top-c-a<0?"bottom":r=="right"&&o.right+u>h?"left":r=="left"&&o.left-u<d?"right":r;n.removeClass(l).addClass(r)}var v=this.getCalculatedOffset(r,o,u,a);this.applyPlacement(v,r);this.$element.trigger("shown.bs."+this.type)}};t.prototype.applyPlacement=function(e,t){var n,r=this.tip(),i=r[0].offsetWidth,s=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),u=parseInt(r.css("margin-left"),10);isNaN(o)&&(o=0);isNaN(u)&&(u=0);e.top=e.top+o;e.left=e.left+u;r.offset(e).addClass("in");var a=r[0].offsetWidth,f=r[0].offsetHeight;if(t=="top"&&f!=s){n=!0;e.top=e.top+s-f}if(/bottom|top/.test(t)){var l=0;if(e.left<0){l=e.left*-2;e.left=0;r.offset(e);a=r[0].offsetWidth;f=r[0].offsetHeight}this.replaceArrow(l-i+a,a,"left")}else this.replaceArrow(f-s,f,"top");n&&r.offset(e)};t.prototype.replaceArrow=function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")};t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t);e.removeClass("fade in top bottom left right")};t.prototype.hide=function(){function i(){t.hoverState!="in"&&n.detach()}var t=this,n=this.tip(),r=e.Event("hide.bs."+this.type);this.$element.trigger(r);if(r.isDefaultPrevented())return;n.removeClass("in");e.support.transition&&this.$tip.hasClass("fade")?n.one(e.support.transition.end,i).emulateTransitionEnd(150):i();this.$element.trigger("hidden.bs."+this.type);return this};t.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")};t.prototype.hasContent=function(){return this.getTitle()};t.prototype.getPosition=function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())};t.prototype.getCalculatedOffset=function(e,t,n,r){return e=="bottom"?{top:t.top+t.height,left:t.left+t.width/2-n/2}:e=="top"?{top:t.top-r,left:t.left+t.width/2-n/2}:e=="left"?{top:t.top+t.height/2-r/2,left:t.left-n}:{top:t.top+t.height/2-r/2,left:t.left+t.width}};t.prototype.getTitle=function(){var e,t=this.$element,n=this.options;e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title);return e};t.prototype.tip=function(){return this.$tip=this.$tip||e(this.options.template)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};t.prototype.validate=function(){if(!this.$element[0].parentNode){this.hide();this.$element=null;this.options=null}};t.prototype.enable=function(){this.enabled=!0};t.prototype.disable=function(){this.enabled=!1};t.prototype.toggleEnabled=function(){this.enabled=!this.enabled};t.prototype.toggle=function(t){var n=t?e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;n.tip().hasClass("in")?n.leave(n):n.enter(n)};t.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tooltip"),s=typeof n=="object"&&n;i||r.data("bs.tooltip",i=new t(this,s));typeof n=="string"&&i[n]()})};e.fn.tooltip.Constructor=t;e.fn.tooltip.noConflict=function(){e.fn.tooltip=n;return this}}(window.jQuery);+function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'});t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype);t.prototype.constructor=t;t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t);e.find(".popover-content")[this.options.html?"html":"text"](n);e.removeClass("fade top bottom left right in");e.find(".popover-title").html()||e.find(".popover-title").hide()};t.prototype.hasContent=function(){return this.getTitle()||this.getContent()};t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||(typeof t.content=="function"?t.content.call(e[0]):t.content)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};t.prototype.tip=function(){this.$tip||(this.$tip=e(this.options.template));return this.$tip};var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("bs.popover"),s=typeof n=="object"&&n;i||r.data("bs.popover",i=new t(this,s));typeof n=="string"&&i[n]()})};e.fn.popover.Constructor=t;e.fn.popover.noConflict=function(){e.fn.popover=n;return this}}(window.jQuery);+function(e){"use strict";function t(n,r){var i,s=e.proxy(this.process,this);this.$element=e(n).is("body")?e(window):e(n);this.$body=e("body");this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",s);this.options=e.extend({},t.DEFAULTS,r);this.selector=(this.options.target||(i=e(n).attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a";this.offsets=e([]);this.targets=e([]);this.activeTarget=null;this.refresh();this.process()}t.DEFAULTS={offset:10};t.prototype.refresh=function(){var t=this.$element[0]==window?"offset":"position";this.offsets=e([]);this.targets=e([]);var n=this,r=this.$body.find(this.selector).map(function(){var r=e(this),i=r.data("target")||r.attr("href"),s=/^#\w/.test(i)&&e(i);return s&&s.length&&s.is(":visible")&&[[s[t]().top+(!e.isWindow(n.$scrollElement.get(0))&&n.$scrollElement.scrollTop()),i]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){n.offsets.push(this[0]);n.targets.push(this[1])})};t.prototype.process=function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])};t.prototype.activate=function(t){this.activeTarget=t;e(this.selector).parents(".active").removeClass("active");var n=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',r=e(n).parents("li").addClass("active");r.parent(".dropdown-menu").length&&(r=r.closest("li.dropdown").addClass("active"));r.trigger("activate")};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("bs.scrollspy"),s=typeof n=="object"&&n;i||r.data("bs.scrollspy",i=new t(this,s));typeof n=="string"&&i[n]()})};e.fn.scrollspy.Constructor=t;e.fn.scrollspy.noConflict=function(){e.fn.scrollspy=n;return this};e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery);+function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.data("target");if(!r){r=t.attr("href");r=r&&r.replace(/.*(?=#[^\s]*$)/,"")}if(t.parent("li").hasClass("active"))return;var i=n.find(".active:last a")[0],s=e.Event("show.bs.tab",{relatedTarget:i});t.trigger(s);if(s.isDefaultPrevented())return;var o=e(r);this.activate(t.parent("li"),n);this.activate(o,o.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:i})})};t.prototype.activate=function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active");t.addClass("active");if(s){t[0].offsetWidth;t.addClass("in")}else t.removeClass("fade");t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active");r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o).emulateTransitionEnd(150):o();i.removeClass("in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tab");i||r.data("bs.tab",i=new t(this));typeof n=="string"&&i[n]()})};e.fn.tab.Constructor=t;e.fn.tab.noConflict=function(){e.fn.tab=n;return this};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault();e(this).tab("show")})}(window.jQuery);+function(e){"use strict";var t=function(n,r){this.options=e.extend({},t.DEFAULTS,r);this.$window=e(window).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this));this.$element=e(n);this.affixed=this.unpin=null;this.checkPosition()};t.RESET="affix affix-top affix-bottom";t.DEFAULTS={offset:0};t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var n=e(document).height(),r=this.$window.scrollTop(),i=this.$element.offset(),s=this.options.offset,o=s.top,u=s.bottom;typeof s!="object"&&(u=o=s);typeof o=="function"&&(o=s.top());typeof u=="function"&&(u=s.bottom());var a=this.unpin!=null&&r+this.unpin<=i.top?!1:u!=null&&i.top+this.$element.height()>=n-u?"bottom":o!=null&&r<=o?"top":!1;if(this.affixed===a)return;this.unpin&&this.$element.css("top","");this.affixed=a;this.unpin=a=="bottom"?i.top-r:null;this.$element.removeClass(t.RESET).addClass("affix"+(a?"-"+a:""));a=="bottom"&&this.$element.offset({top:document.body.offsetHeight-u-this.$element.height()})};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("bs.affix"),s=typeof n=="object"&&n;i||r.data("bs.affix",i=new t(this,s));typeof n=="string"&&i[n]()})};e.fn.affix.Constructor=t;e.fn.affix.noConflict=function(){e.fn.affix=n;return this};e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{};n.offsetBottom&&(n.offset.bottom=n.offsetBottom);n.offsetTop&&(n.offset.top=n.offsetTop);t.affix(n)})})}(window.jQuery);+function(e){"use strict";var t=function(n,r){this.$element=e(n);this.$canvas=r.canvas?e(r.canvas):this.$element;this.options=e.extend({},t.DEFAULTS,r);this.transitioning=null;this.calcTransform();this.transform||(this.$canvas=this.$element);this.options.placement==="auto"&&(this.options.placement=this.calcPlacement());if(this.options.recalc){this.calcClone();e(window).on("resize.bs.offcanvas",e.proxy(this.recalc,this))}this.options.autohide&&e(document).on("click.bs.offcanvas",e.proxy(this.autohide,this));var i=window.navigator.appName=="Microsoft Internet Explorer";if(i&&this.$canvas!==this.$element){var s=this.$canvas.find("*").filter(function(){return e(this).css("position")==="fixed"});this.$canvas=this.$canvas.add(s)}this.options.toggle&&this.toggle()};t.DEFAULTS={toggle:!0,placement:"auto",autohide:!0,recalc:!0};t.prototype.calcTransform=function(){this.transform=!1;if(!e.support.transition&&this.$canvas===this.$element)return;var t=e('<div style="visibility: hidden"></div>'),n={transform:"transform",webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform"};t.appendTo(e("body"));for(var r in n){if(t[0].style[r]===undefined)continue;t[0].style[r]="translate3d(1px,1px,1px)";var i=window.getComputedStyle(t[0]).getPropertyValue(n[r]);this.transform=n[r];this.translate=i.match(/^matrix3d/)?"translate3d":"translate";break}t.remove()};t.prototype.calcPlacement=function(){function i(e,t){if(r.css(t)==="auto")return e;if(r.css(e)==="auto")return t;var n=parseInt(r.css(e),10),i=parseInt(r.css(t),10);return n>i?t:e}var t=e(window).width()/this.$element.width(),n=e(window).height()/this.$element.height(),r=this.$element;return t>n?i("left","right"):i("top","bottom")};t.prototype.offset=function(){switch(this.options.placement){case"left":case"right":return this.$element.outerWidth();case"top":case"bottom":return this.$element.outerHeight()}};t.prototype.slideTransform=function(t,n){var r=this.options.placement,i=this.transform;t*=r==="right"||r==="bottom"?-1:1;var s=r==="left"||r==="right"?"{}px, 0":"0, {}px";this.translate==="translate3d"&&(s+=", 0");s=this.translate+"("+s+")";if(!e.support.transition)return this.$canvas.animate({borderSpacing:t},{step:function(t,n){e(this).css(i,s.replace("{}",t))},complete:n,duration:350});this.$canvas.css(i,s.replace("{}",t));this.$element.one(e.support.transition.end,n).emulateTransitionEnd(350)};t.prototype.slidePosition=function(t,n){if(!e.support.transition){var r={};r[this.options.placement]=t;return this.$canvas.animate(r,350,n)}this.$canvas.css(this.options.placement,t);this.$element.one(e.support.transition.end,n).emulateTransitionEnd(350)};t.prototype.show=function(){if(this.transitioning||this.$canvas.hasClass("canvas-slid"))return;var t=e.Event("show.bs.offcanvas");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=function(){this.$canvas.addClass("canvas-slid").removeClass("canvas-sliding");this.transitioning=0;this.$element.trigger("shown.bs.offcanvas")};(!this.$element.is(":visible")||!this.transform)&&this.$element.css(this.options.placement,-1*this.offset()+"px");this.$element.addClass("in");this.$canvas.addClass("canvas-sliding");this.$canvas!=this.$element&&e("body").css("overflow-x","hidden");this.transitioning=1;this.transform?this.slideTransform(this.offset(),e.proxy(n,this)):this.slidePosition(0,e.proxy(n,this))};t.prototype.hide=function(t){if(this.transitioning||!this.$canvas.hasClass("canvas-slid"))return;var n=e.Event("hide.bs.offcanvas");this.$element.trigger(n);if(n.isDefaultPrevented())return;var r=function(){this.transitioning=0;this.$element.removeClass("in").css("left","").css("right","").css("top","").css("bottom","");this.$canvas.removeClass("canvas-sliding canvas-slid").css("transform","");e("body").css("overflow-x","");this.$element.trigger("hidden.bs.offcanvas")};if(t)return r.call(this);this.$canvas.removeClass("canvas-slid").addClass("canvas-sliding");this.transitioning=1;this.transform?this.slideTransform(0,e.proxy(r,this)):this.slidePosition(-1*this.offset(),e.proxy(r,this))};t.prototype.toggle=function(){this[this.$canvas.hasClass("canvas-slid")?"hide":"show"]()};t.prototype.calcClone=function(){this.$calcClone=this.$element.clone().html("").addClass("offcanvas-clone").removeClass("in").appendTo(e("body"))};t.prototype.recalc=function(){this.$calcClone.css("display")!=="none"&&this.hide(!0)};t.prototype.autohide=function(t){e(t.target).closest(this.$element).length===0&&this.hide()};var n=e.fn.offcanvas;e.fn.offcanvas=function(n){return this.each(function(){var r=e(this),i=r.data("bs.offcanvas"),s=e.extend({},t.DEFAULTS,r.data(),typeof n=="object"&&n);i||r.data("bs.offcanvas",i=new t(this,s));typeof n=="string"&&i[n]()})};e.fn.offcanvas.Constructor=t;e.fn.offcanvas.noConflict=
function(){e.fn.offcanvas=n;return this};e(document).on("click.bs.offcanvas.data-api","[data-toggle=offcanvas]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i),o=s.data("bs.offcanvas"),u=o?"toggle":n.data();t.stopPropagation();o?o.toggle():s.offcanvas(u)})}(window.jQuery);+function(e){"use strict";var t=function(n,r){this.$element=e(n);this.options=e.extend({},t.DEFAULTS,r);this.$element.on("click.bs.rowlink","td:not(.rowlink-skip)",e.proxy(this.click,this))};t.DEFAULTS={target:"a"};t.prototype.click=function(t){var n=e(t.currentTarget).closest("tr").find(this.options.target)[0];if(e(t.target)[0]===n)return;t.preventDefault();if(n.click)n.click();else if(document.createEvent){var r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null);n.dispatchEvent(r)}};e.fn.rowlink=function(n){return this.each(function(){var r=e(this),i=r.data("rowlink");i||r.data("rowlink",i=new t(this,n))})};e.fn.rowlink.Constructor=t;e.fn.rowlink.noConflict=function(){e.fn.inputmask=old;return this};e(document).on("click.bs.rowlink.data-api",'[data-link="row"]',function(t){var n=e(this);if(n.data("rowlink"))return;n.rowlink(n.data());e(t.target).trigger("click.bs.rowlink")})}(window.jQuery);+function(e){"use strict";var t=window.orientation!==undefined,n=navigator.userAgent.toLowerCase().indexOf("android")>-1,r=window.navigator.appName=="Microsoft Internet Explorer",i=function(t,r){if(n)return;this.$element=e(t);this.options=e.extend({},i.DEFAULS,r);this.mask=String(this.options.mask);this.init();this.listen();this.checkVal()};i.DEFAULS={mask:"",placeholder:"_",definitions:{9:"[0-9]",a:"[A-Za-z]","?":"[A-Za-z0-9]","*":"."}};i.prototype.init=function(){var t=this.options.definitions,n=this.mask.length;this.tests=[];this.partialPosition=this.mask.length;this.firstNonMaskPos=null;e.each(this.mask.split(""),e.proxy(function(e,r){if(r=="?"){n--;this.partialPosition=e}else if(t[r]){this.tests.push(new RegExp(t[r]));this.firstNonMaskPos===null&&(this.firstNonMaskPos=this.tests.length-1)}else this.tests.push(null)},this));this.buffer=e.map(this.mask.split(""),e.proxy(function(e,n){if(e!="?")return t[e]?this.options.placeholder:e},this));this.focusText=this.$element.val();this.$element.data("rawMaskFn",e.proxy(function(){return e.map(this.buffer,function(e,t){return this.tests[t]&&e!=this.options.placeholder?e:null}).join("")},this))};i.prototype.listen=function(){if(this.$element.attr("readonly"))return;var t=(r?"paste":"input")+".mask";this.$element.on("unmask.bs.inputmask",e.proxy(this.unmask,this)).on("focus.bs.inputmask",e.proxy(this.focusEvent,this)).on("blur.bs.inputmask",e.proxy(this.blurEvent,this)).on("keydown.bs.inputmask",e.proxy(this.keydownEvent,this)).on("keypress.bs.inputmask",e.proxy(this.keypressEvent,this)).on(t,e.proxy(this.pasteEvent,this))};i.prototype.caret=function(e,t){if(this.$element.length===0)return;if(typeof e=="number"){t=typeof t=="number"?t:e;return this.$element.each(function(){if(this.setSelectionRange)this.setSelectionRange(e,t);else if(this.createTextRange){var n=this.createTextRange();n.collapse(!0);n.moveEnd("character",t);n.moveStart("character",e);n.select()}})}if(this.$element[0].setSelectionRange){e=this.$element[0].selectionStart;t=this.$element[0].selectionEnd}else if(document.selection&&document.selection.createRange){var n=document.selection.createRange();e=0-n.duplicate().moveStart("character",-1e5);t=e+n.text.length}return{begin:e,end:t}};i.prototype.seekNext=function(e){var t=this.mask.length;while(++e<=t&&!this.tests[e]);return e};i.prototype.seekPrev=function(e){while(--e>=0&&!this.tests[e]);return e};i.prototype.shiftL=function(e,t){var n=this.mask.length;if(e<0)return;for(var r=e,i=this.seekNext(t);r<n;r++)if(this.tests[r]){if(!(i<n&&this.tests[r].test(this.buffer[i])))break;this.buffer[r]=this.buffer[i];this.buffer[i]=this.options.placeholder;i=this.seekNext(i)}this.writeBuffer();this.caret(Math.max(this.firstNonMaskPos,e))};i.prototype.shiftR=function(e){var t=this.mask.length;for(var n=e,r=this.options.placeholder;n<t;n++)if(this.tests[n]){var i=this.seekNext(n),s=this.buffer[n];this.buffer[n]=r;if(!(i<t&&this.tests[i].test(s)))break;r=s}},i.prototype.unmask=function(){this.$element.unbind(".mask").removeData("inputmask")};i.prototype.focusEvent=function(){this.focusText=this.$element.val();var e=this.mask.length,t=this.checkVal();this.writeBuffer();var n=this,r=function(){t==e?n.caret(0,t):n.caret(t)};r();setTimeout(r,50)};i.prototype.blurEvent=function(){this.checkVal();this.$element.val()!==this.focusText&&this.$element.trigger("change")};i.prototype.keydownEvent=function(e){var n=e.which;if(n==8||n==46||t&&n==127){var r=this.caret(),i=r.begin,s=r.end;if(s-i===0){i=n!=46?this.seekPrev(i):s=this.seekNext(i-1);s=n==46?this.seekNext(s):s}this.clearBuffer(i,s);this.shiftL(i,s-1);return!1}if(n==27){this.$element.val(this.focusText);this.caret(0,this.checkVal());return!1}};i.prototype.keypressEvent=function(e){var t=this.mask.length,n=e.which,r=this.caret();if(e.ctrlKey||e.altKey||e.metaKey||n<32)return!0;if(n){if(r.end-r.begin!==0){this.clearBuffer(r.begin,r.end);this.shiftL(r.begin,r.end-1)}var i=this.seekNext(r.begin-1);if(i<t){var s=String.fromCharCode(n);if(this.tests[i].test(s)){this.shiftR(i);this.buffer[i]=s;this.writeBuffer();var o=this.seekNext(i);this.caret(o)}}return!1}};i.prototype.pasteEvent=function(){var e=this;setTimeout(function(){e.caret(e.checkVal(!0))},0)};i.prototype.clearBuffer=function(e,t){var n=this.mask.length;for(var r=e;r<t&&r<n;r++)this.tests[r]&&(this.buffer[r]=this.options.placeholder)};i.prototype.writeBuffer=function(){return this.$element.val(this.buffer.join("")).val()};i.prototype.checkVal=function(e){var t=this.mask.length,n=this.$element.val(),r=-1;for(var i=0,s=0;i<t;i++)if(this.tests[i]){this.buffer[i]=this.options.placeholder;while(s++<n.length){var o=n.charAt(s-1);if(this.tests[i].test(o)){this.buffer[i]=o;r=i;break}}if(s>n.length)break}else if(this.buffer[i]==n.charAt(s)&&i!=this.partialPosition){s++;r=i}if(!e&&r+1<this.partialPosition){this.$element.val("");this.clearBuffer(0,t)}else if(e||r+1>=this.partialPosition){this.writeBuffer();e||this.$element.val(this.$element.val().substring(0,r+1))}return this.partialPosition?i:this.firstNonMaskPos};var s=e.fn.inputmask;e.fn.inputmask=function(t){return this.each(function(){var n=e(this),r=n.data("inputmask");r||n.data("inputmask",r=new i(this,t))})};e.fn.inputmask.Constructor=i;e.fn.inputmask.noConflict=function(){e.fn.inputmask=s;return this};e(document).on("focus.bs.inputmask.data-api","[data-mask]",function(t){var n=e(this);if(n.data("inputmask"))return;n.inputmask(n.data())})}(window.jQuery);+function(e){"use strict";var t=window.navigator.appName=="Microsoft Internet Explorer",n=function(t,n){this.$element=e(t);this.$input=this.$element.find(":file");if(this.$input.length===0)return;this.name=this.$input.attr("name")||n.name;this.$hidden=this.$element.find('input[type=hidden][name="'+this.name+'"]');if(this.$hidden.length===0){this.$hidden=e('<input type="hidden" />');this.$element.prepend(this.$hidden)}this.$preview=this.$element.find(".fileinput-preview");var r=this.$preview.css("height");this.$preview.css("display")!="inline"&&r!="0px"&&r!="none"&&this.$preview.css("line-height",r);this.original={exists:this.$element.hasClass("fileinput-exists"),preview:this.$preview.html(),hiddenVal:this.$hidden.val()};this.listen()};n.prototype.listen=function(){this.$input.on("change.bs.fileinput",e.proxy(this.change,this));e(this.$input[0].form).on("reset.bs.fileinput",e.proxy(this.reset,this));this.$element.find('[data-trigger="fileinput"]').on("click.bs.fileinput",e.proxy(this.trigger,this));this.$element.find('[data-dismiss="fileinput"]').on("click.bs.fileinput",e.proxy(this.clear,this))},n.prototype.change=function(t){t.target.files===undefined&&(t.target.files=t.target&&t.target.value?[{name:t.target.value.replace(/^.+\\/,"")}]:[]);if(t.target.files.length===0)return;this.$hidden.val("");this.$hidden.attr("name","");this.$input.attr("name",this.name);var n=t.target.files[0];if(this.$preview.length>0&&(typeof n.type!="undefined"?n.type.match("image.*"):n.name.match(/\.(gif|png|jpe?g)$/i))&&typeof FileReader!="undefined"){var r=new FileReader,i=this.$preview,s=this.$element;r.onload=function(r){var o=e("<img>").attr("src",r.target.result);t.target.files[0].result=r.target.result;s.find(".fileinput-filename").text(n.name);i.css("max-height")!="none"&&o.css("max-height",parseInt(i.css("max-height"),10)-parseInt(i.css("padding-top"),10)-parseInt(i.css("padding-bottom"),10)-parseInt(i.css("border-top"),10)-parseInt(i.css("border-bottom"),10));i.html(o);s.addClass("fileinput-exists").removeClass("fileinput-new");s.trigger("change.bs.fileinput",t.target.files)};r.readAsDataURL(n)}else{this.$element.find(".fileinput-filename").text(n.name);this.$preview.text(n.name);this.$element.addClass("fileinput-exists").removeClass("fileinput-new");this.$element.trigger("change.bs.fileinput")}},n.prototype.clear=function(e){e&&e.preventDefault();this.$hidden.val("");this.$hidden.attr("name",this.name);this.$input.attr("name","");if(t){var n=this.$input.clone(!0);this.$input.after(n);this.$input.remove();this.$input=n}else this.$input.val("");this.$preview.html("");this.$element.find(".fileinput-filename").text("");this.$element.addClass("fileinput-new").removeClass("fileinput-exists");if(e!==!1){this.$input.trigger("change");this.$element.trigger("clear.bs.fileinput")}},n.prototype.reset=function(){this.clear(!1);this.$hidden.val(this.original.hiddenVal);this.$preview.html(this.original.preview);this.$element.find(".fileinput-filename").text("");this.original.exists?this.$element.addClass("fileinput-exists").removeClass("fileinput-new"):this.$element.addClass("fileinput-new").removeClass("fileinput-exists");this.$element.trigger("reset.bs.fileinput")},n.prototype.trigger=function(e){this.$input.trigger("click");e.preventDefault()};e.fn.fileinput=function(t){return this.each(function(){var r=e(this),i=r.data("fileinput");i||r.data("fileinput",i=new n(this,t));typeof t=="string"&&i[t]()})};e.fn.fileinput.Constructor=n;e(document).on("click.fileinput.data-api",'[data-provides="fileinput"]',function(t){var n=e(this);if(n.data("fileinput"))return;n.fileinput(n.data());var r=e(t.target).closest('[data-dismiss="fileinput"],[data-trigger="fileinput"]');if(r.length>0){t.preventDefault();r.trigger("click.bs.fileinput")}})}(window.jQuery);