Restores original state of a specified object in group
@private
@method _restoreObjectState
@param {fabric.Object} object
@return {fabric.Group} thisArg
10638
function(object) {

      var groupLeft = this.get('left'),
          groupTop = this.get('top'),
          groupAngle = this.getAngle() * (Math.PI / 180),
          objectLeft = object.get('originalLeft'),
          objectTop = object.get('originalTop'),
          rotatedTop = Math.cos(groupAngle) * object.get('top') + Math.sin(groupAngle) * object.get('left'),
          rotatedLeft = -Math.sin(groupAngle) * object.get('top') + Math.cos(groupAngle) * object.get('left');

      object.setAngle(object.getAngle() + this.getAngle());

      object.set('left', groupLeft + rotatedLeft * this.get('scaleX'));
      object.set('top', groupTop + rotatedTop * this.get('scaleY'));

      object.set('scaleX', object.get('scaleX') * this.get('scaleX'));
      object.set('scaleY', object.get('scaleY') * this.get('scaleY'));

      object.setCoords();
      object.hideCorners = false;
      object.setActive(false);
      object.setCoords();

      return this;
    }
747660
def state(cls, obj, state=None):
        
        if state is None:
            ids = cls.capture_ids(obj)
            original_custom_keys = set(Store.custom_options().keys())
            return (ids, original_custom_keys)
        else:
            (ids, original_custom_keys) = state
            current_custom_keys = set(Store.custom_options().keys())
            for key in current_custom_keys.difference(original_custom_keys):
                del Store.custom_options()[key]
                cls.restore_ids(obj, ids)
1223174
function (obj) {
        return _.cloneDeepWith(obj, function (value) {
            // falls back to default deepclone if object does not have explicit toJSON().
            if (value && _.isFunction(value.toJSON)) {
                return value.toJSON();
            }
        });
    }
744364
public void restoreState(FacesContext context, Object state)
    {
        if (state != null)
        {
            methodExpression = (MethodExpression) state;
        }
    }
659570
function flatten(obj,callback) {
    let arr = [];
    let iDepth, oDepth = 0;
    let state = {identityDetection:true};
    recurse(obj,state,function(obj,key,state){
        let entry = {};
        entry.name = key;
        entry.value = obj[key];
        entry.path = state.path;
        entry.parent = obj;
        entry.key = key;
        if (callback) entry = callback(entry);
        if (entry) {
            if (state.depth > iDepth) {
                oDepth++;
            }
            else if (state.depth < iDepth) {
                oDepth--;
            }
            entry.depth = oDepth;
            iDepth = state.depth;
            arr.push(entry);
        }
    });
    return arr;
}
18141
function reviveObject (object, reviver) {
  let revived = {};

  for (let key in object) {
    if (object.hasOwnProperty(key)) {
      revived[key] = reviveValue(object, key, object[key], reviver);
    }
  }

  return revived;
}
669045
public Object setState(final Object state) {
        final Object oldState = this.state;
        this.state = state;
        return oldState;
    }
922247
function resetState(node) {
    _.each(node._tree.defaultState, (val, prop) => {
        node.state(prop, val);
    });

    return node;
}
1172940
function defaultify (obj) {
    return Object.keys(self.defaults).reduce(function (acc, key) {
      if (!acc[key]) { acc[key] = self.defaults[key] }
      return acc;
    }, obj);
  }
626295
function cleanObject(obj) {
  if (obj instanceof Object) {
    Object.keys(obj).forEach((key) => (obj[key] == null) && delete obj[key]);
  }
  return obj;
}
377933
public static Object undelegate(Object object) {
		Object obj = object;
		while (obj instanceof Delegator) {
			obj = ((Delegator<?>) obj).getDelegatedObject();
		}
		return obj;
	}
1158594
function regenerate(root, holder, current, seen, retrieve, undry_paths, old, current_path) {

	var temp;

	if (current && typeof current == 'object') {
		// Remember this object has been regenerated already
		seen.set(current, true);

		if (current instanceof Array) {
			return regenerateArray(root, holder, current, seen, retrieve, undry_paths, old, current_path);
		}

		if (current instanceof String) {

			if (current.length > -1) {
				current = current.toString();

				if (temp = undry_paths.get(current)) {
					if (typeof temp.undried != 'undefined') {
						return temp.undried;
					}

					if (!holder) {
						throw new Error('Unable to resolve recursive reference');
					}

					undry_paths.extra_pass.push([holder, temp, current_path]);

					return temp;
				}

				if (retrieve.hasOwnProperty(current)) {
					temp = retrieve[current];
				} else {
					temp = retrieve[current] = retrieveFromPath(root, current.split(special_char));

					if (typeof temp == 'undefined') {
						temp = retrieve[current] = getFromOld(old, current.split(special_char));
					}
				}

				// Because we always regenerate parsed objects first
				// (JSON-dry parsing goes from string » object » regenerated object)
				// keys of regular objects can appear out-of-order, so we need to parse them
				if (temp && temp instanceof String) {
					// Unset the String as a valid result
					retrieve[current] = null;

					// Regenerate the string again
					// (We have to create a new instance, because it's already been "seen")
					temp = retrieve[current] = regenerate(root, holder, new String(temp), seen, retrieve, undry_paths, old, current_path);
				}

				return temp;
			} else {
				return root;
			}
		}

		return regenerateObject(root, holder, current, seen, retrieve, undry_paths, old, current_path);
	}

	return current;
}
53725
function(ctx) {
      var activeGroup = this.getActiveGroup();
      if (activeGroup) {
        ctx.save();
        fabric.Group.prototype.transform.call(activeGroup, ctx);
        activeGroup.drawBorders(ctx).drawCorners(ctx);
        ctx.restore();
      }
      else {
        for (var i = 0, len = this._objects.length; i < len; ++i) {
          if (!this._objects[i].active) continue;

          ctx.save();
          fabric.Object.prototype.transform.call(this._objects[i], ctx);
          this._objects[i].drawBorders(ctx).drawCorners(ctx);
          ctx.restore();
        }
      }
    }
1125260
private static Object unwrap(Object object) {
        if (object instanceof Reflector) {
            return ((Reflector) object).get();
        }

        return object;
    }
1142877
function restore() {
    if (isPrevented) {
        const { body } = document;
        if (previousStyles) {
            body.setAttribute('style', previousStyles);
        } else {
            body.removeAttribute('style');
        }

        window.scrollTo(...previousPosition);
        resizeUtil.removeEventListener('', recalculate);
        isPrevented = false;
    }
}
1177890
function regenerateObject(root, holder, current, seen, retrieve, undry_paths, old, current_path) {

	var path,
	    temp,
	    key;

	for (key in current) {
		if (current.hasOwnProperty(key)) {
			// Only regenerate if it's not already seen
			if (!seen.get(current[key])) {
				path = current_path.slice(0);
				path.push(key);

				temp = regenerate(root, current, current[key], seen, retrieve, undry_paths, old, path);

				// @TODO: Values returned by `unDry` methods also get regenerated,
				// even though these could contain properties coming from somewhere else,
				// like live HTMLCollections. Assigning anything to that will throw an error.
				// This is a workaround to that proble: if the value is exactly the same,
				// it's not needed to assign it again, so it won't throw an error,
				// but it's not an ideal solution.
				if (temp !== current[key]) {
					current[key] = temp;
				}
			}
		}
	}

	return current;
}
1336728
function restore() {
    if (isOriginal) return;
    else isOriginal = true;
    ['log', 'debug', 'info', 'warn', 'error'].forEach((item) => {
        console[item] = originalConsoleFunctions[item];
    });
}