define("dojo/data/ObjectStore",["../_base/lang","../Evented","../_base/declare","../_base/Deferred","../_base/array","../_base/connect","../regexp"],function(_1,_2,_3,_4,_5,_6,_7){function_8(_9){return_9=="*"?".*":_9=="?"?".":_9;};return_3("dojo.data.ObjectStore",[_2],{objectStore:null,constructor:function(_a){this._dirtyObjects=[];if(_a.labelAttribute){_a.labelProperty=_a.labelAttribute;}_1.mixin(this,_a);},labelProperty:"label",getValue:function(_b,_c,_d){returntypeof_b.get==="function"?_b.get(_c):_cin_b?_b[_c]:_d;},getValues:function(_e,_f){varval=this.getValue(_e,_f);returnvalinstanceofArray?val:val===undefined?[]:[val];},getAttributes:function(_10){varres=[];for(variin_10){if(_10.hasOwnProperty(i)&&!(i.charAt(0)=="_"&&i.charAt(1)=="_")){res.push(i);}}returnres;},hasAttribute:function(_11,_12){return_12in_11;},containsValue:function(_13,_14,_15){return_5.indexOf(this.getValues(_13,_14),_15)>-1;},isItem:function(_16){return(typeof_16=="object")&&_16&&!(_16instanceofDate);},isItemLoaded:function(_17){return_17&&typeof_17.load!=="function";},loadItem:function(_18){var_19;if(typeof_18.item.load==="function"){_4.when(_18.item.load(),function(_1a){_19=_1a;var_1b=_1ainstanceofError?_18.onError:_18.onItem;if(_1b){_1b.call(_18.scope,_1a);}});}else{if(_18.onItem){_18.onItem.call(_18.scope,_18.item);}}return_19;},close:function(_1c){return_1c&&_1c.abort&&_1c.abort();},fetch:function(_1d){_1d=_1.delegate(_1d,_1d&&_1d.queryOptions);var_1e=this;var_1f=_1d.scope||_1e;var_20=_1d.query;if(typeof_20=="object"){_20=_1.delegate(_20);for(variin_20){var_21=_20[i];if(typeof_21=="string"){_20[i]=RegExp("^"+_7.escapeString(_21,"*?\\").replace(/\\.|\*|\?/g,_8)+"$",_1d.ignoreCase?"mi":"m");_20[i].toString=(function(_22){returnfunction(){return_22;};})(_21);}}}var_23=this.objectStore.query(_20,_1d);_4.when(_23.total,function(_24){_4.when(_23,function(_25){if(_1d.onBegin){_1d.onBegin.call(_1f,_24||_25.length,_1d);}if(_1d.onItem){for(vari=0;i<_25.length;i++){_1d.onItem.call(_1f,_25[i],_1d);}}if(_1d.onComplete){_1d.onComplete.call(_1f,_1d.onItem?null:_25,_1d);}return_25;},_26);},_26);function_26(_27){if(_1d.onError){_1d.onError.call(_1f,_27,_1d);}};_1d.abort=function(){if(_23.cancel){_23.cancel();}};if(_23.observe){if(this.observing){this.observing.cancel();}this.observing=_23.observe(function(_28,_29,_2a){if(_5.indexOf(_1e._dirtyObjects,_28)==-1){if(_29==-1){_1e.onNew(_28);}else{if(_2a==-1){_1e.onDelete(_28);}else{for(variin_28){if(i!=_1e.objectStore.idProperty){_1e.onSet(_28,i,null,_28[i]);}}}}}},true);}this.onFetch(_23);_1d.store=this;return_1d;},getFeatures:function(){return{"dojo.data.api.Read":!!this.objectStore.get,"dojo.data.api.Identity":true,"dojo.data.api.Write":!!this.objectStore.put,"dojo.data.api.Notification":true};},getLabel:function(_2b){if(this.isItem(_2b)){returnthis.getValue(_2b,this.labelProperty);}returnundefined;},getLabelAttributes:function(_2c){return[this.labelProperty];},getIdentity:function(_2d){returnthis.objectStore.getIdentity?this.objectStore.getIdentity(_2d):_2d[this.objectStore.idProperty||"id"];},getIdentityAttributes:function(_2e){return[this.objectStore.idProperty];},fetchItemByIdentity:function(_2f){var_30;_4.when(this.objectStore.get(_2f.identity),function(_31){_30=_31;_2f.onItem.call(_2f.scope,_31);},function(_32){_2f.onError.call(_2f.scope,_32);});return_30;},newItem:function(_33,_34){if(_34){var_35=this.getValue(_34.parent,_34.attribute,[]);_35=_35.concat([_33]);_33.__parent=_35;this.setValue(_34.parent,_34.attribute,_35);}this._dirtyObjects.push({object:_33,save:true});this.onNew(_33);return_33;},deleteItem:function(_36){this.changing(_36,true);this.onDelete(_36);},setValue:function(_37,_38,_39){varold=_37[_38];this.changing(_37);_37[_38]=_39;this.onSet(_37,_38,old,_39);},setValues:function(_3a,_3b,_3c){if(!_1.isArray(_3c)){thrownewError("setValues expects to be passed an Array object as its value");}this.setValue(_3a,_3b,_3c);},unsetAttribute:function(_3d,_3e){this.changing(_3d);varold=_3d[_3e];delete_3d[_3e];this.onSet(_3d,_3e,old,undef