var accountPopover=function(){var e=function(e,t){e.find(".account-popover-link-text").addClass("account-popover-link-"+t),e.find(".account-popover-storage-upgrade .btn").addClass("btn-"+t),e.find(".progress-bar").addClass("progress-bar-"+t)},t=function(e){e.find(".account-popover-link-danger").removeClass("account-popover-link-danger"),e.find(".account-popover-link-warning").removeClass("account-popover-link-warning"),e.find(".account-popover-storage-upgrade .btn").removeClass("btn-danger btn-warning"),e.find(".progress-bar").removeClass("progress-bar-danger progress-bar-warning")},o=function(o){if(!o.membership_type||!o.percent_used||!o.total_storage)return console.warn("argument storage must contain the following keys: 'membership_type', 'percent_used', 'total_storage'");var r=$(".account-popover-storage"),a=parseInt(o.percent_used);t(r),r.find(".account-popover-membership_type").html(o.membership_type),r.find(".account-popover-percent_used, .progress-label").html(o.percent_used),r.find(".account-popover-total_storage").html(o.total_storage),r.find(".progress-bar").attr("style","width: "+o.percent_used+";"),a>=100?(e(r,"danger"),r.find(".account-popover-storage-upgrade").show()):a>=90?e(r,"warning"):r.find(".account-popover-storage-upgrade").hide()};return{setAccountStorage:o}}();$(function(){$('[data-toggle="popover-desktop"]').popover({html:!0,content:function(){return $(".account-popover").html()},template:'',container:".account-popover-container",placement:"bottom"}),$('[data-toggle="popover-mobile"]').popover({html:!0,content:function(){return $(".account-popover").html()},template:'',container:".account-popover-container-mobile",placement:"bottom"})}),$(function(){$(".account-popover-trigger").on("shown.bs.popover",function(){var e=$(window).height();$(function(){var t=$("#header-is_fixed").outerHeight();t>=e&&($("body").addClass("body-fixed"),$("#header-is_fixed").css("max-height",e),$("#header-is_fixed").addClass("is_scrolling"))})}),$(".account-popover-trigger").on("hidden.bs.popover",function(){$("body").removeClass("body-fixed"),$("#header-is_fixed").removeClass("is_scrolling")}),$("#header-is_fixed .navbar-collapse").on("hide.bs.collapse",function(){$(".popover.account-popover").popover("hide")})}),function(e){e(["jquery"],function(e){return e.fn.blurjs=function(t){function o(e,t,o,a,i,n){if(!(isNaN(n)||1>n)){n|=0;var d,l=e.getContext("2d");try{try{d=l.getImageData(t,o,a,i)}catch(p){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),d=l.getImageData(t,o,a,i)}catch(p){throw alert("Cannot access local image"),new Error("unable to access local image data: "+p)}}}catch(p){throw alert("Cannot access image"),new Error("unable to access image data: "+p)}var g,h,u,f,b,v,m,w,$,x,y,C,k,_,I,H,P,S,z,W,j=d.data,U=n+n+1,A=a-1,K=i-1,D=n+1,M=D*(D+1)/2,B=new r,E=B;for(u=1;U>u;u++)if(E=E.next=new r,u==D)var G=E;E.next=B;var R=null,Z=null;m=v=0;var N=s[n],O=c[n];for(h=0;i>h;h++){for(_=I=H=w=$=x=0,y=D*(P=j[v]),C=D*(S=j[v+1]),k=D*(z=j[v+2]),w+=M*P,$+=M*S,x+=M*z,E=B,u=0;D>u;u++)E.r=P,E.g=S,E.b=z,E=E.next;for(u=1;D>u;u++)f=v+((u>A?A:u)<<2),w+=(E.r=P=j[f])*(W=D-u),$+=(E.g=S=j[f+1])*W,x+=(E.b=z=j[f+2])*W,_+=P,I+=S,H+=z,E=E.next;for(R=B,Z=G,g=0;a>g;g++)j[v]=w*N>>O,j[v+1]=$*N>>O,j[v+2]=x*N>>O,w-=y,$-=C,x-=k,y-=R.r,C-=R.g,k-=R.b,f=m+((f=g+n+1)g;g++){for(I=H=_=$=x=w=0,v=g<<2,y=D*(P=j[v]),C=D*(S=j[v+1]),k=D*(z=j[v+2]),w+=M*P,$+=M*S,x+=M*z,E=B,u=0;D>u;u++)E.r=P,E.g=S,E.b=z,E=E.next;for(b=a,u=1;n>=u;u++)v=b+g<<2,w+=(E.r=P=j[v])*(W=D-u),$+=(E.g=S=j[v+1])*W,x+=(E.b=z=j[v+2])*W,_+=P,I+=S,H+=z,E=E.next,K>u&&(b+=a);for(v=g,R=B,Z=G,h=0;i>h;h++)f=v<<2,j[f]=w*N>>O,j[f+1]=$*N>>O,j[f+2]=x*N>>O,w-=y,$-=C,x-=k,y-=R.r,C-=R.g,k-=R.b,f=g+((f=h+D)=i?(b-=h*t,o.css("background-size",g+h+"px "+u+"px")):o.css("background-size",g+"px auto"),e.css("background-position",100*t+"% 0%"),o.css("background-position",b+"px "+f+"px")},this.generateHeroBlur=function(e){$(".hero-block-blur").blurjs({source:".hero-blur",radius:30,overlay:"rgba(255,255,255,0.8)"}).on("loaded",function(t,o){e(t,o)})},this.initialize=function(){$(".hero-blur").addClass("hero-blur-visible"),this.generateHeroBlur(function(e,t){this.blurGenerated=!0,$(e.target).addClass("hero-block-blur-visible"),this.updateHeroPosition()}),this.updateHeroPosition()},e.UpdateHeroModule=this}(window),$(function(){$(".hero-blur").length&&(setTimeout(function(){window.UpdateHeroModule.initialize()},100),$(window).width()<=768&&($(".hero-blur").addClass("hero-blur-visible"),$(".hero-block-side .hero-block-blur").addClass("hero-block-blur-visible")))}),$(window).resize(function(){if($(".hero-blur").length){var e=window.UpdateHeroModule;$(window).width()!=e.windowWidth&&(e.updateHeroPosition(),e.windowWidth=$(window).width()),!e.blurGenerated&&$(window).width()>=768&&(e.blurGenerated=!0,$(".hero-block-blur").removeClass("hero-block-blur-visible"),e.generateHeroBlur(function(t,o){$(t.target).addClass("hero-block-blur-visible"),e.updateHeroPosition()}))}}),$(function(){$(".list-group-toggle-trigger").click(function(e){e.preventDefault(),$(this).next(".list-group-item-child").toggleClass("is_open"),$("i",this).toggleClass("fa-plus fa-minus")})}),$(function(){var e=$(".list-group-link-is_active");$(e).length&&($(e).append(''),$(e).parents(".list-group-item-child").addClass("is_open"),$(e).parents(".list-group-item").addClass("is_active"),$(e).parents(".list-group-item").find(".list-group-toggle-trigger .fa").toggleClass("fa-plus fa-minus"))}),$(function(){$("#header-is_fixed .dropdown").on("shown.bs.dropdown",function(){var e=$(window).height();setTimeout(function(){var t=$("#header-is_fixed").outerHeight();t>=e&&($("body").addClass("body-fixed"),$("#header-is_fixed").css("max-height",e),$("#header-is_fixed").addClass("is_scrolling"))},250),$(".popover.account-popover").popover("hide")}),$("#header-is_fixed .dropdown").on("hidden.bs.dropdown",function(){$("body").removeClass("body-fixed"),$("#header-is_fixed").removeClass("is_scrolling")}),$("#header-is_fixed .navbar-collapse").on("hidden.bs.collapse",function(){$("body").removeClass("body-fixed"),$("#header-is_fixed").removeClass("is_scrolling")})}),$(function(){$(".dropdown-toggle").dropdown(),$(document).on("click",".navbar-dropdown .dropdown-menu",function(e){e.stopPropagation()})}),$(function(){$('[data-toggle="popover"]').popover()}),$.fn.popover.Constructor.prototype.getCalculatedOffset=function(e,t,o,r){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-o/2}:"top"==e?{top:t.top-r,left:t.left+t.width/2-o/2}:"left"==e?{top:t.top+t.height/2-r/2,left:t.left-o}:"bottomleft"==e?{top:t.top+t.height,left:t.left-o+t.width}:"bottomright"==e?{top:t.top+t.height,left:t.left}:{top:t.top+t.height/2-r/2,left:t.left+t.width}},$.fn.popover.Constructor.prototype.replaceArrow=function(e,t,o){var r=this.arrow(),a=(r[0].offsetWidth,r[0].offsetHeight,this.tip()),i=a[0].offsetWidth,n=(a[0].offsetHeight,this.$element),s=n[0].offsetWidth;n[0].offsetHeight;switch(this.options.placement){case"bottomleft":var c=i-s/2;this.arrow().css("left",c+"px");break;case"bottomright":var c=s/2;this.arrow().css("left",c+"px");break;default:this.arrow().css(o?"left":"top",50*(1-e/t)+"%").css(o?"top":"left","")}};