function pleaseWaitModal(){$("#pleaseWaitModal").modal("show")}function confirmDeleteModal(n,t,i,r){r.preventDefault();bootbox.confirm(i,function(i){var r=$(n).attr("value"),u=$("<input>").attr("type","hidden").attr("name","action").val(r);i&&($(t).append($(u)),$(t).submit(),pleaseWaitModal())})}function displayDataTable(n){$(n).dataTable({stateSave:!0,pagingType:"simple_numbers",order:[[0,"asc"]],columnDefs:[{targets:["no_sort"],sortable:!1}],language:{infoEmpty:"No records available"},filter:!0})}function displayDataTableCustom(n,t,i,r,u,f){t==undefined&&(t=0);i==undefined&&(i="asc");r==undefined&&(r=10);u==undefined&&(u="no_sort");f==undefined&&(f=!0);$(n).length>0&&$(n).dataTable({stateSave:f,pagingType:"simple_numbers",displayLength:r,order:[[t,i]],columnDefs:[{bSortable:!1,aTargets:[u]}],language:{infoEmpty:"No records available"},filter:!0,mark:!0})}function _classCallCheck(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function _classCallCheck(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var _createClass,_typeof;(function(n){var t={validClass:"has-success",errorClass:"has-error",highlight:function(t,i,r){n(t).closest(".form-group").removeClass(r).addClass(i)},unhighlight:function(t,i){n(t).closest(".form-group").removeClass(i)}};n.validator.setDefaults(t);n.validator.unobtrusive!=undefined&&(n.validator.unobtrusive.options={errorClass:t.errorClass,validClass:t.validClass})})(jQuery),function(n){n.fn.resetValidation=function(){var t=this.closest("form");return t.validate().resetForm(),t.find("[data-valmsg-summary=true]").removeClass("validation-summary-errors").addClass("validation-summary-valid").find("ul").empty(),t.find("[data-valmsg-replace]").removeClass("field-validation-error").addClass("field-validation-valid").empty(),n(".form-group").removeClass("has-error"),t};n.fn.formReset=function(n){var t=this.closest("form");return t[0].reset(),(n==undefined||n)&&t.resetValidation(),t}}(jQuery);"use strict";var _extends=Object.assign||function(n){for(var i,r,t=1;t<arguments.length;t++){i=arguments[t];for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n},_createClass=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};!function(n,t,i){"function"==typeof define&&define.amd?define(["jquery"],function(r){return n(t,i,r)}):"object"===("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=n(t,i,require("jquery")):n(t,i,jQuery)}(function(n,t,i){var r=function(){function i(t){_classCallCheck(this,i);this.ctx=t;this.ie=!1;var r=n.navigator.userAgent;(r.indexOf("MSIE")>-1||r.indexOf("Trident")>-1)&&(this.ie=!0)}return _createClass(i,[{key:"log",value:function(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",t=this.opt.log;this.opt.debug&&"object"===("undefined"==typeof t?"undefined":_typeof(t))&&"function"==typeof t[i]&&t[i]("mark.js: "+n)}},{key:"escapeStr",value:function(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createRegExp",value:function(n){return n=this.escapeStr(n),Object.keys(this.opt.synonyms).length&&(n=this.createSynonymsRegExp(n)),this.opt.ignoreJoiners&&(n=this.setupIgnoreJoinersRegExp(n)),this.opt.diacritics&&(n=this.createDiacriticsRegExp(n)),n=this.createMergedBlanksRegExp(n),this.opt.ignoreJoiners&&(n=this.createIgnoreJoinersRegExp(n)),n=this.createAccuracyRegExp(n)}},{key:"createSynonymsRegExp",value:function(n){var t=this.opt.synonyms,f=this.opt.caseSensitive?"":"i";for(var i in t)if(t.hasOwnProperty(i)){var e=t[i],r=this.escapeStr(i),u=this.escapeStr(e);""!==r&&""!==u&&(n=n.replace(new RegExp("("+r+"|"+u+")","gm"+f),"("+r+"|"+u+")"))}return n}},{key:"setupIgnoreJoinersRegExp",value:function(n){return n.replace(/[^(|)\\]/g,function(n,t,i){var r=i.charAt(t+1);return/[(|)\\]/.test(r)||""===r?n:n+"\0"})}},{key:"createIgnoreJoinersRegExp",value:function(n){return n.split("\0").join("[\\u00ad|\\u200b|\\u200c|\\u200d]?")}},{key:"createDiacriticsRegExp",value:function(n){var i=this.opt.caseSensitive?"":"i",r=this.opt.caseSensitive?["aàáâãäåāąă","AÀÁÂÃÄÅĀĄĂ","cçćč","CÇĆČ","dđď","DĐĎ","eèéêëěēę","EÈÉÊËĚĒĘ","iìíîïī","IÌÍÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóôõöøō","OÒÓÔÕÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúûüůū","UÙÚÛÜŮŪ","yÿý","YŸÝ","zžżź","ZŽŻŹ"]:["aàáâãäåāąăAÀÁÂÃÄÅĀĄĂ","cçćčCÇĆČ","dđďDĐĎ","eèéêëěēęEÈÉÊËĚĒĘ","iìíîïīIÌÍÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóôõöøōOÒÓÔÕÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúûüůūUÙÚÛÜŮŪ","yÿýYŸÝ","zžżźZŽŻŹ"],t=[];return n.split("").forEach(function(u){r.every(function(r){if(r.indexOf(u)!==-1){if(t.indexOf(r)>-1)return!1;n=n.replace(new RegExp("["+r+"]","gm"+i),"["+r+"]");t.push(r)}return!0})}),n}},{key:"createMergedBlanksRegExp",value:function(n){return n.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(n){var r=this,i=this.opt.accuracy,u="string"==typeof i?i:i.value,f="string"==typeof i?[]:i.limiters,t="";switch(f.forEach(function(n){t+="|"+r.escapeStr(n)}),u){case"partially":default:return"()("+n+")";case"complementary":return t="\\s"+(t?t:this.escapeStr("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿")),"()([^"+t+"]*"+n+"[^"+t+"]*)";case"exactly":return"(^|\\s"+t+")("+n+")(?=$|\\s"+t+")"}}},{key:"getSeparatedKeywords",value:function(n){var i=this,t=[];return n.forEach(function(n){i.opt.separateWordSearch?n.split(" ").forEach(function(n){n.trim()&&t.indexOf(n)===-1&&t.push(n)}):n.trim()&&t.indexOf(n)===-1&&t.push(n)}),{keywords:t.sort(function(n,t){return t.length-n.length}),length:t.length}}},{key:"getTextNodes",value:function(n){var r=this,t="",i=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,function(n){i.push({start:t.length,end:(t+=n.textContent).length,node:n})},function(n){return r.matchesExclude(n.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},function(){n({value:t,nodes:i})})}},{key:"matchesExclude",value:function(n){return u.matches(n,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(n,i,r){var e=this.opt.element?this.opt.element:"mark",u=n.splitText(i),o=u.splitText(r-i),f=t.createElement(e);return f.setAttribute("data-markjs","true"),this.opt.className&&f.setAttribute("class",this.opt.className),f.textContent=u.textContent,u.parentNode.replaceChild(f,u),o}},{key:"wrapRangeInMappedTextNode",value:function(n,t,i,r,u){var f=this;n.nodes.every(function(e,o){var h=n.nodes[o+1],s;return("undefined"==typeof h||h.start>t)&&(s=function(){if(!r(e.node))return{v:!1};var h=t-e.start,s=(i>e.end?e.end:i)-e.start,c=n.value.substr(0,e.start),l=n.value.substr(s+e.start);return e.node=f.wrapRangeInTextNode(e.node,h,s),n.value=c+l,n.nodes.forEach(function(t,i){i>=o&&(n.nodes[i].start>0&&i!==o&&(n.nodes[i].start-=s),n.nodes[i].end-=s)}),i-=s,u(e.node.previousSibling,e.start),i>e.end?void(t=e.end):{v:!1}}(),"object"===("undefined"==typeof s?"undefined":_typeof(s)))?s.v:!0})}},{key:"wrapMatches",value:function(n,t,i,r,u){var e=this,f=0===t?0:t+1;this.getTextNodes(function(t){t.nodes.forEach(function(t){var u,o,s;for(t=t.node,u=void 0;null!==(u=n.exec(t.textContent))&&""!==u[f];)if(i(u[f],t)){if(o=u.index,0!==f)for(s=1;s<f;s++)o+=u[s].length;t=e.wrapRangeInTextNode(t,o,o+u[f].length);r(t.previousSibling);n.lastIndex=0}});u()})}},{key:"wrapMatchesAcrossElements",value:function(n,t,i,r,u){var e=this,f=0===t?0:t+1;this.getTextNodes(function(t){for(var s,h,c,o=void 0;null!==(o=n.exec(t.value))&&""!==o[f];){if(s=o.index,0!==f)for(h=1;h<f;h++)s+=o[h].length;c=s+o[f].length;e.wrapRangeInMappedTextNode(t,s,c,function(n){return i(o[f],n)},function(t,i){n.lastIndex=i;r(t)})}u()})}},{key:"unwrapMatches",value:function(n){for(var i=n.parentNode,r=t.createDocumentFragment();n.firstChild;)r.appendChild(n.removeChild(n.firstChild));i.replaceChild(r,n);this.ie?this.normalizeTextNode(i):i.normalize()}},{key:"normalizeTextNode",value:function(n){if(n){if(3===n.nodeType)for(;n.nextSibling&&3===n.nextSibling.nodeType;)n.nodeValue+=n.nextSibling.nodeValue,n.parentNode.removeChild(n.nextSibling);else this.normalizeTextNode(n.firstChild);this.normalizeTextNode(n.nextSibling)}}},{key:"markRegExp",value:function(n,t){var i=this;this.opt=t;this.log('Searching with expression "'+n+'"');var r=0,u="wrapMatches",f=function(n){r++;i.opt.each(n)};this.opt.acrossElements&&(u="wrapMatchesAcrossElements");this[u](n,this.opt.ignoreGroups,function(n,t){return i.opt.filter(t,n,r)},f,function(){0===r&&i.opt.noMatch(n);i.opt.done(r)})}},{key:"mark",value:function(n,t){var i=this;this.opt=t;var r=0,f="wrapMatches",e=this.getSeparatedKeywords("string"==typeof n?[n]:n),u=e.keywords,o=e.length,s=this.opt.caseSensitive?"":"i",h=function n(t){var h=new RegExp(i.createRegExp(t),"gm"+s),e=0;i.log('Searching with expression "'+h+'"');i[f](h,1,function(n,u){return i.opt.filter(u,t,r,e)},function(n){e++;r++;i.opt.each(n)},function(){0===e&&i.opt.noMatch(t);u[o-1]===t?i.opt.done(r):n(u[u.indexOf(t)+1])})};this.opt.acrossElements&&(f="wrapMatchesAcrossElements");0===o?this.opt.done(r):h(u[0])}},{key:"unmark",value:function(n){var i=this,t;this.opt=n;t=this.opt.element?this.opt.element:"*";t+="[data-markjs]";this.opt.className&&(t+="."+this.opt.className);this.log('Removal selector "'+t+'"');this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,function(n){i.unwrapMatches(n)},function(n){var r=u.matches(n,t),f=i.matchesExclude(n);return!r||f?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}},{key:"opt",set:function(t){this._opt=_extends({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,each:function(){},noMatch:function(){},filter:function(){return!0},done:function(){},debug:!1,log:n.console},t)},get:function(){return this._opt}},{key:"iterator",get:function(){return this._iterator||(this._iterator=new u(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)),this._iterator}}]),i}(),u=function(){function n(t){var i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;_classCallCheck(this,n);this.ctx=t;this.iframes=i;this.exclude=r;this.iframesTimeout=u}return _createClass(n,[{key:"getContexts",value:function(){var i=void 0,n=[];return i="undefined"!=typeof this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(t.querySelectorAll(this.ctx)):[this.ctx]:[],i.forEach(function(t){var i=n.filter(function(n){return n.contains(t)}).length>0;n.indexOf(t)!==-1||i||n.push(t)}),n}},{key:"getIframeContents",value:function(n,t){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},i=void 0,r;try{if(r=n.contentWindow,i=r.document,!r||!i)throw new Error("iframe inaccessible");}catch(n){u()}i&&t(i)}},{key:"isIframeBlank",value:function(n){var t="about:blank",i=n.getAttribute("src").trim(),r=n.contentWindow.location.href;return r===t&&i!==t&&i}},{key:"observeIframeLoad",value:function(n,t,i){var u=this,f=!1,e=null,r=function r(){if(!f){f=!0;clearTimeout(e);try{u.isIframeBlank(n)||(n.removeEventListener("load",r),u.getIframeContents(n,t,i))}catch(n){i()}}};n.addEventListener("load",r);e=setTimeout(r,this.iframesTimeout)}},{key:"onIframeReady",value:function(n,t,i){try{"complete"===n.contentWindow.document.readyState?this.isIframeBlank(n)?this.observeIframeLoad(n,t,i):this.getIframeContents(n,t,i):this.observeIframeLoad(n,t,i)}catch(n){i()}}},{key:"waitForIframes",value:function(n,t){var r=this,i=0;this.forEachIframe(n,function(){return!0},function(n){i++;r.waitForIframes(n.querySelector("html"),function(){--i||t()})},function(n){n||t()})}},{key:"forEachIframe",value:function(t,i,r){var e=this,h=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},f=t.querySelectorAll("iframe"),o=f.length,s=0,u;f=Array.prototype.slice.call(f);u=function(){--o<=0&&h(s)};o||u();f.forEach(function(t){n.matches(t,e.exclude)?u():e.onIframeReady(t,function(n){i(t)&&(s++,r(n));u()},u)})}},{key:"createIterator",value:function(n,i,r){return t.createNodeIterator(n,i,r,!1)}},{key:"createInstanceOnIframe",value:function(t){return new n(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(n,t,i){var f=n.compareDocumentPosition(i),e=Node.DOCUMENT_POSITION_PRECEDING,r,u;return f&e&&(null===t||(r=t.compareDocumentPosition(i),u=Node.DOCUMENT_POSITION_FOLLOWING,r&u))?!0:!1}},{key:"getIteratorNode",value:function(n){var t=n.previousNode(),i=void 0;return i=null===t?n.nextNode():n.nextNode()&&n.nextNode(),{prevNode:t,node:i}}},{key:"checkIframeFilter",value:function(n,t,i,r){var u=!1,f=!1;return r.forEach(function(n,t){n.val===i&&(u=t,f=n.handled)}),this.compareNodeIframe(n,t,i)?(u!==!1||f?u===!1||f||(r[u].handled=!0):r.push({val:i,handled:!0}),!0):(u===!1&&r.push({val:i,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(n,t,i,r){var u=this;n.forEach(function(n){n.handled||u.getIframeContents(n.val,function(n){u.createInstanceOnIframe(n).forEachNode(t,i,r)})})}},{key:"iterateThroughNodes",value:function(n,t,i,r,u){for(var f=this,c=this.createIterator(t,n,r),o=[],s=[],e=void 0,h=void 0,l=function(){var n=f.getIteratorNode(c);return h=n.prevNode,e=n.node};l();)this.iframes&&this.forEachIframe(t,function(n){return f.checkIframeFilter(e,h,n,o)},function(t){f.createInstanceOnIframe(t).forEachNode(n,i,r)}),s.push(e);s.forEach(function(n){i(n)});this.iframes&&this.handleOpenIframes(o,n,i,r);u()}},{key:"forEachNode",value:function(n,t,i){var r=this,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},f=this.getContexts(),e=f.length;e||u();f.forEach(function(f){var o=function(){r.iterateThroughNodes(n,f,t,i,function(){--e<=0&&u()})};r.iframes?r.waitForIframes(f,o):o()})}}],[{key:"matches",value:function(n,t){var u="string"==typeof t?[t]:t,r=n.matches||n.matchesSelector||n.msMatchesSelector||n.mozMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector,i;return r?(i=!1,u.every(function(t){return!r.call(n,t)||(i=!0,!1)}),i):!1}}]),n}();return i.fn.mark=function(n,t){return new r(this.get()).mark(n,t),this},i.fn.markRegExp=function(n,t){return new r(this.get()).markRegExp(n,t),this},i.fn.unmark=function(n){return new r(this.get()).unmark(n),this},i},window,document);_createClass=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}();_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol?"symbol":typeof n};!function(n,t,i){"function"==typeof define&&define.amd?define(["jquery","datatables.net","markjs"],function(r){return n(t,i,r)}):"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?(require("datatables.net"),require("markjs"),n(t,i,require("jquery"))):n(t,i,jQuery)}(function(n,t,i){var r=function(){function n(t,r){if(_classCallCheck(this,n),"function"!=typeof i.fn.mark||"function"!=typeof i.fn.unmark)throw new Error("jquery.mark.js is necessary for datatables.mark.js");this.instance=t;this.options="object"===("undefined"==typeof r?"undefined":_typeof(r))?r:{};this.intervalThreshold=49;this.intervalMs=300;this.initMarkListener()}return _createClass(n,[{key:"initMarkListener",value:function(){var n=this,t="draw.dt.dth column-visibility.dt.dth column-reorder.dt.dth",i=null;this.instance.on(t,function(){var t=n.instance.rows({filter:"applied",page:"current"}).nodes().length;t>n.intervalThreshold?(clearTimeout(i),i=setTimeout(function(){n.mark()},n.intervalMs)):n.mark()});this.instance.on("destroy",function(){n.instance.off(t)});this.mark()}},{key:"mark",value:function(){var n=this,t=this.instance.search();i(this.instance.table().body()).unmark(this.options);this.instance.columns({search:"applied",page:"current"}).nodes().each(function(r,u){var e=n.instance.column(u).search(),f=e||t;f&&r.forEach(function(t){i(t).mark(f,n.options)})})}}]),n}();i(t).on("init.dt.dth",function(n,t){if("dt"===n.namespace){var f=i.fn.dataTable.Api(t),u=null;f.init().mark?u=f.init().mark:i.fn.dataTable.defaults.mark&&(u=i.fn.dataTable.defaults.mark);null!==u&&new r(f,u)}})},window,document);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.toggle"),f=typeof i=="object"&&i;r||u.data("bs.toggle",r=new t(this,f));typeof i=="string"&&r[i]&&r[i]()})}var t=function(t,i){this.$element=n(t);this.options=n.extend({},this.defaults(),i);this.render()},i;t.VERSION="2.2.0";t.DEFAULTS={on:"On",off:"Off",onstyle:"primary",offstyle:"default",size:"normal",style:"",width:null,height:null};t.prototype.defaults=function(){return{on:this.$element.attr("data-on")||t.DEFAULTS.on,off:this.$element.attr("data-off")||t.DEFAULTS.off,onstyle:this.$element.attr("data-onstyle")||t.DEFAULTS.onstyle,offstyle:this.$element.attr("data-offstyle")||t.DEFAULTS.offstyle,size:this.$element.attr("data-size")||t.DEFAULTS.size,style:this.$element.attr("data-style")||t.DEFAULTS.style,width:this.$element.attr("data-width")||t.DEFAULTS.width,height:this.$element.attr("data-height")||t.DEFAULTS.height}};t.prototype.render=function(){var e,o;this._onstyle="btn-"+this.options.onstyle;this._offstyle="btn-"+this.options.offstyle;var r=this.options.size==="large"?"btn-lg":this.options.size==="small"?"btn-sm":this.options.size==="mini"?"btn-xs":"",t=n('<label class="btn">').html(this.options.on).addClass(this._onstyle+" "+r),i=n('<label class="btn">').html(this.options.off).addClass(this._offstyle+" "+r+" active"),u=n('<span class="toggle-handle btn btn-default">').addClass(r),f=n('<div class="toggle-group">').append(t,i,u),s=n('<div class="toggle btn" data-toggle="toggle">').addClass(this.$element.prop("checked")?this._onstyle:this._offstyle+" off").addClass(r).addClass(this.options.style);this.$element.wrap(s);n.extend(this,{$toggle:this.$element.parent(),$toggleOn:t,$toggleOff:i,$toggleGroup:f});this.$toggle.append(f);e=this.options.width||Math.max(t.outerWidth(),i.outerWidth())+u.outerWidth()/2;o=this.options.height||Math.max(t.outerHeight(),i.outerHeight());t.addClass("toggle-on");i.addClass("toggle-off");this.$toggle.css({width:e,height:o});this.options.height&&(t.css("line-height",t.height()+"px"),i.css("line-height",i.height()+"px"));this.update(!0);this.trigger(!0)};t.prototype.toggle=function(){this.$element.prop("checked")?this.off():this.on()};t.prototype.on=function(n){if(this.$element.prop("disabled"))return!1;this.$toggle.removeClass(this._offstyle+" off").addClass(this._onstyle);this.$element.prop("checked",!0);n||this.trigger()};t.prototype.off=function(n){if(this.$element.prop("disabled"))return!1;this.$toggle.removeClass(this._onstyle).addClass(this._offstyle+" off");this.$element.prop("checked",!1);n||this.trigger()};t.prototype.enable=function(){this.$toggle.removeAttr("disabled");this.$element.prop("disabled",!1)};t.prototype.disable=function(){this.$toggle.attr("disabled","disabled");this.$element.prop("disabled",!0)};t.prototype.update=function(n){if(this.$element.prop("disabled")?this.disable():this.enable(),this.$element.prop("checked"))this.on(n);else this.off(n)};t.prototype.trigger=function(t){this.$element.off("change.bs.toggle");t||this.$element.change();this.$element.on("change.bs.toggle",n.proxy(function(){this.update()},this))};t.prototype.destroy=function(){this.$element.off("change.bs.toggle");this.$toggleGroup.remove();this.$element.removeData("bs.toggle");this.$element.unwrap()};i=n.fn.bootstrapToggle;n.fn.bootstrapToggle=r;n.fn.bootstrapToggle.Constructor=t;n.fn.toggle.noConflict=function(){return n.fn.bootstrapToggle=i,this};n(function(){n("input[type=checkbox][data-toggle^=toggle]").bootstrapToggle()});n(document).on("click.bs.toggle","div[data-toggle^=toggle]",function(t){var i=n(this).find("input[type=checkbox]");i.bootstrapToggle("toggle");t.preventDefault()})}(jQuery)