//>>built define("dstore/Memory","dojo/_base/declare dojo/_base/array ./Store ./Promised ./SimpleQuery ./QueryResults".split(" "),function(m,r,n,p,q,l){return m([n,p,q],{constructor:function(){this.storage.version=0},postscript:function(){this.inherited(arguments);this.setData(this.data||[])},data:null,autoEmitEvents:!1,getSync:function(a){return this.storage.fullData[this.storage.index[a]]},putSync:function(a,b){b=b||{};var c=this.storage,g=c.index,h=c.fullData,e=this.Model;!e||a instanceof e||(a=this._restore(a)); var f=this.getIdentity(a);null==f&&(this._setIdentity(a,"id"in b?b.id:Math.random()),f=this.getIdentity(a));c.version++;var c=f in g?"update":"add",e={target:a},d;if("update"===c){if(!1===b.overwrite)throw Error("Object already exists");h.splice(d=g[f],1);f=d}else f=this.defaultNewToStart?0:h.length;if("beforeId"in b){var k=b.beforeId;null===k?b=h.length:(b=g[k],d