this._reset();this.initialize.apply(this,arguments);a&&this.reset(a,{silent:!0,parse:b.parse})};f.extend(r.prototype,k,{model:o,initialize:function(){},toJSON:function(a){returnthis.map(function(b){returnb.toJSON(a)})},add:function(a,b){varc,d,e,g,i,j={},k={},l=[];b||(b={});a=f.isArray(a)?a.slice():[a];c=0;for(d=a.length;c<d;c++){if(!(e=a[c]=this._prepareModel(a[c],b)))throwError("Can't add an invalid model to a collection");g=e.cid;i=e.id;j[g]||this._byCid[g]||null!=i&&(k[i]||this._byId[i])?
shift:function(a){varb=this.at(0);this.remove(b,a);returnb},get:function(a){returnnull==a?void0:this._byId[null!=a.id?a.id:a]},getByCid:function(a){returna&&this._byCid[a.cid||a]},at:function(a){returnthis.models[a]},where:function(a){returnf.isEmpty(a)?[]:this.filter(function(b){for(varcina)if(a[c]!==b.get(c))return!1;return!0})},sort:function(a){a||(a={});if(!this.comparator)throwError("Cannot sort a set without a comparator");varb=f.bind(this.comparator,this);1==this.comparator.length?
""},getFragment:function(a,b){if(null==a)if(this._hasPushState||b){vara=window.location.pathname,c=window.location.search;c&&(a+=c)}elsea=this.getHash();a.indexOf(this.options.root)||(a=a.substr(this.options.root.length));returna.replace(s,"")},start:function(a){if(m.started)throwError("Backbone.history has already been started");m.started=!0;this.options=f.extend({},{root:"/"},this.options,a);this._wantsHashChange=!1!==this.options.hashChange;this._wantsPushState=!!this.options.pushState;this._hasPushState=
for(varbina){varc=a[b];f.isFunction(c)||(c=this[a[b]]);if(!c)throwError('Method "'+a[b]+'" does not exist');vard=b.match(F),e=d[1],d=d[2],c=f.bind(c,this),e=e+(".delegateEvents"+this.cid);""===d?this.$el.bind(e,c):this.$el.delegate(d,e,c)}}},undelegateEvents:function(){this.$el.unbind(".delegateEvents"+this.cid)},_configure:function(a){this.options&&(a=f.extend({},this.options,a));for(varb=0,c=w.length;b<c;b++){vard=w[b];a[d]&&(this[d]=a[d])}this.options=a},_ensureElement:function(){if(this.el)this.setElement(this.el,
b,c){vard;d=b&&b.hasOwnProperty("constructor")?b.constructor:function(){a.apply(this,arguments)};f.extend(d,a);x.prototype=a.prototype;d.prototype=newx;b&&f.extend(d.prototype,b);c&&f.extend(d,c);d.prototype.constructor=d;d.__super__=a.prototype;returnd},n=function(a,b){return!a||!a[b]?null:f.isFunction(a[b])?a[b]():a[b]},t=function(){throwError('A "url" property or function must be specified');}}).call(this);
store.create(model);break;case"update":resp=store.update(model);break;case"delete":resp=store.destroy(model);break}if(resp)options.success(resp);elseoptions.error("Record not found")};returnStore});
(l=!0,!c.prefix))returnf=!1});if(d&&b.length)returna=H("timeout","Load timeout for modules: "+b,null,b),a.contextName=h.contextName,B(a);f&&(q(M,function(a){if(!a.defined){vara=A(a,{}),d={};a&&(C(a,d,{}),y(d,D))}}),y(m,D));if((!d||j)&&l)if((w||ca)&&!U)U=setTimeout(function(){U=0;E()},50);T=!1}}functionV(a){r(g(a[0],null,!0)).init(a[1],a[2])}functionJ(a){vara=a.currentTarget||a.srcElement,d=h.onScriptLoad;a.detachEvent&&!S?a.detachEvent("onreadystatechange",d):a.removeEventListener("load",d,
(b=function(){returnZ(a)},b.exports=a,b):function(){returna.apply(Y,arguments)}},requireDefined:function(a,b){varc=g(a,b,!1,!0).id;returnn.hasOwnProperty(c)},requireSpecified:function(a,b){a=g(a,b,!1,!0).id;returnn.hasOwnProperty(a)||m.hasOwnProperty(a)},require:function(a,d,c,e){varf;if(typeofa==="string"){if(x(d))returnB(H("requireargs","Invalid require call"),c);if(j.get)returnj.get(h,a,d);a=g(a,d,!1,!0);a=a.id;return!n.hasOwnProperty(a)?B(H("notloaded",'Module name "'+a+'" has not been loaded yet for context: '+
e,f;for(u();F.length;){f=F.shift();if(f[0]===null){f[0]=a;if(e)break;e=!0}elsef[0]===a&&(e=!0);V(f)}f=m[a];if(!e&&!n[a]&&f&&!f.inited)if(k.enforceDefine&&(!c||!Z(c)))if(i(a))return;elsereturnB(H("nodefine","No define call for "+a,null,[a]));elseV([a,b.deps||[],b.exports]);E()},toUrl:function(a,b){vare=a.lastIndexOf("."),g=null;e!==-1&&(g=a.substring(e,a.length),a=a.substring(0,e));returnh.nameToUrl(c(a,b&&b.id,!0),g)},nameToUrl:function(a,b){varc,e,f,g,h,i;if(j.jsExtRegExp.test(a))g=a+(b||