/**
 * Copyright (c) 2025 Broadcom. All Rights Reserved.
 * Broadcom Confidential. The term "Broadcom" refers to Broadcom Inc.
 * and/or its subsidiaries.
 */
window["windowProps"] = [
    ...listAllProperties(window),
    /**
     * define function is used to load amd modules, UI Plugins are AMD modules.
     *
     * define funciton gets its implementation everytime `systemjs.load` is called.
     * for some reason systemjs relies in globaly set `window.define` function,
     * for now we didn't find a way to scope the define function for individual plugins.
     *
     * However it seems that system js cleans the define function after each plugin load.
     */
    "define",
    "_bootstrapDetails",
    "__vmware_cloud_director_hyperplugin_state",
];

/**
 * Traverses given object listing all its properties and methods.
 *
 * Example:
 * listAllProperties(window) -> returns 1000+ properties and methods located in the window object
 *
 * @param o pass whatever js object to get all its properties and methods
 * @returns list of properties and methods as string array
 */
function listAllProperties(o) {
    let objectToInspect = o;
    let result = [];

    while (objectToInspect !== null) {
        result = result.concat(Object.getOwnPropertyNames(objectToInspect));
        objectToInspect = Object.getPrototypeOf(objectToInspect);
    }

    return result;
}