/*
deep assign
@param {Object} oldData oldData
@param {Object} newData newData
10731
function assign (oldData, newData) {
  Object.keys(newData).forEach(k => {
    if (isObject(newData[k]) && oldData[k] && isObject(oldData[k])) {
      assign(oldData[k], newData[k])
      let obj = JSON.parse(JSON.stringify({
        [k]: oldData[k]
      }))
      Object.assign(oldData, obj)
    } else {
      oldData[k] = newData[k]
    }
  })
}
900806
function update(v, i, params, {oldValue}) {
      switch (i) {
      case 'children': _unobserveChildren(oldValue); _observeChildren(v); break;
      case 'attrs':    _unobserveAttrs   (oldValue); _observeAttrs   (v); break;
      }
    }
371766
function (name, value, oldValue) {
            // it doesn't make sense to bind both index and value,
            // so we just state that the index takes precedence on the value

            if (name === "selectedIndex") {
                this._domElt.selectedIndex = value;
                this.setValueInDataModel();
                if (!this.isIndexValid(value)) {
                    this.setIndexInDataModel();
                }
            } else if (name === "value") {
                this._domElt.selectedIndex = this.getIndex(value);
                this.setIndexInDataModel();
                // if selectedIndex is set to -1 and value is bound we modify the data model to change the value to ''
                if (this._domElt.selectedIndex === -1) {
                    this.setValueInDataModel();
                }
            }
            this.onDisabledBind(name, value, oldValue);
        }
1314506
function(newValue, oldValue, batchNum) {
                    setCached(newValue);
                    updateOnChange(computed, newValue, oldValue, batchNum);
                }
978110
function (oldData) {
       var data = this.data;

       this.material.color.setStyle(data.color);
       this.material.opacity = data.opacity;
       this.material.transparent = data.transparent;
       this.material.wireframe = data.debug;
       this.material.side = parseSide(data.side);

       var diff = AFRAME.utils.diff(data, oldData);
       if ('src' in diff) {
         this.updateMap();
       }
       else if ('width' in diff || 'height' in diff || 'padding' in diff || 'left' in diff || 'top' in diff || 'bottom' in diff || 'right' in diff) {
         this.regenerateMesh();
       }
     }
47425
function patch(element, previous, dataset) {
  if (!previous && !dataset) {
    return dataset;
  }
  var name;
  previous = previous || {};
  dataset = dataset || {};

  for (name in previous) {
    if (dataset[name] === undefined) {
      delete element.dataset[name];
    }
  }

  for (name in dataset) {
    if (previous[name] === dataset[name]) {
      continue;
    }
    element.dataset[name] = dataset[name];
  }

  return dataset;
}
399814
function (oldData) {
    // Nothing changed
    if (AFRAME.utils.deepEqual(oldData, this.data)) {
      return;
    }

    if (oldData.pxToWorldRatio !== this.data.pxToWorldRatio) {
      const geomComponent = this.el.components.geometry;
      const width = geomComponent.data.width * this.data.pxToWorldRatio;
      const height = geomComponent.data.height * this.data.pxToWorldRatio;
      setDimensions(this._canvasContainerId, this.el, width, height);
    }

    // Everything after this requires a map instance
    if (!this._mapInstance) {
      return;
    }

    if (oldData.style !== this.data.style) {
      const style = processStyle(this.data.style);
      this._mapInstance.setStyle(style);
    }

    if (oldData.minZoom !== this.data.minZoom) {
      this._mapInstance.setMinZoom(this.data.minZoom);
    }

    if (oldData.maxZoom !== this.data.maxZoom) {
      this._mapInstance.setmaxZoom(this.data.maxZoom);
    }

    if (oldData.maxBounds !== this.data.maxBounds) {
      this._mapInstance.setmaxBounds(this.data.maxBounds);
    }

    const jumpOptions = {};

    if (oldData.zoom !== this.data.zoom) {
      jumpOptions.zoom = this.data.zoom;
      // we also need to set the center otherwise the mapbox library goes crazy
      jumpOptions.center = this.data.center || oldData.center;
    }

    if (!AFRAME.utils.deepEqual(oldData.center, this.data.center)) {
      jumpOptions.center = this.data.center;
    }

    if (oldData.bearing !== this.data.bearing) {
      jumpOptions.bearing = this.data.bearing;
    }

    if (oldData.pitch !== this.data.pitch) {
      jumpOptions.pitch = this.data.pitch;
    }

    if (Object.keys(jumpOptions).length > 0) {
      // A way to signal when these async actions have completed
      this._mapInstance.once('moveend', _ => {
        this.el.emit(MAP_MOVE_END_EVENT);
      });
      this._mapInstance.jumpTo(jumpOptions); // moveend
    }
  }
248997
function copyData (dest, sourceData) {
  var parsedProperty;
  var key;
  for (key in sourceData) {
    if (sourceData[key] === undefined) { continue; }
    parsedProperty = sourceData[key];
    dest[key] = isObjectOrArray(parsedProperty)
      ? utils.clone(parsedProperty)
      : parsedProperty;
  }
  return dest;
}
459488
function deepCopy(value) {
  let result;
  if (value instanceof Buffer) {
    // isPlainObject(buffer) returns true.
    return new Buffer(value);
  }

  if (isPlainObject(value) === true) {
    result = {};
    loopKeys(value, function(_value, key) {
      if (_value.hasOwnProperty(key)) {
        result[key] = deepCopy(_value[key]);
      }
    });
    return result;
  }

  if (Array.isArray(value)) {
    result = [];
    for (let i = 0, ii = value.length; i < ii; ++i) {
      result.push(deepCopy(value[i]));
    }
    return result;
  }

  return value;
}
983900
function fieldAssign(elem, field, val) {
        try {
            $(exports).triggerHandler('fieldAssign', [elem, field, val]);
        } catch (err) {
            console.error(err);
        }
        var isCustomField = (elem[field] && elem[field].__read);
        var oldVal;
        if (isCustomField) {
            oldVal = elem[field].__write();
        } else {
            oldVal = elem[field];
        }
        _currentOperation.ops.push({
            op: OP_FIELD_ASSIGN,
            arg: {
                _id: elem._id,
                f: field,
                n: val,
                o: oldVal
            }
        });
    }
464400
protected final void firePropertyDataChanged(Collection<? extends D> oldData, Collection<? extends D> newData) {
		firePropertyDataChanged(new TreeDataEvent(this, oldData, newData, this.data));
	}
753857
function (oldData) {
    var data = this.data;
    var el = this.el;
    var raycaster = this.raycaster;

    // Set raycaster properties.
    raycaster.far = data.far;
    raycaster.near = data.near;

    // Draw line.
    if (data.showLine &&
        (data.far !== oldData.far || data.origin !== oldData.origin ||
         data.direction !== oldData.direction || !oldData.showLine)) {
      // Calculate unit vector for line direction. Can be multiplied via scalar to performantly
      // adjust line length.
      this.unitLineEndVec3.copy(data.origin).add(data.direction).normalize();
      this.drawLine();
    }

    if (!data.showLine && oldData.showLine) {
      el.removeAttribute('line');
    }

    if (data.objects !== oldData.objects && !OBSERVER_SELECTOR_RE.test(data.objects)) {
      warn('[raycaster] Selector "' + data.objects +
           '" may not update automatically with DOM changes.');
    }

    if (!data.objects) {
      warn('[raycaster] For performance, please define raycaster.objects when using ' +
           'raycaster or cursor components to whitelist which entities to intersect with. ' +
           'e.g., raycaster="objects: [data-raycastable]".');
    }

    if (data.autoRefresh !== oldData.autoRefresh && el.isPlaying) {
      data.autoRefresh
        ? this.addEventListeners()
        : this.removeEventListeners();
    }

    if (oldData.enabled && !data.enabled) { this.clearAllIntersections(); }

    this.setDirty();
  }
990394
function (oldData) {
    var data = this.data;
    var camera = this.camera;

    // Update properties.
    camera.aspect = data.aspect || (window.innerWidth / window.innerHeight);
    camera.far = data.far;
    camera.fov = data.fov;
    camera.near = data.near;
    camera.zoom = data.zoom;
    camera.updateProjectionMatrix();

    this.updateActiveCamera(oldData);
    this.updateSpectatorCamera(oldData);
  }
785409
function set(key, value) {
  const entry = this.get(key, true);
  let oldvalue;
  if (entry) {
    oldvalue = entry.value;
    entry.value = value;
  } else {
    oldvalue = this.put(key, value);
    if (oldvalue) oldvalue = oldvalue.value;
  }
  return oldvalue;
}
791611
function (data) {
    // Add property to hold internal values
    Object.defineProperty(this, '_', {
        enumerable: false,
        configurable: false,
        writable: false,
        value: {
            dt: this._clone(data),
            ev: {},
            df: {},
            sp: false,
            ct: 0
        }
    });
    // Assign keys
    for (var key in this._.dt) {
        this._addProperty(key);
    }
}
881269
function insert(val) {
      var l = last.call(this);
      l.replace = l.attribute;
      l.dataKey = val;
      return last.call(this) && this;
    }
17422
function(oData) {
			if (oData) {
				var aChildren = oData.children;
				aChildren.forEach(function(oGroup) {
					this._createModule(oGroup);
				}, this);
			}
			this.setProperty("data", oData);
		}