(function(){var a={}.hasOwnProperty,b=function(f,d){for(var c in d){if(a.call(d,c)){f[c]=d[c]}}function e(){this.constructor=f}e.prototype=d.prototype;f.prototype=new e();f.__super__=d.prototype;return f};window._make_icon=function(c){if(c){return'<i class="icon-'+c+'"></i>'}else{return""}};window.Controls["default"]=(function(d){b(c,d);function c(){return c.__super__.constructor.apply(this,arguments)}c.prototype.createDom=function(){return"<div >\n    <children>\n</div>"};return c})(window.Control);window.Controls.label=(function(d){b(c,d);function c(){return c.__super__.constructor.apply(this,arguments)}c.prototype.createDom=function(){return'<span class="control label '+(this.s(this.properties.style))+'">'+(this.s(this.properties.text))+"</span>"};return c})(window.Control);window.Controls.tooltip=(function(c){b(d,c);function d(){return d.__super__.constructor.apply(this,arguments)}d.prototype.createDom=function(){return'<div class="control tooltip '+(this.s(this.properties.style))+'">\n    <div class="container" title="">\n        <children>\n    </div>\n</div>'};d.prototype.setupDom=function(e){d.__super__.setupDom.call(this,e);return $(this.dom.querySelector(".container")).tooltip({content:(function(f){return function(){return'<div class="control tooltip body">\n    <div>\n        '+(f.s(f.properties.text))+"\n    </div>\n    <div>\n    </div>\n</div>"}})(this),position:{my:"left-15 bottom",at:"center top"}})};return d})(window.Control);window.Controls.icon=(function(d){b(c,d);function c(){return c.__super__.constructor.apply(this,arguments)}c.prototype.createDom=function(){var e;e=_make_icon(this.properties.icon);return'<div class="control icon style-'+(this.s(this.properties.style))+'">'+e+"</div>"};return c})(window.Control);window.Controls.button=(function(d){b(c,d);function c(){return c.__super__.constructor.apply(this,arguments)}c.prototype.createDom=function(){var e;e=_make_icon(this.properties.icon);return'<a href="#" class="control button style-'+(this.s(this.properties.style))+'">'+e+" "+(this.s(this.properties.text))+"</a>"};c.prototype.setupDom=function(e){c.__super__.setupDom.call(this,e);this.dom.addEventListener("click",(function(f){return function(g){if(!f.properties.warning||confirm(f.properties.warning)){if(f.event("click")){return f.cancel(g)}}}})(this));return this};return c})(window.Control);window.Controls.togglebutton=(function(c){b(d,c);function d(){return d.__super__.constructor.apply(this,arguments)}d.prototype.createDom=function(){var e;e=_make_icon(this.properties.icon);return'<a href="#" class="control button style-'+(this.s(this.properties.style))+" "+(this.properties.pressed?"pressed":"")+'">'+e+" "+(this.s(this.properties.text))+"</a>"};d.prototype.setupDom=function(e){d.__super__.setupDom.call(this,e);return $(this.dom).click((function(f){return function(g){if(f.event("click")){return f.cancel(g)}}})(this))};return d})(window.Control);window.Controls.list=(function(c){b(d,c);function d(){return d.__super__.constructor.apply(this,arguments)}d.prototype.createDom=function(){return'<div class="control container list --child-container">\n    <children>\n</div>'};return d})(window.Control);window.Controls.listitem=(function(c){b(d,c);function d(){return d.__super__.constructor.apply(this,arguments)}d.prototype.createDom=function(){return'<div class="control container listitem --child-container">\n    <children>\n</div>'};d.prototype.setupDom=function(e){d.__super__.setupDom.call(this,e);$(this.dom).click((function(f){return function(g){if(f.event("click")){return f.cancel(g)}}})(this));return this};return d})(window.Control);window.Controls.progressbar=(function(d){b(c,d);function c(){return c.__super__.constructor.apply(this,arguments)}c.prototype.createDom=function(){var e;e=this._int_to_px(this.properties.width);return'<div class="control progressbar '+(this.s(this.properties.style))+'" style="width: '+e+'">\n    <div class="fill">\n        <div class="tip"></div>\n    </div>\n</div>'};c.prototype.setupDom=function(e){c.__super__.setupDom.call(this,e);return this.setProgress(this.properties.value)};c.prototype.setProgress=function(f){var e;e=this._int_to_px(Math.round(this.properties.width*f));return $(this.dom).find(".fill").css({width:e})};return c})(window.Control)}).call(this);