"use strict";define(["handlebars","View","utils"],function(d,c,b){var a=c.extend({subview:null,events:{"change #overlay.content":"hideSpinner"},hideSpinner:function(){b.hideSpinner(this.$el.find("#overlaySpinner"),this.options.framework);},showSpinner:function(){b.showSpinner(this.$el.find("#overlaySpinner"),this.options.framework);},initialize:function(e){c.prototype.initialize.apply(this,arguments);this.options=e||{};},close:function(){var e=this.$el.find("#overlay");if(this.isClosed){return;}this.isClosed=true;this.$el.parents().css("visibility","visible");this.hideSpinner();$("body").css("overflow",(this.options.overflow?this.options.overflow:"auto"));e.removeAttr("style");e.remove();this.trigger("close:all");},render:function(e){this.isClosed=false;c.prototype.render.apply(this,arguments);$("body").css("overflow","hidden");this.$el.html('<div id="overlay"></div><div id="overlaySpinner"><div class="spinner_el"><div class="spinner_center"></div></div>');if(e===true){this.showSpinner();var h=30;var f=this;var g=window.setInterval(function(){h-=1;if(h<=0){f.hideSpinner();window.clearInterval(g);}$("#tick").toggle();},1000);}if(this.options.css){this.$el.find("#overlay").css(this.options.css);}this.$el.find("#overlay").show();return this;}});return a;});