if(typeof jQuery=="undefined")throw new Error("Ace's JavaScript requires jQuery");if(jQuery(function(){try{ace.demo.init()}catch(n){}}),function(){"ace"in window||(window.ace={});"helper"in window.ace||(window.ace.helper={});"vars"in window.ace||(window.ace.vars={});window.ace.vars.icon=" ace-icon ";window.ace.vars[".icon"]=".ace-icon";ace.vars.touch="ontouchstart"in window;var n=navigator.userAgent;ace.vars.webkit=!!n.match(/AppleWebKit/i);ace.vars.safari=!!n.match(/Safari/i)&&!n.match(/Chrome/i);ace.vars.android=ace.vars.safari&&!!n.match(/Android/i);ace.vars.ios_safari=!!n.match(/OS ([4-9])(_\d)+ like Mac OS X/i)&&!n.match(/CriOS/i);ace.vars.ie=window.navigator.msPointerEnabled||document.all&&document.querySelector;ace.vars.old_ie=document.all&&!document.addEventListener;ace.vars.very_old_ie=document.all&&!document.querySelector;ace.vars.firefox="MozAppearance"in document.documentElement.style;ace.vars.non_auto_fixed=ace.vars.android||ace.vars.ios_safari;ace.click_event=ace.vars.touch&&jQuery.fn.tap?"tap":"click"}(),function(n){ace.demo={functions:{},init:function(n){var n=!!n&&!0,t;if(typeof requirejs=="undefined"||n)for(t in ace.demo.functions)ace.demo.functions.hasOwnProperty(t)&&ace.demo.functions[t]()}};ace.demo.functions.basics=function(){ace.vars.non_auto_fixed&&n("body").addClass("mob-safari");ace.vars.transition=ace.vars.animation||!!n.support.transition};ace.demo.functions.enableSidebar=function(){var t=n(".sidebar");n.fn.ace_sidebar&&t.ace_sidebar();n.fn.ace_sidebar_scroll&&t.ace_sidebar_scroll({include_toggle:!1||ace.vars.safari||ace.vars.ios_safari});n.fn.ace_sidebar_hover&&t.ace_sidebar_hover({sub_hover_delay:750,sub_scroll_style:"no-track scroll-thin scroll-margin scroll-visible"})};ace.demo.functions.enableDemoAjax=function(){if(n.fn.ace_ajax){window.Pace&&(window.paceOptions={ajax:!0,document:!0,eventLag:!1});var t={close_active:!0,close_mobile_menu:"#sidebar",close_dropdowns:!0,default_url:"page/index",content_url:function(n){if(!n.match(/^page\//))return!1;var t=document.location.pathname;return t.match(/(\/ajax\/)(index\.html)?/)?t.replace(/(\/ajax\/)(index\.html)?/,"/ajax/content/"+n.replace(/^page\//,"")+".html"):t+"?"+n.replace(/\//,"=")}};window.Pace&&(t.loading_overlay="body");n("[data-ajax-content=true]").ace_ajax(t);n(window).on("error.ace_ajax",function(){n("[data-ajax-content=true]").each(function(){var t=n(this);t.ace_ajax("working")&&(window.Pace&&Pace.running&&Pace.stop(),t.ace_ajax("stopLoading",!0))})})}};ace.demo.functions.handleScrollbars=function(){var t=!!n.fn.ace_scroll;if(t&&n(".dropdown-content").ace_scroll({reset:!1,mouseWheelLock:!0}),t&&!ace.vars.old_ie){n(window).on("resize.reset_scroll",function(){n(".ace-scroll:not(.scroll-disabled)").not(":hidden").ace_scroll("reset")});if(t)n(document).on("settings.ace.reset_scroll",function(t,i){i=="sidebar_collapsed"&&n(".ace-scroll:not(.scroll-disabled)").not(":hidden").ace_scroll("reset")})}};ace.demo.functions.dropdownAutoPos=function(){n(document).on("click.dropdown.pos",'.dropdown-toggle[data-position="auto"]',function(){var i=n(this).offset(),t=n(this.parentNode);parseInt(i.top+n(this).height())+50>ace.helper.scrollTop()+ace.helper.winHeight()-t.find(".dropdown-menu").eq(0).height()?t.addClass("dropup"):t.removeClass("dropup")})};ace.demo.functions.navbarHelpers=function(){n('.ace-nav [class*="icon-animated-"]').closest("a").one("click",function(){var t=n(this).find('[class*="icon-animated-"]').eq(0),i=t.attr("class").match(/icon\-animated\-([\d\w]+)/);t.removeClass(i[0])});n(document).on("click",".dropdown-navbar .nav-tabs",function(t){t.stopPropagation();var i,r=t.target;(i=n(t.target).closest("[data-toggle=tab]"))&&i.length>0&&(i.tab("show"),t.preventDefault(),n(window).triggerHandler("resize.navbar.dropdown"))})};ace.demo.functions.sidebarTooltips=function(){n(".sidebar .nav-list .badge[title],.sidebar .nav-list .badge[title]").each(function(){var t=n(this).attr("class").match(/tooltip\-(?:\w+)/);t=t?t[0]:"tooltip-error";n(this).tooltip({placement:function(t,i){var r=n(i).offset();return parseInt(r.left)<parseInt(document.body.scrollWidth/2)?"right":"left"},container:"body",template:'<div class="tooltip '+t+'"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>'})})};ace.demo.functions.scrollTopBtn=function(){var i=n(".btn-scroll-up"),t;if(i.length>0){t=!1;n(window).on("scroll.scroll_btn",function(){var n=ace.helper.scrollTop(),r=ace.helper.winHeight(),u=document.body.scrollHeight;n>parseInt(r/4)||n>0&&u>=r&&r+n>=u-1?t||(i.addClass("display"),t=!0):t&&(i.removeClass("display"),t=!1)}).triggerHandler("scroll.scroll_btn");i.on(ace.click_event,function(){var t=Math.min(500,Math.max(100,parseInt(ace.helper.scrollTop()/3)));return n("html,body").animate({scrollTop:0},t),!1})}};ace.demo.functions.someBrowserFix=function(){if(ace.vars.webkit){var t=n(".ace-nav").get(0);if(t)n(window).on("resize.webkit_fix",function(){ace.helper.redraw(t)})}ace.vars.ios_safari&&n(document).on("ace.settings.ios_fix",function(t,i,r){if(i=="navbar_fixed"&&(n(document).off("focus.ios_fix blur.ios_fix","input,textarea,.wysiwyg-editor"),r==!0))n(document).on("focus.ios_fix","input,textarea,.wysiwyg-editor",function(){n(window).on("scroll.ios_fix",function(){var t=n("#navbar").get(0);t&&ace.helper.redraw(t)})}).on("blur.ios_fix","input,textarea,.wysiwyg-editor",function(){n(window).off("scroll.ios_fix")})}).triggerHandler("ace.settings.ios_fix",["navbar_fixed",n("#navbar").css("position")=="fixed"])};ace.demo.functions.bsCollapseToggle=function(){n(document).on("hide.bs.collapse show.bs.collapse",function(t){var r=t.target.getAttribute("id"),i=n('a[href*="#'+r+'"]');(i.length==0&&(i=n('a[data-target*="#'+r+'"]')),i.length!=0)&&i.find(ace.vars[".icon"]).each(function(){var i=n(this),f,r=null,u=null;return(r=i.attr("data-icon-show"))?u=i.attr("data-icon-hide"):(f=i.attr("class").match(/fa\-(.*)\-(up|down)/))&&(r="fa-"+f[1]+"-down",u="fa-"+f[1]+"-up"),r?(t.type=="show"?i.removeClass(r).addClass(u):i.removeClass(u).addClass(r),!1):void 0})})};ace.demo.functions.smallDeviceDropdowns=function(){function t(){var t=n(this).find("> .dropdown-menu"),s,l,a,v,e;if(t.css("position")=="fixed"){var h=parseInt(n(window).width()),y=h>320?60:h>240?40:30,p=parseInt(h)-y,w=parseInt(n(window).height())-30,o=parseInt(Math.min(p,320));t.css("width",o);var c=!1,u=0,r=t.find(".tab-pane.active .dropdown-content.ace-scroll");r.length==0?r=t.find(".dropdown-content.ace-scroll"):c=!0;s=r.closest(".dropdown-menu");l=t[0].scrollHeight;r.length==1&&(a=r.find(".scroll-content")[0],a&&(l=a.scrollHeight),u+=s.find(".dropdown-header").outerHeight(),u+=s.find(".dropdown-footer").outerHeight(),v=s.closest(".tab-content"),v.length!=0&&(u+=v.siblings(".nav-tabs").eq(0).height()));var f=parseInt(Math.min(w,480,l+u)),b=parseInt(Math.abs((p+y-o)/2)),k=parseInt(Math.abs((w+30-f)/2)),d=parseInt(t.css("z-index"))||0;t.css({height:f,left:b,right:"auto",top:k-(c?3:1)});r.length==1&&(ace.vars.touch?r.ace_scroll("disable").css("max-height",f-u).addClass("overflow-scroll"):r.ace_scroll("update",{size:f-u}).ace_scroll("enable").ace_scroll("reset"));t.css("height",f+(c?7:2));t.hasClass("user-menu")&&(t.css("height",""),e=n(this).find(".user-info"),e.length==1&&e.css("position")=="fixed"?e.css({left:b,right:"auto",top:k,width:o-2,"max-width":o-2,"z-index":d+1}):e.css({left:"",right:"",top:"",width:"","max-width":"","z-index":""}));n(this).closest(".navbar.navbar-fixed-top").css("z-index",d)}else t.length!=0&&i.call(this,t)}function i(t){if(t=t||n(this).find("> .dropdown-menu"),t.length>0&&(t.css({width:"",height:"",left:"",right:"",top:""}).find(".dropdown-content").each(function(){ace.vars.touch&&n(this).css("max-height","").removeClass("overflow-scroll");var t=parseInt(n(this).attr("data-size")||0)||n.fn.ace_scroll.defaults.size;n(this).ace_scroll("update",{size:t}).ace_scroll("enable").ace_scroll("reset")}),t.hasClass("user-menu")))var i=n(this).find(".user-info").css({left:"",right:"",top:"",width:"","max-width":"","z-index":""});n(this).closest(".navbar").css("z-index","")}if(!ace.vars.old_ie)n(document).on("shown.bs.dropdown.navbar",".ace-nav > li.dropdown-modal",function(){t.call(this);var i=this;n(window).on("resize.navbar.dropdown",function(){t.call(i)})}).on("hidden.bs.dropdown.navbar",".ace-nav > li.dropdown-modal",function(){n(window).off("resize.navbar.dropdown");i.call(this)})}}(jQuery),function(n){n.unCamelCase=function(n){return n.replace(/([a-z])([A-Z])/g,function(n,t,i){return t+"-"+i.toLowerCase()})};n.strToVal=function(n){var t=n.match(/^(?:(true)|(false)|(null)|(\-?[\d]+(?:\.[\d]+)?)|(\[.*\]|\{.*\}))$/i),i=n;if(t)if(t[1])i=!0;else if(t[2])i=!1;else if(t[3])i=null;else if(t[4])i=parseFloat(n);else if(t[5])try{i=JSON.parse(n)}catch(r){}return i};n.getAttrSettings=function(t,i,r){var o,r,f,u,e,s,h;if(t){o=i instanceof Array?1:2;r=r?r.replace(/([^\-])$/,"$1-"):"";r="data-"+r;f={};for(u in i)if(i.hasOwnProperty(u)){if(e=o==1?i[u]:u,h=n.unCamelCase(e.replace(/[^A-Za-z0-9]{1,}/g,"-")).toLowerCase(),!(s=t.getAttribute(r+h)))continue;f[e]=n.strToVal(s)}return f}};n.scrollTop=function(){return document.scrollTop||document.documentElement.scrollTop||document.body.scrollTop};n.winHeight=function(){return window.innerHeight||document.documentElement.clientHeight};n.redraw=function(n,t){if(n){var i=n.style.display;n.style.display="none";n.offsetHeight;t!==!0?n.style.display=i:setTimeout(function(){n.style.display=i},10)}}}(ace.helper),function(n,t){function r(t,r){function a(t){var u="",i=n(".breadcrumb"),r;return i.length>0&&i.is(":visible")&&(i.find("> li:not(:first-child)").remove(),r=0,t.parents(".nav li").each(function(){var o=n(this).find("> a"),e=o.clone(),t,s,f;e.find("i,.fa,.glyphicon,.ace-icon,.menu-icon,.badge,.label").remove();t=e.text();e.remove();s=o.attr("href");r==0?(f=n('<li class="active"><\/li>').appendTo(i),f.text(t),u=t):(f=n("<li><a /><\/li>").insertAfter(i.find("> li:first-child")),f.find("a").attr("href",s).text(t));r++})),u}function v(t){var r=f.find(".ajax-append-title"),i;r.length>0?(document.title=r.text(),r.remove()):t.length>0&&(i=n.trim(String(document.title).replace(/^(.*)[\-]/,"")),i&&(i=" - "+i),t=n.trim(t)+i)}var f=n(t),u=this,c,o,e,h,s,l;f.attr("data-ajax-content","true");c=ace.helper.getAttrSettings(t,n.fn.ace_ajax.defaults);this.settings=n.extend({},n.fn.ace_ajax.defaults,r,c);o=!1;e=n();this.force_reload=!1;this.loadUrl=function(n,t,i){var r=!1;n=n.replace(/^(\#\!)?\#/,"");this.force_reload=t===!1;typeof this.settings.content_url=="function"&&(r=this.settings.content_url(n));typeof r=="string"&&this.getUrl(r,n,i)};this.loadAddr=function(n,t,i){this.force_reload=i===!1;this.getUrl(n,t,!1)};this.reload=function(){var t=n.trim(window.location.hash);!t&&this.settings.default_url&&(t=this.settings.default_url);this.loadUrl(t,!1)};this.post=function(t,i,r,u){var t=t||n.trim(location.href.replace(location.hash,"")),i,r;t&&(i=i||{},r=r||!1,this.getUrl(t,null,!1,"POST",i,r,u))};this.getUrl=function(t,i,r,s,h,c,l){var y;if(!o){var s=s||"GET",c=s=="GET"||s=="POST"&&c==!0,h=h||null,p;(f.trigger(p=n.Event("ajaxloadstart"),{url:t,hash:i,method:s,data:h}),p.isDefaultPrevented())||(u.startLoading(),y=s=="GET"?{url:t,cache:!this.force_reload}:{url:t,method:"POST",data:h},s=="POST"&&typeof l=="object"&&(y=n.extend({},y,l)),n.ajax(y).error(function(){f.trigger("ajaxloaderror",{url:t,hash:i,method:s,data:h});u.stopLoading(!0)}).done(function(o){var w,l,y,p,k,b;f.trigger("ajaxloaddone",{url:t,hash:i,method:s,data:h});s=="POST"&&(f.trigger(w=n.Event("ajaxpostdone",{url:t,data:h,result:o})),w.isDefaultPrevented()&&(c=!1));l=null;y="";typeof u.settings.update_active=="function"?l=u.settings.update_active.call(null,i,t,s,c):u.settings.update_active===!0&&i&&(l=n('a[data-url="'+i+'"]'),l.length>0&&(p=l.closest(".nav"),p.length>0&&(p.find(".active").each(function(){var t="active";(n(this).hasClass("hover")||u.settings.close_active)&&(t+=" open");n(this).removeClass(t);u.settings.close_active&&n(this).find(" > .submenu").css("display","")}),k=l.closest("li").addClass("active").parents(".nav li").addClass("active open"),p.closest(".sidebar[data-sidebar-scroll=true]").each(function(){var t=n(this);t.ace_sidebar_scroll("reset");r==!0&&t.ace_sidebar_scroll("scroll_to_active")}))));typeof u.settings.update_breadcrumbs=="function"?y=u.settings.update_breadcrumbs.call(null,i,t,l,s,c):u.settings.update_breadcrumbs===!0&&l!=null&&l.length>0&&(y=a(l));e.addClass("content-loaded").detach();c&&(o=String(o).replace(/<(title|link)([\s\>])/gi,'<div class="hidden ajax-append-$1"$2').replace(/<\/(title|link)\>/gi,"<\/div>"),f.empty().html(o));n(u.settings.loading_overlay||f).append(e);c&&setTimeout(function(){var r,t,i;for(n("head").find("link.ace-ajax-stylesheet").remove(),r=["link.ace-main-stylesheet","link#main-ace-style",'link[href*="/ace.min.css"]','link[href*="/ace.css"]'],t=[],i=0;i<r.length;i++)if(t=n("head").find(r[i]).first(),t.length>0)break;f.find(".ajax-append-link").each(function(){var r=n(this),i;r.attr("href")&&(i=jQuery("<link />",{type:"text/css",rel:"stylesheet","class":"ace-ajax-stylesheet"}),t.length>0?i.insertBefore(t):i.appendTo("head"),i.attr("href",r.attr("href")));r.remove()})},10);typeof u.settings.update_title=="function"?u.settings.update_title.call(null,i,t,y,s,c):u.settings.update_title===!0&&s=="GET"&&v(y);!r&&c&&n("html,body").animate({scrollTop:0},250);f.trigger("ajaxloadcomplete",{url:t,hash:i,method:s,data:h});b=/\.(?:\s*)ace(?:_a|A)jax(?:\s*)\((?:\s*)(?:\'|\")loadScripts(?:\'|\")/;o.match(b)?u.stopLoading():u.stopLoading(!0)}))}};h=!1;s=null;this.startLoading=function(){o||(o=!0,this.settings.loading_overlay||f.css("position")!="static"||(f.css("position","relative"),h=!0),e.remove(),e=n('<div class="ajax-loading-overlay"><i class="ajax-loading-icon '+(this.settings.loading_icon||"")+'"><\/i> '+this.settings.loading_text+"<\/div>"),this.settings.loading_overlay=="body"?n("body").append(e.addClass("ajax-overlay-body")):this.settings.loading_overlay?n(this.settings.loading_overlay).append(e):f.append(e),this.settings.max_load_wait!==!1&&(s=setTimeout(function(){if(s=null,o){var t;(f.trigger(t=n.Event("ajaxloadlong")),t.isDefaultPrevented())||u.stopLoading(!0)}},this.settings.max_load_wait*1e3)))};this.stopLoading=function(n){if(n===!0)o=!1,e.remove(),h&&(f.css("position",""),h=!1),s!=null&&(clearTimeout(s),s=null);else{e.addClass("almost-loaded");f.one("ajaxscriptsloaded.inner_call",function(){u.stopLoading(!0)})}};this.working=function(){return o};this.loadScripts=function(t,r){var t=t||[];n.ajaxPrefilter("script",function(n){n.cache=!0});setTimeout(function(){function e(){typeof r=="function"&&r();n('.btn-group[data-toggle="buttons"] > .btn').button();f.trigger("ajaxscriptsloaded")}function h(n){n+=1;n<t.length?l(n):e()}function l(r){if(r=r||0,!t[r])return h(r);var u="js-"+t[r].replace(/[^\w\d\-]/g,"-").replace(/\-\-/g,"-");i[u]!==!0?n.getScript(t[r]).done(function(){i[u]=!0}).complete(function(){c++;c>=s&&o?e():h(r)}):h(r)}for(var s=0,c=0,u=0;u<t.length;u++)t[u]&&function(){var n="js-"+t[u].replace(/[^\w\d\-]/g,"-").replace(/\-\-/g,"-");i[n]!==!0&&s++}();s>0?l():e()},10)};n(window).off("hashchange.ace_ajax").on("hashchange.ace_ajax",function(t,i){var r=n.trim(window.location.hash);if(r&&r.length!=0){if(u.settings.close_mobile_menu)try{n(u.settings.close_mobile_menu).ace_sidebar("mobileHide")}catch(t){}u.settings.close_dropdowns&&n(".dropdown.open .dropdown-toggle").dropdown("toggle");u.loadUrl(r,null,i)}}).trigger("hashchange.ace_ajax",[!0]);l=n.trim(window.location.hash);!l&&this.settings.default_url&&(window.location.hash=this.settings.default_url)}var i={};n.fn.aceAjax=n.fn.ace_ajax=function(i,u,f,e,o){var s,h=this.each(function(){var c=n(this),h=c.data("ace_ajax"),l=typeof i=="object"&&i;h||c.data("ace_ajax",h=new r(this,l));typeof i=="string"&&typeof h[i]=="function"&&(s=o!==t?h[i](u,f,e,o):e!==t?h[i](u,f,e):f!==t?h[i](u,f):h[i](u))});return s===t?h:s};n.fn.aceAjax.defaults=n.fn.ace_ajax.defaults={content_url:!1,default_url:!1,loading_icon:"fa fa-spin fa-spinner fa-2x orange",loading_text:"",loading_overlay:null,update_breadcrumbs:!0,update_title:!0,update_active:!0,close_active:!1,max_load_wait:!1,close_mobile_menu:!1,close_dropdowns:!1}}(window.jQuery),function(n,t){if(ace.vars.touch){var r="touchstart MSPointerDown pointerdown",u="touchend touchcancel MSPointerUp MSPointerCancel pointerup pointercancel",i="touchmove MSPointerMove MSPointerHover pointermove";n.event.special.ace_drag={setup:function(){var e=0,f=n(this);f.on(r,function(r){function v(n){var t,i;o&&(t=n.originalEvent.touches?n.originalEvent.touches[0]:n,s={coords:[t.pageX,t.pageY]},o&&s&&(h=0,c=0,l=Math.abs(c=o.coords[1]-s.coords[1])>e&&Math.abs(h=o.coords[0]-s.coords[0])<=Math.abs(c)?c>0?"up":"down":Math.abs(h=o.coords[0]-s.coords[0])>e&&Math.abs(c)<=Math.abs(h)?h>0?"left":"right":!1,l!==!1&&(i={cancel:!1},o.origin.trigger({type:"ace_drag",direction:l,dx:h,dy:c,retval:i}),i.cancel==!1&&n.preventDefault())),o.coords[0]=s.coords[0],o.coords[1]=s.coords[1])}var a=r.originalEvent.touches?r.originalEvent.touches[0]:r,o={coords:[a.pageX,a.pageY],origin:n(r.target)},s,l=!1,h=0,c=0;f.on(i,v).one(u,function(){f.off(i,v);o=s=t})})}}}}(window.jQuery),function(n,t){function r(r,u){function p(){this.mobile_view=this.mobile_style<4&&this.is_mobile_view();this.collapsible=!this.mobile_view&&this.is_collapsible();this.minimized=!this.collapsible&&this.$sidebar.hasClass(a)||this.mobile_style==3&&this.mobile_view&&this.$sidebar.hasClass(o);this.horizontal=!(this.mobile_view||this.collapsible)&&this.$sidebar.hasClass(v)}var f=this,l,s,h,e;this.$sidebar=n(r);this.$sidebar.attr("data-sidebar","true");this.$sidebar.attr("id")||this.$sidebar.attr("id","id-sidebar-"+ ++i);l=ace.helper.getAttrSettings(r,n.fn.ace_sidebar.defaults,"sidebar-");this.settings=n.extend({},n.fn.ace_sidebar.defaults,u,l);this.minimized=!1;this.collapsible=!1;this.horizontal=!1;this.mobile_view=!1;this.vars=function(){return{minimized:this.minimized,collapsible:this.collapsible,horizontal:this.horizontal,mobile_view:this.mobile_view}};this.get=function(n){if(this.hasOwnProperty(n))return this[n]};this.set=function(n,t){this.hasOwnProperty(n)&&(this[n]=t)};this.ref=function(){return this};s=function(t,i){var r=n(this).find(ace.vars[".icon"]),u,f;if(r.length>0){u=r.attr("data-icon1");f=r.attr("data-icon2");typeof t!="undefined"?t?r.removeClass(u).addClass(f):r.removeClass(f).addClass(u):r.toggleClass(u).toggleClass(f);try{i!==!1&&ace.settings.saveState(r.get(0))}catch(e){}}};h=function(){var t=f.$sidebar.find(".sidebar-collapse");return t.length==0&&(t=n('.sidebar-collapse[data-target="#'+(f.$sidebar.attr("id")||"")+'"]')),t.length!=0?t[0]:null};this.toggleMenu=function(t,i){if(!this.collapsible){this.minimized=!this.minimized;var i=!(t===!1||i===!1);this.minimized?this.$sidebar.addClass("menu-min"):this.$sidebar.removeClass("menu-min");try{i&&ace.settings.saveState(r,"class","menu-min",this.minimized)}catch(u){}t||(t=h());t&&s.call(t,this.minimized,i);ace.vars.old_ie&&ace.helper.redraw(r);n(document).trigger("settings.ace",["sidebar_collapsed",this.minimized,r,i])}};this.collapse=function(n,t){this.collapsible||(this.minimized=!1,this.toggleMenu(n,t))};this.expand=function(n,t){this.collapsible||(this.minimized=!0,this.toggleMenu(n,t))};this.showResponsive=function(){this.$sidebar.removeClass(o).removeClass(c)};this.toggleResponsive=function(t,i){var u,i,r,f,e;this.mobile_view&&this.mobile_style==3&&(this.$sidebar.hasClass("menu-min")&&(this.$sidebar.removeClass("menu-min"),u=h(),u&&s.call(u)),i=typeof i!="undefined"?i:this.$sidebar.hasClass(o),i?this.$sidebar.addClass(c).removeClass(o):this.$sidebar.removeClass(c).addClass(o),this.minimized=!i,t||(t=this.$sidebar.find(".sidebar-expand"),t.length==0&&(t=n('.sidebar-expand[data-target="#'+(this.$sidebar.attr("id")||"")+'"]')),t=t.length!=0?t[0]:null),t&&(r=n(t).find(ace.vars[".icon"]),r.length>0&&(f=r.attr("data-icon1"),e=r.attr("data-icon2"),i?r.removeClass(f).addClass(e):r.removeClass(e).addClass(f))),n(document).triggerHandler("settings.ace",["sidebar_collapsed",this.minimized]))};this.is_collapsible=function(){var t;return this.$sidebar.hasClass("navbar-collapse")&&(t=n('.navbar-toggle[data-target="#'+(this.$sidebar.attr("id")||"")+'"]').get(0))!=null&&t.scrollHeight>0};this.is_mobile_view=function(){var t;return(t=n('.menu-toggler[data-target="#'+(this.$sidebar.attr("id")||"")+'"]').get(0))!=null&&t.scrollHeight>0};this.$sidebar.on(ace.click_event+".ace.submenu",".nav-list",function(t){var h=this,r=n(t.target).closest("a"),o,e,i,s;if(r&&r.length!=0){if(o=f.minimized&&!f.collapsible,!r.hasClass("dropdown-toggle"))return ace.click_event=="tap"&&o&&r.get(0).parentNode.parentNode==h&&(e=r.find(".menu-text").get(0),e!=null&&t.target!=e&&!n.contains(e,t.target))?(t.preventDefault(),!1):ace.vars.ios_safari&&r.attr("data-link")!=="false"?(document.location=r.attr("href"),t.preventDefault(),!1):void 0;if(t.preventDefault(),i=r.siblings(".submenu").get(0),!i)return!1;var c=n(i),u=0,l=i.parentNode.parentNode;return o&&l==h||c.parent().hasClass("hover")&&c.css("position")=="absolute"&&!f.collapsible?!1:(s=i.scrollHeight==0,s&&f.settings.hide_open_subs&&n(l).find("> .open > .submenu").each(function(){this==i||n(this.parentNode).hasClass("active")||(u-=this.scrollHeight,f.hide(this,f.settings.duration,!1))}),s?(f.show(i,f.settings.duration),u!=0&&(u+=i.scrollHeight)):(f.hide(i,f.settings.duration),u-=i.scrollHeight),u!=0&&(f.$sidebar.attr("data-sidebar-scroll")!="true"||f.minimized||f.$sidebar.ace_sidebar_scroll("prehide",u)),!1)}});e=!1;this.show=function(t,i,r){var u,s,f,o;if((r=r!==!1,r&&e)||(u=n(t),u.trigger(s=n.Event("show.ace.submenu")),s.isDefaultPrevented()))return!1;if(r&&(e=!0),i=typeof i!="undefined"?i:this.settings.duration,u.css({height:0,overflow:"hidden",display:"block"}).removeClass("nav-hide").addClass("nav-show").parent().addClass("open"),t.scrollTop=0,f=function(t,i){t&&t.stopPropagation();u.css({"transition-property":"","transition-duration":"",overflow:"",height:""});i!==!1&&u.trigger(n.Event("shown.ace.submenu"));r&&(e=!1)},o=t.scrollHeight,i!=0&&o!=0&&n.support.transition.end){u.css({height:o,"transition-property":"height","transition-duration":i/1e3+"s"}).one(n.support.transition.end,f);ace.vars.android&&setTimeout(function(){f(null,!1);ace.helper.redraw(t)},i+20)}else f();return!0};this.hide=function(t,i,r){var u,s,o,f;if((r=r!==!1,r&&e)||(u=n(t),u.trigger(s=n.Event("hide.ace.submenu")),s.isDefaultPrevented()))return!1;if(r&&(e=!0),i=typeof i!="undefined"?i:this.settings.duration,o=t.scrollHeight,u.css({height:o,overflow:"hidden",display:"block"}).parent().removeClass("open"),t.offsetHeight,f=function(t,i){t&&t.stopPropagation();u.css({display:"none",overflow:"",height:"","transition-property":"","transition-duration":""}).removeClass("nav-show").addClass("nav-hide");i!==!1&&u.trigger(n.Event("hidden.ace.submenu"));r&&(e=!1)},i!=0&&o!=0&&n.support.transition.end){u.css({height:0,"transition-property":"height","transition-duration":i/1e3+"s"}).one(n.support.transition.end,f);ace.vars.android&&setTimeout(function(){f(null,!1);ace.helper.redraw(t)},i+20)}else f();return!0};this.toggle=function(n,t){if(t=t||f.settings.duration,n.scrollHeight==0){if(this.show(n,t))return 1}else if(this.hide(n,t))return-1;return 0};var a="menu-min",o="responsive-min",c="responsive-max",v="h-sidebar",y=function(){this.mobile_style=1;this.$sidebar.hasClass("responsive")&&!n('.menu-toggler[data-target="#'+this.$sidebar.attr("id")+'"]').hasClass("navbar-toggle")?this.mobile_style=2:this.$sidebar.hasClass(o)?this.mobile_style=3:this.$sidebar.hasClass("navbar-collapse")&&(this.mobile_style=4)};y.call(f);n(window).on("resize.sidebar.vars",function(){p.call(f)}).triggerHandler("resize.sidebar.vars");this.mobileToggle=function(n){var n=typeof n=="undefined"?t:n;this.mobile_view?this.mobile_style==1||this.mobile_style==2?this.toggleMobile(null,n):this.mobile_style==3&&this.toggleResponsive(null,n):this.collapsible&&this.toggleCollapsible(null,n)};this.mobileShow=function(){this.mobileToggle(!0)};this.mobileHide=function(){this.mobileToggle(!1)};this.toggleMobile=function(t,i){if(this.mobile_style==1||this.mobile_style==2){var i=typeof i!="undefined"?i:!this.$sidebar.hasClass("display");t||(t=n('.menu-toggler[data-target="#'+(this.$sidebar.attr("id")||"")+'"]'),t=t.length!=0?t[0]:null);i?(this.$sidebar.addClass("display"),t&&n(t).addClass("display")):(this.$sidebar.removeClass("display"),t&&n(t).removeClass("display"))}};this.toggleCollapsible=function(n,t){if(this.mobile_style==4){var t=typeof t!="undefined"?t:!this.$sidebar.hasClass("in");t?this.$sidebar.collapse("show"):(this.$sidebar.removeClass("display"),this.$sidebar.collapse("hide"))}}}var i=0;n(document).on(ace.click_event+".ace.menu",".menu-toggler",function(t){var f=n(this),i=n(f.attr("data-target")),r,u;if(i.length!=0){if(t.preventDefault(),i.ace_sidebar("toggleMobile",this),r=ace.click_event+".ace.autohide",u=i.attr("data-auto-hide")==="true",f.hasClass("display")){if(u)n(document).on(r,function(t){if(i.get(0)==t.target||n.contains(i.get(0),t.target)){t.stopPropagation();return}i.ace_sidebar("toggleMobile",this,!1);n(document).off(r)});i.attr("data-sidebar-scroll")=="true"&&i.ace_sidebar_scroll("reset")}else u&&n(document).off(r);return!1}}).on(ace.click_event+".ace.menu",".sidebar-collapse",function(t){var r=n(this).attr("data-target"),i=null;(r&&(i=n(r)),(i==null||i.length==0)&&(i=n(this).closest(".sidebar")),i.length!=0)&&(t.preventDefault(),i.ace_sidebar("toggleMenu",this))}).on(ace.click_event+".ace.menu",".sidebar-expand",function(t){var u=n(this).attr("data-target"),i=null,f,r;if((u&&(i=n(u)),(i==null||i.length==0)&&(i=n(this).closest(".sidebar")),i.length!=0)&&(f=this,t.preventDefault(),i.ace_sidebar("toggleResponsive",this),r=ace.click_event+".ace.autohide",i.attr("data-auto-hide")==="true"))if(i.hasClass(responsive_max_class))n(document).on(r,function(t){if(i.get(0)==t.target||n.contains(i.get(0),t.target)){t.stopPropagation();return}i.ace_sidebar("toggleResponsive",f);n(document).off(r)});else n(document).off(r)});n.fn.ace_sidebar=function(i,u,f){var e,o=this.each(function(){var s=n(this),o=s.data("ace_sidebar"),h=typeof i=="object"&&i;o||s.data("ace_sidebar",o=new r(this,h));typeof i=="string"&&typeof o[i]=="function"&&(e=u instanceof Array?o[i].apply(o,u):f!==t?o[i](u,f):o[i](u))});return e===t?o:e};n.fn.ace_sidebar.defaults={duration:300,hide_open_subs:!0}}(window.jQuery),function(n,t){function u(t,u){var f=this,ut=n(window),c=n(t),e=c.find(".nav-list"),v=c.find(".sidebar-toggle").eq(0),k=c.find(".sidebar-shortcuts").eq(0),s=e.get(0),tt,d,y,w;if(s){tt=ace.helper.getAttrSettings(t,n.fn.ace_sidebar_scroll.defaults);this.settings=n.extend({},n.fn.ace_sidebar_scroll.defaults,u,tt);d=f.settings.scroll_to_active;y=c.ace_sidebar("ref");c.attr("data-sidebar-scroll","true");var h=null,l=null,g=null,p=null,a=null,o=null;this.is_scrolling=!1;w=!1;this.sidebar_fixed=i(t,"fixed");var b,it,nt=function(){var n=e.parent().offset();return f.sidebar_fixed&&(n.top-=ace.helper.scrollTop()),ut.innerHeight()-n.top-(f.settings.include_toggle?0:v.outerHeight())+1},ft=function(){return s.clientHeight},rt=function(t){var i,u,c,y,tt;if(!w&&f.sidebar_fixed){e.wrap('<div class="nav-wrap-up pos-rel" />');e.after("<div><div><\/div><\/div>");e.wrap('<div class="nav-wrap" />');f.settings.include_toggle||v.css({"z-index":1});f.settings.include_shortcuts||k.css({"z-index":99});h=e.parent().next().ace_scroll({size:nt(),mouseWheelLock:!0,hoverReset:!1,dragEvent:!0,styleClass:f.settings.scroll_style,touchDrag:!1}).closest(".ace-scroll").addClass("nav-scroll");o=h.data("ace_scroll");l=h.find(".scroll-content").eq(0);g=l.find(" > div").eq(0);a=n(o.get_track());p=a.find(".scroll-bar").eq(0);f.settings.include_shortcuts&&k.length!=0&&(e.parent().prepend(k).wrapInner("<div />"),e=e.parent());f.settings.include_toggle&&v.length!=0&&(e.append(v),e.closest(".nav-wrap").addClass("nav-wrap-t"));e.css({position:"relative"});f.settings.scroll_outside==!0&&h.addClass("scrollout");s=e.get(0);s.style.top=0;l.on("scroll.nav",function(){s.style.top=-1*this.scrollTop+"px"});e.on(!n.event.special.mousewheel?"mousewheel.ace_scroll DOMMouseScroll.ace_scroll":"mousewheel.ace_scroll",function(n){return!f.is_scrolling||!o.is_active()?!f.settings.lock_anyway:h.trigger(n)});e.on("mouseenter.ace_scroll",function(){a.addClass("scroll-hover")}).on("mouseleave.ace_scroll",function(){a.removeClass("scroll-hover")});i=l.get(0);e.on("ace_drag.nav",function(t){if(!f.is_scrolling||!o.is_active()){t.retval.cancel=!0;return}if(n(t.target).closest(".can-scroll").length!=0){t.retval.cancel=!0;return}if(t.direction=="up"||t.direction=="down"){o.move_bar(!0);var r=t.dy;r=parseInt(Math.min(b,r));Math.abs(r)>2&&(r=r*2);r!=0&&(i.scrollTop=i.scrollTop+r,s.style.top=-1*i.scrollTop+"px")}});if(f.settings.smooth_scroll)e.on("touchstart.nav MSPointerDown.nav pointerdown.nav",function(){e.css("transition-property","none");p.css("transition-property","none")}).on("touchend.nav touchcancel.nav MSPointerUp.nav MSPointerCancel.nav pointerup.nav pointercancel.nav",function(){e.css("transition-property","top");p.css("transition-property","top")});if(r&&!f.settings.include_toggle&&(u=v.get(0),u))l.on("scroll.safari",function(){ace.helper.redraw(u)});if(w=!0,t==!0&&(f.reset(),d&&f.scroll_to_active(),d=!1),typeof f.settings.smooth_scroll=="number"&&f.settings.smooth_scroll>0){e.css({"transition-property":"top","transition-duration":(f.settings.smooth_scroll/1e3).toFixed(2)+"s"});p.css({"transition-property":"top","transition-duration":(f.settings.smooth_scroll/1500).toFixed(2)+"s"});h.on("drag.start",function(n){n.stopPropagation();e.css("transition-property","none")}).on("drag.end",function(n){n.stopPropagation();e.css("transition-property","top")})}if(ace.vars.android){c=ace.helper.scrollTop();c<2&&(window.scrollTo(c,0),setTimeout(function(){f.reset()},20));y=ace.helper.winHeight();n(window).on("scroll.ace_scroll",function(){f.is_scrolling&&o.is_active()&&(tt=ace.helper.winHeight(),tt!=y&&(y=tt,f.reset()))})}}};this.scroll_to_active=function(){var n,u,t,f,i,r;if(o&&o.is_active())try{for(u=y.vars(),t=c.find(".nav-list"),u.minimized&&!u.collapsible?n=t.find("> .active"):(n=e.find("> .active.hover"),n.length==0&&(n=e.find(".active:not(.open)"))),f=n.outerHeight(),t=t.get(0),i=n.get(0);i!=t;)f+=i.offsetTop,i=i.parentNode;r=f-h.height();r>0&&(s.style.top=-r+"px",l.scrollTop(r))}catch(a){}};this.reset=function(n){if(n===!0&&(this.sidebar_fixed=i(t,"fixed")),!this.sidebar_fixed){this.disable();return}w||rt();var r=y.vars(),u=!r.collapsible&&!r.horizontal&&(b=nt())<(it=s.clientHeight);this.is_scrolling=!0;u&&(g.css({height:it,width:8}),h.prev().css({"max-height":b}),o.update({size:b}),o.enable(),o.reset());u&&o.is_active()?c.addClass("sidebar-scroll"):this.is_scrolling&&this.disable()};this.disable=function(){if(this.is_scrolling=!1,h&&(h.css({height:"","max-height":""}),g.css({height:"",width:""}),h.prev().css({"max-height":""}),o.disable()),parseInt(s.style.top)<0&&f.settings.smooth_scroll&&n.support.transition.end)e.one(n.support.transition.end,function(){c.removeClass("sidebar-scroll");e.off(".trans")});else c.removeClass("sidebar-scroll");s.style.top=0};this.prehide=function(n){if(this.is_scrolling&&!y.get("minimized"))if(ft()+n<nt())this.disable();else if(n<0){var t=l.scrollTop()+n;if(t<0)return;s.style.top=-1*t+"px"}};this._reset=function(n){n===!0&&(this.sidebar_fixed=i(t,"fixed"));ace.vars.webkit?setTimeout(function(){f.reset()},0):this.reset()};this.set_hover=function(){a&&a.addClass("scroll-hover")};this.get=function(n){if(this.hasOwnProperty(n))return this[n]};this.set=function(n,t){this.hasOwnProperty(n)&&(this[n]=t)};this.ref=function(){return this};this.updateStyle=function(n){o!=null&&o.update({styleClass:n})};c.on("hidden.ace.submenu.sidebar_scroll shown.ace.submenu.sidebar_scroll",".submenu",function(n){n.stopPropagation();y.get("minimized")||(f._reset(),n.type=="shown"&&f.set_hover())});rt(!0)}}var r=ace.vars.safari&&navigator.userAgent.match(/version\/[1-5]/i),i="getComputedStyle"in window?function(n,t){return n.offsetHeight,window.getComputedStyle(n).position==t}:function(t,i){return t.offsetHeight,n(t).css("position")==i};n(document).on("settings.ace.sidebar_scroll",function(t,r){n(".sidebar[data-sidebar-scroll=true]").each(function(){var f=n(this),t=f.ace_sidebar_scroll("ref"),e,u;r=="sidebar_collapsed"&&i(this,"fixed")?(f.attr("data-sidebar-hover")=="true"&&f.ace_sidebar_hover("reset"),t._reset()):(r==="sidebar_fixed"||r==="navbar_fixed")&&(e=t.get("is_scrolling"),u=i(this,"fixed"),t.set("sidebar_fixed",u),u&&!e?t._reset():u||t.disable())})});n(window).on("resize.ace.sidebar_scroll",function(){n(".sidebar[data-sidebar-scroll=true]").each(function(){var r=n(this),t,u;r.attr("data-sidebar-hover")=="true"&&r.ace_sidebar_hover("reset");t=n(this).ace_sidebar_scroll("ref");u=i(this,"fixed");t.set("sidebar_fixed",u);t._reset()})});n.fn.ace_sidebar_scroll||(n.fn.ace_sidebar_scroll=function(i,r){var f,e=this.each(function(){var e=n(this),t=e.data("ace_sidebar_scroll"),o=typeof i=="object"&&i;t||e.data("ace_sidebar_scroll",t=new u(this,o));typeof i=="string"&&typeof t[i]=="function"&&(f=t[i](r))});return f===t?e:f},n.fn.ace_sidebar_scroll.defaults={scroll_to_active:!0,include_shortcuts:!0,include_toggle:!1,smooth_scroll:150,scroll_outside:!1,scroll_style:"",lock_anyway:!1})}(window.jQuery),function(n,t){function e(t,e){function ft(t){var e=t,r=n(e),i=null,u=!1;this.show=function(){i!=null&&clearTimeout(i);i=null;r.addClass("hover-show hover-shown");u=!0;for(var n=0;n<f.length;n++)f[n].find(".hover-show").not(".hover-shown").each(function(){y(this).hide()})};this.hide=function(){u=!1;r.removeClass("hover-show hover-shown hover-flip");i!=null&&clearTimeout(i);i=null;var n=r.find("> .submenu").get(0);n&&v(n,"hide")};this.hideDelay=function(n){i!=null&&clearTimeout(i);r.removeClass("hover-shown");i=setTimeout(function(){u=!1;r.removeClass("hover-show hover-flip");i=null;var t=r.find("> .submenu").get(0);t&&v(t,"hide");typeof n=="function"&&n.call(this)},tt.settings.sub_hover_delay)};this.is_visible=function(){return u}}function y(t){var i=n(t).data("subHide");return i||n(t).data("subHide",i=new ft(t)),i}function v(t,i){var r=n(t).data("ace_scroll");return r?typeof i=="string"?(r[i](),!0):r:!1}function nt(i){var o=n(this),p=n(i),nt,k,ft,g,at,vt,l,it,e,y,f,rt;i.style.top="";i.style.bottom="";nt=null;h.minimized&&(nt=o.find(".menu-text").get(0))&&(nt.style.marginTop="");var ut=ace.helper.scrollTop(),st=0,ht=ut;d&&(st=t.offsetTop,ht+=st+1);f=o.offset();f.top=parseInt(f.top);k=0;i.style.maxHeight="";ft=i.scrollHeight;g=o.height();nt&&(k=g,f.top+=k);var et=parseInt(f.top+ft),u=0,ct=b.height(),tt=parseInt(f.top-ht-k),yt=ct,lt=h.horizontal,ot=!1;if(lt&&this.parentNode==a&&(u=0,f.top+=o.height(),ot=!0),!ot&&(u=et-(ct+ut))>=0&&(u=u<tt?u:tt,u==0&&(u=20),tt-u>10&&(u+=parseInt(Math.min(25,tt-u))),f.top+(g-k)>et-u&&(u-=f.top+(g-k)-(et-u)),u>0&&(i.style.top=-u+"px",nt&&(nt.style.marginTop=-u+"px"))),u<0&&(u=0),at=u>0&&u>g-20,at?o.addClass("pull_up"):o.removeClass("pull_up"),lt)if(o.parent().parent().hasClass("hover-flip"))o.addClass("hover-flip");else{var pt=p.offset(),wt=p.width(),bt=b.width();pt.left+wt>bt&&o.addClass("hover-flip")}(vt=o.hasClass("hover")&&!h.mobile_view,vt&&p.find("> li > .submenu").length>0)||(l=yt-(f.top-ut)+u,it=u-l,it>0&&it<g&&(l+=parseInt(Math.max(g,g-it))),l-=5,l<90)||(e=!1,r?p.addClass("sub-scroll").css("max-height",l+"px"):(e=v(i),e==!1&&(p.ace_scroll({observeContent:!0,detached:!0,updatePos:!1,reset:!0,mouseWheelLock:!0,styleClass:s.settings.sub_scroll_style}),e=v(i),y=e.get_track(),y&&p.after(y)),e.update({size:l})),c=l,!r&&e&&(l>14&&ft-l>4?(e.enable(),e.reset()):e.disable(),y=e.get_track(),y&&(y.style.top=-(u-k-1)+"px",f=p.position(),rt=f.left,rt+=w?2:p.outerWidth()-e.track_size(),y.style.left=parseInt(rt)+"px",ot&&(y.style.left=parseInt(rt-2)+"px",y.style.top=parseInt(f.top)+(nt?k-2:0)+"px"))),ace.vars.safari&&ace.helper.redraw(i))}var s=this,tt=this,it=ace.helper.getAttrSettings(t,n.fn.ace_sidebar_hover.defaults),o,a,c;this.settings=n.extend({},n.fn.ace_sidebar_hover.defaults,e,it);o=n(t);a=o.find(".nav-list").get(0);o.attr("data-sidebar-hover","true");f.push(o);var h={},p=ace.vars.old_ie,w=!1,l=s.settings.sub_hover_delay||!1;i&&l&&(s.settings.sub_hover_delay=parseInt(Math.max(s.settings.sub_hover_delay,2500)));var b=n(window),k=n(".navbar").eq(0),d=k.css("position")=="fixed";if(this.update_vars=function(){d=k.css("position")=="fixed"},s.dirty=!1,this.reset=function(){s.dirty!=!1&&(s.dirty=!1,o.find(".submenu").each(function(){var t=n(this),i=t.parent();t.css({top:"",bottom:"","max-height":""});t.hasClass("ace-scroll")?t.ace_scroll("disable"):t.removeClass("sub-scroll");u(this,"absolute")?t.addClass("can-scroll"):t.removeClass("can-scroll");i.removeClass("pull_up").find(".menu-text:first").css("margin-top","")}),o.find(".hover-show").removeClass("hover-show hover-shown hover-flip"))},this.updateStyle=function(n){sub_scroll_style=n;o.find(".submenu.ace-scroll").ace_scroll("update",{styleClass:n})},this.changeDir=function(n){w=n==="right"},c=-1,!r)o.on("hide.ace.submenu.sidebar_hover",".submenu",function(t){if(!(c<1)){t.stopPropagation();var i=n(this).closest(".ace-scroll.can-scroll");i.length!=0&&u(i[0],"absolute")&&i[0].scrollHeight-this.scrollHeight<c&&i.ace_scroll("disable")}});if(!r)o.on("shown.ace.submenu.sidebar_hover hidden.ace.submenu.sidebar_hover",".submenu",function(){var t,i;c<1||(t=n(this).closest(".ace-scroll.can-scroll"),t.length!=0&&u(t[0],"absolute"))&&(i=t[0].scrollHeight,c>14&&i-c>4?t.ace_scroll("enable").ace_scroll("reset"):t.ace_scroll("disable"))});var g=-1,rt=i?"touchstart.sub_hover":"mouseenter.sub_hover",ut=i?"touchend.sub_hover touchcancel.sub_hover":"mouseleave.sub_hover";o.on(rt,".nav-list li, .sidebar-shortcuts",function(){var r,e,c,v,k;if(h=o.ace_sidebar("vars"),!h.collapsible){var f=n(this),w=!1,b=f.hasClass("hover"),t=f.find("> .submenu").get(0);if(!(t||this.parentNode==a||b||(w=f.hasClass("sidebar-shortcuts")))){t&&n(t).removeClass("can-scroll");return}if(r=t,e=!1,r||this.parentNode!=a||(r=f.find("> a > .menu-text").get(0)),!r&&w&&(r=f.find(".sidebar-shortcuts-large").get(0)),(!r||!(e=u(r,"absolute")))&&!b){t&&n(t).removeClass("can-scroll");return}c=l?y(this):null;t&&(e?(s.dirty=!0,v=ace.helper.scrollTop(),(l&&!c.is_visible()||!i&&v!=g||p)&&(n(t).addClass("can-scroll"),p||i?(k=this,setTimeout(function(){nt.call(k,t)},0)):nt.call(this,t)),g=v):n(t).removeClass("can-scroll"));l&&c.show()}}).on(ut,".nav-list li, .sidebar-shortcuts",function(){(h=o.ace_sidebar("vars"),h.collapsible)||n(this).hasClass("hover-show")&&l&&y(this).hideDelay()})}var f;if(!ace.vars.very_old_ie){var i=ace.vars.touch,r=ace.vars.old_ie||i,u="getComputedStyle"in window?function(n,t){return n.offsetHeight,window.getComputedStyle(n).position==t}:function(t,i){return t.offsetHeight,n(t).css("position")==i};n(window).on("resize.sidebar.ace_hover",function(){n(".sidebar[data-sidebar-hover=true]").ace_sidebar_hover("update_vars").ace_sidebar_hover("reset")});n(document).on("settings.ace.ace_hover",function(t,i){i=="sidebar_collapsed"?n(".sidebar[data-sidebar-hover=true]").ace_sidebar_hover("reset"):i=="navbar_fixed"&&n(".sidebar[data-sidebar-hover=true]").ace_sidebar_hover("update_vars")});f=[];n.fn.ace_sidebar_hover=function(i,r){var u,f=this.each(function(){var f=n(this),t=f.data("ace_sidebar_hover"),o=typeof i=="object"&&i;t||f.data("ace_sidebar_hover",t=new e(this,o));typeof i=="string"&&typeof t[i]=="function"&&(u=t[i](r))});return u===t?f:u};n.fn.ace_sidebar_hover.defaults={sub_sub_hover_delay:750,sub_scroll_style:"no-track scroll-thin"}}}(window.jQuery),function(n,t){function r(t,i){var r=t.find(".widget-main").eq(0),o,u,f,e;if(n(window).off("resize.widget.scroll"),o=ace.vars.old_ie||ace.vars.touch,i){u=r.data("ace_scroll");u&&r.data("save_scroll",{size:u.size,lock:u.lock,lock_anyway:u.lock_anyway});f=t.height()-t.find(".widget-header").height()-10;f=parseInt(f);r.css("min-height",f);o?(u&&r.ace_scroll("disable"),r.css("max-height",f).addClass("overflow-scroll")):(u?r.ace_scroll("update",{size:f,mouseWheelLock:!0,lockAnyway:!0}):r.ace_scroll({size:f,mouseWheelLock:!0,lockAnyway:!0}),r.ace_scroll("enable").ace_scroll("reset"));n(window).on("resize.widget.scroll",function(){var n=t.height()-t.find(".widget-header").height()-10;n=parseInt(n);r.css("min-height",n);o?r.css("max-height",n).addClass("overflow-scroll"):r.ace_scroll("update",{size:n}).ace_scroll("reset")})}else r.css("min-height",""),e=r.data("save_scroll"),e&&r.ace_scroll("update",{size:e.size,mouseWheelLock:e.lock,lockAnyway:e.lock_anyway}).ace_scroll("enable").ace_scroll("reset"),o?r.css("max-height","").removeClass("overflow-scroll"):e||r.ace_scroll("disable")}var i=function(t){this.$box=n(t);var i=this;this.reload=function(){var n=this.$box,t=!1;n.css("position")=="static"&&(t=!0,n.addClass("position-relative"));n.append('<div class="widget-box-overlay"><i class="'+ace.vars.icon+'loading-icon fa fa-spinner fa-spin fa-2x white"><\/i><\/div>');n.one("reloaded.ace.widget",function(){n.find(".widget-box-overlay").remove();t&&n.removeClass("position-relative")})};this.closeFast=function(){this.close(0)};this.close=function(n){var t=this.$box,n=typeof n=="undefined"?300:n;t.fadeOut(n,function(){t.trigger("closed.ace.widget");t.remove()})};this.toggleFast=function(){this.toggle(null,null,0,0)};this.toggle=function(n,t,i,r){var f=this.$box,s=f.find(".widget-body").eq(0),u=null,c=n||(f.hasClass("collapsed")?"show":"hide"),l=c=="show"?"shown":"hidden",h,e,o,i,r;t||(t=f.find("> .widget-header a[data-action=collapse]").eq(0),t.length==0&&(t=null));t&&(u=t.find(ace.vars[".icon"]).eq(0),e=null,o=null,(e=u.attr("data-icon-show"))?o=u.attr("data-icon-hide"):(h=u.attr("class").match(/fa\-(.*)\-(up|down)/))&&(e="fa-"+h[1]+"-down",o="fa-"+h[1]+"-up"));i=typeof i=="undefined"?250:i;r=typeof r=="undefined"?200:r;c=="show"?(u&&u.removeClass(e).addClass(o),s.hide(),f.removeClass("collapsed"),s.slideDown(i,function(){f.trigger(l+".ace.widget")})):(u&&u.removeClass(o).addClass(e),s.slideUp(r,function(){f.addClass("collapsed");f.trigger(l+".ace.widget")}))};this.hide=function(){this.toggle("hide")};this.show=function(){this.toggle("show")};this.fullscreen=function(){var n=this.$box.find("> .widget-header a[data-action=fullscreen]").find(ace.vars[".icon"]).eq(0),t=null,i=null;(t=n.attr("data-icon1"))?i=n.attr("data-icon2"):(t="fa-expand",i="fa-compress");this.$box.hasClass("fullscreen")?(n.addClass(t).removeClass(i),this.$box.removeClass("fullscreen"),r(this.$box,!1)):(n.removeClass(t).addClass(i),this.$box.addClass("fullscreen"),r(this.$box,!0));this.$box.trigger("fullscreened.ace.widget")}};n.fn.widget_box=function(r,u){var f,e=this.each(function(){var e=n(this),t=e.data("widget_box"),o=typeof r=="object"&&r;t||e.data("widget_box",t=new i(this,o));typeof r=="string"&&(f=t[r](u))});return f===t?e:f};n(document).on("click.ace.widget",".widget-header a[data-action]",function(t){var o,r,f,e,s,u;if(t.preventDefault(),o=n(this),r=o.closest(".widget-box"),r.length!=0&&!r.hasClass("ui-sortable-helper"))if(f=r.data("widget_box"),f||r.data("widget_box",f=new i(r.get(0))),e=o.data("action"),e=="collapse"){if(s=r.hasClass("collapsed")?"show":"hide",r.trigger(u=n.Event(s+".ace.widget")),u.isDefaultPrevented())return;f.toggle(s,o)}else if(e=="close"){if(r.trigger(u=n.Event("close.ace.widget")),u.isDefaultPrevented())return;f.close()}else if(e=="reload"){if(o.blur(),r.trigger(u=n.Event("reload.ace.widget")),u.isDefaultPrevented())return;f.reload()}else if(e=="fullscreen"){if(r.trigger(u=n.Event("fullscreen.ace.widget")),u.isDefaultPrevented())return;f.fullscreen()}else e=="settings"&&r.trigger("setting.ace.widget")})}(window.jQuery),function(n){n("#ace-settings-btn").on(ace.click_event,function(t){t.preventDefault();n(this).toggleClass("open");n("#ace-settings-box").toggleClass("open")});n("#ace-settings-navbar").on("click",function(){ace.settingFunction.navbar_fixed(null,this.checked)});n("#ace-settings-sidebar").on("click",function(){ace.settingFunction.sidebar_fixed(null,this.checked)});n("#ace-settings-breadcrumbs").on("click",function(){ace.settingFunction.breadcrumbs_fixed(null,this.checked)});n("#ace-settings-add-container").on("click",function(){ace.settingFunction.main_container_fixed(null,this.checked)});n("#ace-settings-compact").on("click",function(){if(this.checked){n("#sidebar").addClass("compact");var t=n("#ace-settings-hover");t.length>0&&t.removeAttr("checked").trigger("click")}else n("#sidebar").removeClass("compact"),n("#sidebar[data-sidebar-scroll=true]").ace_sidebar_scroll("reset");ace.vars.old_ie&&ace.helper.redraw(n("#sidebar")[0],!0)});n("#ace-settings-highlight").on("click",function(){this.checked?n("#sidebar .nav-list > li").addClass("highlight"):n("#sidebar .nav-list > li").removeClass("highlight");ace.vars.old_ie&&ace.helper.redraw(n("#sidebar")[0])});n("#ace-settings-hover").on("click",function(){if(!n("#sidebar").hasClass("h-sidebar")){if(this.checked)n("#sidebar li").addClass("hover").filter(".open").removeClass("open").find("> .submenu").css("display","none");else{n("#sidebar li.hover").removeClass("hover");var t=n("#ace-settings-compact");t.length>0&&t.get(0).checked&&t.trigger("click")}n(".sidebar[data-sidebar-hover=true]").ace_sidebar_hover("reset");n(".sidebar[data-sidebar-scroll=true]").ace_sidebar_scroll("reset");ace.vars.old_ie&&ace.helper.redraw(n("#sidebar")[0])}});var t=this;n(document).on("settings.ace",function(t,i,r,u,f){var e="";switch(i){case"navbar_fixed":e="ace-settings-navbar";break;case"sidebar_fixed":e="ace-settings-sidebar";break;case"breadcrumbs_fixed":e="ace-settings-breadcrumbs";break;case"main_container_fixed":e="ace-settings-add-container"}if(e&&(e=document.getElementById(e))){n(e).prop("checked",r);try{f==!0&&ace.settings.saveState(e,"checked")}catch(o){}}});ace.settingFunction={navbar_fixed:function(t,i,r,u){var t,i,r,e,f;if(ace.vars.very_old_ie||(t=t||"#navbar",typeof t=="string"&&(t=n(t).get(0)),!t)||(i=i||!1,r=typeof r!="undefined"?r:!0,n(document).trigger(e=n.Event("presettings.ace"),["navbar_fixed",i,t,r]),e.isDefaultPrevented()))return!1;u===!1||i||(f=n("#sidebar"),f.hasClass("sidebar-fixed")&&ace.settingFunction.sidebar_fixed(f.get(0),!1,r));i?n(t).addClass("navbar-fixed-top"):n(t).removeClass("navbar-fixed-top");r&&ace.settings.saveState(t,"class","navbar-fixed-top",i);n(document).trigger("settings.ace",["navbar_fixed",i,t,r])},sidebar_fixed:function(t,i,r,u){var t,i,r,e,f;if(ace.vars.very_old_ie||(t=t||"#sidebar",typeof t=="string"&&(t=n(t).get(0)),!t)||(i=i||!1,r=typeof r!="undefined"?r:!0,n(document).trigger(e=n.Event("presettings.ace"),["sidebar_fixed",i,t,r]),e.isDefaultPrevented()))return!1;u!==!1&&(i?ace.settingFunction.navbar_fixed(null,!0,r):ace.settingFunction.breadcrumbs_fixed(null,!1,r));f=n("#menu-toggler");i?(n(t).addClass("sidebar-fixed"),f.addClass("fixed")):(n(t).removeClass("sidebar-fixed"),f.removeClass("fixed"));r&&(ace.settings.saveState(t,"class","sidebar-fixed",i),f.length!=0&&ace.settings.saveState(f[0],"class","fixed",i));n(document).trigger("settings.ace",["sidebar_fixed",i,t,r])},breadcrumbs_fixed:function(t,i,r,u){var t,i,r,f;if(ace.vars.very_old_ie||(t=t||"#breadcrumbs",typeof t=="string"&&(t=n(t).get(0)),!t)||(i=i||!1,r=typeof r!="undefined"?r:!0,n(document).trigger(f=n.Event("presettings.ace"),["breadcrumbs_fixed",i,t,r]),f.isDefaultPrevented()))return!1;i&&u!==!1&&ace.settingFunction.sidebar_fixed(null,!0,r);i?n(t).addClass("breadcrumbs-fixed"):n(t).removeClass("breadcrumbs-fixed");r&&ace.settings.saveState(t,"class","breadcrumbs-fixed",i);n(document).trigger("settings.ace",["breadcrumbs_fixed",i,t,r])},main_container_fixed:function(t,i,r){var f,u;if(ace.vars.very_old_ie)return!1;var i=i||!1,r=typeof r!="undefined"?r:!0,t=t||"#main-container";if((typeof t=="string"&&(t=n(t).get(0)),!t)||(n(document).trigger(f=n.Event("presettings.ace"),["main_container_fixed",i,t,r]),f.isDefaultPrevented()))return!1;u=n("#navbar-container");i?(n(t).addClass("container"),n(u).addClass("container")):(n(t).removeClass("container"),n(u).removeClass("container"));r&&(ace.settings.saveState(t,"class","container",i),u.length!=0&&ace.settings.saveState(u[0],"class","container",i));navigator.userAgent.match(/webkit/i)&&(n("#sidebar").toggleClass("menu-min"),setTimeout(function(){n("#sidebar").toggleClass("menu-min")},10));n(document).trigger("settings.ace",["main_container_fixed",i,t,r])}}}(jQuery),function(n){n("#ace-settings-rtl").removeAttr("checked").on("click",function(){t()});var t=function(){function u(t){function r(n,t){i.find("."+n).removeClass(n).addClass("tmp-rtl-"+n).end().find("."+t).removeClass(t).addClass(n).end().find(".tmp-rtl-"+n).removeClass("tmp-rtl-"+n).addClass(t)}var f=n(document.body),i,e,u,o;t||f.toggleClass("rtl");t=t||document.body;i=n(t);i.find(".dropdown-menu:not(.datepicker-dropdown,.colorpicker)").toggleClass("dropdown-menu-right").end().find(".pull-right:not(.dropdown-menu,blockquote,.profile-skills .pull-right)").removeClass("pull-right").addClass("tmp-rtl-pull-right").end().find(".pull-left:not(.dropdown-submenu,.profile-skills .pull-left)").removeClass("pull-left").addClass("pull-right").end().find(".tmp-rtl-pull-right").removeClass("tmp-rtl-pull-right").addClass("pull-left").end().find(".chosen-select").toggleClass("chosen-rtl").next().toggleClass("chosen-rtl");r("align-left","align-right");r("no-padding-left","no-padding-right");r("arrowed","arrowed-right");r("arrowed-in","arrowed-in-right");r("tabs-left","tabs-right");r("messagebar-item-left","messagebar-item-right");n(".modal.aside-vc").ace_aside("flip").ace_aside("insideContainer");i.find(".fa").each(function(){var r,t,i;if(!this.className.match(/ui-icon/)&&!(n(this).closest(".fc-button").length>0))for(r=this.attributes.length,t=0;t<r;t++)i=this.attributes[t].value,i.match(/fa\-(?:[\w\-]+)\-left/)?this.attributes[t].value=i.replace(/fa\-([\w\-]+)\-(left)/i,"fa-$1-right"):i.match(/fa\-(?:[\w\-]+)\-right/)&&(this.attributes[t].value=i.replace(/fa\-([\w\-]+)\-(right)/i,"fa-$1-left"))});e=f.hasClass("rtl");e?(i.find(".scroll-hz").addClass("make-ltr").find(".scroll-content").wrapInner('<div class="make-rtl" />'),n(".sidebar[data-sidebar-hover=true]").ace_sidebar_hover("changeDir","right")):(i.find(".scroll-hz").removeClass("make-ltr").find(".make-rtl").children().unwrap(),n(".sidebar[data-sidebar-hover=true]").ace_sidebar_hover("changeDir","left"));n.fn.ace_scroll&&i.find(".scroll-hz").ace_scroll("reset");try{u=n("#piechart-placeholder");u.length>0&&(o=f.hasClass("rtl")?"nw":"ne",u.data("draw").call(u.get(0),u,u.data("chart"),o))}catch(s){}ace.helper.redraw(t,!0)}var t,i,r;n("#ace-rtl-stylesheet").length==0?(t=n("head").find("link.ace-main-stylesheet"),t.length==0&&(t=n("head").find('link[href*="/ace.min.css"],link[href*="/ace-part2.min.css"]'),t.length==0&&(t=n("head").find('link[href*="/ace.css"],link[href*="/ace-part2.css"]'))),i=n("head").find("link#ace-skins-stylesheet"),r=t.first().attr("href").replace(/(\.min)?\.css$/i,"-rtl$1.css"),n.ajax({url:r}).done(function(){var n=jQuery("<link />",{type:"text/css",rel:"stylesheet",id:"ace-rtl-stylesheet"});i.length>0?n.insertAfter(i):t.length>0?n.insertAfter(t.last()):n.appendTo("head");n.attr("href",r);u();window.Pace&&Pace.running&&Pace.stop()})):u();n(".page-content-area[data-ajax-content=true]").on("ajaxscriptsloaded.rtl",function(){n("body").hasClass("rtl")&&u(this)})}}(jQuery),function(n){try{n("#skin-colorpicker").ace_colorpicker({auto_pos:!1})}catch(t){}n("#skin-colorpicker").on("change",function(){function u(t){var r=n(document.body),u,f,i;r.removeClass("no-skin skin-1 skin-2 skin-3");r.addClass(t);ace.data.set("skin",t);u=["red","blue","green",""];n(".ace-nav > li.grey").removeClass("dark");n(".ace-nav > li").removeClass("no-border margin-1");n(".ace-nav > li:not(:last-child)").removeClass("light-pink").find("> a > "+ace.vars[".icon"]).removeClass("pink").end().eq(0).find(".badge").removeClass("badge-warning");n(".sidebar-shortcuts .btn").removeClass("btn-pink btn-white").find(ace.vars[".icon"]).removeClass("white");n(".ace-nav > li.grey").removeClass("red").find(".badge").removeClass("badge-yellow");n(".sidebar-shortcuts .btn").removeClass("btn-primary btn-white");i=0;n(".sidebar-shortcuts .btn").each(function(){n(this).find(ace.vars[".icon"]).removeClass(u[i++])});f=["btn-success","btn-info","btn-warning","btn-danger"];t=="no-skin"?(i=0,n(".sidebar-shortcuts .btn").each(function(){n(this).attr("class","btn "+f[i++%4])}),n(".sidebar[data-sidebar-scroll=true]").ace_sidebar_scroll("updateStyle",""),n(".sidebar[data-sidebar-hover=true]").ace_sidebar_hover("updateStyle","no-track scroll-thin")):t=="skin-1"?(n(".ace-nav > li.grey").addClass("dark"),i=0,n(".sidebar-shortcuts").find(".btn").each(function(){n(this).attr("class","btn "+f[i++%4])}),n(".sidebar[data-sidebar-scroll=true]").ace_sidebar_scroll("updateStyle","scroll-white no-track"),n(".sidebar[data-sidebar-hover=true]").ace_sidebar_hover("updateStyle","no-track scroll-thin scroll-white")):t=="skin-2"?(n(".ace-nav > li").addClass("no-border margin-1"),n(".ace-nav > li:not(:last-child)").addClass("light-pink").find("> a > "+ace.vars[".icon"]).addClass("pink").end().eq(0).find(".badge").addClass("badge-warning"),n(".sidebar-shortcuts .btn").attr("class","btn btn-white btn-pink").find(ace.vars[".icon"]).addClass("white"),n(".sidebar[data-sidebar-scroll=true]").ace_sidebar_scroll("updateStyle","scroll-white no-track"),n(".sidebar[data-sidebar-hover=true]").ace_sidebar_hover("updateStyle","no-track scroll-thin scroll-white")):t=="skin-3"&&(r.addClass("no-skin"),n(".ace-nav > li.grey").addClass("red").find(".badge").addClass("badge-yellow"),i=0,n(".sidebar-shortcuts .btn").each(function(){n(this).attr("class","btn btn-primary btn-white");n(this).find(ace.vars[".icon"]).addClass(u[i++])}),n(".sidebar[data-sidebar-scroll=true]").ace_sidebar_scroll("updateStyle","scroll-dark no-track"),n(".sidebar[data-sidebar-hover=true]").ace_sidebar_hover("updateStyle","no-track scroll-thin"));n(".sidebar[data-sidebar-scroll=true]").ace_sidebar_scroll("reset");ace.vars.old_ie&&ace.helper.redraw(document.body,!0)}var r=n(this).find("option:selected").data("skin"),t,i;n("#ace-skins-stylesheet").length==0?(t=n("head").find("link.ace-main-stylesheet"),t.length==0&&(t=n("head").find('link[href*="/ace.min.css"],link[href*="/ace-part2.min.css"]'),t.length==0&&(t=n("head").find('link[href*="/ace.css"],link[href*="/ace-part2.css"]'))),i=t.first().attr("href").replace(/(\.min)?\.css$/i,"-skins$1.css"),n.ajax({url:i}).done(function(){var n=jQuery("<link />",{type:"text/css",rel:"stylesheet",id:"ace-skins-stylesheet"});t.length>0?n.insertAfter(t.last()):n.appendTo("head");n.attr("href",i);u(r);window.Pace&&Pace.running&&Pace.stop()})):u(r)})}(jQuery),function(n){n(document).on("reload.ace.widget",".widget-box",function(){var t=n(this);setTimeout(function(){t.trigger("reloaded.ace.widget")},parseInt(Math.random()*1e3+1e3))})}(window.jQuery),function(n){ace.vars.US_STATES=["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Dakota","North Carolina","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"];try{n("#nav-search-input").bs_typeahead({source:ace.vars.US_STATES,updater:function(t){return n("#nav-search-input").focus(),t}})}catch(t){}}(window.jQuery),typeof jQuery=="undefined")throw new Error("Ace's JavaScript requires jQuery");(function(n,t){var i=function(t,i){function ai(n){n.preventDefault();n.stopPropagation();var u=r.offset(),t=u[g],i=f?n.pageY:n.pageX;i>t+e?(e=i-t-rt+dt,e>d&&(e=d)):(e=i-t-dt,e<0&&(e=0));h.update_scroll()}function vi(t){t.preventDefault();t.stopPropagation();a=f?p=t.pageY:p=t.pageX;ot=!0;n("html").off("mousemove.ace_scroll").on("mousemove.ace_scroll",yi);n(gt).off("mouseup.ace_scroll").on("mouseup.ace_scroll",pi);r.addClass("active");vt&&h.$element.trigger("drag.start")}function yi(n){n.preventDefault();n.stopPropagation();a=f?n.pageY:n.pageX;a-p+e>d?a=p+d-e:a-p+e<0&&(a=p-e);e=e+(a-p);p=a;e<0?e=0:e>d&&(e=d);h.update_scroll()}function pi(t){t.preventDefault();t.stopPropagation();ot=!1;n("html").off(".ace_scroll");n(gt).off(".ace_scroll");r.removeClass("active");vt&&h.$element.trigger("drag.end");v&&st&&!pt&&ri()}function bt(n){var i=+new Date,t;wt&&i-ii>1e3&&(t=s[nt],ti!=t&&(ti=t,it=!0,h.reset(!0)),ii=i);v&&st&&(l!=null&&(clearTimeout(l),l=null),r.addClass("not-idle"),pt||n!=!0||ri())}function ri(){l!=null&&(clearTimeout(l),l=null);l=setTimeout(function(){l=null;r.removeClass("not-idle")},ni)}function ui(){r.css("visibility","hidden").addClass("scroll-hover");b=f?parseInt(r.outerWidth())||0:parseInt(r.outerHeight())||0;r.css("visibility","").removeClass("scroll-hover")}function hi(){if(yt!==!1){var i=o.offset(),n=i.left,t=i.top;f?lt||(n+=o.outerWidth()-b):lt||(t+=o.outerHeight()-b);yt===!0?r.css({top:parseInt(t),left:parseInt(n)}):yt==="left"?r.css("left",parseInt(n)):yt==="top"&&r.css("top",parseInt(t))}}var h=this,ci=ace.helper.getAttrSettings(t,n.fn.ace_scroll.defaults),u=n.extend({},n.fn.ace_scroll.defaults,i,ci),p,a,l,ii;this.size=0;this.lock=!1;this.lock_anyway=!1;this.$element=n(t);this.element=t;var f=!0,w=!1,v=!1,ht=!1,o=null,s=null,r=null,kt=null,fi=null,ei=null,k=null,rt=0,e=0,d=0,dt=0,ct=!0,oi=!1,y="",lt=!1,b=0,g,ut,ft,si,c,nt,et=1,at=!1,ot=!1,gt="onmouseup"in window?window:"html",vt=u.dragEvent||!1,li=i.scrollEvent||!1,tt=u.detached||!1,yt=u.updatePos||!1,st=u.hideOnIdle||!1,ni=u.hideDelay||1500,pt=!1,wt=u.observeContent||!1,ti=0,it=!0;return this.ref=function(){return this},this.create=function(t){var a,l,i,p;if(!ht){t&&(u=n.extend({},n.fn.ace_scroll.defaults,t));this.size=parseInt(this.$element.attr("data-size"))||u.size||200;f=!u.horizontal;g=f?"top":"left";ut=f?"height":"width";ft=f?"maxHeight":"maxWidth";si=f?"clientHeight":"clientWidth";c=f?"scrollTop":"scrollLeft";nt=f?"scrollHeight":"scrollWidth";this.$element.addClass("ace-scroll");this.$element.css("position")=="static"?(at=this.element.style.position,this.element.style.position="relative"):at=!1;a=null;tt?a=n('<div class="scroll-track scroll-detached"><div class="scroll-bar"><\/div><\/div>').appendTo("body"):(this.$element.wrapInner('<div class="scroll-content" />'),this.$element.prepend('<div class="scroll-track"><div class="scroll-bar"><\/div><\/div>'));o=this.$element;tt||(o=this.$element.find(".scroll-content").eq(0));f||o.wrapInner("<div />");s=o.get(0);tt?(r=a,hi()):r=this.$element.find(".scroll-track").eq(0);kt=r.find(".scroll-bar").eq(0);fi=r.get(0);ei=kt.get(0);k=ei.style;f||r.addClass("scroll-hz");u.styleClass&&(y=u.styleClass,r.addClass(y),lt=!!y.match(/scroll\-left|scroll\-top/));b==0&&(r.show(),ui());r.hide();r.on("mousedown",ai);kt.on("mousedown",vi);o.on("scroll",function(){ct&&(e=parseInt(Math.round(this[c]*et)),k[g]=e+"px");ct=!1;li&&this.$element.trigger("scroll",[s])});if(u.mouseWheel){this.lock=u.mouseWheelLock;this.lock_anyway=u.lockAnyway;this.$element.on(!n.event.special.mousewheel?"mousewheel.ace_scroll DOMMouseScroll.ace_scroll":"mousewheel.ace_scroll",function(t){var i;if(!w){if(bt(!0),!v)return!h.lock_anyway;ot&&(ot=!1,n("html").off(".ace_scroll"),n(gt).off(".ace_scroll"),vt&&h.$element.trigger("drag.end"));t.deltaY=t.deltaY||0;var u=t.deltaY>0||t.originalEvent.detail<0||t.originalEvent.wheelDelta>0?1:-1,f=!1,e=s[si],r=s[c];return h.lock||(f=u==-1?s[nt]<=r+e:r==0),h.move_bar(!0),i=parseInt(e/8),i<80&&(i=80),i>h.size&&(i=h.size),i+=1,s[c]=r-u*i,f&&!h.lock_anyway}})}if(l=ace.vars.touch&&"ace_drag"in n.event.special&&u.touchDrag,l){i="";p=l?"ace_drag":"swipe";this.$element.on(p+".ace_scroll",function(n){if(w){n.retval.cancel=!0;return}if(bt(!0),!v){n.retval.cancel=this.lock_anyway;return}if(i=n.direction,f&&(i=="up"||i=="down")||!f&&(i=="left"||i=="right")){var t=f?n.dy:n.dx;t!=0&&(Math.abs(t)>20&&l&&(t=t*2),h.move_bar(!0),s[c]=s[c]+t)}})}if(st&&r.addClass("idle-hide"),wt)r.on("mouseenter.ace_scroll",function(){pt=!0;bt(!1)}).on("mouseleave.ace_scroll",function(){pt=!1;ot==!1&&ri()});this.$element.on("mouseenter.ace_scroll touchstart.ace_scroll",function(){it=!0;wt?bt(!0):u.hoverReset&&h.reset(!0);r.addClass("scroll-hover")}).on("mouseleave.ace_scroll touchend.ace_scroll",function(){r.removeClass("scroll-hover")});f||o.children(0).css(ut,this.size);o.css(ft,this.size);w=!1;ht=!0}},this.is_active=function(){return v},this.is_enabled=function(){return!w},this.move_bar=function(n){ct=n},this.get_track=function(){return fi},this.reset=function(n){var i,l,h,t;if(!w&&(ht||this.create(),i=this.size,!n||it)){if(it=!1,tt&&(l=parseInt(Math.round((parseInt(o.css("border-top-width"))+parseInt(o.css("border-bottom-width")))/2.5)),i-=l),h=f?s[nt]:i,f&&h==0||!f&&this.element.scrollWidth==0){r.removeClass("scroll-active");return}t=f?i:s.clientWidth;f||o.children(0).css(ut,i);o.css(ft,this.size);h>t?(v=!0,r.css(ut,t).show(),et=parseFloat((t/h).toFixed(5)),rt=parseInt(Math.round(t*et)),dt=parseInt(Math.round(rt/2)),d=t-rt,e=parseInt(Math.round(s[c]*et)),k[ut]=rt+"px",k[g]=e+"px",r.addClass("scroll-active"),b==0&&ui(),oi||(u.reset&&(s[c]=0,k[g]=0),oi=!0),tt&&hi()):(v=!1,r.hide(),r.removeClass("scroll-active"),o.css(ft,""));return}},this.disable=function(){s[c]=0;k[g]=0;w=!0;v=!1;r.hide();this.$element.addClass("scroll-disabled");r.removeClass("scroll-active");o.css(ft,"")},this.enable=function(){w=!1;this.$element.removeClass("scroll-disabled")},this.destroy=function(){v=!1;w=!1;ht=!1;this.$element.removeClass("ace-scroll scroll-disabled scroll-active");this.$element.off(".ace_scroll");tt||(f||o.find("> div").children().unwrap(),o.children().unwrap(),o.remove());r.remove();at!==!1&&(this.element.style.position=at);l!=null&&(clearTimeout(l),l=null)},this.modify=function(t){t&&(u=n.extend({},u,t));this.destroy();this.create();it=!0;this.reset(!0)},this.update=function(t){t&&(u=n.extend({},u,t));this.size=u.size||this.size;this.lock=u.mouseWheelLock||this.lock;this.lock_anyway=u.lockAnyway||this.lock_anyway;st=u.hideOnIdle||st;ni=u.hideDelay||ni;wt=u.observeContent||!1;vt=u.dragEvent||!1;typeof t.styleClass!="undefined"&&(y&&r.removeClass(y),y=t.styleClass,y&&r.addClass(y),lt=!!y.match(/scroll\-left|scroll\-top/))},this.start=function(){s[c]=0},this.end=function(){s[c]=s[nt]},this.hide=function(){r.hide()},this.show=function(){r.show()},this.update_scroll=function(){ct=!1;k[g]=e+"px";s[c]=parseInt(Math.round(e/et))},p=-1,a=-1,l=null,ii=0,this.track_size=function(){return b==0&&ui(),b},this.create(),it=!0,this.reset(!0),ti=s[nt],this};n.fn.ace_scroll=function(r,u){var f,e=this.each(function(){var e=n(this),t=e.data("ace_scroll"),o=typeof r=="object"&&r;t||e.data("ace_scroll",t=new i(this,o));typeof r=="string"&&(f=t[r](u))});return f===t?e:f};n.fn.ace_scroll.defaults={size:200,horizontal:!1,mouseWheel:!0,mouseWheelLock:!1,lockAnyway:!1,styleClass:!1,observeContent:!1,hideOnIdle:!1,hideDelay:1500,hoverReset:!0,reset:!1,dragEvent:!1,touchDrag:!0,touchSwipe:!1,scrollEvent:!1,detached:!1,updatePos:!0}})(window.jQuery),function(n,t){var i=function(t,i){var c=ace.helper.getAttrSettings(t,n.fn.ace_colorpicker.defaults),o=n.extend({},n.fn.ace_colorpicker.defaults,i,c),r=n(t),s="",h="",u=null,f=[],e;r.addClass("hide").find("option").each(function(){var t="colorpick-btn",n=this.value.replace(/[^\w\s,#\(\)\.]/g,"");this.value!=n&&(this.value=n);this.selected&&(t+=" selected",h=n);f.push(n);s+='<li><a class="'+t+'" href="#" style="background-color:'+n+';" data-color="'+n+'"><\/a><\/li>'}).end().on("change.color",function(){r.next().find(".btn-colorpicker").css("background-color",this.value)}).after('<div class="dropdown dropdown-colorpicker">\t\t<a data-toggle="dropdown" class="dropdown-toggle" '+(o.auto_pos?'data-position="auto"':"")+' href="#"><span class="btn-colorpicker" style="background-color:'+h+'"><\/span><\/a><ul class="dropdown-menu'+(o.caret?" dropdown-caret":"")+(o.pull_right?" dropdown-menu-right":"")+'">'+s+"<\/ul><\/div>");e=r.next().find(".dropdown-menu");e.on(ace.click_event,function(t){var i=n(t.target),f;return i.is(".colorpick-btn")?(u&&u.removeClass("selected"),u=i,u.addClass("selected"),f=u.data("color"),r.val(f).trigger("change"),t.preventDefault(),!0):!1});u=r.next().find("a.selected");this.pick=function(i,u){if(typeof i=="number"){if(i>=f.length)return;t.selectedIndex=i;e.find("a:eq("+i+")").trigger(ace.click_event)}else if(typeof i=="string"){var o=i.replace(/[^\w\s,#\(\)\.]/g,"");if(i=f.indexOf(o),i==-1&&u===!0&&(f.push(o),n("<option />").appendTo(r).val(o),n('<li><a class="colorpick-btn" href="#"><\/a><\/li>').appendTo(e).find("a").css("background-color",o).data("color",o),i=f.length-1),i==-1)return;e.find("a:eq("+i+")").trigger(ace.click_event)}};this.destroy=function(){r.removeClass("hide").off("change.color").next().remove();f=[]}};n.fn.ace_colorpicker=function(r,u){var f,e=this.each(function(){var e=n(this),t=e.data("ace_colorpicker"),o=typeof r=="object"&&r;t||e.data("ace_colorpicker",t=new i(this,o));typeof r=="string"&&(f=t[r](u))});return f===t?e:f};n.fn.ace_colorpicker.defaults={pull_right:!1,caret:!0,auto_pos:!0}}(window.jQuery),function(n,t){var s="multiple"in document.createElement("INPUT"),u="FileList"in window,h="FileReader"in window,r="File"in window,i=function(t,i){var r=this,e=ace.helper.getAttrSettings(t,n.fn.ace_file_input.defaults),u,f;this.settings=n.extend({},n.fn.ace_file_input.defaults,i,e);this.$element=n(t);this.element=t;this.disabled=!1;this.can_reset=!0;this.$element.off("change.ace_inner_call").on("change.ace_inner_call",function(n,t){if(!r.disabled)return t===!0?void 0:l.call(r)});u=this.$element.closest("label").css({display:"block"});f=u.length==0?"label":"span";this.$element.wrap("<"+f+' class="ace-file-input" />');this.apply_settings();this.reset_input_field()};i.error={FILE_LOAD_FAILED:1,IMAGE_LOAD_FAILED:2,THUMBNAIL_FAILED:3};i.prototype.apply_settings=function(){var t=this,i,r;if(this.multi=this.$element.attr("multiple")&&s,this.well_style=this.settings.style=="well",this.well_style?(this.settings.thumbnail||(this.settings.thumbnail="small"),this.$element.parent().addClass("ace-file-multiple")):this.$element.parent().removeClass("ace-file-multiple"),this.$element.parent().find(":not(input[type=file])").remove(),this.$element.after('<span class="ace-file-container" data-title="'+this.settings.btn_choose+'"><span class="ace-file-name" data-title="'+this.settings.no_file+'">'+(this.settings.no_icon?'<i class="'+ace.vars.icon+this.settings.no_icon+'"><\/i>':"")+"<\/span><\/span>"),this.$label=this.$element.next(),this.$container=this.$element.closest(".ace-file-input"),i=!!this.settings.icon_remove,i){r=n('<a class="remove" href="#"><i class="'+ace.vars.icon+this.settings.icon_remove+'"><\/i><\/a>').appendTo(this.$element.parent());r.on(ace.click_event,function(n){var i,r;return(n.preventDefault(),!t.can_reset)?!1:(i=!0,t.settings.before_remove&&(i=t.settings.before_remove.call(t.element)),!i)?!1:(r=t.reset_input(),!1)})}this.settings.droppable&&u&&c.call(this)};i.prototype.show_file_list=function(t,i){var u=typeof t=="undefined"?this.$element.data("ace_input_files"):t,f,e,o,s,y,v,c,p,l;if(u&&u.length!=0){for(this.well_style&&(this.$label.find(".ace-file-name").remove(),this.settings.btn_change||this.$label.addClass("hide-placeholder")),this.$label.attr("data-title",this.settings.btn_change).addClass("selected"),f=0;f<u.length;f++){if(e="",o=!1,typeof u[f]=="string")e=u[f];else if(r&&u[f]instanceof File)e=n.trim(u[f].name);else if(u[f]instanceof Object&&u[f].hasOwnProperty("name"))e=u[f].name,u[f].hasOwnProperty("type")&&(o=u[f].type),u[f].hasOwnProperty("path")||(u[f].path=u[f].name);else continue;s=e.lastIndexOf("\\")+1;s==0&&(s=e.lastIndexOf("/")+1);e=e.substr(s);o==!1&&(o=/\.(jpe?g|png|gif|svg|bmp|tiff?)$/i.test(e)?"image":/\.(mpe?g|flv|mov|avi|swf|mp4|mkv|webm|wmv|3gp)$/i.test(e)?"video":/\.(mp3|ogg|wav|wma|amr|aac)$/i.test(e)?"audio":"file");y={file:"fa fa-file",image:"fa fa-picture-o file-image",video:"fa fa-film file-video",audio:"fa fa-music file-audio"};v=y[o];this.well_style?(this.$label.append('<span class="ace-file-name" data-title="'+e+'"><i class="'+ace.vars.icon+v+'"><\/i><\/span>'),c=i===!0&&r&&u[f]instanceof File?n.trim(u[f].type):"",p=h&&this.settings.thumbnail&&(c.length>0&&c.match("image")||c.length==0&&o=="image"),p&&(l=this,n.when(a.call(this,u[f])).fail(function(n){l.settings.preview_error&&l.settings.preview_error.call(l,e,n.code)}))):this.$label.find(".ace-file-name").attr({"data-title":e}).find(ace.vars[".icon"]).attr("class",ace.vars.icon+v)}return!0}};i.prototype.reset_input=function(){this.reset_input_ui();this.reset_input_field()};i.prototype.reset_input_ui=function(){this.$label.attr({"data-title":this.settings.btn_choose,"class":"ace-file-container"}).find(".ace-file-name:first").attr({"data-title":this.settings.no_file,"class":"ace-file-name"}).find(ace.vars[".icon"]).attr("class",ace.vars.icon+this.settings.no_icon).prev("img").remove();this.settings.no_icon||this.$label.find(ace.vars[".icon"]).remove();this.$label.find(".ace-file-name").not(":first").remove();this.reset_input_data()};i.prototype.reset_input_field=function(){this.$element.wrap("<form>").parent().get(0).reset();this.$element.unwrap()};i.prototype.reset_input_data=function(){this.$element.data("ace_input_files")&&(this.$element.removeData("ace_input_files"),this.$element.removeData("ace_input_method"))};i.prototype.enable_reset=function(n){this.can_reset=n};i.prototype.disable=function(){this.disabled=!0;this.$element.attr("disabled","disabled").addClass("disabled")};i.prototype.enable=function(){this.disabled=!1;this.$element.removeAttr("disabled").removeClass("disabled")};i.prototype.files=function(){return n(this).data("ace_input_files")||null};i.prototype.method=function(){return n(this).data("ace_input_method")||""};i.prototype.update_settings=function(t){this.settings=n.extend({},this.settings,t);this.apply_settings()};i.prototype.loading=function(t){if(t===!1)this.$container.find(".ace-file-overlay").remove(),this.element.removeAttribute("readonly");else{var r=typeof t=="string"?t:'<i class="overlay-content fa fa-spin fa-spinner orange2 fa-2x"><\/i>',i=this.$container.find(".ace-file-overlay");if(i.length==0){i=n('<div class="ace-file-overlay"><\/div>').appendTo(this.$container);i.on("click tap",function(n){return n.stopImmediatePropagation(),n.preventDefault(),!1});this.element.setAttribute("readonly","true")}i.empty().append(r)}};var c=function(){var n=this,t=this.$element.parent();t.off("dragenter").on("dragenter",function(n){n.preventDefault();n.stopPropagation()}).off("dragover").on("dragover",function(n){n.preventDefault();n.stopPropagation()}).off("drop").on("drop",function(t){var u,i,r;if(t.preventDefault(),t.stopPropagation(),!n.disabled)return(u=t.originalEvent.dataTransfer,i=u.files,!n.multi&&i.length>1&&(r=[],r.push(i[0]),i=r),i=f.call(n,i,!0),i===!1)?!1:(n.$element.data("ace_input_method","drop"),n.$element.data("ace_input_files",i),n.show_file_list(i,!0),n.$element.triggerHandler("change",[!0]),!0)})},l=function(){var n=this.element.files||[this.element.value];return(n=f.call(this,n,!1),n===!1)?!1:(this.$element.data("ace_input_method","select"),this.$element.data("ace_input_files",n),this.show_file_list(n,!0),!0)},a=function(t){var u=this,f=u.$label.find(".ace-file-name:last"),e=new n.Deferred,s=function(t,i){f.prepend("<img class='middle' style='display:none;' />");var r=f.find("img:last").get(0);n(r).one("load",function(){h.call(null,r,i)}).one("error",function(){c.call(null,r)});r.src=t},h=function(t,r){var o=u.settings.previewSize,s,l,a,h,c;if(o||(u.settings.previewWidth||u.settings.previewHeight?o={previewWidth:u.settings.previewWidth,previewHeight:u.settings.previewHeight}:(o=50,u.settings.thumbnail=="large"&&(o=150))),u.settings.thumbnail=="fit"?o=f.width():typeof o=="number"&&(o=parseInt(Math.min(o,f.width()))),s=v(t,o),s==null){n(this).remove();e.reject({code:i.error.THUMBNAIL_FAILED});return}l=!0;r&&r instanceof File&&(r.width=s.width,r.height=s.height,u.$element.trigger("file.preview.ace",{file:r}),u.$element.trigger(a=new n.Event("file.preview.ace"),{file:r}),a.isDefaultPrevented()&&(l=!1));l&&(h=s.previewWidth,c=s.previewHeight,u.settings.thumbnail=="small"?h=c=parseInt(Math.max(h,c)):f.addClass("large"),n(t).css({"background-image":"url("+s.src+")",width:h,height:c}).data("thumb",s.src).attr({src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg=="}).show());e.resolve()},c=function(){f.find("img").remove();e.reject({code:i.error.IMAGE_LOAD_FAILED})},o;return r&&t instanceof File?(o=new FileReader,o.onload=function(n){s(n.target.result,t)},o.onerror=function(){e.reject({code:i.error.FILE_LOAD_FAILED})},o.readAsDataURL(t)):t instanceof Object&&t.hasOwnProperty("path")&&s(t.path,null),e.promise()},v=function(t,i){var f=t.width,e=t.height,o,s,c;f=f>0?f:n(t).width();e=e>0?e:n(t).height();var h=!1,r=!1,u=!1;typeof i=="number"?h=i:i instanceof Object&&(i.previewWidth&&!i.previewHeight?u=i.previewWidth:i.previewHeight&&!i.previewWidth?r=i.previewHeight:i.previewWidth&&i.previewHeight&&(u=i.previewWidth,r=i.previewHeight));h?f>e?(u=h,r=parseInt(e/f*u)):(r=h,u=parseInt(f/e*r)):!r&&u?r=parseInt(e/f*u):r&&!u&&(u=parseInt(f/e*r));try{s=document.createElement("canvas");s.width=u;s.height=r;c=s.getContext("2d");c.drawImage(t,0,0,f,e,0,0,u,r);o=s.toDataURL()}catch(l){o=null}return o?(/^data\:image\/(png|jpe?g|gif);base64,[0-9A-Za-z\+\/\=]+$/.test(o)||(o=null),!o)?null:{src:o,previewWidth:u,previewHeight:r,width:f,height:e}:null},f=function(n,t){var i=y.call(this,n,t);return i===-1?(this.reset_input(),!1):!i||i.length==0?(this.$element.data("ace_input_files")||this.reset_input(),!1):((i instanceof Array||u&&i instanceof FileList)&&(n=i),i=!0,this.settings.before_change&&(i=this.settings.before_change.call(this.element,n,t)),i===-1)?(this.reset_input(),!1):!i||i.length==0?(this.$element.data("ace_input_files")||this.reset_input(),!1):((i instanceof Array||u&&i instanceof FileList)&&(n=i),n)},e=function(n){return n?(typeof n=="string"&&(n=[n]),n.length==0)?null:new RegExp(".(?:"+n.join("|")+")$","i"):null},o=function(n){return n?(typeof n=="string"&&(n=[n]),n.length==0)?null:new RegExp("^(?:"+n.join("|").replace(/\//g,"\\/")+")$","i"):null},y=function(t,i){var a=e(this.settings.allowExt),v=e(this.settings.denyExt),y=o(this.settings.allowMime),p=o(this.settings.denyMime),w=this.settings.maxSize||!1,h,u,l,s,f,b,c,k;if(!(a||v||y||p||w))return!0;for(h=[],u={},l=0;l<t.length;l++){if(s=t[l],f=r?s.name:s,a&&!a.test(f)){"ext"in u||(u.ext=[]);u.ext.push(f);continue}else if(v&&v.test(f)){"ext"in u||(u.ext=[]);u.ext.push(f);continue}if(r){if((b=n.trim(s.type)).length>0)if(y&&!y.test(b)){"mime"in u||(u.mime=[]);u.mime.push(f);continue}else if(p&&p.test(b)){"mime"in u||(u.mime=[]);u.mime.push(f);continue}}else{h.push(s);continue}if(w&&s.size>w){"size"in u||(u.size=[]);u.size.push(f);continue}h.push(s)}return h.length==t.length?t:(c={ext:0,mime:0,size:0},"ext"in u&&(c.ext=u.ext.length),"mime"in u&&(c.mime=u.mime.length),"size"in u&&(c.size=u.size.length),this.$element.trigger(k=new n.Event("file.error.ace"),{file_count:t.length,invalid_count:t.length-h.length,error_list:u,error_count:c,dropped:i}),k.isDefaultPrevented())?-1:h};n.fn.aceFileInput=n.fn.ace_file_input=function(r,u){var f,e=this.each(function(){var e=n(this),t=e.data("ace_file_input"),o=typeof r=="object"&&r;t||e.data("ace_file_input",t=new i(this,o));typeof r=="string"&&(f=t[r](u))});return f===t?e:f};n.fn.ace_file_input.defaults={style:!1,no_file:"No File ...",no_icon:"fa fa-upload",btn_choose:"Choose",btn_change:"Change",icon_remove:"fa fa-times",droppable:!1,thumbnail:!1,allowExt:null,denyExt:null,allowMime:null,denyMime:null,maxSize:!1,previewSize:!1,previewWidth:!1,previewHeight:!1,before_change:null,before_remove:null,preview_error:null}}(window.jQuery);!function(n){"use strict";var t=function(t,i){this.$element=n(t);this.options=n.extend({},n.fn.bs_typeahead.defaults,i);this.matcher=this.options.matcher||this.matcher;this.sorter=this.options.sorter||this.sorter;this.highlighter=this.options.highlighter||this.highlighter;this.updater=this.options.updater||this.updater;this.source=this.options.source;this.$menu=n(this.options.menu);this.shown=!1;this.listen()},i;t.prototype={constructor:t,select:function(){var n=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(n)).change(),this.hide()},updater:function(n){return n},show:function(){var t=n.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var t;return(this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength)?this.shown?this.hide():this:(t=n.isFunction(this.source)?this.source(this.query,n.proxy(this.process,this)):this.source,t?this.process(t):this)},process:function(t){var i=this;return(t=n.grep(t,function(n){return i.matcher(n)}),t=this.sorter(t),!t.length)?this.shown?this.hide():this:this.render(t.slice(0,this.options.items)).show()},matcher:function(n){return~n.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(n){for(var i=[],r=[],u=[],t;t=n.shift();)t.toLowerCase().indexOf(this.query.toLowerCase())?~t.indexOf(this.query)?r.push(t):u.push(t):i.push(t);return i.concat(r,u)},highlighter:function(n){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return n.replace(new RegExp("("+t+")","ig"),function(n,t){return"<strong>"+t+"<\/strong>"})},render:function(t){var i=this;return t=n(t).map(function(t,r){return t=n(i.options.item).attr("data-value",r),t.find("a").html(i.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(){var i=this.$menu.find(".active").removeClass("active"),t=i.next();t.length||(t=n(this.$menu.find("li")[0]));t.addClass("active")},prev:function(){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last());n.addClass("active")},listen:function(){this.$element.on("focus",n.proxy(this.focus,this)).on("blur",n.proxy(this.blur,this)).on("keypress",n.proxy(this.keypress,this)).on("keyup",n.proxy(this.keyup,this));if(this.eventSupported("keydown"))this.$element.on("keydown",n.proxy(this.keydown,this));this.$menu.on("click",n.proxy(this.click,this)).on("mouseenter","li",n.proxy(this.mouseenter,this)).on("mouseleave","li",n.proxy(this.mouseleave,this))},eventSupported:function(n){var t=n in this.$element;return t||(this.$element.setAttribute(n,"return;"),t=typeof this.$element[n]=="function"),t},move:function(n){if(this.shown){switch(n.keyCode){case 9:case 13:case 27:n.preventDefault();break;case 38:n.preventDefault();this.prev();break;case 40:n.preventDefault();this.next()}n.stopPropagation()}},keydown:function(t){this.suppressKeyPressRepeat=~n.inArray(t.keyCode,[40,38,9,13,27]);this.move(t)},keypress:function(n){this.suppressKeyPressRepeat||this.move(n)},keyup:function(n){switch(n.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}n.stopPropagation();n.preventDefault()},focus:function(){this.focused=!0},blur:function(){this.focused=!1;!this.mousedover&&this.shown&&this.hide()},click:function(n){n.stopPropagation();n.preventDefault();this.select();this.$element.focus()},mouseenter:function(t){this.mousedover=!0;this.$menu.find(".active").removeClass("active");n(t.currentTarget).addClass("active")},mouseleave:function(){this.mousedover=!1;!this.focused&&this.shown&&this.hide()}};i=n.fn.bs_typeahead;n.fn.bs_typeahead=function(i){return this.each(function(){var u=n(this),r=u.data("bs_typeahead"),f=typeof i=="object"&&i;r||u.data("bs_typeahead",r=new t(this,f));typeof i=="string"&&r[i]()})};n.fn.bs_typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"><\/ul>',item:'<li><a href="#"><\/a><\/li>',minLength:1};n.fn.bs_typeahead.Constructor=t;n.fn.bs_typeahead.noConflict=function(){return n.fn.bs_typeahead=i,this};n(document).on("focus.bs_typeahead.data-api",'[data-provide="bs_typeahead"]',function(){var t=n(this);t.data("bs_typeahead")||t.bs_typeahead(t.data())})}(window.jQuery),function(n){n.fn.ace_wysiwyg=function(t){var i=n.extend({speech_button:!0,wysiwyg:{}},t),f=["#ac725e","#d06b64","#f83a22","#fa573c","#ff7537","#ffad46","#42d692","#16a765","#7bd148","#b3dc6c","#fbe983","#fad165","#92e1c0","#9fe1e7","#9fc6e7","#4986e7","#9a9cff","#b99aff","#c2c2c2","#cabdbf","#cca6ac","#f691b2","#cd74e6","#a47ae2","#444444"],r={font:{values:["Arial","Courier","Comic Sans MS","Helvetica","Open Sans","Tahoma","Verdana"],icon:"fa fa-font",title:"Font"},fontSize:{values:{5:"Huge",3:"Normal",1:"Small"},icon:"fa fa-text-height",title:"Font Size"},bold:{icon:"fa fa-bold",title:"Bold (Ctrl/Cmd+B)"},italic:{icon:"fa fa-italic",title:"Italic (Ctrl/Cmd+I)"},strikethrough:{icon:"fa fa-strikethrough",title:"Strikethrough"},underline:{icon:"fa fa-underline",title:"Underline"},insertunorderedlist:{icon:"fa fa-list-ul",title:"Bullet list"},insertorderedlist:{icon:"fa fa-list-ol",title:"Number list"},outdent:{icon:"fa fa-outdent",title:"Reduce indent (Shift+Tab)"},indent:{icon:"fa fa-indent",title:"Indent (Tab)"},justifyleft:{icon:"fa fa-align-left",title:"Align Left (Ctrl/Cmd+L)"},justifycenter:{icon:"fa fa-align-center",title:"Center (Ctrl/Cmd+E)"},justifyright:{icon:"fa fa-align-right",title:"Align Right (Ctrl/Cmd+R)"},justifyfull:{icon:"fa fa-align-justify",title:"Justify (Ctrl/Cmd+J)"},createLink:{icon:"fa fa-link",title:"Hyperlink",button_text:"Add",placeholder:"URL",button_class:"btn-primary"},unlink:{icon:"fa fa-chain-broken",title:"Remove Hyperlink"},insertImage:{icon:"fa fa-picture-o",title:"Insert picture",button_text:'<i class="'+ace.vars.icon+'fa fa-file"><\/i> Choose Image &hellip;',placeholder:"Image URL",button_insert:"Insert",button_class:"btn-success",button_insert_class:"btn-primary",choose_file:!0},foreColor:{values:f,title:"Change Color"},backColor:{values:f,title:"Change Background Color"},undo:{icon:"fa fa-undo",title:"Undo (Ctrl/Cmd+Z)"},redo:{icon:"fa fa-repeat",title:"Redo (Ctrl/Cmd+Y)"},viewSource:{icon:"fa fa-code",title:"View Source"}},u=i.toolbar||["font",null,"fontSize",null,"bold","italic","strikethrough","underline",null,"insertunorderedlist","insertorderedlist","outdent","indent",null,"justifyleft","justifycenter","justifyright","justifyfull",null,"createLink","unlink",null,"insertImage",null,"foreColor",null,"undo","redo",null,"viewSource"];return this.each(function(){var f=' <div class="wysiwyg-toolbar btn-toolbar center"> <div class="btn-group"> ',c,t,o,s,h,a,e,l,v;for(c in u)if(u.hasOwnProperty(c)){if(t=u[c],t===null){f+=' <\/div> <div class="btn-group"> ';continue}if(typeof t=="string"&&t in r)t=r[t],t.name=u[c];else if(typeof t=="object"&&t.name in r)t=n.extend(r[t.name],t);else continue;o="className"in t?t.className:"btn-default";switch(t.name){case"font":f+=' <a class="btn btn-sm '+o+' dropdown-toggle" data-toggle="dropdown" title="'+t.title+'"><i class="'+ace.vars.icon+t.icon+'"><\/i><i class="'+ace.vars.icon+'fa fa-angle-down icon-on-right"><\/i><\/a> ';f+=' <ul class="dropdown-menu dropdown-light dropdown-caret">';for(s in t.values)t.values.hasOwnProperty(s)&&(f+=' <li><a data-edit="fontName '+t.values[s]+'" style="font-family:\''+t.values[s]+"'\">"+t.values[s]+"<\/a><\/li> ");f+=" <\/ul>";break;case"fontSize":f+=' <a class="btn btn-sm '+o+' dropdown-toggle" data-toggle="dropdown" title="'+t.title+'"><i class="'+ace.vars.icon+t.icon+'"><\/i>&nbsp;<i class="'+ace.vars.icon+'fa fa-angle-down icon-on-right"><\/i><\/a> ';f+=' <ul class="dropdown-menu dropdown-light dropdown-caret"> ';for(h in t.values)t.values.hasOwnProperty(h)&&(f+=' <li><a data-edit="fontSize '+h+'"><font size="'+h+'">'+t.values[h]+"<\/font><\/a><\/li> ");f+=" <\/ul> ";break;case"createLink":f+=' <div class="btn-group"> <a class="btn btn-sm '+o+' dropdown-toggle" data-toggle="dropdown" title="'+t.title+'"><i class="'+ace.vars.icon+t.icon+'"><\/i><\/a> ';f+=' <div class="dropdown-menu dropdown-caret dropdown-menu-right">\t\t\t\t\t\t\t <div class="input-group">\t\t\t\t\t\t\t\t<input class="form-control" placeholder="'+t.placeholder+'" type="text" data-edit="'+t.name+'" />\t\t\t\t\t\t\t\t<span class="input-group-btn">\t\t\t\t\t\t\t\t\t<button class="btn btn-sm '+t.button_class+'" type="button">'+t.button_text+"<\/button>\t\t\t\t\t\t\t\t<\/span>\t\t\t\t\t\t\t <\/div>\t\t\t\t\t\t<\/div> <\/div>";break;case"insertImage":f+=' <div class="btn-group"> <a class="btn btn-sm '+o+' dropdown-toggle" data-toggle="dropdown" title="'+t.title+'"><i class="'+ace.vars.icon+t.icon+'"><\/i><\/a> ';f+=' <div class="dropdown-menu dropdown-caret dropdown-menu-right">\t\t\t\t\t\t\t <div class="input-group">\t\t\t\t\t\t\t\t<input class="form-control" placeholder="'+t.placeholder+'" type="text" data-edit="'+t.name+'" />\t\t\t\t\t\t\t\t<span class="input-group-btn">\t\t\t\t\t\t\t\t\t<button class="btn btn-sm '+t.button_insert_class+'" type="button">'+t.button_insert+"<\/button>\t\t\t\t\t\t\t\t<\/span>\t\t\t\t\t\t\t <\/div>";t.choose_file&&"FileReader"in window&&(f+='<div class="space-2"><\/div>\t\t\t\t\t\t\t <label class="center block no-margin-bottom">\t\t\t\t\t\t\t\t<button class="btn btn-sm '+t.button_class+' wysiwyg-choose-file" type="button">'+t.button_text+'<\/button>\t\t\t\t\t\t\t\t<input type="file" data-edit="'+t.name+'" />\t\t\t\t\t\t\t  <\/label>');f+=" <\/div> <\/div>";break;case"foreColor":case"backColor":f+=' <select class="hide wysiwyg_colorpicker" title="'+t.title+'"> ';n.each(t.values,function(n,t){f+=' <option value="'+t+'">'+t+"<\/option> "});f+=" <\/select> ";f+=' <input style="display:none;" disabled class="hide" type="text" data-edit="'+t.name+'" /> ';break;case"viewSource":f+=' <a class="btn btn-sm '+o+'" data-view="source" title="'+t.title+'"><i class="'+ace.vars.icon+t.icon+'"><\/i><\/a> ';break;default:f+=' <a class="btn btn-sm '+o+'" data-edit="'+t.name+'" title="'+t.title+'"><i class="'+ace.vars.icon+t.icon+'"><\/i><\/a> '}}f+=" <\/div> ";i.speech_button&&"onwebkitspeechchange"in(a=document.createElement("input"))&&(f+=' <input class="wysiwyg-speech-input" type="text" data-edit="inserttext" x-webkit-speech />');a=null;f+=" <\/div> ";f=i.toolbar_place?i.toolbar_place.call(this,f):n(this).before(f).prev();f.find("a[title]").tooltip({animation:!1,container:"body"});f.find(".dropdown-menu input[type=text]").on("click",function(){return!1}).on("change",function(){n(this).closest(".dropdown-menu").siblings(".dropdown-toggle").dropdown("toggle")}).on("keydown",function(t){t.which==27?(this.value="",n(this).change()):t.which==13&&(t.preventDefault(),t.stopPropagation(),n(this).change())});f.find("input[type=file]").prev().on(ace.click_event,function(){n(this).next().click()});f.find(".wysiwyg_colorpicker").each(function(){n(this).ace_colorpicker({pull_right:!0}).change(function(){n(this).nextAll("input").eq(0).val(this.value).change()}).next().find(".btn-colorpicker").tooltip({title:this.title,animation:!1,container:"body"})});e=n(this);l=!1;f.find("a[data-view=source]").on("click",function(t){if(t.preventDefault(),l){var i=e.next();e.html(i.val()).show();i.remove();n(this).removeClass("active")}else n("<textarea />").css({width:e.outerWidth(),height:e.outerHeight()}).val(e.html()).insertAfter(e),e.hide(),n(this).addClass("active");l=!l});v=n.extend({},{activeToolbarClass:"active",toolbarSelector:f},i.wysiwyg||{});n(this).wysiwyg(v)}),this}}(window.jQuery),function(n,t){function i(t,i){var l=ace.helper.getAttrSettings(t,n.fn.ace_spinner.defaults),r=n.extend({},n.fn.ace_spinner.defaults,i,l),h=r.max,f,c;h=(""+h).length;var o=parseInt(Math.max(h*20+40,90)),u=n(t),e="btn-sm",s=2;u.hasClass("input-sm")?(e="btn-xs",s=1):u.hasClass("input-lg")&&(e="btn-lg",s=3);s==2?o+=25:s==3&&(o+=50);u.addClass("spinbox-input form-control text-center").wrap('<div class="ace-spinner middle">');f=u.closest(".ace-spinner").spinbox(r).wrapInner("<div class='input-group'><\/div>");c=f.data("fu.spinbox");r.on_sides?(u.before('<div class="spinbox-buttons input-group-btn">\t\t\t\t\t<button type="button" class="btn spinbox-down '+e+" "+r.btn_down_class+'">\t\t\t\t\t\t<i class="icon-only '+ace.vars.icon+r.icon_down+'"><\/i>\t\t\t\t\t<\/button>\t\t\t\t<\/div>').after('<div class="spinbox-buttons input-group-btn">\t\t\t\t\t<button type="button" class="btn spinbox-up '+e+" "+r.btn_up_class+'">\t\t\t\t\t\t<i class="icon-only '+ace.vars.icon+r.icon_up+'"><\/i>\t\t\t\t\t<\/button>\t\t\t\t<\/div>'),f.addClass("touch-spinner"),f.css("width",o+"px")):(u.after('<div class="spinbox-buttons input-group-btn">\t\t\t\t\t<button type="button" class="btn spinbox-up '+e+" "+r.btn_up_class+'">\t\t\t\t\t\t<i class="icon-only '+ace.vars.icon+r.icon_up+'"><\/i>\t\t\t\t\t<\/button>\t\t\t\t\t<button type="button" class="btn spinbox-down '+e+" "+r.btn_down_class+'">\t\t\t\t\t\t<i class="icon-only '+ace.vars.icon+r.icon_down+'"><\/i>\t\t\t\t\t<\/button>\t\t\t\t<\/div>'),ace.vars.touch||r.touch_spinner?(f.addClass("touch-spinner"),f.css("width",o+"px")):(u.next().addClass("btn-group-vertical"),f.css("width",o+"px")));f.on("changed",function(){u.trigger("change")});this._call=function(n,t){c[n](t)}}n.fn.ace_spinner=function(r,u){var f,e=this.each(function(){var e=n(this),t=e.data("ace_spinner"),o=typeof r=="object"&&r;t||(o=n.extend({},n.fn.ace_spinner.defaults,r),e.data("ace_spinner",t=new i(this,o)));typeof r=="string"&&(f=t._call(r,u))});return f===t?e:f};n.fn.ace_spinner.defaults={icon_up:"fa fa-chevron-up",icon_down:"fa fa-chevron-down",on_sides:!1,btn_up_class:"",btn_down_class:"",max:999,touch_spinner:!1}}(window.jQuery),function(n){n.fn.aceTree=n.fn.ace_tree=function(t){var i={"open-icon":ace.vars.icon+"fa fa-folder-open","close-icon":ace.vars.icon+"fa fa-folder","toggle-icon":ace.vars.icon+"fa fa-play","selected-icon":ace.vars.icon+"fa fa-check","unselected-icon":ace.vars.icon+"fa fa-times","base-icon":ace.vars.icon+"fa","folder-open-icon":"fa fa-plus-square-o","folder-close-icon":"fa fa-plus-minus-o",loadingHTML:"Loading..."};return this.each(function(){var f=ace.helper.getAttrSettings(this,i),r=n.extend({},i,t,f),u=n(this);u.addClass("tree").attr("role","tree");u.html('<li class="tree-branch hide" data-template="treebranch" role="treeitem" aria-expanded="false">\t\t\t\t'+(r.folderSelect?'<i class="icon-caret '+r["folder-open-icon"]+'"><\/i>&nbsp;':"")+'\t\t\t\t<div class="tree-branch-header">\t\t\t\t\t<span class="tree-branch-name">\t\t\t\t\t\t<i class="icon-folder '+r["close-icon"]+'"><\/i>\t\t\t\t\t\t<span class="tree-label"><\/span>\t\t\t\t\t<\/span>\t\t\t\t<\/div>\t\t\t\t<ul class="tree-branch-children" role="group"><\/ul>\t\t\t\t<div class="tree-loader" role="alert">'+r.loadingHTML+'<\/div>\t\t\t<\/li>\t\t\t<li class="tree-item hide" data-template="treeitem" role="treeitem">\t\t\t\t<span class="tree-item-name">\t\t\t\t  '+(r["unselected-icon"]==null?"":'<i class="icon-item '+r["unselected-icon"]+'"><\/i>')+'\t\t\t\t  <span class="tree-label"><\/span>\t\t\t\t<\/span>\t\t\t<\/li>');u.addClass(r.selectable==!0?"tree-selectable":"tree-unselectable");u.tree(r)}),this}}(window.jQuery),function(n){n.fn.aceWizard=n.fn.ace_wizard=function(t){return this.each(function(){var r=n(this),u,i,f;r.wizard();ace.vars.old_ie&&r.find("ul.steps > li").last().addClass("last-child");u=t&&t.buttons?n(t.buttons):r.siblings(".wizard-actions").eq(0);i=r.data("fu.wizard");i.$prevBtn.remove();i.$nextBtn.remove();i.$prevBtn=u.find(".btn-prev").eq(0).on(ace.click_event,function(){i.previous()}).attr("disabled","disabled");i.$nextBtn=u.find(".btn-next").eq(0).on(ace.click_event,function(){i.next()}).removeAttr("disabled");i.nextText=i.$nextBtn.text();f=t&&(t.selectedItem&&t.selectedItem.step||t.step);f&&(i.currentStep=f,i.setState())}),this}}(window.jQuery),function(n,t){function r(t,r){var s=this,u=n(t),f="right",o=!1,c=u.hasClass("fade"),a=ace.helper.getAttrSettings(t,n.fn.ace_aside.defaults),l;if(this.settings=n.extend({},n.fn.ace_aside.defaults,r,a),!this.settings.background||r.scroll_style||a.scroll_style||(this.settings.scroll_style="scroll-white no-track"),this.container=this.settings.container,this.container)try{n(this.container).get(0)==document.body&&(this.container=null)}catch(y){}this.container&&(this.settings.backdrop=!1,u.addClass("aside-contained"));var h=u.find(".modal-dialog"),e=u.find(".modal-content"),v=300;this.initiate=function(){if(t.className=t.className.replace(/(\s|^)aside\-(right|top|left|bottom)(\s|$)/ig,"$1$3"),f=this.settings.placement,f&&(f=n.trim(f.toLowerCase())),f&&/right|top|left|bottom/.test(f)||(f="right"),u.attr("data-placement",f),u.addClass("aside-"+f),/right|left/.test(f)?(o=!0,u.addClass("aside-vc")):u.addClass("aside-hz"),this.settings.fixed&&u.addClass("aside-fixed"),this.settings.background&&u.addClass("aside-dark"),this.settings.offset&&u.addClass("navbar-offset"),this.settings.transition||u.addClass("transition-off"),u.addClass("aside-hidden"),this.insideContainer(),h=u.find(".modal-dialog"),e=u.find(".modal-content"),!this.settings.body_scroll)u.on("mousewheel.aside DOMMouseScroll.aside touchmove.aside pointermove.aside",function(t){if(!n.contains(e[0],t.target))return t.preventDefault(),!1});this.settings.backdrop==!1&&u.addClass("no-backdrop")};this.show=function(){if(this.settings.backdrop==!1)try{u.data("bs.modal").$backdrop.remove()}catch(t){}this.container?n(this.container).addClass("overflow-hidden"):u.css("position","fixed");u.removeClass("aside-hidden")};this.hide=function(){this.container&&(this.container.addClass("overflow-hidden"),ace.vars.firefox&&t.offsetHeight);l();ace.vars.transition&&!c&&u.one("bsTransitionEnd",function(){u.addClass("aside-hidden");u.css("position","");s.container&&s.container.removeClass("overflow-hidden")}).emulateTransitionEnd(v)};this.shown=function(){if(l(),n("body").removeClass("modal-open").css("padding-right",""),this.settings.backdrop=="invisible")try{u.data("bs.modal").$backdrop.css("opacity",0)}catch(r){}var t=o?e.height():h.height();ace.vars.touch?e.addClass("overflow-scroll").css("max-height",t+"px"):e.hasClass("ace-scroll")||e.ace_scroll({size:t,reset:!0,mouseWheelLock:!0,lockAnyway:!this.settings.body_scroll,styleClass:this.settings.scroll_style,observeContent:!0,hideOnIdle:!ace.vars.old_ie,hideDelay:1500});i.off("resize.modal.aside").on("resize.modal.aside",function(){if(ace.vars.touch)e.css("max-height",(o?e.height():h.height())+"px");else{e.ace_scroll("disable");var n=o?e.height():h.height();e.ace_scroll("update",{size:n}).ace_scroll("enable").ace_scroll("reset")}}).triggerHandler("resize.modal.aside");s.container&&ace.vars.transition&&!c&&u.one("bsTransitionEnd",function(){s.container.removeClass("overflow-hidden")}).emulateTransitionEnd(v)};this.hidden=function(){i.off(".aside");(!ace.vars.transition||c)&&(u.addClass("aside-hidden"),u.css("position",""))};this.insideContainer=function(){var t=n(".main-container"),e=u.find(".modal-dialog"),r;e.css({right:"",left:""});t.hasClass("container")&&(r=!1,o==!0&&(e.css(f,parseInt((i.width()-t.width())/2)),r=!0),r&&ace.vars.firefox&&ace.helper.redraw(t[0]))};this.flip=function(){var n={right:"left",left:"right",top:"bottom",bottom:"top"};u.removeClass("aside-"+f).addClass("aside-"+n[f]);f=n[f]};l=function(){var t=u.find(".aside-trigger"),n;t.length!=0&&(t.toggleClass("open"),n=t.find(ace.vars[".icon"]),n.length!=0)&&n.toggleClass(n.attr("data-icon1")+" "+n.attr("data-icon2"))};this.initiate();this.container&&(this.container=n(this.container));u.appendTo(this.container||"body")}var i=n(window);n(document).on("show.bs.modal",".modal.aside",function(){n(".aside.in").modal("hide");n(this).ace_aside("show")}).on("hide.bs.modal",".modal.aside",function(){n(this).ace_aside("hide")}).on("shown.bs.modal",".modal.aside",function(){n(this).ace_aside("shown")}).on("hidden.bs.modal",".modal.aside",function(){n(this).ace_aside("hidden")});n(window).on("resize.aside_container",function(){n(".modal.aside").ace_aside("insideContainer")});n(document).on("settings.ace.aside",function(t,i){i=="main_container_fixed"&&n(".modal.aside").ace_aside("insideContainer")});n.fn.aceAside=n.fn.ace_aside=function(i,u){var f,e=this.each(function(){var e=n(this),t=e.data("ace_aside"),o=typeof i=="object"&&i;t||e.data("ace_aside",t=new r(this,o));typeof i=="string"&&typeof t[i]=="function"&&(f=u instanceof Array?t[i].apply(t,u):t[i](u))});return f===t?e:f};n.fn.ace_aside.defaults={fixed:!1,background:!1,offset:!1,body_scroll:!1,transition:!0,scroll_style:"scroll-dark no-track",container:null,backdrop:!1,placement:"right"}}(window.jQuery),function(n,t){var i=function(t,i){function ai(n){n.preventDefault();n.stopPropagation();var u=r.offset(),t=u[g],i=f?n.pageY:n.pageX;i>t+e?(e=i-t-rt+dt,e>d&&(e=d)):(e=i-t-dt,e<0&&(e=0));h.update_scroll()}function vi(t){t.preventDefault();t.stopPropagation();a=f?p=t.pageY:p=t.pageX;ot=!0;n("html").off("mousemove.ace_scroll").on("mousemove.ace_scroll",yi);n(gt).off("mouseup.ace_scroll").on("mouseup.ace_scroll",pi);r.addClass("active");vt&&h.$element.trigger("drag.start")}function yi(n){n.preventDefault();n.stopPropagation();a=f?n.pageY:n.pageX;a-p+e>d?a=p+d-e:a-p+e<0&&(a=p-e);e=e+(a-p);p=a;e<0?e=0:e>d&&(e=d);h.update_scroll()}function pi(t){t.preventDefault();t.stopPropagation();ot=!1;n("html").off(".ace_scroll");n(gt).off(".ace_scroll");r.removeClass("active");vt&&h.$element.trigger("drag.end");v&&st&&!pt&&ri()}function bt(n){var i=+new Date,t;wt&&i-ii>1e3&&(t=s[nt],ti!=t&&(ti=t,it=!0,h.reset(!0)),ii=i);v&&st&&(l!=null&&(clearTimeout(l),l=null),r.addClass("not-idle"),pt||n!=!0||ri())}function ri(){l!=null&&(clearTimeout(l),l=null);l=setTimeout(function(){l=null;r.removeClass("not-idle")},ni)}function ui(){r.css("visibility","hidden").addClass("scroll-hover");b=f?parseInt(r.outerWidth())||0:parseInt(r.outerHeight())||0;r.css("visibility","").removeClass("scroll-hover")}function hi(){if(yt!==!1){var i=o.offset(),n=i.left,t=i.top;f?lt||(n+=o.outerWidth()-b):lt||(t+=o.outerHeight()-b);yt===!0?r.css({top:parseInt(t),left:parseInt(n)}):yt==="left"?r.css("left",parseInt(n)):yt==="top"&&r.css("top",parseInt(t))}}var h=this,ci=ace.helper.getAttrSettings(t,n.fn.ace_scroll.defaults),u=n.extend({},n.fn.ace_scroll.defaults,i,ci),p,a,l,ii;this.size=0;this.lock=!1;this.lock_anyway=!1;this.$element=n(t);this.element=t;var f=!0,w=!1,v=!1,ht=!1,o=null,s=null,r=null,kt=null,fi=null,ei=null,k=null,rt=0,e=0,d=0,dt=0,ct=!0,oi=!1,y="",lt=!1,b=0,g,ut,ft,si,c,nt,et=1,at=!1,ot=!1,gt="onmouseup"in window?window:"html",vt=u.dragEvent||!1,li=i.scrollEvent||!1,tt=u.detached||!1,yt=u.updatePos||!1,st=u.hideOnIdle||!1,ni=u.hideDelay||1500,pt=!1,wt=u.observeContent||!1,ti=0,it=!0;return this.ref=function(){return this},this.create=function(t){var a,l,i,p;if(!ht){t&&(u=n.extend({},n.fn.ace_scroll.defaults,t));this.size=parseInt(this.$element.attr("data-size"))||u.size||200;f=!u.horizontal;g=f?"top":"left";ut=f?"height":"width";ft=f?"maxHeight":"maxWidth";si=f?"clientHeight":"clientWidth";c=f?"scrollTop":"scrollLeft";nt=f?"scrollHeight":"scrollWidth";this.$element.addClass("ace-scroll");this.$element.css("position")=="static"?(at=this.element.style.position,this.element.style.position="relative"):at=!1;a=null;tt?a=n('<div class="scroll-track scroll-detached"><div class="scroll-bar"><\/div><\/div>').appendTo("body"):(this.$element.wrapInner('<div class="scroll-content" />'),this.$element.prepend('<div class="scroll-track"><div class="scroll-bar"><\/div><\/div>'));o=this.$element;tt||(o=this.$element.find(".scroll-content").eq(0));f||o.wrapInner("<div />");s=o.get(0);tt?(r=a,hi()):r=this.$element.find(".scroll-track").eq(0);kt=r.find(".scroll-bar").eq(0);fi=r.get(0);ei=kt.get(0);k=ei.style;f||r.addClass("scroll-hz");u.styleClass&&(y=u.styleClass,r.addClass(y),lt=!!y.match(/scroll\-left|scroll\-top/));b==0&&(r.show(),ui());r.hide();r.on("mousedown",ai);kt.on("mousedown",vi);o.on("scroll",function(){ct&&(e=parseInt(Math.round(this[c]*et)),k[g]=e+"px");ct=!1;li&&this.$element.trigger("scroll",[s])});if(u.mouseWheel){this.lock=u.mouseWheelLock;this.lock_anyway=u.lockAnyway;this.$element.on(!n.event.special.mousewheel?"mousewheel.ace_scroll DOMMouseScroll.ace_scroll":"mousewheel.ace_scroll",function(t){var i;if(!w){if(bt(!0),!v)return!h.lock_anyway;ot&&(ot=!1,n("html").off(".ace_scroll"),n(gt).off(".ace_scroll"),vt&&h.$element.trigger("drag.end"));t.deltaY=t.deltaY||0;var u=t.deltaY>0||t.originalEvent.detail<0||t.originalEvent.wheelDelta>0?1:-1,f=!1,e=s[si],r=s[c];return h.lock||(f=u==-1?s[nt]<=r+e:r==0),h.move_bar(!0),i=parseInt(e/8),i<80&&(i=80),i>h.size&&(i=h.size),i+=1,s[c]=r-u*i,f&&!h.lock_anyway}})}if(l=ace.vars.touch&&"ace_drag"in n.event.special&&u.touchDrag,l){i="";p=l?"ace_drag":"swipe";this.$element.on(p+".ace_scroll",function(n){if(w){n.retval.cancel=!0;return}if(bt(!0),!v){n.retval.cancel=this.lock_anyway;return}if(i=n.direction,f&&(i=="up"||i=="down")||!f&&(i=="left"||i=="right")){var t=f?n.dy:n.dx;t!=0&&(Math.abs(t)>20&&l&&(t=t*2),h.move_bar(!0),s[c]=s[c]+t)}})}if(st&&r.addClass("idle-hide"),wt)r.on("mouseenter.ace_scroll",function(){pt=!0;bt(!1)}).on("mouseleave.ace_scroll",function(){pt=!1;ot==!1&&ri()});this.$element.on("mouseenter.ace_scroll touchstart.ace_scroll",function(){it=!0;wt?bt(!0):u.hoverReset&&h.reset(!0);r.addClass("scroll-hover")}).on("mouseleave.ace_scroll touchend.ace_scroll",function(){r.removeClass("scroll-hover")});f||o.children(0).css(ut,this.size);o.css(ft,this.size);w=!1;ht=!0}},this.is_active=function(){return v},this.is_enabled=function(){return!w},this.move_bar=function(n){ct=n},this.get_track=function(){return fi},this.reset=function(n){var i,l,h,t;if(!w&&(ht||this.create(),i=this.size,!n||it)){if(it=!1,tt&&(l=parseInt(Math.round((parseInt(o.css("border-top-width"))+parseInt(o.css("border-bottom-width")))/2.5)),i-=l),h=f?s[nt]:i,f&&h==0||!f&&this.element.scrollWidth==0){r.removeClass("scroll-active");return}t=f?i:s.clientWidth;f||o.children(0).css(ut,i);o.css(ft,this.size);h>t?(v=!0,r.css(ut,t).show(),et=parseFloat((t/h).toFixed(5)),rt=parseInt(Math.round(t*et)),dt=parseInt(Math.round(rt/2)),d=t-rt,e=parseInt(Math.round(s[c]*et)),k[ut]=rt+"px",k[g]=e+"px",r.addClass("scroll-active"),b==0&&ui(),oi||(u.reset&&(s[c]=0,k[g]=0),oi=!0),tt&&hi()):(v=!1,r.hide(),r.removeClass("scroll-active"),o.css(ft,""));return}},this.disable=function(){s[c]=0;k[g]=0;w=!0;v=!1;r.hide();this.$element.addClass("scroll-disabled");r.removeClass("scroll-active");o.css(ft,"")},this.enable=function(){w=!1;this.$element.removeClass("scroll-disabled")},this.destroy=function(){v=!1;w=!1;ht=!1;this.$element.removeClass("ace-scroll scroll-disabled scroll-active");this.$element.off(".ace_scroll");tt||(f||o.find("> div").children().unwrap(),o.children().unwrap(),o.remove());r.remove();at!==!1&&(this.element.style.position=at);l!=null&&(clearTimeout(l),l=null)},this.modify=function(t){t&&(u=n.extend({},u,t));this.destroy();this.create();it=!0;this.reset(!0)},this.update=function(t){t&&(u=n.extend({},u,t));this.size=u.size||this.size;this.lock=u.mouseWheelLock||this.lock;this.lock_anyway=u.lockAnyway||this.lock_anyway;st=u.hideOnIdle||st;ni=u.hideDelay||ni;wt=u.observeContent||!1;vt=u.dragEvent||!1;typeof t.styleClass!="undefined"&&(y&&r.removeClass(y),y=t.styleClass,y&&r.addClass(y),lt=!!y.match(/scroll\-left|scroll\-top/))},this.start=function(){s[c]=0},this.end=function(){s[c]=s[nt]},this.hide=function(){r.hide()},this.show=function(){r.show()},this.update_scroll=function(){ct=!1;k[g]=e+"px";s[c]=parseInt(Math.round(e/et))},p=-1,a=-1,l=null,ii=0,this.track_size=function(){return b==0&&ui(),b},this.create(),it=!0,this.reset(!0),ti=s[nt],this};n.fn.ace_scroll=function(r,u){var f,e=this.each(function(){var e=n(this),t=e.data("ace_scroll"),o=typeof r=="object"&&r;t||e.data("ace_scroll",t=new i(this,o));typeof r=="string"&&(f=t[r](u))});return f===t?e:f};n.fn.ace_scroll.defaults={size:200,horizontal:!1,mouseWheel:!0,mouseWheelLock:!1,lockAnyway:!1,styleClass:!1,observeContent:!1,hideOnIdle:!1,hideDelay:1500,hoverReset:!0,reset:!1,dragEvent:!1,touchDrag:!0,touchSwipe:!1,scrollEvent:!1,detached:!1,updatePos:!0}}(window.jQuery),function(n,t){var i=function(t,i){var c=ace.helper.getAttrSettings(t,n.fn.ace_colorpicker.defaults),o=n.extend({},n.fn.ace_colorpicker.defaults,i,c),r=n(t),s="",h="",u=null,f=[],e;r.addClass("hide").find("option").each(function(){var t="colorpick-btn",n=this.value.replace(/[^\w\s,#\(\)\.]/g,"");this.value!=n&&(this.value=n);this.selected&&(t+=" selected",h=n);f.push(n);s+='<li><a class="'+t+'" href="#" style="background-color:'+n+';" data-color="'+n+'"><\/a><\/li>'}).end().on("change.color",function(){r.next().find(".btn-colorpicker").css("background-color",this.value)}).after('<div class="dropdown dropdown-colorpicker">\t\t<a data-toggle="dropdown" class="dropdown-toggle" '+(o.auto_pos?'data-position="auto"':"")+' href="#"><span class="btn-colorpicker" style="background-color:'+h+'"><\/span><\/a><ul class="dropdown-menu'+(o.caret?" dropdown-caret":"")+(o.pull_right?" dropdown-menu-right":"")+'">'+s+"<\/ul><\/div>");e=r.next().find(".dropdown-menu");e.on(ace.click_event,function(t){var i=n(t.target),f;return i.is(".colorpick-btn")?(u&&u.removeClass("selected"),u=i,u.addClass("selected"),f=u.data("color"),r.val(f).trigger("change"),t.preventDefault(),!0):!1});u=r.next().find("a.selected");this.pick=function(i,u){if(typeof i=="number"){if(i>=f.length)return;t.selectedIndex=i;e.find("a:eq("+i+")").trigger(ace.click_event)}else if(typeof i=="string"){var o=i.replace(/[^\w\s,#\(\)\.]/g,"");if(i=f.indexOf(o),i==-1&&u===!0&&(f.push(o),n("<option />").appendTo(r).val(o),n('<li><a class="colorpick-btn" href="#"><\/a><\/li>').appendTo(e).find("a").css("background-color",o).data("color",o),i=f.length-1),i==-1)return;e.find("a:eq("+i+")").trigger(ace.click_event)}};this.destroy=function(){r.removeClass("hide").off("change.color").next().remove();f=[]}};n.fn.ace_colorpicker=function(r,u){var f,e=this.each(function(){var e=n(this),t=e.data("ace_colorpicker"),o=typeof r=="object"&&r;t||e.data("ace_colorpicker",t=new i(this,o));typeof r=="string"&&(f=t[r](u))});return f===t?e:f};n.fn.ace_colorpicker.defaults={pull_right:!1,caret:!0,auto_pos:!0}}(window.jQuery),function(n,t){var s="multiple"in document.createElement("INPUT"),u="FileList"in window,h="FileReader"in window,r="File"in window,i=function(t,i){var r=this,e=ace.helper.getAttrSettings(t,n.fn.ace_file_input.defaults),u,f;this.settings=n.extend({},n.fn.ace_file_input.defaults,i,e);this.$element=n(t);this.element=t;this.disabled=!1;this.can_reset=!0;this.$element.off("change.ace_inner_call").on("change.ace_inner_call",function(n,t){if(!r.disabled)return t===!0?void 0:l.call(r)});u=this.$element.closest("label").css({display:"block"});f=u.length==0?"label":"span";this.$element.wrap("<"+f+' class="ace-file-input" />');this.apply_settings();this.reset_input_field()};i.error={FILE_LOAD_FAILED:1,IMAGE_LOAD_FAILED:2,THUMBNAIL_FAILED:3};i.prototype.apply_settings=function(){var t=this,i,r;if(this.multi=this.$element.attr("multiple")&&s,this.well_style=this.settings.style=="well",this.well_style?(this.settings.thumbnail||(this.settings.thumbnail="small"),this.$element.parent().addClass("ace-file-multiple")):this.$element.parent().removeClass("ace-file-multiple"),this.$element.parent().find(":not(input[type=file])").remove(),this.$element.after('<span class="ace-file-container" data-title="'+this.settings.btn_choose+'"><span class="ace-file-name" data-title="'+this.settings.no_file+'">'+(this.settings.no_icon?'<i class="'+ace.vars.icon+this.settings.no_icon+'"><\/i>':"")+"<\/span><\/span>"),this.$label=this.$element.next(),this.$container=this.$element.closest(".ace-file-input"),i=!!this.settings.icon_remove,i){r=n('<a class="remove" href="#"><i class="'+ace.vars.icon+this.settings.icon_remove+'"><\/i><\/a>').appendTo(this.$element.parent());r.on(ace.click_event,function(n){var i,r;return(n.preventDefault(),!t.can_reset)?!1:(i=!0,t.settings.before_remove&&(i=t.settings.before_remove.call(t.element)),!i)?!1:(r=t.reset_input(),!1)})}this.settings.droppable&&u&&c.call(this)};i.prototype.show_file_list=function(t,i){var u=typeof t=="undefined"?this.$element.data("ace_input_files"):t,f,e,o,s,y,v,c,p,l;if(u&&u.length!=0){for(this.well_style&&(this.$label.find(".ace-file-name").remove(),this.settings.btn_change||this.$label.addClass("hide-placeholder")),this.$label.attr("data-title",this.settings.btn_change).addClass("selected"),f=0;f<u.length;f++){if(e="",o=!1,typeof u[f]=="string")e=u[f];else if(r&&u[f]instanceof File)e=n.trim(u[f].name);else if(u[f]instanceof Object&&u[f].hasOwnProperty("name"))e=u[f].name,u[f].hasOwnProperty("type")&&(o=u[f].type),u[f].hasOwnProperty("path")||(u[f].path=u[f].name);else continue;s=e.lastIndexOf("\\")+1;s==0&&(s=e.lastIndexOf("/")+1);e=e.substr(s);o==!1&&(o=/\.(jpe?g|png|gif|svg|bmp|tiff?)$/i.test(e)?"image":/\.(mpe?g|flv|mov|avi|swf|mp4|mkv|webm|wmv|3gp)$/i.test(e)?"video":/\.(mp3|ogg|wav|wma|amr|aac)$/i.test(e)?"audio":"file");y={file:"fa fa-file",image:"fa fa-picture-o file-image",video:"fa fa-film file-video",audio:"fa fa-music file-audio"};v=y[o];this.well_style?(this.$label.append('<span class="ace-file-name" data-title="'+e+'"><i class="'+ace.vars.icon+v+'"><\/i><\/span>'),c=i===!0&&r&&u[f]instanceof File?n.trim(u[f].type):"",p=h&&this.settings.thumbnail&&(c.length>0&&c.match("image")||c.length==0&&o=="image"),p&&(l=this,n.when(a.call(this,u[f])).fail(function(n){l.settings.preview_error&&l.settings.preview_error.call(l,e,n.code)}))):this.$label.find(".ace-file-name").attr({"data-title":e}).find(ace.vars[".icon"]).attr("class",ace.vars.icon+v)}return!0}};i.prototype.reset_input=function(){this.reset_input_ui();this.reset_input_field()};i.prototype.reset_input_ui=function(){this.$label.attr({"data-title":this.settings.btn_choose,"class":"ace-file-container"}).find(".ace-file-name:first").attr({"data-title":this.settings.no_file,"class":"ace-file-name"}).find(ace.vars[".icon"]).attr("class",ace.vars.icon+this.settings.no_icon).prev("img").remove();this.settings.no_icon||this.$label.find(ace.vars[".icon"]).remove();this.$label.find(".ace-file-name").not(":first").remove();this.reset_input_data()};i.prototype.reset_input_field=function(){this.$element.wrap("<form>").parent().get(0).reset();this.$element.unwrap()};i.prototype.reset_input_data=function(){this.$element.data("ace_input_files")&&(this.$element.removeData("ace_input_files"),this.$element.removeData("ace_input_method"))};i.prototype.enable_reset=function(n){this.can_reset=n};i.prototype.disable=function(){this.disabled=!0;this.$element.attr("disabled","disabled").addClass("disabled")};i.prototype.enable=function(){this.disabled=!1;this.$element.removeAttr("disabled").removeClass("disabled")};i.prototype.files=function(){return n(this).data("ace_input_files")||null};i.prototype.method=function(){return n(this).data("ace_input_method")||""};i.prototype.update_settings=function(t){this.settings=n.extend({},this.settings,t);this.apply_settings()};i.prototype.loading=function(t){if(t===!1)this.$container.find(".ace-file-overlay").remove(),this.element.removeAttribute("readonly");else{var r=typeof t=="string"?t:'<i class="overlay-content fa fa-spin fa-spinner orange2 fa-2x"><\/i>',i=this.$container.find(".ace-file-overlay");if(i.length==0){i=n('<div class="ace-file-overlay"><\/div>').appendTo(this.$container);i.on("click tap",function(n){return n.stopImmediatePropagation(),n.preventDefault(),!1});this.element.setAttribute("readonly","true")}i.empty().append(r)}};var c=function(){var n=this,t=this.$element.parent();t.off("dragenter").on("dragenter",function(n){n.preventDefault();n.stopPropagation()}).off("dragover").on("dragover",function(n){n.preventDefault();n.stopPropagation()}).off("drop").on("drop",function(t){var u,i,r;if(t.preventDefault(),t.stopPropagation(),!n.disabled)return(u=t.originalEvent.dataTransfer,i=u.files,!n.multi&&i.length>1&&(r=[],r.push(i[0]),i=r),i=f.call(n,i,!0),i===!1)?!1:(n.$element.data("ace_input_method","drop"),n.$element.data("ace_input_files",i),n.show_file_list(i,!0),n.$element.triggerHandler("change",[!0]),!0)})},l=function(){var n=this.element.files||[this.element.value];return(n=f.call(this,n,!1),n===!1)?!1:(this.$element.data("ace_input_method","select"),this.$element.data("ace_input_files",n),this.show_file_list(n,!0),!0)},a=function(t){var u=this,f=u.$label.find(".ace-file-name:last"),e=new n.Deferred,s=function(t,i){f.prepend("<img class='middle' style='display:none;' />");var r=f.find("img:last").get(0);n(r).one("load",function(){h.call(null,r,i)}).one("error",function(){c.call(null,r)});r.src=t},h=function(t,r){var o=u.settings.previewSize,s,l,a,h,c;if(o||(u.settings.previewWidth||u.settings.previewHeight?o={previewWidth:u.settings.previewWidth,previewHeight:u.settings.previewHeight}:(o=50,u.settings.thumbnail=="large"&&(o=150))),u.settings.thumbnail=="fit"?o=f.width():typeof o=="number"&&(o=parseInt(Math.min(o,f.width()))),s=v(t,o),s==null){n(this).remove();e.reject({code:i.error.THUMBNAIL_FAILED});return}l=!0;r&&r instanceof File&&(r.width=s.width,r.height=s.height,u.$element.trigger("file.preview.ace",{file:r}),u.$element.trigger(a=new n.Event("file.preview.ace"),{file:r}),a.isDefaultPrevented()&&(l=!1));l&&(h=s.previewWidth,c=s.previewHeight,u.settings.thumbnail=="small"?h=c=parseInt(Math.max(h,c)):f.addClass("large"),n(t).css({"background-image":"url("+s.src+")",width:h,height:c}).data("thumb",s.src).attr({src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg=="}).show());e.resolve()},c=function(){f.find("img").remove();e.reject({code:i.error.IMAGE_LOAD_FAILED})},o;return r&&t instanceof File?(o=new FileReader,o.onload=function(n){s(n.target.result,t)},o.onerror=function(){e.reject({code:i.error.FILE_LOAD_FAILED})},o.readAsDataURL(t)):t instanceof Object&&t.hasOwnProperty("path")&&s(t.path,null),e.promise()},v=function(t,i){var f=t.width,e=t.height,o,s,c;f=f>0?f:n(t).width();e=e>0?e:n(t).height();var h=!1,r=!1,u=!1;typeof i=="number"?h=i:i instanceof Object&&(i.previewWidth&&!i.previewHeight?u=i.previewWidth:i.previewHeight&&!i.previewWidth?r=i.previewHeight:i.previewWidth&&i.previewHeight&&(u=i.previewWidth,r=i.previewHeight));h?f>e?(u=h,r=parseInt(e/f*u)):(r=h,u=parseInt(f/e*r)):!r&&u?r=parseInt(e/f*u):r&&!u&&(u=parseInt(f/e*r));try{s=document.createElement("canvas");s.width=u;s.height=r;c=s.getContext("2d");c.drawImage(t,0,0,f,e,0,0,u,r);o=s.toDataURL()}catch(l){o=null}return o?(/^data\:image\/(png|jpe?g|gif);base64,[0-9A-Za-z\+\/\=]+$/.test(o)||(o=null),!o)?null:{src:o,previewWidth:u,previewHeight:r,width:f,height:e}:null},f=function(n,t){var i=y.call(this,n,t);return i===-1?(this.reset_input(),!1):!i||i.length==0?(this.$element.data("ace_input_files")||this.reset_input(),!1):((i instanceof Array||u&&i instanceof FileList)&&(n=i),i=!0,this.settings.before_change&&(i=this.settings.before_change.call(this.element,n,t)),i===-1)?(this.reset_input(),!1):!i||i.length==0?(this.$element.data("ace_input_files")||this.reset_input(),!1):((i instanceof Array||u&&i instanceof FileList)&&(n=i),n)},e=function(n){return n?(typeof n=="string"&&(n=[n]),n.length==0)?null:new RegExp(".(?:"+n.join("|")+")$","i"):null},o=function(n){return n?(typeof n=="string"&&(n=[n]),n.length==0)?null:new RegExp("^(?:"+n.join("|").replace(/\//g,"\\/")+")$","i"):null},y=function(t,i){var a=e(this.settings.allowExt),v=e(this.settings.denyExt),y=o(this.settings.allowMime),p=o(this.settings.denyMime),w=this.settings.maxSize||!1,h,u,l,s,f,b,c,k;if(!(a||v||y||p||w))return!0;for(h=[],u={},l=0;l<t.length;l++){if(s=t[l],f=r?s.name:s,a&&!a.test(f)){"ext"in u||(u.ext=[]);u.ext.push(f);continue}else if(v&&v.test(f)){"ext"in u||(u.ext=[]);u.ext.push(f);continue}if(r){if((b=n.trim(s.type)).length>0)if(y&&!y.test(b)){"mime"in u||(u.mime=[]);u.mime.push(f);continue}else if(p&&p.test(b)){"mime"in u||(u.mime=[]);u.mime.push(f);continue}}else{h.push(s);continue}if(w&&s.size>w){"size"in u||(u.size=[]);u.size.push(f);continue}h.push(s)}return h.length==t.length?t:(c={ext:0,mime:0,size:0},"ext"in u&&(c.ext=u.ext.length),"mime"in u&&(c.mime=u.mime.length),"size"in u&&(c.size=u.size.length),this.$element.trigger(k=new n.Event("file.error.ace"),{file_count:t.length,invalid_count:t.length-h.length,error_list:u,error_count:c,dropped:i}),k.isDefaultPrevented())?-1:h};n.fn.aceFileInput=n.fn.ace_file_input=function(r,u){var f,e=this.each(function(){var e=n(this),t=e.data("ace_file_input"),o=typeof r=="object"&&r;t||e.data("ace_file_input",t=new i(this,o));typeof r=="string"&&(f=t[r](u))});return f===t?e:f};n.fn.ace_file_input.defaults={style:!1,no_file:"No File ...",no_icon:"fa fa-upload",btn_choose:"Choose",btn_change:"Change",icon_remove:"fa fa-times",droppable:!1,thumbnail:!1,allowExt:null,denyExt:null,allowMime:null,denyMime:null,maxSize:!1,previewSize:!1,previewWidth:!1,previewHeight:!1,before_change:null,before_remove:null,preview_error:null}}(window.jQuery);!function(n){"use strict";var t=function(t,i){this.$element=n(t);this.options=n.extend({},n.fn.bs_typeahead.defaults,i);this.matcher=this.options.matcher||this.matcher;this.sorter=this.options.sorter||this.sorter;this.highlighter=this.options.highlighter||this.highlighter;this.updater=this.options.updater||this.updater;this.source=this.options.source;this.$menu=n(this.options.menu);this.shown=!1;this.listen()},i;t.prototype={constructor:t,select:function(){var n=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(n)).change(),this.hide()},updater:function(n){return n},show:function(){var t=n.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var t;return(this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength)?this.shown?this.hide():this:(t=n.isFunction(this.source)?this.source(this.query,n.proxy(this.process,this)):this.source,t?this.process(t):this)},process:function(t){var i=this;return(t=n.grep(t,function(n){return i.matcher(n)}),t=this.sorter(t),!t.length)?this.shown?this.hide():this:this.render(t.slice(0,this.options.items)).show()},matcher:function(n){return~n.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(n){for(var i=[],r=[],u=[],t;t=n.shift();)t.toLowerCase().indexOf(this.query.toLowerCase())?~t.indexOf(this.query)?r.push(t):u.push(t):i.push(t);return i.concat(r,u)},highlighter:function(n){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return n.replace(new RegExp("("+t+")","ig"),function(n,t){return"<strong>"+t+"<\/strong>"})},render:function(t){var i=this;return t=n(t).map(function(t,r){return t=n(i.options.item).attr("data-value",r),t.find("a").html(i.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(){var i=this.$menu.find(".active").removeClass("active"),t=i.next();t.length||(t=n(this.$menu.find("li")[0]));t.addClass("active")},prev:function(){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last());n.addClass("active")},listen:function(){this.$element.on("focus",n.proxy(this.focus,this)).on("blur",n.proxy(this.blur,this)).on("keypress",n.proxy(this.keypress,this)).on("keyup",n.proxy(this.keyup,this));if(this.eventSupported("keydown"))this.$element.on("keydown",n.proxy(this.keydown,this));this.$menu.on("click",n.proxy(this.click,this)).on("mouseenter","li",n.proxy(this.mouseenter,this)).on("mouseleave","li",n.proxy(this.mouseleave,this))},eventSupported:function(n){var t=n in this.$element;return t||(this.$element.setAttribute(n,"return;"),t=typeof this.$element[n]=="function"),t},move:function(n){if(this.shown){switch(n.keyCode){case 9:case 13:case 27:n.preventDefault();break;case 38:n.preventDefault();this.prev();break;case 40:n.preventDefault();this.next()}n.stopPropagation()}},keydown:function(t){this.suppressKeyPressRepeat=~n.inArray(t.keyCode,[40,38,9,13,27]);this.move(t)},keypress:function(n){this.suppressKeyPressRepeat||this.move(n)},keyup:function(n){switch(n.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}n.stopPropagation();n.preventDefault()},focus:function(){this.focused=!0},blur:function(){this.focused=!1;!this.mousedover&&this.shown&&this.hide()},click:function(n){n.stopPropagation();n.preventDefault();this.select();this.$element.focus()},mouseenter:function(t){this.mousedover=!0;this.$menu.find(".active").removeClass("active");n(t.currentTarget).addClass("active")},mouseleave:function(){this.mousedover=!1;!this.focused&&this.shown&&this.hide()}};i=n.fn.bs_typeahead;n.fn.bs_typeahead=function(i){return this.each(function(){var u=n(this),r=u.data("bs_typeahead"),f=typeof i=="object"&&i;r||u.data("bs_typeahead",r=new t(this,f));typeof i=="string"&&r[i]()})};n.fn.bs_typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"><\/ul>',item:'<li><a href="#"><\/a><\/li>',minLength:1};n.fn.bs_typeahead.Constructor=t;n.fn.bs_typeahead.noConflict=function(){return n.fn.bs_typeahead=i,this};n(document).on("focus.bs_typeahead.data-api",'[data-provide="bs_typeahead"]',function(){var t=n(this);t.data("bs_typeahead")||t.bs_typeahead(t.data())})}(window.jQuery),function(n){n.fn.ace_wysiwyg=function(t){var i=n.extend({speech_button:!0,wysiwyg:{}},t),f=["#ac725e","#d06b64","#f83a22","#fa573c","#ff7537","#ffad46","#42d692","#16a765","#7bd148","#b3dc6c","#fbe983","#fad165","#92e1c0","#9fe1e7","#9fc6e7","#4986e7","#9a9cff","#b99aff","#c2c2c2","#cabdbf","#cca6ac","#f691b2","#cd74e6","#a47ae2","#444444"],r={font:{values:["Arial","Courier","Comic Sans MS","Helvetica","Open Sans","Tahoma","Verdana"],icon:"fa fa-font",title:"Font"},fontSize:{values:{5:"Huge",3:"Normal",1:"Small"},icon:"fa fa-text-height",title:"Font Size"},bold:{icon:"fa fa-bold",title:"Bold (Ctrl/Cmd+B)"},italic:{icon:"fa fa-italic",title:"Italic (Ctrl/Cmd+I)"},strikethrough:{icon:"fa fa-strikethrough",title:"Strikethrough"},underline:{icon:"fa fa-underline",title:"Underline"},insertunorderedlist:{icon:"fa fa-list-ul",title:"Bullet list"},insertorderedlist:{icon:"fa fa-list-ol",title:"Number list"},outdent:{icon:"fa fa-outdent",title:"Reduce indent (Shift+Tab)"},indent:{icon:"fa fa-indent",title:"Indent (Tab)"},justifyleft:{icon:"fa fa-align-left",title:"Align Left (Ctrl/Cmd+L)"},justifycenter:{icon:"fa fa-align-center",title:"Center (Ctrl/Cmd+E)"},justifyright:{icon:"fa fa-align-right",title:"Align Right (Ctrl/Cmd+R)"},justifyfull:{icon:"fa fa-align-justify",title:"Justify (Ctrl/Cmd+J)"},createLink:{icon:"fa fa-link",title:"Hyperlink",button_text:"Add",placeholder:"URL",button_class:"btn-primary"},unlink:{icon:"fa fa-chain-broken",title:"Remove Hyperlink"},insertImage:{icon:"fa fa-picture-o",title:"Insert picture",button_text:'<i class="'+ace.vars.icon+'fa fa-file"><\/i> Choose Image &hellip;',placeholder:"Image URL",button_insert:"Insert",button_class:"btn-success",button_insert_class:"btn-primary",choose_file:!0},foreColor:{values:f,title:"Change Color"},backColor:{values:f,title:"Change Background Color"},undo:{icon:"fa fa-undo",title:"Undo (Ctrl/Cmd+Z)"},redo:{icon:"fa fa-repeat",title:"Redo (Ctrl/Cmd+Y)"},viewSource:{icon:"fa fa-code",title:"View Source"}},u=i.toolbar||["font",null,"fontSize",null,"bold","italic","strikethrough","underline",null,"insertunorderedlist","insertorderedlist","outdent","indent",null,"justifyleft","justifycenter","justifyright","justifyfull",null,"createLink","unlink",null,"insertImage",null,"foreColor",null,"undo","redo",null,"viewSource"];return this.each(function(){var f=' <div class="wysiwyg-toolbar btn-toolbar center"> <div class="btn-group"> ',c,t,o,s,h,a,e,l,v;for(c in u)if(u.hasOwnProperty(c)){if(t=u[c],t===null){f+=' <\/div> <div class="btn-group"> ';continue}if(typeof t=="string"&&t in r)t=r[t],t.name=u[c];else if(typeof t=="object"&&t.name in r)t=n.extend(r[t.name],t);else continue;o="className"in t?t.className:"btn-default";switch(t.name){case"font":f+=' <a class="btn btn-sm '+o+' dropdown-toggle" data-toggle="dropdown" title="'+t.title+'"><i class="'+ace.vars.icon+t.icon+'"><\/i><i class="'+ace.vars.icon+'fa fa-angle-down icon-on-right"><\/i><\/a> ';f+=' <ul class="dropdown-menu dropdown-light dropdown-caret">';for(s in t.values)t.values.hasOwnProperty(s)&&(f+=' <li><a data-edit="fontName '+t.values[s]+'" style="font-family:\''+t.values[s]+"'\">"+t.values[s]+"<\/a><\/li> ");f+=" <\/ul>";break;case"fontSize":f+=' <a class="btn btn-sm '+o+' dropdown-toggle" data-toggle="dropdown" title="'+t.title+'"><i class="'+ace.vars.icon+t.icon+'"><\/i>&nbsp;<i class="'+ace.vars.icon+'fa fa-angle-down icon-on-right"><\/i><\/a> ';f+=' <ul class="dropdown-menu dropdown-light dropdown-caret"> ';for(h in t.values)t.values.hasOwnProperty(h)&&(f+=' <li><a data-edit="fontSize '+h+'"><font size="'+h+'">'+t.values[h]+"<\/font><\/a><\/li> ");f+=" <\/ul> ";break;case"createLink":f+=' <div class="btn-group"> <a class="btn btn-sm '+o+' dropdown-toggle" data-toggle="dropdown" title="'+t.title+'"><i class="'+ace.vars.icon+t.icon+'"><\/i><\/a> ';f+=' <div class="dropdown-menu dropdown-caret dropdown-menu-right">\t\t\t\t\t\t\t <div class="input-group">\t\t\t\t\t\t\t\t<input class="form-control" placeholder="'+t.placeholder+'" type="text" data-edit="'+t.name+'" />\t\t\t\t\t\t\t\t<span class="input-group-btn">\t\t\t\t\t\t\t\t\t<button class="btn btn-sm '+t.button_class+'" type="button">'+t.button_text+"<\/button>\t\t\t\t\t\t\t\t<\/span>\t\t\t\t\t\t\t <\/div>\t\t\t\t\t\t<\/div> <\/div>";break;case"insertImage":f+=' <div class="btn-group"> <a class="btn btn-sm '+o+' dropdown-toggle" data-toggle="dropdown" title="'+t.title+'"><i class="'+ace.vars.icon+t.icon+'"><\/i><\/a> ';f+=' <div class="dropdown-menu dropdown-caret dropdown-menu-right">\t\t\t\t\t\t\t <div class="input-group">\t\t\t\t\t\t\t\t<input class="form-control" placeholder="'+t.placeholder+'" type="text" data-edit="'+t.name+'" />\t\t\t\t\t\t\t\t<span class="input-group-btn">\t\t\t\t\t\t\t\t\t<button class="btn btn-sm '+t.button_insert_class+'" type="button">'+t.button_insert+"<\/button>\t\t\t\t\t\t\t\t<\/span>\t\t\t\t\t\t\t <\/div>";t.choose_file&&"FileReader"in window&&(f+='<div class="space-2"><\/div>\t\t\t\t\t\t\t <label class="center block no-margin-bottom">\t\t\t\t\t\t\t\t<button class="btn btn-sm '+t.button_class+' wysiwyg-choose-file" type="button">'+t.button_text+'<\/button>\t\t\t\t\t\t\t\t<input type="file" data-edit="'+t.name+'" />\t\t\t\t\t\t\t  <\/label>');f+=" <\/div> <\/div>";break;case"foreColor":case"backColor":f+=' <select class="hide wysiwyg_colorpicker" title="'+t.title+'"> ';n.each(t.values,function(n,t){f+=' <option value="'+t+'">'+t+"<\/option> "});f+=" <\/select> ";f+=' <input style="display:none;" disabled class="hide" type="text" data-edit="'+t.name+'" /> ';break;case"viewSource":f+=' <a class="btn btn-sm '+o+'" data-view="source" title="'+t.title+'"><i class="'+ace.vars.icon+t.icon+'"><\/i><\/a> ';break;default:f+=' <a class="btn btn-sm '+o+'" data-edit="'+t.name+'" title="'+t.title+'"><i class="'+ace.vars.icon+t.icon+'"><\/i><\/a> '}}f+=" <\/div> ";i.speech_button&&"onwebkitspeechchange"in(a=document.createElement("input"))&&(f+=' <input class="wysiwyg-speech-input" type="text" data-edit="inserttext" x-webkit-speech />');a=null;f+=" <\/div> ";f=i.toolbar_place?i.toolbar_place.call(this,f):n(this).before(f).prev();f.find("a[title]").tooltip({animation:!1,container:"body"});f.find(".dropdown-menu input[type=text]").on("click",function(){return!1}).on("change",function(){n(this).closest(".dropdown-menu").siblings(".dropdown-toggle").dropdown("toggle")}).on("keydown",function(t){t.which==27?(this.value="",n(this).change()):t.which==13&&(t.preventDefault(),t.stopPropagation(),n(this).change())});f.find("input[type=file]").prev().on(ace.click_event,function(){n(this).next().click()});f.find(".wysiwyg_colorpicker").each(function(){n(this).ace_colorpicker({pull_right:!0}).change(function(){n(this).nextAll("input").eq(0).val(this.value).change()}).next().find(".btn-colorpicker").tooltip({title:this.title,animation:!1,container:"body"})});e=n(this);l=!1;f.find("a[data-view=source]").on("click",function(t){if(t.preventDefault(),l){var i=e.next();e.html(i.val()).show();i.remove();n(this).removeClass("active")}else n("<textarea />").css({width:e.outerWidth(),height:e.outerHeight()}).val(e.html()).insertAfter(e),e.hide(),n(this).addClass("active");l=!l});v=n.extend({},{activeToolbarClass:"active",toolbarSelector:f},i.wysiwyg||{});n(this).wysiwyg(v)}),this}}(window.jQuery),function(n,t){function i(t,i){var l=ace.helper.getAttrSettings(t,n.fn.ace_spinner.defaults),r=n.extend({},n.fn.ace_spinner.defaults,i,l),h=r.max,f,c;h=(""+h).length;var o=parseInt(Math.max(h*20+40,90)),u=n(t),e="btn-sm",s=2;u.hasClass("input-sm")?(e="btn-xs",s=1):u.hasClass("input-lg")&&(e="btn-lg",s=3);s==2?o+=25:s==3&&(o+=50);u.addClass("spinbox-input form-control text-center").wrap('<div class="ace-spinner middle">');f=u.closest(".ace-spinner").spinbox(r).wrapInner("<div class='input-group'><\/div>");c=f.data("fu.spinbox");r.on_sides?(u.before('<div class="spinbox-buttons input-group-btn">\t\t\t\t\t<button type="button" class="btn spinbox-down '+e+" "+r.btn_down_class+'">\t\t\t\t\t\t<i class="icon-only '+ace.vars.icon+r.icon_down+'"><\/i>\t\t\t\t\t<\/button>\t\t\t\t<\/div>').after('<div class="spinbox-buttons input-group-btn">\t\t\t\t\t<button type="button" class="btn spinbox-up '+e+" "+r.btn_up_class+'">\t\t\t\t\t\t<i class="icon-only '+ace.vars.icon+r.icon_up+'"><\/i>\t\t\t\t\t<\/button>\t\t\t\t<\/div>'),f.addClass("touch-spinner"),f.css("width",o+"px")):(u.after('<div class="spinbox-buttons input-group-btn">\t\t\t\t\t<button type="button" class="btn spinbox-up '+e+" "+r.btn_up_class+'">\t\t\t\t\t\t<i class="icon-only '+ace.vars.icon+r.icon_up+'"><\/i>\t\t\t\t\t<\/button>\t\t\t\t\t<button type="button" class="btn spinbox-down '+e+" "+r.btn_down_class+'">\t\t\t\t\t\t<i class="icon-only '+ace.vars.icon+r.icon_down+'"><\/i>\t\t\t\t\t<\/button>\t\t\t\t<\/div>'),ace.vars.touch||r.touch_spinner?(f.addClass("touch-spinner"),f.css("width",o+"px")):(u.next().addClass("btn-group-vertical"),f.css("width",o+"px")));f.on("changed",function(){u.trigger("change")});this._call=function(n,t){c[n](t)}}n.fn.ace_spinner=function(r,u){var f,e=this.each(function(){var e=n(this),t=e.data("ace_spinner"),o=typeof r=="object"&&r;t||(o=n.extend({},n.fn.ace_spinner.defaults,r),e.data("ace_spinner",t=new i(this,o)));typeof r=="string"&&(f=t._call(r,u))});return f===t?e:f};n.fn.ace_spinner.defaults={icon_up:"fa fa-chevron-up",icon_down:"fa fa-chevron-down",on_sides:!1,btn_up_class:"",btn_down_class:"",max:999,touch_spinner:!1}}(window.jQuery),function(n){n.fn.aceTree=n.fn.ace_tree=function(t){var i={"open-icon":ace.vars.icon+"fa fa-folder-open","close-icon":ace.vars.icon+"fa fa-folder","toggle-icon":ace.vars.icon+"fa fa-play","selected-icon":ace.vars.icon+"fa fa-check","unselected-icon":ace.vars.icon+"fa fa-times","base-icon":ace.vars.icon+"fa","folder-open-icon":"fa fa-plus-square-o","folder-close-icon":"fa fa-plus-minus-o",loadingHTML:"Loading..."};return this.each(function(){var f=ace.helper.getAttrSettings(this,i),r=n.extend({},i,t,f),u=n(this);u.addClass("tree").attr("role","tree");u.html('<li class="tree-branch hide" data-template="treebranch" role="treeitem" aria-expanded="false">\t\t\t\t'+(r.folderSelect?'<i class="icon-caret '+r["folder-open-icon"]+'"><\/i>&nbsp;':"")+'\t\t\t\t<div class="tree-branch-header">\t\t\t\t\t<span class="tree-branch-name">\t\t\t\t\t\t<i class="icon-folder '+r["close-icon"]+'"><\/i>\t\t\t\t\t\t<span class="tree-label"><\/span>\t\t\t\t\t<\/span>\t\t\t\t<\/div>\t\t\t\t<ul class="tree-branch-children" role="group"><\/ul>\t\t\t\t<div class="tree-loader" role="alert">'+r.loadingHTML+'<\/div>\t\t\t<\/li>\t\t\t<li class="tree-item hide" data-template="treeitem" role="treeitem">\t\t\t\t<span class="tree-item-name">\t\t\t\t  '+(r["unselected-icon"]==null?"":'<i class="icon-item '+r["unselected-icon"]+'"><\/i>')+'\t\t\t\t  <span class="tree-label"><\/span>\t\t\t\t<\/span>\t\t\t<\/li>');u.addClass(r.selectable==!0?"tree-selectable":"tree-unselectable");u.tree(r)}),this}}(window.jQuery),function(n){n.fn.aceWizard=n.fn.ace_wizard=function(t){return this.each(function(){var r=n(this),u,i,f;r.wizard();ace.vars.old_ie&&r.find("ul.steps > li").last().addClass("last-child");u=t&&t.buttons?n(t.buttons):r.siblings(".wizard-actions").eq(0);i=r.data("fu.wizard");i.$prevBtn.remove();i.$nextBtn.remove();i.$prevBtn=u.find(".btn-prev").eq(0).on(ace.click_event,function(){i.previous()}).attr("disabled","disabled");i.$nextBtn=u.find(".btn-next").eq(0).on(ace.click_event,function(){i.next()}).removeAttr("disabled");i.nextText=i.$nextBtn.text();f=t&&(t.selectedItem&&t.selectedItem.step||t.step);f&&(i.currentStep=f,i.setState())}),this}}(window.jQuery),function(n,t){function r(t,r){var s=this,u=n(t),f="right",o=!1,c=u.hasClass("fade"),a=ace.helper.getAttrSettings(t,n.fn.ace_aside.defaults),l;if(this.settings=n.extend({},n.fn.ace_aside.defaults,r,a),!this.settings.background||r.scroll_style||a.scroll_style||(this.settings.scroll_style="scroll-white no-track"),this.container=this.settings.container,this.container)try{n(this.container).get(0)==document.body&&(this.container=null)}catch(y){}this.container&&(this.settings.backdrop=!1,u.addClass("aside-contained"));var h=u.find(".modal-dialog"),e=u.find(".modal-content"),v=300;this.initiate=function(){if(t.className=t.className.replace(/(\s|^)aside\-(right|top|left|bottom)(\s|$)/ig,"$1$3"),f=this.settings.placement,f&&(f=n.trim(f.toLowerCase())),f&&/right|top|left|bottom/.test(f)||(f="right"),u.attr("data-placement",f),u.addClass("aside-"+f),/right|left/.test(f)?(o=!0,u.addClass("aside-vc")):u.addClass("aside-hz"),this.settings.fixed&&u.addClass("aside-fixed"),this.settings.background&&u.addClass("aside-dark"),this.settings.offset&&u.addClass("navbar-offset"),this.settings.transition||u.addClass("transition-off"),u.addClass("aside-hidden"),this.insideContainer(),h=u.find(".modal-dialog"),e=u.find(".modal-content"),!this.settings.body_scroll)u.on("mousewheel.aside DOMMouseScroll.aside touchmove.aside pointermove.aside",function(t){if(!n.contains(e[0],t.target))return t.preventDefault(),!1});this.settings.backdrop==!1&&u.addClass("no-backdrop")};this.show=function(){if(this.settings.backdrop==!1)try{u.data("bs.modal").$backdrop.remove()}catch(t){}this.container?n(this.container).addClass("overflow-hidden"):u.css("position","fixed");u.removeClass("aside-hidden")};this.hide=function(){this.container&&(this.container.addClass("overflow-hidden"),ace.vars.firefox&&t.offsetHeight);l();ace.vars.transition&&!c&&u.one("bsTransitionEnd",function(){u.addClass("aside-hidden");u.css("position","");s.container&&s.container.removeClass("overflow-hidden")}).emulateTransitionEnd(v)};this.shown=function(){if(l(),n("body").removeClass("modal-open").css("padding-right",""),this.settings.backdrop=="invisible")try{u.data("bs.modal").$backdrop.css("opacity",0)}catch(r){}var t=o?e.height():h.height();ace.vars.touch?e.addClass("overflow-scroll").css("max-height",t+"px"):e.hasClass("ace-scroll")||e.ace_scroll({size:t,reset:!0,mouseWheelLock:!0,lockAnyway:!this.settings.body_scroll,styleClass:this.settings.scroll_style,observeContent:!0,hideOnIdle:!ace.vars.old_ie,hideDelay:1500});i.off("resize.modal.aside").on("resize.modal.aside",function(){if(ace.vars.touch)e.css("max-height",(o?e.height():h.height())+"px");else{e.ace_scroll("disable");var n=o?e.height():h.height();e.ace_scroll("update",{size:n}).ace_scroll("enable").ace_scroll("reset")}}).triggerHandler("resize.modal.aside");s.container&&ace.vars.transition&&!c&&u.one("bsTransitionEnd",function(){s.container.removeClass("overflow-hidden")}).emulateTransitionEnd(v)};this.hidden=function(){i.off(".aside");(!ace.vars.transition||c)&&(u.addClass("aside-hidden"),u.css("position",""))};this.insideContainer=function(){var t=n(".main-container"),e=u.find(".modal-dialog"),r;e.css({right:"",left:""});t.hasClass("container")&&(r=!1,o==!0&&(e.css(f,parseInt((i.width()-t.width())/2)),r=!0),r&&ace.vars.firefox&&ace.helper.redraw(t[0]))};this.flip=function(){var n={right:"left",left:"right",top:"bottom",bottom:"top"};u.removeClass("aside-"+f).addClass("aside-"+n[f]);f=n[f]};l=function(){var t=u.find(".aside-trigger"),n;t.length!=0&&(t.toggleClass("open"),n=t.find(ace.vars[".icon"]),n.length!=0)&&n.toggleClass(n.attr("data-icon1")+" "+n.attr("data-icon2"))};this.initiate();this.container&&(this.container=n(this.container));u.appendTo(this.container||"body")}var i=n(window);n(document).on("show.bs.modal",".modal.aside",function(){n(".aside.in").modal("hide");n(this).ace_aside("show")}).on("hide.bs.modal",".modal.aside",function(){n(this).ace_aside("hide")}).on("shown.bs.modal",".modal.aside",function(){n(this).ace_aside("shown")}).on("hidden.bs.modal",".modal.aside",function(){n(this).ace_aside("hidden")});n(window).on("resize.aside_container",function(){n(".modal.aside").ace_aside("insideContainer")});n(document).on("settings.ace.aside",function(t,i){i=="main_container_fixed"&&n(".modal.aside").ace_aside("insideContainer")});n.fn.aceAside=n.fn.ace_aside=function(i,u){var f,e=this.each(function(){var e=n(this),t=e.data("ace_aside"),o=typeof i=="object"&&i;t||e.data("ace_aside",t=new r(this,o));typeof i=="string"&&typeof t[i]=="function"&&(f=u instanceof Array?t[i].apply(t,u):t[i](u))});return f===t?e:f};n.fn.ace_aside.defaults={fixed:!1,background:!1,offset:!1,body_scroll:!1,transition:!0,scroll_style:"scroll-dark no-track",container:null,backdrop:!1,placement:"right"}}(window.jQuery)