if (!Array.prototype.every) {
    Array.prototype.every = function(callback, thisArg) {
        if (this === void(0) || this === null) {
            throw new TypeError("Array.prototype.every called on null or undefined")
        }
        var O = Object(this);
        var len = O.length >>> 0;
        if (callback.__class__ !== "Function") {
            throw new TypeError(callback + " is not a function")
        }
        T = arguments.length > 1 ? thisArg : void(0);
        k = 0;
        while (k < len) {
            if (k in O) {
                kValue = O[k];
                var testResult = callback.call(T, kValue, k, O);
                if (!testResult) {
                    return false;
                }
            }
            k++;
        }
        return true;
    };
}
if (!Array.prototype.filter) {
    Array.prototype.filter = function(callback, thisArg) {
        if (this === void(0) || this === null) {
            throw new TypeError("Array.prototype.filter called on null or undefined")
        }
        var t = Object(this);
        var len = t.length >>> 0;
        if (callback.__class__ !== "Function") {
            throw new TypeError(callback + " is not a function")
        }
        var res = [];
        var T = arguments.length > 1 ? thisArg : void(0);
        for (var i = 0; i < len; i += 1) {
            if (i in t) {
                var val = t[i];
                if (callback.call(T, val, i, t)) {
                    res.push(val);
                }
            }
        }
        return res;
    };
}
if (!Array.prototype.forEach) {
    Array.prototype.forEach = function(callback, thisArg) {
        if (this === void(0) || this === null) {
            throw new TypeError("Array.prototype.forEach called on null or undefined")
        }
        var O = Object(this);
        var len = O.length >>> 0;
        if (callback.__class__ !== "Function") {
            throw new TypeError(callback + " is not a function")
        }
        var T = arguments.length > 1 ? thisArg : void(0);
        for (var k = 0; k < len; k += 1) {
            if (k in O) {
                kValue = O[k];
                callback.call(T, kValue, k, O);
            }
        }
    };
}
if (!Array.prototype.indexOf) {
    Array.prototype.indexOf = function(searchElement, fromIndex) {
        if (this === void(0) || this === null) {
            throw new TypeError("Array.prototype.indexOf called on null or undefined")
        }
        var o = Object(this);
        var len = o.length >>> 0;
        if (len === 0) {
            return -1;
        }
        var n = +fromIndex || 0;
        if (Math.abs(n) === Infinity) {
            n = 0;
        }
        if (n >= len) {
            return -1;
        }
        k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);
        while (k < len) {
            if (k in o && o[k] === searchElement) {
                return k;
            }
            k++;
        }
        return -1;
    };
}
if (!Array.isArray) {
    Array.isArray = function(arg) {
        if (arg === void(0) || arg === null) {
            return false;
        }
        return arg.__class__ === "Array";
    };
}
if (!Array.prototype.lastIndexOf) {
    Array.prototype.lastIndexOf = function(searchElement, fromIndex) {
        if (this === void(0) || this === null) {
            throw new TypeError("Array.prototype.lastIndexOf called on null or undefined")
        }
        var t = Object(this);
        var len = t.length >>> 0;
        if (len === 0) {
            return -1;
        }
        n = len - 1;
        if (arguments.length > 1) {
            n = Number(arguments[1]);
            if (n != n) {
                n = 0;
            } else {
                if (n != 0 && n != Infinity && n != -Infinity) {
                    n = n > 0 || -1 * Math.floor(Math.abs(n));
                }
            }
        }
        for (k = n >= 0 ? Math.min(n, len - 1) : len - Math.abs(n); k >= 0; k--) {
            if (k in t && t[k] === searchElement) {
                return k;
            }
        }
        return -1;
    };
}
if (!Array.prototype.map) {
    Array.prototype.map = function(callback, thisArg) {
        if (this === void(0) || this === null) {
            throw new TypeError("Array.prototype.map called on null or undefined")
        }
        var O = Object(this);
        var len = O.length >>> 0;
        if (callback.__class__ !== "Function") {
            throw new TypeError(callback + " is not a function")
        }
        T = arguments.length > 1 ? thisArg : void(0);
        A = new Array(len);
        for (var k = 0; k < len; k += 1) {
            if (k in O) {
                kValue = O[k];
                mappedValue = callback.call(T, kValue, k, O);
                A[k] = mappedValue;
            }
        }
        return A;
    };
}
if (!Array.prototype.reduce) {
    Array.prototype.reduce = function(callback, initialValue) {
        if (this === void(0) || this === null) {
            throw new TypeError("Array.prototype.reduce called on null or undefined")
        }
        if (callback.__class__ !== "Function") {
            throw new TypeError(callback + " is not a function")
        }
        var t = Object(this);
        var len = t.length >>> 0;
        var k = 0;
        if (arguments.length > 1) {
            value = initialValue;
        } else {
            while (k < len && !(k in t)) {
                k++;
            }
            if (k >= len) {
                throw new TypeError("Reduce of empty array with no initial value")
            }
            value = t[k++];
        }
        for (; k < len; k++) {
            if (k in t) {
                value = callback(value, t[k], k, t);
            }
        }
        return value;
    };
}
if (!Array.prototype.reduceRight) {
    Array.prototype.reduceRight = function(callback, initialValue) {
        if (this === void(0) || this === null) {
            throw new TypeError("Array.prototype.reduceRight called on null or undefined")
        }
        if (callback.__class__ !== "Function") {
            throw new TypeError(callback + " is not a function")
        }
        var t = Object(this);
        var len = t.length >>> 0;
        var k = len - 1;
        if (arguments.length > 1) {
            value = initialValue;
        } else {
            while (k >= 0 && !(k in t)) {
                k--;
            }
            if (k < 0) {
                throw new TypeError("Reduce of empty array with no initial value")
            }
            value = t[k--];
        }
        for (; k >= 0; k--) {
            if (k in t) {
                value = callback(value, t[k], k, t);
            }
        }
        return value;
    };
}
if (!Array.prototype.some) {
    Array.prototype.some = function(callback, thisArg) {
        if (this === void(0) || this === null) {
            throw new TypeError("Array.prototype.some called on null or undefined")
        }
        if (callback.__class__ !== "Function") {
            throw new TypeError(callback + " is not a function")
        }
        var t = Object(this);
        var len = t.length >>> 0;
        var T = arguments.length > 1 ? thisArg : void(0);
        for (var i = 0; i < len; i += 1) {
            if (i in t && callback.call(T, t[i], i, t)) {
                return true;
            }
        }
        return false;
    };
}
if (!Function.prototype.bind) {
    Function.prototype.bind = function(oThis) {
        if (this.__class__ !== "Function") {
            throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable")
        }
        var aArgs = Array.prototype.slice.call(arguments, 1);
        var fToBind = this;
        var fNOP = function() {

        };
        var fBound = function() {
            return fToBind.apply(this instanceof fNOP ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments)));
        };
        if (this.prototype) {
            fNOP.prototype = this.prototype;
        }
        fBound.prototype = new fNOP();
        return fBound;
    };
}
if (!Object.create) {
    Object.create = function() {
        function Temp() {

        }
        var hasOwn = Object.prototype.hasOwnProperty;
        return function(O) {
            if (Object(O) !== O && O !== null) {
                throw TypeError("Object prototype may only be an Object or null")
            }
            Temp.prototype = O;
            var obj = new Temp();
            Temp.prototype = null;
            if (arguments.length > 1) {
                var Properties = Object(arguments[1]);
                for (var prop in Properties) {
                    if (hasOwn.call(Properties, prop)) {
                        var descriptor = Properties[prop];
                        if (Object(descriptor) !== descriptor) {
                            throw TypeError(prop + "must be an object")
                        }
                        if ("get" in descriptor || "set" in descriptor) {
                            throw new TypeError("getters & setters can not be defined on this javascript engine")
                        }
                        if ("value" in descriptor) {
                            obj[prop] = Properties[prop];
                        }
                    }
                }
            }
            return obj;
        };
    }();
}
if (!Object.defineProperties) {
    Object.defineProperties = function(object, props) {
        function hasProperty(obj, prop) {
            return Object.prototype.hasOwnProperty.call(obj, prop);
        }

        function convertToDescriptor(desc) {
            if (Object(desc) !== desc) {
                throw new TypeError("Descriptor can only be an Object.")
            }
            var d = {};
            if (hasProperty(desc, "enumerable")) {
                d.enumerable = !(!desc.enumerable);
            }
            if (hasProperty(desc, "configurable")) {
                d.configurable = !(!desc.configurable);
            }
            if (hasProperty(desc, "value")) {
                d.value = desc.value;
            }
            if (hasProperty(desc, "writable")) {
                d.writable = !(!desc.writable);
            }
            if (hasProperty(desc, "get")) {
                throw new TypeError("getters & setters can not be defined on this javascript engine")
            }
            if (hasProperty(desc, "set")) {
                throw new TypeError("getters & setters can not be defined on this javascript engine")
            }
            return d;
        }
        if (Object(object) !== object) {
            throw new TypeError("Object.defineProperties can only be called on Objects.")
        }
        if (Object(props) !== props) {
            throw new TypeError("Properties can only be an Object.")
        }
        var properties = Object(props);
        for (var propName in properties) {
            if (hasOwnProperty.call(properties, propName)) {
                var descr = convertToDescriptor(properties[propName]);
                object[propName] = descr.value;
            }
        }
        return object;
    };
}
if (!Object.defineProperty) {
    Object.defineProperty = function defineProperty(object, property, descriptor) {
        if (Object(object) !== object) {
            throw new TypeError("Object.defineProperty can only be called on Objects.")
        }
        if (Object(descriptor) !== descriptor) {
            throw new TypeError("Property description can only be an Object.")
        }
        if ("get" in descriptor || "set" in descriptor) {
            throw new TypeError("getters & setters can not be defined on this javascript engine")
        }
        if ("value" in descriptor) {
            object[property] = descriptor.value;
        }
        return object;
    };
}
if (!Object.freeze) {
    Object.freeze = function freeze(object) {
        if (Object(object) !== object) {
            throw new TypeError("Object.freeze can only be called on Objects.")
        }
        return object;
    };
}
if (!Object.getOwnPropertyDescriptor) {
    Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
        if (Object(object) !== object) {
            throw new TypeError("Object.getOwnPropertyDescriptor can only be called on Objects.")
        }
        if (!Object.prototype.hasOwnProperty.call(object, property)) {
            return descriptor;
        }
        descriptor = {
            enumerable: Object.prototype.propertyIsEnumerable.call(object, property),
            configurable: true
        };
        descriptor.value = object[property];
        var psPropertyType = object.reflect.find(property).type;
        descriptor.writable = !(psPropertyType === "readonly");
        return descriptor;
    };
}
if (!Object.getOwnPropertyNames) {
    Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
        if (Object(object) !== object) {
            throw new TypeError("Object.getOwnPropertyNames can only be called on Objects.")
        }
        var names = [];
        var hasOwnProperty = Object.prototype.hasOwnProperty;
        var propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
        for (var prop in object) {
            if (hasOwnProperty.call(object, prop)) {
                names.push(prop);
            }
        }
        var properties = object.reflect.properties;
        var methods = object.reflect.methods;
        var all = methods.concat(properties);
        for (var i = 0; i < all.length; i += 1) {
            var prop = all[i].name;
            if (hasOwnProperty.call(object, prop) && !propertyIsEnumerable.call(object, prop)) {
                names.push(prop);
            }
        }
        return names;
    };
}
if (!Object.getPrototypeOf) {
    Object.getPrototypeOf = function(object) {
        if (Object(object) !== object) {
            throw new TypeError("Object.getPrototypeOf can only be called on Objects.")
        }
        return object.__proto__;
    };
}
if (!Object.isExtensible) {
    Object.isExtensible = function isExtensible(object) {
        if (Object(object) !== object) {
            throw new TypeError("Object.isExtensible can only be called on Objects.")
        }
        return true;
    };
}
if (!Object.isSealed) {
    Object.isSealed = function isSealed(object) {
        if (Object(object) !== object) {
            throw new TypeError("Object.isSealed can only be called on Objects.")
        }
        return false;
    };
}
if (!Object.isFrozen) {
    Object.isFrozen = function isFrozen(object) {
        if (Object(object) !== object) {
            throw new TypeError("Object.isFrozen can only be called on Objects.")
        }
        return false;
    };
}
if (!Object.keys) {
    Object.keys = function(object) {
        if (Object(object) !== object) {
            throw new TypeError("Object.keys can only be called on Objects.")
        }
        var hasOwnProperty = Object.prototype.hasOwnProperty;
        var result = [];
        for (var prop in object) {
            if (hasOwnProperty.call(object, prop)) {
                result.push(prop);
            }
        }
        return result;
    };
}
if (!Object.preventExtensions) {
    Object.preventExtensions = function preventExtensions(object) {
        if (Object(object) !== object) {
            throw new TypeError("Object.preventExtensions can only be called on Objects.")
        }
        return object;
    };
}
if (!Object.seal) {
    Object.seal = function seal(object) {
        if (Object(object) !== object) {
            throw new TypeError("Object.seal can only be called on Objects.")
        }
        return object;
    };
}
if (typeof JSON !== "object") {
    JSON = {};
}

function() {
    "use strict";

    function f(n) {
        return n < 10 ? "0" + n : n;
    }
    if (typeof Date.prototype.toJSON !== "function") {
        Date.prototype.toJSON = function() {
            return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + f(this.getUTCMonth() + 1) + "-" + f(this.getUTCDate()) + "T" + f(this.getUTCHours()) + ":" + f(this.getUTCMinutes()) + ":" + f(this.getUTCSeconds()) + "Z" : null;
        };
        String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function() {
            return this.valueOf();
        };
    }

    function quote(string) {
        escapable.lastIndex = 0;
        return escapable.test(string) ? "\"" + string.replace(escapable, function(a) {
            var c = meta[a];
            return typeof c === "string" ? c : "\\u" + "0000" + a.charCodeAt(0).toString(16).slice(-4);
        }) + "\"" : "\"" + string + "\"";
    }

    function str(key, holder) {
        var mind = gap;
        var value = holder[key];
        if (value && typeof value === "object" && typeof value.toJSON === "function") {
            value = value.toJSON(key);
        }
        if (typeof rep === "function") {
            value = rep.call(holder, key, value);
        }
        switch (typeof value) {
            case "string":
                return quote(value);
            case "number":
                return isFinite(value) ? String(value):
                    "null";
                case "boolean":
                case "null":
                    return String(value);
                case "object":
                    if (!value) {
                        return "null";
                    }
                    gap += indent;
                    partial = [];
                    if (Object.prototype.toString.apply(value) === "[object Array]") {
                        length = value.length;
                        for (var i = 0; i < length; i += 1) {
                            partial[i] = str(i, value) || "null";
                        }
                        v = partial.length === 0 ? "[]" : gap ? "[\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "]" : "[" + partial.join(",") + "]";
                        gap = mind;
                        return v;
                    }
                    if (rep && typeof rep === "object") {
                        length = rep.length;
                        for (var i = 0; i < length; i += 1) {
                            if (typeof rep[i] === "string") {
                                k = rep[i];
                                v = str(k, value);
                                if (v) {
                                    partial.push(quote(k) + gap ? ": " : ":" + v);
                                }
                            }
                        }
                    } else {
                        for (var k in value) {
                            if (Object.prototype.hasOwnProperty.call(value, k)) {
                                v = str(k, value);
                                if (v) {
                                    partial.push(quote(k) + gap ? ": " : ":" + v);
                                }
                            }
                        }
                    }
                    v = partial.length === 0 ? "{}":
                        gap ? "{\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "}":
                            "{" + partial.join(",") + "}";
                            gap = mind;
                            return v;
        }
    }
    if (typeof JSON.stringify !== "function") {
        escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
        meta = {
            "": "\\b",
            "	": "\\t",
            "
": "\\n",
            "": "\\f",
            "
": "\\r",
            ""
            ": "\\\"",
            "\": "\\\\"
};
JSON.stringify = function (value, replacer, space) {
gap = "
            ";
indent = "
            ";
if (typeof space === "
            number ") {
for (var i = 0;i < space; i += 1) {
indent += "
            ";
}
} else {
if (typeof space === "
            string ") {
indent = space;
}
}
rep = replacer;
if (replacer && typeof replacer !== "
            function " && typeof replacer !== "
            object " || typeof replacer.length !== "
            number ") {
throw new Error("
            JSON.stringify ")
}
return str("
            ", {
"
            ": value
});
};
}
if (typeof JSON.parse !== "
            function ") {
cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
JSON.parse = function (text, reviver) {
function walk(holder, key) {
var value = holder[key];
if (value && typeof value === "
            object ") {
for (var k in value) {
if (Object.prototype.hasOwnProperty.call(value, k)) {
v = walk(value, k);
if (v !== undefined) {
value[k] = v;
} else {
delete value[k];
}
}
}
}
return reviver.call(holder, key, value);
}
text = String(text);
cx.lastIndex = 0;
if (cx.test(text)) {
text = text.replace(cx, function (a) {
return "\\u " + "
            0000 " + a.charCodeAt(0).toString(16).slice(-4);
});
}
if (/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\ / bfnrt] | u[0 - 9a - fA - F] {
            4
        }) / g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) {
    j = eval("(" + text + ")");
    return typeof reviver === "function" ? walk({
        "": j
    }, "") : j;
}
throw new SyntaxError("JSON.parse")
};
}
}();
if (!String.prototype.trim) {
    String.prototype.trim = function() {
        return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
    };
}

function(modules) {
    var installedModules = {};

    function __webpack_require__(moduleId) {
        if (installedModules[moduleId]) {
            return installedModules[moduleId].exports;
        }
        var module = installedModules[moduleId] = {
            i: moduleId,
            l: false,
            exports: {}
        };
        modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
        module.l = true;
        return module.exports;
    }
    __webpack_require__.m = modules;
    __webpack_require__.c = installedModules;
    __webpack_require__.d = function(exports, name, getter) {
        if (!__webpack_require__.o(exports, name)) {
            Object.defineProperty(exports, name, {
                enumerable: true,
                get: getter
            });
        }
    };
    __webpack_require__.r = function(exports) {
        if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
            Object.defineProperty(exports, Symbol.toStringTag, {
                value: "Module"
            });
        }
        Object.defineProperty(exports, "__esModule", {
            value: true
        });
    };
    __webpack_require__.t = function(value, mode) {
        if (mode & 1) {
            value = __webpack_require__(value)
        }
        if (mode & 8) {
            return value;
        }
        if (mode & 4 && typeof value === "object" && value && value.__esModule) {
            return value;
        }
        var ns = Object.create(null);
        __webpack_require__.r(ns);
        Object.defineProperty(ns, "default", {
            enumerable: true,
            value: value
        });
        if (mode & 2 && typeof value != "string") {
            for (var key in value) {
                __webpack_require__.d(ns, key, function(key) {
                    return value[key];
                }.bind(null, key))
            }
        }
        return ns;
    };
    __webpack_require__.n = function(module) {
        var getter = module && module.__esModule ? function getDefault() {
                return module.
                default;
            } : function getModuleExports() {
                return module;
            };
        __webpack_require__.d(getter, "a", getter);
        return getter;
    };
    __webpack_require__.o = function(object, property) {
        return Object.prototype.hasOwnProperty.call(object, property);
    };
    __webpack_require__.p = "";
    return __webpack_require__(__webpack_require__.s = 11);
}([function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.runChecks = exports.someSelectedPropertiesAreKeyframeable = exports.checkTypes = void(0);

    function(checkTypes) {
        checkTypes[checkTypes.HAS_PROJECT = 0] = "HAS_PROJECT";
        checkTypes[checkTypes.HAS_ACTIVE_ITEM = 1] = "HAS_ACTIVE_ITEM";
        checkTypes[checkTypes.ACTIVE_ITEM_IS_COMPOSITION = 2] = "ACTIVE_ITEM_IS_COMPOSITION";
        checkTypes[checkTypes.HAS_SELECTED_LAYER = 3] = "HAS_SELECTED_LAYER";
        checkTypes[checkTypes.SELECTED_LAYER_HAS_SELECTED_PROPERTIES = 4] = "SELECTED_LAYER_HAS_SELECTED_PROPERTIES";
        checkTypes[checkTypes.SOME_SELECTED_PROPERTIES_ARE_KEYFRAMEABLE = 5] = "SOME_SELECTED_PROPERTIES_ARE_KEYFRAMEABLE";
        checkTypes[checkTypes.SELECTED_LAYER_HAS_CLOTH = 6] = "SELECTED_LAYER_HAS_CLOTH";
        checkTypes[checkTypes.HAS_SINGLE_SELECTED_LAYER = 7] = "HAS_SINGLE_SELECTED_LAYER";
        checkTypes[checkTypes.HAS_SELECTED_LAYERS = 8] = "HAS_SELECTED_LAYERS";
        checkTypes[checkTypes.SOME_SELECTED_PROPERTIES_HAVE_AT_LEAST_TWO_KEYFRAMES = 9] = "SOME_SELECTED_PROPERTIES_HAVE_AT_LEAST_TWO_KEYFRAMES";
        checkTypes[checkTypes.SELECTED_PROPERTIES_DONT_HAVE_EXPRESSIONS = 10] = "SELECTED_PROPERTIES_DONT_HAVE_EXPRESSIONS";
        checkTypes[checkTypes.SOME_SELECTED_LAYER_IS_TEXT_LAYER = 11] = "SOME_SELECTED_LAYER_IS_TEXT_LAYER";
        checkTypes[checkTypes.HAS_SELECTED_KEYFRAMES = 12] = "HAS_SELECTED_KEYFRAMES";
    }(checkTypes = exports.checkTypes || exports.checkTypes = {});
    var hasProject = function() {
        return !(!app.project);
    };
    var hasActiveItem = function() {
        return hasProject() && !(!app.project.activeItem);
    };
    var activeItemIsComposition = function() {
        return app.project.activeItem && app.project.activeItem instanceof CompItem;
    };
    var activeItemHasSelectedLayer = function() {
        return app.project.activeItem && app.project.activeItem instanceof CompItem && app.project.activeItem.selectedLayers && app.project.activeItem.selectedLayers.length > 0;
    };
    var activeItemHasSelectedLayers = function() {
        return app.project.activeItem && app.project.activeItem instanceof CompItem && app.project.activeItem.selectedLayers && app.project.activeItem.selectedLayers.length > 1;
    };
    var selectedLayerHasSelectedProperties = function() {
        return activeItemHasSelectedLayer() && app.project.activeItem instanceof CompItem && app.project.activeItem.selectedProperties.filter(function(p) {
            return p instanceof Property;
        }).length > 0;
    };
    var selectedLayerHasCloth = function() {
        return activeItemHasSelectedLayer() && app.project.activeItem instanceof CompItem && app.project.activeItem.selectedLayers[0].property("ADBE Effect Parade").property("ADBE FreePin3");
    };
    var hasSingleSelectedLayer = function() {
        return activeItemHasSelectedLayer() && app.project.activeItem instanceof CompItem && app.project.activeItem.selectedLayers.length === 1;
    };
    exports.someSelectedPropertiesAreKeyframeable = function() {
        if (!app.project.activeItem || !(app.project.activeItem instanceof CompItem)) {
            return false;
        }
        var selectedProperties = app.project.activeItem.selectedProperties;
        for (var j = 0; j < selectedProperties.length; j += 1) {
            var selectedProperty = selectedProperties[j];
            if (selectedProperty.canVaryOverTime) {
                return true;
            }
        }
        return false;
    };
    var someSelectedPropertiesHaveAtLeastTwoKeyframes = function() {
        if (!activeItemIsComposition()) {
            return false;
        }
        if (!(app.project.activeItem instanceof CompItem)) {
            return false;
        }
        var selectedProperties = app.project.activeItem.selectedProperties;
        for (var j = 0; j < selectedProperties.length; j += 1) {
            var selectedProperty = selectedProperties[j];
            if (selectedProperty instanceof PropertyGroup) {
                continue;
            }
            if (selectedProperty.canVaryOverTime && selectedProperty.numKeys > 1) {
                return true;
            }
        }
        return false;
    };
    var selectedPropertiesDontHaveExpressions = function() {
        if (!activeItemIsComposition()) {
            return false;
        }
        if (!(app.project.activeItem instanceof CompItem)) {
            return false;
        }
        var selectedProperties = app.project.activeItem.selectedProperties;
        for (var j = 0; j < selectedProperties.length; j += 1) {
            var selectedProperty = selectedProperties[j];
            if (selectedProperty.canSetExpression && selectedProperty.expression !== "") {
                return false;
            }
        }
        return true;
    };
    var someSelectedLayerIsTextLayer = function() {
        if (!activeItemHasSelectedLayer()) {
            return false;
        }
        if (!(app.project.activeItem instanceof CompItem)) {
            return false;
        }
        var selectedLayers = app.project.activeItem.selectedLayers;
        for (var j = 0; j < selectedLayers.length; j += 1) {
            var selectedLayer = selectedLayers[j];
            if (selectedLayer instanceof TextLayer) {
                return true;
            }
        }
        return false;
    };
    var hasSelectedKeyframes = function() {
        if (!activeItemIsComposition()) {
            return false;
        }
        if (!(app.project.activeItem instanceof CompItem)) {
            return false;
        }
        var selectedProperties = app.project.activeItem.selectedProperties;
        for (var j = 0; j < selectedProperties.length; j += 1) {
            var selectedProperty = selectedProperties[j];
            if (selectedProperty instanceof PropertyGroup) {
                continue;
            }
            if (selectedProperty.canVaryOverTime && selectedProperty.numKeys > 0) {
                return true;
            }
        }
        return false;
    };
    var checks = _a = {}, _a[checkTypes.HAS_PROJECT] = {
        check: hasProject,
        error: "No project open"
    }, _a[checkTypes.HAS_ACTIVE_ITEM] = {
        check: hasActiveItem,
        error: "No active item"
    }, _a[checkTypes.ACTIVE_ITEM_IS_COMPOSITION] = {
        check: activeItemIsComposition,
        error: "Active item is not a composition"
    }, _a[checkTypes.HAS_SELECTED_LAYER] = {
        check: activeItemHasSelectedLayer,
        error: "No layer selected"
    }, _a[checkTypes.SELECTED_LAYER_HAS_SELECTED_PROPERTIES] = {
        check: selectedLayerHasSelectedProperties,
        error: "No propertie(s) selected"
    }, _a[checkTypes.SELECTED_LAYER_HAS_CLOTH] = {
        check: selectedLayerHasCloth,
        error: "Selected layer does not have pins"
    }, _a[checkTypes.HAS_SINGLE_SELECTED_LAYER] = {
        check: hasSingleSelectedLayer,
        error: "Too many layers selected, one is the max when running this tool"
    }, _a[checkTypes.SOME_SELECTED_PROPERTIES_ARE_KEYFRAMEABLE] = {
        check: exports.someSelectedPropertiesAreKeyframeable,
        error: "The selected properties do not contain a keyframeable property"
    }, _a[checkTypes.HAS_SELECTED_LAYERS] = {
        check: activeItemHasSelectedLayers,
        error: "Not enough layers selected"
    }, _a[checkTypes.SOME_SELECTED_PROPERTIES_HAVE_AT_LEAST_TWO_KEYFRAMES] = {
        check: someSelectedPropertiesHaveAtLeastTwoKeyframes,
        error: "None of the selected properties have at least 2 keyframes"
    }, _a[checkTypes.SELECTED_PROPERTIES_DONT_HAVE_EXPRESSIONS] = {
        check: selectedPropertiesDontHaveExpressions,
        error: "At least one property contains an expression"
    }, _a[checkTypes.SOME_SELECTED_LAYER_IS_TEXT_LAYER] = {
        check: someSelectedLayerIsTextLayer,
        error: "Layer is not a text layer"
    }, _a[checkTypes.HAS_SELECTED_KEYFRAMES] = {
        check: hasSelectedKeyframes,
        error: "No keyframe(s) selected"
    }, _a;

    function runChecks() {
        var typesToCheck = [];
        for (var _i = 0; _i < arguments.length; _i += 1) {
            typesToCheck[_i] = arguments[_i];
        }
        var errors = [];
        typesToCheck.forEach(function(checkType) {
            var check = checks[checkType];
            if (!check.check()) {
                errors.push({
                    code: checkType,
                    message: check.error
                });
            }
        });
        if (errors.length === 0) {
            return {
                success: true
            };
        }
        return {
            success: false,
            errorCode: errors[0].code,
            errorMessage: errors[0].message
        };
    }
    exports.runChecks = runChecks;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.findProjectItemByName = exports.genfun = exports.undoable = exports.findProjectItem = exports.catchErr = exports.deselectAll = exports.layersToArray = exports.fast2 = exports.fast = exports.layerStoreDel = exports.layerStoreHas = exports.layerStorePut = exports.layerStoreGet = exports.hasTag = exports.getTag = exports.tag = exports.restoreSelectionAfter = exports.getPropertyAtPath = exports.isLayer = exports.propertyToDimension = exports.layersToLooper = exports.propertiesToGetter = exports.layersToGetter = exports.loadEffects = exports.propertyToGetter = exports.layerToGetter = exports.toPropertyGetter = exports.toPrettyPropertyPath = exports.toPropertyPath = exports.prop = exports.compose = exports.getUniqueName = exports.ensureEffect = exports.getHighestIndex = exports.getLowestIndex = exports.setPropertyAtPath = void(0);
    var console_1 = __webpack_require__(5);

    function itemByName(name) {
        for (var i = 1; i <= app.project.numItems; i += 1) {
            var item = app.project.item(i);
            if (item.name === name) {
                return item;
            }
        }
        return null;
    }

    function setPropertyAtPath(layerOrPoperty, path, key, value) {
        var property = layerOrPoperty;
        path = path.slice();
        while (name = path.shift()) {
            if (property) {
                property = property.property(name);
            } else {
                break;
            }
        }
        if (property) {
            property[key] = value
        }
    }
    exports.setPropertyAtPath = setPropertyAtPath;

    function getLowestIndex(layersOrProperties) {
        var indexes = layersOrProperties.map(exports.prop("index"));
        return Math.min.apply(Math.min, indexes);
    }
    exports.getLowestIndex = getLowestIndex;

    function getHighestIndex(layersOrProperties) {
        var indexes = layersOrProperties.map(exports.prop("index"));
        return Math.max.apply(Math.max, indexes);
    }
    exports.getHighestIndex = getHighestIndex;

    function ensureEffect(layer, effectName, effectGroupPseudo) {
        var effectsProperty = layer.property("ADBE Effect Parade");
        var effectGroup = effectsProperty.property(effectName);
        if (!effectGroup) {
            effectGroup = effectsProperty.addProperty(effectGroupPseudo);
            effectGroup.name = effectName;
        }
        return effectGroup;
    }
    exports.ensureEffect = ensureEffect;

    function getUniqueName(collection, prefix) {
        var availableNumber = 0;
        collection.forEach(function(item) {
            if (item.name.indexOf(prefix) > -1) {
                var postfix = item.name.split(prefix)[1];
                var postfixNumber = Number(postfix);
                if (postfixNumber >= availableNumber) {
                    availableNumber = postfixNumber + 1;
                }
            }
        });
        return prefix + availableNumber === 0 ? "" : availableNumber;
    }
    exports.getUniqueName = getUniqueName;
    exports.compose = function(fn1) {
        var fns = [];
        for (var _i = 1; _i < arguments.length; _i += 1) {
            fns[_i - 1] = arguments[_i];
        }
        return fns.reduce(function(prevFn, nextFn) {
            return function(value) {
                return prevFn(nextFn(value));
            };
        }, fn1);
    };
    exports.prop = function(key) {
        return function(obj) {
            return obj[key];
        };
    };
    exports.toPropertyPath = function(includeLayerName) {
        if (includeLayerName === void(0)) {
            includeLayerName = false;
        }
        return function(property) {
            var propertyPath = [];
            while (property) {
                if (property.parentProperty) {
                    if (property.parentProperty.propertyType === PropertyType.INDEXED_GROUP) {
                        propertyPath.push(property.name);
                    } else {
                        propertyPath.push(property.matchName);
                    }
                } else {
                    if (includeLayerName === true) {
                        propertyPath.push(property.name);
                    }
                }
                property = property.parentProperty;
            }
            return propertyPath.reverse();
        };
    };
    exports.toPrettyPropertyPath = function(includeLayerName) {
        if (includeLayerName === void(0)) {
            includeLayerName = false;
        }
        return function(property) {
            var propertyPath = [];
            while (property) {
                if (property.parentProperty) {
                    propertyPath.push(property.name);
                } else {
                    if (includeLayerName === true) {
                        propertyPath.push(property.name);
                    }
                }
                property = property.parentProperty;
            }
            return propertyPath.reverse();
        };
    };
    exports.toPropertyGetter = function(fromComposition) {
        if (fromComposition === void(0)) {
            fromComposition = false;
        }
        return function(propertyPath) {
            return function(layerOrComposition) {
                var copy = propertyPath.slice(0);
                var property = fromComposition ? layerOrComposition.layer(copy.shift()) : layerOrComposition;
                while (key = copy.shift()) {
                    if (property) {
                        property = property.property(key);
                    } else {
                        break;
                    }
                }
                return property;
            };
        };
    };
    exports.layerToGetter = function(layer) {
        var layerName = layer.name;
        return function(composition) {
            return composition.layer(layerName);
        };
    };
    exports.propertyToGetter = function(property) {
        var path = exports.toPropertyPath(false)(property);
        return exports.toPropertyGetter(false)(path);
    };

    function getProjectItemsArray() {
        var results = [];
        for (var i = 1; i <= app.project.numItems; i += 1) {
            results.push(app.project.item(i));
        }
        return results;
    }

    function loadEffects() {
        if ($.global["motionEffects" + $.global.motionVersion + "Loaded"] === true) {
            return;
        }
        try {
            app.beginUndoGroup("Load Motion FFX files");
            var tempComp = app.project.items.addComp("MOTION_TEMP_COMP", 10, 10, 1, 1, 12);
            var tempSolid_1 = tempComp.layers.addSolid([0, 0, 0], "MOTION_TEMP_LAYER", 1, 1, tempComp.pixelAspect);
            var effects = ["mtmo-blend.ffx", "mtmo-burst.ffx", "mtmo-excite.ffx", "mtmo-forcefield.ffx", "mtmo-guides.ffx", "mtmo-jump.ffx", "mtmo-orbit.ffx", "mtmo-spin.ffx", "mtmo-stare.ffx", "mtmo-vignette.ffx", "midas_global_final.ffx", "midas-1d-child.ffx", "midas-1d-parent.ffx", "midas-2d-child.ffx", "midas-2d-parent.ffx", "midas-3d-child.ffx", "midas-3d-parent.ffx", "midas-animo-parent.ffx", "midas-cloth-parent.ffx", "midas-cloth-global.ffx", "1.1.0-midas-global.ffx", "1.1.0-midas-cloth-global.ffx", "1.1.0-midas-1d-parent.ffx", "1.1.0-midas-2d-parent.ffx", "1.1.0-midas-3d-parent.ffx", "1.1.1-midas-wiggle.ffx", "1.1.6-midas-animo.ffx", "m3-dyn-1d.ffx", "m3-dyn-2d.ffx", "m3-dyn-3d.ffx", "m3-texture.ffx", "m3-falloff-gen.ffx", "m3-falloff-1d.ffx", "m3-falloff-2d.ffx", "m3-falloff-3d.ffx", "m3-falloff-color.ffx"];
            effects.forEach(function(effect) {
                try {
                    tempSolid_1.applyPreset(new File($.global.extensionPath + "/effects/" + effect));
                } catch (err) {
                    console_1.
                    default.log("Error while loading ffx:", effect, err);
                }
            });
            tempSolid_1.remove();
            getProjectItemsArray().forEach(function(item) {
                if (item.name === "MOTION_TEMP_COMP" || item.name === "MOTION_TEMP_LAYER") {
                    item.remove();
                }
            });
            $.global["motionEffects" + $.global.motionVersion + "Loaded"] = true;
            app.endUndoGroup();
        } catch (err) {
            console_1.
            default.log(err);
        }
    }
    exports.loadEffects = loadEffects;

    function layersToGetter(layers) {
        var layerGetters = layers.map(exports.layerToGetter);
        return function(composition) {
            return layerGetters.map(function(fn) {
                return fn(composition);
            });
        };
    }
    exports.layersToGetter = layersToGetter;

    function propertiesToGetter(properties) {
        var propertyGetters = properties.map(exports.propertyToGetter);
        return function(layer) {
            return propertyGetters.map(function(fn) {
                return fn(layer);
            });
        };
    }
    exports.propertiesToGetter = propertiesToGetter;

    function layersToLooper(layers) {
        var layersGetter = layersToGetter(layers);
        var propertiesGetterForLayer = layers.map(exports.compose(propertiesToGetter, exports.prop("selectedProperties")));
        return function(composition, cb) {
            var freshLayers = layersGetter(composition);
            return freshLayers.map(function(layer, i) {
                if (propertiesGetterForLayer[i]) {
                    var properties = propertiesGetterForLayer[i](layer);
                    cb(layer, properties);
                }
            });
        };
    }
    exports.layersToLooper = layersToLooper;

    function propertyToDimension(property) {
        switch (property.propertyValueType) {
            case PropertyValueType.OneD:
                return 1;
            case PropertyValueType.TwoD_SPATIAL:
            case PropertyValueType.TwoD:
                return 2;
            case PropertyValueType.ThreeD:
            case PropertyValueType.ThreeD_SPATIAL:
                return 3;
            case PropertyValueType.COLOR:
                return 4;
            case PropertyValueType.NO_VALUE:
                return 5;
            case PropertyValueType.SHAPE:
                return 6;
        }
    }
    exports.propertyToDimension = propertyToDimension;

    function isLayer(variable) {
        return variable instanceof AVLayer || variable instanceof ShapeLayer || variable instanceof LightLayer || variable instanceof TextLayer || variable instanceof CameraLayer;
    }
    exports.isLayer = isLayer;

    function getPropertyAtPath(layer, path) {
        var property = layer;
        path = path.slice();
        while (name = path.shift()) {
            if (property) {
                property = property.property(name);
            } else {
                property = null;
                break;
            }
        }
        return property;
    }
    exports.getPropertyAtPath = getPropertyAtPath;

    function restoreSelectionAfter(cb) {
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            throw new Error("Not a comp")
        }
        var selectedLayers = composition.selectedLayers;
        var forSelectedLayersAndProperties = layersToLooper(selectedLayers);
        var originalCompositionName = composition.name;
        cb();
        if (app.project.activeItem instanceof CompItem) {
            app.project.activeItem.selectedLayers.forEach(function(layer) {
                return layer.selected = false;
            });
            app.project.activeItem.selectedProperties.forEach(function(property) {
                return property.selected = false;
            });
        }
        var originalComposition = itemByName(originalCompositionName);
        if (originalComposition) {
            forSelectedLayersAndProperties(originalComposition, function(layer, properties) {
                if (!layer) {
                    return;
                }
                layer.selected = true;
                properties.forEach(function(property) {
                    property.selected = true;
                });
            });
        }
    }
    exports.restoreSelectionAfter = restoreSelectionAfter;

    function tag(layer, tag, value, overwrite) {
        if (value === void(0)) {
            value = true;
        }
        if (overwrite === void(0)) {
            overwrite = false;
        }
        var marker = layer.property("Marker");
        if (!overwrite) {
            var currentMarker = marker.valueAtTime(tag, true);
            if (currentMarker.comment !== "") {
                return currentMarker.comment;
            }
        }
        var stringValue = JSON.stringify(value);
        var markerValue = new MarkerValue(stringValue);
        marker.setValueAtTime(tag, markerValue);
        return stringValue;
    }
    exports.tag = tag;

    function getTag(layer, tag) {
        var marker = layer.property("Marker");
        var currentMarker = marker.valueAtTime(tag, true);
        if (currentMarker.comment === "") {
            return null;
        }
        return JSON.parse(currentMarker.comment);
    }
    exports.getTag = getTag;

    function hasTag(layer, tag) {
        var marker = layer.property("Marker");
        var currentMarker = marker.valueAtTime(tag, true);
        return currentMarker.comment !== "";
    }
    exports.hasTag = hasTag;
    exports.layerStoreGet = function(layer, key) {
        var store = getTag(layer, -100000) || {};
        return store[key];
    };
    exports.layerStorePut = function(layer, key, value) {
        var store = getTag(layer, -100000) || {};
        store[key] = value;
        tag(layer, -100000, store, true);
    };
    exports.layerStoreHas = function(layer, key) {
        var store = getTag(layer, -100000) || {};
        return store.hasOwnProperty(key);
    };
    exports.layerStoreDel = function(layer, key) {
        var store = getTag(layer, -100000) || {};
        delete store[key];
        tag(layer, -100000, store, true);
    };

    function fast(cb, skip) {
        if (skip === void(0)) {
            skip = false;
        }
        if (skip || $.global.multiMonitor) {
            cb(app.project.activeItem);
            return;
        }
        var originalComposition = app.project.activeItem;
        var originalCompositionName = originalComposition.name;
        var originalMaximized = app.activeViewer && app.activeViewer.maximized;
        temporaryComposition = app.project.items.addComp("LOADING...", 500, 500, 1, 1, 1);
        temporaryComposition.openInViewer();
        if (app.activeViewer) {
            app.activeViewer.maximized = true
        }
        temporaryComposition.layers.addSolid([0, 0, 0], "Loading BG", 500, 500, 1, 1);
        var loadingLabel = temporaryComposition.layers.addText("...");
        loadingLabel.name = "Loading label";
        var textProperty = loadingLabel.property("Source Text");
        var textDocument = textProperty.value;
        textDocument.resetCharStyle();
        textDocument.fontSize = 80;
        textDocument.fillColor = [1, 1, 1];
        textDocument.strokeColor = [0, 0, 0];
        textDocument.strokeWidth = 0;
        textDocument.font = "Helvetica";
        textDocument.strokeOverFill = false;
        textDocument.applyStroke = false;
        textDocument.applyFill = true;
        textDocument.justification = ParagraphJustification.CENTER_JUSTIFY;
        textDocument.tracking = 50;
        textProperty.setValue(textDocument);
        loadingLabel.selected = false;
        loadingLabel.transform.position.setValue([250, 250]);
        cb(originalComposition);
        var loadingComp = itemByName("LOADING...");
        if (loadingComp) {
            loadingComp.remove();
        }
        var tempSolid = itemByName("Loading BG");
        if (tempSolid) {
            tempSolid.remove();
        }
        var newOriginalComposition = itemByName(originalCompositionName);
        if (newOriginalComposition) {
            newOriginalComposition.openInViewer();
            if (originalMaximized) {
                if (app.activeViewer) {
                    app.activeViewer.maximized = originalMaximized;
                }
            }
        }
    }
    exports.fast = fast;

    function fast2(cb, skip) {
        if (skip === void(0)) {
            skip = false;
        }
        if (skip) {
            cb(app.project.activeItem);
            return;
        }
        var composition = app.project.activeItem;
        if (composition instanceof CompItem) {
            var layerStates_1 = {};
            layersToArray(composition.layers).forEach(function(layer) {
                layerStates_1[layer.name] = [layer.enabled, layer.shy];
                layer.enabled = false;
                layer.shy = true;
            });
            var hideShyLayers = composition.hideShyLayers;
            composition.hideShyLayers = true;
            cb(composition);
            layersToArray(composition.layers).forEach(function(layer) {
                var state = layerStates_1[layer.name];
                layer.enabled = state[0];
                layer.shy = state[1];
            });
            composition.hideShyLayers = false;
        }
        cb(composition);
    }
    exports.fast2 = fast2;

    function layersToArray(collection) {
        var result = [];
        for (var i = 1; i <= collection.length; i += 1) {
            result.push(collection[i]);
        }
        return result;
    }
    exports.layersToArray = layersToArray;

    function deselectAll(composition) {
        if (composition && composition instanceof CompItem) {
            composition.selectedLayers.forEach(function(layer) {
                layer.selected = false;
            });
            composition.selectedProperties.forEach(function(property) {
                property.selected = false;
            });
        }
    }
    exports.deselectAll = deselectAll;

    function catchErr(cb) {
        try {
            cb();
        } catch (err) {
            var stack = $.stack.split("\n");
            stack.shift();
            var lines = err.source && err.source.split("\n") || [];
            if ($.global.dispatch) {
                $.global.dispatch("ERROR", JSON.stringify({
                    name: err.name,
                    message: err.message,
                    line: err.line,
                    context: [lines[err.line - 2] || "", lines[err.line - 1] || "", lines[err.line] || "", lines[err.line + 1] || "", lines[err.line + 2] || ""],
                    stack: stack
                }));
            }
            console_1.
            default.log("%c" + err.name + ": " + err.message + " on line " + err.line + " in build/bundle.jsx\n%cCONTEXT:\n%c" + lines[err.line - 2] || "" + "\n%c" + lines[err.line - 1] + "\n%c" + lines[err.line] || "" + "\n%cSTACK:\n%c" + stack.join("\n") + "\n", "color: red", "color: black", "color: darkgrey", "color: red", "color: darkgrey", "color: black", "color: red");
        }
    }
    exports.catchErr = catchErr;

    function findProjectItem(cb) {
        for (var i = app.project.items.length; i > 0; i--) {
            var result = cb(app.project.items[i], i, app.project.items);
            if (result) {
                return app.project.items[i];
            }
        }
        return null;
    }
    exports.findProjectItem = findProjectItem;

    function undoable(name, cb) {
        app.beginUndoGroup(name);
        cb();
        app.endUndoGroup();
    }
    exports.undoable = undoable;

    function genfun() {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i += 1) {
            args[_i] = arguments[_i];
        }
        var lines = [];

        function line(src) {
            lines.push(src);
            return line;
        }
        line.toString = function() {
            return lines.join("\n");
        };
        line.toFunction = function(scope) {
            var src = ["return (" + line.toString() + ")"];
            var keys = Object.keys(scope || {});
            var vals = keys.map(function(key) {
                return scope[key];
            });
            return Function.apply(null, keys.concat(src)).apply(null, vals);
        };
        if (arguments.length) {
            line(arguments[0])
        }
        return line;
    }
    exports.genfun = genfun;

    function findProjectItemByName(name) {
        for (var i = 1; i <= app.project.numItems; i += 1) {
            var item = app.project.item(i);
            if (item.name === name) {
                return item;
            }
        }
        return null;
    }
    exports.findProjectItemByName = findProjectItemByName;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.
    default = {
        excite: {
            pseudo: "Pseudo/BNCA2506f0b33",
            enable: "Pseudo/BNCA2506f0b33-0001",
            overshoot: "Pseudo/BNCA2506f0b33-0003",
            bounce: "Pseudo/BNCA2506f0b33-0004",
            friction: "Pseudo/BNCA2506f0b33-0005"
        },
        stare: {
            pseudo: "Pseudo/oYCGfabae136L",
            enable: "Pseudo/oYCGfabae136L-0001",
            target: "Pseudo/oYCGfabae136L-0002",
            calibration: "Pseudo/oYCGfabae136L-0003"
        },
        spin: {
            pseudo: "Pseudo/yrO224f4b207o",
            enable: "Pseudo/yrO224f4b207o-0001",
            reverse: "Pseudo/yrO224f4b207o-0002",
            calibration: "Pseudo/yrO224f4b207o-0004",
            spinsPerSecond: "Pseudo/yrO224f4b207o-0005"
        },
        orbit: {
            pseudo: "Pseudo/wQOMc41e812eH",
            enable: "Pseudo/wQOMc41e812eH-0001",
            target: "Pseudo/wQOMc41e812eH-0002",
            reverse: "Pseudo/wQOMc41e812eH-0004",
            speed: "Pseudo/wQOMc41e812eH-0005",
            distance: "Pseudo/wQOMc41e812eH-0006",
            calibration: "Pseudo/wQOMc41e812eH-0007"
        },
        jump: {
            pseudo: "Pseudo/aHCxb79bbc95d",
            enable: "Pseudo/aHCxb79bbc95d-0001",
            jump: "Pseudo/aHCxb79bbc95d-0002",
            stretch: "Pseudo/aHCxb79bbc95d-0004",
            gravity: "Pseudo/aHCxb79bbc95d-0005",
            maxJumps: "Pseudo/aHCxb79bbc95d-0006"
        },
        burst: {
            pseudo: "Pseudo/UgOta64372a0u",
            globalPosition: "Pseudo/UgOta64372a0u-0001",
            copiesCount: "Pseudo/UgOta64372a0u-0003",
            copiesBurstOffset: "Pseudo/UgOta64372a0u-0004",
            copiesDistanceFromCenter: "Pseudo/UgOta64372a0u-0005",
            copiesRevolution: "Pseudo/UgOta64372a0u-0006",
            copiesRevolutionOffset: "Pseudo/UgOta64372a0u-0007",
            linkWidthAndHeight: "Pseudo/UgOta64372a0u-0010",
            height: "Pseudo/UgOta64372a0u-0011",
            width: "Pseudo/UgOta64372a0u-0012",
            roundness: "Pseudo/UgOta64372a0u-0013",
            strokeWidth: "Pseudo/UgOta64372a0u-0014",
            colorFillEnable: "Pseudo/UgOta64372a0u-0018",
            colorFillColor: "Pseudo/UgOta64372a0u-0019",
            colorStrokeEnable: "Pseudo/UgOta64372a0u-0022",
            colorStrokeColor: "Pseudo/UgOta64372a0u-0023",
            sequenceLinkWidthAndHeight: "Pseudo/UgOta64372a0u-0027",
            sequenceHeight: "Pseudo/UgOta64372a0u-0028",
            sequenceWidth: "Pseudo/UgOta64372a0u-0029"
        },
        blend: {
            pseudo: "Pseudo/CTCR927f2b6bd",
            enable: "Pseudo/CTCR927f2b6bd-0001",
            smoothness: "Pseudo/CTCR927f2b6bd-0002",
            precision: "Pseudo/CTCR927f2b6bd-0003"
        },
        forcefield: {
            pseudo: "Pseudo/jQCm6c02bba1T",
            magnetism: "Pseudo/jQCm6c02bba1T-0002",
            target: "Pseudo/jQCm6c02bba1T-0004",
            offset: "Pseudo/jQCm6c02bba1T-0005"
        },
        guides: {
            enable: "DNC8e44021f21-0001"
        },
        vignette: {
            pseudo: "Pseudo/hlCma9f4e5bei",
            enable: "Pseudo/hlCma9f4e5bei-0001",
            ellipse: "Pseudo/hlCma9f4e5bei-0002",
            feather: "Pseudo/hlCma9f4e5bei-0004",
            position: "Pseudo/hlCma9f4e5bei-0005",
            scale: "Pseudo/hlCma9f4e5bei-0006",
            intensity: "Pseudo/hlCma9f4e5bei-0007"
        },
        dynamics1d: {
            pseudo: "Pseudo/IwOVa882cc43v",
            enable: "Pseudo/IwOVa882cc43v-0001",
            type: "Pseudo/IwOVa882cc43v-0002",
            frequency: "Pseudo/IwOVa882cc43v-0003",
            amount: "Pseudo/IwOVa882cc43v-0004",
            seed: "Pseudo/IwOVa882cc43v-0005"
        },
        dynamics2d: {
            pseudo: "Pseudo/EPO5750a279cg",
            enable: "Pseudo/EPO5750a279cg-0001",
            type: "Pseudo/EPO5750a279cg-0002",
            frequency: "Pseudo/EPO5750a279cg-0003",
            amount: "Pseudo/EPO5750a279cg-0004",
            seed: "Pseudo/EPO5750a279cg-0005",
            seperation: "Pseudo/EPO5750a279cg-0007",
            seperationX: "Pseudo/EPO5750a279cg-0008",
            seperationY: "Pseudo/EPO5750a279cg-0009"
        },
        dynamics3d: {
            pseudo: "Pseudo/jAOY6e34ca3cf",
            enable: "Pseudo/jAOY6e34ca3cf-0001",
            type: "Pseudo/jAOY6e34ca3cf-0002",
            frequency: "Pseudo/jAOY6e34ca3cf-0003",
            amount: "Pseudo/jAOY6e34ca3cf-0004",
            seed: "Pseudo/jAOY6e34ca3cf-0005",
            seperation: "Pseudo/jAOY6e34ca3cf-0007",
            seperationX: "Pseudo/jAOY6e34ca3cf-0008",
            seperationY: "Pseudo/jAOY6e34ca3cf-0009",
            seperationZ: "Pseudo/jAOY6e34ca3cf-0010"
        },
        texture: {
            pseudo: "Pseudo/jnOIbb35c80eN",
            imagePosition: "Pseudo/jnOIbb35c80eN-0002",
            imageScale: "Pseudo/jnOIbb35c80eN-0003",
            imageRotation: "Pseudo/jnOIbb35c80eN-0004",
            delayEnable: "Pseudo/jnOIbb35c80eN-0007",
            delayAmount: "Pseudo/jnOIbb35c80eN-0008",
            dynamicsEnable: "Pseudo/jnOIbb35c80eN-0011",
            dynamicsType: "Pseudo/jnOIbb35c80eN-0012",
            dynamicsFrequency: "Pseudo/jnOIbb35c80eN-0013",
            dynamicsAmount: "Pseudo/jnOIbb35c80eN-0014",
            dynamicsSeed: "Pseudo/jnOIbb35c80eN-0015",
            seperationEnable: "Pseudo/jnOIbb35c80eN-0017",
            seperationX: "Pseudo/jnOIbb35c80eN-0018",
            seperationY: "Pseudo/jnOIbb35c80eN-0019",
            seperationZ: "Pseudo/jnOIbb35c80eN-0020"
        },
        falloff: {
            pseudo: "Pseudo/b0OA8d132c8bv",
            enable: "Pseudo/b0OA8d132c8bv-0001",
            invert: "Pseudo/b0OA8d132c8bv-0002",
            falloff: "Pseudo/b0OA8d132c8bv-0003"
        },
        falloff1d: {
            pseudo: "Pseudo/ajO511f0e9a91",
            x: "Pseudo/ajO511f0e9a91-0001"
        },
        falloff2d: {
            pseudo: "Pseudo/9JOu53278f8bp",
            x: "Pseudo/9JOu53278f8bp-0001",
            y: "Pseudo/9JOu53278f8bp-0002"
        },
        falloff3d: {
            pseudo: "Pseudo/iSOkadb76865x",
            x: "Pseudo/iSOkadb76865x-0001",
            y: "Pseudo/iSOkadb76865x-0002",
            z: "Pseudo/iSOkadb76865x-0003"
        },
        falloffcolor: {
            pseudo: "Pseudo/LBP67203f30dE",
            color: "Pseudo/LBP67203f30dE-0001"
        }
    };
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.hasTag = exports.getTag = exports.tag = exports.restoreSelectionAfter = exports.getPropertyAtPath = exports.setPropertyAtPath = exports.isLayer = exports.propertyToDimension = exports.ensureProperty = exports.ensureEffect = exports.getHighestIndex = exports.getLowestIndex = exports.getUniqueName = exports.getLayerForProperty = exports.layersToLooper = exports.propertiesToGetterFromComp = exports.propertiesToGetter = exports.layersToGetter = exports.propertyToGetterFromComp = exports.propertyToGetter = exports.layerToGetter = exports.toPropertyGetter = exports.toPrettyPropertyPath = exports.toPropertyPath = exports.flatten = exports.prop = exports.zip = exports.map = exports.compose = void(0);
    var utils_1 = __webpack_require__(1);
    exports.compose = function(fn1) {
        var fns = [];
        for (var _i = 1; _i < arguments.length; _i += 1) {
            fns[_i - 1] = arguments[_i];
        }
        return fns.reduce(function(prevFn, nextFn) {
            return function(value) {
                return prevFn(nextFn(value));
            };
        }, fn1);
    };
    exports.map = function(cb) {
        return function(items) {
            return Object.keys(items).map(function(key) {
                return cb(items[key], key, items);
            });
        };
    };
    exports.zip = function(keys) {
        return function(values) {
            return keys.map(function(key, i) {
                return [key, values[i]];
            });
        };
    };
    exports.prop = function(key) {
        return function(obj) {
            return obj[key];
        };
    };

    function flatten(arrs) {
        return [].concat.apply([], arrs);
    }
    exports.flatten = flatten;
    exports.toPropertyPath = function(includeLayerName) {
        if (includeLayerName === void(0)) {
            includeLayerName = false;
        }
        return function(property) {
            var propertyPath = [];
            while (property) {
                if (property.parentProperty) {
                    if (property.parentProperty.propertyType === PropertyType.INDEXED_GROUP) {
                        propertyPath.push(property.name);
                    } else {
                        propertyPath.push(property.matchName);
                    }
                } else {
                    if (includeLayerName === true) {
                        propertyPath.push(property.name);
                    }
                }
                property = property.parentProperty;
            }
            return propertyPath.reverse();
        };
    };
    exports.toPrettyPropertyPath = function(includeLayerName) {
        if (includeLayerName === void(0)) {
            includeLayerName = false;
        }
        return function(property) {
            var propertyPath = [];
            while (property) {
                if (property.parentProperty) {
                    propertyPath.push(property.name);
                } else {
                    if (includeLayerName === true) {
                        propertyPath.push(property.name);
                    }
                }
                property = property.parentProperty;
            }
            return propertyPath.reverse();
        };
    };
    exports.toPropertyGetter = function(fromComposition) {
        if (fromComposition === void(0)) {
            fromComposition = false;
        }
        return function(propertyPath) {
            return function(layerOrComposition) {
                var copy = propertyPath.slice(0);
                var property = fromComposition ? layerOrComposition.layer(copy.shift()) : layerOrComposition;
                while (key = copy.shift()) {
                    if (property) {
                        property = property.property(key);
                    } else {
                        break;
                    }
                }
                return property;
            };
        };
    };
    exports.layerToGetter = function(layer) {
        var layerName = layer.name;
        return function(composition) {
            return composition.layer(layerName);
        };
    };
    exports.propertyToGetter = exports.compose(exports.toPropertyGetter(false), exports.toPropertyPath(false));
    exports.propertyToGetterFromComp = exports.compose(exports.toPropertyGetter(true), exports.toPropertyPath(true));

    function layersToGetter(layers) {
        var layerGetters = layers.map(exports.layerToGetter);
        return function(composition) {
            return layerGetters.map(function(fn) {
                return fn(composition);
            });
        };
    }
    exports.layersToGetter = layersToGetter;

    function propertiesToGetter(properties) {
        var propertyGetters = properties.map(exports.propertyToGetter);
        return function(layer) {
            return propertyGetters.map(function(fn) {
                return fn(layer);
            });
        };
    }
    exports.propertiesToGetter = propertiesToGetter;

    function propertiesToGetterFromComp(properties) {
        var propertyGetters = properties.map(exports.propertyToGetterFromComp);
        return function(composition) {
            return propertyGetters.map(function(fn) {
                return fn(composition);
            });
        };
    }
    exports.propertiesToGetterFromComp = propertiesToGetterFromComp;

    function layersToLooper(layers) {
        var layersGetter = layersToGetter(layers);
        var propertiesGetterForLayer = layers.map(exports.compose(propertiesToGetter, exports.prop("selectedProperties")));
        return function(composition, cb) {
            var freshLayers = layersGetter(composition);
            return freshLayers.map(function(layer, i) {
                if (propertiesGetterForLayer[i]) {
                    var properties = propertiesGetterForLayer[i](layer);
                    cb(layer, properties);
                }
            });
        };
    }
    exports.layersToLooper = layersToLooper;

    function getLayerForProperty(property) {
        while (property.parentProperty) {
            property = property.parentProperty;
        }
        return property;
    }
    exports.getLayerForProperty = getLayerForProperty;

    function getUniqueName(collection, prefix) {
        var availableNumber = 0;
        collection.forEach(function(item) {
            if (item.name.indexOf(prefix) > -1) {
                var postfix = item.name.split(prefix)[1];
                var postfixNumber = Number(postfix);
                if (postfixNumber >= availableNumber) {
                    availableNumber = postfixNumber + 1;
                }
            }
        });
        return prefix + availableNumber === 0 ? "" : availableNumber;
    }
    exports.getUniqueName = getUniqueName;

    function getLowestIndex(layersOrProperties) {
        var indexes = layersOrProperties.map(exports.prop("index"));
        return Math.min.apply(Math.min, indexes);
    }
    exports.getLowestIndex = getLowestIndex;

    function getHighestIndex(layersOrProperties) {
        var indexes = layersOrProperties.map(exports.prop("index"));
        return Math.max.apply(Math.max, indexes);
    }
    exports.getHighestIndex = getHighestIndex;

    function ensureEffect(layer, effectName, effectGroupPseudo) {
        var effectsProperty = layer.property("ADBE Effect Parade");
        var effectGroup = effectsProperty.property(effectName);
        if (!effectGroup) {
            effectGroup = effectsProperty.addProperty(effectGroupPseudo);
            effectGroup.name = effectName;
        }
        return effectGroup;
    }
    exports.ensureEffect = ensureEffect;

    function ensureProperty(layer, propertyPath, prefix) {
        var property = layer;
        propertyPath.forEach(function(propertyId, i) {
            if (!property[propertyId] || prefix && i === (propertyPath.length - 1)) {
                property = property.addProperty(propertyId);
                if (prefix) {
                    property.name = getUniqueName(property.parentProperty, prefix);
                }
            } else {
                property = property[propertyId];
            }
        });
        return property;
    }
    exports.ensureProperty = ensureProperty;

    function propertyToDimension(property) {
        switch (property.propertyValueType) {
            case PropertyValueType.OneD:
                return 1;
            case PropertyValueType.TwoD_SPATIAL:
            case PropertyValueType.TwoD:
                return 2;
            case PropertyValueType.ThreeD:
            case PropertyValueType.ThreeD_SPATIAL:
                return 3;
            case PropertyValueType.COLOR:
                return 4;
            case PropertyValueType.NO_VALUE:
                return 5;
            case PropertyValueType.SHAPE:
                return 6;
        }
    }
    exports.propertyToDimension = propertyToDimension;

    function isLayer(variable) {
        return variable instanceof AVLayer || variable instanceof ShapeLayer || variable instanceof LightLayer || variable instanceof TextLayer || variable instanceof CameraLayer;
    }
    exports.isLayer = isLayer;

    function setPropertyAtPath(layerOrPoperty, path, key, value) {
        var property = layerOrPoperty;
        path = path.slice();
        while (name = path.shift()) {
            if (property) {
                property = property.property(name);
            } else {
                break;
            }
        }
        if (property) {
            property[key] = value
        }
    }
    exports.setPropertyAtPath = setPropertyAtPath;

    function getPropertyAtPath(layer, path) {
        var property = layer;
        path = path.slice();
        while (name = path.shift()) {
            if (property) {
                property = property.property(name);
            } else {
                property = null;
                break;
            }
        }
        return property;
    }
    exports.getPropertyAtPath = getPropertyAtPath;

    function restoreSelectionAfter(cb, composition) {
        if (!composition) {
            if (app.project.activeItem instanceof CompItem) {
                composition = app.project.activeItem;
            }
            if (!composition) {
                cb();
                return;
            }
        }
        var selectedLayers = composition.selectedLayers;
        var forSelectedLayersAndProperties = layersToLooper(selectedLayers);
        var originalCompositionName = composition.name;
        cb();
        utils_1.deselectAll(composition);
        var originalComposition = utils_1.findProjectItemByName(originalCompositionName);
        if (originalComposition) {
            forSelectedLayersAndProperties(originalComposition, function(layer, properties) {
                if (!layer) {
                    return;
                }
                layer.selected = true;
                properties.forEach(function(property) {
                    property.selected = true;
                });
            });
        }
    }
    exports.restoreSelectionAfter = restoreSelectionAfter;

    function tag(layer, tag, value, overwrite) {
        if (value === void(0)) {
            value = "true";
        }
        if (overwrite === void(0)) {
            overwrite = false;
        }
        var marker = layer.property("Marker");
        if (!overwrite) {
            var currentMarker = marker.valueAtTime(tag, true);
            if (currentMarker.comment !== "") {
                return currentMarker.comment;
            }
        }
        var markerValue = new MarkerValue(value);
        marker.setValueAtTime(tag, markerValue);
        return value + "";
    }
    exports.tag = tag;

    function getTag(layer, tag) {
        var marker = layer.property("Marker");
        var currentMarker = marker.valueAtTime(tag, true);
        return currentMarker.comment;
    }
    exports.getTag = getTag;

    function hasTag(layer, tag) {
        var marker = layer.property("Marker");
        var currentMarker = marker.valueAtTime(tag, true);
        return currentMarker.comment !== "";
    }
    exports.hasTag = hasTag;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.REPLACEMENTS = exports.ANIMO_PREFIX = exports.ANIMO_GROUP_PREFIX = exports.ANIMO_CONTROLLER_PREFIX = exports.SHORT_NAME_SEPERATOR = exports.MIDAS_CHILD_EFFECT_NAME = exports.MIDAS_PARENT_EFFECT_NAME = exports.MIDAS_CHILD_PREFIX = exports.MIDAS_PARENT_PREFIX = exports.MIDAS_PREFIX = void(0);
    exports.MIDAS_PREFIX = "[m] ";
    exports.MIDAS_PARENT_PREFIX = "[m-p] ";
    exports.MIDAS_CHILD_PREFIX = "[m-c] ";
    exports.MIDAS_PARENT_EFFECT_NAME = exports.MIDAS_PREFIX + "G L O B A L";
    exports.MIDAS_CHILD_EFFECT_NAME = exports.MIDAS_PREFIX + "C H I L D";
    exports.SHORT_NAME_SEPERATOR = ">";
    exports.ANIMO_CONTROLLER_PREFIX = "[a-c] ";
    exports.ANIMO_GROUP_PREFIX = "[a-g] ";
    exports.ANIMO_PREFIX = "[a] ";
    exports.REPLACEMENTS = {
        "Stroke Width": "SW",
        Opacity: "Opac"
    };
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    var bridge_1 = __webpack_require__(20);

    function log(level) {
        return function() {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i += 1) {
                args[_i] = arguments[_i];
            }
            var safeArgs = args.map(function(arg) {
                try {
                    JSON.stringify(arg);
                    return arg;
                } catch (e) {
                    return arg.toString();
                }
            });
            bridge_1.
            default ("com.mtmograph.motion-next:CONSOLE_" + level, JSON.stringify(safeArgs));
        };
    }
    $.global.console = {
        log: log("LOG"),
        warn: log("WARN"),
        error: log("ERROR")
    };
    exports.
    default = console;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.addMidas = exports.toEffectName = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);
    var constants_1 = __webpack_require__(4);
    var utils_1 = __webpack_require__(1);
    var standardEffectGroup = "Pseudo/ECff194bd30AO";
    var clothEffectGroup = "Pseudo/WO6fbd0b07I7W";
    var d1ChildPrefix = "Pseudo/9rb061afeaiGL";
    var d1MasterPrefix = "Pseudo/yV347c57e3S7H";
    var d2ChildPrefix = "Pseudo/jN8ec962dboGZ";
    var d2MasterPrefix = "Pseudo/Bs5b67a435H7o";
    var d3ChildPrefix = "Pseudo/AM3c44d406eG2";
    var d3MasterPrefix = "Pseudo/cgcebdb4a0V7C";
    var colorChildPrefix = "ADBE Color Balance (HLS)";
    var pseudos = {
        standard: standardEffectGroup,
        cloth: clothEffectGroup,
        "1": {
            global: {},
            child: {
                prefix: d1ChildPrefix,
                enable: d1ChildPrefix + "-0001",
                delay: d1ChildPrefix + "-0002",
                enableMag: d1ChildPrefix + "-0004",
                mag: d1ChildPrefix + "-0005",
                softforce: d1ChildPrefix + "-0009",
                softforceAmt: d1ChildPrefix + "-0010",
                correction: d1ChildPrefix + "-0013"
            },
            parent: {
                prefix: d1MasterPrefix,
                delay: d1MasterPrefix + "-0001",
                dragEnable: d1MasterPrefix + "-0003",
                dragSeed: d1MasterPrefix + "-0004",
                dragRange: d1MasterPrefix + "-0005",
                enableScatter: d1MasterPrefix + "-0008",
                scatterSeed: d1MasterPrefix + "-0009",
                x: d1MasterPrefix + "-0010",
                correction: d1MasterPrefix + "-0022",
                dynEnable: d1MasterPrefix + "-0014",
                dynFreq: d1MasterPrefix + "-0015",
                dynAmount: d1MasterPrefix + "-0016"
            }
        },
        "2": {
            child: {
                prefix: d2ChildPrefix,
                enable: d2ChildPrefix + "-0001",
                delay: d2ChildPrefix + "-0002",
                enableMag: d2ChildPrefix + "-0004",
                xMag: d2ChildPrefix + "-0006",
                yMag: d2ChildPrefix + "-0007",
                softforce: d2ChildPrefix + "-0012",
                softforceAmt: d2ChildPrefix + "-0013",
                correction: d2ChildPrefix + "-0016"
            },
            parent: {
                prefix: d2MasterPrefix,
                delay: d2MasterPrefix + "-0001",
                dragEnable: d2MasterPrefix + "-0003",
                dragSeed: d2MasterPrefix + "-0004",
                dragRange: d2MasterPrefix + "-0005",
                enableScatter: d2MasterPrefix + "-0008",
                scatterSeed: d2MasterPrefix + "-0009",
                x: d2MasterPrefix + "-0010",
                y: d2MasterPrefix + "-0011",
                correction: d2MasterPrefix + "-0023",
                dynEnable: d2MasterPrefix + "-0015",
                dynFreq: d2MasterPrefix + "-0016",
                dynAmount: d2MasterPrefix + "-0017"
            }
        },
        "3": {
            child: {
                prefix: d3ChildPrefix,
                enable: d3ChildPrefix + "-0001",
                delay: d3ChildPrefix + "-0002",
                enableMag: d3ChildPrefix + "-0004",
                xMag: d3ChildPrefix + "-0006",
                yMag: d3ChildPrefix + "-0007",
                zMag: d3ChildPrefix + "-0008",
                softforce: d3ChildPrefix + "-0013",
                softforceAmt: d3ChildPrefix + "-0014",
                correction: d3ChildPrefix + "-0017"
            },
            parent: {
                prefix: d3MasterPrefix,
                delay: d3MasterPrefix + "-0001",
                dragEnable: d3MasterPrefix + "-0003",
                dragSeed: d3MasterPrefix + "-0004",
                dragRange: d3MasterPrefix + "-0005",
                enableScatter: d3MasterPrefix + "-0008",
                scatterSeed: d3MasterPrefix + "-0009",
                x: d3MasterPrefix + "-0010",
                y: d3MasterPrefix + "-0011",
                z: d3MasterPrefix + "-0012",
                correction: d3MasterPrefix + "-0024",
                dynEnable: d3MasterPrefix + "-0016",
                dynFreq: d3MasterPrefix + "-0017",
                dynAmount: d3MasterPrefix + "-0018"
            }
        },
        "4": {
            parent: {
                prefix: d1MasterPrefix
            },
            child: {
                prefix: colorChildPrefix,
                color: colorChildPrefix + "-0001"
            }
        }
    };

    function minifier(code, map) {
        Object.keys(map).forEach(function(key) {
            code = code.replace(new RegExp(key, "g"), map[key]);
        });
        var lines = code.split("\n").map(function(line) {
            return line.trim();
        });
        var firstLine = lines.shift();
        return firstLine + "\n" + lines.join("");
    }

    function get1dExpression(parentLayer, childEffectName, globalEffectName, propertyPath, pseudos, compositionEnabled, guideEnabled) {
        if (guideEnabled === void(0)) {
            guideEnabled = false;
        }
        var compAccessor = compositionEnabled ? "comp(" + JSON.stringify(parentLayer.containingComp.name) + ").layer(" + JSON.stringify(parentLayer.name) + ")" : "thisComp.layer(" + JSON.stringify(parentLayer.name) + ")";
        var indexAdjust = compositionEnabled ? "index" + guideEnabled ? " - 1" : "" : "index - (parentLayer.index" + guideEnabled ? " + 1" : "" + ")";
        var propertyPathString = "(" + propertyPath.map(function(str) {
            return JSON.stringify(str);
        }).join(")(") + ")";
        return minifier("// Mt. Mograph - Motion3 (1D Expression)\nparentLayer = " + compAccessor + ";\nglobalEffect = parentLayer(\"Effects\")(" + JSON.stringify(globalEffectName) + ");\nparentProperty = parentLayer" + propertyPathString + ";\nchildEffect = effect(" + JSON.stringify(childEffectName) + ");\nchildEnable = childEffect(\"" + pseudos.child.enable + "\");\nchildDelay = childEffect(\"" + pseudos.child.delay + "\") / 200;\nchildMagEnable = childEffect(\"" + pseudos.child.enableMag + "\");\nchildMag = childEffect(\"" + pseudos.child.mag + "\") / 100;\nchildSoftforceEnable = childEffect(\"" + pseudos.child.softforce + "\");\nchildSoftforceOriginalEase = childEffect(\"" + pseudos.child.softforceAmt + "\") / 100;\nchildCorrection = childEffect(\"" + pseudos.child.correction + "\");\nparentDelay = globalEffect(\"" + pseudos.parent.delay + "\") / 200;\nparentDragEnable = globalEffect(\"" + pseudos.parent.dragEnable + "\");\nparentDragSeed = globalEffect(\"" + pseudos.parent.dragSeed + "\") * 2;\nparentDragRange = globalEffect(\"" + pseudos.parent.dragRange + "\");\nparentScatterEnable = globalEffect(\"" + pseudos.parent.enableScatter + "\");\nparentScatterSeed = globalEffect(\"" + pseudos.parent.scatterSeed + "\") * 2;\nparentScatterX = globalEffect(\"" + pseudos.parent.x + "\");\nparentCorrection = globalEffect(\"" + pseudos.parent.correction + "\");\nseedRandom(parentDragSeed, true);\nif (childEnable == 1) {\ncalculatedDelay = parentDelay + childDelay;\nif (parentDragEnable == 1) {\n  if (parentDragRange[0] != 0 || parentDragRange[1] != 0) {\n    calculatedDelay = calculatedDelay + random(parentDragRange[0] / 200, parentDragRange[1] / 200);\n  }\n}\nrelativeDelay = calculatedDelay * (" + indexAdjust + ");\nif (childSoftforceEnable == 1) {\n  relativeDelay = relativeDelay * childSoftforceOriginalEase;\n}\ncalculatedTime = time - relativeDelay;\nrelativeValue = parentProperty.valueAtTime(calculatedTime);\ncorrectionAndSeed = childCorrection[0];\nif (parentScatterEnable == 1) {\n  seedRandom(parentScatterSeed, true);\n  correctionAndSeed = [Math.floor(random(parentScatterX[0], parentScatterX[1]) * -1) + childCorrection[0]];\n}\nif (childMagEnable < 1) {\n  childMag = 1;\n}\n[(value + (value - correctionAndSeed)) + (relativeValue - parentCorrection) * childMag];\n} else {\nvalue;\n}", {
            parentLayer: "a",
            globalEffect: "b",
            parentProperty: "c",
            childEffect: "d",
            childEnable: "f",
            childDelay: "g",
            childMagEnable: "h",
            childMag: "i",
            childSoftforceEnable: "j",
            childSoftforceOriginalEase: "k",
            childCorrection: "l",
            parentDelay: "m",
            parentDragEnable: "n",
            parentDragSeed: "o",
            parentScatterEnable: "p",
            parentScatterSeed: "q",
            parentScatterX: "r",
            parentCorrection: "s",
            calculatedDelay: "t",
            relativeDelay: "u",
            calculatedTime: "v",
            relativeValue: "w",
            correctionAndSeed: "x",
            parentDragRange: "y"
        }) + "\n//META{\"tool\": \"midas\", \"parentLayer\": " + JSON.stringify(parentLayer.name) + ", \"composition\": \"" + parentLayer.containingComp.name + "\", \"childEffectName\": \"" + childEffectName + "\", \"globalEffectName\": \"" + globalEffectName + "\"}ENDMETA";
    }

    function get2dExpression(parentLayer, childEffectName, globalEffectName, propertyPath, pseudos, compositionEnabled, guideEnabled) {
        if (guideEnabled === void(0)) {
            guideEnabled = false;
        }
        var compAccessor = compositionEnabled ? "comp(" + JSON.stringify(parentLayer.containingComp.name) + ").layer(" + JSON.stringify(parentLayer.name) + ")" : "thisComp.layer(" + JSON.stringify(parentLayer.name) + ")";
        var indexAdjust = compositionEnabled ? "index" + guideEnabled ? " - 1" : "" : "index - (parentLayer.index" + guideEnabled ? " + 1" : "" + ")";
        var propertyPathString = "(" + propertyPath.map(function(str) {
            return JSON.stringify(str);
        }).join(")(") + ")";
        return minifier("// Mt. Mograph - Motion3 (2D Expression)\nparentLayer = " + compAccessor + ";\nglobalEffect = parentLayer(\"Effects\")(" + JSON.stringify(globalEffectName) + ");\nparentProperty = parentLayer" + propertyPathString + ";\nchildEffect = effect(" + JSON.stringify(childEffectName) + ");\nchildEnable = childEffect(\"" + pseudos.child.enable + "\");\nchildDelay = childEffect(\"" + pseudos.child.delay + "\") / 200;\nchildMagEnable = childEffect(\"" + pseudos.child.enableMag + "\");\nchildMagX = childEffect(\"" + pseudos.child.xMag + "\") / 100;\nchildMagY = childEffect(\"" + pseudos.child.yMag + "\") / 100;\nchildSoftforceEnable = childEffect(\"" + pseudos.child.softforce + "\");\nchildSoftforceOriginalEase = childEffect(\"" + pseudos.child.softforceAmt + "\") / 100;\nchildCorrection = childEffect(\"" + pseudos.child.correction + "\");\nparentDelay = globalEffect(\"" + pseudos.parent.delay + "\") / 200;\nparentDragEnable = globalEffect(\"" + pseudos.parent.dragEnable + "\");\nparentDragSeed = globalEffect(\"" + pseudos.parent.dragSeed + "\") * 2;\nparentDragRange = globalEffect(\"" + pseudos.parent.dragRange + "\");\nparentScatterEnable = globalEffect(\"" + pseudos.parent.enableScatter + "\");\nparentScatterSeed = globalEffect(\"" + pseudos.parent.scatterSeed + "\") * 2;\nparentScatterX = globalEffect(\"" + pseudos.parent.x + "\");\nparentScatterY = globalEffect(\"" + pseudos.parent.y + "\");\nparentCorrection = globalEffect(\"" + pseudos.parent.correction + "\");\nseedRandom(parentDragSeed, true);\nif (childEnable == 1) {\ncalculatedDelay = parentDelay + childDelay;\nif (parentDragEnable == 1) {\n  if (parentDragRange[0] != 0 || parentDragRange[1] != 0) {\n    calculatedDelay = calculatedDelay + random(parentDragRange[0] / 200, parentDragRange[1] / 200);\n  }\n}\nrelativeDelay = calculatedDelay * (" + indexAdjust + ");\nif (childSoftforceEnable == 1) {\n  relativeDelay = relativeDelay * childSoftforceOriginalEase;\n}\ncalculatedTime = time - relativeDelay;\nrelativeValue = parentProperty.valueAtTime(calculatedTime);\ncorrectionAndSeed = [childCorrection[0], childCorrection[1]];\nif (parentScatterEnable == 1) {\n  seedRandom(parentScatterSeed, true);\n  r1 = [Math.floor(random(parentScatterX[0], parentScatterX[1]) * -1) + childCorrection[0]];\n  r2 = [Math.floor(random(parentScatterY[0], parentScatterY[1]) * -1) + childCorrection[1]];\n  correctionAndSeed = [r1, r2];\n}\nif (\n  parentScatterX.value[0] === parentScatterY.value[0]\n  && parentScatterX.value[1] === parentScatterY.value[1]\n  && !(\n    parentScatterX.value[0] === 0\n    && parentScatterX.value[1] === 0\n    && parentScatterY.value[0] === 0\n    && parentScatterY.value[1] === 0\n  )\n  && parentScatterEnable == 1\n) {\n  correctionAndSeed = [correctionAndSeed[0], correctionAndSeed[0]];\n} else {\n  correctionAndSeed = [correctionAndSeed[0], correctionAndSeed[1]];\n}\nif (childMagEnable < 1) {\n  childMagX = 1;\n  childMagY = 1;\n}\n[\n  (value[0] + (value[0] - correctionAndSeed[0])) + (relativeValue[0] - parentCorrection[0]) * childMagX,\n  (value[1] + (value[1] - correctionAndSeed[1])) + (relativeValue[1] - parentCorrection[1]) * childMagY\n];\n} else {\nvalue;\n}", {
            parentLayer: "a",
            globalEffect: "b",
            parentProperty: "c",
            childEffect: "d",
            ml_index: "e",
            childEnable: "f",
            childDelay: "g",
            childMagEnable: "h",
            childMag: "i",
            childSoftforceEnable: "j",
            childSoftforceOriginalEase: "k",
            childCorrection: "l",
            parentDelay: "m",
            parentDragEnable: "n",
            parentDragSeed: "o",
            parentScatterEnable: "p",
            parentScatterSeed: "q",
            parentScatterX: "r",
            parentCorrection: "s",
            calculatedDelay: "t",
            relativeDelay: "u",
            calculatedTime: "v",
            relativeValue: "w",
            correctionAndSeed: "x",
            parentScatterY: "aa",
            childMagX: "bb",
            childMagY: "cc",
            parentDragRange: "dd"
        }) + "\n//META{\"tool\": \"midas\", \"parentLayer\": " + JSON.stringify(parentLayer.name) + ", \"composition\": " + JSON.stringify(parentLayer.containingComp.name) + ", \"childEffectName\": " + JSON.stringify(childEffectName) + ", \"globalEffectName\": " + JSON.stringify(globalEffectName) + "}ENDMETA";
    }

    function get3dExpression(parentLayer, childEffectName, globalEffectName, propertyPath, pseudos, compositionEnabled, guideEnabled) {
        if (guideEnabled === void(0)) {
            guideEnabled = false;
        }
        var compAccessor = compositionEnabled ? "comp(" + JSON.stringify(parentLayer.containingComp.name) + ").layer(" + JSON.stringify(parentLayer.name) + ")" : "thisComp.layer(" + JSON.stringify(parentLayer.name) + ")";
        var indexAdjust = compositionEnabled ? "index" + guideEnabled ? " - 1" : "" : "index - (parentLayer.index" + guideEnabled ? " + 1" : "" + ")";
        var propertyPathString = "(" + propertyPath.map(function(str) {
            return JSON.stringify(str);
        }).join(")(") + ")";
        return minifier("// Mt. Mograph - Motion3 (3D Expression)\nparentLayer = " + compAccessor + ";\nglobalEffect =  parentLayer(\"Effects\")(" + JSON.stringify(globalEffectName) + ");\nparentProperty = parentLayer" + propertyPathString + ";\nchildEffect = effect(" + JSON.stringify(childEffectName) + ");\n\nchildEnable = childEffect(\"" + pseudos.child.enable + "\");\nchildDelay = childEffect(\"" + pseudos.child.delay + "\") / 200;\nchildMagEnable = childEffect(\"" + pseudos.child.enableMag + "\");\nchildMagX = childEffect(\"" + pseudos.child.xMag + "\") / 100;\nchildMagY = childEffect(\"" + pseudos.child.yMag + "\") / 100;\nchildMagZ = childEffect(\"" + pseudos.child.zMag + "\") / 100;\nchildSoftforceEnable = childEffect(\"" + pseudos.child.softforce + "\");\nchildSoftforceOriginalEase = childEffect(\"" + pseudos.child.softforceAmt + "\") / 100;\nchildCorrection = childEffect(\"" + pseudos.child.correction + "\");\n\nparentDelay = globalEffect(\"" + pseudos.parent.delay + "\") / 200;\nparentDragEnable = globalEffect(\"" + pseudos.parent.dragEnable + "\");\nparentDragSeed = globalEffect(\"" + pseudos.parent.dragSeed + "\") * 2;\nparentDragRange = globalEffect(\"" + pseudos.parent.dragRange + "\");\nparentScatterEnable = globalEffect(\"" + pseudos.parent.enableScatter + "\");\nparentScatterSeed = globalEffect(\"" + pseudos.parent.scatterSeed + "\") * 2;\nparentScatterX = globalEffect(\"" + pseudos.parent.x + "\");\nparentScatterY = globalEffect(\"" + pseudos.parent.y + "\");\nparentScatterZ = globalEffect(\"" + pseudos.parent.z + "\");\nparentCorrection = globalEffect(\"" + pseudos.parent.correction + "\");\n\nseedRandom(parentDragSeed, true);\nif (childEnable == 1) {\ncalculatedDelay = parentDelay + childDelay;\nif (parentDragEnable == 1) {\n  if (parentDragRange[0] != 0 || parentDragRange[1] != 0) {\n    calculatedDelay = calculatedDelay + random(parentDragRange[0] / 200, parentDragRange[1] / 200);\n  }\n}\nrelativeDelay = calculatedDelay * (" + indexAdjust + ");\nif (childSoftforceEnable == 1) {\n  relativeDelay = relativeDelay * childSoftforceOriginalEase;\n}\ncalculatedTime = time - relativeDelay;\nrelativeValue = parentProperty.valueAtTime(calculatedTime);\n\ncorrectionAndSeed = [childCorrection[0], childCorrection[1], childCorrection[2]];\n\nif (parentScatterEnable == 1) {\n  seedRandom(parentScatterSeed, true);\n  r1 = Math.floor(random(parentScatterX[0], parentScatterX[1]) * -1) + childCorrection[0];\n  r2 = Math.floor(random(parentScatterY[0], parentScatterY[1]) * -1) + childCorrection[1];\n  r3 = Math.floor(random(parentScatterZ[0], parentScatterZ[1]) * -1) + childCorrection[2];\n  correctionAndSeed = [r1, r2, r3];\n}\n\nif (\n  parentScatterX.value[0] === parentScatterY.value[0]\n  && parentScatterX.value[1] === parentScatterY.value[1]\n  && !(\n    parentScatterX.value[0] === 0\n    && parentScatterX.value[1] === 0\n    && parentScatterY.value[0] === 0\n    && parentScatterY.value[1] === 0\n  )\n  && parentScatterEnable == 1\n) {\n  correctionAndSeed = [correctionAndSeed[0], correctionAndSeed[0], correctionAndSeed[0]];\n} else {\n  correctionAndSeed = [correctionAndSeed[0], correctionAndSeed[1], correctionAndSeed[2]];\n}\nif (childMagEnable < 1) {\n  childMagX = 1;\n  childMagY = 1;\n  childMagZ = 1;\n}\nf3 = 0;\ntry {\n  f3 = (value[2] + (value[2] - correctionAndSeed[2])) + (relativeValue[2] - parentCorrection[2]) * childMagZ;\n} catch (err) {\n}\n[\n  (value[0] + (value[0] - correctionAndSeed[0])) + (relativeValue[0] - parentCorrection[0]) * childMagX,\n  (value[1] + (value[1] - correctionAndSeed[1])) + (relativeValue[1] - parentCorrection[1]) * childMagY,\n  f3 || 0\n];\n} else {\nvalue;\n}", {
            parentLayer: "a",
            globalEffect: "b",
            parentProperty: "c",
            childEffect: "d",
            ml_index: "e",
            childMagEnable: "h",
            childEnable: "f",
            childDelay: "g",
            childMag: "i",
            childSoftforceEnable: "j",
            childSoftforceOriginalEase: "k",
            childCorrection: "l",
            parentDelay: "m",
            parentDragEnable: "n",
            parentDragSeed: "o",
            parentScatterEnable: "p",
            parentScatterSeed: "q",
            parentScatterX: "r",
            parentCorrection: "s",
            calculatedDelay: "t",
            relativeDelay: "u",
            calculatedTime: "v",
            relativeValue: "w",
            correctionAndSeed: "x",
            f1: "y",
            f2: "z",
            parentScatterY: "aa",
            childMagX: "bb",
            childMagY: "cc",
            f3: "dd",
            childMagZ: "ee",
            parentScatterZ: "ff",
            parentDragRange: "gg"
        }) + "\n//META{\"tool\": \"midas\", \"parentLayer\": " + JSON.stringify(parentLayer.name) + ", \"composition\": " + JSON.stringify(parentLayer.containingComp.name) + ", \"childEffectName\": " + JSON.stringify(childEffectName) + ", \"globalEffectName\": " + JSON.stringify(globalEffectName) + "}ENDMETA";
    }

    function getColorExpression(parentLayer, effectName, propertyPath, pseudos, compositionEnabled) {
        var compAccessor = compositionEnabled ? "comp(" + JSON.stringify(app.project.activeItem.name) + ").layer(" + JSON.stringify(parentLayer.name) + ")" : "thisComp.layer(" + JSON.stringify(parentLayer.name) + ")";
        var indexAdjust = compositionEnabled ? "0" : "parentLayer.index";
        return "value; // Mt. Mograph - Motion3 (Color Expression)";
    }

    function getGlobalDelayExpression(effectGroupPseudo, effectName, pseudo, dimension) {
        var postFix = "00";
        if (dimension === 1 || dimension === 4) {
            postFix += "19"
        }
        if (dimension === 2) {
            postFix += "15"
        }
        if (dimension === 3) {
            postFix += "21"
        }
        return minifier("// Mt. Mograph - Motion3 (Global Delay Expression)\ntry {\nglobal_midas = effect(\"" + effectGroupPseudo + "\");\nchild_out = effect(" + JSON.stringify(effectName) + ")(\"" + pseudo + "-" + postFix + "\");\nenable_global_delay = global_midas(\"" + effectGroupPseudo + "-0002\");\nglobal_delay_amt = global_midas(\"" + effectGroupPseudo + "-0003\");\nenable_global_drag = global_midas(\"" + effectGroupPseudo + "-0006\");\nglobal_drag_seed = global_midas(\"" + effectGroupPseudo + "-0007\");\nglobal_drag_range = global_midas(\"" + effectGroupPseudo + "-0008\");\nseedRandom(global_drag_seed, true);\nif (child_out < 1) {\n  if (enable_global_delay == 1) {\n    global_delay_amt;\n  } else if (enable_global_drag == 1) {\n    global_delay_amt = random(global_delay_amt);\n    if (global_drag_range[0] != 0 || global_drag_range[1] != 0) {\n      global_delay_amt = random(global_drag_range[0], global_drag_range[1]);\n    } else {\n      global_delay_amt = random(global_delay_amt);\n    }\n    global_delay_amt;\n  } else {\n    value;\n  }\n} else {\n  value;\n}\n} catch (e$$4) {\nvalue;\n}", {
            global_midas: "a",
            child_out: "b",
            enable_global_delay: "c",
            global_delay_amt: "d",
            enable_global_drag: "e",
            global_drag_seed: "f",
            global_drag_range: "g"
        });
    }

    function getGlobalColorExpression(parentLayer, effectGroupPseudo, pseudos, compositionEnabled, guideEnabled) {
        var compAccessor = compositionEnabled ? "comp(" + JSON.stringify(parentLayer.containingComp.name) + ").layer(" + JSON.stringify(parentLayer.name) + ")" : "thisComp.layer(" + JSON.stringify(parentLayer.name) + ")";
        var indexAdjust = compositionEnabled ? "index" + guideEnabled ? " - 1" : "" : "index - (parentLayer.index" + guideEnabled ? " + 1" : "" + ")";
        return minifier("// Mt. Mograph - Motion3 (Global Color Expression)\nparentLayer = " + compAccessor + ";\nindex_adjust = " + indexAdjust + ";\nglobalEffect = parentLayer(\"ADBE Effect Parade\")(\"" + effectGroupPseudo + "\");\nenable_color = globalEffect(\"" + effectGroupPseudo + "-0011\");\ncolor_seed = globalEffect(\"" + effectGroupPseudo + "-0012\");\ncolor_cycle = globalEffect(\"" + effectGroupPseudo + "-0013\") / 100;\nif (enable_color == 1) {\n(color_seed * index_adjust) * color_cycle;\n} else {\n0;\n}", {
            parentLayer: "a",
            index_adjust: "b",
            globalEffect: "c",
            enable_color: "d",
            color_seed: "e",
            color_cycle: "f"
        });
    }

    function getGlobalStrokeExpression(parentLayer, effectGroupPseudo, compositionEnabled) {
        var compAccessor = compositionEnabled ? "comp(" + JSON.stringify(parentLayer.containingComp.name) + ").layer(" + JSON.stringify(parentLayer.name) + ")" : "thisComp.layer(" + JSON.stringify(parentLayer.name) + ")";
        return minifier("// Mt. Mograph - Motion3 (Global Stroke Expression)\nparentLayer =  " + compAccessor + ";\nglobalEffect = parentLayer(\"ADBE Effect Parade\")(\"" + constants_1.MIDAS_PARENT_EFFECT_NAME + "\");\nenable_color = globalEffect(\"" + effectGroupPseudo + "-0011\");\nif (enable_color == 1) {\nparentLayer(\"ADBE Root Vectors Group\")(\"ADBE Vector Group\")(\"ADBE Vectors Group\")(\"ADBE Vector Graphic - Stroke\")(\"ADBE Vector Stroke Color\");\n} else {\nvalue;\n}", {
            parentLayer: "a",
            globalEffect: "b",
            enable_color: "c"
        });
    }

    function getGlobalFillExpression(parentLayer, effectGroupPseudo, compositionEnabled) {
        var compAccessor = compositionEnabled ? "comp(" + JSON.stringify(parentLayer.containingComp.name) + ").layer(" + JSON.stringify(parentLayer.name) + ")" : "thisComp.layer(" + JSON.stringify(parentLayer.name) + ")";
        return minifier("// Mt. Mograph - Motion3 (Global Fill Expression)\nparentLayer = " + compAccessor + ";\nglobalEffect = parentLayer(\"ADBE Effect Parade\")(\"" + constants_1.MIDAS_PARENT_EFFECT_NAME + "\");\nenable_color = globalEffect(\"" + effectGroupPseudo + "-0011\");\nif (enable_color == 1) {\ntry {\n  parentLayer(\"ADBE Effect Parade\")(\"Pseudo/" + effectGroupPseudo + "\")(\"Pseudo/" + effectGroupPseudo + "-0018\");\n} catch (err) {\n  try {\n    parentLayer(\"ADBE Root Vectors Group\")(\"ADBE Vector Group\")(\"ADBE Vectors Group\")(\"ADBE Vector Graphic - Fill\")(\"ADBE Vector Fill Color\");\n  } catch (err) {\n    value;\n  }\n}\n} else {\nvalue;\n}", {
            parentLayer: "a",
            globalEffect: "b",
            enable_color: "c"
        });
    }

    function getTwoDMagExpression(effectName) {
        return minifier("// Mt. Mograph - Motion3 (2D Mag Expression)\nproperty = effect(" + JSON.stringify(effectName) + ");\nallowMirror = property(\"Pseudo/jN8ec962dboGZ-0005\");\nmirrorVal = property(\"Pseudo/jN8ec962dboGZ-0008\");\nif (allowMirror == 1) {\nmirrorVal;\n} else {\nvalue;\n}", {
            property: "a",
            allowMirror: "b",
            mirrorVal: "c"
        });
    }

    function getThreeDMagExpression(effectName) {
        return minifier("// Mt. Mograph - Motion3 (3D Mag Expression)\nproperty = effect(" + JSON.stringify(effectName) + ");\nallowMirror = property(\"Pseudo/AM3c44d406eG2-0005\");\nmirrorVal = property(\"Pseudo/AM3c44d406eG2-0009\");\nif (allowMirror == 1) {\nmirrorVal;\n} else {\nvalue;\n}", {
            property: "a",
            allowMirror: "b",
            mirrorVal: "c"
        });
    }

    function check() {
        return prereqs_1.runChecks(prereqs_1.checkTypes.HAS_PROJECT, prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION, prereqs_1.checkTypes.HAS_SELECTED_LAYERS, prereqs_1.checkTypes.SOME_SELECTED_PROPERTIES_ARE_KEYFRAMEABLE);
    }
    exports.check = check;
    var expressionForDimension = {
        "1": get1dExpression,
        "2": get2dExpression,
        "3": get3dExpression,
        "4": getColorExpression
    };

    function getAdjustedValueForProperty(composition, property) {
        var propertyPath = utils_1.toPropertyPath(true)(property);
        var layerName = propertyPath.shift();
        var textLayer = composition.layers.addText("midas_temp_value_getter");
        textLayer.enabled = false;
        var propertyPathString = "(" + propertyPath.map(function(str) {
            return JSON.stringify(str);
        }).join(")(") + ")";
        textLayer.sourceText.expression = "thisComp.layer(" + JSON.stringify(layerName) + ")" + propertyPathString + ".value";
        var value = textLayer.sourceText.value.text.split(",").map(function(i) {
            return Number(i);
        });
        textLayer.remove();
        return value;
    }

    function getMagExpressionsForDimension(dimension, effectName, pseudos) {
        if (dimension === 2) {
            var twoDExpression = getTwoDMagExpression(effectName);
            return "var twoDExpression = " + JSON.stringify(twoDExpression) + ";\neffectGroup.property(\"" + pseudos.xMag + "\").expression = twoDExpression;\neffectGroup.property(\"" + pseudos.yMag + "\").expression = twoDExpression;";
        } else {
            if (dimension === 3) {
                var threeDExpression = getThreeDMagExpression(effectName);
                return "var threeDExpression = " + JSON.stringify(threeDExpression) + ";\neffectGroup.property(\"" + pseudos.xMag + "\").expression = threeDExpression;\neffectGroup.property(\"" + pseudos.yMag + "\").expression = threeDExpression;\neffectGroup.property(\"" + pseudos.zMag + "\").expression = threeDExpression;";
            }
        }
        return "";
    }

    function toEffectName(property) {
        if (property.parentProperty instanceof MaskPropertyGroup) {
            property = property.parentProperty;
        }
        return utils_1.getUniqueName(property.parentProperty, property.name + " ").trim();
    }
    exports.toEffectName = toEffectName;

    function addMidas(parentLayer, childLayers, properties, keyframesEnabled, shyEnabled, compositionEnabled, useClothEffects, guideEnabled) {
        if (keyframesEnabled === void(0)) {
            keyframesEnabled = false;
        }
        if (shyEnabled === void(0)) {
            shyEnabled = false;
        }
        if (compositionEnabled === void(0)) {
            compositionEnabled = false;
        }
        if (useClothEffects === void(0)) {
            useClothEffects = false;
        }
        if (guideEnabled === void(0)) {
            guideEnabled = false;
        }
        var basePseudo = useClothEffects ? pseudos.cloth : pseudos.standard;
        var masterFn = utils_1.genfun("function applyEffectsToMaster(parentLayer) {");
        masterFn("ensureEffect(parentLayer, MIDAS_PARENT_EFFECT_NAME, '" + basePseudo + "')");
        var childFn = utils_1.genfun("function applyEffectsToChild(childLayer) {");
        var globalColorExpression = getGlobalColorExpression(parentLayer, basePseudo, pseudos[4].child, compositionEnabled, guideEnabled);
        var globalStrokeExpression = getGlobalStrokeExpression(parentLayer, basePseudo, compositionEnabled);
        var globalFillExpression = getGlobalFillExpression(parentLayer, basePseudo, compositionEnabled);
        childFn("\n// add color effect group\nconst colorEffectGroup = ensureEffect(childLayer, MIDAS_CHILD_EFFECT_NAME, '" + pseudos[4].child.prefix + "')\ncolorEffectGroup.property('" + pseudos[4].child.color + "').expression = " + JSON.stringify(globalColorExpression) + "\n// add stroke / fill expressions\nif (childLayer instanceof ShapeLayer) {\n  setPropertyAtPath(childLayer, [\"ADBE Root Vectors Group\", \"ADBE Vector Group\", \"ADBE Vectors Group\", \"ADBE Vector Graphic - Stroke\", \"ADBE Vector Stroke Color\"], 'expression', " + JSON.stringify(globalStrokeExpression) + ")\n  " + useClothEffects ? "" : "setPropertyAtPath(childLayer, [\"ADBE Root Vectors Group\", \"ADBE Vector Group\", \"ADBE Vectors Group\", \"ADBE Vector Graphic - Fill\", \"ADBE Vector Fill Color\"], 'expression', " + JSON.stringify(globalFillExpression) + ")" + "\n}\n" + shyEnabled && !compositionEnabled ? "childLayer.shy = true;" : "");
        var names = [];
        properties.forEach(function(property) {
            if (property instanceof PropertyGroup || property instanceof MaskPropertyGroup || property.matchName.indexOf("ADBE Vector Shape") > -1 || !property.canVaryOverTime) {
                return;
            }
            var effectName = toEffectName(property);
            while (names.indexOf(effectName) > -1) {
                effectName += ">";
            }
            names.push(effectName);
            var safePropertyPath = utils_1.toPropertyPath(false)(property);
            var dimension = utils_1.propertyToDimension(property);
            if (dimension > 3) {
                return;
            }
            var dimensionString = "" + dimension;
            var pseudosForDimension = pseudos[dimensionString];
            var parentPseudos = pseudosForDimension.parent;
            var globalEffectName = constants_1.MIDAS_PARENT_PREFIX + effectName;
            var globalDelayExpression = getGlobalDelayExpression(basePseudo, globalEffectName, parentPseudos.prefix, dimension);
            var adjustedValue = JSON.stringify(getAdjustedValueForProperty(parentLayer.containingComp, property));
            var wiggleExpression = minifier("// Mt. Mograph - Motion3 (Wiggle Expression)\nvar tl_parade = thisLayer(\"ADBE Effect Parade\");\nvar tl_dynEnable = tl_parade(\"" + globalEffectName + "\")(\"" + parentPseudos.dynEnable + "\");\nvar tl_dynFreq = tl_parade(\"" + globalEffectName + "\")(\"" + parentPseudos.dynFreq + "\");\nvar tl_dynAmount = tl_parade(\"" + globalEffectName + "\")(\"" + parentPseudos.dynAmount + "\");\nvar tl_dynOffset = value;\nif (tl_dynEnable > 0) {\nseedRandom(time * tl_dynFreq);\ntl_dynOffset = wiggle(0, tl_dynAmount);\n}\ntl_dynOffset;", {
                tl_parade: "a",
                tl_dynEnable: "b",
                tl_dynFreq: "c",
                tl_dynAmount: "d",
                tl_dynOffset: "e"
            });
            var propertyPathString = ".property(" + safePropertyPath.map(function(str) {
                return JSON.stringify(str);
            }).join(").property(") + ")";
            masterFn("\n// add parent property effect\nvar effect = ensureEffect(parentLayer, " + JSON.stringify(globalEffectName) + ", '" + parentPseudos.prefix + "')\n// set the expression\neffect.property('" + parentPseudos.delay + "').expression = " + JSON.stringify(globalDelayExpression) + ";\n// set the correction value\neffect.property('" + parentPseudos.correction + "')\n  .setValue(" + adjustedValue + ")\nvar prop = parentLayer" + propertyPathString + "\nif (prop.expression === '') {\n  prop.expression = " + JSON.stringify(wiggleExpression) + ";\n}\n" + keyframesEnabled ? "prop.setValueAtTime(parentLayer.containingComp.time, prop.value);" : "");
            var childEffectName = constants_1.MIDAS_CHILD_PREFIX + effectName;
            var expression = expressionForDimension[dimensionString](parentLayer, childEffectName, globalEffectName, safePropertyPath, pseudosForDimension, compositionEnabled, guideEnabled);
            childFn("\nvar property = childLayer" + propertyPathString + "\nvar value = getAdjustedValueForProperty(parentLayer.containingComp, property)\nvar effectGroup = ensureEffect(childLayer, " + JSON.stringify(childEffectName) + ", '" + pseudosForDimension.child.prefix + "')\neffectGroup.property('" + pseudosForDimension.child.correction + "')\n  .setValue(value)\nvar property = childLayer" + propertyPathString + "\nproperty.expression = " + JSON.stringify(expression) + ";\n" + getMagExpressionsForDimension(dimension, childEffectName, pseudosForDimension.child));
        });
        masterFn("}");
        var applyMasterEffects = masterFn.toFunction({
            MIDAS_PARENT_EFFECT_NAME: constants_1.MIDAS_PARENT_EFFECT_NAME,
            ensureEffect: utils_1.ensureEffect
        });
        childFn("}");
        var applyChildEffects = childFn.toFunction({
            MIDAS_CHILD_EFFECT_NAME: constants_1.MIDAS_CHILD_EFFECT_NAME,
            ensureEffect: utils_1.ensureEffect,
            parentLayer: parentLayer,
            setPropertyAtPath: utils_1.setPropertyAtPath,
            getAdjustedValueForProperty: getAdjustedValueForProperty
        });
        applyMasterEffects(parentLayer);
        childLayers.forEach(function(childLayer) {
            applyChildEffects(childLayer);
        });
    }
    exports.addMidas = addMidas;

    function findParentLayer(selectedLayers) {
        return selectedLayers.filter(function(selectedLayer) {
            return selectedLayer.selectedProperties.length > 0;
        })[0];
    }

    function layerIsMidasParent(layer) {
        return !(!layer.property("ADBE Effect Parade").property(constants_1.MIDAS_PARENT_EFFECT_NAME));
    }

    function createGuideLayerFrom(layer) {
        var copy = layer.duplicate();
        var selectedPropertiesGetter = utils_1.propertiesToGetter(layer.selectedProperties);
        selectedPropertiesGetter(copy).forEach(function(property) {
            property.selected = true;
        });
        return copy;
    }

    function runMidas(keyframesEnabled, compositionEnabled, shyEnabled, name, guideEnabled) {
        utils_1.fast(function(composition) {
            var names = [];
            var selectedLayers = composition.selectedLayers;
            selectedLayers.forEach(function(selectedLayer, i) {
                if (names.indexOf(selectedLayer.name) > -1) {
                    selectedLayer.name += "" + i + 1;
                }
                names.push(selectedLayer.name);
            });
            var lowestIndex = utils_1.getLowestIndex(selectedLayers);
            var parentLayer = findParentLayer(selectedLayers);
            if (!layerIsMidasParent(parentLayer)) {
                if (guideEnabled) {
                    parentLayer = createGuideLayerFrom(parentLayer);
                    parentLayer.guideLayer = true;
                }
                parentLayer.label = 2;
                parentLayer.name = utils_1.getUniqueName(composition.layers, constants_1.MIDAS_PREFIX + name || parentLayer.name);
                if (parentLayer.index !== lowestIndex && guideEnabled || compositionEnabled) {
                    var destination = composition.layer(lowestIndex);
                    if (destination instanceof AVLayer && destination.hasTrackMatte) {
                        destination = composition.layer(lowestIndex - 1);
                    }
                    parentLayer.moveBefore(destination);
                }
            }
            var childLayers = selectedLayers.filter(function(layer) {
                return layer.name !== parentLayer.name;
            });
            var selectedPropertiesGetter = utils_1.propertiesToGetter(parentLayer.selectedProperties);
            var properties = parentLayer.selectedProperties;
            childLayers.forEach(function(childLayer) {
                selectedPropertiesGetter(childLayer).forEach(function(property) {
                    while (property && property.canVaryOverTime && property.numKeys != 0) {
                        property.removeKey(1);
                    }
                });
            });
            addMidas(parentLayer, childLayers, properties, keyframesEnabled, shyEnabled, compositionEnabled, false, guideEnabled);
            if (compositionEnabled) {
                var childLayerIndexes = childLayers.map(function(layer) {
                    return layer.index;
                });
                var preCompositionName_1 = name || parentLayer.name + " - children";
                var existingComp = utils_1.findProjectItem(function(item) {
                    return item.name === preCompositionName_1;
                });
                if (existingComp) {
                    preCompositionName_1 = utils_1.getUniqueName(composition.layers, name || parentLayer.name) + " - children";
                }
                composition.layers.precompose(childLayerIndexes, preCompositionName_1, true);
                if (shyEnabled) {
                    var preComposition = composition.layer(preCompositionName_1);
                    preComposition.shy = true;
                }
            }
            if (shyEnabled) {
                composition.hideShyLayers = true;
            }
            utils_1.deselectAll(composition);
            parentLayer.selected = true;
            selectedPropertiesGetter(parentLayer).forEach(function(property) {
                if (!property || !isValid(property)) {
                    return;
                }
                property.selected = true;
            });
        });
    }

    function run(keyframesEnabled, compositionEnabled, shyEnabled, name, guideEnabled) {
        if (keyframesEnabled === void(0)) {
            keyframesEnabled = true;
        }
        if (compositionEnabled === void(0)) {
            compositionEnabled = true;
        }
        if (shyEnabled === void(0)) {
            shyEnabled = true;
        }
        if (guideEnabled === void(0)) {
            guideEnabled = true;
        }
        var checkResult = check();
        if (!checkResult.success) {
            return checkResult;
        }
        utils_1.loadEffects();
        utils_1.undoable("Motion3 - Delay", function() {
            return runMidas(keyframesEnabled, compositionEnabled, shyEnabled, name, guideEnabled);
        });
        return {
            success: true
        };
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.HAS_SELECTED_KEYFRAMES);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run(number, setKeyframeType) {
        if (setKeyframeType === void(0)) {
            setKeyframeType = false;
        }
        if (number < 0.1) {
            number = 0.1;
        }
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.HAS_SELECTED_KEYFRAMES);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        var composition = app.project.activeItem;
        if (!composition || !(composition instanceof CompItem)) {
            return;
        }
        app.beginUndoGroup("Ease In");
        for (var i = 0; i < composition.selectedLayers.length; i += 1) {
            var selectedLayer = composition.selectedLayers[i];
            for (var j = 0; j < selectedLayer.selectedProperties.length; j += 1) {
                var selectedProperty = selectedLayer.selectedProperties[j];
                if (selectedProperty.canVaryOverTime) {
                    for (var k = 0; k < selectedProperty.selectedKeys.length; k += 1) {
                        if (setKeyframeType) {
                            selectedProperty.setInterpolationTypeAtKey(selectedProperty.selectedKeys[k], KeyframeInterpolationType.HOLD);
                        } else {
                            var easeIn = new KeyframeEase(0, number);
                            var firstTemporalEase = selectedProperty.keyOutTemporalEase(selectedProperty.selectedKeys[k])[0];
                            var easeOut = new KeyframeEase(firstTemporalEase.speed, firstTemporalEase.influence);
                            switch (selectedProperty.propertyValueType) {
                                case PropertyValueType.ThreeD:
                                    selectedProperty.setTemporalEaseAtKey(selectedProperty.selectedKeys[k], [easeIn, easeIn, easeIn], [easeOut, easeOut, easeOut]);
                                    break;
                                case PropertyValueType.TwoD:
                                    selectedProperty.setTemporalEaseAtKey(selectedProperty.selectedKeys[k], [easeIn, easeIn], [easeOut, easeOut]);
                                    break;
                                default:
                                    selectedProperty.setTemporalEaseAtKey(selectedProperty.selectedKeys[k], [easeIn], [easeOut]);
                                    break;
                            }
                        }
                    }
                }
            }
        }
        app.endUndoGroup();
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.HAS_SELECTED_KEYFRAMES);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run(number, setKeyframeType) {
        if (setKeyframeType === void(0)) {
            setKeyframeType = false;
        }
        if (number < 0.1) {
            number = 0.1;
        }
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.HAS_SELECTED_KEYFRAMES);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        app.beginUndoGroup("Ease Out");
        var composition = app.project.activeItem;
        if (!composition || !(composition instanceof CompItem)) {
            return;
        }
        for (var i = 0; i < composition.selectedLayers.length; i += 1) {
            var selectedLayer = composition.selectedLayers[i];
            for (var j = 0; j < selectedLayer.selectedProperties.length; j += 1) {
                var selectedProperty = selectedLayer.selectedProperties[j];
                if (selectedProperty.canVaryOverTime) {
                    for (var k = 0; k < selectedProperty.selectedKeys.length; k += 1) {
                        if (setKeyframeType) {
                            selectedProperty.setInterpolationTypeAtKey(selectedProperty.selectedKeys[k], KeyframeInterpolationType.BEZIER);
                            selectedProperty.setTemporalContinuousAtKey(selectedProperty.selectedKeys[k], true);
                            selectedProperty.setTemporalAutoBezierAtKey(selectedProperty.selectedKeys[k], true);
                        } else {
                            var easeOut = new KeyframeEase(0, number);
                            var easeIn = new KeyframeEase(selectedProperty.keyInTemporalEase(selectedProperty.selectedKeys[k])[0].speed, selectedProperty.keyInTemporalEase(selectedProperty.selectedKeys[k])[0].influence);
                            switch (selectedProperty.propertyValueType) {
                                case PropertyValueType.ThreeD:
                                    selectedProperty.setTemporalEaseAtKey(selectedProperty.selectedKeys[k], [easeIn, easeIn, easeIn], [easeOut, easeOut, easeOut]);
                                    break;
                                case PropertyValueType.TwoD:
                                    selectedProperty.setTemporalEaseAtKey(selectedProperty.selectedKeys[k], [easeIn, easeIn], [easeOut, easeOut]);
                                    break;
                                default:
                                    selectedProperty.setTemporalEaseAtKey(selectedProperty.selectedKeys[k], [easeIn], [easeOut]);
                                    break;
                            }
                        }
                    }
                }
            }
        }
        app.endUndoGroup();
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.runGrab = exports.check = void(0);
    var utils_1 = __webpack_require__(1);
    var prereqs_1 = __webpack_require__(0);

    function check() {
        return prereqs_1.runChecks(prereqs_1.checkTypes.HAS_PROJECT, prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION, prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.SELECTED_LAYER_HAS_SELECTED_PROPERTIES);
    }
    exports.check = check;

    function runGrab(composition, layers) {
        if (layers === void(0)) {
            layers = [];
        }
        if (!composition) {
            return;
        }
        var selectedLayers = composition.selectedLayers;
        var selectedProperties = composition.selectedProperties;
        var fallbackLayers = selectedLayers.length > 1 ? selectedLayers : utils_1.layersToArray(composition.layers);
        var destinationLayers = layers.length > 0 ? layers : fallbackLayers;
        var propertyGetters = selectedProperties.map(utils_1.propertyToGetter);
        destinationLayers.forEach(function(destinationLayer) {
            if (destinationLayer.locked) {
                return;
            }
            propertyGetters.forEach(function(propertyGetter) {
                var property = propertyGetter(destinationLayer);
                if (!property || !isValid(property)) {
                    return;
                }
                property.selected = true;
            });
        });
    }
    exports.runGrab = runGrab;

    function run() {
        app.beginUndoGroup("Motion3 - Grab");
        utils_1.fast(function(composition) {
            return runGrab(composition);
        });
        app.endUndoGroup();
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    var __read = this && this.__read || function(o, n) {
            var m = typeof Symbol === "function" && o[Symbol.iterator];
            if (!m) {
                return o;
            }
            var i = m.call(o);
            var ar = [];
            try {
                while (n === void(0) || n-- > 0 && !r = i.next().done) {
                    ar.push(r.value)
                }
            } catch (error) {
                e = {
                    error: error
                };
            } finally {
                try {
                    if (r && !r.done && m = i.
                    return) {
                        m.call(i)
                    }
                } finally {
                    if (e) {
                        throw e.error
                    }
                }
            }
            return ar;
        };
    exports.__esModule = true;
    exports.run = exports.poll = exports.compositionGetTagsAndFocusState = void(0);
    var utils_1 = __webpack_require__(1);
    var grab_1 = __webpack_require__(9);

    function getComp() {
        var composition = app.project.activeItem;
        if (composition === null || !(composition instanceof CompItem)) {
            throw new Error("No Composition")
        }
        return composition;
    }

    function getProjectItemsArray() {
        var results = [];
        for (var i = 1; i <= app.project.numItems; i += 1) {
            results.push(app.project.item(i));
        }
        return results;
    }

    function getCompositionsArray() {
        return getProjectItemsArray().filter(function(item) {
            return item instanceof CompItem;
        });
    }

    function compositionIsFocused(composition) {
        for (var i = 1; i <= composition.markerProperty.numKeys; i += 1) {
            var value = composition.markerProperty.keyValue(i);
            if (value.comment.indexOf("FOCUSED") > -1) {
                return true;
            }
        }
        return false;
    }

    function compositionEnsureTags(composition, tags) {
        var markers = composition.markerProperty;
        for (var i = 1; i <= markers.numKeys; i += 1) {
            var marker = markers.keyValue(i);
            if (marker.comment.substr(0, 2) === "T:") {
                if (tags.length === 0) {
                    composition.markerProperty.removeKey(i);
                    return;
                }
                if (marker.comment === ("T:" + tags.join(","))) {
                    return;
                }
                var markerValue_1 = new MarkerValue("T:" + tags.join(","));
                markers.setValueAtTime(markers.keyTime(i), markerValue_1);
                return;
            }
        }
        if (tags.length === 0) {
            return;
        }
        var markerValue = new MarkerValue("T:" + tags.join(","));
        markers.setValueAtTime(-98, markerValue);
    }

    function compositionGetTagsAndFocusState(composition) {
        var allTags = [];
        var tagCounts = {};
        var isFocused = false;
        var markers = composition.markerProperty;
        for (var i = 1; i <= markers.numKeys; i += 1) {
            var marker = markers.keyValue(i);
            if (marker.comment.indexOf("FOCUSED") > -1) {
                isFocused = true;
            }
            if (marker.comment.substr(0, 2) === "T:") {
                var tags = marker.comment.substr(2).split(",");
                tags.forEach(function(tag) {
                    var _a = __read(tag.split(";"), 2);
                    var tagName = _a[0];
                    var count = _a[1];
                    allTags.push(tagName);
                    tagCounts[tagName] = Number(count);
                });
            }
        }
        return [allTags, isFocused, tagCounts];
    }
    exports.compositionGetTagsAndFocusState = compositionGetTagsAndFocusState;

    function layerGetTags(layer) {
        var result = [];
        layerGetMarkers(layer).forEach(function(value) {
            if (value.substr(0, 2) === "F:") {
                result = result.concat(value.substr(2).split(",").filter(function(t) {
                    return t !== "";
                }));
            }
        });
        return result;
    }

    function layerHasAnyTag(layer, tags) {
        var layerTags = layerGetTags(layer);
        for (var i = 0; i < layerTags.length; i += 1) {
            if (tags.indexOf(layerTags[i]) > -1) {
                return true;
            }
        }
        return false;
    }

    function layerEnsureTags(layer, tags) {
        var markers = layer.property("Marker");
        var updatedMarker = false;
        var _loop_1 = function(i) {
            var marker = markers.keyValue(i);
            if (marker.comment.substr(0, 2) === "F:") {
                var value_1 = marker.comment.substr(2).split(",");
                tags.forEach(function(tag) {
                    if (value_1.indexOf(tag) === -1) {
                        value_1.push(tag);
                    }
                });
                var markerValue = new MarkerValue("F:" + value_1.join(","));
                markers.setValueAtTime(markers.keyTime(i), markerValue);
                updatedMarker = true;
            }
        };
        for (var i = 1; i <= markers.numKeys; i += 1) {
            _loop_1(i);
        }
        if (!updatedMarker) {
            var markerValue = new MarkerValue("F:" + tags.join(","));
            markers.setValueAtTime(-399, markerValue);
        }
    }

    function layerGetMarkers(layer) {
        var result = [];
        var markers = layer.property("Marker");
        for (var i = 1; i <= markers.numKeys; i += 1) {
            var marker = markers.keyValue(i);
            result.push(marker.comment);
        }
        return result;
    }

    function layerReplaceTags(layer, tags) {
        var markers = layer.property("Marker");
        for (var i = 1; i <= markers.numKeys; i += 1) {
            var marker = markers.keyValue(i);
            if (marker.comment.substr(0, 2) === "F:") {
                if (tags.length === 0) {
                    markers.removeKey(i);
                    return;
                }
                var markerValue_2 = new MarkerValue("F:" + tags.join(","));
                markers.setValueAtTime(markers.keyTime(i), markerValue_2);
                return;
            }
        }
        if (tags.length === 0) {
            return;
        }
        var markerValue = new MarkerValue("F:" + tags.join(","));
        markers.setValueAtTime(-399, markerValue);
    }

    function layerRemoveTags(layer, tags) {
        var layerTags = layerGetTags(layer);
        var filteredTags = layerTags.filter(function(tag) {
            return tags.indexOf(tag) === -1;
        });
        layerReplaceTags(layer, filteredTags);
    }

    function indexTags(composition) {
        var tags = {};
        utils_1.layersToArray(composition.layers).forEach(function(layer) {
            layerGetTags(layer).forEach(function(tag) {
                tags[tag] = tags.hasOwnProperty(tag) ? tags[tag] + 1 : 1;
            });
        });
        var tagsAndCounts = Object.keys(tags).map(function(t) {
            return t + ";" + tags[t];
        });
        compositionEnsureTags(composition, tagsAndCounts);
    }

    function poll() {
        var composition = getComp();
        var result = {};
        var _a = __read(compositionGetTagsAndFocusState(composition), 3);
        var tags = _a[0];
        var isFocused = _a[1];
        var tagCounts = _a[2];
        result[composition.id] = {
            name: composition.name,
            isFocused: isFocused,
            isActive: composition === app.project.activeItem,
            selectedLayers: composition.selectedLayers.length,
            tagCounts: tagCounts,
            tags: tags
        };
        return JSON.stringify(result);
    }
    exports.poll = poll;

    function ensureState(layer) {
        var state = JSON.stringify([layer.locked, layer.shy, layer.enabled, layer.selected]);
        var markers = layer.property("Marker");
        for (var i = 1; i <= markers.numKeys; i += 1) {
            var marker = markers.keyValue(i);
            if (marker.comment.substr(0, 2) === "S:") {
                return;
            }
        }
        var markerValue = new MarkerValue("S:" + state);
        markers.setValueAtTime(-99, markerValue);
    }

    function getState(layer) {
        var markers = layer.property("Marker");
        for (var i = 1; i <= markers.numKeys; i += 1) {
            var marker = markers.keyValue(i);
            if (marker.comment.substr(0, 2) === "S:") {
                return JSON.parse(marker.comment.substr(2));
            }
        }
        return false;
    }

    function unfocus(composition, skipSelection) {
        if (skipSelection === void(0)) {
            skipSelection = false;
        }
        removeIndicator(composition);
        var state = [false];
        for (var i = 1; i <= composition.markerProperty.numKeys; i += 1) {
            var value = composition.markerProperty.keyValue(i);
            if (value.comment.indexOf("FOCUSED") > -1) {
                composition.markerProperty.removeKey(i);
            }
            if (value.comment.substr(0, 2) === "S:") {
                state = JSON.parse(value.comment.substr(2));
            }
        }
        var _a = __read(state, 1);
        var hideShyLayers = _a[0];
        composition.hideShyLayers = hideShyLayers;
        utils_1.layersToArray(composition.layers).forEach(function(layer) {
            var state = getState(layer);
            if (state !== false) {
                var _a = __read(state, 4);
                var locked = _a[0];
                var shy = _a[1];
                var enabled = _a[2];
                var selected = _a[3];
                layer.shy = shy;
                layer.enabled = enabled;
                layer.locked = locked;
                if (!skipSelection) {
                    layer.selected = selected;
                }
            }
            var markers = layer.property("Marker");
            for (var i = 1; i <= markers.numKeys; i += 1) {
                var marker = markers.keyValue(i);
                if (marker.comment.substr(0, 2) === "S:") {
                    markers.removeKey(i);
                }
            }
        });
    }

    function addIndicator(composition) {
        var indi_color1 = 0;
        var indi_color2 = 0.5686274766922;
        var indi_color3 = 0.91764706373215;
        var compositionWidth = composition.width;
        var focusIndicator_width = compositionWidth - (compositionWidth * 0.03960396);
        var focusIndicator_height = composition.height - (compositionWidth * 0.03960396);
        var focusIndicator_layer = composition.layers.addShape();
        focusIndicator_layer.name = "FOCUSED";
        var create_indicator = focusIndicator_layer.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        create_indicator.property("ADBE Vectors Group").addProperty("ADBE Vector Shape - Rect");
        create_indicator.property("ADBE Vectors Group").property("ADBE Vector Shape - Rect").property("ADBE Vector Rect Size").setValue([focusIndicator_width, focusIndicator_height]);
        create_indicator.property("ADBE Vectors Group").addProperty("ADBE Vector Graphic - Stroke");
        create_indicator.name = "Focus Display";
        focusIndicator_layer.property("ADBE Root Vectors Group")("ADBE Vector Group")("ADBE Vectors Group")("ADBE Vector Graphic - Stroke")("ADBE Vector Stroke Width").setValue(composition.width / 505);
        focusIndicator_layer.property("ADBE Root Vectors Group")("ADBE Vector Group")("ADBE Vectors Group")("ADBE Vector Graphic - Stroke")("ADBE Vector Stroke Color").setValue([indi_color1, indi_color2, indi_color3, 1]);
        focusIndicator_layer.guideLayer = true;
        focusIndicator_layer.shy = true;
        focusIndicator_layer.locked = true;
        focusIndicator_layer.selected = false;
    }

    function removeIndicator(composition) {
        if (composition.layer("FOCUSED")) {
            var indicatorLayer = composition.layer("FOCUSED");
            indicatorLayer.locked = false;
            indicatorLayer.remove();
        }
    }

    function layerHasSelectedParent(layer) {
        var search = layer;
        while (search) {
            if (search.selected === true) {
                return true;
            }
            search = search.parent;
        }
        return false;
    }

    function layerParentHasAnyTag(layer, tags) {
        var search = layer;
        while (search) {
            if (layerHasAnyTag(search, tags)) {
                return true;
            }
            search = search.parent;
        }
        return false;
    }

    function run(action) {
        if (action.type === "shy") {
            app.beginUndoGroup("Focus: Shy");
            var composition = getComp();
            if (composition.id !== action.compId) {
                return;
            }
            var layers = utils_1.layersToArray(composition.layers);
            var shy_1 = false;
            if (action.tags.length === 0) {
                var shyedLayers = composition.selectedLayers.filter(function(layer) {
                    return layer.shy;
                });
                shy_1 = composition.selectedLayers.length !== shyedLayers.length;
                composition.selectedLayers.forEach(function(layer) {
                    layer.shy = shy_1;
                });
                shy_1 = true;
            } else {
                var taggedLayers = layers.filter(function(layer) {
                    return layerHasAnyTag(layer, action.tags);
                });
                var shyedLayers = taggedLayers.filter(function(layer) {
                    return layer.shy;
                });
                shy_1 = taggedLayers.length !== shyedLayers.length;
                taggedLayers.forEach(function(layer) {
                    layer.shy = shy_1;
                });
                shy_1 = true;
            }
            composition.hideShyLayers = shy_1;
            app.endUndoGroup();
        }
        if (action.type === "visibility") {
            app.beginUndoGroup("Focus: Visibility");
            var composition = getComp();
            if (composition.id !== action.compId) {
                return;
            }
            var layers = utils_1.layersToArray(composition.layers);
            app.endUndoGroup();
        }
        if (action.type === "lock") {
            app.beginUndoGroup("Focus: Lock");
            var composition = getComp();
            if (composition.id !== action.compId) {
                return;
            }
            var layers = utils_1.layersToArray(composition.layers);
            var lock_1 = false;
            if (action.tags.length === 0) {
                var lockedLayers = composition.selectedLayers.filter(function(layer) {
                    return layer.locked;
                });
                lock_1 = composition.selectedLayers.length !== lockedLayers.length;
                composition.selectedLayers.forEach(function(layer) {
                    layer.locked = lock_1;
                });
            } else {
                var taggedLayers = layers.filter(function(layer) {
                    return layerHasAnyTag(layer, action.tags);
                });
                var lockedLayers = taggedLayers.filter(function(layer) {
                    return layer.locked;
                });
                lock_1 = taggedLayers.length !== lockedLayers.length;
                taggedLayers.forEach(function(layer) {
                    layer.locked = lock_1;
                });
            }
            app.endUndoGroup();
        }
        if (action.type === "enable") {
            app.beginUndoGroup("Focus: Enable");
            var composition = getComp();
            if (composition.id !== action.compId) {
                return;
            }
            var layers = utils_1.layersToArray(composition.layers);
            var enable_1 = false;
            if (action.tags.length === 0) {
                var enabledLayers = composition.selectedLayers.filter(function(layer) {
                    return layer.enabled;
                });
                enable_1 = composition.selectedLayers.length !== enabledLayers.length;
                composition.selectedLayers.forEach(function(layer) {
                    layer.enabled = enable_1;
                });
            } else {
                var taggedLayers = layers.filter(function(layer) {
                    return layerHasAnyTag(layer, action.tags);
                });
                var enabledLayers = taggedLayers.filter(function(layer) {
                    return layer.enabled;
                });
                enable_1 = taggedLayers.length !== enabledLayers.length;
                taggedLayers.forEach(function(layer) {
                    layer.enabled = enable_1;
                });
            }
            app.endUndoGroup();
        }
        if (action.type === "unfocus") {
            if (!action.skipUndo) {
                app.beginUndoGroup("Focus: Re-Focus");
            }
            getComp();
            utils_1.fast(function(composition) {
                unfocus(composition);
            });
            if (!action.skipUndo) {
                app.endUndoGroup();
            }
        }
        if (action.type === "select") {
            app.beginUndoGroup("Focus: Select");
            var composition = getComp();
            if (composition.id !== action.compId) {
                return;
            }
            var layers = utils_1.layersToArray(composition.layers);
            var select_1 = false;
            if (action.tags.length === 0) {

            } else {
                var taggedLayers = layers.filter(function(layer) {
                    return layerHasAnyTag(layer, action.tags);
                });
                var selectedLayers = taggedLayers.filter(function(layer) {
                    return layer.selected;
                });
                select_1 = taggedLayers.length !== selectedLayers.length;
                composition.selectedLayers.forEach(function(layer) {
                    var wasLocked = layer.locked;
                    if (wasLocked) {
                        layer.locked = false;
                    }
                    layer.selected = false;
                    if (wasLocked) {
                        layer.locked = true;
                    }
                });
                taggedLayers.forEach(function(layer) {
                    layer.selected = select_1;
                });
            }
            app.endUndoGroup();
        }
        if (action.type === "view") {
            app.beginUndoGroup("Focus: Focus");
            var compositions = getCompositionsArray();
            compositions.forEach(function(composition) {
                if (composition.id !== action.compId) {
                    return;
                }
                composition.openInViewer();
            });
            app.endUndoGroup();
        }
        if (action.type === "grab") {
            var composition = getComp();
            var layers = utils_1.layersToArray(composition.layers);
            var useSelection = action.tags.length === 0;
            var activeLayers = useSelection ? composition.selectedLayers : layers.filter(function(layer) {
                return layerHasAnyTag(layer, action.tags);
            });
            grab_1.runGrab(app.project.activeItem, activeLayers);
        }
        if (action.type === "focus") {
            app.beginUndoGroup("Focus: Focus");
            var comp = getComp();
            var useSelection_1 = action.tags.length === 0;
            var includeChildren_1 = action.includeChildren === true;
            utils_1.restoreSelectionAfter(function() {
                utils_1.fast(function(composition) {
                    if (composition.time < 0) {
                        composition.time = 0;
                    }
                    if (compositionIsFocused(composition)) {
                        unfocus(composition, true);
                    }
                    var focusedValue = new MarkerValue("FOCUSED -- " + !useSelection_1 ? "[ " + action.tags.join(", ").toUpperCase() + " ]" : "TO SELECTION");
                    composition.markerProperty.setValueAtTime(0.012345, focusedValue);
                    var stateValue = new MarkerValue("S:" + JSON.stringify([composition.hideShyLayers]));
                    composition.markerProperty.setValueAtTime(-99, stateValue);
                    var layers = utils_1.layersToArray(composition.layers);
                    layers.forEach(function(layer, i) {
                        var lastLayer = layers[i - 1];
                        var nextLayer = layers[i + 1];
                        ensureState(layer);
                        var layerWasLocked = layer.locked;
                        layer.locked = false;
                        var layerIsActive = false;
                        if (useSelection_1 && includeChildren_1) {
                            layerIsActive = layer.selected || layerHasSelectedParent(layer);
                        } else if (useSelection_1 && layer.selected) {
                            layerIsActive = true;
                        } else if (!useSelection_1 && includeChildren_1) {
                            layerIsActive = layerHasAnyTag(layer, action.tags) || layerParentHasAnyTag(layer, action.tags);
                        } else {
                            if (!useSelection_1 && layerHasAnyTag(layer, action.tags)) {
                                layerIsActive = true;
                            }
                        }
                        var layerIsTrackMatte = layer.enabled === false && nextLayer && nextLayer instanceof ShapeLayer && nextLayer.trackMatteType !== TrackMatteType.NO_TRACK_MATTE;
                        var layerHasTrackMatte = lastLayer && lastLayer.enabled === false && layer instanceof ShapeLayer && layer.trackMatteType !== TrackMatteType.NO_TRACK_MATTE;
                        if (layerIsActive) {
                            if (layerHasTrackMatte) {
                                enabled = true;
                                shy = false;
                            } else if (layerIsTrackMatte) {
                                enabled = false;
                                shy = false;
                            } else {
                                enabled = true;
                                shy = false;
                            }
                        } else {
                            if (action.mode === "viewer") {
                                enabled = false;
                                shy = false;
                            } else if (action.mode === "both") {
                                enabled = false;
                                shy = true;
                            } else {
                                if (layerHasTrackMatte) {
                                    enabled = true;
                                    shy = true;
                                } else if (layerIsTrackMatte) {
                                    enabled = false;
                                    shy = true;
                                } else {
                                    enabled = true;
                                    shy = true;
                                }
                            }
                        }
                        layer.enabled = layer.enabled === false ? false : enabled;
                        layer.shy = shy;
                        layer.locked = layerWasLocked;
                    });
                    composition.hideShyLayers = true;
                    if (action.focusIndicator) {
                        addIndicator(composition);
                    }
                });
            });
            app.endUndoGroup();
        }
        if (action.type === "tag") {
            app.beginUndoGroup("Focus: Tag");
            if (action.tags.length === 0) {
                return;
            }
            getComp();
            utils_1.fast(function(composition) {
                if (composition.selectedLayers.length > 0) {
                    composition.selectedLayers.forEach(function(selectedLayer) {
                        if (action.invert) {
                            layerRemoveTags(selectedLayer, action.tags);
                        } else {
                            layerEnsureTags(selectedLayer, action.tags);
                        }
                    });
                    indexTags(composition);
                }
            });
            app.endUndoGroup();
        }
        if (action.type === "renameTag") {
            app.beginUndoGroup("Focus: Rename tag");
            var composition = getComp();
            var layers = utils_1.layersToArray(composition.layers);
            layers.forEach(function(layer) {
                if (layerHasAnyTag(layer, [action.oldName])) {
                    layerRemoveTags(layer, [action.oldName]);
                    layerEnsureTags(layer, [action.newName]);
                }
            });
            indexTags(composition);
            app.endUndoGroup();
        }
        if (action.type === "trashTag") {
            app.beginUndoGroup("Focus: Trash tag");
            if (action.tags.length === 0) {
                return;
            }
            var composition = getComp();
            if (composition.id !== action.compId) {
                return;
            }
            var layers = utils_1.layersToArray(composition.layers);
            layers.forEach(function(layer) {
                layerRemoveTags(layer, action.tags);
            });
            indexTags(composition);
            app.endUndoGroup();
        }
        if (action.type === "reindex") {
            try {
                var composition = getComp();
                indexTags(composition);
            } catch (err) {

            }
        }
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    var __read = this && this.__read || function(o, n) {
            var m = typeof Symbol === "function" && o[Symbol.iterator];
            if (!m) {
                return o;
            }
            var i = m.call(o);
            var ar = [];
            try {
                while (n === void(0) || n-- > 0 && !r = i.next().done) {
                    ar.push(r.value)
                }
            } catch (error) {
                e = {
                    error: error
                };
            } finally {
                try {
                    if (r && !r.done && m = i.
                    return) {
                        m.call(i)
                    }
                } finally {
                    if (e) {
                        throw e.error
                    }
                }
            }
            return ar;
        };
    var __spread = this && this.__spread || function() {
            for (var ar = [],
            var i = 0; i < arguments.length; i++) {
                ar = ar.concat(__read(arguments[i]))
            }
            return ar;
        };
    exports.__esModule = true;
    __webpack_require__(12);
    var easein = __webpack_require__(7);
    var easeout = __webpack_require__(8);
    var easepick = __webpack_require__(17);
    var easyease = __webpack_require__(18);
    var blend = __webpack_require__(19);
    var burst = __webpack_require__(21);
    var excite = __webpack_require__(22);
    var forcefield = __webpack_require__(23);
    var jump = __webpack_require__(24);
    var orbit = __webpack_require__(25);
    var spin = __webpack_require__(26);
    var stare = __webpack_require__(27);
    var warp = __webpack_require__(28);
    var anchor = __webpack_require__(29);
    var clone = __webpack_require__(30);
    var guides = __webpack_require__(31);
    var name = __webpack_require__(32);
    var nulllayer = __webpack_require__(33);
    var sort = __webpack_require__(34);
    var trash = __webpack_require__(35);
    var vignette = __webpack_require__(36);
    var falloff = __webpack_require__(37);
    var proxy = __webpack_require__(38);
    var camera = __webpack_require__(39);
    var adjrename = __webpack_require__(40);
    var flip = __webpack_require__(41);
    var capture = __webpack_require__(42);
    var lock = __webpack_require__(43);
    var pathtomask = __webpack_require__(44);
    var grab = __webpack_require__(9);
    var morph = __webpack_require__(45);
    var texture = __webpack_require__(46);
    var parent = __webpack_require__(47);
    var breakTool = __webpack_require__(48);
    var trim = __webpack_require__(49);
    var reverse = __webpack_require__(50);
    var tracer = __webpack_require__(51);
    var dynamics = __webpack_require__(52);
    var rope = __webpack_require__(53);
    var midas = __webpack_require__(6);
    var echo = __webpack_require__(54);
    var cloth = __webpack_require__(55);
    var animo = __webpack_require__(56);
    var vectorbreak = __webpack_require__(57);
    var vectorcombine = __webpack_require__(58);
    var pinplus = __webpack_require__(59);
    var focus = __webpack_require__(10);
    var stagger = __webpack_require__(61);
    var utils_1 = __webpack_require__(1);
    var focus_1 = __webpack_require__(10);

    function getComp() {
        var composition = app.project.activeItem;
        if (composition === null || !(composition instanceof CompItem)) {
            throw new Error("No Composition")
        }
        return composition;
    }

    function findProperties(layerOrPropertyGroup, matchName) {
        var results = [];
        for (var i = 1; i <= layerOrPropertyGroup.numProperties; i += 1) {
            var propertyGroup = layerOrPropertyGroup.property(i);
            if (propertyGroup instanceof PropertyGroup) {
                results = results.concat(findProperties(propertyGroup, matchName));
            } else {
                if (propertyGroup instanceof Property) {
                    if (propertyGroup.matchName === matchName) {
                        results.push(propertyGroup);
                    }
                }
            }
        }
        return results;
    }

    function findFirstProperty(layerOrPropertyGroup, matchName) {
        for (var i = 1; i <= layerOrPropertyGroup.numProperties; i += 1) {
            var propertyGroup = layerOrPropertyGroup.property(i);
            if (propertyGroup instanceof Property) {
                if (propertyGroup.matchName === matchName) {
                    return propertyGroup;
                }
            }
            if (propertyGroup instanceof PropertyGroup) {
                var findInChildren = findFirstProperty(propertyGroup, matchName);
                if (findInChildren !== null) {
                    return findInChildren;
                }
            }
        }
        return null;
    }

    function findPropertyWithColors(propertyGroup) {
        var search = propertyGroup;
        var selectedProperties = [];
        for (var i = propertyGroup.numProperties; i > 0; i--) {
            var property = propertyGroup.property(i);
            if (property.selected === true) {
                selectedProperties.push(property);
            }
        }
        if (selectedProperties.length > 0) {
            search = selectedProperties[0];
        }
        while (search.property("ADBE Vector Group") || search.property("ADBE Vectors Group")) {
            var newSearch = void(0);
            if (search.property("ADBE Vectors Group")) {
                newSearch = search.property("ADBE Vectors Group");
            } else {
                newSearch = search.property("ADBE Vector Group");
            }
            if (newSearch === null) {
                return search;
            } else {
                search = newSearch;
            }
        }
        return search;
    }

    function setFillColorOnLayer(layer, color, onlySelected, enabled) {
        if (onlySelected === void(0)) {
            onlySelected = false;
        }
        if (enabled === void(0)) {
            enabled = true;
        }
        if (layer instanceof ShapeLayer) {
            var fills = findProperties(layer.property("ADBE Root Vectors Group"), "ADBE Vector Fill Color");
            if (fills.length === 0) {
                var rootVectorsGroups = layer.property("ADBE Root Vectors Group");
                var vectorGroup = rootVectorsGroups.property("ADBE Vector Group");
                var vectorsGroup = vectorGroup.property("ADBE Vectors Group");
                var stroke = vectorsGroup.addProperty("ADBE Vector Graphic - Fill");
                stroke.name = "Fill 1";
                fills.push(stroke.property("ADBE Vector Fill Color"));
            }
            var allFillsAreDeselected_1 = fills.filter(function(property) {
                return property.parentProperty.parentProperty.parentProperty.selected === false;
            }).length === fills.length;
            fills.forEach(function(property) {
                if (onlySelected && !allFillsAreDeselected_1 && !property.parentProperty.parentProperty.parentProperty.selected) {
                    return;
                }
                property.parentProperty.enabled = enabled;
                if (property.numKeys > 0) {
                    property.setValueAtTime(layer.containingComp.time, color);
                } else {
                    property.setValue(color);
                }
            });
            var opacities = findProperties(layer.property("ADBE Root Vectors Group"), "ADBE Vector Fill Opacity");
            opacities.forEach(function(property) {
                if (onlySelected && !allFillsAreDeselected_1 && !property.parentProperty.parentProperty.parentProperty.selected) {
                    return;
                }
                property.setValue(Math.round(color[3] * 100));
            });
        } else if (layer instanceof TextLayer) {
            var textProperty = layer.property("ADBE Text Properties").property("ADBE Text Document");
            var textDocument = textProperty.value;
            textDocument.applyFill = true;
            textDocument.fillColor = [color[0], color[1], color[2]];
            textProperty.setValue(textDocument);
            layer.property("ADBE Transform Group").property("ADBE Opacity").setValue(Math.round(color[3] * 100));
        } else {
            if (layer instanceof AVLayer) {
                var layerFill = layer.property("ADBE Effect Parade").property("ADBE Fill");
                if (layerFill && layerFill.property("ADBE Fill-0002")) {
                    if (layerFill.property("ADBE Fill-0002").numKeys > 0) {
                        layerFill.property("ADBE Fill-0002").setValueAtTime(layer.containingComp.time, [color[0], color[1], color[2]]);
                    } else {
                        layerFill.property("ADBE Fill-0002").setValue([color[0], color[1], color[2]]);
                    }
                    layerFill.property("ADBE Fill-0005").setValue(color[3]);
                } else {
                    var newSolid = app.project.activeItem.layers.addSolid([color[0], color[1], color[2]], "MOTION_COLOR_SOLID", layer.width, layer.height, layer.containingComp.pixelAspect, layer.containingComp.duration);
                    var newSolidItem = app.project.itemByName("MOTION_COLOR_SOLID");
                    newSolidItem.name = layer.name;
                    layer.replaceSource(newSolidItem, true);
                    newSolid.remove();
                    app.beginSuppressDialogs();
                    app.executeCommand(2109);
                    app.endSuppressDialogs(false);
                    layer.selected = true;
                }
            }
        }
    }

    function setStrokeColorOnLayer(layer, color, onlySelected, enabled) {
        if (onlySelected === void(0)) {
            onlySelected = false;
        }
        if (enabled === void(0)) {
            enabled = true;
        }
        if (layer instanceof ShapeLayer) {
            var strokes = findProperties(layer.property("ADBE Root Vectors Group"), "ADBE Vector Stroke Color");
            if (strokes.length === 0) {
                var rootVectorsGroups = layer.property("ADBE Root Vectors Group");
                var vectorGroup = rootVectorsGroups.property("ADBE Vector Group");
                var vectorsGroup = vectorGroup.property("ADBE Vectors Group");
                var stroke = vectorsGroup.addProperty("ADBE Vector Graphic - Stroke");
                stroke.name = "Stroke 1";
                strokes.push(stroke.property("ADBE Vector Stroke Color"));
            }
            var allStrokesAreDeselected_1 = strokes.filter(function(property) {
                return property.parentProperty.parentProperty.parentProperty.selected === false;
            }).length === strokes.length;
            strokes.forEach(function(property) {
                if (onlySelected && !allStrokesAreDeselected_1 && !property.parentProperty.parentProperty.parentProperty.selected) {
                    return;
                }
                property.parentProperty.enabled = enabled;
                if (property.numKeys > 0) {
                    property.setValueAtTime(layer.containingComp.time, color);
                } else {
                    property.setValue(color);
                }
            });
            var opacities = findProperties(layer.property("ADBE Root Vectors Group"), "ADBE Vector Stroke Opacity");
            opacities.forEach(function(property) {
                if (onlySelected && !allStrokesAreDeselected_1 && !property.parentProperty.parentProperty.parentProperty.selected) {
                    return;
                }
                property.setValue(Math.round(color[3] * 100));
            });
        } else {
            if (layer instanceof TextLayer) {
                var textProperty = layer.property("ADBE Text Properties").property("ADBE Text Document");
                var textDocument = textProperty.value;
                textDocument.applyStroke = true;
                textDocument.strokeColor = [color[0], color[1], color[2]];
                textProperty.setValue(textDocument);
                layer.property("ADBE Transform Group").property("ADBE Opacity").setValue(Math.round(color[3] * 100));
            }
        }
    }
    $.global["com.mtmograph.motion-next"] = {
        adjrename: adjrename,
        anchor: anchor,
        camera: camera,
        capture: capture,
        excite: excite,
        flipv: {
            run: function(meta) {
                return flip.run(1, meta);
            },
            check: flip.check
        },
        fliph: {
            run: function(meta) {
                return flip.run(0, meta);
            },
            check: flip.check
        },
        blend: blend,
        breakTool: breakTool,
        burst: burst,
        clone: clone,
        grab: grab,
        morph: morph,
        jump: jump,
        lock: lock,
        name: name,
        nulllayer: nulllayer,
        orbit: orbit,
        rope: rope,
        warp: warp,
        spin: spin,
        stare: stare,
        pinplus: pinplus,
        sort: sort,
        trash: trash,
        vignette: vignette,
        easein: easein,
        easeout: easeout,
        easepick: easepick,
        easyease: easyease,
        guides: guides,
        forcefield: forcefield,
        falloff: falloff,
        proxy: proxy,
        pathtomask: pathtomask,
        focus: focus,
        stagger: stagger,
        texture: texture,
        midas: midas,
        echo: echo,
        cloth: cloth,
        animo: animo,
        parent: parent,
        trim: trim,
        reverse: reverse,
        tracer: tracer,
        dynamics: dynamics,
        vectorbreak: vectorbreak,
        vectorcombine: vectorcombine,
        swapFillAndStroke: {
            run: function(fill, stroke) {
                app.beginUndoGroup("Swap fill and stroke");
                utils_1.fast(function(composition) {
                    if (composition && composition instanceof CompItem) {
                        composition.selectedLayers.forEach(function(layer) {
                            if (layer instanceof ShapeLayer) {
                                var propWithColors = findPropertyWithColors(layer.property("ADBE Root Vectors Group"));
                                var fillProp = propWithColors.property("ADBE Vector Graphic - Fill").property("ADBE Vector Fill Color");
                                var strokeProp = propWithColors.property("ADBE Vector Graphic - Stroke").property("ADBE Vector Stroke Color");
                                var fillEnabled = fillProp.parentProperty.enabled;
                                var strokeEnabled = strokeProp.parentProperty.enabled;
                                var strokeValue = strokeProp.value;
                                var fillValue = fillProp.value;
                                setFillColorOnLayer(layer, strokeValue, true, strokeEnabled);
                                setStrokeColorOnLayer(layer, fillValue, true, fillEnabled);
                            } else if (layer instanceof TextLayer) {
                                var textProperty = layer.property("ADBE Text Properties").property("ADBE Text Document");
                                var textDocument = textProperty.value;
                                var fillEnabled = textDocument.applyFill;
                                var strokeEnabled = textDocument.applyStroke;
                                textDocument.applyFill = true;
                                textDocument.applyStroke = true;
                                textProperty.setValue(textDocument);
                                textDocument = textProperty.value;
                                var strokeValue = __spread(textDocument.strokeColor, [1]);
                                var fillValue = __spread(textDocument.fillColor, [1]);
                                setFillColorOnLayer(layer, strokeValue);
                                setStrokeColorOnLayer(layer, fillValue);
                                textDocument = textProperty.value;
                                textDocument.applyFill = strokeEnabled;
                                textDocument.applyStroke = fillEnabled;
                                textProperty.setValue(textDocument);
                            } else {
                                setFillColorOnLayer(layer, stroke);
                                setStrokeColorOnLayer(layer, fill);
                            }
                        });
                    }
                }, app.project.activeItem instanceof CompItem && app.project.activeItem.selectedLayers.length < 6);
                app.endUndoGroup();
            }
        },
        disableStrokeOrFill: {
            run: function(type) {
                var composition = app.project.activeItem;
                if (composition && composition instanceof CompItem) {
                    if (composition.selectedLayers.length > 0) {
                        app.beginUndoGroup("Disable stroke or fill");
                        composition.selectedLayers.map(function(layer) {
                            if (layer instanceof ShapeLayer) {
                                if (type === "fill") {
                                    var fills = findProperties(layer.property("ADBE Root Vectors Group"), "ADBE Vector Fill Color");
                                    var allFillsAreDeselected_2 = fills.filter(function(property) {
                                        return property.parentProperty.parentProperty.parentProperty.selected === false;
                                    }).length === fills.length;
                                    fills.forEach(function(property) {
                                        if (!allFillsAreDeselected_2 && !property.parentProperty.parentProperty.parentProperty.selected) {
                                            return;
                                        }
                                        property.parentProperty.enabled = false;
                                    });
                                } else {
                                    var strokes = findProperties(layer.property("ADBE Root Vectors Group"), "ADBE Vector Stroke Color");
                                    var allStrokesAreDeselected_2 = strokes.filter(function(property) {
                                        return property.parentProperty.parentProperty.parentProperty.selected === false;
                                    }).length === strokes.length;
                                    strokes.forEach(function(property) {
                                        if (!allStrokesAreDeselected_2 && !property.parentProperty.parentProperty.parentProperty.selected) {
                                            return;
                                        }
                                        property.parentProperty.enabled = false;
                                    });
                                }
                            } else {
                                if (layer instanceof TextLayer) {
                                    var textProperty = layer.property("ADBE Text Properties").property("ADBE Text Document");
                                    var textDocument = textProperty.value;
                                    if (type === "fill") {
                                        textDocument.applyFill = false;
                                    } else {
                                        textDocument.applyStroke = false;
                                    }
                                    textProperty.setValue(textDocument);
                                }
                            }
                        });
                        app.endUndoGroup();
                    }
                }
            }
        },
        setFillColor: {
            run: function(color, skipUndoGroup) {
                if (skipUndoGroup === void(0)) {
                    skipUndoGroup = false;
                }
                var composition = app.project.activeItem;
                if (composition && composition instanceof CompItem) {
                    if (!skipUndoGroup) {
                        app.beginUndoGroup("Set fill color");
                    }
                    if (composition.selectedLayers.length > 0) {
                        composition.selectedLayers.map(function(layer) {
                            setFillColorOnLayer(layer, color, true);
                        });
                    } else {
                        if (app.activeViewer.views[0]) {
                            app.activeViewer.views[0].options.checkerboards = false;
                        }
                        composition.bgColor = [color[0], color[1], color[2]];
                    }
                    if (!skipUndoGroup) {
                        app.endUndoGroup();
                    }
                }
            }
        },
        setStrokeColor: {
            run: function(color, skipUndoGroup) {
                if (skipUndoGroup === void(0)) {
                    skipUndoGroup = false;
                }
                var composition = app.project.activeItem;
                if (composition && composition instanceof CompItem) {
                    if (!skipUndoGroup) {
                        app.beginUndoGroup("Set stroke color");
                    }
                    if (composition.selectedLayers.length > 0) {
                        composition.selectedLayers.map(function(layer) {
                            setStrokeColorOnLayer(layer, color, true);
                        });
                    }
                    if (!skipUndoGroup) {
                        app.endUndoGroup();
                    }
                }
            }
        },
        renameComp: {
            run: function(name) {
                var composition = app.project.activeItem;
                if (composition && composition instanceof CompItem) {
                    app.beginUndoGroup("Rename comp");
                    if (composition.selectedLayers.length === 0) {
                        composition.name = name;
                    }
                    if (composition.selectedLayers.length === 1) {
                        composition.selectedLayers[0].name = name;
                    }
                    app.endUndoGroup();
                }
            }
        },
        setFrameRate: {
            run: function(fps) {
                var composition = app.project.activeItem;
                if (composition && composition instanceof CompItem) {
                    composition.frameRate = fps;
                }
            }
        },
        setStrokeWidth: {
            run: function(strokeWidth) {
                app.beginUndoGroup("Set stroke width");
                var comp = getComp();
                utils_1.fast(function(composition) {
                    if (composition.selectedLayers.length > 0) {
                        composition.selectedLayers.map(function(layer) {
                            if (layer instanceof ShapeLayer) {
                                var strokeWidths = findProperties(layer.property("ADBE Root Vectors Group"), "ADBE Vector Stroke Width");
                                var allStrokesAreDeselected_3 = strokeWidths.filter(function(property) {
                                    return property.parentProperty.parentProperty.parentProperty.selected === false;
                                }).length === strokeWidths.length;
                                strokeWidths.forEach(function(property) {
                                    if (!allStrokesAreDeselected_3 && !property.parentProperty.parentProperty.parentProperty.selected) {
                                        return;
                                    }
                                    if (property.numKeys > 0) {
                                        property.parentProperty.enabled = true;
                                        property.setValueAtTime(composition.time, strokeWidth);
                                    } else {
                                        property.parentProperty.enabled = true;
                                        property.setValue(strokeWidth);
                                    }
                                });
                                if (strokeWidths.length === 0) {
                                    var rootVectorsGroups = layer.property("ADBE Root Vectors Group");
                                    var vectorGroup = rootVectorsGroups.property("ADBE Vector Group");
                                    var vectorsGroup = vectorGroup.property("ADBE Vectors Group");
                                    var stroke = vectorsGroup.addProperty("ADBE Vector Graphic - Stroke");
                                    stroke.name = "Stroke 1";
                                    stroke.property("ADBE Vector Stroke Width").setValue(strokeWidth);
                                }
                            } else {
                                if (layer instanceof TextLayer) {
                                    var textProperty = layer.property("ADBE Text Properties").property("ADBE Text Document");
                                    var textDocument = textProperty.value;
                                    textDocument.applyStroke = true;
                                    textDocument.strokeWidth = strokeWidth;
                                    textProperty.setValue(textDocument);
                                }
                            }
                        });
                    }
                }, comp instanceof CompItem && comp.selectedLayers.length < 10);
                app.endUndoGroup();
            }
        },
        setDuration: {
            run: function(duration) {
                var composition = app.project.activeItem;
                if (composition && composition instanceof CompItem) {
                    app.beginUndoGroup("Set Duration");
                    composition.duration = duration;
                    composition.workAreaStart = 0;
                    composition.workAreaDuration = duration;
                    app.endUndoGroup();
                }
            }
        },
        getColors: {
            run: function() {
                var composition = app.project.activeItem;
                var allFills = [];
                if (composition && composition instanceof CompItem) {
                    composition.selectedLayers.forEach(function(layer) {
                        if (layer instanceof ShapeLayer) {
                            var propWithColors = findPropertyWithColors(layer.property("ADBE Root Vectors Group"));
                            var fills = findProperties(propWithColors, "ADBE Vector Fill Color");
                            fills.forEach(function(fill) {
                                return allFills.push([fill.value[0], fill.value[1], fill.value[2]]);
                            });
                            var strokes = findProperties(propWithColors, "ADBE Vector Stroke Color");
                            strokes.forEach(function(stroke) {
                                return allFills.push([stroke.value[0], stroke.value[1], stroke.value[2]]);
                            });
                        } else if (layer instanceof TextLayer && app.project.toolType && app.project.toolType !== ToolType.Tool_TextH && app.project.toolType !== ToolType.Tool_TextV) {
                            try {
                                var textDocument = layer.property("ADBE Text Properties").property("ADBE Text Document").value;
                                if (textDocument.fillColor) {
                                    allFills.push(textDocument.fillColor);
                                }
                                if (textDocument.strokeColor) {
                                    allFills.push(textDocument.strokeColor);
                                }
                            } catch (err) {

                            }
                        } else {
                            if (layer instanceof AVLayer && layer.source.mainSource instanceof SolidSource && !layer.nullLayer) {
                                try {
                                    var fill = layer.source.mainSource.color;
                                    allFills.push(fill);
                                } catch (err) {

                                }
                            }
                        }
                        if (layer.property("ADBE Effect Parade").property("ADBE Fill")) {
                            try {
                                var layerFill = layer.property("ADBE Effect Parade").property("ADBE Fill").property("ADBE Fill-0002").value;
                                allFills.push(layerFill);
                            } catch (err) {

                            }
                        }
                    });
                }
                return JSON.stringify(allFills);
            }
        },
        getInfo: {
            run: function() {
                var composition = app.project.activeItem;
                if (composition && composition instanceof CompItem) {
                    if (composition.selectedLayers.length > 0) {
                        var firstLayer = composition.selectedLayers[0];
                        var layerCount = composition.selectedLayers.length;
                        var layerName = firstLayer.name;
                        var layerFill = void(0);
                        var layerStroke = void(0);
                        var layerStrokeWidth = void(0);
                        var layerFillEnabled = true;
                        var layerStrokeEnabled = true;
                        var isSupported = false;
                        if (firstLayer instanceof ShapeLayer) {
                            isSupported = true;
                            var propWithColors = findPropertyWithColors(firstLayer.property("ADBE Root Vectors Group"));
                            var fillProp = propWithColors.property("ADBE Vector Graphic - Fill");
                            if (fillProp) {
                                var fill = fillProp.property("ADBE Vector Fill Color").value;
                                var fillOpacity = findFirstProperty(firstLayer.property("ADBE Root Vectors Group"), "ADBE Vector Fill Opacity").value;
                                layerFill = [fill[0], fill[1], fill[2], fillOpacity / 100];
                                if (fillProp.enabled === false) {
                                    layerFillEnabled = false;
                                }
                            } else {
                                layerFill = null;
                            }
                            var strokeProp = propWithColors.property("ADBE Vector Graphic - Stroke");
                            if (strokeProp) {
                                var stroke = strokeProp.property("ADBE Vector Stroke Color").value;
                                if (strokeProp.enabled === false) {
                                    layerStrokeEnabled = false;
                                }
                                var strokeWidth = strokeProp.property("ADBE Vector Stroke Width").value;
                                var strokeOpacity = strokeProp.property("ADBE Vector Stroke Opacity").value;
                                layerStroke = [stroke[0], stroke[1], stroke[2], strokeOpacity / 100];
                                if (strokeWidth) {
                                    layerStrokeWidth = strokeWidth;
                                }
                            } else {
                                layerStroke = null;
                            }
                        }
                        if (firstLayer instanceof TextLayer && app.project.toolType && app.project.toolType !== ToolType.Tool_TextH && app.project.toolType !== ToolType.Tool_TextV) {
                            isSupported = true;
                            var textDocument = firstLayer.property("ADBE Text Properties").property("ADBE Text Document").value;
                            var opacity = firstLayer.property("ADBE Transform Group").property("ADBE Opacity").value;
                            layerFillEnabled = textDocument.applyFill;
                            layerStrokeEnabled = textDocument.applyStroke;
                            try {
                                var fill = textDocument.fillColor;
                                layerFill = [fill[0], fill[1], fill[2], opacity / 100];
                            } catch (err) {
                                layerFill = [1, 1, 1, 1];
                            }
                            try {
                                var stroke = textDocument.strokeColor;
                                var strokeWidth = textDocument.strokeWidth;
                                layerStroke = [stroke[0], stroke[1], stroke[2], opacity / 100];
                                layerStrokeWidth = strokeWidth;
                            } catch (err) {
                                layerStroke = [1, 1, 1, 1];
                            }
                        }
                        if (firstLayer instanceof AVLayer && firstLayer.source.mainSource instanceof SolidSource && !firstLayer.nullLayer) {
                            var opacity = firstLayer.property("ADBE Transform Group").property("ADBE Opacity").value;
                            var fill = firstLayer.source.mainSource.color;
                            return JSON.stringify({
                                type: "comp",
                                focus: focus_1.compositionGetTagsAndFocusState(composition),
                                name: firstLayer.name,
                                duration: composition.duration,
                                frameRate: composition.frameRate,
                                time: composition.time,
                                displayStartTime: composition.displayStartTime,
                                workAreaStart: composition.workAreaStart,
                                workAreaDuration: composition.workAreaDuration,
                                width: composition.width,
                                height: composition.height,
                                bgColor: [fill[0], fill[1], fill[2], opacity / 100],
                                layerName: layerName,
                                layerCount: layerCount,
                                layerFill: layerFill,
                                layerStroke: layerStroke,
                                layerStrokeWidth: layerStrokeWidth,
                                layerStrokeEnabled: layerStrokeEnabled,
                                layerFillEnabled: layerFillEnabled
                            });
                        } else {
                            if (firstLayer instanceof AVLayer && firstLayer.property("ADBE Effect Parade").property("ADBE Fill")) {
                                var layerFill_1 = firstLayer.property("ADBE Effect Parade").property("ADBE Fill").property("ADBE Fill-0002").value;
                                return JSON.stringify({
                                    type: "filleffect",
                                    focus: focus_1.compositionGetTagsAndFocusState(composition),
                                    name: firstLayer.name,
                                    duration: composition.duration,
                                    frameRate: composition.frameRate,
                                    time: composition.time,
                                    width: composition.width,
                                    height: composition.height,
                                    displayStartTime: composition.displayStartTime,
                                    workAreaStart: composition.workAreaStart,
                                    workAreaDuration: composition.workAreaDuration,
                                    bgColor: composition.bgColor,
                                    layerName: layerName,
                                    layerCount: layerCount,
                                    layerFill: layerFill_1,
                                    layerStroke: layerStroke,
                                    layerStrokeWidth: layerStrokeWidth,
                                    layerStrokeEnabled: layerStrokeEnabled,
                                    layerFillEnabled: layerFillEnabled
                                });
                            }
                        }
                        return JSON.stringify({
                            type: isSupported ? "layer" : "unsupported-layer",
                            focus: focus_1.compositionGetTagsAndFocusState(composition),
                            name: composition.name,
                            duration: composition.duration,
                            frameRate: composition.frameRate,
                            bgColor: composition.bgColor,
                            time: composition.time,
                            displayStartTime: composition.displayStartTime,
                            workAreaStart: composition.workAreaStart,
                            workAreaDuration: composition.workAreaDuration,
                            width: composition.width,
                            height: composition.height,
                            layerName: layerName,
                            layerCount: layerCount,
                            layerFill: layerFill,
                            layerStroke: layerStroke,
                            layerStrokeWidth: layerStrokeWidth,
                            layerStrokeEnabled: layerStrokeEnabled,
                            layerFillEnabled: layerFillEnabled,
                            needsSelectionTool: firstLayer instanceof TextLayer && app.project.toolType === ToolType.Tool_TextH || app.project.toolType === ToolType.Tool_TextV
                        });
                    }
                    var bgColor = composition.bgColor;
                    var isOpaque = false;
                    if (app.activeViewer && app.activeViewer.type === ViewerType.VIEWER_COMPOSITION && app.activeViewer.views[0]) {
                        isOpaque = app.activeViewer.views[0].options.checkerboards;
                    }
                    return JSON.stringify({
                        type: "comp",
                        focus: focus_1.compositionGetTagsAndFocusState(composition),
                        name: composition.name,
                        duration: composition.duration,
                        frameRate: composition.frameRate,
                        width: composition.width,
                        height: composition.height,
                        time: composition.time,
                        displayStartTime: composition.displayStartTime,
                        workAreaStart: composition.workAreaStart,
                        workAreaDuration: composition.workAreaDuration,
                        bgColor: [bgColor[0], bgColor[1], bgColor[2], 1],
                        isOpaque: isOpaque
                    });
                }
                return JSON.stringify({});
            }
        }
    };
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    __webpack_require__(13);
    __webpack_require__(14);
    __webpack_require__(15);
    __webpack_require__(16);
}, function(module, exports) {
    ItemCollection.prototype.forEach = function(cb) {
        for (var i = this.length; i > 0; i--) {
            cb(this["" + i], i, this);
        }
    };
    ItemCollection.prototype.map = function(cb) {
        var results = [];
        for (var i = this.length; i > 0; i--) {
            results.push(cb(this["" + i], i, this));
        }
        return results.reverse();
    };
    ItemCollection.prototype.filter = function(cb) {
        var results = [];
        this.forEach(function(item) {
            if (cb(item)) {
                results.push(item);
            }
        });
        return results;
    };
    ItemCollection.prototype.find = function(cb) {
        return this.filter(cb)[0];
    };
}, function(module, exports) {
    LayerCollection.prototype.forEach = function(cb) {
        for (var i = this.length; i > 0; i--) {
            cb(this[i], i - 1);
        }
    };
    LayerCollection.prototype.findByName = function(name) {
        for (var i = this.length; i > 0; i--) {
            if (this[i].name === name) {
                return this[i];
            }
        }
        return null;
    };
    LayerCollection.prototype.filter = function(matchFn) {
        var results = [];
        for (var i = this.length; i > 0; i--) {
            var layer = this[i];
            if (matchFn(layer)) {
                results.push(layer);
            }
        }
        return results;
    };
}, function(module, exports) {
    Project.prototype.itemByName = function(name) {
        for (var i = 1; i <= this.numItems; i += 1) {
            var item = this.item(i);
            if (item.name === name) {
                return item;
            }
        }
        return null;
    };
}, function(module, exports) {
    PropertyGroup.prototype.forEach = function(cb) {
        for (var i = this.numProperties; i > 0; i -= 1) {
            cb(this.property(i), i - 1, this);
        }
    };
    PropertyGroup.prototype.map = function(cb) {
        var result = [];
        for (var i = this.numProperties; i > 0; i -= 1) {
            result.push(cb(this.property(i), i - 1, this));
        }
        return result;
    };
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);
    var easeout_1 = __webpack_require__(8);
    var easein_1 = __webpack_require__(7);

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.HAS_SELECTED_KEYFRAMES);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run(easeOutVal, easeInVal, setKeyframeType) {
        if (setKeyframeType === void(0)) {
            setKeyframeType = false;
        }
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.HAS_SELECTED_KEYFRAMES);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        easeout_1.run(easeOutVal, setKeyframeType);
        easein_1.run(easeInVal, setKeyframeType);
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.HAS_SELECTED_KEYFRAMES);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run(number, setKeyframeType) {
        if (setKeyframeType === void(0)) {
            setKeyframeType = false;
        }
        if (number < 0.1) {
            number = 0.1;
        }
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.HAS_SELECTED_KEYFRAMES);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        app.beginUndoGroup("Easy Ease");
        var composition = app.project.activeItem;
        if (!composition || !(composition instanceof CompItem)) {
            return;
        }
        for (var i = 0; i < composition.selectedLayers.length; i += 1) {
            var selectedLayer = composition.selectedLayers[i];
            for (var j = 0; j < selectedLayer.selectedProperties.length; j += 1) {
                var selectedProperty = selectedLayer.selectedProperties[j];
                if (selectedProperty.canVaryOverTime) {
                    for (var k = 0; k < selectedProperty.selectedKeys.length; k += 1) {
                        if (setKeyframeType) {
                            selectedProperty.setInterpolationTypeAtKey(selectedProperty.selectedKeys[k], KeyframeInterpolationType.LINEAR);
                        } else {
                            var easeBoth = new KeyframeEase(0, number);
                            switch (selectedProperty.propertyValueType) {
                                case PropertyValueType.ThreeD:
                                    selectedProperty.setTemporalEaseAtKey(selectedProperty.selectedKeys[k], [easeBoth, easeBoth, easeBoth], [easeBoth, easeBoth, easeBoth]);
                                    break;
                                case PropertyValueType.TwoD:
                                    selectedProperty.setTemporalEaseAtKey(selectedProperty.selectedKeys[k], [easeBoth, easeBoth], [easeBoth, easeBoth]);
                                    break;
                                default:
                                    selectedProperty.setTemporalEaseAtKey(selectedProperty.selectedKeys[k], [easeBoth], [easeBoth]);
                                    break;
                            }
                        }
                    }
                }
            }
        }
        app.endUndoGroup();
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.test = exports.run = exports.check = void(0);
    var ffxMap_1 = __webpack_require__(2);
    var prereqs_1 = __webpack_require__(0);
    var utils_1 = __webpack_require__(1);

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.SELECTED_LAYER_HAS_SELECTED_PROPERTIES);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.SELECTED_LAYER_HAS_SELECTED_PROPERTIES);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        utils_1.loadEffects();
        app.beginUndoGroup("Blend");
        var selectedLayers = composition.selectedLayers;
        var layerPropertyGetters = selectedLayers.map(function(selectedLayer) {
            return {
                layer: selectedLayer,
                propertyGetters: selectedLayer.selectedProperties.filter(function(p) {
                    return p instanceof Property;
                }).map(utils_1.propertyToGetter)
            };
        });
        layerPropertyGetters.forEach(function(_a) {
            var selectedLayer = _a.layer;
            var propertyGetters = _a.propertyGetters;
            propertyGetters.forEach(function(pg) {
                var selectedProperty = pg(selectedLayer);
                var presetName = "";
                var parentName = "";
                try {
                    var firstParent = selectedProperty.parentProperty;
                    parentMatchName = firstParent.matchName;
                    parentName = firstParent.name;
                    currentName = selectedProperty.name;
                } catch (err) {

                }
                if (parentMatchName === "ADBE Transform Group") {
                    presetName = "Blend - " + currentName;
                } else {
                    presetName = "Blend - " + parentName + " - " + currentName;
                }
                if (presetName.length > 30) {
                    presetName = presetName.substr(0, 30);
                }
                var smoothExp = "_smoothness = effect(\"" + ffxMap_1.
                default.blend.pseudo + "\")(\"" + ffxMap_1.
                default.blend.smoothness + "\") / 20;\n" + "_precision = effect(\"" + ffxMap_1.
                default.blend.pseudo + "\")(\"" + ffxMap_1.
                default.blend.precision + "\");\n" + "_enable = effect(\"" + ffxMap_1.
                default.blend.pseudo + "\")(\"" + ffxMap_1.
                default.blend.enable + "\");\n" + " \n" + "if (_enable == 1) {\n" + "\t\tsmooth(_smoothness, _precision);\n" + "} else {\n" + "\tvalue = value;\n" + "}";
                if (selectedProperty.canSetExpression) {
                    selectedProperty.expression = smoothExp;
                }
                var effectPropertyGroup = selectedLayer.property("ADBE Effect Parade");
                if (effectPropertyGroup.property(presetName) !== null) {
                    return;
                }
                var blendEffect = effectPropertyGroup.addProperty(ffxMap_1.
                default.blend.pseudo);
                blendEffect.name = presetName;
                var smoothnessProperty = blendEffect.property(ffxMap_1.
                default.blend.smoothness);
                smoothnessProperty.setValue(4);
                smoothnessProperty.expression = "clamp(value, 1.3, 100);";
                var precisionProperty = blendEffect.property(ffxMap_1.
                default.blend.precision);
                precisionProperty.expression = "clamp(value, 1, 100);";
                precisionProperty.setValue(25);
                var enableProperty = blendEffect.property(ffxMap_1.
                default.blend.enable);
                enableProperty.setValue(1);
            });
        });
        app.endUndoGroup();
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;

    function test() {
        var composition = app.project.items.addComp("Blend Test", 500, 500, 1, 10, 30);
        composition.openInViewer();
        var solid1 = composition.layers.addSolid([0, 1, 0], "Solid 1", 200, 200, 1, 10);
        solid1.name = "Solid 1";
        solid1.position.selected = true;
        return run();
    }
    exports.test = test;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    try {
        xLib = new ExternalObject("lib:PlugPlugExternalObject");
    } catch (e) {
        alert("Missing ExternalObject: " + e);
    }

    function dispatch(type, data) {
        if (!xLib) {
            return;
        }
        var eventObj = new CSXSEvent();
        eventObj.type = type;
        eventObj.data = data || "";
        eventObj.dispatch();
    }
    exports.
    default = dispatch;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.test = exports.run = exports.check = void(0);
    var ffxMap_1 = __webpack_require__(2);
    var prereqs_1 = __webpack_require__(0);
    var utils_1 = __webpack_require__(1);

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_PROJECT, prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_PROJECT, prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        utils_1.loadEffects();
        app.beginUndoGroup("Burst");
        var shapeLayer = composition.layers.addShape();
        shapeLayer.name = "Burst";
        var rootVectorGroup = shapeLayer.property("ADBE Root Vectors Group");
        var vectorGroup = rootVectorGroup.addProperty("ADBE Vector Group");
        vectorGroup.name = "Rectangle 1";
        var vectorsGroup = vectorGroup.addProperty("ADBE Vectors Group");
        vectorsGroup.addProperty("ADBE Vector Shape - Rect");
        vectorsGroup.addProperty("ADBE Vector Filter - Repeater");
        vectorsGroup.addProperty("ADBE Vector Graphic - Stroke");
        vectorsGroup.addProperty("ADBE Vector Graphic - Fill");
        vectorsGroup.addProperty("ADBE Vector Filter - Wiggler");
        vectorsGroup.property("ADBE Vector Shape - Rect").name = "Burst Piece 1";
        vectorsGroup.property("ADBE Vector Filter - Repeater").name = "Repeater 1";
        vectorsGroup.property("ADBE Vector Filter - Wiggler").name = "Wiggle Transform 1";
        var effectPropertyGroup = shapeLayer.property("ADBE Effect Parade");
        var effectProperty = effectPropertyGroup.addProperty(ffxMap_1.
        default.burst.pseudo);
        effectProperty.name = "Burst";
        var copiesCountProperty = effectProperty.property(ffxMap_1.
        default.burst.copiesCount);
        copiesCountProperty.setValue(9);
        var copiesRevolutionProperty = effectProperty.property(ffxMap_1.
        default.burst.copiesRevolution);
        copiesRevolutionProperty.setValue(360);
        var copiesRevolutionOffsetProperty = effectProperty.property(ffxMap_1.
        default.burst.copiesRevolutionOffset);
        copiesRevolutionOffsetProperty.setValue(0);
        var copiesBurstOffsetProperty = effectProperty.property(ffxMap_1.
        default.burst.copiesBurstOffset);
        copiesBurstOffsetProperty.setValue(0);
        var copiesDistanceFromCenterProperty = effectProperty.property(ffxMap_1.
        default.burst.copiesDistanceFromCenter);
        copiesDistanceFromCenterProperty.setValue(250);
        var linkWidthAndHeightProperty = effectProperty.property(ffxMap_1.
        default.burst.linkWidthAndHeight);
        linkWidthAndHeightProperty.setValue(0);
        var widthProperty = effectProperty.property(ffxMap_1.
        default.burst.width);
        widthProperty.setValue(20);
        var heightProperty = effectProperty.property(ffxMap_1.
        default.burst.height);
        heightProperty.setValue(60);
        var strokeWidthProperty = effectProperty.property(ffxMap_1.
        default.burst.strokeWidth);
        strokeWidthProperty.setValue(8);
        var fillEnabledProperty = effectProperty.property(ffxMap_1.
        default.burst.colorFillEnable);
        fillEnabledProperty.setValue(1);
        var fillColorProperty = effectProperty.property(ffxMap_1.
        default.burst.colorFillColor);
        fillColorProperty.setValue([0.976, 0.38, 0.709]);
        var strokeEnabledProperty = effectProperty.property(ffxMap_1.
        default.burst.colorStrokeEnable);
        strokeEnabledProperty.setValue(1);
        var strokeColorProperty = effectProperty.property(ffxMap_1.
        default.burst.colorStrokeColor);
        strokeColorProperty.setValue([0.454, 0.733, 1]);
        var roundnessProperty = effectProperty.property(ffxMap_1.
        default.burst.roundness);
        roundnessProperty.setValue(30);
        var sequenceLinkProperty = effectProperty.property(ffxMap_1.
        default.burst.sequenceLinkWidthAndHeight);
        sequenceLinkProperty.setValue(1);
        var sequenceWidthProperty = effectProperty.property(ffxMap_1.
        default.burst.sequenceWidth);
        sequenceWidthProperty.setValue(0);
        var sequenceHeightProperty = effectProperty.property(ffxMap_1.
        default.burst.sequenceHeight);
        sequenceHeightProperty.setValue(0);
        var sizeExpr = "x = effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.width + "\");\n" + "y = effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.height + "\");\n" + "link = effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.linkWidthAndHeight + "\");\n" + " \n" + "if (link == 0) {\n" + "\t[x,y];\n" + "} else {\n" + "\t[x,x];\n" + "}";
        var positionExpr = "[content(\"Rectangle 1\").content(\"Burst Piece 1\").position[1], effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.copiesDistanceFromCenter + "\")];\n";
        var roundExpr = "effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.roundness + "\");\n";
        var strokeColorExpr = "effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.colorStrokeColor + "\");\n";
        var strokeVisibleExpr = "effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.colorStrokeEnable + "\") * 100;\n";
        var strokeWidthExpr = "effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.strokeWidth + "\");\n";
        var fillColorExpr = "effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.colorFillColor + "\");\n";
        var fillVisibleExpr = "effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.colorFillEnable + "\") * 100;\n";
        var repeaterCopiesExpr = "effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.copiesCount + "\");\n";
        var repeaterOffsetExpr = "effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.copiesRevolutionOffset + "\");\n";
        var repeaterRevolutionExpr = "try {\n\tcopies = effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.copiesCount + "\");\n" + "\tdivision = effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.copiesRevolution + "\");\n" + "\tdivision / copies + (content(\"Rectangle 1\")\n" + "\t\t.content(\"Repeater 1\")\n" + "\t\t.offset);\n" + "} catch(e$$4) {\n" + "\tvalue;\n" + "}\n";
        var globalPosExpr = "effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.globalPosition + "\");\n";
        var zeroWiggle = "0";
        var accentPositionOffsetExpr = "[content(\"Rectangle 1\").content(\"Wiggle Transform 1\").transform.position[1], effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.copiesBurstOffset + "\")];\n";
        var sliderZeroLockExpr = "_copies = effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.copiesCount + "\");\n" + "if (_copies < 0){\n" + "_copies = 0;\n" + "}\n" + "_copies;";
        var roundZeroLockExpr = "_roundness = effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.roundness + "\");\n" + "if (_roundness < 0) {\n" + "\t_roundness = 0;\n" + "}\n" + "_roundness;";
        var widthZeroLockExpr = "_width = effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.width + "\");\n" + "if (_width < 0) {\n" + "\t_width = 0;\n" + "}\n" + "_width;";
        var heightZeroLockExpr = "_height = effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.height + "\");\n" + "if (_height < 0) {\n" + "\t_height = 0;\n" + "}\n" + "_height;";
        var seqSizeExpr = "x = 100 + effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.sequenceWidth + "\");\n" + "y = 100 + effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.sequenceHeight + "\");\n" + "link = effect(\"" + ffxMap_1.
        default.burst.pseudo + "\")(\"" + ffxMap_1.
        default.burst.sequenceLinkWidthAndHeight + "\");\n" + " \n" + "if (link == 0) {\n" + "\t[x,y];\n" + "} else {\n" + "\t[x,x];\n" + "}";
        vectorsGroup.property("ADBE Vector Shape - Rect").property("ADBE Vector Rect Size").expression = sizeExpr;
        vectorsGroup.property("ADBE Vector Shape - Rect").property("ADBE Vector Rect Position").expression = positionExpr;
        vectorsGroup.property("ADBE Vector Shape - Rect").property("ADBE Vector Rect Roundness").expression = roundExpr;
        vectorsGroup.property("ADBE Vector Graphic - Stroke").property("ADBE Vector Stroke Color").expression = strokeColorExpr;
        vectorsGroup.property("ADBE Vector Graphic - Stroke").property("ADBE Vector Stroke Opacity").expression = strokeVisibleExpr;
        vectorsGroup.property("ADBE Vector Graphic - Stroke").property("ADBE Vector Stroke Width").expression = strokeWidthExpr;
        vectorsGroup.property("ADBE Vector Graphic - Fill").property("ADBE Vector Fill Color").expression = fillColorExpr;
        vectorsGroup.property("ADBE Vector Graphic - Fill").property("ADBE Vector Fill Opacity").expression = fillVisibleExpr;
        vectorsGroup.property("ADBE Vector Filter - Repeater").property("ADBE Vector Repeater Copies").expression = repeaterCopiesExpr;
        vectorsGroup.property("ADBE Vector Filter - Wiggler").property("ADBE Vector Wiggler Transform").property("ADBE Vector Wiggler Rotation").expression = repeaterOffsetExpr;
        vectorsGroup.property("ADBE Vector Filter - Repeater").property("ADBE Vector Repeater Transform").property("ADBE Vector Repeater Rotation").expression = repeaterRevolutionExpr;
        shapeLayer.property("ADBE Transform Group").property("ADBE Position").expression = globalPosExpr;
        vectorsGroup.property("ADBE Vector Filter - Wiggler").property("ADBE Vector Xform Temporal Freq").expression = zeroWiggle;
        vectorsGroup.property("ADBE Vector Filter - Wiggler").property("ADBE Vector Wiggler Transform").property("ADBE Vector Wiggler Position").expression = accentPositionOffsetExpr;
        shapeLayer.property("ADBE Effect Parade").property(ffxMap_1.
        default.burst.pseudo).property(ffxMap_1.
        default.burst.copiesCount).expression = sliderZeroLockExpr;
        shapeLayer.property("ADBE Effect Parade").property(ffxMap_1.
        default.burst.pseudo).property(ffxMap_1.
        default.burst.roundness).expression = roundZeroLockExpr;
        shapeLayer.property("ADBE Effect Parade").property(ffxMap_1.
        default.burst.pseudo).property(ffxMap_1.
        default.burst.width).expression = widthZeroLockExpr;
        vectorsGroup.property("ADBE Vector Filter - Repeater").property("ADBE Vector Repeater Transform").property("ADBE Vector Repeater Scale").expression = seqSizeExpr;
        app.endUndoGroup();
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;

    function test() {
        var composition = app.project.items.addComp("Burst Test", 500, 500, 1, 10, 30);
        composition.openInViewer();
        var solid1 = composition.layers.addSolid([0, 1, 0], "Solid 1", 200, 200, 1, 10);
        solid1.name = "Solid 1";
        return run();
    }
    exports.test = test;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);
    var ffxMap_1 = __webpack_require__(2);
    var utils_1 = __webpack_require__(1);

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.SELECTED_LAYER_HAS_SELECTED_PROPERTIES);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.SELECTED_LAYER_HAS_SELECTED_PROPERTIES);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        utils_1.loadEffects();
        app.beginUndoGroup("Excite");
        var selectedLayers = composition.selectedLayers;
        var presetName = "";
        var layerPropertyGetters = selectedLayers.map(function(selectedLayer) {
            return {
                layer: selectedLayer,
                propertyGetters: selectedLayer.selectedProperties.filter(function(p) {
                    return p instanceof Property;
                }).map(utils_1.propertyToGetter)
            };
        });
        layerPropertyGetters.forEach(function(_a) {
            var selectedLayer = _a.layer;
            var propertyGetters = _a.propertyGetters;
            propertyGetters.forEach(function(pg) {
                var selectedProperty = pg(selectedLayer);
                var parentName = "";
                try {
                    var firstParent = selectedProperty.parentProperty;
                    parentMatchName = firstParent.matchName;
                    parentName = firstParent.name;
                    currentName = selectedProperty.name;
                } catch (err) {

                }
                if (parentMatchName === "ADBE Transform Group") {
                    presetName = "Excite - " + currentName;
                } else {
                    presetName = "Excite - " + parentName + " - " + currentName;
                }
                if (presetName.length > 30) {
                    presetName = presetName.substr(0, 30);
                }
                var exciteExp = "\n      try {\n        enable = effect(\"" + presetName + "\")(\"" + ffxMap_1.
                default.excite.enable + "\")\n        if (enable == 0) {\n          value\n        } else {\n          amp = effect(\"" + presetName + "\")(\"" + ffxMap_1.
                default.excite.overshoot + "\") / 2.5\n          freq = effect(\"" + presetName + "\")(\"" + ffxMap_1.
                default.excite.bounce + "\") / 20\n          decay = effect(\"" + presetName + "\")(\"" + ffxMap_1.
                default.excite.friction + "\") / 20\n          n = 0,\n          0 < numKeys\n            && (n = nearestKey(time).index, key(n).time > time && n--),\n            t = 0 === n ? 0 : time - key(n).time,\n            0 < n\n              ? (v = velocityAtTime(key(n).time - thisComp.frameDuration / 10),\n              value + v / 100 * amp * Math.sin(freq * t * 2 * Math.PI) / Math.exp(decay * t)\n            ) : value;\n        }\n      } catch (err) {\n        value = value; \n      }";
                if (selectedProperty.canSetExpression) {
                    selectedProperty.expression = exciteExp;
                }
                var effectPropertyGroup = selectedLayer.property("ADBE Effect Parade");
                if (effectPropertyGroup.property(presetName) !== null) {
                    return;
                }
                var exciteEffect = effectPropertyGroup.addProperty(ffxMap_1.
                default.excite.pseudo);
                exciteEffect.name = presetName;
                var exciteEnable = exciteEffect.property(ffxMap_1.
                default.excite.enable);
                exciteEnable.setValue(1);
                var exciteOvershoot = exciteEffect.property(ffxMap_1.
                default.excite.overshoot);
                exciteOvershoot.expression = "clamp(value, 0,100);";
                exciteOvershoot.setValue(20);
                var exciteBounce = exciteEffect.property(ffxMap_1.
                default.excite.bounce);
                exciteBounce.expression = "clamp(value, 0,100);";
                exciteBounce.setValue(40);
                var exciteFriction = exciteEffect.property(ffxMap_1.
                default.excite.friction);
                exciteFriction.expression = "clamp(value, 0,100);";
                exciteFriction.setValue(40);
            });
        });
        app.endUndoGroup();
        utils_1.restoreSelectionAfter(function() {

        });
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;

    function test() {
        var composition = app.project.items.addComp("Excite Test", 500, 500, 1, 10, 30);
        composition.openInViewer();
        var solid1 = composition.layers.addSolid([0, 1, 0], "Solid 1", 200, 200, 1, 10);
        solid1.name = "Solid 1";
        solid1.rotation.selected = true;
        run();
    }
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var ffxMap_1 = __webpack_require__(2);
    var prereqs_1 = __webpack_require__(0);
    var utils_1 = __webpack_require__(1);

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        utils_1.loadEffects();
        app.beginUndoGroup("forcefield");
        var currentComp = app.project.activeItem;
        if (!currentComp) {
            return;
        }
        if (!(currentComp instanceof CompItem)) {
            return;
        }
        var selectedLayers = currentComp.selectedLayers;
        var firstSelectedLayer = selectedLayers[0];
        var layerNameStorage = [];
        var layerIndexStorage = [];
        var layerExpressionStorage = [];
        var j = 0;
        for (; j < selectedLayers.length; j++) {
            var currentLayer = selectedLayers[j];
            if (currentLayer !== firstSelectedLayer) {
                layerNameStorage[layerNameStorage.length] = currentLayer.name;
                layerIndexStorage[layerIndexStorage.length] = currentLayer.index;
            }
        }
        var jr = layerNameStorage.length - 1;
        for (; jr >= 0; --jr) {
            var thisLayerName = layerNameStorage[jr];
            var thisLayerIndex = layerIndexStorage[jr];
            var forcefieldCtrl = firstSelectedLayer("ADBE Effect Parade").addProperty(ffxMap_1.
            default.forcefield.pseudo);
            forcefieldCtrl.name = "[FF] " + thisLayerName;
            forcefieldCtrl(ffxMap_1.
            default.forcefield.target).setValue(thisLayerIndex);
            layerExpressionStorage[layerExpressionStorage.length] = "addField(\"" + thisLayerName + "\");\n";
        }
        var forcefieldExp_1 = "var voltage = 0;\nvar forcefieldBattery = 0;\nvar forcefieldCapacity = 0;\n\nfunction addField(name) {\n    var ff_layer = effect(\"[FF] \" + name)(\"" + ffxMap_1.
        default.forcefield.target + "\");\n" + "    var ff_layer_pos = ff_layer.toComp(ff_layer.anchorPoint);\n" + "    var ff_magnetism = effect(\"[FF] \" + name)(\"" + ffxMap_1.
        default.forcefield.magnetism + "\") / 100;\n" + "    if (hasParent) {\n" + "        ff_layer_pos = parent.fromComp(ff_layer_pos);\n" + "    }\n" + "    voltage = voltage + ff_magnetism * ff_layer_pos;\n" + "    forcefieldBattery = forcefieldBattery + ff_magnetism;\n" + "    forcefieldCapacity = 1 - forcefieldBattery;\n" + "}\n" + "\n";
        var ttt = 0;
        for (; ttt < layerExpressionStorage.length; ttt++) {
            var currentLine = layerExpressionStorage[ttt];
            forcefieldExp_1 = forcefieldExp_1 + "" + currentLine + "";
        }
        var forcefieldExp_2 = "if (forcefieldBattery === 0) {\n    value;\n} else {\n    linear(forcefieldCapacity, voltage / forcefieldBattery, value);\n\n}";
        var forcefieldExp_final = forcefieldExp_1 + forcefieldExp_2;
        firstSelectedLayer("ADBE Transform Group")("ADBE Position").expression = forcefieldExp_final;
        var FF_marker = new MarkerValue("Forcefield");
        firstSelectedLayer("Marker").setValueAtTime(0.1, FF_marker);
        firstSelectedLayer.label = 11;
        firstSelectedLayer.selected = true;
        app.endUndoGroup();
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);
    var ffxMap_1 = __webpack_require__(2);
    var utils_1 = __webpack_require__(1);

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.SELECTED_LAYER_HAS_SELECTED_PROPERTIES);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.SELECTED_LAYER_HAS_SELECTED_PROPERTIES);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        utils_1.loadEffects();
        app.beginUndoGroup("Jump");
        var selectedLayers = composition.selectedLayers;
        var layerPropertyGetters = selectedLayers.map(function(selectedLayer) {
            return {
                layer: selectedLayer,
                propertyGetters: selectedLayer.selectedProperties.filter(function(p) {
                    return p instanceof Property;
                }).map(utils_1.propertyToGetter)
            };
        });
        layerPropertyGetters.forEach(function(_a) {
            var selectedLayer = _a.layer;
            var propertyGetters = _a.propertyGetters;
            propertyGetters.forEach(function(pg) {
                var selectedProperty = pg(selectedLayer);
                var parentName = "";
                try {
                    var firstParent = selectedProperty.parentProperty;
                    parentMatchName = firstParent.matchName;
                    parentName = firstParent.name;
                    currentName = selectedProperty.name;
                } catch (err) {

                }
                if (parentMatchName === "ADBE Transform Group") {
                    presetName = "Jump - " + currentName;
                } else {
                    presetName = "Jump - " + parentName + " - " + currentName;
                }
                if (presetName.length > 30) {
                    presetName = presetName.substr(0, 30);
                }
                var jumpExp = "\n        enable = effect(\"" + presetName + "\")(\"" + ffxMap_1.
                default.jump.enable + "\");\n        elastic = (effect(\"" + presetName + "\")(\"" + ffxMap_1.
                default.jump.stretch + "\")) / 100;\n        gravity = (effect(\"" + presetName + "\")(\"" + ffxMap_1.
                default.jump.gravity + "\")) * 100;\n        jumpMax = effect(\"" + presetName + "\")(\"" + ffxMap_1.
                default.jump.maxJumps + "\");\n        on_off = effect(\"" + presetName + "\")(\"" + ffxMap_1.
                default.jump.jump + "\");\n        if (enable == 0) {\n            value\n        } else {\n            n = 0;\n            if (numKeys > 0) {\n                n = nearestKey(time).index;\n                if (key(n).time > time) {\n                    n--;\n                }\n            }\n            if (n > 0) {\n                t = time - key(n).time;\n                v = -velocityAtTime(key(n).time - 0.001) * elastic;\n                vl = length(v);\n                if (value instanceof Array) {\n                    vu = (vl > 0) ? normalize(v) : [0, 0, 0];\n                } else {\n                    vu = (v < 0) ? -1 : 1;\n                }\n                tCur = 0;\n                segDur = 2 * vl / gravity;\n                tNext = segDur;\n                numberOfBounces = 1;\n                while (tNext < t && numberOfBounces <= jumpMax) {\n                    vl *= elastic;\n                    segDur *= elastic;\n                    tCur = tNext;\n                    tNext += segDur;\n                    numberOfBounces++;\n                }\n                if (numberOfBounces <= jumpMax) {\n                    delta = t - tCur;\n                    inOutExp = vu * delta * (vl - gravity * delta / 2);\n                    if (on_off == 1) {\n                        value = value - inOutExp;\n                    } else {\n                        value = value + inOutExp;\n                    }\n                } else {\n                    value = value;\n                }\n            } else {\n                value = value;\n            }\n        }";
                if (selectedProperty.canSetExpression) {
                    selectedProperty.expression = jumpExp;
                }
                var effectPropertyGroup = selectedLayer.property("ADBE Effect Parade");
                if (effectPropertyGroup.property(presetName) !== null) {
                    return;
                }
                var jumpEffect = effectPropertyGroup.addProperty(ffxMap_1.
                default.jump.pseudo);
                jumpEffect.name = presetName;
                var jumpStretch = jumpEffect.property(ffxMap_1.
                default.jump.stretch);
                jumpStretch.setValue(60);
                var jumpGravity = jumpEffect.property(ffxMap_1.
                default.jump.gravity);
                jumpGravity.setValue(8);
                var jumpMaxJumps = jumpEffect.property(ffxMap_1.
                default.jump.maxJumps);
                jumpMaxJumps.setValue(8);
                var jumpEnable = jumpEffect.property(ffxMap_1.
                default.jump.enable);
                jumpEnable.setValue(1);
            });
        });
        app.endUndoGroup();
        utils_1.restoreSelectionAfter(function() {

        });
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;

    function test() {
        var composition = app.project.items.addComp("Jump Test", 500, 500, 1, 10, 30);
        composition.openInViewer();
        var solid1 = composition.layers.addSolid([0, 1, 0], "Solid 1", 200, 200, 1, 10);
        solid1.name = "Solid 1";
        solid1.rotation.selected = true;
        run();
    }
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var ffxMap_1 = __webpack_require__(2);
    var prereqs_1 = __webpack_require__(0);
    var utils_1 = __webpack_require__(1);

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        utils_1.loadEffects();
        app.beginUndoGroup("Orbit");
        var selectedLayers = composition.selectedLayers;
        for (var i = 0; i < selectedLayers.length; i += 1) {
            var selectedLayer = selectedLayers[i];
            var orbitName = selectedLayer.position.name;
            var effectPropertyGroup = selectedLayer.property("ADBE Effect Parade");
            if (effectPropertyGroup.property(orbitName) !== null) {
                continue;
            }
            var orbitEffect = effectPropertyGroup.addProperty(ffxMap_1.
            default.orbit.pseudo);
            orbitEffect.name = orbitName;
            var orbitSpeed = orbitEffect.property(ffxMap_1.
            default.orbit.speed);
            orbitSpeed.setValue(8);
            var orbitDistance = orbitEffect.property(ffxMap_1.
            default.orbit.distance);
            orbitDistance.setValue(30);
            var orbitReverse = orbitEffect.property(ffxMap_1.
            default.orbit.reverse);
            orbitReverse.setValue(1);
            var orbitExp = "enable = effect(\"" + orbitName + "\")(\"" + ffxMap_1.
            default.orbit.enable + "\");\n" + "if (enable == 0) { value; } else {\n" + "calibrate = effect(\"" + orbitName + "\")(\"" + ffxMap_1.
            default.orbit.calibration + "\") / 57;\n" + "on_off = effect(\"" + orbitName + "\")(\"" + ffxMap_1.
            default.orbit.reverse + "\");\n" + "d = effect(\"" + orbitName + "\")(\"" + ffxMap_1.
            default.orbit.distance + "\") * 15;\n" + "s = effect(\"" + orbitName + "\")(\"" + ffxMap_1.
            default.orbit.speed + "\") / 10;\n" + " \n" + "try {\n" + "\tL = effect(\"" + orbitName + "\")(\"" + ffxMap_1.
            default.orbit.target + "\");\n" + "\tcenter = L.toWorld(L.anchorPoint);\n" + "} catch (err) {\n" + "\tcenter = value;\n" + "}\n" + "myTime = Math.max(0, time - inPoint);\n" + "if (on_off == 1) {\n" + "\tangle = (s * myTime * 2 * Math.PI) + calibrate;\n" + "} else {\n" + "\tangle = ((s * myTime * 2 * Math.PI) + calibrate) * -1;\n" + "}\n" + "value = center + [Math.sin(angle) / thisComp.pixelAspect, -Math.cos(angle)] * d;\n}";
            selectedLayer.position.expression = orbitExp;
        }
        app.endUndoGroup();
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.test = exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);
    var ffxMap_1 = __webpack_require__(2);
    var utils_1 = __webpack_require__(1);

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        utils_1.loadEffects();
        app.beginUndoGroup("Spin");
        var selectedLayers = composition.selectedLayers;
        for (var num = 0; num < selectedLayers.length; num += 1) {
            var selectedLayer = selectedLayers[num];
            var selectedName = selectedLayer.rotation.name;
            var spinName = selectedLayer.rotation.name;
            var effectPropertyGroup = selectedLayer.property("ADBE Effect Parade");
            if (effectPropertyGroup.property(selectedName) !== null) {
                continue;
            }
            var spinEffect = effectPropertyGroup.addProperty(ffxMap_1.
            default.spin.pseudo);
            spinEffect.name = spinName;
            var spinsPerSecondProperty = spinEffect.property(ffxMap_1.
            default.spin.spinsPerSecond);
            spinsPerSecondProperty.setValue(180);
            var spinExp = "isReversed = effect(\"" + spinName + "\")(\"" + ffxMap_1.
            default.spin.reverse + "\");\n" + "calibrate = effect(\"" + spinName + "\")(\"" + ffxMap_1.
            default.spin.calibration + "\");\n" + "isEnabled = effect(\"" + spinName + "\")(\"" + ffxMap_1.
            default.spin.enable + "\");\n" + " \n" + "if (isEnabled == 1) {\n" + "\tveloc = effect(\"" + spinName + "\")(\"" + ffxMap_1.
            default.spin.spinsPerSecond + "\");\n" + "\tif (isReversed == 1) {\n" + "\t\tvalue = (rotation + (time - inPoint) * veloc) + calibrate;\n" + "\t} else {\n" + "\t\tvalue = ((rotation + (time - inPoint) * veloc) + calibrate) * -1;\n" + "\t}\n" + "} else { value = rotation }";
            selectedLayer.rotation.expression = spinExp;
        }
        app.endUndoGroup();
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;

    function test() {
        var composition = app.project.items.addComp("Spin Test", 500, 500, 1, 10, 30);
        composition.openInViewer();
        var solid1 = composition.layers.addSolid([0, 1, 0], "Solid 1", 200, 200, 1, 10);
        solid1.name = "Solid 1";
        solid1.rotation.selected = true;
        run();
    }
    exports.test = test;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);
    var ffxMap_1 = __webpack_require__(2);
    var utils_1 = __webpack_require__(1);

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        utils_1.loadEffects();
        app.beginUndoGroup("Stare");
        var selectedLayers = composition.selectedLayers;
        for (var i = 0; i < selectedLayers.length; i += 1) {
            var selectedLayer = selectedLayers[i];
            var name = selectedLayer.rotation.name;
            if (selectedLayer.property("ADBE Effect Parade").property(name) !== null) {
                return;
            }
            var stareEffect = selectedLayer.property("ADBE Effect Parade").addProperty(ffxMap_1.
            default.stare.pseudo);
            stareEffect.name = name;
            var stareExp = "calibrate = effect(\"" + name + "\")(\"" + ffxMap_1.
            default.stare.calibration + "\");\n" + "on_off = effect(\"" + name + "\")(\"" + ffxMap_1.
            default.stare.enable + "\");\n" + "if (on_off == 0) {\n        value;\n      } else {\n" + "try {\n" + "\tdiffx = position[0] - effect(\"" + name + "\")(\"" + ffxMap_1.
            default.stare.target + "\")\n" + "\t\t.transform.position[0];\n" + "\tdiffy = position[1] - effect(\"" + name + "\")(\"" + ffxMap_1.
            default.stare.target + "\")\n" + "\t\t.transform.position[1];\n" + "\tif (diffx === 0) {\n" + "\t\tdiffx = 1;\n" + "\t}\n" + "\tsign = 1 + (-1 * (diffx / Math.abs(diffx))) * 90;\n" + "\tradDegExp = 1 + radiansToDegrees(Math.atan(diffy / diffx));\n" + "\tvalue = radDegExp + sign + calibrate;\n" + "} catch (e) {\n" + "\tL = null;\n" + "}\n}";
            selectedLayer.rotation.expression = stareExp;
        }
        app.endUndoGroup();
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        app.beginUndoGroup("Warp");
        var theLayers = composition.selectedLayers;
        for (var num = 0; num < theLayers.length; num += 1) {
            var theLayer = theLayers[num];
            if (theLayer.property("ADBE Effect Parade").property("Warp Time") !== null) {
                continue;
            }
            var effectPropertyGroup = theLayer.property("ADBE Effect Parade");
            var addWarp = effectPropertyGroup.addProperty("ADBE Echo");
            addWarp.name = "Warp Time";
            addWarp.property("ADBE Echo-0001").setValue(-0.006);
            addWarp.property("ADBE Echo-0002").setValue(16);
            addWarp.property("ADBE Echo-0005").setValue(2);
            var addEdgeSmooth = effectPropertyGroup.addProperty("ADBE Matte Choker");
            addEdgeSmooth.name = "Edge Smooth";
            addEdgeSmooth.property("ADBE Matte Choker-0001").setValue(24.5);
            addEdgeSmooth.property("ADBE Matte Choker-0002").setValue(66);
            var addObjectSmooth = effectPropertyGroup.addProperty("ADBE Simple Choker");
            addObjectSmooth.name = "Object Crush";
            addObjectSmooth.property("ADBE Simple Choker-0002").setValue(12);
        }
        app.endUndoGroup();
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run(row, col, includeMask, mode, center) {
        if (includeMask === void(0)) {
            includeMask = true;
        }
        if (mode === void(0)) {
            mode = "layer";
        }
        if (center === void(0)) {
            center = false;
        }
        var ignoreMasks = !includeMask;
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        app.beginUndoGroup("Anchor");
        var curTime = composition.time;
        var theLayers = composition.selectedLayers;
        var _loop_1 = function(num) {
            var theLayer = theLayers[num];
            if (theLayer instanceof CameraLayer) {
                return {
                    value: void(0)
                };
            }
            var noMasks = true;
            if (ignoreMasks === true) {
                noMasks = true;
            } else {
                if (theLayer.mask.numProperties !== 0) {
                    for (var i = 1; i <= theLayer.mask.numProperties; i += 1) {
                        if (theLayer.mask(i).maskMode != MaskMode.NONE) {
                            noMasks = false;
                        }
                    }
                }
            }
            if (noMasks) {
                switch (row) {
                    case 0:
                        x = 0;
                        break;
                    case 1:
                        x = theLayer.sourceRectAtTime(curTime, false).width / 2;
                        break;
                    case 2:
                        x = theLayer.sourceRectAtTime(curTime, false).width;
                        break;
                    default:

                }
                switch (col) {
                    case 0:
                        y = 0;
                        break;
                    case 1:
                        y = theLayer.sourceRectAtTime(curTime, false).height / 2;
                        break;
                    case 2:
                        y = theLayer.sourceRectAtTime(curTime, false).height;
                        break;
                    default:

                }
                if (theLayer instanceof TextLayer || theLayer instanceof ShapeLayer) {
                    x += theLayer.sourceRectAtTime(curTime, false).left;
                    y += theLayer.sourceRectAtTime(curTime, false).top;
                }
            } else {
                var xBounds = [];
                var yBounds = [];
                var numMasks = theLayer.mask.numProperties;
                for (var f = 1; f <= numMasks; f += 1) {
                    var numVerts = theLayer.mask(f).maskShape.value.vertices.length;
                    if (theLayer.mask(f).maskMode == MaskMode.NONE) {
                        continue;
                    }
                    for (var j = 0; j < numVerts; j += 1) {
                        var curVerts = theLayer.mask(f).maskShape.valueAtTime(curTime, false).vertices[j];
                        xBounds.push(curVerts[0]);
                        yBounds.push(curVerts[1]);
                    }
                }
                xBounds.sort(function(a, b) {
                    return a - b;
                });
                yBounds.sort(function(a, b) {
                    return a - b;
                });
                var xl = xBounds.shift();
                var xh = xBounds.pop();
                var yl = yBounds.shift();
                var yh = yBounds.pop();
                if (theLayer instanceof TextLayer || theLayer instanceof ShapeLayer) {
                    var xl2 = theLayer.sourceRectAtTime(curTime, false).left;
                    var xh2 = xl2 + theLayer.sourceRectAtTime(curTime, false).width;
                    var yl2 = theLayer.sourceRectAtTime(curTime, false).top;
                    var yh2 = yl2 + theLayer.sourceRectAtTime(curTime, false).height;
                    if (xl < xl2) {
                        xl = xl2;
                    }
                    if (xh > xh2) {
                        xh = xh2;
                    }
                    if (yl < yl2) {
                        yl = yl2;
                    }
                    if (yh > yh2) {
                        yh = yh2;
                    }
                }
                switch (row) {
                    case 0:
                        x = xl;
                        break;
                    case 1:
                        x = xl + ((xh - xl) / 2);
                        break;
                    case 2:
                        x = xh;
                        break;
                    default:

                }
                switch (col) {
                    case 0:
                        y = yl;
                        break;
                    case 1:
                        y = yl + ((yh - yl) / 2);
                        break;
                    case 2:
                        y = yh;
                        break;
                    default:

                }
            }
            if (theLayer.anchorPoint.isTimeVarying) {
                var theComp = composition;
                theLayer.anchorPoint.setValueAtTime(theComp.time, [x, y]);
            } else {
                var curAnchor = theLayer.anchorPoint.value;
                var scaleValue = theLayer.scale.value;
                var xMove = (x - curAnchor[0]) * (scaleValue[0] / 100);
                var yMove = (y - curAnchor[1]) * (scaleValue[1] / 100);
                var posEx = false;
                var curPos = void(0);
                if (theLayer.position.expressionEnabled) {
                    theLayer.position.expressionEnabled = false;
                    posEx = true;
                }
                var dupLayer = theLayer.duplicate();
                var oldParent = theLayer.parent;
                dupLayer.moveToEnd();
                if (dupLayer.scale.isTimeVarying) {
                    dupLayer.scale.setValueAtTime(composition.time, [100, 100]);
                } else {
                    dupLayer.scale.setValue([100, 100]);
                }
                theLayer.parent = dupLayer;
                theLayer.anchorPoint.setValue([x, y]);
                if (theLayer.position.isTimeVarying) {
                    if (theLayer.position.dimensionsSeparated) {
                        var xProp = theLayer.property("ADBE Transform Group").property("ADBE Position_0");
                        var numXKeys = xProp.numKeys;
                        for (var k = 1; k <= numXKeys; k += 1) {
                            xProp.setValueAtKey(k, xProp.keyValue(k) + xMove);
                        }
                        var yProp = theLayer.property("ADBE Transform Group").property("ADBE Position_1");
                        var numYKeys = yProp.numKeys;
                        for (var k = 1; k <= numYKeys; k += 1) {
                            yProp.setValueAtKey(k, yProp.keyValue(k) + yMove);
                        }
                    } else {
                        var numKeys = theLayer.position.numKeys;
                        for (var k = 1; k <= numKeys; k += 1) {
                            curPos = theLayer.position.keyValue(k);
                            curPos[0] += xMove;
                            curPos[1] += yMove;
                            theLayer.position.setValueAtKey(k, curPos);
                        }
                    }
                } else {
                    curPos = theLayer.position.value;
                    if (theLayer.position.dimensionsSeparated) {
                        theLayer.property("ADBE Transform Group").property("ADBE Position_0").setValue(curPos[0] + xMove);
                        theLayer.property("ADBE Transform Group").property("ADBE Position_1").setValue(curPos[1] + yMove);
                    } else {
                        theLayer.position.setValue([curPos[0] + xMove, curPos[1] + yMove, curPos[2]]);
                    }
                }
                theLayer.parent = oldParent;
                if (posEx) {
                    theLayer.position.expressionEnabled = true;
                }
                dupLayer.remove();
                if (center) {
                    composition.selectedLayers.forEach(function(layer) {
                        if (layer.position.numKeys === 0) {
                            if (layer.position.dimensionsSeparated) {
                                theLayer.property("ADBE Transform Group").property("ADBE Position_0").setValue(composition.width / 2);
                                theLayer.property("ADBE Transform Group").property("ADBE Position_1").setValue(composition.height / 2);
                            } else {
                                layer.position.setValue([composition.width / 2, composition.height / 2]);
                            }
                        } else {
                            if (layer.position.dimensionsSeparated) {
                                theLayer.property("ADBE Transform Group").property("ADBE Position_0").setValueAtTime(composition.time, composition.width / 2);
                                theLayer.property("ADBE Transform Group").property("ADBE Position_1").setValueAtTime(composition.time, composition.height / 2);
                            } else {
                                layer.position.setValueAtTime(composition.time, [composition.width / 2, composition.height / 2]);
                            }
                        }
                    });
                }
            }
        };
        for (var num = 0; num < theLayers.length; num += 1) {
            var state_1 = _loop_1(num);
            if (typeof state_1 === "object") {
                return state_1.value;
            }
        }
        app.endUndoGroup();
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    var __read = this && this.__read || function(o, n) {
            var m = typeof Symbol === "function" && o[Symbol.iterator];
            if (!m) {
                return o;
            }
            var i = m.call(o);
            var ar = [];
            try {
                while (n === void(0) || n-- > 0 && !r = i.next().done) {
                    ar.push(r.value)
                }
            } catch (error) {
                e = {
                    error: error
                };
            } finally {
                try {
                    if (r && !r.done && m = i.
                    return) {
                        m.call(i)
                    }
                } finally {
                    if (e) {
                        throw e.error
                    }
                }
            }
            return ar;
        };
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);

    function pasteKeyframes(composition, addTimeOffset, invert) {
        var currentTime = composition.time;
        var selectedProperies = composition.selectedProperties;
        var unsettableProps = [];
        var maskBezier = false;
        if (selectedProperies.length == 0) {
            return;
        }
        var earliestTime = getEarliestTime(composition);
        var newKeys = [];
        for (var i = 0; i < selectedProperies.length; i += 1) {
            var selectedProperty = selectedProperies[i];
            if (selectedProperty instanceof Property) {
                if (selectedProperty.propertyValueType == PropertyValueType.CUSTOM_VALUE) {
                    unsettableProps[unsettableProps.length] = selectedProperty;
                } else {
                    var selectedKeys = selectedProperty.selectedKeys;
                    var newKeyframes = [];
                    var lastKeyframes = [];
                    for (var j = 0; j < selectedKeys.length; j += 1) {
                        var selectedKey = selectedKeys[j];
                        var selectedValues = selectedProperty.keyValue(selectedKey);
                        var selectedTime = selectedProperty.keyTime(selectedKey);
                        if (selectedProperty.propertyValueType == PropertyValueType.SHAPE) {
                            if (selectedProperty.parentProperty instanceof MaskPropertyGroup) {
                                maskBezier = selectedProperty.parentProperty.rotoBezier;
                                if (maskBezier) {
                                    selectedProperty.parentProperty.rotoBezier = false;
                                }
                            }
                        }
                        if (addTimeOffset && earliestTime !== undefined) {
                            timeOffset = selectedTime - earliestTime;
                        } else {
                            timeOffset = 0;
                        }
                        var newTime = currentTime + timeOffset;
                        var keyOutInterpolationType = selectedProperty.keyOutInterpolationType(selectedKey);
                        var keyTemporalContinuous = selectedProperty.keyTemporalContinuous(selectedKey);
                        var keyTemporalAutoBezier = selectedProperty.keyTemporalAutoBezier(selectedKey);
                        if (keyOutInterpolationType === KeyframeInterpolationType.BEZIER && keyTemporalContinuous === true && keyTemporalAutoBezier === true) {
                            lastKeyframes.push([newTime, selectedValues, getKeyframeProperties(selectedProperty, selectedKey)]);
                        } else {
                            newKeyframes.push([newTime, selectedValues, getKeyframeProperties(selectedProperty, selectedKey)]);
                        }
                    }
                    for (var k = 0; k < newKeyframes.length; k += 1) {
                        var newKey = selectedProperty.addKey(newKeyframes[k][0]);
                        selectedProperty.setValueAtKey(newKey, newKeyframes[k][1]);
                        if (selectedProperty.propertyValueType == PropertyValueType.SHAPE) {
                            if (maskBezier) {
                                selectedProperty.parentProperty.rotoBezier = true;
                            }
                        }
                        setKeyframeProperties(selectedProperty, newKeyframes[k][2], newKey);
                        newKeys.push([selectedProperty, newKeyframes[k][0]]);
                    }
                    for (var k = 0; k < lastKeyframes.length; k += 1) {
                        var newKey = selectedProperty.addKey(lastKeyframes[k][0]);
                        selectedProperty.setValueAtKey(newKey, lastKeyframes[k][1]);
                        if (selectedProperty.propertyValueType == PropertyValueType.SHAPE) {
                            if (maskBezier) {
                                selectedProperty.parentProperty.rotoBezier = true;
                            }
                        }
                        setKeyframeProperties(selectedProperty, lastKeyframes[k][2], newKey);
                        newKeys.push([selectedProperty, lastKeyframes[k][0]]);
                    }
                }
            }
        }
        if (invert) {
            var originalSelection_1 = [];
            composition.selectedProperties.forEach(function(property) {
                if (property instanceof Property) {
                    originalSelection_1.push([property, selectedKeys.map(function(keyIndex) {
                        return property.keyTime(keyIndex);
                    })]);
                    property.selectedKeys.forEach(function(keyIndex) {
                        property.setSelectedAtKey(keyIndex, false);
                    });
                }
            });
            newKeys.forEach(function(_a) {
                var _b = __read(_a, 2);
                var property = _b[0];
                var keyTime = _b[1];
                var keyIndex = property.nearestKeyIndex(keyTime);
                property.setSelectedAtKey(keyIndex, true);
            });
            app.executeCommand(3693);
        }
    }

    function getKeyframeProperties(property, keyIndex) {
        var propertyType = property.propertyValueType;
        var keyInInterpolationType = property.keyInInterpolationType(keyIndex);
        var keyOutInterpolationType = property.keyOutInterpolationType(keyIndex);
        var keyInTemporalEase = property.keyInTemporalEase(keyIndex);
        var keyOutTemporalEase = property.keyOutTemporalEase(keyIndex);
        var keyTemporalContinuous = property.keyTemporalContinuous(keyIndex);
        var keyTemporalAutoBezier = property.keyTemporalAutoBezier(keyIndex);
        var info = [keyInInterpolationType, keyOutInterpolationType, keyInTemporalEase, keyOutTemporalEase, keyTemporalContinuous, keyTemporalAutoBezier];
        if (propertyType == PropertyValueType.TwoD_SPATIAL || propertyType == PropertyValueType.ThreeD_SPATIAL) {
            var keyInSpatialTangent = property.keyInSpatialTangent(keyIndex);
            var keyOutSpatialTangent = property.keyOutSpatialTangent(keyIndex);
            var keySpatialContinuous = property.keySpatialContinuous(keyIndex);
            var keySpatialAutoBezier = property.keySpatialAutoBezier(keyIndex);
            var keyRoving = property.keyRoving(keyIndex);
            info = info.concat([keyInSpatialTangent, keyOutSpatialTangent, keySpatialContinuous, keySpatialAutoBezier, keyRoving]);
        }
        return info;
    }

    function setKeyframeProperties(property, info, pasteKeyIndex) {
        var propertyType = property.propertyValueType;
        var _a = __read(info, 11);
        var keyInInterpolationType = _a[0];
        var keyOutInterpolationType = _a[1];
        var keyInTemporalEase = _a[2];
        var keyOutTemporalEase = _a[3];
        var keyTemporalContinuous = _a[4];
        var keyTemporalAutoBezier = _a[5];
        var keyInSpatialTangent = _a[6];
        var keyOutSpatialTangent = _a[7];
        var keySpatialContinuous = _a[8];
        var keySpatialAutoBezier = _a[9];
        var keyRoving = _a[10];
        if (propertyType == PropertyValueType.TwoD_SPATIAL || propertyType == PropertyValueType.ThreeD_SPATIAL) {
            property.setSpatialTangentsAtKey(pasteKeyIndex, keyInSpatialTangent, keyOutSpatialTangent);
            property.setSpatialContinuousAtKey(pasteKeyIndex, keySpatialContinuous);
            property.setSpatialAutoBezierAtKey(pasteKeyIndex, keySpatialAutoBezier);
            property.setRovingAtKey(pasteKeyIndex, keyRoving);
        }
        property.setTemporalEaseAtKey(pasteKeyIndex, keyInTemporalEase, keyOutTemporalEase);
        property.setTemporalContinuousAtKey(pasteKeyIndex, keyTemporalContinuous);
        property.setTemporalAutoBezierAtKey(pasteKeyIndex, keyTemporalAutoBezier);
        property.setInterpolationTypeAtKey(pasteKeyIndex, keyInInterpolationType, keyOutInterpolationType);
    }

    function getEarliestTime(composition) {
        var selectedProperties = composition.selectedProperties;
        for (var i = 0; i < selectedProperties.length; i += 1) {
            var selectedProperty = selectedProperties[i];
            if (selectedProperty instanceof Property) {
                var selectedKeys = selectedProperty.selectedKeys;
                if (selectedKeys[0] !== undefined) {
                    var currentKeyTime = selectedProperty.keyTime(selectedKeys[0]);
                    if (smallestValue === undefined || currentKeyTime < smallestValue) {
                        smallestValue = currentKeyTime;
                    }
                }
            }
        }
        return smallestValue;
    }

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.SELECTED_LAYER_HAS_SELECTED_PROPERTIES, prereqs_1.checkTypes.HAS_SELECTED_KEYFRAMES);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run(invert) {
        if (invert === void(0)) {
            invert = false;
        }
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.SELECTED_LAYER_HAS_SELECTED_PROPERTIES, prereqs_1.checkTypes.HAS_SELECTED_KEYFRAMES);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        var addTimeOffset = true;
        app.beginUndoGroup("Clone");
        pasteKeyframes(composition, addTimeOffset, invert);
        app.endUndoGroup();
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);
    var utils_1 = __webpack_require__(1);

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        utils_1.loadEffects();
        app.beginUndoGroup("Guides");
        var renamedPropertiesArray = [];
        var activeComp = app.project.activeItem;
        if (!activeComp) {
            return;
        }
        var precomp2_comp = app.project.items.addComp("Guides", 1920, 1080, 1, 6.3, 30);
        precomp2_comp.bgColor = [1, 1, 1];
        precomp2_comp.shutterPhase = -90;
        precomp2_comp.label = 9;
        precomp2_comp.workAreaDuration = 6.2999;
        precomp2_comp.openInViewer();
        var fibonacciBotleft2 = precomp2_comp.layers.addShape();
        fibonacciBotleft2.name = "Fib - Top Right";
        fibonacciBotleft2.moveToEnd();
        fibonacciBotleft2.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(1).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotleft2Path = fibonacciBotleft2.property("ADBE Root Vectors Group").property(1).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotleft2Path_shapeVertices = [
            [-30.4864501953125, 31.0914916992188],
            [30.486572265625, 31.0914916992188],
            [30.486572265625, -31.0914916992188],
            [-30.4864501953125, -31.0914916992188]
        ];
        var fibonacciBotleft2Path_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleft2Path_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleft2Path_shapeClosed = true;
        createStaticShape(fibonacciBotleft2Path, fibonacciBotleft2Path_shapeVertices, fibonacciBotleft2Path_shapeInTangets, fibonacciBotleft2Path_shapeOutTangets, fibonacciBotleft2Path_shapeClosed);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(1).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(1).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(1).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(1).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(1).property(3).property("ADBE Vector Position").setValue([1337.86645507812, 808.695617675781]);
        fibonacciBotleft2.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(2).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotleft2Path = fibonacciBotleft2.property("ADBE Root Vectors Group").property(2).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotleft2Path_shapeVertices = [
            [17.4134521484375, 19.5029907226562],
            [-17.41357421875, 19.5029907226562],
            [-17.41357421875, -19.5029907226562],
            [17.4134521484375, -19.5029907226562]
        ];
        var fibonacciBotleft2Path_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleft2Path_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleft2Path_shapeClosed = true;
        createStaticShape(fibonacciBotleft2Path, fibonacciBotleft2Path_shapeVertices, fibonacciBotleft2Path_shapeInTangets, fibonacciBotleft2Path_shapeOutTangets, fibonacciBotleft2Path_shapeClosed);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(2).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(2).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(2).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(2).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(2).property(3).property("ADBE Vector Position").setValue([1289.96655273438, 820.284118652344]);
        fibonacciBotleft2.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(3).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotleft2Path = fibonacciBotleft2.property("ADBE Root Vectors Group").property(3).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotleft2Path_shapeVertices = [
            [17.4134521484375, -11.5885009765625],
            [-17.41357421875, -11.5885009765625],
            [-17.41357421875, 11.5885009765625],
            [17.4134521484375, 11.5885009765625]
        ];
        var fibonacciBotleft2Path_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleft2Path_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleft2Path_shapeClosed = true;
        createStaticShape(fibonacciBotleft2Path, fibonacciBotleft2Path_shapeVertices, fibonacciBotleft2Path_shapeInTangets, fibonacciBotleft2Path_shapeOutTangets, fibonacciBotleft2Path_shapeClosed);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(3).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(3).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(3).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(3).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(3).property(3).property("ADBE Vector Position").setValue([1289.96655273438, 789.192626953125]);
        fibonacciBotleft2.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(4).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotleft2Path = fibonacciBotleft2.property("ADBE Root Vectors Group").property(4).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotleft2Path_shapeVertices = [
            [129.87255859375, -79.8705444335938],
            [-129.872436523438, -79.8705444335938],
            [-129.872436523438, 79.8704833984375],
            [129.87255859375, 79.8704833984375]
        ];
        var fibonacciBotleft2Path_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleft2Path_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleft2Path_shapeClosed = true;
        createStaticShape(fibonacciBotleft2Path, fibonacciBotleft2Path_shapeVertices, fibonacciBotleft2Path_shapeInTangets, fibonacciBotleft2Path_shapeOutTangets, fibonacciBotleft2Path_shapeClosed);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(4).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(4).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(4).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(4).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(4).property(3).property("ADBE Vector Position").setValue([1238.48046875, 759.916625976562]);
        fibonacciBotleft2.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(5).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotleft2Path = fibonacciBotleft2.property("ADBE Root Vectors Group").property(5).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotleft2Path_shapeVertices = [
            [129.87255859375, -208.665954589844],
            [-129.872436523438, -208.665954589844],
            [-129.872436523438, 208.666015625],
            [129.87255859375, 208.666015625]
        ];
        var fibonacciBotleft2Path_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleft2Path_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleft2Path_shapeClosed = true;
        createStaticShape(fibonacciBotleft2Path, fibonacciBotleft2Path_shapeVertices, fibonacciBotleft2Path_shapeInTangets, fibonacciBotleft2Path_shapeOutTangets, fibonacciBotleft2Path_shapeClosed);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(5).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(5).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(5).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(5).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(5).property(3).property("ADBE Vector Position").setValue([1238.48046875, 888.712036132812]);
        fibonacciBotleft2.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(6).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotleft2Path = fibonacciBotleft2.property("ADBE Root Vectors Group").property(6).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotleft2Path_shapeVertices = [
            [-213.573486328125, -208.665954589844],
            [213.573486328125, -208.665954589844],
            [213.573486328125, 208.666015625],
            [-213.573486328125, 208.666015625]
        ];
        var fibonacciBotleft2Path_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleft2Path_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleft2Path_shapeClosed = true;
        createStaticShape(fibonacciBotleft2Path, fibonacciBotleft2Path_shapeVertices, fibonacciBotleft2Path_shapeInTangets, fibonacciBotleft2Path_shapeOutTangets, fibonacciBotleft2Path_shapeClosed);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(6).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(6).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(6).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(6).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(6).property(3).property("ADBE Vector Position").setValue([1581.92651367188, 888.712036132812]);
        fibonacciBotleft2.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(7).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotleft2Path = fibonacciBotleft2.property("ADBE Root Vectors Group").property(7).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotleft2Path_shapeVertices = [
            [-343.446044921875, 338.773040771484],
            [343.446044921875, 338.773040771484],
            [343.446044921875, -338.773040771484],
            [-343.446044921875, -338.773040771484]
        ];
        var fibonacciBotleft2Path_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleft2Path_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleft2Path_shapeClosed = true;
        createStaticShape(fibonacciBotleft2Path, fibonacciBotleft2Path_shapeVertices, fibonacciBotleft2Path_shapeInTangets, fibonacciBotleft2Path_shapeOutTangets, fibonacciBotleft2Path_shapeClosed);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(7).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(7).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(7).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(7).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(7).property(3).property("ADBE Vector Position").setValue([1452.05407714844, 341.273040771484]);
        fibonacciBotleft2.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(8).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotleft2Path = fibonacciBotleft2.property("ADBE Root Vectors Group").property(8).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotleft2Path_shapeVertices = [
            [553.054016113281, 547.439086914062],
            [-553.054016113281, 547.439086914062],
            [-553.054016113281, -547.439086914062],
            [553.054016113281, -547.439086914062]
        ];
        var fibonacciBotleft2Path_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleft2Path_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleft2Path_shapeClosed = true;
        createStaticShape(fibonacciBotleft2Path, fibonacciBotleft2Path_shapeVertices, fibonacciBotleft2Path_shapeInTangets, fibonacciBotleft2Path_shapeOutTangets, fibonacciBotleft2Path_shapeClosed);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(8).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(8).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(8).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(8).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(8).property(3).property("ADBE Vector Position").setValue([555.554016113281, 549.939086914062]);
        fibonacciBotleft2.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(9).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotleft2Path = fibonacciBotleft2.property("ADBE Root Vectors Group").property(9).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotleft2Path_shapeVertices = [
            [-896.5, 551.08349609375],
            [206.142822265625, -551.08349609375],
            [896.5, 119.636474609375],
            [469.35302734375, 543.79443359375],
            [210.10791015625, 286.202453613281],
            [371.4638671875, 126.443420410156],
            [469.10791015625, 224.019409179688],
            [374.7568359375, 243.879455566406],
            [408.3798828125, 224.019409179688]
        ];
        var fibonacciBotleft2Path_shapeInTangets = [
            [0, 0],
            [-900.390808105469, 0],
            [0, -192.01806640625],
            [282.52294921875, 0],
            [0, 122.471984863281],
            [-60.35595703125, 0],
            [2.39111328125, -32.3589477539062],
            [-14.44482421875, 66.2210083007812],
            [-7.125, 0]
        ];
        var fibonacciBotleft2Path_shapeOutTangets = [
            [0, -269.244018554688],
            [543.355224609375, 0],
            [0, 192.018005371094],
            [-152.7451171875, -0.113037109375],
            [0, -105.634033203125],
            [62.4990234375, -0.802978515625],
            [-0.4130859375, 68.18505859375],
            [4.01611328125, -18.4110107421875],
            [0, 0]
        ];
        var fibonacciBotleft2Path_shapeClosed = false;
        createStaticShape(fibonacciBotleft2Path, fibonacciBotleft2Path_shapeVertices, fibonacciBotleft2Path_shapeInTangets, fibonacciBotleft2Path_shapeOutTangets, fibonacciBotleft2Path_shapeClosed);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(9).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(9).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(9).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(9).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(9).property(3).property("ADBE Vector Position").setValue([899.000305175781, 553.583984375]);
        fibonacciBotleft2.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(10).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotleft2Path = fibonacciBotleft2.property("ADBE Root Vectors Group").property(10).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotleft2Path_shapeVertices = [
            [896.5, 547.439086914062],
            [-896.5, 547.439086914062],
            [-896.5, -547.439086914062],
            [896.5, -547.439086914062]
        ];
        var fibonacciBotleft2Path_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleft2Path_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleft2Path_shapeClosed = true;
        createStaticShape(fibonacciBotleft2Path, fibonacciBotleft2Path_shapeVertices, fibonacciBotleft2Path_shapeInTangets, fibonacciBotleft2Path_shapeOutTangets, fibonacciBotleft2Path_shapeClosed);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(10).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(10).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(10).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(10).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotleft2.property("ADBE Root Vectors Group").property(10).property(3).property("ADBE Vector Position").setValue([899, 549.939086914062]);
        fibonacciBotleft2.property("ADBE Transform Group").property("ADBE Anchor Point").setValue([2.03021009762595, 1097.96786137334, 0]);
        fibonacciBotleft2.property("ADBE Transform Group").property("ADBE Position").setValue([8.83744337862004, -0.93501281738315, 0]);
        fibonacciBotleft2.property("ADBE Transform Group").property("ADBE Scale").setValue([-106.2107, 98.57228948028, 100]);
        fibonacciBotleft2.property("ADBE Transform Group").property("ADBE Rotate Z").setValue(180);
        fibonacciBotleft2.property("ADBE Transform Group").property("ADBE Opacity").setValue(81);
        var fibonacciBotleft = precomp2_comp.layers.addShape();
        fibonacciBotleft.name = "Fib - Bottom Left";
        fibonacciBotleft.moveToEnd();
        fibonacciBotleft.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotleft.property("ADBE Root Vectors Group").property(1).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotleftPath = fibonacciBotleft.property("ADBE Root Vectors Group").property(1).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotleftPath_shapeVertices = [
            [-30.4864501953125, 31.0914916992188],
            [30.486572265625, 31.0914916992188],
            [30.486572265625, -31.0914916992188],
            [-30.4864501953125, -31.0914916992188]
        ];
        var fibonacciBotleftPath_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleftPath_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleftPath_shapeClosed = true;
        createStaticShape(fibonacciBotleftPath, fibonacciBotleftPath_shapeVertices, fibonacciBotleftPath_shapeInTangets, fibonacciBotleftPath_shapeOutTangets, fibonacciBotleftPath_shapeClosed);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(1).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotleft.property("ADBE Root Vectors Group").property(1).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(1).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(1).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(1).property(3).property("ADBE Vector Position").setValue([1337.86645507812, 808.695617675781]);
        fibonacciBotleft.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotleft.property("ADBE Root Vectors Group").property(2).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotleftPath = fibonacciBotleft.property("ADBE Root Vectors Group").property(2).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotleftPath_shapeVertices = [
            [17.4134521484375, 19.5029907226562],
            [-17.41357421875, 19.5029907226562],
            [-17.41357421875, -19.5029907226562],
            [17.4134521484375, -19.5029907226562]
        ];
        var fibonacciBotleftPath_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleftPath_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleftPath_shapeClosed = true;
        createStaticShape(fibonacciBotleftPath, fibonacciBotleftPath_shapeVertices, fibonacciBotleftPath_shapeInTangets, fibonacciBotleftPath_shapeOutTangets, fibonacciBotleftPath_shapeClosed);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(2).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotleft.property("ADBE Root Vectors Group").property(2).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(2).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(2).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(2).property(3).property("ADBE Vector Position").setValue([1289.96655273438, 820.284118652344]);
        fibonacciBotleft.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotleft.property("ADBE Root Vectors Group").property(3).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotleftPath = fibonacciBotleft.property("ADBE Root Vectors Group").property(3).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotleftPath_shapeVertices = [
            [17.4134521484375, -11.5885009765625],
            [-17.41357421875, -11.5885009765625],
            [-17.41357421875, 11.5885009765625],
            [17.4134521484375, 11.5885009765625]
        ];
        var fibonacciBotleftPath_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleftPath_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleftPath_shapeClosed = true;
        createStaticShape(fibonacciBotleftPath, fibonacciBotleftPath_shapeVertices, fibonacciBotleftPath_shapeInTangets, fibonacciBotleftPath_shapeOutTangets, fibonacciBotleftPath_shapeClosed);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(3).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotleft.property("ADBE Root Vectors Group").property(3).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(3).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(3).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(3).property(3).property("ADBE Vector Position").setValue([1289.96655273438, 789.192626953125]);
        fibonacciBotleft.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotleft.property("ADBE Root Vectors Group").property(4).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotleftPath = fibonacciBotleft.property("ADBE Root Vectors Group").property(4).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotleftPath_shapeVertices = [
            [129.87255859375, -79.8705444335938],
            [-129.872436523438, -79.8705444335938],
            [-129.872436523438, 79.8704833984375],
            [129.87255859375, 79.8704833984375]
        ];
        var fibonacciBotleftPath_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleftPath_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleftPath_shapeClosed = true;
        createStaticShape(fibonacciBotleftPath, fibonacciBotleftPath_shapeVertices, fibonacciBotleftPath_shapeInTangets, fibonacciBotleftPath_shapeOutTangets, fibonacciBotleftPath_shapeClosed);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(4).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotleft.property("ADBE Root Vectors Group").property(4).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(4).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(4).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(4).property(3).property("ADBE Vector Position").setValue([1238.48046875, 759.916625976562]);
        fibonacciBotleft.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotleft.property("ADBE Root Vectors Group").property(5).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotleftPath = fibonacciBotleft.property("ADBE Root Vectors Group").property(5).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotleftPath_shapeVertices = [
            [129.87255859375, -208.665954589844],
            [-129.872436523438, -208.665954589844],
            [-129.872436523438, 208.666015625],
            [129.87255859375, 208.666015625]
        ];
        var fibonacciBotleftPath_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleftPath_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleftPath_shapeClosed = true;
        createStaticShape(fibonacciBotleftPath, fibonacciBotleftPath_shapeVertices, fibonacciBotleftPath_shapeInTangets, fibonacciBotleftPath_shapeOutTangets, fibonacciBotleftPath_shapeClosed);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(5).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotleft.property("ADBE Root Vectors Group").property(5).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(5).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(5).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(5).property(3).property("ADBE Vector Position").setValue([1238.48046875, 888.712036132812]);
        fibonacciBotleft.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotleft.property("ADBE Root Vectors Group").property(6).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotleftPath = fibonacciBotleft.property("ADBE Root Vectors Group").property(6).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotleftPath_shapeVertices = [
            [-213.573486328125, -208.665954589844],
            [213.573486328125, -208.665954589844],
            [213.573486328125, 208.666015625],
            [-213.573486328125, 208.666015625]
        ];
        var fibonacciBotleftPath_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleftPath_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleftPath_shapeClosed = true;
        createStaticShape(fibonacciBotleftPath, fibonacciBotleftPath_shapeVertices, fibonacciBotleftPath_shapeInTangets, fibonacciBotleftPath_shapeOutTangets, fibonacciBotleftPath_shapeClosed);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(6).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotleft.property("ADBE Root Vectors Group").property(6).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(6).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(6).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(6).property(3).property("ADBE Vector Position").setValue([1581.92651367188, 888.712036132812]);
        fibonacciBotleft.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotleft.property("ADBE Root Vectors Group").property(7).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotleftPath = fibonacciBotleft.property("ADBE Root Vectors Group").property(7).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotleftPath_shapeVertices = [
            [-343.446044921875, 338.773040771484],
            [343.446044921875, 338.773040771484],
            [343.446044921875, -338.773040771484],
            [-343.446044921875, -338.773040771484]
        ];
        var fibonacciBotleftPath_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleftPath_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleftPath_shapeClosed = true;
        createStaticShape(fibonacciBotleftPath, fibonacciBotleftPath_shapeVertices, fibonacciBotleftPath_shapeInTangets, fibonacciBotleftPath_shapeOutTangets, fibonacciBotleftPath_shapeClosed);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(7).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotleft.property("ADBE Root Vectors Group").property(7).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(7).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(7).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(7).property(3).property("ADBE Vector Position").setValue([1452.05407714844, 341.273040771484]);
        fibonacciBotleft.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotleft.property("ADBE Root Vectors Group").property(8).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotleftPath = fibonacciBotleft.property("ADBE Root Vectors Group").property(8).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotleftPath_shapeVertices = [
            [553.054016113281, 547.439086914062],
            [-553.054016113281, 547.439086914062],
            [-553.054016113281, -547.439086914062],
            [553.054016113281, -547.439086914062]
        ];
        var fibonacciBotleftPath_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleftPath_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleftPath_shapeClosed = true;
        createStaticShape(fibonacciBotleftPath, fibonacciBotleftPath_shapeVertices, fibonacciBotleftPath_shapeInTangets, fibonacciBotleftPath_shapeOutTangets, fibonacciBotleftPath_shapeClosed);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(8).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotleft.property("ADBE Root Vectors Group").property(8).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(8).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(8).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(8).property(3).property("ADBE Vector Position").setValue([555.554016113281, 549.939086914062]);
        fibonacciBotleft.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotleft.property("ADBE Root Vectors Group").property(9).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotleftPath = fibonacciBotleft.property("ADBE Root Vectors Group").property(9).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotleftPath_shapeVertices = [
            [-896.5, 551.08349609375],
            [206.142822265625, -551.08349609375],
            [896.5, 119.636474609375],
            [469.35302734375, 543.79443359375],
            [210.10791015625, 286.202453613281],
            [371.4638671875, 126.443420410156],
            [469.10791015625, 224.019409179688],
            [374.7568359375, 243.879455566406],
            [408.3798828125, 224.019409179688]
        ];
        var fibonacciBotleftPath_shapeInTangets = [
            [0, 0],
            [-900.390808105469, 0],
            [0, -192.01806640625],
            [282.52294921875, 0],
            [0, 122.471984863281],
            [-60.35595703125, 0],
            [2.39111328125, -32.3589477539062],
            [-14.44482421875, 66.2210083007812],
            [-7.125, 0]
        ];
        var fibonacciBotleftPath_shapeOutTangets = [
            [0, -269.244018554688],
            [543.355224609375, 0],
            [0, 192.018005371094],
            [-152.7451171875, -0.113037109375],
            [0, -105.634033203125],
            [62.4990234375, -0.802978515625],
            [-0.4130859375, 68.18505859375],
            [4.01611328125, -18.4110107421875],
            [0, 0]
        ];
        var fibonacciBotleftPath_shapeClosed = false;
        createStaticShape(fibonacciBotleftPath, fibonacciBotleftPath_shapeVertices, fibonacciBotleftPath_shapeInTangets, fibonacciBotleftPath_shapeOutTangets, fibonacciBotleftPath_shapeClosed);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(9).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotleft.property("ADBE Root Vectors Group").property(9).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(9).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(9).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(9).property(3).property("ADBE Vector Position").setValue([899.000305175781, 553.583984375]);
        fibonacciBotleft.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotleft.property("ADBE Root Vectors Group").property(10).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotleftPath = fibonacciBotleft.property("ADBE Root Vectors Group").property(10).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotleftPath_shapeVertices = [
            [896.5, 547.439086914062],
            [-896.5, 547.439086914062],
            [-896.5, -547.439086914062],
            [896.5, -547.439086914062]
        ];
        var fibonacciBotleftPath_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleftPath_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotleftPath_shapeClosed = true;
        createStaticShape(fibonacciBotleftPath, fibonacciBotleftPath_shapeVertices, fibonacciBotleftPath_shapeInTangets, fibonacciBotleftPath_shapeOutTangets, fibonacciBotleftPath_shapeClosed);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(10).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotleft.property("ADBE Root Vectors Group").property(10).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(10).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(10).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotleft.property("ADBE Root Vectors Group").property(10).property(3).property("ADBE Vector Position").setValue([899, 549.939086914062]);
        fibonacciBotleft.property("ADBE Transform Group").property("ADBE Anchor Point").setValue([2.03021009762595, 1097.96786137334, 0]);
        fibonacciBotleft.property("ADBE Transform Group").property("ADBE Position").setValue([1910.49896714384, 1079.16381835938, 0]);
        fibonacciBotleft.property("ADBE Transform Group").property("ADBE Scale").setValue([-106.2107, 98.57228948028, 100]);
        fibonacciBotleft.property("ADBE Transform Group").property("ADBE Opacity").setValue(81);
        var fibonacciBotright2 = precomp2_comp.layers.addShape();
        fibonacciBotright2.name = "Fib - ";
        fibonacciBotright2.moveToEnd();
        fibonacciBotright2.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotright2.property("ADBE Root Vectors Group").property(1).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotright2Path = fibonacciBotright2.property("ADBE Root Vectors Group").property(1).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotright2Path_shapeVertices = [
            [-30.4864501953125, 31.0914916992188],
            [30.486572265625, 31.0914916992188],
            [30.486572265625, -31.0914916992188],
            [-30.4864501953125, -31.0914916992188]
        ];
        var fibonacciBotright2Path_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotright2Path_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotright2Path_shapeClosed = true;
        createStaticShape(fibonacciBotright2Path, fibonacciBotright2Path_shapeVertices, fibonacciBotright2Path_shapeInTangets, fibonacciBotright2Path_shapeOutTangets, fibonacciBotright2Path_shapeClosed);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(1).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotright2.property("ADBE Root Vectors Group").property(1).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(1).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(1).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(1).property(3).property("ADBE Vector Position").setValue([1337.86645507812, 808.695617675781]);
        fibonacciBotright2.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotright2.property("ADBE Root Vectors Group").property(2).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotright2Path = fibonacciBotright2.property("ADBE Root Vectors Group").property(2).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotright2Path_shapeVertices = [
            [17.4134521484375, 19.5029907226562],
            [-17.41357421875, 19.5029907226562],
            [-17.41357421875, -19.5029907226562],
            [17.4134521484375, -19.5029907226562]
        ];
        var fibonacciBotright2Path_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotright2Path_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotright2Path_shapeClosed = true;
        createStaticShape(fibonacciBotright2Path, fibonacciBotright2Path_shapeVertices, fibonacciBotright2Path_shapeInTangets, fibonacciBotright2Path_shapeOutTangets, fibonacciBotright2Path_shapeClosed);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(2).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotright2.property("ADBE Root Vectors Group").property(2).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(2).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(2).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(2).property(3).property("ADBE Vector Position").setValue([1289.96655273438, 820.284118652344]);
        fibonacciBotright2.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotright2.property("ADBE Root Vectors Group").property(3).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotright2Path = fibonacciBotright2.property("ADBE Root Vectors Group").property(3).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotright2Path_shapeVertices = [
            [17.4134521484375, -11.5885009765625],
            [-17.41357421875, -11.5885009765625],
            [-17.41357421875, 11.5885009765625],
            [17.4134521484375, 11.5885009765625]
        ];
        var fibonacciBotright2Path_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotright2Path_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotright2Path_shapeClosed = true;
        createStaticShape(fibonacciBotright2Path, fibonacciBotright2Path_shapeVertices, fibonacciBotright2Path_shapeInTangets, fibonacciBotright2Path_shapeOutTangets, fibonacciBotright2Path_shapeClosed);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(3).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotright2.property("ADBE Root Vectors Group").property(3).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(3).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(3).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(3).property(3).property("ADBE Vector Position").setValue([1289.96655273438, 789.192626953125]);
        fibonacciBotright2.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotright2.property("ADBE Root Vectors Group").property(4).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotright2Path = fibonacciBotright2.property("ADBE Root Vectors Group").property(4).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotright2Path_shapeVertices = [
            [129.87255859375, -79.8705444335938],
            [-129.872436523438, -79.8705444335938],
            [-129.872436523438, 79.8704833984375],
            [129.87255859375, 79.8704833984375]
        ];
        var fibonacciBotright2Path_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotright2Path_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotright2Path_shapeClosed = true;
        createStaticShape(fibonacciBotright2Path, fibonacciBotright2Path_shapeVertices, fibonacciBotright2Path_shapeInTangets, fibonacciBotright2Path_shapeOutTangets, fibonacciBotright2Path_shapeClosed);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(4).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotright2.property("ADBE Root Vectors Group").property(4).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(4).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(4).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(4).property(3).property("ADBE Vector Position").setValue([1238.48046875, 759.916625976562]);
        fibonacciBotright2.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotright2.property("ADBE Root Vectors Group").property(5).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotright2Path = fibonacciBotright2.property("ADBE Root Vectors Group").property(5).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotright2Path_shapeVertices = [
            [129.87255859375, -208.665954589844],
            [-129.872436523438, -208.665954589844],
            [-129.872436523438, 208.666015625],
            [129.87255859375, 208.666015625]
        ];
        var fibonacciBotright2Path_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotright2Path_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotright2Path_shapeClosed = true;
        createStaticShape(fibonacciBotright2Path, fibonacciBotright2Path_shapeVertices, fibonacciBotright2Path_shapeInTangets, fibonacciBotright2Path_shapeOutTangets, fibonacciBotright2Path_shapeClosed);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(5).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotright2.property("ADBE Root Vectors Group").property(5).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(5).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(5).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(5).property(3).property("ADBE Vector Position").setValue([1238.48046875, 888.712036132812]);
        fibonacciBotright2.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotright2.property("ADBE Root Vectors Group").property(6).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotright2Path = fibonacciBotright2.property("ADBE Root Vectors Group").property(6).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotright2Path_shapeVertices = [
            [-213.573486328125, -208.665954589844],
            [213.573486328125, -208.665954589844],
            [213.573486328125, 208.666015625],
            [-213.573486328125, 208.666015625]
        ];
        var fibonacciBotright2Path_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotright2Path_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotright2Path_shapeClosed = true;
        createStaticShape(fibonacciBotright2Path, fibonacciBotright2Path_shapeVertices, fibonacciBotright2Path_shapeInTangets, fibonacciBotright2Path_shapeOutTangets, fibonacciBotright2Path_shapeClosed);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(6).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotright2.property("ADBE Root Vectors Group").property(6).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(6).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(6).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(6).property(3).property("ADBE Vector Position").setValue([1581.92651367188, 888.712036132812]);
        fibonacciBotright2.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotright2.property("ADBE Root Vectors Group").property(7).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotright2Path = fibonacciBotright2.property("ADBE Root Vectors Group").property(7).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotright2Path_shapeVertices = [
            [-343.446044921875, 338.773040771484],
            [343.446044921875, 338.773040771484],
            [343.446044921875, -338.773040771484],
            [-343.446044921875, -338.773040771484]
        ];
        var fibonacciBotright2Path_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotright2Path_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotright2Path_shapeClosed = true;
        createStaticShape(fibonacciBotright2Path, fibonacciBotright2Path_shapeVertices, fibonacciBotright2Path_shapeInTangets, fibonacciBotright2Path_shapeOutTangets, fibonacciBotright2Path_shapeClosed);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(7).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotright2.property("ADBE Root Vectors Group").property(7).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(7).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(7).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(7).property(3).property("ADBE Vector Position").setValue([1452.05407714844, 341.273040771484]);
        fibonacciBotright2.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotright2.property("ADBE Root Vectors Group").property(8).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotright2Path = fibonacciBotright2.property("ADBE Root Vectors Group").property(8).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotright2Path_shapeVertices = [
            [553.054016113281, 547.439086914062],
            [-553.054016113281, 547.439086914062],
            [-553.054016113281, -547.439086914062],
            [553.054016113281, -547.439086914062]
        ];
        var fibonacciBotright2Path_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotright2Path_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotright2Path_shapeClosed = true;
        createStaticShape(fibonacciBotright2Path, fibonacciBotright2Path_shapeVertices, fibonacciBotright2Path_shapeInTangets, fibonacciBotright2Path_shapeOutTangets, fibonacciBotright2Path_shapeClosed);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(8).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotright2.property("ADBE Root Vectors Group").property(8).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(8).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(8).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(8).property(3).property("ADBE Vector Position").setValue([555.554016113281, 549.939086914062]);
        fibonacciBotright2.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotright2.property("ADBE Root Vectors Group").property(9).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotright2Path = fibonacciBotright2.property("ADBE Root Vectors Group").property(9).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotright2Path_shapeVertices = [
            [-896.5, 551.08349609375],
            [206.142822265625, -551.08349609375],
            [896.5, 119.636474609375],
            [469.35302734375, 543.79443359375],
            [210.10791015625, 286.202453613281],
            [371.4638671875, 126.443420410156],
            [469.10791015625, 224.019409179688],
            [374.7568359375, 243.879455566406],
            [408.3798828125, 224.019409179688]
        ];
        var fibonacciBotright2Path_shapeInTangets = [
            [0, 0],
            [-900.390808105469, 0],
            [0, -192.01806640625],
            [282.52294921875, 0],
            [0, 122.471984863281],
            [-60.35595703125, 0],
            [2.39111328125, -32.3589477539062],
            [-14.44482421875, 66.2210083007812],
            [-7.125, 0]
        ];
        var fibonacciBotright2Path_shapeOutTangets = [
            [0, -269.244018554688],
            [543.355224609375, 0],
            [0, 192.018005371094],
            [-152.7451171875, -0.113037109375],
            [0, -105.634033203125],
            [62.4990234375, -0.802978515625],
            [-0.4130859375, 68.18505859375],
            [4.01611328125, -18.4110107421875],
            [0, 0]
        ];
        var fibonacciBotright2Path_shapeClosed = false;
        createStaticShape(fibonacciBotright2Path, fibonacciBotright2Path_shapeVertices, fibonacciBotright2Path_shapeInTangets, fibonacciBotright2Path_shapeOutTangets, fibonacciBotright2Path_shapeClosed);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(9).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotright2.property("ADBE Root Vectors Group").property(9).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(9).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(9).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(9).property(3).property("ADBE Vector Position").setValue([899.000305175781, 553.583984375]);
        fibonacciBotright2.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotright2.property("ADBE Root Vectors Group").property(10).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotright2Path = fibonacciBotright2.property("ADBE Root Vectors Group").property(10).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotright2Path_shapeVertices = [
            [896.5, 547.439086914062],
            [-896.5, 547.439086914062],
            [-896.5, -547.439086914062],
            [896.5, -547.439086914062]
        ];
        var fibonacciBotright2Path_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotright2Path_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotright2Path_shapeClosed = true;
        createStaticShape(fibonacciBotright2Path, fibonacciBotright2Path_shapeVertices, fibonacciBotright2Path_shapeInTangets, fibonacciBotright2Path_shapeOutTangets, fibonacciBotright2Path_shapeClosed);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(10).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotright2.property("ADBE Root Vectors Group").property(10).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(10).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(10).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotright2.property("ADBE Root Vectors Group").property(10).property(3).property("ADBE Vector Position").setValue([899, 549.939086914062]);
        fibonacciBotright2.property("ADBE Transform Group").property("ADBE Anchor Point").setValue([2.03021009762595, 1097.96786137334, 0]);
        fibonacciBotright2.property("ADBE Transform Group").property("ADBE Position").setValue([1920.98274993896, -0.93501281738338, 0]);
        fibonacciBotright2.property("ADBE Transform Group").property("ADBE Scale").setValue([107.210746821022, 98.57228948028, 100]);
        fibonacciBotright2.property("ADBE Transform Group").property("ADBE Rotate Z").setValue(180);
        fibonacciBotright2.property("ADBE Transform Group").property("ADBE Opacity").setValue(81);
        var fibonacciBotright = precomp2_comp.layers.addShape();
        fibonacciBotright.name = "Fibonacci - botright";
        fibonacciBotright.moveToEnd();
        fibonacciBotright.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotright.property("ADBE Root Vectors Group").property(1).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotrightPath = fibonacciBotright.property("ADBE Root Vectors Group").property(1).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotrightPath_shapeVertices = [
            [-30.4864501953125, 31.0914916992188],
            [30.486572265625, 31.0914916992188],
            [30.486572265625, -31.0914916992188],
            [-30.4864501953125, -31.0914916992188]
        ];
        var fibonacciBotrightPath_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotrightPath_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotrightPath_shapeClosed = true;
        createStaticShape(fibonacciBotrightPath, fibonacciBotrightPath_shapeVertices, fibonacciBotrightPath_shapeInTangets, fibonacciBotrightPath_shapeOutTangets, fibonacciBotrightPath_shapeClosed);
        fibonacciBotright.property("ADBE Root Vectors Group").property(1).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotright.property("ADBE Root Vectors Group").property(1).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotright.property("ADBE Root Vectors Group").property(1).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotright.property("ADBE Root Vectors Group").property(1).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotright.property("ADBE Root Vectors Group").property(1).property(3).property("ADBE Vector Position").setValue([1337.86645507812, 808.695617675781]);
        fibonacciBotright.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotright.property("ADBE Root Vectors Group").property(2).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotrightPath = fibonacciBotright.property("ADBE Root Vectors Group").property(2).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotrightPath_shapeVertices = [
            [17.4134521484375, 19.5029907226562],
            [-17.41357421875, 19.5029907226562],
            [-17.41357421875, -19.5029907226562],
            [17.4134521484375, -19.5029907226562]
        ];
        var fibonacciBotrightPath_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotrightPath_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotrightPath_shapeClosed = true;
        createStaticShape(fibonacciBotrightPath, fibonacciBotrightPath_shapeVertices, fibonacciBotrightPath_shapeInTangets, fibonacciBotrightPath_shapeOutTangets, fibonacciBotrightPath_shapeClosed);
        fibonacciBotright.property("ADBE Root Vectors Group").property(2).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotright.property("ADBE Root Vectors Group").property(2).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotright.property("ADBE Root Vectors Group").property(2).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotright.property("ADBE Root Vectors Group").property(2).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotright.property("ADBE Root Vectors Group").property(2).property(3).property("ADBE Vector Position").setValue([1289.96655273438, 820.284118652344]);
        fibonacciBotright.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotright.property("ADBE Root Vectors Group").property(3).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotrightPath = fibonacciBotright.property("ADBE Root Vectors Group").property(3).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotrightPath_shapeVertices = [
            [17.4134521484375, -11.5885009765625],
            [-17.41357421875, -11.5885009765625],
            [-17.41357421875, 11.5885009765625],
            [17.4134521484375, 11.5885009765625]
        ];
        var fibonacciBotrightPath_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotrightPath_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotrightPath_shapeClosed = true;
        createStaticShape(fibonacciBotrightPath, fibonacciBotrightPath_shapeVertices, fibonacciBotrightPath_shapeInTangets, fibonacciBotrightPath_shapeOutTangets, fibonacciBotrightPath_shapeClosed);
        fibonacciBotright.property("ADBE Root Vectors Group").property(3).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotright.property("ADBE Root Vectors Group").property(3).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotright.property("ADBE Root Vectors Group").property(3).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotright.property("ADBE Root Vectors Group").property(3).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotright.property("ADBE Root Vectors Group").property(3).property(3).property("ADBE Vector Position").setValue([1289.96655273438, 789.192626953125]);
        fibonacciBotright.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotright.property("ADBE Root Vectors Group").property(4).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotrightPath = fibonacciBotright.property("ADBE Root Vectors Group").property(4).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotrightPath_shapeVertices = [
            [129.87255859375, -79.8705444335938],
            [-129.872436523438, -79.8705444335938],
            [-129.872436523438, 79.8704833984375],
            [129.87255859375, 79.8704833984375]
        ];
        var fibonacciBotrightPath_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotrightPath_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotrightPath_shapeClosed = true;
        createStaticShape(fibonacciBotrightPath, fibonacciBotrightPath_shapeVertices, fibonacciBotrightPath_shapeInTangets, fibonacciBotrightPath_shapeOutTangets, fibonacciBotrightPath_shapeClosed);
        fibonacciBotright.property("ADBE Root Vectors Group").property(4).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotright.property("ADBE Root Vectors Group").property(4).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotright.property("ADBE Root Vectors Group").property(4).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotright.property("ADBE Root Vectors Group").property(4).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotright.property("ADBE Root Vectors Group").property(4).property(3).property("ADBE Vector Position").setValue([1238.48046875, 759.916625976562]);
        fibonacciBotright.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotright.property("ADBE Root Vectors Group").property(5).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotrightPath = fibonacciBotright.property("ADBE Root Vectors Group").property(5).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotrightPath_shapeVertices = [
            [129.87255859375, -208.665954589844],
            [-129.872436523438, -208.665954589844],
            [-129.872436523438, 208.666015625],
            [129.87255859375, 208.666015625]
        ];
        var fibonacciBotrightPath_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotrightPath_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotrightPath_shapeClosed = true;
        createStaticShape(fibonacciBotrightPath, fibonacciBotrightPath_shapeVertices, fibonacciBotrightPath_shapeInTangets, fibonacciBotrightPath_shapeOutTangets, fibonacciBotrightPath_shapeClosed);
        fibonacciBotright.property("ADBE Root Vectors Group").property(5).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotright.property("ADBE Root Vectors Group").property(5).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotright.property("ADBE Root Vectors Group").property(5).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotright.property("ADBE Root Vectors Group").property(5).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotright.property("ADBE Root Vectors Group").property(5).property(3).property("ADBE Vector Position").setValue([1238.48046875, 888.712036132812]);
        fibonacciBotright.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotright.property("ADBE Root Vectors Group").property(6).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotrightPath = fibonacciBotright.property("ADBE Root Vectors Group").property(6).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotrightPath_shapeVertices = [
            [-213.573486328125, -208.665954589844],
            [213.573486328125, -208.665954589844],
            [213.573486328125, 208.666015625],
            [-213.573486328125, 208.666015625]
        ];
        var fibonacciBotrightPath_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotrightPath_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotrightPath_shapeClosed = true;
        createStaticShape(fibonacciBotrightPath, fibonacciBotrightPath_shapeVertices, fibonacciBotrightPath_shapeInTangets, fibonacciBotrightPath_shapeOutTangets, fibonacciBotrightPath_shapeClosed);
        fibonacciBotright.property("ADBE Root Vectors Group").property(6).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotright.property("ADBE Root Vectors Group").property(6).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotright.property("ADBE Root Vectors Group").property(6).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotright.property("ADBE Root Vectors Group").property(6).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotright.property("ADBE Root Vectors Group").property(6).property(3).property("ADBE Vector Position").setValue([1581.92651367188, 888.712036132812]);
        fibonacciBotright.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotright.property("ADBE Root Vectors Group").property(7).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotrightPath = fibonacciBotright.property("ADBE Root Vectors Group").property(7).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotrightPath_shapeVertices = [
            [-343.446044921875, 338.773040771484],
            [343.446044921875, 338.773040771484],
            [343.446044921875, -338.773040771484],
            [-343.446044921875, -338.773040771484]
        ];
        var fibonacciBotrightPath_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotrightPath_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotrightPath_shapeClosed = true;
        createStaticShape(fibonacciBotrightPath, fibonacciBotrightPath_shapeVertices, fibonacciBotrightPath_shapeInTangets, fibonacciBotrightPath_shapeOutTangets, fibonacciBotrightPath_shapeClosed);
        fibonacciBotright.property("ADBE Root Vectors Group").property(7).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotright.property("ADBE Root Vectors Group").property(7).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotright.property("ADBE Root Vectors Group").property(7).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotright.property("ADBE Root Vectors Group").property(7).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotright.property("ADBE Root Vectors Group").property(7).property(3).property("ADBE Vector Position").setValue([1452.05407714844, 341.273040771484]);
        fibonacciBotright.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotright.property("ADBE Root Vectors Group").property(8).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotrightPath = fibonacciBotright.property("ADBE Root Vectors Group").property(8).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotrightPath_shapeVertices = [
            [553.054016113281, 547.439086914062],
            [-553.054016113281, 547.439086914062],
            [-553.054016113281, -547.439086914062],
            [553.054016113281, -547.439086914062]
        ];
        var fibonacciBotrightPath_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotrightPath_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotrightPath_shapeClosed = true;
        createStaticShape(fibonacciBotrightPath, fibonacciBotrightPath_shapeVertices, fibonacciBotrightPath_shapeInTangets, fibonacciBotrightPath_shapeOutTangets, fibonacciBotrightPath_shapeClosed);
        fibonacciBotright.property("ADBE Root Vectors Group").property(8).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotright.property("ADBE Root Vectors Group").property(8).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotright.property("ADBE Root Vectors Group").property(8).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotright.property("ADBE Root Vectors Group").property(8).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotright.property("ADBE Root Vectors Group").property(8).property(3).property("ADBE Vector Position").setValue([555.554016113281, 549.939086914062]);
        fibonacciBotright.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotright.property("ADBE Root Vectors Group").property(9).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotrightPath = fibonacciBotright.property("ADBE Root Vectors Group").property(9).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotrightPath_shapeVertices = [
            [-896.5, 551.08349609375],
            [206.142822265625, -551.08349609375],
            [896.5, 119.636474609375],
            [469.35302734375, 543.79443359375],
            [210.10791015625, 286.202453613281],
            [371.4638671875, 126.443420410156],
            [469.10791015625, 224.019409179688],
            [374.7568359375, 243.879455566406],
            [408.3798828125, 224.019409179688]
        ];
        var fibonacciBotrightPath_shapeInTangets = [
            [0, 0],
            [-900.390808105469, 0],
            [0, -192.01806640625],
            [282.52294921875, 0],
            [0, 122.471984863281],
            [-60.35595703125, 0],
            [2.39111328125, -32.3589477539062],
            [-14.44482421875, 66.2210083007812],
            [-7.125, 0]
        ];
        var fibonacciBotrightPath_shapeOutTangets = [
            [0, -269.244018554688],
            [543.355224609375, 0],
            [0, 192.018005371094],
            [-152.7451171875, -0.113037109375],
            [0, -105.634033203125],
            [62.4990234375, -0.802978515625],
            [-0.4130859375, 68.18505859375],
            [4.01611328125, -18.4110107421875],
            [0, 0]
        ];
        var fibonacciBotrightPath_shapeClosed = false;
        createStaticShape(fibonacciBotrightPath, fibonacciBotrightPath_shapeVertices, fibonacciBotrightPath_shapeInTangets, fibonacciBotrightPath_shapeOutTangets, fibonacciBotrightPath_shapeClosed);
        fibonacciBotright.property("ADBE Root Vectors Group").property(9).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotright.property("ADBE Root Vectors Group").property(9).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotright.property("ADBE Root Vectors Group").property(9).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotright.property("ADBE Root Vectors Group").property(9).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotright.property("ADBE Root Vectors Group").property(9).property(3).property("ADBE Vector Position").setValue([899.000305175781, 553.583984375]);
        fibonacciBotright.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        fibonacciBotright.property("ADBE Root Vectors Group").property(10).property(2).addProperty("ADBE Vector Shape - Group");
        var fibonacciBotrightPath = fibonacciBotright.property("ADBE Root Vectors Group").property(10).property(2).property(1).property("ADBE Vector Shape");
        var fibonacciBotrightPath_shapeVertices = [
            [896.5, 547.439086914062],
            [-896.5, 547.439086914062],
            [-896.5, -547.439086914062],
            [896.5, -547.439086914062]
        ];
        var fibonacciBotrightPath_shapeInTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotrightPath_shapeOutTangets = [
            [0, 0],
            [0, 0],
            [0, 0],
            [0, 0]
        ];
        var fibonacciBotrightPath_shapeClosed = true;
        createStaticShape(fibonacciBotrightPath, fibonacciBotrightPath_shapeVertices, fibonacciBotrightPath_shapeInTangets, fibonacciBotrightPath_shapeOutTangets, fibonacciBotrightPath_shapeClosed);
        fibonacciBotright.property("ADBE Root Vectors Group").property(10).property(2).addProperty("ADBE Vector Graphic - Stroke");
        fibonacciBotright.property("ADBE Root Vectors Group").property(10).property(2).property(2).property("ADBE Vector Stroke Color").setValue([0.1406556372549, 0.47949625651042, 1, 1]);
        fibonacciBotright.property("ADBE Root Vectors Group").property(10).property(2).property(2).property("ADBE Vector Stroke Width").setValue(4);
        fibonacciBotright.property("ADBE Root Vectors Group").property(10).property(2).property(2).property("ADBE Vector Stroke Miter Limit").setValue(10);
        fibonacciBotright.property("ADBE Root Vectors Group").property(10).property(3).property("ADBE Vector Position").setValue([899, 549.939086914062]);
        fibonacciBotright.property("ADBE Transform Group").property("ADBE Anchor Point").setValue([2.03021009762595, 1097.96786137334, 0]);
        fibonacciBotright.property("ADBE Transform Group").property("ADBE Position").setValue([-1.64633941650391, 1079.16381835938, 0]);
        fibonacciBotright.property("ADBE Transform Group").property("ADBE Scale").setValue([107.210746821022, 98.57228948028, 100]);
        fibonacciBotright.property("ADBE Transform Group").property("ADBE Opacity").setValue(81);
        var thisItemLayer = activeComp.layers.add(precomp2_comp);
        activeComp.openInViewer();
        app.endUndoGroup();

        function getProjectItem(itemName, itemInstanceName) {
            for (var i = 1; i < app.project.numItems; i += 1) {
                var myItem = app.project.item(i);
                if (myItem instanceof itemInstanceName && myItem.name === itemName) {
                    return myItem;
                }
            }
            return null;
        }

        function getItemInFolder(folderObject, itemName, itemInstanceName) {
            if (folderObject.numItems > 0) {
                for (var i = 1; i <= folderObject.numItems; i += 1) {
                    var curItem = folderObject.item(i);
                    if (curItem.name === itemName && curItem.mainSource instanceof itemInstanceName) {
                        return curItem;
                    }
                }
            }
            return null;
        }

        function createStaticShape(path, vertexArray, inTangentsArray, outTangentsArray, closed) {
            var pathValue = path.value;
            pathValue.vertices = vertexArray;
            pathValue.inTangents = inTangentsArray;
            pathValue.outTangents = outTangentsArray;
            pathValue.closed = closed;
            path.setValue(pathValue);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);

    function check(name) {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run(name, before, seperator, prefix, suffix) {
        if (seperator === void(0)) {
            seperator = ":";
        }
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        app.beginUndoGroup("Rename");
        for (var i = composition.selectedLayers.length - 1; i >= 0; i--) {
            var selectedLayer = composition.selectedLayers[i];
            var moddedName = name ? name.split("[name]").join(selectedLayer.name).split("[index]").join(String(i + 1)) : selectedLayer.name;
            var newName = before === null ? "" + prefix ? prefix + seperator : "" + moddedName + suffix ? seperator + suffix : "" : (before ? "" + String(i + 1) + seperator + prefix ? prefix + seperator : "" + moddedName + suffix ? seperator + suffix : "" : "" + prefix ? prefix + seperator : "" + moddedName + suffix ? seperator + suffix : "" + seperator + String(i + 1));
            selectedLayer.name = newName;
        }
        app.endUndoGroup();
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);
    var ae_utils_1 = __webpack_require__(3);

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        app.beginUndoGroup("Null");
        var nullSize = 100;
        if (composition.selectedLayers.length === 0) {
            var proj = app.project;
            var target = composition.layers.addNull();
            target.name = ae_utils_1.getUniqueName(composition.layers, "NULL ");
            target.label = 9;
            target.source.width = nullSize;
            target.source.height = nullSize;
            target.anchorPoint.setValue([target.source.width / 2, target.source.height / 2]);
        } else {
            var theLayers = composition.selectedLayers;
            for (var num = 0; num < theLayers.length; num += 1) {
                var theLayer = theLayers[num];
                theLayer.parent = null;
            }
            var xmin = void(0);
            var xmax = void(0);
            var ymin = void(0);
            var ymax = void(0);
            var zmin = Infinity;
            var zmax = -Infinity;
            var newNull = void(0);
            if (composition !== null) {
                var selectedLayers = composition.selectedLayers;
                var allLayersAre3d = selectedLayers.filter(function(layer) {
                    if (layer instanceof ShapeLayer || layer instanceof TextLayer || layer instanceof AVLayer) {
                        return layer.threeDLayer === true;
                    }
                    return false;
                }).length === selectedLayers.length;
                if (selectedLayers.length > 0) {
                    minIndex = selectedLayers[0].index;
                    xmin = xmax = selectedLayers[0].property("Position").value[0];
                    ymin = ymax = selectedLayers[0].property("Position").value[1];
                    if (composition != null && composition instanceof CompItem) {
                        var myLayers = composition.selectedLayers;
                        if (myLayers.length != 0) {
                            var saveIn = composition.duration;
                            var saveOut = 0;
                            var saveIndex = composition.numLayers;
                            var newInpoint = composition.duration;
                            var newOutpoint = 0;
                            var myIndex = composition.numLayers;
                            for (var i = 0; i <= myLayers.length - 1; i += 1) {
                                var currentLayer = myLayers[i];
                                saveIn = currentLayer.stretch < 0 ? currentLayer.outPoint : currentLayer.inPoint;
                                saveOut = currentLayer.stretch < 0 ? currentLayer.inPoint : currentLayer.outPoint;
                                saveIndex = currentLayer.index;
                                if (saveIn < newInpoint) {
                                    newInpoint = saveIn;
                                }
                                if (saveOut > newOutpoint) {
                                    newOutpoint = saveOut;
                                }
                                if (saveIndex < myIndex) {
                                    myIndex = saveIndex;
                                }
                            }
                            newNull = composition.layers.addNull();
                            newNull.name = ae_utils_1.getUniqueName(composition.layers, "NULL CONTROL ");
                            newNull.source.width = nullSize;
                            newNull.source.height = nullSize;
                            newNull.inPoint = newInpoint;
                            newNull.outPoint = newOutpoint;
                            newNull.label = 9;
                            var ctr = 0;
                            for (var num = 0; num < selectedLayers.length; num += 1) {
                                lay = selectedLayers[num];
                                ctr++;
                                var xIn = lay.property("Position").value[0];
                                if (xIn > xmax) {
                                    xmax = xIn;
                                }
                                if (xIn < xmin) {
                                    xmin = xIn;
                                }
                                var yIn = lay.property("Position").value[1];
                                if (yIn > ymax) {
                                    ymax = yIn;
                                }
                                if (yIn < ymin) {
                                    ymin = yIn;
                                }
                                if (allLayersAre3d) {
                                    var zIn = lay.property("Position").value[2];
                                    if (zIn > zmax) {
                                        zmax = zIn;
                                    }
                                    if (zIn < zmin) {
                                        zmin = zIn;
                                    }
                                }
                            }
                            var xpos = ((xmax - xmin) / 2) + xmin;
                            var ypos = ((ymax - ymin) / 2) + ymin;
                            var zpos = ((zmax - zmin) / 2) + zmin;
                            if (allLayersAre3d) {
                                newNull.threeDLayer = true;
                                newNull.property("Position").setValue([xpos, ypos, zpos]);
                            } else {
                                newNull.property("Position").setValue([xpos, ypos]);
                            }
                            newNull.anchorPoint.setValue([newNull.source.width / 2, newNull.source.height / 2]);
                            for (var num = 0; num < selectedLayers.length; num += 1) {
                                var lay = selectedLayers[num];
                                lay.parent = newNull;
                                if (lay.index < minIndex) {
                                    minIndex = lay.index;
                                }
                            }
                        }
                        var lastLayer = composition.layer(myIndex);
                        var layer = composition.layer(myIndex + 1);
                        var isTrackMatte = lastLayer && lastLayer.enabled === false && layer instanceof ShapeLayer && layer.trackMatteType !== TrackMatteType.NO_TRACK_MATTE;
                        newNull.moveBefore(isTrackMatte ? lastLayer : layer);
                        newNull.label = 9;
                    }
                }
            }
        }
        app.endUndoGroup();
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = void(0);

    function containsAny(arr, search) {
        for (var i in arr) {
            if (search.indexOf(arr[i]) > -1) {
                return true;
            }
        }
        return false;
    }

    function itemHasIgnoredParentFolder(item, ignoredFolders) {
        var parentFolder = item.parentFolder;
        var ignoredFolderNames = ignoredFolders.map(function(ignoredFolder) {
            return ignoredFolder.name.toLocaleLowerCase();
        });
        if (ignoredFolderNames.indexOf(item.name.toLocaleLowerCase()) > -1) {
            return true;
        }
        while (parentFolder) {
            if (ignoredFolderNames.indexOf(parentFolder.name.toLocaleLowerCase()) > -1) {
                return true;
            }
            parentFolder = parentFolder.parentFolder;
        }
        return false;
    }

    function itemIsIgnoredFolder(item, ignoreFolders) {
        for (var i in ignoreFolders) {
            var ignoredFolder = ignoreFolders[i];
            if (ignoredFolder === item) {
                return true;
            }
        }
        return false;
    }

    function grabProjItems(itemType) {
        itemAry = [];
        proj = app.project;
        itemTotal = proj.numItems;
        for (var i = 1; i <= itemTotal; i += 1) {
            curItem = proj.item(i);
            if (curItem instanceof itemType) {
                itemAry[itemAry.length] = curItem;
            }
        }
        return itemAry;
    }

    function run(sortComposition, sortAudio, sortVideo, sortImages, sortOldFolder, sortAiPsd, sortNullsAndSolids, sortMissing, sortRemoveOldFolders, sortRemoveUnusedItems, sortPriorityLabel, sortIgnoreFolders, sortIgnored) {
        app.beginUndoGroup("Sort");
        var ignoreFoldersSearch = sortIgnoreFolders.split(",").map(function(label) {
            return label.toLocaleLowerCase();
        });
        var folders = grabProjItems(FolderItem);
        var ignoredFolders = folders.filter(function(folder) {
            return containsAny(ignoreFoldersSearch, folder.name.toLocaleLowerCase());
        });
        var prioritySearch = sortPriorityLabel.split(",").map(function(label) {
            return label.toLocaleLowerCase();
        });
        var compositionFolderItem = app.project.items.addFolder(sortComposition);
        compositionFolderItem.label = 9;
        var audioFolderItem = app.project.items.addFolder(sortAudio);
        audioFolderItem.label = 13;
        var videoFolderItem = app.project.items.addFolder(sortVideo);
        videoFolderItem.label = 3;
        var imageFolderItem = app.project.items.addFolder(sortImages);
        imageFolderItem.label = 10;
        var vectorFolderItem = app.project.items.addFolder(sortAiPsd);
        vectorFolderItem.label = 2;
        var solidFolderItem = app.project.items.addFolder(sortNullsAndSolids);
        solidFolderItem.label = 11;
        var missingFolderItem = app.project.items.addFolder(sortMissing);
        missingFolderItem.label = 1;
        var oldFolderItem = app.project.items.addFolder(sortOldFolder);
        oldFolderItem.label = 15;
        var ignoreFolderItem = app.project.items.addFolder(sortIgnored);
        ignoreFolderItem.label = 16;
        var ownFolders = [compositionFolderItem, audioFolderItem, videoFolderItem, imageFolderItem, vectorFolderItem, solidFolderItem, missingFolderItem, oldFolderItem, ignoreFolderItem];
        var allItems = [];
        for (var i = app.project.numItems; i > 0; i--) {
            var item = app.project.item(i);
            allItems.push(item);
        }
        allItems.forEach(function(item) {
            if (containsAny(prioritySearch, item.name.toLocaleLowerCase())) {
                item.parentFolder = app.project.rootFolder;
            } else if (itemIsIgnoredFolder(item, ignoredFolders)) {
                item.parentFolder = app.project.rootFolder;
                item.parentFolder = ignoreFolderItem;
            } else if (itemHasIgnoredParentFolder(item, ignoredFolders)) {

            } else if (item instanceof CompItem) {
                item.parentFolder = app.project.rootFolder;
                item.parentFolder = compositionFolderItem;
                item.label = 9;
            } else if (item instanceof FootageItem) {
                if (item.name.substr(-3) === ".ai" || item.name.substr(-4) === ".psd") {
                    item.parentFolder = app.project.rootFolder;
                    item.parentFolder = vectorFolderItem;
                    item.label = 2;
                } else if (item.footageMissing) {
                    item.parentFolder = app.project.rootFolder;
                    item.parentFolder = missingFolderItem;
                    item.label = 1;
                } else if (item.mainSource instanceof SolidSource) {
                    item.parentFolder = app.project.rootFolder;
                    item.parentFolder = solidFolderItem;
                    item.label = 11;
                } else if (item.mainSource.isStill) {
                    item.parentFolder = app.project.rootFolder;
                    item.parentFolder = imageFolderItem;
                    item.label = 10;
                } else if (item.hasVideo) {
                    item.parentFolder = app.project.rootFolder;
                    item.parentFolder = videoFolderItem;
                    item.label = 3;
                } else {
                    if (item.hasAudio) {
                        item.parentFolder = app.project.rootFolder;
                        item.parentFolder = audioFolderItem;
                        item.label = 13;
                    }
                }
            } else {
                if (item instanceof FolderItem) {
                    if (item !== oldFolderItem && ownFolders.indexOf(item) === -1) {
                        item.parentFolder = app.project.rootFolder;
                        item.parentFolder = oldFolderItem;
                        item.label = 15;
                    }
                }
            }
        });
        if (compositionFolderItem.numItems < 1) {
            compositionFolderItem.remove();
        }
        if (audioFolderItem.numItems < 1) {
            audioFolderItem.remove();
        }
        if (videoFolderItem.numItems < 1) {
            videoFolderItem.remove();
        }
        if (imageFolderItem.numItems < 1) {
            imageFolderItem.remove();
        }
        if (solidFolderItem.numItems < 1) {
            solidFolderItem.remove();
        }
        if (missingFolderItem.numItems < 1) {
            missingFolderItem.remove();
        }
        if (vectorFolderItem.numItems < 1) {
            vectorFolderItem.remove();
        }
        if (ignoreFolderItem.numItems < 1) {
            ignoreFolderItem.remove();
        }
        if (oldFolderItem.numItems < 1 || sortRemoveOldFolders) {
            oldFolderItem.remove();
        }
        if (sortRemoveUnusedItems) {
            app.beginSuppressDialogs();
            app.executeCommand(2109);
            app.endSuppressDialogs(false);
        }
        app.endUndoGroup();
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var utils_1 = __webpack_require__(1);
    var prereqs_1 = __webpack_require__(0);
    var constants_1 = __webpack_require__(4);

    function check() {
        return prereqs_1.runChecks(prereqs_1.checkTypes.HAS_PROJECT, prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION, prereqs_1.checkTypes.HAS_SELECTED_LAYER);
    }
    exports.check = check;

    function runTrash() {
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        var selectedLayers = composition.selectedLayers;
        var queue = [];
        selectedLayers.forEach(function(layer) {
            layer.selectedProperties.forEach(function(property) {
                if (!(property instanceof Property)) {
                    return;
                }
                try {
                    var regex = /META(.*)ENDMETA/g;
                    var matches = [];
                    if (property.expression) {
                        matches = property.expression.match(regex);
                        property.expression = "";
                    }
                    if (!matches || matches.length === 0) {
                        return;
                    }
                    var match = matches[0].replace(regex, "$1");
                    var meta_1 = JSON.parse(match);
                    queue.push(function() {
                        if (meta_1.tool === "midas") {
                            var effects = layer.property("ADBE Effect Parade");
                            var midasEffect = effects.property(meta_1.childEffectName);
                            if (midasEffect) {
                                property.expression = "";
                                midasEffect.remove();
                            }
                            var totalMidasEffects = 0;
                            for (var i = 1; i <= effects.numProperties; i += 1) {
                                var effect = effects.property(i);
                                if (effect.name.indexOf("[m") === 0) {
                                    totalMidasEffects += 1;
                                }
                            }
                            if (totalMidasEffects === 1) {
                                var childEffect = effects.property(constants_1.MIDAS_CHILD_EFFECT_NAME);
                                if (childEffect) {
                                    childEffect.remove();
                                }
                            }
                        }
                        if (meta_1.tool === "dynamics") {
                            var dynamicsComp = layer.containingComp;
                            var dynamicsLayer = layer;
                            if (!meta_1.effectIsOnThisLayer) {
                                dynamicsLayer = dynamicsComp.layer(meta_1.controllerLayer);
                            }
                            var effectControl = dynamicsLayer.property("ADBE Effect Parade").property(meta_1.name);
                            effectControl.remove();
                            if (!meta_1.effectIsOnThisLayer) {
                                var dynamicsEffects = dynamicsLayer.property("ADBE Effect Parade");
                                var totalDynamicsEffects = 0;
                                for (var i = 1; i <= dynamicsEffects.numProperties; i += 1) {
                                    var effect = dynamicsEffects.property(i);
                                    if (effect.name.indexOf("[d") === 0) {
                                        totalDynamicsEffects += 1;
                                    }
                                }
                                if (totalDynamicsEffects === 0) {
                                    dynamicsLayer.remove();
                                }
                            }
                        }
                    });
                } catch (err) {
                    if (property.expression) {
                        property.expression = ""
                    }
                }
            });
        });
        queue.forEach(function(fn) {
            try {
                fn();
            } catch (err) {

            }
        });
    }

    function run() {
        var checkResult = check();
        if (!checkResult.success) {
            return checkResult;
        }
        utils_1.catchErr(function() {
            return utils_1.undoable("Midas - Trash", runTrash);
        });
        return {
            success: true
        };
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);
    var utils_1 = __webpack_require__(1);
    var ffxMap_1 = __webpack_require__(2);

    function check() {
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run() {
        var checkResult = prereqs_1.runChecks();
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        utils_1.loadEffects();
        app.beginUndoGroup("Vignette");
        var precompLayers = 1;
        var compName = composition.name;
        var compLayers = composition.layers;
        var vignWidth = composition.width;
        var vignHeight = composition.height;
        var newVignBaseName = "Vignette BG";
        var newVignAlphaName = "Vignette Alpha";
        var vignBase = composition.layers.addSolid([0, 0, 0], "Vignette BG", vignWidth, vignHeight, composition.pixelAspect);
        vignBase.name = newVignBaseName;
        var vignAlpha = composition.layers.addShape();
        vignAlpha.name = newVignAlphaName;
        var createCircle = vignAlpha.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        createCircle.property("ADBE Vectors Group").addProperty("ADBE Vector Shape - Ellipse");
        createCircle.property("ADBE Vectors Group").property("ADBE Vector Shape - Ellipse").property("ADBE Vector Ellipse Size").setValue([vignHeight, vignHeight]);
        createCircle.property("ADBE Vectors Group").addProperty("ADBE Vector Graphic - Fill");
        createCircle.name = "Circle";
        var createOval = vignAlpha.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
        createOval.property("ADBE Vectors Group").addProperty("ADBE Vector Shape - Ellipse");
        createOval.property("ADBE Vectors Group").property("ADBE Vector Shape - Ellipse").property("ADBE Vector Ellipse Size").setValue([vignWidth, vignHeight]);
        createOval.property("ADBE Vectors Group").addProperty("ADBE Vector Graphic - Fill");
        createOval.name = "Ellipse";
        vignBase.trackMatteType = TrackMatteType.ALPHA_INVERTED;
        vignAlpha.property("ADBE Effect Parade").addProperty("ADBE Fast Blur");
        if (precompLayers) {
            var precompose_layers = [];
            precompose_layers[0] = vignBase.index;
            precompose_layers[1] = vignAlpha.index;
            var newPreCompName = "Vignette";
            var twoSidedPrecomp = compLayers.precompose(precompose_layers, newPreCompName, true);
            var twoSidedLayer = composition.selectedLayers[0];
            twoSidedLayer.collapseTransformation = true;
            twoSidedLayer.blendingMode = BlendingMode.CLASSIC_COLOR_BURN;
            twoSidedLayer.property("ADBE Transform Group").property("ADBE Opacity").setValue(85);
            var lockPositionExp = "xValue = thisComp.width / 2;\nyValue = thisComp.height / 2;\n \ntransform.position = [xValue, yValue];";
            var turnOnOff = "useColorOn = effect(\"" + ffxMap_1.
            default.vignette.pseudo + "\")(\"" + ffxMap_1.
            default.vignette.intensity + "\");\n" + "if (useColorOn == 0) {\n" + "value = 0;\n" + "} else {\n" + "value = value;\n" + "};";
            twoSidedLayer.property("ADBE Transform Group").property("ADBE Position").expression = lockPositionExp;
            if (twoSidedLayer("ADBE Effect Parade") !== null) {
                if (twoSidedLayer("ADBE Effect Parade").canAddProperty(ffxMap_1.
                default.vignette.pseudo)) {
                    var vignetteEffect = twoSidedLayer("ADBE Effect Parade").addProperty(ffxMap_1.
                    default.vignette.pseudo);
                    vignetteEffect.name = "Vignette";
                    vignetteEffect.property(ffxMap_1.
                    default.vignette.feather).setValue(224);
                    vignetteEffect.property(ffxMap_1.
                    default.vignette.feather).expression = "clamp(value, 0, 9999);";
                    vignetteEffect.property(ffxMap_1.
                    default.vignette.intensity).setValue(20);
                    vignetteEffect.property(ffxMap_1.
                    default.vignette.intensity).expression = "clamp(value, 0, 100);";
                    vignetteEffect.property(ffxMap_1.
                    default.vignette.scale).setValue(100);
                    vignetteEffect.property(ffxMap_1.
                    default.vignette.ellipse).setValue(1);
                }
            }
            var myIndex = compLayers.length;
            var thisNewName = newPreCompName + " " + myIndex;
            twoSidedLayer.name = thisNewName;
            twoSidedLayer.property("ADBE Transform Group").property("ADBE Opacity").expression = turnOnOff;
            var opacityExp = "opacity = comp(\"" + compName + "\").layer(\"" + thisNewName + "\").effect(\"" + ffxMap_1.
            default.vignette.pseudo + "\")(\"" + ffxMap_1.
            default.vignette.intensity + "\");\n";
            var featherExp = "feather = comp(\"" + compName + "\").layer(\"" + thisNewName + "\").effect(\"" + ffxMap_1.
            default.vignette.pseudo + "\")(\"" + ffxMap_1.
            default.vignette.feather + "\");\n";
            var scaleExp = "re_scale = comp(\"" + compName + "\").layer(\"" + thisNewName + "\").effect(\"" + ffxMap_1.
            default.vignette.pseudo + "\")(\"" + ffxMap_1.
            default.vignette.scale + "\");\n" + "[re_scale, re_scale];";
            var positionExp = "newPos = comp(\"" + compName + "\").layer(\"" + thisNewName + "\").effect(\"" + ffxMap_1.
            default.vignette.pseudo + "\")(\"" + ffxMap_1.
            default.vignette.position + "\");\n";
            var useCircleExp = "on_off = comp(\"" + compName + "\").layer(\"" + thisNewName + "\").effect(\"" + ffxMap_1.
            default.vignette.pseudo + "\")(\"" + ffxMap_1.
            default.vignette.ellipse + "\");\n" + "if (on_off == 0) {\n" + "value = 100;\n" + "} else {\n" + "value = 0;\n" + "};";
            var useEllipseExp = "on_off = comp(\"" + compName + "\").layer(\"" + thisNewName + "\").effect(\"" + ffxMap_1.
            default.vignette.pseudo + "\")(\"" + ffxMap_1.
            default.vignette.ellipse + "\");\n" + "if (on_off == 0) {\n" + "value = 0;\n" + "} else {\n" + "value = 100;\n" + "};";
            twoSidedPrecomp.layer("Vignette BG").property("ADBE Transform Group").property("ADBE Opacity").expression = opacityExp;
            twoSidedPrecomp.layer("Vignette Alpha").property("ADBE Transform Group").property("ADBE Scale").expression = scaleExp;
            twoSidedPrecomp.layer("Vignette Alpha").property("ADBE Transform Group").property("ADBE Position").expression = positionExp;
            twoSidedPrecomp.layer("Vignette Alpha").property("ADBE Effect Parade").property("ADBE Fast Blur").property("ADBE Fast Blur-0001").expression = featherExp;
            twoSidedPrecomp.layer("Vignette Alpha").property("ADBE Root Vectors Group").property(1).property("ADBE Vector Transform Group").property("ADBE Vector Group Opacity").expression = useCircleExp;
            twoSidedPrecomp.layer("Vignette Alpha").property("ADBE Root Vectors Group").property(2).property("ADBE Vector Transform Group").property("ADBE Vector Group Opacity").expression = useEllipseExp;
        }
        app.endUndoGroup();
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);
    var ffxMap_1 = __webpack_require__(2);
    var utils_1 = __webpack_require__(1);

    function check() {
        return prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.SELECTED_LAYER_HAS_SELECTED_PROPERTIES);
    }
    exports.check = check;
    var minifyMap = {
        controllerLayer: "a",
        effectorPosition: "b",
        inversion: "c",
        falloff: "d",
        outerRing: "f",
        innerRing: "g",
        samplePoint: "h",
        distance: "i",
        distanceSq: "j",
        multiplier: "k",
        variableX: "l",
        variableY: "m",
        variableZ: "n",
        scaleValue: "o"
    };

    function minifier(code, map) {
        Object.keys(map).forEach(function(key) {
            code = code.replace(new RegExp(key, "g"), map[key]);
        });
        var lines = code.split("\n").map(function(line) {
            return line.trim();
        });
        var firstLine = lines.shift();
        return firstLine + "\n" + lines.join("");
    }

    function findOrCreateController(composition) {
        var foundControllers = composition.selectedLayers.filter(function(sl) {
            return sl.name.indexOf(">>Controller") > -1;
        });
        if (foundControllers.length === 0) {
            var controllerLayerName = utils_1.getUniqueName(composition.layers, ">>Controller");
            controllerLayer = composition.layers.addShape();
            controllerLayer.name = controllerLayerName;
            controllerLayer.guideLayer = true;
            var outerCircle = controllerLayer.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
            outerCircle.property("ADBE Vectors Group").addProperty("ADBE Vector Shape - Ellipse");
            outerCircle.property("ADBE Vectors Group").property("ADBE Vector Shape - Ellipse").property("ADBE Vector Ellipse Size").setValue([300, 300]);
            outerCircle.property("ADBE Vectors Group").addProperty("ADBE Vector Graphic - Stroke");
            outerCircle.property("ADBE Vectors Group").property("ADBE Vector Graphic - Stroke").property("ADBE Vector Stroke Color").setValue([0.65, 1, 0.3, 1]);
            outerCircle.name = "outerCircle";
            var middleCircle = controllerLayer.property("ADBE Root Vectors Group").addProperty("ADBE Vector Group");
            middleCircle.property("ADBE Vectors Group").addProperty("ADBE Vector Shape - Ellipse");
            middleCircle.property("ADBE Vectors Group").property("ADBE Vector Shape - Ellipse").property("ADBE Vector Ellipse Size").setValue([300, 300]);
            middleCircle.property("ADBE Vectors Group").addProperty("ADBE Vector Graphic - Stroke");
            middleCircle.property("ADBE Vectors Group").property("ADBE Vector Graphic - Stroke").property("ADBE Vector Stroke Color").setValue([1, 0.03, 0.03, 1]);
            middleCircle.name = "middleCircle";
            var controlLayer = controllerLayer("ADBE Effect Parade").addProperty(ffxMap_1.
            default.falloff.pseudo);
            controlLayer.property(ffxMap_1.
            default.falloff.falloff).setValue(50);
            controlLayer.property(ffxMap_1.
            default.falloff.falloff).expression = "value > 100 ? 100 : value;";
            controlLayer.name = "Falloff Master";
            middleCircle.property("ADBE Vectors Group")("ADBE Vector Shape - Ellipse")("ADBE Vector Ellipse Size").expression = "temp = thisComp.layer(\"" + controllerLayer.name + "\").effect(\"Falloff Master\")(\"" + ffxMap_1.
            default.falloff.falloff + "\");\n" + "[temp * 3, temp * 3];";
            controllerLayer("ADBE Transform Group")("ADBE Scale").expression = "temp = transform.scale[0];\n[temp, temp]";
        } else {
            controllerLayer = foundControllers[0];
        }
        return controllerLayer;
    }
    var nameCounts = {};

    function getUniquePropertyName(property) {
        try {
            var firstParent = property.parentProperty;
            parentMatchName = firstParent.matchName;
            parentName = firstParent.name;
            currentName = property.name;
        } catch (err) {

        }
        if (parentMatchName === "ADBE Transform Group") {
            presetName = "Falloff - " + currentName;
        } else {
            presetName = "Falloff - " + currentName + " - " + parentName;
        }
        if (!nameCounts.hasOwnProperty(presetName)) {
            nameCounts[presetName] = 0;
        } else {
            nameCounts[presetName] = nameCounts[presetName] + 1;
            presetName = presetName + " " + nameCounts[presetName];
        }
        return presetName;
    }

    function applyExpression(property, controllerLayer, modifierName) {
        switch (property.propertyValueType) {
            case PropertyValueType.OneD:
                var modifierControl = controllerLayer("ADBE Effect Parade").property(modifierName);
                if (!modifierControl) {
                    modifierControl = controllerLayer("ADBE Effect Parade").addProperty(ffxMap_1.
                    default.falloff1d.pseudo);
                    modifierControl.name = modifierName;
                    modifierControl.property(ffxMap_1.
                    default.falloff1d.x).setValue(0);
                }
                property.expression = minifier("// Mt. Mograph - Motion 3 (Falloff Expression)\n      controllerLayer = thisComp.layer(\"" + controllerLayer.name + "\");\n      effectorPosition = controllerLayer.position.value;\n      inversion = controllerLayer.effect(\"Falloff Master\")(\"" + ffxMap_1.
                default.falloff.invert + "\");\n      isEnabled = controllerLayer.effect(\"Falloff Master\")(\"" + ffxMap_1.
                default.falloff.enable + "\");\n      if (isEnabled == 0) {\n        value;\n      } else {\n        falloff = controllerLayer.effect(\"Falloff Master\")(\"" + ffxMap_1.
                default.falloff.falloff + "\").value / 100;\n        scaleValue = controllerLayer.scale.value[0] / 100;\n        outerRing = (scaleValue * 300) / 2;\n        innerRing = (outerRing * falloff);\n        samplePoint = thisLayer.toWorld(thisLayer.anchorPoint);\n        dx = effectorPosition[0] - samplePoint[0];\n        dy = effectorPosition[1] - samplePoint[1];\n        distanceSq = dx * dx + dy * dy;\n        distance = Math.sqrt(distanceSq);\n        var multiplier;\n        if (distance > outerRing) {\n          multiplier = 0;\n        } else if (distance < innerRing) {\n          multiplier = 1;\n        } else {\n          multiplier = 1 - (distance - innerRing) / (outerRing - innerRing);\n        }\n        variableX = controllerLayer.effect(\"" + modifierName + "\")(\"" + ffxMap_1.
                default.falloff1d.x + "\") * -1;\n        if (inversion > 0) {\n          value - (variableX * (1 - multiplier));\n        } else {\n          value - (variableX * multiplier);\n        }\n      }", minifyMap);
                break;
            case PropertyValueType.TwoD:
            case PropertyValueType.TwoD_SPATIAL:
                var modifierControl = controllerLayer("ADBE Effect Parade").property(modifierName);
                if (!modifierControl) {
                    modifierControl = controllerLayer("ADBE Effect Parade").addProperty(ffxMap_1.
                    default.falloff2d.pseudo);
                    modifierControl.name = modifierName;
                    modifierControl.property(ffxMap_1.
                    default.falloff2d.x).setValue(0);
                    modifierControl.property(ffxMap_1.
                    default.falloff2d.y).setValue(0);
                }
                property.expression = minifier("// Mt. Mograph - Motion 3 (Falloff Expression)\n      controllerLayer = thisComp.layer(\"" + controllerLayer.name + "\");\n      effectorPosition = controllerLayer.position.value;\n      inversion = controllerLayer.effect(\"Falloff Master\")(\"" + ffxMap_1.
                default.falloff.invert + "\");\n      isEnabled = controllerLayer.effect(\"Falloff Master\")(\"" + ffxMap_1.
                default.falloff.enable + "\");\n      if (isEnabled == 0) {\n        value;\n      } else {\n        falloff = controllerLayer.effect(\"Falloff Master\")(\"" + ffxMap_1.
                default.falloff.falloff + "\").value / 100;\n        scaleValue = controllerLayer.scale.value[0] / 100;\n        outerRing = (scaleValue * 300) / 2;\n        innerRing = (outerRing * falloff);\n        samplePoint = thisLayer.toWorld(thisLayer.anchorPoint);\n        dx = effectorPosition[0] - samplePoint[0];\n        dy = effectorPosition[1] - samplePoint[1];\n        distanceSq = dx * dx + dy * dy;\n        distance = Math.sqrt(distanceSq);\n        var multiplier;\n        if (distance > outerRing) {\n          multiplier = 0;\n        } else if (distance < innerRing) {\n          multiplier = 1;\n        } else {\n          multiplier = 1 - (distance - innerRing) / (outerRing - innerRing);\n        }\n        variableX = controllerLayer.effect(\"" + modifierName + "\")(\"" + ffxMap_1.
                default.falloff2d.x + "\") * -1;\n        variableY = controllerLayer.effect(\"" + modifierName + "\")(\"" + ffxMap_1.
                default.falloff2d.y + "\") * -1;\n        if (inversion > 0) {\n          [value[0] - (variableX * (1 - multiplier)), value[1] - (variableY * (1 - multiplier))];\n        } else {\n          [value[0] - (variableX * multiplier), value[1] - (variableY * multiplier)];\n        }\n      }", minifyMap);
                break;
            case PropertyValueType.ThreeD:
            case PropertyValueType.ThreeD_SPATIAL:
                var modifierControl = controllerLayer("ADBE Effect Parade").property(modifierName);
                if (!modifierControl) {
                    modifierControl = controllerLayer("ADBE Effect Parade").addProperty(ffxMap_1.
                    default.falloff3d.pseudo);
                    modifierControl.name = modifierName;
                    modifierControl.property(ffxMap_1.
                    default.falloff3d.x).setValue(0);
                    modifierControl.property(ffxMap_1.
                    default.falloff3d.y).setValue(0);
                    modifierControl.property(ffxMap_1.
                    default.falloff3d.z).setValue(0);
                }
                property.expression = minifier("// Mt. Mograph - Motion 3 (Falloff Expression)\n      controllerLayer = thisComp.layer(\"" + controllerLayer.name + "\");\n      effectorPosition = controllerLayer.position.value;\n      inversion = controllerLayer.effect(\"Falloff Master\")(\"" + ffxMap_1.
                default.falloff.invert + "\");\n      isEnabled = controllerLayer.effect(\"Falloff Master\")(\"" + ffxMap_1.
                default.falloff.enable + "\");\n      if (isEnabled == 0) {\n        value;\n      } else {\n        falloff = controllerLayer.effect(\"Falloff Master\")(\"" + ffxMap_1.
                default.falloff.falloff + "\").value / 100;\n        scaleValue = controllerLayer.scale.value[0] / 100;\n        outerRing = (scaleValue * 300) / 2;\n        innerRing = (outerRing * falloff);\n        samplePoint = thisLayer.toWorld(thisLayer.anchorPoint);\n        dx = effectorPosition[0] - samplePoint[0];\n        dy = effectorPosition[1] - samplePoint[1];\n        distanceSq = dx * dx + dy * dy;\n        distance = Math.sqrt(distanceSq);\n        var multiplier;\n        if (distance > outerRing) {\n          multiplier = 0;\n        } else if (distance < innerRing) {\n          multiplier = 1;\n        } else {\n          multiplier = 1 - (distance - innerRing) / (outerRing - innerRing);\n        }\n        variableX = controllerLayer.effect(\"" + modifierName + "\")(\"" + ffxMap_1.
                default.falloff3d.x + "\") * -1;\n        variableY = controllerLayer.effect(\"" + modifierName + "\")(\"" + ffxMap_1.
                default.falloff3d.y + "\") * -1;\n        variableZ = controllerLayer.effect(\"" + modifierName + "\")(\"" + ffxMap_1.
                default.falloff3d.z + "\") * -1;\n        if (inversion > 0) {\n          result = [\n            value[0] - (variableX * (1 - multiplier)),\n            value[1] - (variableY * (1 - multiplier))\n          ];\n          if (value.length === 3) {\n            result.push(value[2] - (variableZ * (1 - multiplier)));\n          }\n          result;\n        } else {\n          result = [\n            value[0] - (variableX * multiplier),\n            value[1] - (variableY * multiplier)\n          ];\n          if (value.length === 3) {\n            result.push(value[2] - (variableZ * multiplier));\n          }\n          result;\n        }\n      }", minifyMap);
                break;
            case PropertyValueType.COLOR:
                var modifierControl = controllerLayer("ADBE Effect Parade").property(modifierName);
                if (!modifierControl) {
                    modifierControl = controllerLayer("ADBE Effect Parade").addProperty(ffxMap_1.
                    default.falloffcolor.pseudo);
                    modifierControl.name = modifierName;
                }
                property.expression = minifier("// Mt. Mograph - Motion 3 (Falloff Expression)\n      if (time < 0) {\n        value;\n      } else {\n        controllerLayer = thisComp.layer(\"" + controllerLayer.name + "\");\n        effectorPosition = controllerLayer.position.value;\n        inversion = controllerLayer.effect(\"Falloff Master\")(\"" + ffxMap_1.
                default.falloff.invert + "\");\n        isEnabled = controllerLayer.effect(\"Falloff Master\")(\"" + ffxMap_1.
                default.falloff.enable + "\");\n        if (isEnabled == 0) {\n          value;\n        } else {\n          falloff = controllerLayer.effect(\"Falloff Master\")(\"" + ffxMap_1.
                default.falloff.falloff + "\").value / 100;\n          scaleValue = controllerLayer.scale.value[0] / 100;\n          newColor = controllerLayer.effect(\"" + modifierName + "\")(\"" + ffxMap_1.
                default.falloffcolor.color + "\");\n          outerRing = (scaleValue * 300) / 2;\n          innerRing = (outerRing * falloff);\n          samplePoint = thisLayer.toWorld(thisLayer.anchorPoint);\n          dx = effectorPosition[0] - samplePoint[0];\n          dy = effectorPosition[1] - samplePoint[1];\n          distanceSq = dx * dx + dy * dy;\n          distance = Math.sqrt(distanceSq);\n          var multiplier;\n          if (distance > outerRing) {\n            multiplier = 0;\n          } else if (distance < innerRing) {\n            multiplier = 1;\n          } else {\n            multiplier = 1 - (distance - innerRing) / (outerRing - innerRing);\n          }\n          currentColor = thisProperty.valueAtTime(-1);\n          [\n            currentColor[0] + ((newColor[0] - currentColor[0]) * (inversion > 0 ? 1 - multiplier : multiplier)),\n            currentColor[1] + ((newColor[1] - currentColor[1]) * (inversion > 0 ? 1 - multiplier : multiplier)),\n            currentColor[2] + ((newColor[2] - currentColor[2]) * (inversion > 0 ? 1 - multiplier : multiplier)),\n            1,\n          ]\n        }\n      }", minifyMap);
                break;
        }
    }

    function falloff(composition) {
        if (!(composition instanceof CompItem)) {
            return;
        }
        nameCounts = {};
        var selectedLayers = composition.selectedLayers.slice(0);
        var selectedProperties = composition.selectedProperties.filter(function(property) {
            return property instanceof Property && property.canSetExpression;
        });
        var useGlobalProperties = selectedLayers.filter(function(sl) {
            return sl.selectedProperties.length > 0;
        }).length === 1;
        utils_1.restoreSelectionAfter(function() {
            controllerLayer = findOrCreateController(composition);
        });
        utils_1.fast(function(comp) {
            var propertyNamesMap = {};
            selectedLayers.filter(function(l) {
                return l !== controllerLayer;
            }).forEach(function(selectedLayer) {
                var layerSelectedProperties = selectedLayer.selectedProperties.filter(function(property) {
                    return property instanceof Property && property.canSetExpression;
                });
                var propertiesGetter = utils_1.propertiesToGetter(useGlobalProperties ? selectedProperties : layerSelectedProperties);
                var properties = propertiesGetter(selectedLayer);
                properties.forEach(function(property) {
                    if (propertyNamesMap.hasOwnProperty(property.name)) {
                        modifierName = propertyNamesMap[property.name];
                    } else {
                        modifierName = getUniquePropertyName(property);
                        if (useGlobalProperties) {
                            propertyNamesMap[property.name] = modifierName;
                        }
                    }
                    applyExpression(property, controllerLayer, modifierName);
                });
            });
            utils_1.deselectAll(comp);
            controllerLayer.selected = true;
        });
    }

    function run() {
        var checkResult = check();
        if (!checkResult.success) {
            return checkResult;
        }
        utils_1.loadEffects();
        app.beginUndoGroup("Motion3 - Falloff");
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        falloff(composition);
        app.endUndoGroup();
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);

    function check() {
        return JSON.stringify({
            success: false,
            errorCode: 100,
            errorMessage: "@TODO"
        });
    }
    exports.check = check;

    function run() {
        return JSON.stringify({
            success: false,
            errorCode: 100,
            errorMessage: "@TODO"
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);
    var console_1 = __webpack_require__(5);

    function getComp() {
        var composition = app.project.activeItem;
        if (composition === null || !(composition instanceof CompItem)) {
            throw new Error("No Composition")
        }
        return composition;
    }
    var Vec3 = function() {
        function Vec3(x, y, z) {
            this.x = x;
            this.y = y;
            this.z = z;
        }
        Vec3.prototype.distance = function(v) {
            var dx = v.x - this.x;
            var dy = v.y - this.y;
            var dz = v.z - this.z;
            return Math.sqrt((dx * dx) + (dy * dy) + (dz * dz));
        };
        return Vec3;
    }();

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        app.beginUndoGroup("Camera");
        var composition = getComp();
        var cameraLayers = composition.selectedLayers.filter(function(layer) {
            return layer instanceof CameraLayer;
        });
        var otherLayers = composition.selectedLayers.filter(function(layer) {
            return !(layer instanceof CameraLayer);
        });
        if (!cameraLayers.length && otherLayers.length) {
            otherLayers.forEach(function(layer) {
                console_1.
                default.log(layer.position.propertyValueType, PropertyValueType.ThreeD, PropertyValueType.ThreeD_SPATIAL);
                if (layer.position.propertyValueType !== PropertyValueType.ThreeD) {
                    if (layer instanceof ShapeLayer) {
                        layer.threeDLayer = true;
                    }
                }
            });
            var camera = composition.layers.addCamera("Camera", [composition.width / 2, composition.height / 2]);
            camera.property("ADBE Camera Options Group").property("ADBE Camera Depth of Field").setValue(true);
            camera.pointOfInterest.expression = "thisComp.layer(" + JSON.stringify(otherLayers[0].name) + ").position.value";
            camera.property("ADBE Camera Options Group").property("ADBE Camera Focus Distance").expression = "target = thisComp.layer(" + JSON.stringify(otherLayers[0].name) + "); v1 = target.toWorld(target.anchorPoint) - toWorld([0, 0, 0]); v2 = toWorldVec([0, 0, 1]); dot(v1, v2)";
        }
        app.endUndoGroup();
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);
    var utils_1 = __webpack_require__(1);

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        var composition = getComp();
        var layers = composition.selectedLayers;
        if (layers.length === 0) {
            layers = utils_1.layersToArray(composition.layers);
        }
        var adjustmentLayers = layers.filter(function(layer) {
            return layer instanceof AVLayer && layer.adjustmentLayer;
        });
        if (adjustmentLayers.length === 0) {
            return JSON.stringify({
                success: false,
                errorCode: 999,
                errorMessage: "No adjustment layers in " + composition.selectedLayers.length === 0 ? "comp" : "selection"
            });
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function getComp() {
        var composition = app.project.activeItem;
        if (composition === null || !(composition instanceof CompItem)) {
            throw new Error("No Composition")
        }
        return composition;
    }

    function run() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        var composition = getComp();
        var layers = composition.selectedLayers;
        if (layers.length === 0) {
            layers = utils_1.layersToArray(composition.layers);
        }
        var adjustmentLayers = layers.filter(function(layer) {
            return layer instanceof AVLayer && layer.adjustmentLayer;
        });
        if (adjustmentLayers.length === 0) {
            return JSON.stringify({
                success: false,
                errorCode: 999,
                errorMessage: "No adjustment layers in comp"
            });
        }
        layers.forEach(function(layer) {
            if (!(layer instanceof AVLayer) || layer.adjustmentLayer !== true) {
                return;
            }
            var effects = layer.property("ADBE Effect Parade");
            var effectNames = [];
            for (var i = 1; i <= effects.numProperties; i += 1) {
                effectNames.push(effects.property(i).name);
            }
            layer.name = effectNames.join(",");
        });
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    var __read = this && this.__read || function(o, n) {
            var m = typeof Symbol === "function" && o[Symbol.iterator];
            if (!m) {
                return o;
            }
            var i = m.call(o);
            var ar = [];
            try {
                while (n === void(0) || n-- > 0 && !r = i.next().done) {
                    ar.push(r.value)
                }
            } catch (error) {
                e = {
                    error: error
                };
            } finally {
                try {
                    if (r && !r.done && m = i.
                    return) {
                        m.call(i)
                    }
                } finally {
                    if (e) {
                        throw e.error
                    }
                }
            }
            return ar;
        };
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);
    var console_1 = __webpack_require__(5);

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function getComp() {
        var composition = app.project.activeItem;
        if (composition === null || !(composition instanceof CompItem)) {
            throw new Error("No Composition")
        }
        return composition;
    }

    function(FlipMode) {
        FlipMode[FlipMode.VERTICAL = 0] = "VERTICAL";
        FlipMode[FlipMode.HORIZONTAL = 1] = "HORIZONTAL";
    }(FlipMode || FlipMode = {});

    function run(mode, meta) {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        app.beginUndoGroup("Flip");
        var composition = getComp();
        if (meta) {
            console_1.
            default.log("META");
            var selectedLayers = composition.selectedLayers.slice(0);
            selectedLayers.forEach(function(layer) {
                var scaleProperty = layer.property("Scale");
                if (mode === FlipMode.HORIZONTAL) {
                    scaleProperty.setValue([scaleProperty.value[0] < 0 ? Math.abs(scaleProperty.value[0]) : -scaleProperty.value[0], scaleProperty.value[1] > 0 ? Math.abs(scaleProperty.value[1]) : -scaleProperty.value[1]]);
                } else {
                    scaleProperty.setValue([scaleProperty.value[0] > 0 ? Math.abs(scaleProperty.value[0]) : -scaleProperty.value[0], scaleProperty.value[1] < 0 ? Math.abs(scaleProperty.value[1]) : -scaleProperty.value[1]]);
                }
            });
        } else {
            var min_1 = [Infinity, Infinity];
            var max_1 = [-Infinity, -Infinity];
            var selectedLayers_1 = composition.selectedLayers.slice(0);
            selectedLayers_1.forEach(function(layer) {
                if (layer.parent) {
                    return;
                }
                var position = layer.property("Position").value;
                if (position[0] < min_1[0]) {
                    min_1[0] = position[0];
                }
                if (position[1] < min_1[1]) {
                    min_1[1] = position[1];
                }
                if (position[0] > max_1[0]) {
                    max_1[0] = position[0];
                }
                if (position[1] > max_1[1]) {
                    max_1[1] = position[1];
                }
            });
            var averagePosition = [((max_1[0] - min_1[0]) / 2) + min_1[0], ((max_1[1] - min_1[1]) / 2) + min_1[1]];
            var parentLayer_1 = composition.layers.addNull();
            parentLayer_1.name = "MOTION TEMP NULL CONTROL";
            var positionProperty = parentLayer_1.property("Position");
            positionProperty.setValue(averagePosition);
            parentLayer_1.anchorPoint.setValue([parentLayer_1.source.width / 2, parentLayer_1.source.height / 2]);
            var parentIndexes_1 = [];
            selectedLayers_1.forEach(function(layer, i) {
                if (layer.parent) {
                    parentIndexes_1.push([i, layer.parent]);
                }
            });
            selectedLayers_1.forEach(function(layer) {
                if (layer.name === "MOTION TEMP NULL CONTROL") {
                    return;
                }
                layer.parent = parentLayer_1;
            });
            var scaleProperty = parentLayer_1.property("Scale");
            if (mode === FlipMode.HORIZONTAL) {
                scaleProperty.setValue([-100, 100]);
            } else {
                scaleProperty.setValue([100, -100]);
            }
            parentLayer_1.remove();
            parentIndexes_1.forEach(function(_a) {
                var _b = __read(_a, 2);
                var parentIndex = _b[0];
                var parent = _b[1];
                selectedLayers_1[parentIndex].parent = parent;
            });
            selectedLayers_1.forEach(function(layer) {
                layer.selected = true;
            });
        }
        app.endUndoGroup();
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);

    function getComp() {
        var composition = app.project.activeItem;
        if (composition === null || !(composition instanceof CompItem)) {
            throw new Error("No Composition")
        }
        return composition;
    }

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run(folder, name) {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        app.beginUndoGroup("Capture");
        var compItem = getComp();
        var transparency = false;
        if (app.activeViewer.views[0]) {
            transparency = app.activeViewer.views[0].options.checkerboards;
        }
        if (!transparency) {
            tempBg = compItem.layers.addSolid(compItem.bgColor, "BG Fix", compItem.width, compItem.height, compItem.pixelAspect, compItem.duration);
            tempBg.moveToEnd();
        }
        var fileName = "" + folder + Folder.fs === "Windows" ? "\\" : "/" + name ? name : compItem.name + ".png";
        var file = new File(fileName);
        var i = 0;
        while (file.exists) {
            i++;
            fileName = "" + folder + Folder.fs === "Windows" ? "\\" : "/" + name ? name : compItem.name + " " + i + ".png";
            file = new File(fileName);
        }
        compItem.saveFrameToPng(compItem.time, file);
        if (tempBg) {
            tempBg.remove();
        }
        app.endUndoGroup();
        return JSON.stringify({
            success: true,
            fileName: fileName
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_ACTIVE_ITEM);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run() {
        var removeLayerLocks = false;
        var composition = app.project.activeItem;
        if (!composition) {
            return;
        }
        if (!(composition instanceof CompItem)) {
            return;
        }
        var activeLayerCount = composition.selectedLayers;
        app.beginUndoGroup("LayerLock");
        if (composition.layer(">>Top Lock") && removeLayerLocks) {
            var topLockIndex = composition.layer(">>Top Lock").index;
            var bottomLockIndex = composition.layer(">>Bottom Lock").index;
            var indexBetween = Math.abs(topLockIndex - bottomLockIndex);
            for (var i = 1; indexBetween > i; i++) {
                var currentLayer = composition.layer(topLockIndex + i);
                if (currentLayer.locked) {
                    currentLayer.locked = false;
                }
            }
            composition.layer(">>Top Lock").locked = false;
            composition.layer(">>Bottom Lock").locked = false;
            composition.layer(">>Top Lock").remove();
            composition.layer(">>Bottom Lock").remove();
            return;
        }
        var instantLock = 1;
        if (composition.layer(">>Top Lock") == undefined && !removeLayerLocks) {
            var instantLock = 0;
            var bottomLayerLock = composition.layers.addNull();
            bottomLayerLock.name = ">>Bottom Lock";
            bottomLayerLock.source.width = 50;
            bottomLayerLock.source.height = 50;
            bottomLayerLock.anchorPoint.setValue([bottomLayerLock.source.width / 2, bottomLayerLock.source.height / 2]);
            bottomLayerLock.enabled = false;
            var topLayerLock = composition.layers.addNull();
            topLayerLock.name = ">>Top Lock";
            topLayerLock.source.width = 50;
            topLayerLock.source.height = 50;
            topLayerLock.anchorPoint.setValue([topLayerLock.source.width / 2, topLayerLock.source.height / 2]);
            topLayerLock.enabled = false;
            topLayerLock.label = 2;
            bottomLayerLock.label = 2;
            if (activeLayerCount.length >= 1) {
                var instantLock = 1;
                var selectedTopIndex = activeLayerCount[0].index;
                var selectedBottomIndex = activeLayerCount[activeLayerCount.length - 1].index;
                if (selectedTopIndex < selectedBottomIndex) {
                    topLayerLock.moveBefore(composition.layer(selectedTopIndex));
                    bottomLayerLock.moveAfter(composition.layer(selectedBottomIndex));
                } else {
                    topLayerLock.moveBefore(composition.layer(selectedBottomIndex));
                    bottomLayerLock.moveAfter(composition.layer(selectedTopIndex));
                }
            }
        }
        if (instantLock === 1) {
            var topLockIndex = composition.layer(">>Top Lock").index;
            var bottomLockIndex = composition.layer(">>Bottom Lock").index;
            var indexBetween = Math.abs(topLockIndex - bottomLockIndex);
            var layerLockGuides = 0;
            if (topLockIndex > bottomLockIndex) {
                topLockIndex = bottomLockIndex;
                bottomLockIndex = topLockIndex;
            }
            for (i = 1; indexBetween > i; i++) {
                var currentLayer = composition.layer(topLockIndex + i);
                if (currentLayer.locked) {
                    currentLayer.locked = false;
                } else {
                    var layerLockGuides = 1;
                    currentLayer.locked = true;
                }
            }
            if (layerLockGuides === 1) {
                composition.layer(">>Top Lock").locked = true;
                composition.layer(">>Bottom Lock").locked = true;
            } else {
                composition.layer(">>Top Lock").locked = false;
                composition.layer(">>Bottom Lock").locked = false;
            }
        }
        app.endUndoGroup();
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);

    function check() {
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function getComp() {
        var composition = app.project.activeItem;
        if (composition === null || !(composition instanceof CompItem)) {
            throw new Error("No Composition")
        }
        return composition;
    }

    function run() {
        app.beginUndoGroup("Mask");
        var composition = getComp();
        var selectedLayers = composition.selectedLayers.slice(0);
        composition.selectedLayers.forEach(function(layer) {
            layer.selected = false;
        });
        selectedLayers.forEach(function(layer) {
            layer.selected = true;
            app.executeCommand(2367);
            var maskSource = layer("ADBE Root Vectors Group")(1)("ADBE Vectors Group")(1)("ADBE Vector Shape");
            maskSource.selected = true;
            app.executeCommand(19);
            maskSource.selected = false;
            var maskDestination = layer("ADBE Mask Parade")(1)("ADBE Mask Shape");
            maskDestination.selected = true;
            app.executeCommand(20);
            layer.property("ADBE Mask Parade").property(1).property("ADBE Mask Offset").setValue(-100);
        });
        app.endUndoGroup();
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    var __read = this && this.__read || function(o, n) {
            var m = typeof Symbol === "function" && o[Symbol.iterator];
            if (!m) {
                return o;
            }
            var i = m.call(o);
            var ar = [];
            try {
                while (n === void(0) || n-- > 0 && !r = i.next().done) {
                    ar.push(r.value)
                }
            } catch (error) {
                e = {
                    error: error
                };
            } finally {
                try {
                    if (r && !r.done && m = i.
                    return) {
                        m.call(i)
                    }
                } finally {
                    if (e) {
                        throw e.error
                    }
                }
            }
            return ar;
        };
    var __spread = this && this.__spread || function() {
            for (var ar = [],
            var i = 0; i < arguments.length; i++) {
                ar = ar.concat(__read(arguments[i]))
            }
            return ar;
        };
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function getComp() {
        var composition = app.project.activeItem;
        if (composition === null || !(composition instanceof CompItem)) {
            throw new Error("No Composition")
        }
        return composition;
    }

    function distanceBetween(p1, p2) {
        var a = p1[0] - p2[0];
        var b = p1[1] - p2[1];
        return Math.sqrt((a * a) + (b * b));
    }

    function moveFirstVertex(vector) {
        var newValue = vector.value;
        var shortestDistance = Infinity;
        var cutIndex = 0;
        newValue.vertices.forEach(function(vertex, i) {
            var distance = distanceBetween(vertex, [-99999, -99999]);
            if (distance < shortestDistance) {
                shortestDistance = distance;
                cutIndex = i;
            }
        });
        newValue.vertices = __spread(newValue.vertices.slice(cutIndex), newValue.vertices.slice(0, cutIndex));
        newValue.inTangents = __spread(newValue.inTangents.slice(cutIndex), newValue.inTangents.slice(0, cutIndex));
        newValue.outTangents = __spread(newValue.outTangents.slice(cutIndex), newValue.outTangents.slice(0, cutIndex));
        vector.setValue(newValue);
        return newValue;
    }

    function run() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        app.beginUndoGroup("Morph");
        var composition = getComp();
        var firstLayer = composition.selectedLayers[0];
        var firstAnchor = firstLayer.transform.anchorPoint.value;
        var firstPosition = firstLayer.transform.position.value;
        var firstVector = firstLayer("ADBE Root Vectors Group")(1)("ADBE Vectors Group")(1)("ADBE Vector Shape");
        moveFirstVertex(firstVector);
        if (!firstVector) {
            return JSON.stringify({
                success: false,
                errorMessage: "No bezier path on target layer found"
            });
        }
        var lastKeyTime = firstVector.numKeys > 0 ? firstVector.keyTime(firstVector.numKeys) : 0;
        firstVector.setValueAtTime(0, firstVector.value);
        var firstShapeAnchor = firstLayer("ADBE Root Vectors Group")(1)("ADBE Vector Transform Group")("ADBE Vector Anchor");
        firstShapeAnchor.setValueAtTime(0, [0, 0]);
        composition.selectedLayers.slice(1).forEach(function(layer, i) {
            var vector = layer("ADBE Root Vectors Group")(1)("ADBE Vectors Group")(1)("ADBE Vector Shape");
            if (!vector) {
                return;
            }
            var layerPosition = layer.transform.position.value;
            var layerAnchor = layer.transform.anchorPoint.value;
            var keyTime = lastKeyTime + ((i + 1) * 1);
            var newValue = moveFirstVertex(vector);
            firstVector.setValueAtTime(keyTime, newValue);
            firstShapeAnchor.setValueAtTime(keyTime, [(firstPosition[0] - firstAnchor[0]) - (layerPosition[0] - layerAnchor[0]), (firstPosition[1] - firstAnchor[1]) - (layerPosition[1] - layerAnchor[1])]);
        });
        composition.selectedLayers.slice(1).forEach(function(layer, i) {
            layer.remove();
        });
        app.endUndoGroup();
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var ae_utils_1 = __webpack_require__(3);
    var utils_1 = __webpack_require__(1);
    var ffxMap_1 = __webpack_require__(2);
    var prereqs_1 = __webpack_require__(0);

    function grabProjItems(itemType) {
        var proj = app.project;
        var itemTotal = proj.numItems;
        var itemAry = [];
        for (var i = 1; i <= itemTotal; i += 1) {
            curItem = proj.item(i);
            if (curItem instanceof itemType) {
                itemAry.push(curItem);
            }
        }
        return itemAry;
    }

    function check() {
        return prereqs_1.runChecks(prereqs_1.checkTypes.HAS_PROJECT, prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION);
    }
    exports.check = check;

    function run(path, sortImages) {
        var checkResult = check();
        if (checkResult.success === false) {
            return checkResult;
        }
        var footageItems = grabProjItems(FootageItem);
        var folderItems = grabProjItems(FolderItem);
        var filteredItems = [];
        footageItems.forEach(function(fi) {
            if (fi.mainSource && fi.mainSource.file && fi.mainSource.file.fsName === path) {
                filteredItems.push(fi);
            }
        });
        if (filteredItems.length === 1) {
            footageItem = filteredItems[0];
        } else {
            var importOptions = new ImportOptions(new File(path));
            footageItem = app.project.importFile(importOptions);
        }
        var filteredFolders = folderItems.filter(function(fi) {
            return fi.name === sortImages;
        });
        if (filteredFolders.length === 1) {
            folderItem = filteredFolders[0];
        } else {
            var imageFolderItem = app.project.items.addFolder(sortImages);
            imageFolderItem.label = 10;
            folderItem = imageFolderItem;
        }
        footageItem.parentFolder = folderItem;
        var composition = app.project.activeItem;
        if (composition instanceof CompItem) {
            utils_1.loadEffects();
            app.beginUndoGroup("Texture");
            if (composition.selectedLayers.length === 0) {
                var layer = composition.layers.add(footageItem);
                layer.selected = false;
            } else {
                var copies_1 = [];
                var images_1 = [];
                var names_1 = [];
                composition.selectedLayers.forEach(function(layer) {
                    var effectProperty = layer.property("ADBE Effect Parade").addProperty(ffxMap_1.
                    default.texture.pseudo);
                    effectProperty.name = "Texture";
                    effectProperty.property(ffxMap_1.
                    default.texture.imagePosition).setValue([0, 0]);
                    names_1.push(layer.name);
                    var layerCopy = layer.duplicate();
                    copies_1.push(layerCopy);
                });
                copies_1.forEach(function(layer, i) {
                    layer.name = "[t] " + names_1[i];
                    layer.scale.expression = "comp(" + JSON.stringify(composition.name) + ").layer(" + JSON.stringify(names_1[i]) + ").scale;";
                    layer.rotation.expression = "comp(" + JSON.stringify(composition.name) + ").layer(" + JSON.stringify(names_1[i]) + ").rotation;";
                    layer.position.expression = "comp(" + JSON.stringify(composition.name) + ").layer(" + JSON.stringify(names_1[i]) + ").position;";
                    layer.anchorPoint.expression = "comp(" + JSON.stringify(composition.name) + ").layer(" + JSON.stringify(names_1[i]) + ").anchorPoint;";
                    var image = composition.layers.add(footageItem);
                    image.trackMatteType = TrackMatteType.ALPHA;
                    layer.enabled = false;
                    image.moveAfter(layer);
                    copies_1.push(image);
                    images_1.push(image);
                });
                images_1.forEach(function(image, i) {
                    image.position.expression = "// Mt. Mograph - Motion3 (3D Dynamics Expression)\n        var controllerLayer = comp(" + JSON.stringify(composition.name) + ").layer(" + JSON.stringify(names_1[i]) + ");\n        var effectProperty = controllerLayer.effect(" + JSON.stringify(ffxMap_1.
                    default.texture.pseudo) + ");\n        var delayEnable = effectProperty(" + JSON.stringify(ffxMap_1.
                    default.texture.delayEnable) + ");\n        var delayAmount = effectProperty(" + JSON.stringify(ffxMap_1.
                    default.texture.delayAmount) + ");\n        var dynamicsEnable = effectProperty(" + JSON.stringify(ffxMap_1.
                    default.texture.dynamicsEnable) + ");\n        var wiggleType = effectProperty(" + JSON.stringify(ffxMap_1.
                    default.texture.dynamicsType) + ");\n        var frequency = effectProperty(" + JSON.stringify(ffxMap_1.
                    default.texture.dynamicsFrequency) + ");\n        var amount = effectProperty(" + JSON.stringify(ffxMap_1.
                    default.texture.dynamicsAmount) + ");\n        var seperationEnabled = effectProperty(" + JSON.stringify(ffxMap_1.
                    default.texture.seperationEnable) + ");\n        var seperationX = effectProperty(" + JSON.stringify(ffxMap_1.
                    default.texture.seperationX) + ");\n        var seperationY = effectProperty(" + JSON.stringify(ffxMap_1.
                    default.texture.seperationY) + ");\n        var seperationZ = effectProperty(" + JSON.stringify(ffxMap_1.
                    default.texture.seperationZ) + ");\n        var seedValue = effectProperty(" + JSON.stringify(ffxMap_1.
                    default.texture.dynamicsSeed) + ");\n        var newValue;\n        if (dynamicsEnable > 0) {\n          if (wiggleType == 1) {\n            seedRandom(time + (seedValue * 1000));\n            if (seperationEnabled > 0) {\n              newValue = [\n                wiggle(frequency, seperationX)[0],\n                wiggle(frequency, seperationY)[1]\n              ];\n              if (value.length === 3) {\n                newValue.push(wiggle(frequency, seperationZ)[2]);\n              }\n            } else {\n              newValue = wiggle(frequency, amount);\n            }\n          } else if (wiggleType == 2) {\n            var timeVal = Math.round((time + (seedValue * 1000)) * frequency) / frequency;\n            if (seperationEnabled > 0) {\n              newValue = [\n                wiggle(frequency, seperationX, 3, 1, timeVal)[0],\n                wiggle(frequency, seperationY, 3, 1, timeVal)[1],\n              ];\n              if (value.length === 3) {\n                newValue.push(wiggle(frequency, seperationZ, 3, 1, timeVal)[2]);\n              }\n            } else {\n              newValue = wiggle(frequency, amount, 3, 1, timeVal);\n            }\n          }\n        }\n        var lastValue = (newValue || value) + effectProperty(" + JSON.stringify(ffxMap_1.
                    default.texture.imagePosition) + ");\n        if (delayEnable > 0) {\n          var offsetTime = time - (delayAmount / 100);\n          if (dynamicsEnable > 0) {\n            lastValue = (lastValue - thisLayer.position) + controllerLayer.position.valueAtTime(offsetTime);\n          } else {\n            lastValue = effectProperty(" + JSON.stringify(ffxMap_1.
                    default.texture.imagePosition) + ") + controllerLayer.position.valueAtTime(offsetTime);\n          }\n        }\n        lastValue;";
                    image.scale.expression = "\n        var controllerLayer = comp(" + JSON.stringify(composition.name) + ").layer(" + JSON.stringify(names_1[i]) + ");\n        var effectProperty = controllerLayer.effect(" + JSON.stringify(ffxMap_1.
                    default.texture.pseudo) + ");\n        var delayEnable = effectProperty(" + JSON.stringify(ffxMap_1.
                    default.texture.delayEnable) + ");\n        var delayAmount = effectProperty(" + JSON.stringify(ffxMap_1.
                    default.texture.delayAmount) + ");\n        var scaleValue = effectProperty(" + JSON.stringify(ffxMap_1.
                    default.texture.imageScale) + ");\n        if (delayEnable > 0) {\n          var offsetTime = time - (delayAmount / 100);\n          controllerLayer.scale.valueAtTime(offsetTime) * (scaleValue / 100);\n        } else {\n          [scaleValue, scaleValue];\n        }";
                    image.rotation.expression = "\n        var controllerLayer = comp(" + JSON.stringify(composition.name) + ").layer(" + JSON.stringify(names_1[i]) + ");\n        var effectProperty = controllerLayer.effect(" + JSON.stringify(ffxMap_1.
                    default.texture.pseudo) + ");\n        var delayEnable = effectProperty(" + JSON.stringify(ffxMap_1.
                    default.texture.delayEnable) + ");\n        var delayAmount = effectProperty(" + JSON.stringify(ffxMap_1.
                    default.texture.delayAmount) + ");\n        var rotationValue = effectProperty(" + JSON.stringify(ffxMap_1.
                    default.texture.imageRotation) + ");\n        if (delayEnable > 0) {\n          var offsetTime = time - (delayAmount / 100);\n          controllerLayer.rotation.valueAtTime(offsetTime) + rotationValue;\n        } else {\n          rotationValue;\n        }";
                });
                var name_1 = ae_utils_1.getUniqueName(app.project.items, "Texture");
                composition.layers.precompose(copies_1.map(function(layer) {
                    return layer.index;
                }), name_1, true);
                utils_1.layersToArray(composition.layers).forEach(function(l) {
                    if (l.name === name_1) {
                        l.locked = true;
                        l.selected = false;
                    }
                });
            }
            app.endUndoGroup();
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);
    var utils_1 = __webpack_require__(1);
    var ParentDirection = {
        UP: false,
        DOWN: true
    };

    function check() {
        return prereqs_1.runChecks(prereqs_1.checkTypes.HAS_PROJECT, prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION, prereqs_1.checkTypes.HAS_SELECTED_LAYERS);
    }
    exports.check = check;

    function runParent(layers, direction) {
        if (direction === void(0)) {
            direction = false;
        }
        try {
            var increment = direction ? -1 : 1;
            for (var i = 0; i < layers.length; i += 1) {
                var layer = layers[i];
                if (layers[i + increment]) {
                    layer.parent = null;
                }
            }
            for (var j = 0; j < layers.length; j += 1) {
                var layer = layers[j];
                if (layers[j + increment]) {
                    layer.parent = layers[j + increment];
                }
            }
        } catch (err) {
            layers.forEach(function(layer) {
                layer.parent = null;
            });
            runParent(layers, direction);
        }
    }

    function run(direction) {
        if (direction === void(0)) {
            direction = ParentDirection.UP;
        }
        var checkResult = check();
        if (!checkResult.success) {
            return checkResult;
        }
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        var layers = composition.selectedLayers;
        utils_1.catchErr(function() {
            return utils_1.undoable("Motion3 - Parent", function() {
                return runParent(layers, direction);
            });
        });
        return {
            success: true
        };
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var utils_1 = __webpack_require__(1);
    var prereqs_1 = __webpack_require__(0);

    function check() {
        return prereqs_1.runChecks(prereqs_1.checkTypes.HAS_PROJECT, prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION, prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.SOME_SELECTED_LAYER_IS_TEXT_LAYER);
    }
    exports.check = check;
    var BreakType = {
        LETTERS: false,
        WORDS: true
    };

    function runBreak(breakType) {
        if (breakType === void(0)) {
            breakType = BreakType.WORDS;
        }
        if (!app.project.activeItem || !(app.project.activeItem instanceof CompItem)) {
            return;
        }
        var currentCounts = {};
        utils_1.layersToArray(app.project.activeItem.layers).forEach(function(layer) {
            var nameParts = layer.name.split(" ");
            var name = layer.name;
            if (nameParts.length > 1 && nameParts[nameParts.length - 1] === String(Number(nameParts[nameParts.length - 1]))) {
                nameParts.pop();
                var nameOnly = nameParts.join(" ");
                currentCounts[nameOnly] = currentCounts.hasOwnProperty(nameOnly) ? currentCounts[nameOnly] + 1 : 1;
            } else {
                currentCounts[name] = currentCounts.hasOwnProperty(name) ? currentCounts[name] + 1 : 1;
            }
        });
        app.project.activeItem.selectedLayers.forEach(function(layer) {
            if (!(layer instanceof TextLayer)) {
                layer.selected = false;
            }
        });
        app.project.activeItem.selectedLayers.forEach(function(textLayer) {
            if (!(textLayer instanceof TextLayer)) {
                return;
            }
            var str = textLayer.text.sourceText.value.text;
            var originalStr = str;
            if (breakType === BreakType.LETTERS) {
                var textDocument = textLayer.text.sourceText.value;
                textDocument.text = str;
                textLayer.text.sourceText.setValue(textDocument);
            }
            app.executeCommand(3781);
            utils_1.fast(function(composition) {
                utils_1.layersToArray(composition.layers).forEach(function(layer) {
                    if (layer instanceof ShapeLayer && layer.name.indexOf(textLayer.name) > -1) {
                        layer.enabled = false;
                        if (breakType === BreakType.LETTERS) {
                            var letters = str.replace(/ /g, "").replace(/\t/g, "").replace(/\r/g, "").replace(/\n/g, "").split("");
                            letters.forEach(function(letter, i) {
                                var copy = layer.duplicate();
                                copy.selected = true;
                                copy.enabled = true;
                                if (!currentCounts.hasOwnProperty(letter)) {
                                    currentCounts[letter] = 0;
                                }
                                if (currentCounts[letter] > 0) {
                                    copy.name = letter + " " + currentCounts[letter];
                                } else {
                                    copy.name = letter;
                                }
                                currentCounts[letter] += 1;
                                copy.property("ADBE Root Vectors Group").forEach(function(property, j) {
                                    if (j !== i) {
                                        property.remove();
                                    }
                                });
                            });
                        } else {
                            if (breakType === BreakType.WORDS) {
                                var words = str.split(/\s+/);
                                var stringPos_1 = 0;
                                words.forEach(function(word) {
                                    var copy = layer.duplicate();
                                    copy.enabled = true;
                                    copy.selected = true;
                                    copy.name = word;
                                    if (!currentCounts.hasOwnProperty(word)) {
                                        currentCounts[word] = 0;
                                    }
                                    if (currentCounts[word] > 0) {
                                        copy.name = word + " " + currentCounts[word];
                                    } else {
                                        copy.name = word;
                                    }
                                    currentCounts[word] += 1;
                                    copy.property("ADBE Root Vectors Group").forEach(function(property, j) {
                                        if (j < stringPos_1 || j >= (stringPos_1 + word.length)) {
                                            property.remove();
                                        }
                                    });
                                    stringPos_1 += word.length;
                                });
                            }
                        }
                        layer.remove();
                    }
                });
            });
            app.executeCommand(10312);
            if (breakType === BreakType.LETTERS) {
                var textDocument = textLayer.text.sourceText.value;
                textDocument.text = originalStr;
                textLayer.text.sourceText.setValue(textDocument);
            }
        });
    }

    function run(breakType) {
        var checkResult = check();
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        utils_1.catchErr(function() {
            utils_1.undoable("Motion3 - Break", function() {
                return runBreak(breakType);
            });
        });
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var utils_1 = __webpack_require__(1);
    var prereqs_1 = __webpack_require__(0);

    function check() {
        return prereqs_1.runChecks(prereqs_1.checkTypes.HAS_PROJECT, prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION, prereqs_1.checkTypes.HAS_SELECTED_LAYER);
    }
    exports.check = check;

    function runTrim() {
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        var layers = composition.selectedLayers;
        layers.forEach(function(layer) {
            var vectorGroup = layer.property("ADBE Root Vectors Group");
            if (vectorGroup) {
                vectorGroup.addProperty("ADBE Vector Filter - Trim");
            }
        });
    }

    function run() {
        var checkResult = check();
        if (!checkResult.success) {
            return checkResult;
        }
        utils_1.catchErr(function() {
            return utils_1.undoable("Motion3 - Trim Paths", runTrim);
        });
        return {
            success: true
        };
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var utils_1 = __webpack_require__(1);
    var prereqs_1 = __webpack_require__(0);

    function check() {
        return prereqs_1.runChecks(prereqs_1.checkTypes.HAS_PROJECT, prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION, prereqs_1.checkTypes.HAS_SELECTED_LAYERS);
    }
    exports.check = check;

    function runReverse() {
        utils_1.fast(function(composition) {
            if (!composition) {
                return;
            }
            var selectedLayers = composition.selectedLayers;
            var sortedSelection = selectedLayers.sort(function(l1, l2) {
                if (l1.index < l2.index) {
                    return -1;
                }
                if (l1.index > l2.index) {
                    return 1;
                }
                return 0;
            });
            sortedSelection.forEach(function(layer, i) {
                if (layer.locked) {
                    return;
                }
                if (i > 0) {
                    layer.moveBefore(sortedSelection[i - 1]);
                }
            });
        });
    }

    function run() {
        var checkResult = check();
        if (!checkResult.success) {
            return checkResult;
        }
        utils_1.catchErr(function() {
            return utils_1.undoable("Motion3 - Reverser", runReverse);
        });
        return {
            success: true
        };
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var ae_utils_1 = __webpack_require__(3);
    var prereqs_1 = __webpack_require__(0);
    var utils_1 = __webpack_require__(1);
    var EFFECTS = "ADBE Effect Parade";
    var MERCURY = "CC Mr. Mercury";

    function addTracer(composition, layers, name) {
        var compositionWidth = composition.width;
        var compositionHeight = composition.height;
        var effectLayers = [];
        layers.forEach(function(layer) {
            var effectLayerName = "[t] " + layer.name;
            ae_utils_1.restoreSelectionAfter(function() {
                var effectLayer = composition.layers.addSolid([1, 1, 1], effectLayerName, compositionWidth, compositionHeight, 1);
                var effect = effectLayer(EFFECTS).addProperty(MERCURY);
                effect.name = "Tracer";
                effectLayers.push(effectLayer);
                var traceLayerExpression = "// Mt. Mograph - Motion 3 (Tracer)\ntracePoint = comp(" + JSON.stringify(composition.name) + ")\n.layer(" + JSON.stringify(layer.name) + ");\ntracePoint.toWorld(tracePoint(\"ADBE Transform Group\")(\"ADBE Anchor Point\"));";
                effect("CC Mr. Mercury-0003").expression = traceLayerExpression;
                effect("CC Mr. Mercury-0001").setValue(0.01);
                effect("CC Mr. Mercury-0002").setValue(0.01);
                effect("CC Mr. Mercury-0004").setValue(0);
                effect("CC Mr. Mercury-0005").setValue(0);
                effect("CC Mr. Mercury-0006").setValue(54);
                effect("CC Mr. Mercury-0007").setValue(2);
                effect("CC Mr. Mercury-0008").setValue(2);
                effect("CC Mr. Mercury-0009").setValue(0.2);
                effect("CC Mr. Mercury-0010").setValue(1.2);
                effect("CC Mr. Mercury-0011").setValue(8);
                effect("CC Mr. Mercury-0014").setValue(0.01);
                effect("CC Mr. Mercury-0015").setValue(0.01);
            });
        });
        if (effectLayers.length === 0) {
            return;
        }
        effectLayers.reverse().forEach(function(layer, i) {
            if (effectLayers[i - 1]) {
                layer.moveBefore(effectLayers[i - 1]);
            }
        });
        var effectLayerIndexes = effectLayers.map(function(effectLayer) {
            return effectLayer.index;
        });
        var compositionName = ae_utils_1.getUniqueName(composition.layers, name ? name : "Tracer ");
        composition.layers.precompose(effectLayerIndexes, compositionName, true);
        var highestIndex = ae_utils_1.getHighestIndex(layers);
        var precomposition = composition.layer(1);
        precomposition.moveAfter(composition.layer(highestIndex));
        precomposition.locked = true;
    }

    function runTracer(name) {
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        var selectedLayers = composition.selectedLayers;
        utils_1.fast(function() {
            return addTracer(composition, selectedLayers, name);
        });
    }

    function check() {
        return prereqs_1.runChecks(prereqs_1.checkTypes.HAS_PROJECT, prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION, prereqs_1.checkTypes.HAS_SELECTED_LAYER);
    }
    exports.check = check;

    function run(name) {
        if (name === void(0)) {
            name = "Tracer";
        }
        var checkResult = check();
        if (!checkResult.success) {
            return checkResult;
        }
        utils_1.catchErr(function() {
            return utils_1.undoable("Motion3 - Tracer", function() {
                return runTracer(name);
            });
        });
        return {
            success: true
        };
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.runDynamics = exports.check = void(0);
    var utils_1 = __webpack_require__(1);
    var prereqs_1 = __webpack_require__(0);
    var ae_utils_1 = __webpack_require__(3);
    var ffxMap_1 = __webpack_require__(2);

    function check() {
        return prereqs_1.runChecks(prereqs_1.checkTypes.HAS_PROJECT, prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION, prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.SOME_SELECTED_PROPERTIES_ARE_KEYFRAMEABLE);
    }
    exports.check = check;

    function minifier(code, map, disable) {
        if (disable === void(0)) {
            disable = false;
        }
        Object.keys(map).forEach(function(key) {
            code = code.replace(new RegExp(key, "g"), map[key]);
        });
        var lines = code.split("\n").map(function(line) {
            return line.trim();
        });
        var firstLine = lines.shift();
        return firstLine + "\n" + lines.join("");
    }
    var pseudos = {
        "1": {
            pseudo: ffxMap_1.
            default.dynamics1d.pseudo,
            enable: ffxMap_1.
            default.dynamics1d.enable,
            type: ffxMap_1.
            default.dynamics1d.type,
            frequency: ffxMap_1.
            default.dynamics1d.frequency,
            amount: ffxMap_1.
            default.dynamics1d.amount,
            seed: ffxMap_1.
            default.dynamics1d.seed,
            getExpression: function(name, controllerLayer, isSame) {
                var pseudo = pseudos[1];
                return minifier("// Mt. Mograph - Motion3 (1D Dynamics Expression)\n        var controllerLayer = " + !isSame ? "thisComp.layer(" + JSON.stringify(controllerLayer.name) + ")" : "thisLayer" + "(\"ADBE Effect Parade\");\n        var effectProperty = controllerLayer(" + JSON.stringify(name) + ");\n        var enable = effectProperty(\"" + pseudo.enable + "\");\n        var wiggleType = effectProperty(\"" + pseudo.type + "\");\n        var frequency = effectProperty(\"" + pseudo.frequency + "\");\n        var amount = effectProperty(\"" + pseudo.amount + "\");\n        var seedValue = effectProperty(\"" + pseudo.seed + "\");\n        var newValue = value;\n        if (enable > 0) {\n          if (wiggleType == 1) {\n            seedRandom(seedValue * 1000);\n            newValue = wiggle(frequency, amount, 1, 1, time);\n          } else if (wiggleType == 2) {\n            seedRandom(seedValue);\n            var freq = 1 / frequency;\n            var times = thisComp.duration / freq;\n            var progress = (time / (thisComp.duration + thisComp.frameDuration));\n            newValue = wiggle(frequency, amount, 1, 1, Math.floor(times * progress));\n          }\n        }\n        newValue;", {
                    controllerLayer: "a",
                    effectProperty: "b",
                    enable: "c",
                    wiggleType: "d",
                    frequency: "e",
                    amount: "f",
                    newValue: "g"
                }, true) + "\n//META{\"tool\": \"dynamics\", \"controllerLayer\": " + JSON.stringify(controllerLayer.name) + ", \"name\": \"" + name + "\", \"effectIsOnThisLayer\": " + isSame + "}ENDMETA";
            }
        },
        "2": {
            pseudo: ffxMap_1.
            default.dynamics2d.pseudo,
            enable: ffxMap_1.
            default.dynamics2d.enable,
            type: ffxMap_1.
            default.dynamics2d.type,
            frequency: ffxMap_1.
            default.dynamics2d.frequency,
            amount: ffxMap_1.
            default.dynamics2d.amount,
            seperationEnable: ffxMap_1.
            default.dynamics2d.seperation,
            seperationX: ffxMap_1.
            default.dynamics2d.seperationX,
            seperationY: ffxMap_1.
            default.dynamics2d.seperationY,
            seed: ffxMap_1.
            default.dynamics2d.seed,
            getExpression: function(name, controllerLayer, isSame) {
                var pseudo = pseudos[2];
                return minifier("// Mt. Mograph - Motion3 (2D Dynamics Expression)\n        var controllerLayer = " + !isSame ? "thisComp.layer(" + JSON.stringify(controllerLayer.name) + ")" : "thisLayer" + "(\"ADBE Effect Parade\");\n        var effectProperty = controllerLayer(" + JSON.stringify(name) + ");\n        var enable = effectProperty(\"" + pseudo.enable + "\");\n        var wiggleType = effectProperty(\"" + pseudo.type + "\");\n        var frequency = effectProperty(\"" + pseudo.frequency + "\");\n        var amount = effectProperty(\"" + pseudo.amount + "\");\n        var seperationEnabled = effectProperty(\"" + pseudo.seperationEnable + "\");\n        var seperationX = effectProperty(\"" + pseudo.seperationX + "\");\n        var seperationY = effectProperty(\"" + pseudo.seperationY + "\");\n        var seedValue = effectProperty(\"" + pseudo.seed + "\");\n        var newValue;\n        if (enable > 0) {\n          if (wiggleType == 1) {\n            seedRandom(seedValue * 1000);\n            if (seperationEnabled > 0) {\n              if (seperationX.value === seperationY.value) {\n                wiggleVal = wiggle(frequency, seperationX, 1, 1, time)[0];\n                newValue = [\n                  wiggleVal,\n                  wiggleVal\n                ];\n              } else {\n                newValue = [\n                  wiggle(frequency, seperationX, 1, 1, time)[0],\n                  wiggle(frequency, seperationY, 1, 1, time)[1]\n                ];\n              }\n            } else {\n              newValue = wiggle(frequency, amount, 1, 1, time);\n            }\n          } else if (wiggleType == 2) {\n            seedRandom(seedValue);\n            var freq = 1 / frequency;\n            var times = thisComp.duration / freq;\n            var progress = (time / (thisComp.duration + thisComp.frameDuration));\n            var timeVal = Math.floor(times * progress);\n            if (seperationEnabled) {\n              if (seperationX.value === seperationY.value) {\n                wiggleVal = wiggle(frequency, seperationX, 1, 1, timeVal)[0];\n                newValue = [\n                  wiggleVal,\n                  wiggleVal\n                ];\n              } else {\n                newValue = [\n                  wiggle(frequency, seperationX, 1, 1, timeVal)[0],\n                  wiggle(frequency, seperationY, 1, 1, timeVal)[1]\n                ];\n              }\n            } else {\n              newValue = wiggle(frequency, amount, 1, 1, timeVal);\n            }\n          }\n        }\n        newValue || value;", {
                    controllerLayer: "a",
                    effectProperty: "b",
                    enable: "c",
                    wiggleType: "d",
                    frequency: "e",
                    amount: "f",
                    newValue: "g",
                    seperationEnabled: "h",
                    seperationX: "i",
                    seperationY: "j"
                }, true) + "\n//META{\"tool\": \"dynamics\", \"controllerLayer\": " + JSON.stringify(controllerLayer.name) + ", \"name\": \"" + name + "\", \"effectIsOnThisLayer\": " + isSame + "}ENDMETA";
            }
        },
        "3": {
            pseudo: ffxMap_1.
            default.dynamics3d.pseudo,
            enable: ffxMap_1.
            default.dynamics3d.enable,
            type: ffxMap_1.
            default.dynamics3d.type,
            frequency: ffxMap_1.
            default.dynamics3d.frequency,
            amount: ffxMap_1.
            default.dynamics3d.amount,
            seperationEnable: ffxMap_1.
            default.dynamics3d.seperation,
            seperationX: ffxMap_1.
            default.dynamics3d.seperationX,
            seperationY: ffxMap_1.
            default.dynamics3d.seperationY,
            seperationZ: ffxMap_1.
            default.dynamics3d.seperationZ,
            seed: ffxMap_1.
            default.dynamics3d.seed,
            getExpression: function(name, controllerLayer, isSame) {
                var pseudo = pseudos[3];
                return minifier("// Mt. Mograph - Motion3 (3D Dynamics Expression)\n        var controllerLayer = " + !isSame ? "thisComp.layer(" + JSON.stringify(controllerLayer.name) + ")" : "thisLayer" + "(\"ADBE Effect Parade\");\n        var effectProperty = controllerLayer(" + JSON.stringify(name) + ");\n        var enable = effectProperty(\"" + pseudo.enable + "\");\n        var wiggleType = effectProperty(\"" + pseudo.type + "\");\n        var frequency = effectProperty(\"" + pseudo.frequency + "\");\n        var amount = effectProperty(\"" + pseudo.amount + "\");\n        var seperationEnabled = effectProperty(\"" + pseudo.seperationEnable + "\");\n        var seperationX = effectProperty(\"" + pseudo.seperationX + "\");\n        var seperationY = effectProperty(\"" + pseudo.seperationY + "\");\n        var seperationZ = effectProperty(\"" + pseudo.seperationZ + "\");\n        var seedValue = effectProperty(\"" + pseudo.seed + "\");\n        var newValue;\n        if (enable > 0) {\n          if (wiggleType == 1) {\n            seedRandom(seedValue * 1000);\n            if (seperationEnabled > 0) {\n              if (seperationX.value === seperationY.value) {\n                wiggleVal = wiggle(frequency, seperationX, 1, 1, time)[0];\n                newValue = [\n                  wiggleVal,\n                  wiggleVal\n                ];\n                if (value.length === 3) {\n                  newValue.push(wiggleVal);\n                }\n              } else {\n                newValue = [\n                  wiggle(frequency, seperationX, 1, 1, time)[0],\n                  wiggle(frequency, seperationY, 1, 1, time)[1]\n                ];\n                if (value.length === 3) {\n                  newValue.push(wiggle(frequency, seperationZ, 1, 1, time)[2]);\n                }\n              }\n            } else {\n              newValue = wiggle(frequency, amount, 1, 1, time);\n            }\n          } else if (wiggleType == 2) {\n            seedRandom(seedValue);\n            var freq = 1 / frequency;\n            var times = thisComp.duration / freq;\n            var progress = (time / (thisComp.duration + thisComp.frameDuration));\n            var timeVal = Math.floor(times * progress);\n            if (seperationEnabled > 0) {\n              if (seperationX.value === seperationY.value) {\n                wiggleVal = wiggle(frequency, seperationX, 1, 1, timeVal)[0];\n                newValue = [\n                  wiggleVal,\n                  wiggleVal\n                ];\n                if (value.length === 3) {\n                  newValue.push(wiggleVal);\n                }\n              } else {\n                newValue = [\n                  wiggle(frequency, seperationX, 1, 1, timeVal)[0],\n                  wiggle(frequency, seperationY, 1, 1, timeVal)[1]\n                ];\n                if (value.length === 3) {\n                  newValue.push(wiggle(frequency, seperationZ, 1, 1, timeVal)[2]);\n                }\n              }\n            } else {\n              newValue = wiggle(frequency, amount, 1, 1, timeVal);\n            }\n          }\n        }\n        newValue || value;", {
                    controllerLayer: "a",
                    effectProperty: "b",
                    enable: "c",
                    wiggleType: "d",
                    frequency: "e",
                    amount: "f",
                    newValue: "g",
                    seperationEnabled: "h",
                    seperationX: "i",
                    seperationY: "j",
                    seperationZ: "k"
                }, true) + "\n//META{\"tool\": \"dynamics\", \"controllerLayer\": " + JSON.stringify(controllerLayer.name) + ", \"name\": \"" + name + "\", \"effectIsOnThisLayer\": " + isSame + "}ENDMETA";
            }
        }
    };

    function runDynamics(layers, composition) {
        layers.forEach(function(layer) {
            var controllerLayer = layer;
            var propertiesGetters = layer.selectedProperties.map(ae_utils_1.propertyToGetter);
            if (layer instanceof CameraLayer || layer instanceof LightLayer) {
                var controllerLayerName_1 = "[d] " + layer.name + " controller";
                controllerLayer = composition.layer(controllerLayerName_1);
                if (!controllerLayer) {
                    ae_utils_1.restoreSelectionAfter(function() {
                        controllerLayer = composition.layers.addNull();
                        controllerLayer.name = controllerLayerName_1;
                    });
                }
            }
            propertiesGetters.forEach(function(getter) {
                var property = getter(layer);
                if (property instanceof PropertyGroup || property instanceof MaskPropertyGroup || property.matchName.indexOf("ADBE Vector Shape") > -1 || !property.canVaryOverTime) {
                    return;
                }
                var name = ae_utils_1.getUniqueName(controllerLayer.property("ADBE Effect Parade"), "[d] " + property.name);
                var dimension = ae_utils_1.propertyToDimension(property);
                if (dimension > 3) {
                    return;
                }
                ae_utils_1.ensureEffect(controllerLayer, name, pseudos[dimension + ""].pseudo);
                property = getter(layer);
                var expression = pseudos[dimension + ""].getExpression(name, controllerLayer, controllerLayer === layer);
                property.expression = expression;
            });
        });
    }
    exports.runDynamics = runDynamics;

    function run() {
        var checkResult = check();
        if (!checkResult.success) {
            return checkResult;
        }
        utils_1.loadEffects();
        utils_1.undoable("Motion3 - Dynamics", function() {
            utils_1.fast(function(composition) {
                var layers = composition.selectedLayers;
                runDynamics(layers, composition);
            });
        });
        return {
            success: true
        };
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var utils_1 = __webpack_require__(1);
    var ae_utils_1 = __webpack_require__(3);
    var prereqs_1 = __webpack_require__(0);
    var EFFECTS = "ADBE Effect Parade";
    var LASER = "ADBE Laser";
    var LASER_START_POSITION = "ADBE Laser-0001";
    var LASER_END_POSITION = "ADBE Laser-0002";
    var LASER_LENGTH = "ADBE Laser-0003";
    var LASER_SOFTNESS = "ADBE Laser-0007";
    var LASER_INSIDE_COLOR = "ADBE Laser-0008";
    var LASER_OUTSIDE_COLOR = "ADBE Laser-0009";
    var LASER_COMPOSITE_ON_ORIGINAL = "ADBE Laser-0011";
    var connectionTypes = {
        CONNECT: 0,
        CONNECT_AND_CLOSE: 1,
        CONNECT_ALL: 2
    };

    function getAnchorPointExpression(compositionName, layerName) {
        return "// Mt. Mograph - Vector\nlayer = comp(" + JSON.stringify(compositionName) + ").layer(" + JSON.stringify(layerName) + ")\nfromComp(layer.toComp(layer.anchorPoint))";
    }

    function createRopeLayer(composition, fromLayer, toLayer, name) {
        var solidColor = [0, 0, 0];
        var solidName = ae_utils_1.getUniqueName(composition.layers, name ? name + " " : "Vector ");
        ae_utils_1.restoreSelectionAfter(function() {
            ropeLayer = composition.layers.addSolid(solidColor, solidName, composition.width, composition.height, 1, composition.duration);
            var effect = ae_utils_1.ensureProperty(ropeLayer, [EFFECTS, LASER]);
            effect.name = "Vector";
            effect.property(LASER_START_POSITION).expression = getAnchorPointExpression(composition.name, fromLayer.name);
            effect.property(LASER_END_POSITION).expression = getAnchorPointExpression(composition.name, toLayer.name);
            effect.property(LASER_INSIDE_COLOR).setValue([127, 127, 127]);
            effect.property(LASER_OUTSIDE_COLOR).setValue([127, 127, 127]);
            effect.property(LASER_SOFTNESS).setValue([0]);
            effect.property(LASER_LENGTH).setValue([1]);
        });
        return ropeLayer;
    }

    function addRope(composition, layers, connectionType, name) {
        if (connectionType === void(0)) {
            connectionType = connectionTypes.CONNECT_ALL;
        }
        var connections = [];
        var ropeLayers = [];
        if (layers.length < 2) {
            return;
        }
        layers.forEach(function(layer, i) {
            switch (connectionType) {
                case connectionTypes.CONNECT_ALL:
                    layers.forEach(function(otherLayer) {
                        if (layer === otherLayer || connections.indexOf(layer.name + "-" + otherLayer.name) > -1) {
                            return;
                        }
                        ropeLayers.push(createRopeLayer(composition, layer, otherLayer, name));
                        connections.push(layer.name + "-" + otherLayer.name);
                        connections.push(otherLayer.name + "-" + layer.name);
                    });
                    break;
                case connectionTypes.CONNECT:
                    if (layers[i + 1]) {
                        ropeLayers.push(createRopeLayer(composition, layer, layers[i + 1], name));
                    }
                    break;
                case connectionTypes.CONNECT_AND_CLOSE:
                    if (layers[i + 1]) {
                        ropeLayers.push(createRopeLayer(composition, layer, layers[i + 1], name));
                    } else {
                        ropeLayers.push(createRopeLayer(composition, layer, layers[0], name));
                    }
                    break;
            }
        });
        ropeLayers.reverse().forEach(function(layer, i) {
            if (ropeLayers[i - 1]) {
                layer.moveBefore(ropeLayers[i - 1]);
            }
        });
        var ropeLayerIndexes = ropeLayers.map(function(ropeLayer) {
            return ropeLayer.index;
        });
        var compositionName = name ? name : ae_utils_1.getUniqueName(composition.layers, "Vectors ");
        composition.layers.precompose(ropeLayerIndexes, compositionName, true);
        var highestIndex = ae_utils_1.getHighestIndex(layers);
        var precomposition = composition.layer(1);
        precomposition.moveAfter(composition.layer(highestIndex));
        precomposition.locked = true;
    }

    function runRope(connectionType, name) {
        if (connectionType === void(0)) {
            connectionType = connectionTypes.CONNECT_AND_CLOSE;
        }
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        var selectedLayers = composition.selectedLayers;
        utils_1.fast(function() {
            return addRope(composition, selectedLayers, connectionType, name);
        });
    }

    function check() {
        return prereqs_1.runChecks(prereqs_1.checkTypes.HAS_PROJECT, prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION, prereqs_1.checkTypes.HAS_SELECTED_LAYERS);
    }
    exports.check = check;

    function run(connectionType, name) {
        if (connectionType === void(0)) {
            connectionType = connectionTypes.CONNECT_ALL;
        }
        if (name === void(0)) {
            name = "Vector";
        }
        var checkResult = check();
        if (!checkResult.success) {
            return checkResult;
        }
        utils_1.catchErr(function() {
            return utils_1.undoable("Motion3 - Vector", function() {
                return runRope(connectionType, name);
            });
        });
        return {
            success: true
        };
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var utils_1 = __webpack_require__(1);
    var prereqs_1 = __webpack_require__(0);
    var ae_utils_1 = __webpack_require__(3);
    var constants_1 = __webpack_require__(4);
    var midas_1 = __webpack_require__(6);

    function check() {
        return prereqs_1.runChecks(prereqs_1.checkTypes.HAS_PROJECT, prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION, prereqs_1.checkTypes.HAS_SELECTED_LAYER);
    }
    exports.check = check;

    function midasDuplicate(parentLayer, originalLayer, properties, duplicateCount, keyframesEnabled, shyEnabled, compositionEnabled) {
        var copies = [];
        var unmodifiedOriginalLayerName = originalLayer.name;
        originalLayer.name = originalLayer.name + "_1";
        copies.push(originalLayer);
        for (var i = 0; i < properties.length; i += 1) {
            var property = properties[i];
            if (property.canVaryOverTime) {
                while (property.numKeys !== 0) {
                    property.removeKey(1);
                }
            }
        }
        midas_1.addMidas(parentLayer, [originalLayer], properties, keyframesEnabled, shyEnabled, compositionEnabled, false, true);
        for (var i = 1; i < duplicateCount; i += 1) {
            var copy = originalLayer.duplicate();
            copy.name = unmodifiedOriginalLayerName + "_" + i + 1;
            copy.moveAfter(copies[copies.length - 1]);
            copies.push(copy);
        }
        return copies;
    }

    function simpleDuplicate(originalLayer, duplicateCount, compositionEnabled) {
        var lastCopy = originalLayer;
        var copies = [];
        for (var i = 0; i < duplicateCount; i += 1) {
            var copy = originalLayer.duplicate();
            copy.name = originalLayer.name + "_" + i + 1;
            var shapeProperty = ae_utils_1.getPropertyAtPath(copy, ["ADBE Root Vectors Group", "ADBE Vector Group", "ADBE Vectors Group", "ADBE Vector Shape - Group", "ADBE Vector Shape"]);
            if (shapeProperty) {
                while (shapeProperty.numKeys !== 0) {
                    shapeProperty.removeKey(1);
                }
                var compAccessor = compositionEnabled ? "comp(" + JSON.stringify(originalLayer.containingComp.name) + ").layer(" + JSON.stringify(originalLayer.name) + ")" : "thisComp.layer(" + JSON.stringify(originalLayer.name) + ")";
                var propertyPath = ae_utils_1.toPropertyPath(false)(shapeProperty);
                shapeProperty.expression = compAccessor + "(\"" + propertyPath.join("\")(\"") + "\")";
            }
            copy.moveAfter(lastCopy);
            copies.push(copy);
            lastCopy = copy;
        }
        return copies;
    }

    function runDuplicate(keyframesEnabled, compositionEnabled, shyEnabled, duplicateCount, name) {
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        var selectedLayers = composition.selectedLayers;
        if (prereqs_1.someSelectedPropertiesAreKeyframeable()) {
            var parentLayers_1 = [];
            var propertyGetterForLayer_1 = [];
            var collectedLayerNames_1 = [];
            var collectedCopies_1 = [];
            utils_1.fast(function() {
                for (var i = 0; i < selectedLayers.length; i += 1) {
                    var properties = selectedLayers[i].selectedProperties;
                    propertyGetterForLayer_1[i] = ae_utils_1.propertiesToGetter(properties);
                }
                var _loop_1 = function(i) {
                    var selectedLayer = selectedLayers[i];
                    collectedLayerNames_1.push(selectedLayer.name);
                    if (selectedLayer instanceof AVLayer && selectedLayer.source instanceof CompItem) {
                        selectedLayer.name = selectedLayer.name + " 1";
                    }
                    ae_utils_1.restoreSelectionAfter(function() {
                        parentLayer = selectedLayer.duplicate();
                        if (name) {
                            var namePostfix = i === 0 ? "" : " " + i;
                            var customName = ae_utils_1.getUniqueName(composition.layers, constants_1.MIDAS_PREFIX + "" + name + namePostfix);
                            parentLayer.name = customName;
                        } else {
                            var uniqueName = ae_utils_1.getUniqueName(composition.layers, constants_1.MIDAS_PREFIX + selectedLayer.name);
                            parentLayer.name = uniqueName;
                        }
                    });
                    parentLayers_1.push(parentLayer);
                    collectedCopies_1[i] = midasDuplicate(parentLayer, selectedLayer, propertyGetterForLayer_1[i](selectedLayer), duplicateCount, keyframesEnabled, shyEnabled, compositionEnabled);
                    collectedCopies_1[i].forEach(function(copy) {
                        var shapeProperty = ae_utils_1.getPropertyAtPath(copy, ["ADBE Root Vectors Group", "ADBE Vector Group", "ADBE Vectors Group", "ADBE Vector Shape - Group", "ADBE Vector Shape"]);
                        if (shapeProperty) {
                            var compAccessor = compositionEnabled ? "comp(" + JSON.stringify(parentLayer.containingComp.name) + ").layer(" + JSON.stringify(parentLayer.name) + ")" : "thisComp.layer(" + JSON.stringify(parentLayer.name) + ")";
                            var propertyPath = ae_utils_1.toPropertyPath(false)(shapeProperty);
                            shapeProperty.expression = compAccessor + "(\"" + propertyPath.join("\")(\"") + "\")";
                        }
                    });
                    selectedLayer.selected = false;
                };
                for (var i = 0; i < selectedLayers.length; i += 1) {
                    _loop_1(i);
                }
            });
            parentLayers_1.forEach(function(parentLayer, i) {
                var properties = propertyGetterForLayer_1[i](parentLayer);
                properties.forEach(function(property) {
                    if (!property || !isValid(property)) {
                        return;
                    }
                    property.selected = true;
                });
                parentLayer.guideLayer = true;
                parentLayer.label = 2;
                parentLayer.selected = true;
                parentLayer.moveBefore(selectedLayers[i]);
            });
            if (compositionEnabled) {
                parentLayers_1.forEach(function(parentLayer, i) {
                    var preCompositionName = parentLayer.name + "-children";
                    ae_utils_1.restoreSelectionAfter(function() {
                        var childLayerIndexes = collectedCopies_1[i].map(function(childLayer) {
                            return childLayer.index;
                        });
                        parentLayer.containingComp.layers.precompose(childLayerIndexes, preCompositionName, true);
                    });
                    if (shyEnabled) {
                        var precomp = composition.layer(preCompositionName);
                        precomp.selected = false;
                        precomp.shy = true;
                    }
                });
            }
            if (shyEnabled) {
                composition.hideShyLayers = true;
            }
        } else {
            utils_1.fast(function() {
                var copiesForLayer = [];
                for (var i = 0; i < selectedLayers.length; i += 1) {
                    var originalLayer = selectedLayers[i];
                    copiesForLayer.push(simpleDuplicate(originalLayer, duplicateCount, compositionEnabled));
                }
                if (compositionEnabled) {
                    selectedLayers.forEach(function(selectedLayer, i) {
                        var preCompositionName = selectedLayer.name + " - children";
                        ae_utils_1.restoreSelectionAfter(function() {
                            var childLayerIndexes = copiesForLayer[i].map(function(childLayer) {
                                return childLayer.index;
                            });
                            selectedLayer.containingComp.layers.precompose(childLayerIndexes, preCompositionName, true);
                        });
                        if (shyEnabled) {
                            var precomp = composition.layer(preCompositionName);
                            precomp.selected = false;
                            precomp.shy = true;
                        }
                    });
                }
                if (shyEnabled) {
                    composition.hideShyLayers = true;
                }
            });
        }
    }

    function run(keyframesEnabled, compositionEnabled, shyEnabled, duplicateCount, name) {
        if (keyframesEnabled === void(0)) {
            keyframesEnabled = true;
        }
        if (compositionEnabled === void(0)) {
            compositionEnabled = false;
        }
        if (shyEnabled === void(0)) {
            shyEnabled = true;
        }
        if (duplicateCount === void(0)) {
            duplicateCount = 10;
        }
        if (name === void(0)) {
            name = "echo";
        }
        var checkResult = check();
        if (!checkResult.success) {
            return checkResult;
        }
        utils_1.loadEffects();
        utils_1.catchErr(function() {
            return utils_1.undoable("Motion3 - Echo", function() {
                return runDuplicate(keyframesEnabled, compositionEnabled, shyEnabled, duplicateCount, name);
            });
        });
        return {
            success: true
        };
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);
    var ae_utils_1 = __webpack_require__(3);
    var constants_1 = __webpack_require__(4);
    var utils_1 = __webpack_require__(1);
    var midas_1 = __webpack_require__(6);

    function check() {
        return prereqs_1.runChecks(prereqs_1.checkTypes.HAS_PROJECT, prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION, prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.SELECTED_LAYER_HAS_CLOTH);
    }
    exports.check = check;

    function runCloth(keyframesEnabled, compositionEnabled, shyEnabled, name) {
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        var selectedLayers = composition.selectedLayers;
        var mainLayer = selectedLayers[0];
        utils_1.fast(function() {
            ae_utils_1.restoreSelectionAfter(function() {
                clothController = composition.layers.addNull();
                clothController.property("ADBE Transform Group").property("ADBE Anchor Point").setValue([50, 50]);
                clothController.moveBefore(mainLayer);
            });
            var clothControllerName = name ? ae_utils_1.getUniqueName(composition.layers, "[c-c] " + name) : ae_utils_1.getUniqueName(composition.layers, "[c] " + mainLayer.name);
            clothController.name = clothControllerName;
            clothController.property("ADBE Transform Group").property("ADBE Position").expression = getParentLayerPositionExpression(compositionEnabled, composition.name, clothControllerName);
            var preCompositionName = clothControllerName + " - children";
            var meshes = mainLayer.property("ADBE Effect Parade").property("ADBE FreePin3").property("ADBE FreePin3 ARAP Group").property("ADBE FreePin3 Mesh Group");
            var bones = [];
            for (var i = 1; i <= meshes.numProperties; i += 1) {
                var createBone = createBoner(composition, mainLayer, clothControllerName, preCompositionName, compositionEnabled);
                var pins = meshes.property(i).property("ADBE FreePin3 PosPins");
                for (var j = 1; j <= pins.numProperties; j += 1) {
                    while (pins.property(j).property("ADBE FreePin3 PosPin Position").numKeys !== 0) {
                        pins.property(j).property("ADBE FreePin3 PosPin Position").removeKey(1);
                    }
                    var bone = createBone(pins.property(j));
                    if (bones[j]) {
                        bone.moveAfter(bones[j]);
                    } else {
                        bone.moveAfter(clothController);
                    }
                    bone.selected = false;
                    bones.push(bone);
                }
                var lastBone_1 = bones[bones.length - 1];
                clothController.property("ADBE Transform Group").property("ADBE Position").setValue(lastBone_1.property("ADBE Transform Group").property("ADBE Position").value);
                var positionProperties = [lastBone_1.property("ADBE Transform Group").property("ADBE Position")];
                midas_1.addMidas(clothController, bones, positionProperties, false, shyEnabled, compositionEnabled, true, true);
            }
            if (keyframesEnabled) {
                clothController.property("ADBE Transform Group").property("ADBE Position").setValueAtTime(composition.time, clothController.property("ADBE Transform Group").property("ADBE Position").value);
            }
            var opacityExpression = getOpacityExpression(compositionEnabled, composition.name, clothController.name);
            mainLayer.property("ADBE Transform Group").property("ADBE Opacity").expression = opacityExpression;
            clothController.guideLayer = true;
            clothController.label = 2;
            clothController.property("ADBE Transform Group").property("ADBE Position").selected = true;
            mainLayer.locked = true;
            if (compositionEnabled) {
                var childLayerIndexes = bones.map(function(layer) {
                    return layer.index;
                });
                childLayerIndexes.push(mainLayer.index);
                composition.layers.precompose(childLayerIndexes, preCompositionName, true);
                utils_1.layersToArray(composition.layers).forEach(function(layer) {
                    if (layer.name === clothControllerName) {
                        layer.selected = true;
                        layer.property("ADBE Transform Group").property("ADBE Position").selected = true;
                    }
                    if (layer instanceof AVLayer && layer.source instanceof CompItem && layer.name.indexOf("[c]") > -1) {
                        layer.selected = false;
                        if (shyEnabled) {
                            layer.shy = true;
                        }
                        layer.moveAfter(clothController);
                    }
                });
            }
            if (shyEnabled) {
                composition.hideShyLayers = true;
            }
        });
    }

    function createBoner(composition, mainLayer, clothControllerName, preCompositionName, compositionEnabled) {
        var pinSizeExp = getPinSizeExpression(composition.name, clothControllerName, compositionEnabled).split("\n").join("\\n' +\n'");
        var pinColorExp = getPinColorExpression(composition.name, clothControllerName, compositionEnabled).split("\n").join("\\n' +\n'");
        var pinVisExp = getPinVisibleExpression(composition.name, clothControllerName, compositionEnabled).split("\n").join("\\n' +\n'");
        var fn = utils_1.genfun("function createBone(pin) {");
        fn("var bone = composition.layers.addShape();\nvar circle = bone.property('ADBE Root Vectors Group').addProperty('ADBE Vector Group');\nvar ellipse = circle.property('ADBE Vectors Group').addProperty('ADBE Vector Shape - Ellipse');\nellipse.property('ADBE Vector Ellipse Size').setValue([10, 10]);\ncircle.property('ADBE Vectors Group').addProperty('ADBE Vector Graphic - Fill');\ncircle.name = 'Circle';\ncircle.property(\"ADBE Vectors Group\").property(\"ADBE Vector Shape - Ellipse\").property(\"ADBE Vector Ellipse Size\").expression = '" + pinSizeExp + "';\ncircle.property(\"ADBE Vectors Group\").property(\"ADBE Vector Graphic - Fill\").property(\"ADBE Vector Fill Color\").expression = '" + pinColorExp + "';\nbone.label = 16;\nvar filet = pin.propertyGroup().propertyGroup();\nvar marionnette = filet.propertyGroup().propertyGroup().propertyGroup();\nbone.transform.opacity.expression = '" + pinVisExp + "';\nif (!(mainLayer instanceof ShapeLayer)) {\n  const pinPosition = pin.position.value\n  const mainLayerPosition = mainLayer.position.value\n  const anchorPoint = mainLayer.anchorPoint.value\n  const calculatedPosition = [\n    pinPosition[0] + (mainLayerPosition[0] - anchorPoint[0]),\n    pinPosition[1] + (mainLayerPosition[1] - anchorPoint[1])\n  ]\n  bone.transform.position.setValue(calculatedPosition);\n} else {\n  bone.transform.position.setValue(pin.position.value);\n}\nbone.name = mainLayer.name + ' ' + pin.name.replace('Puppet Pin', '- control');\n// bone.selected = true;\npin.position.expression = getPinPositionExpression(preCompositionName, mainLayer, bone, compositionEnabled);\nreturn bone;");
        fn("}");
        return fn.toFunction({
            composition: composition,
            mainLayer: mainLayer,
            preCompositionName: preCompositionName,
            getBonePositionExpression: getBonePositionExpression,
            getPinPositionExpression: getPinPositionExpression,
            compositionEnabled: compositionEnabled
        });
    }

    function run(keyframesEnabled, compositionEnabled, shyEnabled, name) {
        if (keyframesEnabled === void(0)) {
            keyframesEnabled = true;
        }
        if (compositionEnabled === void(0)) {
            compositionEnabled = false;
        }
        if (shyEnabled === void(0)) {
            shyEnabled = true;
        }
        if (name === void(0)) {
            name = "Cloth";
        }
        var checkResult = check();
        if (!checkResult.success) {
            return checkResult;
        }
        utils_1.loadEffects();
        utils_1.catchErr(function() {
            return utils_1.undoable("Motion3 - Cloth", function() {
                return runCloth(keyframesEnabled, compositionEnabled, shyEnabled, name);
            });
        });
        return {
            success: true
        };
    }
    exports.run = run;

    function minifier(code, map) {
        Object.keys(map).forEach(function(key) {
            code = code.replace(new RegExp(key, "g"), map[key]);
        });
        var lines = code.split("\n").map(function(line) {
            return line.trim();
        });
        var firstLine = lines.shift();
        return firstLine + "\n" + lines.join("");
    }

    function getPinSizeExpression(compositionName, clothControllerName, compositionEnabled) {
        var layerAccessor = compositionEnabled ? "comp(" + JSON.stringify(compositionName) + ").layer(" + JSON.stringify(clothControllerName) + ")" : "thisComp.layer(" + JSON.stringify(clothControllerName) + ")";
        return "// Mt. Mograph - Cloth (Pin Size Expression)\nsliderValue = " + layerAccessor + "(\"ADBE Effect Parade\")(\"" + constants_1.MIDAS_PARENT_EFFECT_NAME + "\")(\"Pseudo/WO6fbd0b07I7W-0019\");\n[sliderValue, sliderValue];";
    }

    function getPinColorExpression(compositionName, clothControllerName, compositionEnabled) {
        var layerAccessor = compositionEnabled ? "comp(" + JSON.stringify(compositionName) + ").layer(" + JSON.stringify(clothControllerName) + ")" : "thisComp.layer(" + JSON.stringify(clothControllerName) + ")";
        return layerAccessor + "(\"ADBE Effect Parade\")(\"" + constants_1.MIDAS_PARENT_EFFECT_NAME + "\")(\"Pseudo/WO6fbd0b07I7W-0018\");";
    }

    function getParentLayerPositionExpression(compositionEnabled, compositionName, clothControllerName) {
        var layerAccessor = compositionEnabled ? "comp(" + JSON.stringify(compositionName) + ").layer(" + JSON.stringify(clothControllerName) + ")" : "thisComp.layer(" + JSON.stringify(clothControllerName) + ")";
        return minifier("// Mt. Mograph - Cloth (Parent Position)\nvar clothLayer = " + layerAccessor + ";\nvar effectProperty = clothLayer(\"ADBE Effect Parade\")(\"Pseudo/WO6fbd0b07I7W\");\nvar enableOffset = effectProperty(\"Pseudo/WO6fbd0b07I7W-0022\");\nvar clothParent = effectProperty(\"Pseudo/WO6fbd0b07I7W-0023\");\nvar offsetAmount = effectProperty(\"Pseudo/WO6fbd0b07I7W-0024\");\nvar thisParade = thisLayer(\"ADBE Effect Parade\");\nvar dynEnable = thisParade(\"Pseudo/cgcebdb4a0V7C\")(\"Pseudo/cgcebdb4a0V7C-0016\");\nvar dynFreq = thisParade(\"Pseudo/cgcebdb4a0V7C\")(\"Pseudo/cgcebdb4a0V7C-0017\");\nvar dynAmount = thisParade(\"Pseudo/cgcebdb4a0V7C\")(\"Pseudo/cgcebdb4a0V7C-0018\");\nvar dynOffset = value;\nif (dynEnable > 0) {\nseedRandom(time * dynFreq);\ndynOffset = wiggle(0, dynAmount);\n}\nif (enableOffset > 0) {\nvar anchorPoint2 = clothParent(\"ADBE Transform Group\")(\"ADBE Anchor Point\");\n(value - dynOffset) + clothParent.toWorld(anchorPoint2) + offsetAmount;\n} else {\ndynOffset;\n}", {
            clothLayer: "a",
            effectProperty: "b",
            enableOffset: "c",
            clothParent: "d",
            offsetAmount: "e",
            anchorPoint2: "f",
            thisParade: "g",
            dynEnable: "h",
            dynFreq: "i",
            dynAmount: "j",
            dynOffset: "k"
        });
    }

    function getOpacityExpression(compositionEnabled, compositionName, clothControllerName) {
        var layerAccessor = compositionEnabled ? "comp(" + JSON.stringify(compositionName) + ").layer(" + JSON.stringify(clothControllerName) + ")" : "thisComp.layer(" + JSON.stringify(clothControllerName) + ")";
        return minifier("// Mt. Mograph - Cloth (Visibility)\nvar controllerLayer = " + layerAccessor + ";\nglobalEffect = controllerLayer(\"ADBE Effect Parade\")(\"Pseudo/WO6fbd0b07I7W\");\nenableHide = globalEffect(\"Pseudo/WO6fbd0b07I7W-0027\");\nif (enableHide < 1) {\n0;\n} else {\nvalue;\n}", {
            controllerLayer: "a",
            globalEffect: "b",
            enableHide: "c"
        });
    }

    function getBonePositionExpression(compositionName, mainLayer, clothControllerName, marionette, filet, pin, compositionEnabled) {
        var layerAccessor = compositionEnabled ? "comp(" + JSON.stringify(compositionName) + ").layer(" + JSON.stringify(clothControllerName) + ")" : "thisComp.layer(" + JSON.stringify(clothControllerName) + ")";
        var expression = layerAccessor + ".effect(" + JSON.stringify(marionette.name) + ").arap.mesh(" + JSON.stringify(filet.name) + ").deform(" + JSON.stringify(pin.name) + ").position";
        if (!(mainLayer instanceof ShapeLayer)) {
            return layerAccessor + ".toWorld(" + expression + ")";
        }
        return expression;
    }

    function getPinVisibleExpression(compositionName, clothControllerName, compositionEnabled) {
        var layerAccessor = compositionEnabled ? "comp(" + JSON.stringify(compositionName) + ").layer(" + JSON.stringify(clothControllerName) + ")" : "thisComp.layer(" + JSON.stringify(clothControllerName) + ")";
        return minifier("// Mt. Mograph - Cloth (Pin Visible Expression)\ntry {\n  child_visible = " + layerAccessor + "(\"ADBE Effect Parade\")(\"" + constants_1.MIDAS_PARENT_EFFECT_NAME + "\")(\"Pseudo/WO6fbd0b07I7W-0017\");\n  if (child_visible == 1) {\n    value;\n  } else {\n    0;\n  }\n} catch (err) {\n  value;\n}", {
            child_visible: "a"
        });
    }

    function getPinPositionExpression(compositionName, mainLayer, bone, compositionEnabled) {
        var boneAccessor = compositionEnabled ? "comp(" + JSON.stringify(compositionName) + ").layer(" + JSON.stringify(bone.name) + ")" : "thisComp.layer(" + JSON.stringify(bone.name) + ")";
        if (mainLayer instanceof ShapeLayer) {
            return "bonePos = " + boneAccessor + ".position";
        }
        var mainLayerAcessor = "thisComp.layer(" + JSON.stringify(mainLayer.name) + ")";
        return minifier("var bone = " + boneAccessor + ";\nvar mainLayer = " + mainLayerAcessor + ";\nvar bonePosition = bone.position.value;\nvar mainLayerPosition = mainLayer.position.value;\nvar anchorPointValue = mainLayer.anchorPoint.value;\nbonePos = [\n  anchorPointValue[0] - mainLayerPosition[0] + bonePosition[0],\n  anchorPointValue[1] - mainLayerPosition[1] + bonePosition[1]\n];", {
            mainLayer: "a",
            bonePosition: "b",
            mainLayerPosition: "c",
            anchorPointValue: "d"
        });
    }
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var utils_1 = __webpack_require__(1);
    var prereqs_1 = __webpack_require__(0);
    var constants_1 = __webpack_require__(4);
    var ae_utils_1 = __webpack_require__(3);

    function propertyToShortName(property, includeLayerName) {
        var name = [];
        var parent = property.parentProperty;
        name.push(property.name);
        while (parent) {
            if (includeLayerName && parent instanceof Layer) {

            } else {
                name.unshift(parent.name);
            }
            parent = parent.parentProperty;
        }
        return name.join(">");
    }

    function check() {
        return prereqs_1.runChecks(prereqs_1.checkTypes.HAS_PROJECT, prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION, prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.SELECTED_LAYER_HAS_SELECTED_PROPERTIES, prereqs_1.checkTypes.SOME_SELECTED_PROPERTIES_ARE_KEYFRAMEABLE, prereqs_1.checkTypes.SOME_SELECTED_PROPERTIES_HAVE_AT_LEAST_TWO_KEYFRAMES);
    }
    exports.check = check;

    function propertyToAnimoEffectName(property, includeLayerName) {
        return "" + constants_1.ANIMO_PREFIX + propertyToShortName(property, includeLayerName);
    }

    function minifier(code, map) {
        Object.keys(map).forEach(function(key) {
            code = code.replace(new RegExp(key, "g"), map[key]);
        });
        var lines = code.split("\n").map(function(line) {
            return line.trim();
        });
        var firstLine = lines.shift();
        return firstLine + "\n" + lines.join("");
    }

    function getExpression(controllerName, effectName) {
        return minifier("// Mt. Mograph - Animo - Property\neffectProperty = thisComp.layer(" + JSON.stringify(controllerName) + ").effect(" + JSON.stringify(effectName) + ");\nisEnabled = effectProperty(\"Pseudo/Vja67b86eDUB-0001\");\nif (isEnabled > 0 && numKeys > 1) {\nanimatePercentage = effectProperty(\"Pseudo/Vja67b86eDUB-0002\");\nstartKeyTime = key(1).time;\nendKeyTime = key(numKeys).time;\nkeyedDuration = endKeyTime - startKeyTime;\nvalueAtTime(startKeyTime + (keyedDuration * (animatePercentage / 100)));\n} else {\nvalue;\n}", {
            effectProperty: "a",
            isEnabled: "b",
            animatePercentage: "c",
            startKeyTime: "d",
            endKeyTime: "e",
            keyedDuration: "f"
        });
    }

    function getSpectreOutputExpression(effectName) {
        return minifier("// Mt. Mograph - Animo - Spectre Output\nchildEffect = effect(" + JSON.stringify(effectName) + ");\ntrig_enable = childEffect(\"Pseudo/Vja67b86eDUB-0004\");\ntry {\ntl_allowFX = childEffect(\"Pseudo/Vja67b86eDUB-0005\");\ntl_trigger = childEffect(\"Pseudo/Vja67b86eDUB-0006\");\ntl_multiplier = childEffect(\"Pseudo/Vja67b86eDUB-0007\");\nif (trig_enable > 0 && tl_trigger !== index) {\n  tl_anchor = toComp(transform.anchorPoint);\n  tl_zero = toComp([0, 0]);\n  tl_dimension = toComp([thisLayer.width, thisLayer.height]);\n  x_diff = Math.abs(tl_zero[0] - tl_dimension[0]);\n  y_diff = Math.abs(tl_zero[1] - tl_dimension[1]);\n  trigger_sample = tl_trigger.sampleImage(tl_anchor, [x_diff / 2, y_diff / 2], tl_allowFX, time);\n  calc_sample = trigger_sample[3] * 100 * tl_multiplier;\n  calc_sample;\n} else {\n  0;\n}\n} catch (e) {\n0;\n}", {
            childEffect: "a",
            trig_enable: "b",
            tl_allowFX: "c",
            tl_trigger: "d",
            tl_anchor: "e",
            tl_zero: "f",
            tl_dimension: "g",
            x_diff: "h",
            y_diff: "i",
            trigger_sample: "j",
            calc_sample: "k"
        });
    }

    function getSpectreEnableExpression(effectName) {
        return minifier("// Mt. Mograph - Animo - Spectre Enable\nchildEffect = effect(" + JSON.stringify(effectName) + ");\nspectre_on = childEffect(\"Pseudo/Vja67b86eDUB-0004\");\nif (spectre_on > 0){\n0;\n} else {\nvalue;\n}", {
            childEffect: "a",
            spectre_on: "b"
        });
    }

    function getAnimateExpression(effectName) {
        return minifier("// Mt. Mograph - Animo - Animate\neffectProperty = effect(" + JSON.stringify(effectName) + ");\nenableTrigger = effectProperty(\"Pseudo/Vja67b86eDUB-0004\");\ntriggerOutput = effectProperty(\"Pseudo/Vja67b86eDUB-0008\");\ncycleIsEnabled = effectProperty(\"Pseudo/Vja67b86eDUB-0011\");\ncycleType = effectProperty(\"Pseudo/Vja67b86eDUB-0012\");\nif (enableTrigger > 0) {\ntriggerOutput;\n} else if (cycleIsEnabled == 1 && numKeys > 1 && enableTrigger < 1) {\nif (cycleType == 1) {\n  loopOut(\"cycle\");\n} else if (cycleType == 2) {\n  loopOut(\"pingpong\");\n}\n} else {\nvalue\n}", {
            effectProperty: "a",
            enableTrigger: "b",
            triggerOutput: "c",
            cycleIsEnabled: "d",
            cycleType: "e"
        });
    }

    function getSpectreAnchorExpression() {
        return "[thisLayer.width / 2, thisLayer.height / 2];";
    }

    function addAnimo(composition, controllerLayer, properties, groupEnabled, keyframesEnabled, shyEnabled, includeLayerName, name) {
        if (groupEnabled === void(0)) {
            groupEnabled = false;
        }
        if (keyframesEnabled === void(0)) {
            keyframesEnabled = false;
        }
        if (shyEnabled === void(0)) {
            shyEnabled = false;
        }
        if (includeLayerName === void(0)) {
            includeLayerName = false;
        }
        var fn = utils_1.genfun("function applyAnimo(composition, controllerLayer) {\nvar effectsProperty = controllerLayer.property('ADBE Effect Parade')");
        if (groupEnabled) {
            var minTime_1 = Infinity;
            var maxTime_1 = 0;
            properties.forEach(function(property) {
                var first = property.keyTime(1);
                var last = property.keyTime(property.numKeys);
                if (minTime_1 > first) {
                    minTime_1 = first
                }
                if (maxTime_1 < last) {
                    maxTime_1 = last
                }
            });
            fn("\nvar effectName = " + JSON.stringify(name) + " || controllerLayer.name.replace('" + constants_1.ANIMO_CONTROLLER_PREFIX + "', '');\nif (!effectsProperty.property(effectName)) {\nvar effect = effectsProperty.addProperty('Pseudo/Vja67b86eDUB')\neffect.name = effectName\n\nvar spectreEnableExpression = getSpectreEnableExpression(effectName)\neffect.property('Pseudo/Vja67b86eDUB-0011').expression = spectreEnableExpression\n\nvar spectreOutputExpression = getSpectreOutputExpression(effectName)\neffect.property('Pseudo/Vja67b86eDUB-0008').expression = spectreOutputExpression\n\nvar animateExpression = getAnimateExpression(effectName)\neffect.property('Pseudo/Vja67b86eDUB-0002').expression = animateExpression\n" + keyframesEnabled ? "effect.property('Pseudo/Vja67b86eDUB-0002').setValueAtTime(" + JSON.stringify(minTime_1) + ", 0)\neffect.property('Pseudo/Vja67b86eDUB-0002').setValueAtTime(" + JSON.stringify(maxTime_1) + ", 100)" : "" + "\n}");
        }
        properties.forEach(function(property) {
            if (!groupEnabled) {
                effectName = propertyToAnimoEffectName(property, includeLayerName);
                fn("var effect = effectsProperty.addProperty('Pseudo/Vja67b86eDUB')\nvar effectName = " + JSON.stringify(effectName) + "\neffect.name = effectName\n" + keyframesEnabled ? "\neffect.property('Pseudo/Vja67b86eDUB-0002').setValueAtTime(" + JSON.stringify(property.keyTime(1)) + ", 0)\neffect.property('Pseudo/Vja67b86eDUB-0002').setValueAtTime(" + JSON.stringify(property.keyTime(property.numKeys)) + ", 100)" : "");
            }
            var propertyPath = ae_utils_1.toPropertyPath(false)(property);
            var layer = ae_utils_1.getLayerForProperty(property);
            var propertyPathString = ".property(" + propertyPath.map(function(str) {
                return JSON.stringify(str);
            }).join(").property(") + ")";
            fn("// add the expression on the property\nvar expression = getExpression(controllerLayer.name, effectName)\nvar layer = composition.layer(" + JSON.stringify(layer.name) + ")\nvar property = layer" + propertyPathString + "\nvar spectreAnchorExpression = getSpectreAnchorExpression()\nvar achorPoint = controllerLayer.property('ADBE Transform Group').property('ADBE Anchor Point')\nachorPoint.expression = spectreAnchorExpression\n\n// if (property.expression) {\n//   property.expression = '/* ' + property.expression + ' */\\n' + expression\n// } else {\n  property.expression = expression\n// }\n");
            if (shyEnabled) {
                layer.shy = true;
            }
        });
        if (shyEnabled) {
            composition.hideShyLayers = true;
        }
        fn("}");
        return fn.toFunction({
            getExpression: getExpression,
            getAnimateExpression: getAnimateExpression,
            getSpectreOutputExpression: getSpectreOutputExpression,
            getSpectreEnableExpression: getSpectreEnableExpression,
            getSpectreAnchorExpression: getSpectreAnchorExpression
        })(composition, controllerLayer);
    }

    function findControllerLayer(composition, selectedLayers, name) {
        var searchControllerLayer = composition.layers.filter(function(layer) {
            return layer.name === (constants_1.ANIMO_CONTROLLER_PREFIX + name) && layer.label === 10 && layer.selectedProperties.length === 0;
        });
        if (searchControllerLayer.length === 1) {
            return {
                isNew: false,
                foundControllerLayer: searchControllerLayer[0]
            };
        }
        var searchSelectedLayers = selectedLayers.filter(function(layer) {
            return layer.label === 10 && layer.selectedProperties.length === 0;
        });
        if (searchSelectedLayers.length === 1) {
            return {
                isNew: false,
                foundControllerLayer: searchSelectedLayers[0]
            };
        }
        return {
            isNew: false,
            foundControllerLayer: null
        };
    }

    function findOrCreateControllerLayer(composition, selectedLayers, name) {
        var findResult = findControllerLayer(composition, selectedLayers, name);
        if (findResult.foundControllerLayer) {
            return findResult;
        }
        ae_utils_1.restoreSelectionAfter(function() {
            controllerLayer = composition.layers.addNull();
            controllerLayer.label = 10;
            var controllerLayerName = ae_utils_1.getUniqueName(composition.layers, name ? constants_1.ANIMO_CONTROLLER_PREFIX + name : constants_1.ANIMO_CONTROLLER_PREFIX + "animo");
            controllerLayer.name = controllerLayerName;
        });
        return {
            foundControllerLayer: controllerLayer,
            isNew: true
        };
    }
    var isAnimoable = function(property) {
        return property.canSetExpression && property.canVaryOverTime && property.numKeys >= 2;
    };

    function makeSelections(controllerLayer, selectedProperties, groupEnabled, includeLayerName, name) {
        var effects = controllerLayer.property("ADBE Effect Parade");
        if (groupEnabled) {
            var effectName = name || controllerLayer.name.replace(constants_1.ANIMO_CONTROLLER_PREFIX, "");
            var effect = effects.property(effectName);
            effect.property("Pseudo/Vja67b86eDUB-0002").selected = true;
        } else {
            selectedProperties.forEach(function(selectedProperty) {
                effects.property(propertyToAnimoEffectName(selectedProperty, includeLayerName)).property("Pseudo/Vja67b86eDUB-0002").selected = true;
            });
        }
    }

    function runAnimo(keyframesEnabled, shyEnabled, name) {
        var groupEnabled = true;
        var controllerEnabled = true;
        utils_1.fast(function fastCb(composition) {
            var selectedLayers = composition.selectedLayers;
            var allSelectedProperties = composition.selectedProperties.filter(isAnimoable);
            var allSelectedPropertiesGetter = ae_utils_1.propertiesToGetterFromComp(allSelectedProperties);
            var forSelectedLayerAndProperties = ae_utils_1.layersToLooper(selectedLayers);
            var _a = controllerEnabled ? findOrCreateControllerLayer(composition, selectedLayers, name) : findControllerLayer(composition, name);
            var foundControllerLayer = _a.foundControllerLayer;
            var isNew = _a.isNew;
            utils_1.deselectAll(composition);
            if (foundControllerLayer) {
                addAnimo(composition, foundControllerLayer, allSelectedProperties, groupEnabled, keyframesEnabled, shyEnabled, true, name);
                ae_utils_1.tag(foundControllerLayer, 0, foundControllerLayer.property("ADBE Effect Parade").map(function(item) {
                    return item.name;
                }).reverse().join(", "), true);
                makeSelections(foundControllerLayer, allSelectedPropertiesGetter(composition), groupEnabled, true, name);
                if (isNew) {
                    var lowestIndex = ae_utils_1.getLowestIndex(selectedLayers);
                    var destination = composition.layer(lowestIndex);
                    if (destination instanceof AVLayer && destination.hasTrackMatte) {
                        destination = composition.layer(lowestIndex - 1);
                    }
                    foundControllerLayer.moveBefore(destination);
                }
            } else {
                forSelectedLayerAndProperties(composition, function(layer, properties) {
                    addAnimo(composition, layer, properties.filter(isAnimoable), groupEnabled, keyframesEnabled, false, false);
                    ae_utils_1.tag(layer, 0, layer.property("ADBE Effect Parade").map(function(item) {
                        return item.name;
                    }).reverse().join(", "), true);
                });
                forSelectedLayerAndProperties(composition, function(layer, properties) {
                    return makeSelections(layer, properties.filter(isAnimoable), groupEnabled, false, name);
                });
            }
        });
        app.executeCommand(2387);
    }

    function run(keyframesEnabled, shyEnabled, name) {
        if (keyframesEnabled === void(0)) {
            keyframesEnabled = true;
        }
        if (shyEnabled === void(0)) {
            shyEnabled = true;
        }
        if (name === void(0)) {
            name = "Animo";
        }
        var checkResult = check();
        if (!checkResult.success) {
            return checkResult;
        }
        utils_1.loadEffects();
        utils_1.catchErr(function() {
            return utils_1.undoable("Motion3 - Animo", function() {
                return runAnimo(keyframesEnabled, shyEnabled, name);
            });
        });
        return {
            success: true
        };
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    var __read = this && this.__read || function(o, n) {
            var m = typeof Symbol === "function" && o[Symbol.iterator];
            if (!m) {
                return o;
            }
            var i = m.call(o);
            var ar = [];
            try {
                while (n === void(0) || n-- > 0 && !r = i.next().done) {
                    ar.push(r.value)
                }
            } catch (error) {
                e = {
                    error: error
                };
            } finally {
                try {
                    if (r && !r.done && m = i.
                    return) {
                        m.call(i)
                    }
                } finally {
                    if (e) {
                        throw e.error
                    }
                }
            }
            return ar;
        };
    var __spread = this && this.__spread || function() {
            for (var ar = [],
            var i = 0; i < arguments.length; i++) {
                ar = ar.concat(__read(arguments[i]))
            }
            return ar;
        };
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var utils_1 = __webpack_require__(1);
    var prereqs_1 = __webpack_require__(0);

    function check() {
        return prereqs_1.runChecks(prereqs_1.checkTypes.HAS_PROJECT, prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION, prereqs_1.checkTypes.HAS_SELECTED_LAYER);
    }
    exports.check = check;

    function centerAnchorPoint(layer) {
        var comp = layer.containingComp;
        var curTime = comp.time;
        var layerAnchor = layer.anchorPoint.value;
        var x = layer.sourceRectAtTime(curTime, false).width / 2;
        var y = layer.sourceRectAtTime(curTime, false).height / 2;
        x += layer.sourceRectAtTime(curTime, false).left;
        y += layer.sourceRectAtTime(curTime, false).top;
        var xAdd = (x - layerAnchor[0]) * (layer.scale.value[0] / 100);
        var yAdd = (y - layerAnchor[1]) * (layer.scale.value[1] / 100);
        layer.anchorPoint.setValue([x, y]);
        var layerPosition = layer.position.value;
        layer.position.setValue([layerPosition[0] + xAdd, layerPosition[1] + yAdd, layerPosition[2]]);
    }

    function looseFindLastPropertyGroup(layerOrPropertyGroup, name) {
        for (var i = layerOrPropertyGroup.numProperties; i > 0; i--) {
            var propertyGroup = layerOrPropertyGroup.property(i);
            if (propertyGroup instanceof PropertyGroup) {
                if (propertyGroup.name.indexOf(name) > -1) {
                    return propertyGroup;
                }
                var search = looseFindLastPropertyGroup(propertyGroup, name);
                if (search !== null) {
                    return search;
                }
            }
        }
        return null;
    }

    function runVectorBreak() {
        var composition = app.project.activeItem;
        if (!composition || !(composition instanceof CompItem)) {
            return;
        }
        composition.hideShyLayers = true;
        var selectedLayersCopy = __spread(composition.selectedLayers);
        composition.selectedLayers.forEach(function(sl) {
            sl.selected = false;
        });
        var copies = [];
        selectedLayersCopy.forEach(function(selectedLayer) {
            if (selectedLayer instanceof AVLayer) {
                selectedLayer.selected = true;
                app.executeCommand(3973);
                utils_1.fast(function() {
                    utils_1.layersToArray(composition.layers).forEach(function(layer) {
                        if (layer.name.indexOf(selectedLayer.name.replace(".ai", "")) > -1 && layer.name.indexOf("Outlines") > -1) {
                            layer.property("ADBE Root Vectors Group").forEach(function(vec, i) {
                                var copy = layer.duplicate();
                                copy.enabled = false;
                                copy.shy = true;
                                copy.moveAfter(layer);
                                copies.push(copy);
                                copy.name = selectedLayer.name.replace(".ai", "") + " - " + vec.name;
                                var propertyGroup = copy.property("ADBE Root Vectors Group");
                                for (var j = propertyGroup.numProperties; j > 0; j--) {
                                    var property = propertyGroup.property(j);
                                    if (j !== (i + 1)) {
                                        property.remove();
                                    } else {
                                        var mergePath = looseFindLastPropertyGroup(property, "Merge Paths");
                                        if (mergePath !== null) {
                                            var group = looseFindLastPropertyGroup(property, "Group");
                                            if (group !== null) {
                                                mergePath.remove();
                                                var groupToRemove = looseFindLastPropertyGroup(property, "Group");
                                                groupToRemove.remove();
                                            }
                                        }
                                    }
                                }
                                centerAnchorPoint(copy);
                            });
                            layer.remove();
                        }
                    });
                });
            } else {
                utils_1.fast(function() {
                    selectedLayer.property("ADBE Root Vectors Group").forEach(function(vec, i) {
                        var copy = selectedLayer.duplicate();
                        copy.enabled = false;
                        copy.shy = true;
                        copy.moveAfter(selectedLayer);
                        copies.push(copy);
                        copy.name = selectedLayer.name + " - " + vec.name;
                        var propertyGroup = copy.property("ADBE Root Vectors Group");
                        for (var j = propertyGroup.numProperties; j > 0; j--) {
                            var property = propertyGroup.property(j);
                            if (j !== (i + 1)) {
                                property.remove();
                            }
                        }
                        centerAnchorPoint(copy);
                    });
                });
                selectedLayer.enabled = false;
            }
            selectedLayer.selected = false;
        });
        copies.forEach(function(copy) {
            copy.enabled = true;
            copy.shy = false;
        });
        composition.hideShyLayers = false;
    }

    function run() {
        var checkResult = check();
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        utils_1.catchErr(function() {
            utils_1.undoable("Motion3 - Vector Break", function() {
                return runVectorBreak();
            });
        });
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var utils_1 = __webpack_require__(1);
    var prereqs_1 = __webpack_require__(0);

    function check() {
        return prereqs_1.runChecks(prereqs_1.checkTypes.HAS_PROJECT, prereqs_1.checkTypes.HAS_ACTIVE_ITEM, prereqs_1.checkTypes.ACTIVE_ITEM_IS_COMPOSITION, prereqs_1.checkTypes.HAS_SELECTED_LAYER);
    }
    exports.check = check;

    function runVectorCombine() {
        var composition = app.project.activeItem;
        if (!composition || !(composition instanceof CompItem)) {
            return;
        }
        var newShape = composition.layers.addShape();
        composition.selectedLayers.forEach(function(selectedLayer) {
            var propertyGroup = selectedLayer.property("ADBE Root Vectors Group");
            for (var i = propertyGroup.numProperties; i > 0; i--) {
                var child = propertyGroup.property(i);
                if (child instanceof PropertyGroup) {

                }
            }
        });
    }

    function run() {
        var checkResult = check();
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        utils_1.catchErr(function() {
            utils_1.undoable("Motion3 - Vector Combine", function() {
                return runVectorCombine();
            });
        });
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.run = exports.check = void(0);
    var prereqs_1 = __webpack_require__(0);
    var settings_1 = __webpack_require__(60);

    function check() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.SELECTED_LAYER_HAS_CLOTH);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        return JSON.stringify({
            success: true
        });
    }
    exports.check = check;

    function run() {
        var checkResult = prereqs_1.runChecks(prereqs_1.checkTypes.HAS_SELECTED_LAYER, prereqs_1.checkTypes.SELECTED_LAYER_HAS_CLOTH);
        if (!checkResult.success) {
            return JSON.stringify(checkResult);
        }
        var composition = app.project.activeItem;
        if (!(composition instanceof CompItem)) {
            return;
        }
        var nullSize = Number(settings_1.getSetting("nullSize"));
        var selectedLayers = composition.selectedLayers;
        var createController = function(pin) {
            var myNull = composition.layers.addNull();
            myNull.label = 16;
            myNull.source.width = nullSize / 2;
            myNull.source.height = nullSize / 2;
            myNull.anchorPoint.setValue([myNull.source.width / 2, myNull.source.height / 2]);
            myNull.name = thisName + " - " + pin.name + " - NULL";
            myNull.inPoint = theLayer.inPoint;
            myNull.outPoint = theLayer.outPoint;
            var child = pin.property("ADBE FreePin3 PosPin Position");
            var pos = [child.value[0], child.value[1]];
            myNull.position.setValue(pos);
            pin.position.expression = "pinPos = thisComp.layer(\"" + myNull.name + "\").toWorld(thisComp.layer(\"" + myNull.name + "\").transform.anchorPoint);";
            myNull.parent = pinController;
            myNull.moveAfter(pinController);
        };
        if (selectedLayers[0] === null || selectedLayers[0].property("ADBE Effect Parade").property("ADBE FreePin3") === null) {

        } else {
            var theLayers = composition.selectedLayers;
            app.beginUndoGroup("Pin +");
            for (var num = 0; num < theLayers.length; num += 1) {
                var theLayer = theLayers[num];
                var numMesh = theLayer.property("ADBE Effect Parade").property("ADBE FreePin3").property("ADBE FreePin3 ARAP Group").property("ADBE FreePin3 Mesh Group").numProperties;
                var meshAndPins = new Array(numMesh);
                var arePinsSelected = false;
                var thisName = theLayer.name;
                var thisPosition = theLayer.position;
                var thisPositionValue = thisPosition.value;
                var pos = [thisPositionValue[0], thisPositionValue[1]];
                if (arePinsSelected !== null) {
                    var pinController = composition.layers.addNull();
                    pinController.position.setValue(pos);
                    pinController.name = thisName + " - CONTROL";
                    pinController.source.width = nullSize;
                    pinController.source.height = nullSize;
                    pinController.anchorPoint.setValue([pinController.source.width / 2, pinController.source.height / 2]);
                    pinController.label = 8;
                }
                for (var t = 1; t <= numMesh; t += 1) {
                    var whatMesh = theLayer.property("Effects").property("Puppet").property("arap").property("Mesh").property(t).name;
                    var thePins = theLayer.property("Effects").property("Puppet").property("arap").property("Mesh").property(whatMesh).property("Deform");
                    var allTheProps = thePins.numProperties;
                    if (arePinsSelected === false) {
                        for (var n = 1; n <= allTheProps; n += 1) {
                            pin = thePins.property(n);
                            createController(pin);
                        }
                    } else {
                        for (var c = 0; c < meshAndPins[t - 1].length; c += 1) {
                            pin = thePins.property(meshAndPins[t - 1][c]);
                            createController(pin);
                        }
                    }
                }
                theLayer.locked = true;
            }
        }
        app.endUndoGroup();
        return JSON.stringify({
            success: true
        });
    }
    exports.run = run;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.resetSettings = exports.saveSetting = exports.getSetting = exports.getSettings = void(0);
    var SETTINGS_NAMESPACE = "Mt_Mograph";
    var DEFAULT_SETTINGS = {
        deleteOldFolders: "yes",
        rockstarAgree: "no",
        removeUnused: "no",
        nullSize: "120",
        sortIgnore: "Final",
        compFolderName: "Compositions",
        audioFolderName: "Audio",
        imagesFolderName: "Images",
        nullFolderName: "Nulls & Solids",
        videoFolderName: "Video",
        missingFolderName: "Missing Content",
        oldFolderName: "Old Folders",
        aiFolderName: "AI & PSD"
    };

    function getSettings() {
        var settingKeys = Object.keys(DEFAULT_SETTINGS);
        settingKeys.forEach(function(key) {
            if (!app.settings.haveSetting(SETTINGS_NAMESPACE, key)) {
                app.settings.saveSetting(SETTINGS_NAMESPACE, key, DEFAULT_SETTINGS[key]);
            }
        });
        var result = {};
        settingKeys.forEach(function(key) {
            result[key] = app.settings.getSetting(SETTINGS_NAMESPACE, key);
        });
        return result;
    }
    exports.getSettings = getSettings;

    function getSetting(key) {
        var settings = getSettings();
        return settings[key];
    }
    exports.getSetting = getSetting;

    function saveSetting(key, value) {
        app.settings.saveSetting(SETTINGS_NAMESPACE, key, value);
    }
    exports.saveSetting = saveSetting;

    function resetSettings() {
        Object.keys(DEFAULT_SETTINGS).forEach(function(key) {
            return saveSetting(key, DEFAULT_SETTINGS[key]);
        });
    }
    exports.resetSettings = resetSettings;
}, function(module, exports, __webpack_require__) {
    "use strict";
    exports.__esModule = true;
    exports.poll = void(0);
    var utils_1 = __webpack_require__(1);

    function getComp() {
        var composition = app.project.activeItem;
        if (composition === null || !(composition instanceof CompItem)) {
            throw new Error("No Composition")
        }
        return composition;
    }

    function poll() {
        try {
            var composition = getComp();
            var minInPoint_1 = Infinity;
            var maxOutPoint_1 = -Infinity;
            var layers = utils_1.layersToArray(composition.layers).map(function(layer) {
                if (layer.inPoint < minInPoint_1) {
                    minInPoint_1 = layer.inPoint;
                }
                if (layer.outPoint > maxOutPoint_1) {
                    maxOutPoint_1 = layer.outPoint;
                }
                return {
                    name: layer.name,
                    inPoint: layer.inPoint,
                    outPoint: layer.outPoint
                };
            });
            return JSON.stringify({
                layers: layers,
                minInPoint: minInPoint_1,
                maxOutPoint: maxOutPoint_1
            });
        } catch (err) {
            return "null";
        }
    }
    exports.poll = poll;
}]);