!function(){Bootstrap.BsModalComponent=Ember.Component.extend(Ember.Evented,{layoutName:"components/bs-modal",classNames:["modal"],attributeBindings:["role","aria-labelledby","isAriaHidden:aria-hidden","ariaLabelledBy:aria-labelledby"],isAriaHidden:function(){return""+this.get("isVisible")}.property("isVisible"),modalBackdrop:'',role:"dialog",footerViews:[],backdrop:!0,title:null,isVisible:!1,manual:!1,didInsertElement:function(){var a;return this._super(),this.setupBinders(),a=this.get("name"),Ember.assert("Modal name is required for modal view "+this.get("elementId"),this.get("name")),null==a&&(a=this.get("elementId")),Bootstrap.ModalManager.add(a,this),this.manual?this.show():void 0},becameVisible:function(){return this.get("backdrop")?this.appendBackdrop():void 0},becameHidden:function(){return this._backdrop?this._backdrop.remove():void 0},appendBackdrop:function(){var a;return a=this.$().parent(),this._backdrop=Em.$(this.modalBackdrop).appendTo(a)},show:function(){return this.set("isVisible",!0)},hide:function(){return this.set("isVisible",!1)},toggle:function(){return this.toggleProperty("isVisible")},click:function(a){var b,c;return b=a.target,c=b.getAttribute("data-dismiss"),"modal"===c?this.close():void 0},keyPressed:function(a){return 27===a.keyCode?this.close(a):void 0},close:function(){return this.get("manual")?this.destroy():this.hide(),this.trigger("closed")},willDestroyElement:function(){var a;return this.removeHandlers(),a=this.get("name"),null==a&&(a=this.get("elementId")),Bootstrap.ModalManager.remove(a,this),this._backdrop?this._backdrop.remove():void 0},removeHandlers:function(){return jQuery(window.document).unbind("keyup",this._keyUpHandler)},setupBinders:function(){var a,b=this;return a=function(a){return b.keyPressed(a)},jQuery(window.document).bind("keyup",a),this._keyUpHandler=a}}),Bootstrap.ModalManager=Ember.Object.create({add:function(a,b){return this.set(a,b)},register:function(a,b){return this.add(a,b),b.appendTo(b.get("targetObject").namespace.rootElement)},remove:function(a){return this.set(a,null)},close:function(a){return this.get(a).close()},hide:function(a){return this.get(a).hide()},show:function(a){return this.get(a).show()},toggle:function(a){return this.get(a).toggle()},confirm:function(a,b,c,d,e){var f,g;return null==d&&(d="Confirm"),null==e&&(e="Cancel"),f=Ember.View.extend({template:Ember.Handlebars.compile(c||"Are you sure you would like to perform this action?")}),g=[Ember.Object.create({title:d,clicked:"modalConfirmed",dismiss:"modal"}),Ember.Object.create({title:e,clicked:"modalCanceled",dismiss:"modal"})],this.open("confirm-modal",b||"Confirmation required!",f,g,a)},openModal:function(a,b){var c,d;return null==b&&(b={}),d=b.rootElement||".ember-application",c=a.create(b),c.appendTo(d)},open:function(a,b,c,d,e){var f,g,h;return f=e.container.lookup("component-lookup:main"),g=f.lookupFactory("bs-modal",e.get("container")).create(),g.setProperties({name:a,title:b,manual:!0,footerButtons:d,targetObject:e}),"string"===Ember.typeOf(c)?(h=e.container.lookup("template:"+c),Ember.assert("Template "+c+" was specified for Modal but template could not be found.",h),h&&g.setProperties({body:Ember.View.extend({template:h,controller:e})})):"class"===Ember.typeOf(c)&&g.setProperties({body:c,controller:e}),g.appendTo(e.namespace.rootElement)}}),Ember.Application.initializer({name:"bs-modal",initialize:function(a){return a.register("component:bs-modal",Bootstrap.BsModalComponent)}})}.call(this),this.Ember=this.Ember||{},this.Ember.TEMPLATES=this.Ember.TEMPLATES||{},this.Ember.TEMPLATES["components/bs-modal"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d,e,f,g,h="";return b.buffer.push("\n \n "),h}function g(a,b){var d,e,f="";return b.buffer.push("\n "),d={},e={},b.buffer.push(p(c.view.call(a,"view.body",{hash:{},contexts:[a],types:["ID"],hashContexts:e,hashTypes:d,data:b}))),b.buffer.push("\n "),f}function h(a,b){var d,e,f="";return b.buffer.push("\n "),d={},e={},b.buffer.push(p(c._triageMustache.call(a,"yield",{hash:{},contexts:[a],types:["ID"],hashContexts:e,hashTypes:d,data:b}))),b.buffer.push("\n "),f}function i(a,b){var d,e,f,g,h="";return b.buffer.push("\n "),e={content:a,targetObjectBinding:a},f={content:"ID",targetObjectBinding:"STRING"},g={hash:{content:"",targetObjectBinding:"view.targetObject"},contexts:[],types:[],hashContexts:e,hashTypes:f,data:b},b.buffer.push(p((d=c["bs-button"]||a["bs-button"],d?d.call(a,g):o.call(a,"bs-button",g)))),b.buffer.push("\n "),h}function j(a,b){var d,e,f="";return b.buffer.push("\n "),d={},e={},b.buffer.push(p(c.view.call(a,"",{hash:{},contexts:[a],types:["ID"],hashContexts:e,hashTypes:d,data:b}))),b.buffer.push("\n "),f}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var k,l,m,n="",o=c.helperMissing,p=this.escapeExpression,q=this;return e.buffer.push('"),n});