!function(t,e){function n(t){return t&&("always"===t.embedded||"load"===t.embedded)}function i(t,e,i){var o=u(this.constructor,"relationshipsByName"),r=o.values;for(var a in r)if(r.hasOwnProperty(a)){var s=r[a].key;t&&n(t[e.keyForAttribute(s)])&&i(r[a],this.get(s))}}function o(t,e){if(e&&!r(e)){var n=t.kind;"belongsTo"===n?a(e):"hasMany"===n&&e.content.forEach(a)}}function r(t){return"function"==typeof t.then}function a(e){null===e.get(f).match(/saved/)&&t.run(function(){e.rollback()})}function s(t,e){if(e&&!r(e)){var n=t.kind;"belongsTo"===n?c(e):"hasMany"===n&&e.content.forEach(c)}}function c(t){return r(this)?this:void(t.get("isLoading")||t.get("isDirty")||d.call(t))}function d(){var e=this;t.run(function(){e.transitionTo("updated.uncommitted")})}var u=t.get,f="currentState.stateName";e.ModelWithEmbeddedMixin=t.Mixin.create({embeddedNotifier:function(t,e){var n=this.store.serializerFor(this.constructor),r=n.get("attrs");r&&("root.loaded.updated.uncommitted"===this.get(e)?i.call(this,r,n,s):"root.loaded.saved"===this.get(e)&&i.call(this,r,n,o))}.observes(f)})}(Ember,DS);