(function(){return function(factory){if(typeof define==="function"&&define.amd){return define("lifecycle",factory)}else{return factory.call(this)}}(function(){var LC,copyProps,isArray;LC=this.LC=typeof exports!=="undefined"?exports:{};LC.VERSION="1.0.4";isArray=function(obj){return obj.constructor===Array};copyProps=function(dest,source){var key,value;for(key in source){value=source[key];dest[key]=value}return dest};var ctor=function(){};var inherits=function(parent,protoProps,staticProps){var child;if(protoProps&&protoProps.hasOwnProperty("constructor")){child=protoProps.constructor}else{child=function(){parent.apply(this,arguments)}}copyProps(child,parent);ctor.prototype=parent.prototype;child.prototype=new ctor;if(protoProps)copyProps(child.prototype,protoProps);if(staticProps)copyProps(child,staticProps);child.prototype.constructor=child;child.__super__=parent.prototype;return child};var extend=function(protoProps,classProps){var child=inherits(this,protoProps,classProps);child.extend=this.extend;return child};LC.own=function(obj,options){var clone,i,j,key,len,len1,value;if(!obj||typeof obj!=="object"){return obj}options||(options={});if(isArray(obj)){if(options.share_collection){for(i=0,len=obj.length;i