helper to sub-out getters of Asset.prototype
337489
function stub_getter(name) {
  getter(Asset.prototype, name, function () {
    // this should never happen, as Asset is an abstract class and not
    // supposed to be used directly. subclasses must override this getters
    throw new Error(this.constructor.name + '#' + name + ' getter is not implemented.');
  });
}
1166314
function getter (index) {
  debug('getting array[%d]', index)
  var size = this.constructor.BYTES_PER_ELEMENT
  var baseType = this.constructor.type
  var offset = size * index
  var end = offset + size
  var buffer = this.buffer
  if (buffer.length < end) {
    debug('reinterpreting buffer from %d to %d', buffer.length, end)
    buffer = _ref.reinterpret(buffer, end)
  }
  return _ref.get(buffer, offset, baseType)
}
1187527
function getPropertyDescriptor(target, name) {
        var pd = Object.getOwnPropertyDescriptor(target, name),
            proto = Object.getPrototypeOf(target);
        while (typeof pd === 'undefined' && proto !== null) {
            pd = Object.getOwnPropertyDescriptor(proto, name);
            proto = Object.getPrototypeOf(proto);
        }
        return pd;
    }
483154
function(property, level /* fields */) {

            var propertyContainers = [];

            if (this.hasOwnProperty(property)) {
                propertyContainers.push(this[property]);
            }

            if (this.__proto && this.__proto.hasOwnProperty(property)) {
                propertyContainers.push(this.__proto[property]);
            }

            var parent  = this.__parent;

            while (parent) {
                if (parent.hasOwnProperty(property)) {
                    propertyContainers.push(parent[property]);
                }
                parent = parent.__parent;
            }

            var fields = _.toArray(arguments).slice(2);
            var propertyValues = {};

            for (var i = 0, ii = propertyContainers.length; i < ii; ++i) {
                this.__collectValues(propertyValues, propertyContainers[i], level || 1, fields);
            }

            return propertyValues;
        }
253322
function( fn ){
    var req;
    var fnName;

    if( $$.is.object(fn) && fn.fn ){ // manual fn
      req = fnAs( fn.fn, fn.name );
      fnName = fn.name;
      fn = fn.fn;
    } else if( $$.is.fn(fn) ){ // auto fn
      req = fn.toString();
      fnName = fn.name;
    } else if( $$.is.string(fn) ){ // stringified fn
      req = fn;
    } else if( $$.is.object(fn) ){ // plain object
      if( fn.proto ){
        req = '';
      } else {
        req = fn.name + ' = {};';
      }

      fnName = fn.name;
      fn = fn.obj;
    }

    req += '\n';

    var protoreq = function( val, subname ){
      if( val.prototype ){
        var protoNonempty = false;
        for( var prop in val.prototype ){ protoNonempty = true; break; };

        if( protoNonempty ){
          req += fnAsRequire( {
            name: subname,
            obj: val,
            proto: true
          }, val );
        }
      }
    };

    // pull in prototype
    if( fn.prototype && fnName != null ){

      for( var name in fn.prototype ){
        var protoStr = '';

        var val = fn.prototype[ name ];
        var valStr = stringifyFieldVal( val );
        var subname = fnName + '.prototype.' + name;

        protoStr += subname + ' = ' + valStr + ';\n';

        if( protoStr ){
          req += protoStr;
        }

        protoreq( val, subname ); // subobject with prototype
      }
  
    }

    // pull in properties for obj/fns
    if( !$$.is.string(fn) ){ for( var name in fn ){
      var propsStr = '';

      if( fn.hasOwnProperty(name) ){
        var val = fn[ name ];
        var valStr = stringifyFieldVal( val );
        var subname = fnName + '["' + name + '"]';

        propsStr += subname + ' = ' + valStr + ';\n';
      }

      if( propsStr ){
        req += propsStr;
      }

      protoreq( val, subname ); // subobject with prototype
    } }

    return req;
  }
745672
function (properties) {
        var proto = this.prototype,
            replaceMap = arguments[1] || REPLACE_CLASS_METHODS; // hidden feature, used by itags
        Array.isArray(properties) || (properties=[properties]);
        properties.forEach(function(prop) {
            prop = replaceMap[prop] || prop;
            delete proto[prop];
        });
        return this;
    }
1356830
function(property, value, fields) {
            fields = fields || [];
            var getters = this.__getGetters(property, true);

            for (var i = 0, ii = getters.length; i < ii; ++i) {
                var result = getters[i].call(this, value, fields);

                if (!_.isUndefined(result)) {
                    value = result;
                }
            }

            return value;
        }
632389
function () {
        var result = {};
        Array.prototype.forEach.call(arguments, function (o) {
            for (var key in o) {
                if (o.hasOwnProperty(key)) {
                    result[key] = o[key];
                }
            }
        });
        return result;
    }
549685
function(proto, key, def) {
		var desc;
		["getter", "setter"].forEach(function(name, set) {
			while (proto && proto[key] && !gui.Type.isDefined(def[name])) {
				proto = Object.getPrototypeOf(proto);
				desc = Object.getOwnPropertyDescriptor(proto, key);
				if (desc) {
					def[name] = desc[set ? "set" : "get"];
				}
			}
		});
		return {
			enumerable: true,
			configurable: true,
			get: def.getter || this._NOGETTER,
			set: def.setter || this._NOSETTER
		};
	}
1302123
function recursiveMerge (target, src) {
    for (var prop in src) {
        if (src.hasOwnProperty(prop)) {
            if (target.prototype && target.prototype.constructor === target) {
                // If the target object is a constructor override off prototype.
                clobber(target.prototype, prop, src[prop]);
            } else {
                if (typeof src[prop] === 'object' && typeof target[prop] === 'object') {
                    recursiveMerge(target[prop], src[prop]);
                } else {
                    clobber(target, prop, src[prop]);
                }
            }
        }
    }
}
130191
function() {
          var arr = [ ];
          arr.push.apply(arr, arguments);
          PROTO_SETTER(arr, SubArray.prototype);
          return arr;
        }
542272
function getSiblingsOfAncestors(el) {
    return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);
}
1069755
function() {
        var obj = arguments[0], args = Array.prototype.slice.call(arguments, 1);

        function copy(destination, source) {
            for (var property in source) {
                if (source[property] && source[property].constructor &&
                    source[property].constructor === Object) {
                    destination[property] = destination[property] || {};
                    copy(destination[property], source[property]);
                } else {
                    destination[property] = source[property];
                }
            }
            return destination;
        }

        for(var i in args) {
            copy(obj, args[i]);
        }

        return obj;
    }
718600
function () {

        let Foo = $prototype ({

            get foo () {

                $assert (Meta.unwrap (this.constructor.$definition.foo).get instanceof Function)
                $assert (Meta.tags (this.constructor.$definition.foo), { 'property': true })

                return 42
            },

            $static: {
                get bar () {
                    return 42
                }
            }
        })

        $assert (Meta.unwrap (Foo.$definition.bar).get instanceof Function)
        $assert (Meta.tags (Foo.$definition.bar), { 'static': true, 'property': true })
        $assert (Foo.bar, 42)

        let foo = new Foo ()
        $assert (foo.foo, 42)
    }
254162
function extend(obj) {
  var slice = Array.prototype.slice;

  slice.call(arguments, 1).forEach(function(source) {
    var getter
      , setter;

    for (var key in source) {
      getter = source.__lookupGetter__(key);
      setter = source.__lookupSetter__(key);

      if (getter || setter) {
        getter && obj.__defineGetter__(key, getter);
        setter && obj.__defineSetter__(key, setter);
      }

      else {
        obj[key] = source[key];
      }
    }
  });

  return obj;
}
895578
function getProperty(obj, name) {
	if (name === '__proto__') {
		if (!hasOwn.call(obj, name)) {
			return void 0;
		} else if (gOPD) {
			// In early versions of node, obj['__proto__'] is buggy when obj has
			// __proto__ as an own property. Object.getOwnPropertyDescriptor() works.
			return gOPD(obj, name).value;
		}
	}

	return obj[name];
}
393349
function(key, value, proto, parseProtoCheck, reviveDate) {
        if (reviveDate && (typeof value==='string')) {
            return value.toDate() || value;
        }
        if (!Object.isObject(value)) {
            return value;
        }
        // only first level of objects can be given the specified prototype
        if ((typeof parseProtoCheck === 'function') && !parseProtoCheck(value)) {
            return value;
        }
        if (PROTO_SUPPORTED) {
            value.__proto__ = proto;
            return value;
        }
        return value.deepClone(null, proto);
    }