local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local _ = require(l_script_FirstAncestor_0.Src.Util.Constants);
local _ = require(l_script_FirstAncestor_0.Src.Util.AnimationData);
local _ = require(l_script_FirstAncestor_0.Src.Util.KeyframeUtils);
local _ = require(l_script_FirstAncestor_0.Src.Util.RigUtils);
local v5 = require(l_script_FirstAncestor_0.Src.Util.RigInfo);
local _ = require(l_script_FirstAncestor_0.Src.Thunks.SetKeyframeData);
local v7 = require(l_script_FirstAncestor_0.Src.Actions.SetSelectedTrackInstances);
local function v16(v8)
    local v9 = v5.buildRigHierarchy(v8);
    local v10 = {};
    local function v11(v12, v13)
        v13 = v13 or 1;
        for v14, v15 in v12, nil, nil do
            assert(not v10[v14], "Duplicate name in hierarchy");
            v10[v14] = v13;
            v11(v15, v13 + 1);
        end;
    end;
    v11(v9);
    return v10;
end;
return function(v17)
    return function(v18)
        local l_RootInstance_0 = v18:getState().Status.RootInstance;
        if l_RootInstance_0 then
            if v17 and #v17 > 1 then
                local v20 = v16(l_RootInstance_0);
                local v21 = {};
                for v22, v23 in v17, nil, nil do
                    local l_BoneRef_0 = v23:FindFirstChild("BoneRef");
                    v21[v23] = {
                        depth = v20[if not l_BoneRef_0 then v23.Name else l_BoneRef_0.Value.Name] or math.huge,
                        order = v22
                    };
                end;
                table.sort(v17, function(v25, v26)
                    local v27 = v21[v25];
                    local v28 = v21[v26];
                    local l_depth_0 = v27.depth;
                    local l_depth_1 = v28.depth;
                    local l_order_0 = v27.order;
                    local l_order_1 = v28.order;
                    if l_depth_1 < l_depth_0 then
                        return true;
                    elseif l_depth_0 < l_depth_1 then
                        return false;
                    else
                        return l_order_0 < l_order_1;
                    end;
                end);
            end;
            v18:dispatch(v7(v17));
            return ;
        else
            return ;
        end;
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Packages.Cryo);
local v2 = require(l_script_FirstAncestor_0.Src.Util.SkeletonUtils);
local _ = require(l_script_FirstAncestor_0.Src.Util.RigUtils);
local v4 = require(l_script_FirstAncestor_0.Src.Util.RigInfo);
local v5 = require(l_script_FirstAncestor_0.Src.Util.FacsUtils);
local v6 = require(l_script_FirstAncestor_0.LuaFlags.GetFFlagSelectFromViewport);
local v7 = require(l_script_FirstAncestor_0.Src.Actions.SetTracks);
local function v8(v9, v10)
    v9.Depth = v10;
    local l_pairs_0 = pairs;
    local v12 = v9.Components or {};
    for _, v14 in l_pairs_0(v12) do
        v8(v14, v10 + 1);
    end;
end;
local function v15(v16, v17, v18)
    local v19 = v1.Dictionary.keys(v16);
    table.sort(v19);
    for _, v21 in ipairs(v19) do
        local v22 = v16[v21];
        if not v17(v21, v18) then
            v15(v22, v17, v18);
        else
            v15(v22, v17, v18 + 1);
        end;
    end;
end;
local _ = function(v23, v24)
    local v25 = {};
    v15(v24, function(v26, v27)
        for _, v29 in ipairs(v23) do
            if v29.Name == v26 then
                v8(v29, v27);
                table.insert(v25, v29);
                return true;
            end;
        end;
    end, 0);
    return v25;
end;
local function v36(v31)
    table.sort(v31, function(v32, v33)
        return v32.Name < v33.Name;
    end);
    for _, v35 in ipairs(v31) do
        v8(v35, 0);
    end;
    return v31;
end;
return function(v37)
    return function(v38)
        local l_RootInstance_0 = v38:getState().Status.RootInstance;
        local v40 = nil;
        local v41 = nil;
        local v42 = {};
        if l_RootInstance_0 and (not (typeof(l_RootInstance_0) ~= "Instance") or not v6() and type(l_RootInstance_0) == "table") then
            if not v6() and (not (l_RootInstance_0.ClassName ~= "Skeleton") or l_RootInstance_0.ClassName == "MockSkeleton") then
                local v43 = nil;
                local v44 = nil;
                if l_RootInstance_0.ClassName == "Skeleton" then
                    local l_l_RootInstance_0_Bones_0 = l_RootInstance_0:GetBones();
                    v43 = l_l_RootInstance_0_Bones_0.Names;
                    v44 = l_l_RootInstance_0_Bones_0.Parents;
                else
                    v43 = l_RootInstance_0.Names;
                    v44 = l_RootInstance_0.Parents;
                end;
                v41 = v2.buildSkeletonHierarchy(v43, v44);
                v42 = v2.getUnusedSkeletonTracks(v43, v37);
            elseif not (not (l_RootInstance_0.ClassName == "Model" and l_RootInstance_0:FindFirstChildOfClass("Humanoid")) and not l_RootInstance_0:FindFirstChildOfClass("AnimationController")) then
                v41 = v4.buildRigHierarchy(l_RootInstance_0);
                v42 = v4.getUnusedRigTracks(l_RootInstance_0, v37);
            end;
        end;
        if not v41 then
            v40 = v36(v37);
        else
            local l_v37_0 = v37;
            local l_v41_0 = v41;
            local v48 = {};
            v15(l_v41_0, function(v49, v50)
                for _, v52 in ipairs(l_v37_0) do
                    if v52.Name == v49 then
                        v8(v52, v50);
                        table.insert(v48, v52);
                        return true;
                    end;
                end;
            end, 0);
            v40 = v1.List.join(v48, (v36((v5.filterFacsTracks(v37)))));
        end;
        v38:dispatch(v7(v40, v42, (v5.getUnusedFacs(v37))));
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Src.Actions.SetEditorMode);
local _ = require(l_script_FirstAncestor_0.Src.Types);
return function(v3, v4)
    return function(v5)
        local v6 = v5:getState();
        local l_AnimationData_0 = v6.AnimationData;
        local l_EditorMode_0 = v6.Status.EditorMode;
        if l_EditorMode_0 ~= v3 then
            local l_EditorModeSwitchTime_0 = v6.Status.EditorModeSwitchTime;
            if l_EditorModeSwitchTime_0 then
                v4:report("onEditorModeSwitch", l_EditorMode_0, v3, os.time() - l_EditorModeSwitchTime_0, if not not l_AnimationData_0 and l_AnimationData_0.Metadata then l_AnimationData_0.Metadata.Guid else nil);
            end;
        end;
        v5:dispatch(v1(v3));
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Src.Actions.SetBoneVisualization);
local _ = require(l_script_FirstAncestor_0.Src.Util.RigUtils);
local v3 = require(l_script_FirstAncestor_0.Src.Util.RigVisualization);
return function()
    return function(v4)
        local v5 = v4:getState();
        local v6 = not v5.Status.VisualizeBones;
        local l_AnimationData_0 = v5.AnimationData;
        local l_RootInstance_0 = v5.Status.RootInstance;
        local l_Active_0 = v5.Status.Active;
        if not (not l_AnimationData_0 or not l_RootInstance_0) and l_Active_0 then
            v4:dispatch(v1(v6));
            v3.updateMicrobones(l_RootInstance_0, v6);
            return ;
        else
            return ;
        end;
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Src.Actions.SetFaceControlsEditorEnabled);
local v2 = require(l_script_FirstAncestor_0.Src.Actions.SetFaceControlsEditorOpenedTimestamp);
return function(v3)
    return function(v4)
        local v5 = v4:getState();
        if v5.Status.RootInstance then
            local v6 = not v5.Status.FaceControlsEditorEnabled;
            v4:dispatch(v1(v6));
            if not v6 then
                v3:report("onFaceControlsEditorDisabled", os.time() - v5.Status.FaceControlsEditorOpenedTimestamp);
                v5.Status.FaceControlsEditorOpenedTimestamp = nil;
                return ;
            else
                v3:report("onFaceControlsEditorEnabled");
                v4:dispatch(v2(os.time()));
                return ;
            end;
        else
            return ;
        end;
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Src.Actions.SetIKEnabled);
local v2 = require(l_script_FirstAncestor_0.Src.Actions.SetIKOpenedTimestamp);
return function(v3)
    return function(v4)
        local v5 = v4:getState();
        local l_AnimationData_0 = v5.AnimationData;
        if v5.Status.RootInstance then
            local v7 = not v5.Status.IKEnabled;
            v4:dispatch(v1(v7));
            local v8 = if not not l_AnimationData_0 and l_AnimationData_0.Metadata then l_AnimationData_0.Metadata.Guid else nil;
            if not v7 then
                v3:report("onIkDisabled", os.time() - v5.Status.IKOpenedTimestamp, v8);
                return ;
            else
                v3:report("onIkEnabled", v8);
                v4:dispatch(v2(os.time()));
                return ;
            end;
        else
            return ;
        end;
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Packages.Cryo);
local v2 = require(l_script_FirstAncestor_0.Src.Actions.SetPinnedParts);
return function(v3)
    return function(v4)
        local v5 = v1.Dictionary.join(v4:getState().Status.PinnedParts);
        if v5[v3] ~= nil then
            v5[v3] = not v5[v3];
        else
            v5[v3] = true;
        end;
        v4:dispatch(v2(v5));
    end;
end;


local v0 = require(script:FindFirstAncestor("AnimationClipEditor").Src.Actions.SetShowFaceControlsEditorPanel);
return function()
    return function(v1)
        local v2 = v1:getState();
        if v2.Status.RootInstance then
            v1:dispatch(v0(not v2.Status.ShowFaceControlsEditorPanel));
            return ;
        else
            return ;
        end;
    end;
end;


local v0 = require(script:FindFirstAncestor("AnimationClipEditor").Src.Actions.SetShowTree);
return function()
    return function(v1)
        local v2 = v1:getState();
        if v2.Status.RootInstance then
            v1:dispatch(v0(not v2.Status.ShowTree));
            return ;
        else
            return ;
        end;
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Src.Actions.SetHorizontalScrollZoom);
local v2 = require(l_script_FirstAncestor_0.Src.Util.AnimationData);
local v3 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local v4 = require(l_script_FirstAncestor_0.Src.Util.TrackUtils);
local v5 = require(l_script_FirstAncestor_0.Src.Actions.SetAnimationData);
local v6 = require(l_script_FirstAncestor_0.Src.Thunks.Playback.StepAnimation);
local v7 = require(l_script_FirstAncestor_0.Src.Actions.SetNotification);
local v8 = require(l_script_FirstAncestor_0.Src.Thunks.UpdateEditingLength);
return function(v9)
    return function(v10)
        local v11 = v10:getState();
        if v9 then
            if v9.Metadata then
                local l_HorizontalScroll_0 = v11.Status.HorizontalScroll;
                local l_HorizontalZoom_0 = v11.Status.HorizontalZoom;
                local l_Playhead_0 = v11.Status.Playhead;
                local l_EditingLength_0 = v11.Status.EditingLength;
                local l_StartTick_0 = v9.Metadata.StartTick;
                local v17 = v4.getZoomRange(v9, l_HorizontalScroll_0, l_HorizontalZoom_0, l_EditingLength_0);
                if v2.removeExtraKeyframes(v9) then
                    v10:dispatch(v7("ClippedWarning", true));
                end;
                v2.setEndTick(v9);
                local l_EndTick_0 = v9.Metadata.EndTick;
                for _, v20 in ipairs(v9.Events.Keyframes) do
                    if l_EndTick_0 < v20 then
                        v9.Metadata.EndTick = v20;
                        l_EndTick_0 = v20;
                    end;
                end;
                v2.validateKeyframeNames(v9);
                v10:dispatch(v5(v9));
                if l_StartTick_0 ~= l_EndTick_0 then
                    l_Playhead_0 = math.clamp(l_Playhead_0, l_StartTick_0, l_EndTick_0);
                end;
                v10:dispatch(v6(l_Playhead_0));
                local v21 = l_EndTick_0 - l_StartTick_0;
                if l_EditingLength_0 < v21 then
                    v10:dispatch(v8(v21));
                    local v22 = math.ceil(v21 * v3.LENGTH_PADDING);
                    local v23 = v17.End - v17.Start;
                    l_HorizontalScroll_0 = 0;
                    if v22 ~= v23 then
                        l_HorizontalScroll_0 = math.clamp((v17.Start - l_StartTick_0) / (v22 - v23), 0, 1);
                    end;
                    v10:dispatch(v1(l_HorizontalScroll_0, 1 - math.clamp(v23 / v22, 0, 1)));
                end;
                return ;
            else
                v10:dispatch(v5(v9));
                return ;
            end;
        else
            return ;
        end;
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local v2 = require(l_script_FirstAncestor_0.Src.Actions.SetHorizontalScrollZoom);
local v3 = require(l_script_FirstAncestor_0.Src.Actions.SetEditingLength);
return function(v4)
    return function(v5)
        local l_AnimationData_0 = v5:getState().AnimationData;
        if l_AnimationData_0 and l_AnimationData_0.Metadata then
            v4 = math.max(v4, l_AnimationData_0.Metadata.EndTick, v1.TICK_FREQUENCY);
            v5:dispatch(v3(v4));
            v5:dispatch(v2(0, 0));
            return ;
        else
            return ;
        end;
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Packages.Cryo);
local v2 = require(l_script_FirstAncestor_0.Src.Actions.SetAnimationData);
return function(v3)
    return function(v4)
        local l_AnimationData_0 = v4:getState().AnimationData;
        if l_AnimationData_0 and l_AnimationData_0.Metadata then
            v4:dispatch(v2((v1.Dictionary.join(l_AnimationData_0, {
                Metadata = v1.Dictionary.join(l_AnimationData_0.Metadata, v3)
            }))));
            return ;
        else
            return ;
        end;
    end;
end;


local _ = game:GetService("CollectionService");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local _ = require(l_script_FirstAncestor_0.Packages.Roact);
local l_Actions_0 = l_script_FirstAncestor_0.Src.Actions;
local v4 = require(l_Actions_0.SetAnimationData);
local v5 = require(l_Actions_0.SetClipboard);
local v6 = require(l_Actions_0.SetFuture);
local v7 = require(l_Actions_0.SetIKEnabled);
local v8 = require(l_Actions_0.SetIKMode);
local v9 = require(l_Actions_0.SetLegacyAnimationInstances);
local v10 = require(l_Actions_0.SetPast);
local v11 = require(l_Actions_0.SetPinnedParts);
local v12 = require(l_Actions_0.SetRootInstance);
local v13 = require(l_Actions_0.SetSelectedKeyframes);
local v14 = require(l_Actions_0.SetSelectedTrackInstances);
local v15 = require(l_Actions_0.SetShowTree);
local v16 = require(l_Actions_0.SetStartingPose);
local l_Thunks_0 = l_script_FirstAncestor_0.Src.Thunks;
local v18 = require(l_Thunks_0.AttachEditor);
local _ = require(l_Thunks_0.Exporting.LoadAnimation);
local v20 = require(l_Thunks_0.LoadLatestAnimation);
local v21 = require(l_Thunks_0.ReleaseEditor);
local v22 = require(l_Thunks_0.SortAndSetTracks);
local v23 = require(l_Thunks_0.SetSelectedTracks);
local l_Util_0 = l_script_FirstAncestor_0.Src.Util;
local v25 = require(l_Util_0.Constants);
local v26 = require(l_Util_0.RigIK);
local v27 = require(l_Util_0.RigUtils);
local v28 = require(l_script_FirstAncestor_0.LuaFlags.GetFFlagSelectFromViewport);
local v29 = require(l_script_FirstAncestor_0.LuaFlags.GetFFlagRigIK);
return function(v30, v31)
    return function(v32)
        v32:dispatch(v21(v31));
        v32:dispatch(v11({}));
        v32:dispatch(v15(false));
        v32:dispatch(v7(false));
        local v33 = nil;
        local v34 = nil;
        if not v29() then
            local v35, v36 = v27.canUseIK(v30);
            v33 = v35;
            v34 = v36;
        else
            local v37, v38 = v26.canUseIK(v30);
            v33 = v37;
            v34 = v38;
        end;
        v32:dispatch(v8(not not v34 and v25.IK_MODE.BodyPart or v25.IK_MODE.FullBody));
        v32:dispatch(v12(v30));
        if not v28() then
            v32:dispatch(v14({}));
        else
            v32:dispatch(v23({}));
        end;
        if not v33 or not v34 then
            v32:dispatch(v16(nil));
        else
            v32:dispatch(v16(if not v29() then v27.getPoseCFrames(v30) else v26.getPoseCFrames(v30)));
        end;
        local v39 = v27.getAnimSaves(v30);
        if #v39 > 0 then
            local v40 = {};
            for _, v42 in v39, nil, nil do
                if v42.isLegacyAnimSaves then
                    table.insert(v40, v42);
                end;
            end;
            if #v40 > 0 then
                v32:dispatch(v9(v40));
            else
                v32:dispatch(v20(v30, v31));
            end;
        else
            v32:dispatch(v10({}));
            v32:dispatch(v6({}));
            v32:dispatch(v13({}));
            v32:dispatch(v22({}));
            v32:dispatch(v4(nil));
        end;
        v32:dispatch(v5({}));
        v32:dispatch(v18(v31));
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Src.Thunks.AddKeyframe);
local v2 = require(l_script_FirstAncestor_0.Src.Thunks.SetKeyframeData);
local v3 = require(l_script_FirstAncestor_0.Src.Thunks.AddTrack);
local v4 = require(l_script_FirstAncestor_0.Src.Thunks.Playback.StepAnimation);
local v5 = require(l_script_FirstAncestor_0.Src.Util.AnimationData);
local v6 = require(l_script_FirstAncestor_0.Src.Util.Constants);
return function(v7, v8, v9, v10, v11, v12, v13)
    return function(v14)
        local l_AnimationData_0 = v14:getState().AnimationData;
        local v16 = v5.getTrack(l_AnimationData_0, v7, v8);
        if v16 == nil then
            v14:dispatch(v3(v7, v8[1], if v9 == v6.TRACK_TYPES.Facs then v6.TRACK_TYPES.Facs else v6.TRACK_TYPES.CFrame, v10, nil, v13));
            local v17 = {
                Value = v12
            };
            if not v5.isChannelAnimation(l_AnimationData_0) then
                v17.EasingStyle = Enum.PoseEasingStyle.Linear;
                v17.EasingDirection = Enum.PoseEasingDirection.In;
            else
                v17.InterpolationMode = Enum.KeyInterpolationMode.Cubic;
            end;
            v14:dispatch(v1(v7, v8, v9, v10, v11, v17, v13));
        else
            local l_Data_0 = v16.Data;
            if not l_Data_0 or not l_Data_0[v11] then
                local v19 = {
                    Value = v12
                };
                if not v16.IsCurveTrack then
                    v19.EasingStyle = Enum.PoseEasingStyle.Linear;
                    v19.EasingDirection = Enum.PoseEasingDirection.In;
                else
                    v19.InterpolationMode = Enum.KeyInterpolationMode.Cubic;
                end;
                v14:dispatch(v1(v7, v8, v9, v10, v11, v19, v13));
            else
                v14:dispatch(v2(v7, v8, v11, {
                    Value = v12
                }));
            end;
        end;
        v14:dispatch(v4(v11));
    end;
end;


local v0 = Vector2.new(1000000, 50);
local l_TextService_0 = game:GetService("TextService");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v3 = require(l_script_FirstAncestor_0.Packages.Roact);
local v4 = require(script.Parent.createFitToContent);
local l_ContextServices_0 = require(l_script_FirstAncestor_0.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v7 = v3.PureComponent:extend("RadioButtons");
v7.init = function(v8)
    v8.layoutRef = v3.createRef();
    v8.containerRef = v3.createRef();
    v8.currentLayout = 0;
    v8.onButtonClicked = function(v9, v10)
        if v8.props.onButtonClicked then
            v8.props.onButtonClicked(v9, v10);
        end;
    end;
end;
v7.createButton = function(v11, v12, v13, v14, v15, v16)
    local l_X_0 = l_TextService_0:GetTextSize(v13, v16.radioButton.textSize, v16.radioButton.font, v0).X;
    local l_buttonHeight_0 = v16.radioButton.buttonHeight;
    local v19 = UDim2.new(1, 0, 0, l_buttonHeight_0);
    if v11.props.FillDirection == Enum.FillDirection.Horizontal then
        v19 = UDim2.new(0, l_X_0 + l_buttonHeight_0, 0, l_buttonHeight_0);
    end;
    return v3.createElement("Frame", {
        LayoutOrder = v11:nextLayout(),
        BackgroundTransparency = 1,
        Size = v19
    }, {
        UIListLayout = v3.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Horizontal,
            VerticalAlignment = Enum.VerticalAlignment.Center,
            SortOrder = Enum.SortOrder.LayoutOrder,
            Padding = UDim.new(0, v16.radioButton.buttonPadding)
        }),
        Background = v3.createElement("ImageButton", {
            LayoutOrder = 1,
            Size = UDim2.new(0, l_buttonHeight_0, 0, l_buttonHeight_0),
            BackgroundTransparency = 1,
            ImageColor3 = v16.radioButton.radioButtonColor,
            Image = v16.radioButton.radioButtonBackground,
            [v3.Event.Activated] = function()
                v11.onButtonClicked(v12, v14);
            end
        }, {
            Highlight = v15 and v3.createElement("ImageLabel", {
                Size = UDim2.new(0.4, 0, 0.4, 0),
                AnchorPoint = Vector2.new(0.5, 0.5),
                Position = UDim2.new(0.5, 0, 0.5, 0),
                BackgroundTransparency = 1,
                Image = v16.radioButton.radioButtonSelected
            })
        }),
        Text = v3.createElement("TextButton", {
            LayoutOrder = 2,
            Text = v13,
            Size = UDim2.new(0, l_X_0, 1, 0),
            BackgroundTransparency = 1,
            Font = v16.radioButton.font,
            TextSize = v16.radioButton.textSize,
            TextColor3 = v16.radioButton.textColor,
            TextXAlignment = Enum.TextXAlignment.Left,
            [v3.Event.Activated] = function()
                v11.onButtonClicked(v12, v14);
            end
        })
    });
end;
v7.resetLayout = function(v20)
    v20.currentLayout = 0;
end;
v7.nextLayout = function(v21)
    v21.currentLayout = v21.currentLayout + 1;
    return v21.currentLayout;
end;
v7.render = function(v22)
    local l_props_0 = v22.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_Buttons_0 = l_props_0.Buttons;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_Selected_0 = l_props_0.Selected;
    local v28 = v4("Frame", "UIListLayout", {
        FillDirection = l_props_0.FillDirection or Enum.FillDirection.Vertical,
        Padding = UDim.new(0, l_Stylizer_0.radioButton.contentPadding),
        SortOrder = Enum.SortOrder.LayoutOrder
    });
    v22:resetLayout();
    local v29 = {};
    for v30, v31 in ipairs(l_Buttons_0) do
        v29[v31.Key] = v22:createButton(v31.Key, v31.Text, v30, l_Selected_0 == v31.Key, l_Stylizer_0);
    end;
    return v3.createElement(v28, {
        BackgroundTransparency = 1,
        LayoutOrder = l_LayoutOrder_0
    }, v29);
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v7));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Packages.Framework);
local v2 = require(l_script_FirstAncestor_0.Packages.Roact);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v5 = Rect.new(3, 3, 13, 13);
local v6 = Color3.fromRGB(27, 42, 53);
local v7 = UDim2.new(0, 100, 0, 100);
local v8 = v2.PureComponent:extend("RoundFrame");
v8.init = function(v9, v10)
    v9.elementType = not (v10.OnActivated ~= nil) and "ImageLabel" or "ImageButton";
end;
v8.render = function(v11)
    local l_Stylizer_0 = v11.props.Stylizer;
    local l_props_0 = v11.props;
    local l_roundFrame_0 = l_Stylizer_0.roundFrame;
    local l_BackgroundColor3_0 = l_props_0.BackgroundColor3;
    local l_BackgroundTransparency_0 = l_props_0.BackgroundTransparency;
    local v17 = l_props_0.BorderColor3 or v6;
    local v18 = l_props_0.BorderSizePixel or 1;
    local v19 = l_props_0.Size or v7;
    local l_Position_0 = l_props_0.Position;
    local l_AnchorPoint_0 = l_props_0.AnchorPoint;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_ZIndex_0 = l_props_0.ZIndex;
    local l_OnActivated_0 = l_props_0.OnActivated;
    local l_OnMouseEnter_0 = l_props_0.OnMouseEnter;
    local l_OnMouseLeave_0 = l_props_0.OnMouseLeave;
    local _ = nil;
    return v2.createElement(v11.elementType, {
        Size = v19,
        Position = l_Position_0,
        AnchorPoint = l_AnchorPoint_0,
        LayoutOrder = l_LayoutOrder_0,
        ZIndex = l_ZIndex_0,
        BackgroundTransparency = 1,
        ImageColor3 = l_BackgroundColor3_0,
        ImageTransparency = l_BackgroundTransparency_0,
        Image = l_roundFrame_0.backgroundImage,
        ScaleType = Enum.ScaleType.Slice,
        SliceCenter = v5,
        [v2.Event.MouseEnter] = l_OnMouseEnter_0,
        [v2.Event.MouseLeave] = l_OnMouseLeave_0,
        [v2.Event.Activated] = l_OnActivated_0,
        [v2.Change.AbsoluteSize] = l_props_0[v2.Change.AbsoluteSize],
        [v2.Change.AbsolutePosition] = l_props_0[v2.Change.AbsolutePosition]
    }, {
        Border = v2.createElement("ImageLabel", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundTransparency = 1,
            ImageColor3 = v17,
            ImageTransparency = v18 == 0 and 1 or l_BackgroundTransparency_0,
            Image = l_roundFrame_0.borderImage,
            ScaleType = Enum.ScaleType.Slice,
            SliceCenter = v5,
            SliceScale = v18
        }, l_props_0[v2.Children])
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v8));


local v0 = {};
v0.__index = v0;
v0.new = function(v1, v2, v3)
    return {
        font = Enum.Font.Gotham,
        backgroundColor = v1(v2.MainBackground),
        liveBackgroundColor = Color3.new(),
        textColor = v1(v2.MainText),
        subTextColor = v1(v2.SubText),
        dimmerTextColor = v1(v2.DimmedText),
        itemColor = v1(v2.Item),
        borderColor = v1(v2.Border),
        hoveredItemColor = v1(v2.Item, v3.Hover),
        hoveredTextColor = v1(v2.MainText, v3.Hover),
        primaryItemColor = v1(v2.DialogMainButton),
        primaryBorderColor = v1(v2.DialogMainButton),
        primaryTextColor = v1(v2.DialogMainButtonText),
        primaryHoveredItemColor = v1(v2.DialogMainButton, v3.Hover),
        primaryHoveredBorderColor = v1(v2.DialogMainButton, v3.Hover),
        primaryHoveredTextColor = v1(v2.DialogMainButtonText, v3.Hover),
        selectionColor = v1(v2.Item, v3.Selected),
        selectionBorderColor = v1(v2.Border, v3.Selected),
        selectedTextColor = v1(v2.MainText, v3.Selected),
        shadowColor = v1(v2.Shadow),
        shadowTransparency = v1(v2.Shadow, v3.Hover),
        separationLineColor = v1(v2.Separator),
        disabledColor = v1(v2.MainText, v3.Disabled),
        errorColor = v1(v2.ErrorText),
        hoverColor = v1(v2.MainBackground, v3.Hover),
        hyperlinkTextColor = v1(v2.LinkText)
    };
end;
return v0;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Packages.Roact);
local v2 = require(l_script_FirstAncestor_0.Packages.Cryo);
return function(v3, v4, v5)
    local v6 = v1.Component:extend((("FitComponent(%s, %s)"):format(v3, v4)));
    local v7 = v5.BorderSize or 0;
    v5 = v2.Dictionary.join(v5, {
        BorderSize = v2.None
    });
    v6.init = function(v8)
        v8.layoutRef = v1.createRef();
        v8.containerRef = v1.createRef();
        v8.layoutProps = v2.Dictionary.join(v5, {
            [v1.Ref] = v8.layoutRef,
            [v1.Change.AbsoluteContentSize] = function()
                if v8.layoutRef.current ~= nil and v8.containerRef.current ~= nil then
                    v8:resizeContainer();
                end;
            end
        });
    end;
    v6.render = function(v9)
        assert(v9.props.Size == nil, "Size must not be specified");
        local l_join_0 = v2.Dictionary.join;
        local v11 = {
            Layout = v1.createElement(v4, v9.layoutProps)
        };
        local v12 = false;
        if v7 > 0 then
            v12 = v1.createElement("UIPadding", {
                PaddingTop = UDim.new(0, v7),
                PaddingBottom = UDim.new(0, v7),
                PaddingLeft = UDim.new(0, v7),
                PaddingRight = UDim.new(0, v7)
            });
        end;
        v11.Padding = v12;
        return v1.createElement(v3, (v2.Dictionary.join(v9.props, {
            [v1.Children] = l_join_0(v11, v9.props[v1.Children]),
            [v1.Ref] = v9.containerRef
        })));
    end;
    v6.didMount = function(v13)
        v13:resizeContainer();
    end;
    v6.resizeContainer = function(v14)
        v14.containerRef.current.Size = UDim2.new(1, 0, 0, v14.layoutRef.current.AbsoluteContentSize.Y + v7 * 2);
    end;
    return v6;
end;


return function(...)
    local v0 = {};
    for v1 = 1, select("#", ...) do
        for v2, v3 in pairs((select(v1, ...))) do
            v0[v2] = v3;
        end;
    end;
    return v0;
end;


return {
    Sphere = function(_, _, v2, v3, v4, v5)
        local v6 = Instance.new("SphereHandleAdornment", v2);
        v6.Name = "Sphere";
        v6.AlwaysOnTop = true;
        v6.Color3 = v4;
        v6.Adornee = v2;
        v6.ZIndex = v5;
        v6.Transparency = v3;
        v6.Archivable = false;
        return v6;
    end,
    Line = function(_, _, v9, v10, v11, v12, v13)
        local v14 = Instance.new("LineHandleAdornment", v9);
        v14.Name = "Line";
        v14.AlwaysOnTop = true;
        v14.Thickness = v10;
        v14.Color3 = v11;
        v14.Adornee = v9;
        v14.ZIndex = v13;
        v14.Transparency = v12;
        v14.Archivable = false;
        return v14;
    end,
    Cone = function(_, _, v17, v18, v19, v20)
        local v21 = Instance.new("ConeHandleAdornment", v17);
        v21.Name = "Cone";
        v21.AlwaysOnTop = true;
        v21.Color3 = v19;
        v21.Adornee = v17;
        v21.ZIndex = v20;
        v21.Transparency = v18;
        v21.Archivable = false;
        return v21;
    end
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Packages.Cryo);
local l_Math_0 = require(l_script_FirstAncestor_0.Packages.Framework).Util.Math;
local _ = require(l_script_FirstAncestor_0.Src.Types);
local l_Util_0 = l_script_FirstAncestor_0.Src.Util;
local v5 = require(l_Util_0.Constants);
local v6 = require(l_Util_0.deepCopy);
local v7 = require(l_Util_0.fuzzyCFrameEq);
local v8 = require(l_Util_0.isEmpty);
local v9 = require(l_Util_0.KeyframeUtils);
local _ = require(l_Util_0.PathUtils);
local v11 = require(l_Util_0.Templates);
local v12 = require(l_Util_0.TrackUtils);
local v13 = require(l_script_FirstAncestor_0.LuaFlags.GetFFlagSelectFromViewport);
local v18 = {
    new = function(v14, v15, v16)
        assert(v14 ~= nil, "Expected a name for the AnimationData.");
        local v17 = v11.animationData();
        v17.Metadata.Name = v14;
        v17.Metadata.IsChannelAnimation = false;
        if v16 and v16 ~= "" then
            v17.Metadata.Guid = v16;
        end;
        v17.Instances.Root.Type = v15;
        return v17;
    end
};
v18.newRigAnimation = function(v19)
    return v18.new(v19, v5.INSTANCE_TYPES.Rig);
end;
if not v13() then
    v18.toCFrameArray = function(v20, v21, v22)
        assert(v20 ~= nil, "No bones array was provided.");
        assert(v21 ~= nil, "No data table was provided.");
        assert(typeof(v20) == "table", "Bones should be an array of bone names.");
        assert(typeof(v21) == "table", "Data must be an AnimationData table.");
        local l_TICK_FREQUENCY_0 = v5.TICK_FREQUENCY;
        local v24 = v22 or l_TICK_FREQUENCY_0;
        assert(v24 ~= nil, "No frame rate was found for exporting.");
        assert(l_TICK_FREQUENCY_0 > 0, "Input frame rate must be positive.");
        assert(v24 > 0, "Output frame rate must be positive.");
        local v25 = v21.Metadata.EndTick - v21.Metadata.StartTick;
        local v26 = l_TICK_FREQUENCY_0 / v24;
        local v27 = v25 / v26;
        local v28 = {};
        local l_Root_0 = v21.Instances.Root;
        assert(l_Root_0.Type == "Skeleton", "Can only export Skeleton animations to CFrame[][]");
        local l_Tracks_0 = l_Root_0.Tracks;
        for v31, v32 in ipairs(v20) do
            local v33 = {};
            if l_Tracks_0[v32] then
                for v34 = 1, v27 do
                    v33[v34] = v9.getValue(l_Tracks_0[v32], v34 * v26);
                end;
            end;
            v28[v31] = v33;
        end;
        return v28;
    end;
    v18.fromCFrameArray = function(v35, v36, v37, v38)
        assert(v35 ~= nil, "No bones array was provided.");
        assert(typeof(v35) == "table", "Bones should be an array of bone names.");
        local v39 = v18.new(v37, v38);
        v39.Instances.Root.Type = "Skeleton";
        local l_Tracks_1 = v39.Instances.Root.Tracks;
        for v41, v42 in ipairs(v35) do
            if #v36[v41] > 0 then
                l_Tracks_1[v42] = v11.track(v5.TRACK_TYPES.CFrame);
                l_Tracks_1[v42].Keyframes = {};
                l_Tracks_1[v42].Data = {};
                v39.Metadata.EndTick = math.max(v39.Metadata.EndTick, #v36[v41]);
                for v43 = 1, #v36[v41] do
                    table.insert(l_Tracks_1[v42].Keyframes, v43);
                    local v44 = v11.keyframe();
                    v44.EasingStyle = Enum.PoseEasingStyle.Linear;
                    v44.EasingDirection = Enum.PoseEasingDirection.In;
                    v44.Value = v36[v41][v43];
                    l_Tracks_1[v42].Data[v43] = v44;
                end;
            end;
        end;
        return v39;
    end;
end;
v18.addEvent = function(v45, v46, v47, v48)
    local l_Keyframes_0 = v45.Keyframes;
    local l_Data_0 = v45.Data;
    if not l_Data_0[v46] then
        local v51 = v9.findInsertIndex(l_Keyframes_0, v46);
        if v51 then
            table.insert(l_Keyframes_0, v51, v46);
        end;
        l_Data_0[v46] = {};
    end;
    if not l_Data_0[v46][v47] then
        l_Data_0[v46][v47] = v48 or "";
    end;
end;
v18.moveEvents = function(v52, v53, v54)
    if v53 == v54 then
        return ;
    else
        local l_Keyframes_1 = v52.Keyframes;
        local l_Data_1 = v52.Data;
        if l_Data_1[v53] then
            table.remove(l_Keyframes_1, (v9.findKeyframe(l_Keyframes_1, v53)));
            local v57 = v9.findInsertIndex(l_Keyframes_1, v54);
            if v57 then
                table.insert(l_Keyframes_1, v57, v54);
            end;
            l_Data_1[v54] = v6(l_Data_1[v53]);
            l_Data_1[v53] = nil;
        end;
        return ;
    end;
end;
v18.deleteEvents = function(v58, v59)
    local l_Keyframes_2 = v58.Keyframes;
    local l_Data_2 = v58.Data;
    if l_Data_2[v59] then
        table.remove(l_Keyframes_2, (v9.findKeyframe(l_Keyframes_2, v59)));
        l_Data_2[v59] = nil;
    end;
end;
v18.setEventValue = function(v62, v63, v64, v65)
    local l_Data_3 = v62.Data;
    if not (not l_Data_3[v63] or not l_Data_3[v63][v64]) then
        l_Data_3[v63][v64] = v65;
    end;
end;
v18.removeEvent = function(v67, v68, v69)
    local l_Keyframes_3 = v67.Keyframes;
    local l_Data_4 = v67.Data;
    if not (not l_Data_4[v68] or not l_Data_4[v68][v69]) then
        l_Data_4[v68][v69] = nil;
        if v8(l_Data_4[v68]) then
            l_Data_4[v68] = nil;
            table.remove(l_Keyframes_3, (v9.findKeyframe(l_Keyframes_3, v68)));
        end;
    end;
end;
v18.addTrack = function(v72, v73, v74, v75, v76, v77)
    v72[v73] = v11.track(v74);
    if not v75 then
        v72[v73].Keyframes = {};
        v72[v73].Data = {};
        v72[v73].EulerAnglesOrder = v77;
    else
        v12.splitTrackComponents(v72[v73], v76, v77);
    end;
    return v72[v73];
end;
v18.addKeyframe = function(v78, v79, v80)
    local l_Keyframes_4 = v78.Keyframes;
    local v82 = v9.findInsertIndex(l_Keyframes_4, v79);
    if v82 then
        table.insert(l_Keyframes_4, v82, v79);
    end;
    v78.Data[v79] = v1.Dictionary.join(v78.Data[v79] or v11.keyframe(), v80);
end;
v18.addDefaultKeyframe = function(v83, v84, v85)
    local v86 = {
        Value = v9.getDefaultValue(v85)
    };
    if not v83.IsCurveTrack then
        v86.EasingStyle = Enum.PoseEasingStyle.Linear;
        v86.EasingDirection = Enum.PoseEasingDirection.In;
    else
        v86.InterpolationMode = Enum.KeyInterpolationMode.Cubic;
    end;
    v18.addKeyframe(v83, v84, v86);
end;
v18.moveNamedKeyframe = function(v87, v88, v89)
    if v87.Events then
        local l_NamedKeyframes_0 = v87.Events.NamedKeyframes;
        if not (not l_NamedKeyframes_0 or not l_NamedKeyframes_0[v88]) then
            local v91 = l_NamedKeyframes_0[v88];
            local v92 = true;
            for _, v94 in pairs(v87.Instances) do
                for _, v96 in ipairs((v12.getSummaryKeyframes(v94.Tracks, v87.Metadata.StartTick, v87.Metadata.EndTick))) do
                    if v96 == v88 then
                        v92 = false;
                    end;
                end;
            end;
            if v92 then
                v18.setKeyframeName(v87, v88, nil);
                v18.setKeyframeName(v87, v89, v91);
            end;
        end;
    end;
end;
v18.moveKeyframe = function(v97, v98, v99)
    if v98 == v99 then
        return ;
    else
        local l_Keyframes_5 = v97.Keyframes;
        table.remove(l_Keyframes_5, (v9.findKeyframe(l_Keyframes_5, v98)));
        local v101 = v9.findInsertIndex(l_Keyframes_5, v99);
        if v101 then
            table.insert(l_Keyframes_5, v101, v99);
        end;
        v97.Data[v99] = v6(v97.Data[v98]);
        v97.Data[v98] = nil;
        return ;
    end;
end;
v18.deleteKeyframe = function(v102, v103)
    v102.Data[v103] = nil;
    table.remove(v102.Keyframes, (v9.findKeyframe(v102.Keyframes, v103)));
end;
v18.setKeyframeData = function(v104, v105, v106)
    v104.Data[v105] = v1.Dictionary.join(v104.Data[v105], v106);
end;
v18.setKeyframeName = function(v107, v108, v109)
    if v109 == v5.DEFAULT_KEYFRAME_NAME then
        v107.Events.NamedKeyframes[v108] = nil;
        return ;
    else
        v107.Events.NamedKeyframes[v108] = v109;
        return ;
    end;
end;
v18.validateKeyframeNames = function(v110)
    if v110.Events then
        local l_NamedKeyframes_1 = v110.Events.NamedKeyframes;
        if not (not l_NamedKeyframes_1 or v8(l_NamedKeyframes_1)) then
            local v112 = {};
            for _, v114 in pairs(v110.Instances) do
                for _, v116 in ipairs((v12.getSummaryKeyframes(v114.Tracks, v110.Metadata.StartTick, v110.Metadata.EndTick))) do
                    v112[v116] = true;
                end;
            end;
            for v117, _ in pairs(l_NamedKeyframes_1) do
                if not v112[v117] then
                    v18.setKeyframeName(v110, v117, nil);
                end;
            end;
        end;
    end;
end;
v18.setEndTick = function(v119)
    if v119 then
        local v120 = 0;
        if not (not v119 or not v119.Instances) then
            for _, v122 in pairs(v119.Instances) do
                if v122.Tracks then
                    for _, v124 in pairs(v122.Tracks) do
                        v12.traverseTracks(nil, v124, function(v125)
                            if not (not v125.Keyframes or v8(v125.Keyframes)) then
                                v120 = math.max(v120, v125.Keyframes[#v125.Keyframes]);
                            end;
                        end);
                    end;
                end;
            end;
        end;
        if v119.Metadata then
            v119.Metadata.EndTick = v120;
        end;
        return ;
    else
        return ;
    end;
end;
v18.getMaximumLength = function(v126)
    return v126 * v5.MAX_TIME;
end;
v18.setLooping = function(v127, v128)
    if v127 then
        v127.Metadata.Looping = v128;
    end;
end;
v18.isQuantized = function(v129)
    if not v129 or not v129.Instances then
        return ;
    else
        for _, v131 in pairs(v129.Instances) do
            for _, v133 in pairs(v131.Tracks) do
                for _, v135 in ipairs(v133.Keyframes) do
                    if v135 ~= math.floor(v135) then
                        return false;
                    end;
                end;
            end;
        end;
        return true;
    end;
end;
v18.removeExtraKeyframes = function(v136)
    local v137 = false;
    if v136 and v136.Metadata then
        if not ((not v136 or not v136.Instances) or not v136.Metadata) then
            local function v141(v138)
                if not ((not v138 or not v138.Keyframes) or not v138.Data) then
                    for v139, v140 in ipairs(v138.Keyframes) do
                        if v5.MAX_ANIMATION_LENGTH < v140 then
                            v138.Data[v140] = nil;
                            v138.Keyframes[v139] = nil;
                            v137 = true;
                        end;
                    end;
                end;
            end;
            local l_pairs_0 = pairs;
            local v143 = v136.Instances or {};
            for _, v145 in l_pairs_0(v143) do
                for _, v147 in pairs(v145.Tracks) do
                    v12.traverseTracks(nil, v147, v141, true);
                end;
            end;
            v141(v136.Events);
        end;
        return v137;
    else
        return v137;
    end;
end;
v18.getSelectionBounds = function(_, v149)
    if v149 and not v8(v149) then
        local l_MAX_ANIMATION_LENGTH_0 = v5.MAX_ANIMATION_LENGTH;
        local v151 = 0;
        local function v152(v153)
            local l_pairs_1 = pairs;
            local v155 = v153.Selection or {};
            for v156, _ in l_pairs_1(v155) do
                l_MAX_ANIMATION_LENGTH_0 = math.min(v156, l_MAX_ANIMATION_LENGTH_0);
                v151 = math.max(v156, v151);
            end;
            l_pairs_1 = pairs;
            v155 = v153.Components or {};
            for _, v159 in l_pairs_1(v155) do
                v152(v159);
            end;
        end;
        for _, v161 in pairs(v149) do
            for _, v163 in pairs(v161) do
                v152(v163);
            end;
        end;
        return l_MAX_ANIMATION_LENGTH_0, v151;
    else
        return nil, nil;
    end;
end;
v18.getEventBounds = function(_, v165)
    local l_MAX_ANIMATION_LENGTH_1 = v5.MAX_ANIMATION_LENGTH;
    local v167 = 0;
    local v168 = v1.Dictionary.keys(v165);
    table.sort(v168);
    if v168 then
        if v168[1] <= l_MAX_ANIMATION_LENGTH_1 then
            l_MAX_ANIMATION_LENGTH_1 = v168[1];
        end;
        if v167 <= v168[#v168] then
            v167 = v168[#v168];
        end;
    end;
    return l_MAX_ANIMATION_LENGTH_1, v167;
end;
v18.promoteToChannels = function(v169, v170, v171)
    if v169 and (not v169.Metadata or not v169.Metadata.IsChannelAnimation) then
        for _, v173 in pairs(v169.Instances) do
            for _, v175 in pairs(v173.Tracks) do
                v12.splitTrackComponents(v175, v5.TRACK_TYPES.Quaternion);
                if v175.Type == v5.TRACK_TYPES.CFrame and v170 == v5.TRACK_TYPES.EulerAngles then
                    v12.convertTrackToEulerAngles(v175.Components[v5.PROPERTY_KEYS.Rotation], v171);
                end;
            end;
        end;
        v18.clearTrackSequences(v169);
        v169.Metadata.IsChannelAnimation = true;
        v169.Metadata.Name = v169.Metadata.Name .. " [CHANNELS]";
        local v176 = 0;
        local v177 = 0;
        for _, v179 in pairs(v169.Instances) do
            for _, v181 in pairs(v179.Tracks) do
                v176 = v176 + 1;
                v177 = v177 + v12.countKeyframes(v181);
            end;
        end;
        return v176, v177;
    else
        return 0, 0;
    end;
end;
v18.isChannelAnimation = function(v182)
    return (v182 and v182.Metadata) and v182.Metadata.IsChannelAnimation;
end;
v18.getTrack = function(v183, v184, v185)
    if not ((not v183 or not v183.Instances[v184]) or not v185) and not v8(v185) then
        local v186 = v183.Instances[v184].Tracks[v185[1]];
        for v187, v188 in ipairs(v185) do
            if v187 > 1 then
                if not v186 or v186.Components == nil then
                    return nil;
                else
                    v186 = v186.Components[v188];
                end;
            end;
        end;
        return v186;
    else
        return nil;
    end;
end;
v18.hasFacsData = function(v189)
    if v189 then
        for _, v191 in pairs(v189.Instances) do
            for _, v193 in pairs(v191.Tracks) do
                if v193.Type == v5.TRACK_TYPES.Facs then
                    return true;
                end;
            end;
        end;
        return false;
    else
        return false;
    end;
end;
local function v207(v194)
    local v195 = nil;
    v195 = if not (v194.Type ~= v5.TRACK_TYPES.CFrame) or v194.Type == v5.TRACK_TYPES.Quaternion then v7 else l_Math_0.fuzzyEq;
    if not (not v194.Keyframes or not v194.Keyframes[1]) and v194.Data then
        assert((v194.Keyframes and v194.Keyframes[1]) and v194.Data);
        local v196 = v194.Keyframes[1];
        local v197 = v194.Data[v196];
        if v197 then
            local v198 = nil;
            local v199 = {};
            for v200 = 2, #v194.Keyframes do
                local v201 = v194.Keyframes[v200];
                if not v195(v194.Data[v201].Value, v197.Value) then
                    if v201 ~= v196 then
                        if v198 then
                            v199[v198] = nil;
                        end;
                        v196 = v201;
                        v197 = v194.Data[v196];
                    end;
                else
                    v199[v201] = true;
                end;
                v198 = v201;
            end;
            if v198 and v198 ~= v196 then
                v199[v198] = nil;
            end;
            local v202 = {};
            local v203 = false;
            for _, v205 in v194.Keyframes, nil, nil do
                if not v199[v205] then
                    table.insert(v202, v205);
                else
                    v194.Data[v205] = nil;
                    v203 = true;
                end;
            end;
            v194.Keyframes = v202;
            if #v194.Keyframes == 2 then
                local v206 = v9.getValue(v194, v194.Keyframes[1]);
                if not (not v195(v206, (v9.getValue(v194, v194.Keyframes[2]))) or not v195(v206, v9.getDefaultValue(v194.Type))) then
                    v194.Data = {};
                    v194.Keyframes = {};
                    v203 = true;
                end;
            end;
            return v203;
        else
            return false;
        end;
    else
        return false;
    end;
end;
v18.clearTrackSequences = function(v208)
    if v208 then
        local v209 = false;
        for _, v211 in pairs(v208.Instances) do
            for v212, v213 in pairs(v211.Tracks) do
                v12.traverseTracks(nil, v213, function(v214)
                    v209 = v207(v214) or v209;
                end, true);
                if not ((not (not (v213.Type ~= v5.TRACK_TYPES.CFrame) or v213.Type == v5.TRACK_TYPES.Facs) or not v213.Keyframes) or not v8(v213.Keyframes)) then
                    v211.Tracks[v212] = nil;
                end;
            end;
        end;
        return v209;
    else
        return false;
    end;
end;
return v18;


local v0 = require(script:FindFirstAncestor("AnimationClipEditor").Packages.Framework).ContextServices.ContextItem:extend("CalloutController");
v0.new = function(v1)
    local v2 = {
        _calloutService = v1 or game:GetService("CalloutService")
    };
    assert(v2._calloutService, "CalloutController requires a CalloutService");
    return (setmetatable(v2, v0));
end;
v0.destroy = function(v3)
    v3._calloutService = nil;
end;
v0.defineCallout = function(v4, v5, v6, v7, v8)
    v4._calloutService:DefineCallout(v5, v6, v7, v8);
end;
v0.attachCallout = function(v9, v10, v11, v12)
    v9._calloutService:AttachCallout(v10, v11, v12);
end;
v0.detachCalloutsByDefinitionId = function(v13, v14)
    v13._calloutService:DetachCalloutsByDefinitionId(v14);
end;
return v0;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = game:DefineFastFlag("ACEFixEditorControllerClamp", false);
local v2 = {
    PLUGIN_NAME = "AnimationClipEditor",
    PLUGIN_ICON = "rbxlocaltheme://AnimationEditor",
    CHECK_IMAGE = "rbxasset://textures/ui/LuaChat/icons/ic-check@2x.png",
    SETTINGS = {
        EulerAnglesOrder = "ACE_EulerAnglesOrder",
        RotationType = "ACE_RotationType",
        ShowAsSeconds = "ACE_ShowAsSeconds",
        SnapMode = "ACE_SnapMode",
        TimelineUnit = "ACE_TimelineUnit"
    },
    FOLDERS = {
        AnimSaves = "RBX_ANIMSAVES",
        Microbones = "RBX_MICROBONE_NODES"
    },
    ANIMATION_UPLOAD_SUCCESS_EVENT_NAME = "animationUploadSuccess",
    ZOOM_INCREMENT = 0.04,
    DEFAULT_FRAMERATE = 30,
    MIN_FRAMERATE = 1,
    MAX_FRAMERATE = 120,
    MIN_PLAYBACK_SPEED = 0.01,
    MAX_PLAYBACK_SPEED = 10,
    MAX_TIME = 1800,
    TICK_FREQUENCY = 2400,
    DEFAULT_TICK_FREQUENCY = 2400,
    MAX_DISPLAYED_TIME = 30,
    MIN_TIMELINE_RANGE = 30,
    MAIN_FLOATING_SIZE = Vector2.new(640, 200),
    MAIN_TEST_SIZE = Vector2.new(1024, 200),
    MAX_WAYPOINT_SIZE = 20,
    MIN_SPACE_BETWEEN_KEYS = 8,
    TRACK_PADDING_SMALL = 72,
    TRACK_PADDING_MEDIUM = 84,
    TRACK_PADDING_LARGE = 96,
    SUMMARY_TRACK_HEIGHT = 22,
    TRACK_HEIGHT = 22,
    EVENT_MARKER_SIZE = UDim2.new(0, 6, 0, 20),
    EVENT_MARKER_BORDER_SIZE = UDim2.new(0, 8, 0, 22),
    TIMELINE_HEIGHT = 24,
    CONTROLS_WIDTH = 200,
    TIME_DISPLAY_WIDTH = 100,
    SCROLL_BAR_SIZE = 17,
    SCROLL_BAR_PADDING = 2,
    TRACK_LIST_START_WIDTH = not v1 and 440 or 445,
    TRACK_LIST_MIN_WIDTH = 440,
    TIMELINE_MIN_WIDTH = not v1 and 200 or 190,
    INDENT_PADDING = 8,
    ARROW_SIZE = 10,
    TRACKLIST_BUTTON_SIZE = 16,
    TRACKLIST_RIGHT_PADDING = 8,
    NUMBERBOX_WIDTH = 80,
    NUMBERBOX_PADDING = 4,
    NUMBERBOX_DRAG_MULTIPLIER = 0.05,
    NUMBERBOX_FACS_DRAG_MULTIPLIER = 0.01,
    NUMBERTRACK_PADDING = 5,
    KEYFRAME_WIDTH = 6,
    KEYFRAME_BORDER_SIZE = 1,
    KEYFRAME_BORDER_SIZE_SELECTED = 2,
    SUMMARY_KEYFRAME_WIDTH = 8,
    MAX_VISIBLE_KEYFRAMES = 1000,
    LENGTH_PADDING = 1,
    NUM_TICKS = 5,
    TICK_SPACING = 125,
    SCALE_NUM_TICKS = 5,
    SCALE_TICK_SPACING = 300,
    PROMPT_SIZE = UDim2.new(0, 320, 0, 130),
    PROMPT_BUTTON_SIZE = Vector2.new(100, 25),
    PROMPT_BUTTON_PADDING = 10,
    PROMPT_VERTICAL_PADDING = 15,
    PROMPT_HORIZONTAL_PADDING = 20,
    TRANSLATION_STIFFNESS = 0.7,
    ROTATION_STIFFNESS = 0.7,
    MIN_TRANSLATION_STIFFNESS = 0.01,
    MIN_ROTATION_STIFFNESS = 0.01,
    MIN_EFFECTOR_DISTANCE = 10,
    JOINT_TYPES = {
        AnimationConstraint = "AnimationConstraint",
        Bone = "Bone",
        Motor6D = "Motor6D"
    },
    BONE_NODE_COLOR = Color3.fromRGB(232, 112, 240),
    BONE_LINK_COLOR = Color3.fromRGB(107, 50, 124),
    BONE_CONE_COLOR = Color3.fromRGB(207, 88, 224),
    BONE_NODE_TRANSPARENCY = 0.15,
    BONE_LINK_TRANSPARENCY = 0.45,
    BONE_TRANSPARENCY_DEFAULT = 0.3,
    BONE_TRANSPARENCY_HOVER = 0,
    BONE_COLOR_DEFAULT = Color3.fromRGB(207, 88, 224),
    BONE_COLOR_HOVER = Color3.fromRGB(300, 88, 224),
    BONE_COLOR_SELECTED = Color3.fromRGB(13, 105, 172),
    LENGTH_TO_RADIUS_RATIO = 15,
    SNAP_TO_KEYFRAME_THRESHOLD = 30,
    SNAP_MODES = {
        Keyframes = "Keyframes",
        Frames = "Frames",
        None = "None"
    },
    TEMPORARY_CONSTRAINTS = "ROBLOX_R15_IK_CONSTRAINTS",
    DEFAULT_IMPORTED_NAME = "Imported Animation Clip",
    DEFAULT_AUTOSAVE_NAME = "Automatic Save",
    DEFAULT_KEYFRAME_NAME = "Keyframe",
    FACE_CONTROLS_FOLDER = "FaceControls",
    TRACK_TYPES = {
        CFrame = "CFrame",
        Facs = "Facs",
        Other = "Other",
        Position = "Position",
        Number = "Number",
        Angle = "Angle",
        Quaternion = "Quaternion",
        EulerAngles = "EulerAngles"
    },
    INSTANCE_TYPES = {
        Skeleton = if require(l_script_FirstAncestor_0.LuaFlags.GetFFlagSelectFromViewport)() then nil else "Skeleton",
        Rig = "Rig"
    },
    PROPERTY_KEYS = {
        Position = "Position",
        Rotation = "Rotation",
        X = "X",
        Y = "Y",
        Z = "Z"
    },
    ACTION_KEYS = {
        Edit = "Edit",
        Delete = "Delete"
    },
    CLIP_DROPDOWN_TYPES = {
        Clip = "Clip",
        NewClip = "New Clip",
        Separator = "Separator"
    },
    RIG_ERRORS = {
        NameCollision = "NameCollision",
        BoneNameCollision = "BoneNameCollision",
        NoMotors = "NoMotors",
        PartsAnchored = "PartsAnchored",
        MissingPart0 = "MissingPart0_Migrated",
        MissingPart1 = "MissingPart1_Migrated",
        MultipleParents = "MultipleParents_Migrated",
        CircularRig = "CircularRig",
        NoAnimationController = "NoAnimationController",
        FaceControlsParent = "FaceControlsParent",
        MultipleFaceControls = "MultipleFaceControls"
    },
    EDITOR_ERRORS = {
        OpenedWhileRunning = "OpenedWhileRunning"
    },
    EDITOR_ERRORS_HEADER_KEY = "EditorErrorsHeader",
    EDITOR_ERRORS_KEY = "EditorErrors",
    RIG_ERRORS_HEADER_KEY = "ErrorsHeader",
    RIG_ERRORS_KEY = "RigErrors",
    DIALOG_KEY = "Dialog",
    TIMELINE_UNITS = {
        SecondsDecimal = "SecondsDecimal",
        Seconds = "Seconds",
        Frames = "Frames"
    },
    TIMELINE_UNITS_ORDER = {
        "SecondsDecimal",
        "Seconds",
        "Frames"
    },
    FRAMERATES = {
        FPS_24 = 24,
        FPS_30 = 30,
        FPS_60 = 60,
        FPS_120 = 120,
        CUSTOM = -1
    },
    GRIDSPEEDS = {
        Static = 0,
        Default = 16,
        FromRig = "FromRig",
        Custom = "Custom"
    },
    PLAYBACK_SPEEDS = {
        PBS_025 = 0.25,
        PBS_05 = 0.5,
        PBS_1 = 1,
        PBS_2 = 2,
        PBS_4 = 4,
        CUSTOM = -1
    },
    CLIPBOARD_TYPE = {
        Events = "Events",
        Keyframes = "Keyframes",
        Channels = "Channels"
    },
    MENU_SEPARATOR = {
        ShowSeparator = true
    },
    KEYFRAME_STYLE = {
        Primary = "Primary",
        Error = "Error",
        PrimaryError = "PrimaryError",
        [Enum.PoseEasingStyle.Bounce] = "Bounce",
        [Enum.PoseEasingStyle.Constant] = "Constant",
        [Enum.PoseEasingStyle.Cubic] = "Cubic",
        [Enum.PoseEasingStyle.Elastic] = "Elastic"
    },
    MENU_ICONS = {
        [Enum.PoseEasingStyle.Linear] = "rbxasset://textures/AnimationEditor/image_keyframe_linear_unselected.png",
        [Enum.PoseEasingStyle.Bounce] = "rbxasset://textures/AnimationEditor/image_keyframe_bounce_unselected.png",
        [Enum.PoseEasingStyle.Constant] = "rbxasset://textures/AnimationEditor/image_keyframe_constant_unselected.png",
        [Enum.PoseEasingStyle.Cubic] = "rbxasset://textures/AnimationEditor/image_keyframe_cubic_unselected.png",
        [Enum.PoseEasingStyle.Elastic] = "rbxasset://textures/AnimationEditor/image_keyframe_elastic_unselected.png"
    },
    IK_MODE = {
        BodyPart = "BodyPart",
        FullBody = "FullBody"
    },
    SIGNAL_KEYS = {
        SelectionChanged = "SelectionChanged",
        ScrubberChanged = "ScrubberChanged"
    },
    R15_PARTS = {
        UpperTorso = "UpperTorso",
        LowerTorso = "LowerTorso",
        LeftFoot = "LeftFoot",
        RightFoot = "RightFoot",
        HumanoidRootPart = "HumanoidRootPart",
        Head = "Head",
        RightUpperLeg = "RightUpperLeg",
        RightLowerLeg = "RightLowerLeg",
        RightHand = "RightHand",
        LeftUpperLeg = "LeftUpperLeg",
        LeftLowerLeg = "LeftLowerLeg",
        LeftHand = "LeftHand",
        RightUpperArm = "RightUpperArm",
        RightLowerArm = "RightLowerArm",
        LeftUpperArm = "LeftUpperArm",
        LeftLowerArm = "LeftLowerArm"
    },
    CONSTRAINTS_CONFIG = {
        Ankle = {
            Type = "BallSocketConstraint",
            LimitsEnabled = false,
            Restitution = 0,
            TwistLimitsEnabled = false,
            UpperAngle = 20,
            TwistLowerAngle = -20,
            TwistUpperAngle = 20
        },
        Knee = {
            Type = "HingeConstraint",
            LimitsEnabled = true,
            LowerAngle = -135,
            Restitution = 0,
            UpperAngle = -10
        },
        Hip = {
            Type = "BallSocketConstraint",
            LimitsEnabled = true,
            Restitution = 0,
            TwistLimitsEnabled = true,
            UpperAngle = 80,
            TwistLowerAngle = -3,
            TwistUpperAngle = 3,
            Axis = Vector3.new(0, -1, 0),
            SecondaryAxis = Vector3.new(0, 0, 1)
        },
        Waist = {
            Type = "HingeConstraint",
            LimitsEnabled = true,
            LowerAngle = -90,
            Restitution = 0,
            UpperAngle = 90
        },
        Shoulder = {
            Type = "BallSocketConstraint",
            LimitsEnabled = true,
            Restitution = 0,
            TwistLimitsEnabled = false,
            UpperAngle = 170,
            TwistLowerAngle = -90,
            TwistUpperAngle = 135
        },
        Elbow = {
            Type = "HingeConstraint",
            LimitsEnabled = true,
            LowerAngle = 0,
            Restitution = 0,
            UpperAngle = 135
        },
        Wrist = {
            Type = "BallSocketConstraint",
            LimitsEnabled = true,
            Restitution = 0,
            TwistLimitsEnabled = true,
            UpperAngle = 20,
            TwistLowerAngle = 0,
            TwistUpperAngle = 0
        },
        Neck = {
            Type = "BallSocketConstraint",
            LimitsEnabled = true,
            Restitution = 0,
            TwistLimitsEnabled = false,
            UpperAngle = 30,
            TwistLowerAngle = -70,
            TwistUpperAngle = 70
        }
    },
    FACS_REGIONS = {
        Mouth = "Mouth",
        Jaw = "Jaw",
        Brows = "Brows",
        Eyes = "Eyes",
        Tongue = "Tongue",
        Other = "Other"
    },
    POSE_EASING_STYLE_TO_KEY_INTERPOLATION = {
        [Enum.PoseEasingStyle.Constant] = Enum.KeyInterpolationMode.Constant,
        [Enum.PoseEasingStyle.Linear] = Enum.KeyInterpolationMode.Linear,
        [Enum.PoseEasingStyle.Cubic] = Enum.KeyInterpolationMode.Cubic,
        [Enum.PoseEasingStyle.Bounce] = Enum.KeyInterpolationMode.Cubic,
        [Enum.PoseEasingStyle.Elastic] = Enum.KeyInterpolationMode.Cubic
    },
    KEY_INTERPOLATION_MODE_ORDER = {
        Enum.KeyInterpolationMode.Linear,
        Enum.KeyInterpolationMode.Constant,
        Enum.KeyInterpolationMode.Cubic
    },
    EASING_STYLE_ORDER = {
        Enum.PoseEasingStyle.Linear,
        Enum.PoseEasingStyle.Constant,
        Enum.PoseEasingStyle.Cubic,
        Enum.PoseEasingStyle.Elastic,
        Enum.PoseEasingStyle.Bounce
    },
    EASING_DIRECTION_ORDER = {
        Enum.PoseEasingDirection.In,
        Enum.PoseEasingDirection.Out,
        Enum.PoseEasingDirection.InOut
    },
    EULER_ANGLES_ORDER = {
        Enum.RotationOrder.XYZ,
        Enum.RotationOrder.XZY,
        Enum.RotationOrder.YXZ,
        Enum.RotationOrder.YZX,
        Enum.RotationOrder.ZXY,
        Enum.RotationOrder.ZYX
    },
    SLOPES = {
        Right = "Right",
        Left = "Left"
    },
    DRAG_MODE = {
        Keyframe = "Keyframe",
        Tangent = "Tangent"
    },
    PLAY_STATE = {
        Reverse = "Reverse",
        Pause = "Pause",
        Play = "Play",
        Record = "Record"
    },
    EDITOR_MODE = {
        DopeSheet = "DopeSheet",
        CurveCanvas = "CurveCanvas"
    },
    CURVE_WIDTH = 1,
    CURVE_WIDTH_SELECTED = 2,
    CURVE_RESOLUTION = 25,
    CURVE_REFINEMENT = 5,
    CURVE_INTERVAL = 5,
    CURVE_CANVAS_PADDING = 0.1,
    CURVE_CANVAS_MIN_RANGE = 0.2,
    TANGENT_CONTROL_LENGTH = 0.09,
    TANGENT_CONTROL_WIDTH = 1,
    SCRUBBER_MARKER_WIDTH = 3,
    NUMBER_PRECISION = 1000,
    NUMBER_FACS_PRECISION = 100,
    SCALE_TYPE = {
        Number = "Position",
        Angle = "Angle"
    },
    TICK_LABEL_SIZE = UDim2.new(0, 25, 0, 15),
    TOGGLE_EDITOR_BUTTON_WIDTH = 17,
    TOGGLE_EDITOR_BUTTON_HEIGHT = 16,
    CLAMPED_AUTO_TANGENT_THRESHOLD = 0.25,
    ANIMATION_FROM_VIDEO_STATUS = {
        Initializing = 0,
        Pending = 1,
        Processing = 2,
        RequiresModeration = 3,
        Error = 4,
        ModerationRejected = 5,
        Success = 6,
        InputTooLong = 7,
        InputHasNoPerson = 8,
        InputUnstable = 9,
        TimedOut = 10,
        Cancelled = 11,
        MultiplePeopleInFrame = 12,
        UploadingData = 1001,
        ErrorUploadingData = 2001
    },
    ANIMATION_TYPE = {
        KeyframeSequence = "KeyframeSequence",
        CurveAnimation = "CurveAnimation"
    },
    CANVAS_ZOOM_INCREMENT = 0.1,
    REDUCE_KEYFRAMES_DIALOG_MODE = {
        Hidden = "Hidden",
        FromImportFBX = "FromImportFBX",
        FromImportLiveAnimationCreator = "FromImportLiveAnimationCreator",
        FromImportFaceRecorder = "FromImportFaceRecorder",
        FromMenu = "FromMenu"
    },
    NAMED_KEYFRAMES_CHANNEL = "NamedKeyframeEvent",
    LEAF_BONE_LENGTH_RATIO = 0.75
};
v2.MAIN_MINIMUM_SIZE = Vector2.new((v2.TRACK_LIST_MIN_WIDTH + v2.TIMELINE_MIN_WIDTH) + (not v1 and 0 or 10), 200);
v2.MAX_ANIMATION_LENGTH = v2.MAX_TIME * v2.TICK_FREQUENCY;
v2.TRACKS_SUBSETS_TYPE = {
    Face = "Face",
    Body = "Body"
};
v2.PartToConstraintConfigMap = {
    [v2.R15_PARTS.UpperTorso] = v2.CONSTRAINTS_CONFIG.Waist,
    [v2.R15_PARTS.RightUpperLeg] = v2.CONSTRAINTS_CONFIG.Hip,
    [v2.R15_PARTS.LeftUpperLeg] = v2.CONSTRAINTS_CONFIG.Hip,
    [v2.R15_PARTS.RightUpperArm] = v2.CONSTRAINTS_CONFIG.Shoulder,
    [v2.R15_PARTS.LeftUpperArm] = v2.CONSTRAINTS_CONFIG.Shoulder,
    [v2.R15_PARTS.Head] = v2.CONSTRAINTS_CONFIG.Neck,
    [v2.R15_PARTS.LeftLowerArm] = v2.CONSTRAINTS_CONFIG.Elbow,
    [v2.R15_PARTS.LeftHand] = v2.CONSTRAINTS_CONFIG.Wrist,
    [v2.R15_PARTS.RightLowerArm] = v2.CONSTRAINTS_CONFIG.Elbow,
    [v2.R15_PARTS.RightHand] = v2.CONSTRAINTS_CONFIG.Wrist,
    [v2.R15_PARTS.LeftLowerLeg] = v2.CONSTRAINTS_CONFIG.Knee,
    [v2.R15_PARTS.LeftFoot] = v2.CONSTRAINTS_CONFIG.Ankle,
    [v2.R15_PARTS.RightLowerLeg] = v2.CONSTRAINTS_CONFIG.Knee,
    [v2.R15_PARTS.RightFoot] = v2.CONSTRAINTS_CONFIG.Ankle
};
v2.R15links = {
    [v2.R15_PARTS.LowerTorso] = v2.R15_PARTS.HumanoidRootPart,
    [v2.R15_PARTS.UpperTorso] = v2.R15_PARTS.LowerTorso,
    [v2.R15_PARTS.RightUpperLeg] = v2.R15_PARTS.LowerTorso,
    [v2.R15_PARTS.LeftUpperLeg] = v2.R15_PARTS.LowerTorso,
    [v2.R15_PARTS.RightUpperArm] = v2.R15_PARTS.UpperTorso,
    [v2.R15_PARTS.LeftUpperArm] = v2.R15_PARTS.UpperTorso,
    [v2.R15_PARTS.Head] = v2.R15_PARTS.UpperTorso,
    [v2.R15_PARTS.LeftLowerArm] = v2.R15_PARTS.LeftUpperArm,
    [v2.R15_PARTS.LeftHand] = v2.R15_PARTS.LeftLowerArm,
    [v2.R15_PARTS.RightLowerArm] = v2.R15_PARTS.RightUpperArm,
    [v2.R15_PARTS.RightHand] = v2.R15_PARTS.RightLowerArm,
    [v2.R15_PARTS.LeftLowerLeg] = v2.R15_PARTS.LeftUpperLeg,
    [v2.R15_PARTS.LeftFoot] = v2.R15_PARTS.LeftLowerLeg,
    [v2.R15_PARTS.RightLowerLeg] = v2.R15_PARTS.RightUpperLeg,
    [v2.R15_PARTS.RightFoot] = v2.R15_PARTS.RightLowerLeg
};
v2.FacsControlToRegionMap = {
    ChinRaiserUpperLip = v2.FACS_REGIONS.Mouth,
    ChinRaiser = v2.FACS_REGIONS.Mouth,
    FlatPucker = v2.FACS_REGIONS.Mouth,
    Funneler = v2.FACS_REGIONS.Mouth,
    LowerLipSuck = v2.FACS_REGIONS.Mouth,
    LipPresser = v2.FACS_REGIONS.Mouth,
    LipsTogether = v2.FACS_REGIONS.Mouth,
    MouthLeft = v2.FACS_REGIONS.Mouth,
    MouthRight = v2.FACS_REGIONS.Mouth,
    Pucker = v2.FACS_REGIONS.Mouth,
    UpperLipSuck = v2.FACS_REGIONS.Mouth,
    LeftCheekPuff = v2.FACS_REGIONS.Mouth,
    LeftDimpler = v2.FACS_REGIONS.Mouth,
    LeftLipCornerDown = v2.FACS_REGIONS.Mouth,
    LeftLowerLipDepressor = v2.FACS_REGIONS.Mouth,
    LeftLipCornerPuller = v2.FACS_REGIONS.Mouth,
    LeftLipStretcher = v2.FACS_REGIONS.Mouth,
    LeftUpperLipRaiser = v2.FACS_REGIONS.Mouth,
    RightCheekPuff = v2.FACS_REGIONS.Mouth,
    RightDimpler = v2.FACS_REGIONS.Mouth,
    RightLipCornerDown = v2.FACS_REGIONS.Mouth,
    RightLowerLipDepressor = v2.FACS_REGIONS.Mouth,
    RightLipCornerPuller = v2.FACS_REGIONS.Mouth,
    RightLipStretcher = v2.FACS_REGIONS.Mouth,
    RightUpperLipRaiser = v2.FACS_REGIONS.Mouth,
    JawDrop = v2.FACS_REGIONS.Jaw,
    JawLeft = v2.FACS_REGIONS.Jaw,
    JawRight = v2.FACS_REGIONS.Jaw,
    Corrugator = v2.FACS_REGIONS.Brows,
    LeftBrowLowerer = v2.FACS_REGIONS.Brows,
    LeftOuterBrowRaiser = v2.FACS_REGIONS.Brows,
    LeftNoseWrinkler = v2.FACS_REGIONS.Brows,
    LeftInnerBrowRaiser = v2.FACS_REGIONS.Brows,
    RightBrowLowerer = v2.FACS_REGIONS.Brows,
    RightOuterBrowRaiser = v2.FACS_REGIONS.Brows,
    RightInnerBrowRaiser = v2.FACS_REGIONS.Brows,
    RightNoseWrinkler = v2.FACS_REGIONS.Brows,
    EyesLookDown = v2.FACS_REGIONS.Eyes,
    EyesLookLeft = v2.FACS_REGIONS.Eyes,
    EyesLookUp = v2.FACS_REGIONS.Eyes,
    EyesLookRight = v2.FACS_REGIONS.Eyes,
    LeftCheekRaiser = v2.FACS_REGIONS.Eyes,
    LeftEyeUpperLidRaiser = v2.FACS_REGIONS.Eyes,
    LeftEyeClosed = v2.FACS_REGIONS.Eyes,
    RightCheekRaiser = v2.FACS_REGIONS.Eyes,
    RightEyeUpperLidRaiser = v2.FACS_REGIONS.Eyes,
    RightEyeClosed = v2.FACS_REGIONS.Eyes,
    TongueDown = v2.FACS_REGIONS.Tongue,
    TongueOut = v2.FACS_REGIONS.Tongue,
    TongueUp = v2.FACS_REGIONS.Tongue
};
v2.FacsNames = {
    ChinRaiserUpperLip = "ChinRaiserUpperLip",
    ChinRaiser = "ChinRaiser",
    FlatPucker = "FlatPucker",
    Funneler = "Funneler",
    LowerLipSuck = "LowerLipSuck",
    LipPresser = "LipPresser",
    LipsTogether = "LipsTogether",
    MouthLeft = "MouthLeft",
    MouthRight = "MouthRight",
    Pucker = "Pucker",
    UpperLipSuck = "UpperLipSuck",
    LeftCheekPuff = "LeftCheekPuff",
    LeftDimpler = "LeftDimpler",
    LeftLipCornerDown = "LeftLipCornerDown",
    LeftLowerLipDepressor = "LeftLowerLipDepressor",
    LeftLipCornerPuller = "LeftLipCornerPuller",
    LeftLipStretcher = "LeftLipStretcher",
    LeftUpperLipRaiser = "LeftUpperLipRaiser",
    RightCheekPuff = "RightCheekPuff",
    RightDimpler = "RightDimpler",
    RightLipCornerDown = "RightLipCornerDown",
    RightLowerLipDepressor = "RightLowerLipDepressor",
    RightLipCornerPuller = "RightLipCornerPuller",
    RightLipStretcher = "RightLipStretcher",
    RightUpperLipRaiser = "RightUpperLipRaiser",
    JawDrop = "JawDrop",
    JawLeft = "JawLeft",
    JawRight = "JawRight",
    Corrugator = "Corrugator",
    LeftBrowLowerer = "LeftBrowLowerer",
    LeftOuterBrowRaiser = "LeftOuterBrowRaiser",
    LeftNoseWrinkler = "LeftNoseWrinkler",
    LeftInnerBrowRaiser = "LeftInnerBrowRaiser",
    RightBrowLowerer = "RightBrowLowerer",
    RightOuterBrowRaiser = "RightOuterBrowRaiser",
    RightInnerBrowRaiser = "RightInnerBrowRaiser",
    RightNoseWrinkler = "RightNoseWrinkler",
    EyesLookDown = "EyesLookDown",
    EyesLookLeft = "EyesLookLeft",
    EyesLookUp = "EyesLookUp",
    EyesLookRight = "EyesLookRight",
    LeftCheekRaiser = "LeftCheekRaiser",
    LeftEyeUpperLidRaiser = "LeftEyeUpperLidRaiser",
    LeftEyeClosed = "LeftEyeClosed",
    RightCheekRaiser = "RightCheekRaiser",
    RightEyeUpperLidRaiser = "RightEyeUpperLidRaiser",
    RightEyeClosed = "RightEyeClosed",
    TongueDown = "TongueDown",
    TongueOut = "TongueOut",
    TongueUp = "TongueUp"
};
v2.FacsCrossMappings = {
    ChinRaiserUpperLip = {},
    ChinRaiser = {},
    FlatPucker = {},
    Funneler = {},
    LowerLipSuck = {},
    LipPresser = {},
    LipsTogether = {},
    MouthLeft = {
        sliderGroup = {
            v2.FacsNames.MouthRight,
            v2.FacsNames.MouthLeft
        },
        indexInGroup = 2
    },
    MouthRight = {
        sliderGroup = {
            v2.FacsNames.MouthRight,
            v2.FacsNames.MouthLeft
        },
        indexInGroup = 1
    },
    Pucker = {},
    UpperLipSuck = {},
    LeftCheekPuff = {
        symmetryPartner = v2.FacsNames.RightCheekPuff
    },
    LeftDimpler = {
        symmetryPartner = v2.FacsNames.RightDimpler
    },
    LeftLipCornerDown = {
        symmetryPartner = v2.FacsNames.RightLipCornerDown
    },
    LeftLowerLipDepressor = {
        symmetryPartner = v2.FacsNames.RightLowerLipDepressor
    },
    LeftLipCornerPuller = {
        symmetryPartner = v2.FacsNames.RightLipCornerPuller
    },
    LeftLipStretcher = {
        symmetryPartner = v2.FacsNames.RightLipStretcher
    },
    LeftUpperLipRaiser = {
        symmetryPartner = v2.FacsNames.RightUpperLipRaiser
    },
    RightCheekPuff = {
        symmetryPartner = v2.FacsNames.LeftCheekPuff
    },
    RightDimpler = {
        symmetryPartner = v2.FacsNames.LeftDimpler
    },
    RightLipCornerDown = {
        symmetryPartner = v2.FacsNames.LeftLipCornerDown
    },
    RightLowerLipDepressor = {
        symmetryPartner = v2.FacsNames.LeftLowerLipDepressor
    },
    RightLipCornerPuller = {
        symmetryPartner = v2.FacsNames.LeftLipCornerPuller
    },
    RightLipStretcher = {
        symmetryPartner = v2.FacsNames.LeftLipStretcher
    },
    RightUpperLipRaiser = {
        symmetryPartner = v2.FacsNames.LeftUpperLipRaiser
    },
    JawDrop = {},
    JawLeft = {
        sliderGroup = {
            v2.FacsNames.JawRight,
            v2.FacsNames.JawLeft
        },
        indexInGroup = 2
    },
    JawRight = {
        sliderGroup = {
            v2.FacsNames.JawRight,
            v2.FacsNames.JawLeft
        },
        indexInGroup = 1
    },
    Corrugator = {},
    LeftBrowLowerer = {
        symmetryPartner = v2.FacsNames.RightBrowLowerer
    },
    LeftOuterBrowRaiser = {
        symmetryPartner = v2.FacsNames.RightOuterBrowRaiser
    },
    LeftNoseWrinkler = {
        symmetryPartner = v2.FacsNames.RightNoseWrinkler
    },
    LeftInnerBrowRaiser = {
        symmetryPartner = v2.FacsNames.RightInnerBrowRaiser
    },
    RightBrowLowerer = {
        symmetryPartner = v2.FacsNames.LeftBrowLowerer
    },
    RightOuterBrowRaiser = {
        symmetryPartner = v2.FacsNames.LeftOuterBrowRaiser
    },
    RightInnerBrowRaiser = {
        symmetryPartner = v2.FacsNames.LeftInnerBrowRaiser
    },
    RightNoseWrinkler = {
        symmetryPartner = v2.FacsNames.LeftNoseWrinkler
    },
    EyesLookDown = {},
    EyesLookLeft = {},
    EyesLookUp = {},
    EyesLookRight = {},
    LeftCheekRaiser = {
        symmetryPartner = v2.FacsNames.RightCheekRaiser
    },
    LeftEyeUpperLidRaiser = {
        sliderGroup = {
            v2.FacsNames.LeftEyeClosed,
            v2.FacsNames.LeftEyeUpperLidRaiser
        },
        indexInGroup = 2,
        symmetryPartner = v2.FacsNames.RightEyeUpperLidRaiser
    },
    LeftEyeClosed = {
        sliderGroup = {
            v2.FacsNames.LeftEyeClosed,
            v2.FacsNames.LeftEyeUpperLidRaiser
        },
        indexInGroup = 1,
        symmetryPartner = v2.FacsNames.RightEyeClosed
    },
    RightCheekRaiser = {
        symmetryPartner = v2.FacsNames.LeftCheekRaiser
    },
    RightEyeUpperLidRaiser = {
        sliderGroup = {
            v2.FacsNames.RightEyeClosed,
            v2.FacsNames.RightEyeUpperLidRaiser
        },
        indexInGroup = 2,
        symmetryPartner = v2.FacsNames.LeftEyeUpperLidRaiser
    },
    RightEyeClosed = {
        sliderGroup = {
            v2.FacsNames.RightEyeClosed,
            v2.FacsNames.RightEyeUpperLidRaiser
        },
        indexInGroup = 1,
        symmetryPartner = v2.FacsNames.LeftEyeClosed
    },
    TongueDown = {
        sliderGroup = {
            v2.FacsNames.TongueUp,
            v2.FacsNames.TongueDown
        },
        indexInGroup = 2
    },
    TongueUp = {
        sliderGroup = {
            v2.FacsNames.TongueUp,
            v2.FacsNames.TongueDown
        },
        indexInGroup = 1
    },
    TongueOut = {}
};
v2.faceControlsEditorOriginalWidth = 240;
v2.faceControlsEditorFaceFrontDiagramWidth = 220;
v2.faceControlsEditorFaceFrontDiagramHeight = 310;
v2.faceControlsEditorFaceSideDiagramWidth = 220;
v2.faceControlsEditorFaceSideDiagramHeight = 190;
v2.faceControlsEditorDiagramPadding = 10;
v2.faceControlsEditoSpacingBetweenDiagrams = 40;
v2.faceControlsEditorTogglesContainerHeight = 95;
v2.COMPONENT_TRACK_TYPES = {
    [v2.TRACK_TYPES.CFrame] = {
        _Order = {
            v2.PROPERTY_KEYS.Position,
            v2.PROPERTY_KEYS.Rotation
        },
        [v2.PROPERTY_KEYS.Position] = v2.TRACK_TYPES.Position,
        [v2.PROPERTY_KEYS.Rotation] = v2.TRACK_TYPES.EulerAngles
    },
    [v2.TRACK_TYPES.Position] = {
        _Order = {
            v2.PROPERTY_KEYS.X,
            v2.PROPERTY_KEYS.Y,
            v2.PROPERTY_KEYS.Z
        },
        [v2.PROPERTY_KEYS.X] = v2.TRACK_TYPES.Number,
        [v2.PROPERTY_KEYS.Y] = v2.TRACK_TYPES.Number,
        [v2.PROPERTY_KEYS.Z] = v2.TRACK_TYPES.Number
    }
};
v2.COMPONENT_TRACK_TYPES[v2.TRACK_TYPES.EulerAngles] = {
    _Order = {
        v2.PROPERTY_KEYS.X,
        v2.PROPERTY_KEYS.Y,
        v2.PROPERTY_KEYS.Z
    },
    [v2.PROPERTY_KEYS.X] = v2.TRACK_TYPES.Angle,
    [v2.PROPERTY_KEYS.Y] = v2.TRACK_TYPES.Angle,
    [v2.PROPERTY_KEYS.Z] = v2.TRACK_TYPES.Angle
};
v2.COMPONENT_PATH_VALUE = {
    [v2.PROPERTY_KEYS.Position] = 1,
    [v2.PROPERTY_KEYS.Rotation] = 2,
    [v2.PROPERTY_KEYS.X] = 1,
    [v2.PROPERTY_KEYS.Y] = 2,
    [v2.PROPERTY_KEYS.Z] = 3
};
v2.COMPONENT_PATH_BASE_SCALE = 0.1;
v2.KEYFRAME_STYLE[Enum.KeyInterpolationMode.Constant] = "Constant";
v2.KEYFRAME_STYLE[Enum.KeyInterpolationMode.Cubic] = "Cubic";
v2.TRACK_THEME_MAPPING = {
    [v2.TRACK_TYPES.Number] = {
        [v2.PROPERTY_KEYS.X] = "positionX",
        [v2.PROPERTY_KEYS.Y] = "positionY",
        [v2.PROPERTY_KEYS.Z] = "positionZ"
    },
    [v2.TRACK_TYPES.Angle] = {
        [v2.PROPERTY_KEYS.X] = "rotationX",
        [v2.PROPERTY_KEYS.Y] = "rotationY",
        [v2.PROPERTY_KEYS.Z] = "rotationZ"
    }
};
v2.TICK_LABEL_POSITION = {
    [v2.SCALE_TYPE.Number] = UDim2.new(0.3, 0, 0.5, 0),
    [v2.SCALE_TYPE.Angle] = UDim2.new(0.7, 0, 0.5, 0)
};
v2.DEFAULT_ROTATION_TYPE = v2.TRACK_TYPES.EulerAngles;
return v2;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Packages.Cryo);
local v2 = require(l_script_FirstAncestor_0.Src.Util.KeyframeUtils);
local v3 = require(l_script_FirstAncestor_0.Src.Util.Templates);
local v4 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local v58 = {
    makeCubic = function(v5, v6, v7, v8, v9, v10)
        local v11 = v8 - v6;
        local v12 = if not v10 then v9.Value - v7.Value else 1;
        if v5 == Enum.PoseEasingDirection.Out then
            v7.RightSlope = (3 * v12) / v11;
            v9.LeftSlope = 0;
        else
            v7.RightSlope = 0;
            v9.LeftSlope = (3 * v12) / v11;
        end;
        return {};
    end,
    makeBounce = function(v13, v14, v15, v16, v17, v18, v19, v20)
        local v21 = {};
        local v22 = v16 - v14;
        local v23 = if not v18 then v17.Value - v15.Value else 1;
        v19 = v19 or 0.25;
        v20 = v20 or 3;
        local v24 = math.sqrt(v19);
        local v25 = 1;
        for v26 = 1, v20 do
            v25 = v25 + 2 * math.pow(v24, v26);
        end;
        local l_v24_0 = v24;
        local v28 = 2 * v25;
        local v29 = 1;
        local v30 = nil;
        for _ = 1, v20 do
            local v32 = nil;
            local v33 = nil;
            local v34 = v29 / v25;
            local v35 = not not v18 and ((2 * v25) * v24) / l_v24_0 or v28;
            local v36 = not not v18 and (2 * v25) / l_v24_0 or -v28 * v24;
            local v37 = v34 + l_v24_0 / v25;
            local v38 = 1 - l_v24_0 * l_v24_0;
            if v13 == Enum.PoseEasingDirection.In then
                v34 = 1 - v34;
                local l_v35_0 = v35;
                v35 = v36;
                v36 = l_v35_0;
                v37 = 1 - v37;
                v38 = 1 - v38;
            end;
            v32 = v2.getNearestTick(v14 + v34 * v22);
            v33 = v3.keyframe();
            v33.InterpolationMode = Enum.KeyInterpolationMode.Cubic;
            v33.LeftSlope = (v35 * v23) / v22;
            v33.RightSlope = (v36 * v23) / v22;
            v33.Value = v13 == Enum.PoseEasingDirection.In and v15.Value or v17.Value;
            v21[v32] = v33;
            v30 = if v13 == Enum.PoseEasingDirection.Out then v33.RightSlope else v33.LeftSlope;
            v32 = v2.getNearestTick(v14 + v37 * v22);
            v33 = v3.keyframe();
            v33.InterpolationMode = Enum.KeyInterpolationMode.Cubic;
            v33.LeftSlope = 0;
            v33.RightSlope = 0;
            if not v18 then
                v33.Value = v15.Value + v38 * (v17.Value - v15.Value);
            else
                v33.Value = v15.Value:lerp(v17.Value, v38);
            end;
            v21[v32] = v33;
            v29 = v29 + 2 * l_v24_0;
            l_v24_0 = l_v24_0 * v24;
            v28 = v28 * v24;
        end;
        if v13 == Enum.PoseEasingDirection.In then
            if not v18 then
                v15.RightSlope = -v30;
            else
                v15.RightSlope = v30;
            end;
            v17.LeftSlope = 0;
            return v21;
        else
            v15.RightSlope = 0;
            if not v18 then
                v17.LeftSlope = -v30;
                return v21;
            else
                v17.LeftSlope = v30;
                return v21;
            end;
        end;
    end,
    makeElastic = function(v40, v41, v42, v43, v44, v45, v46, v47)
        local v48 = {};
        local v49 = v43 - v41;
        local v50 = if not v45 then v44.Value - v42.Value else 1;
        v46 = v46 or 3.3333333333333335;
        v47 = v47 or 10;
        local v51 = 6.283185307179586 * v46;
        local v52 = math.atan((-v47 * 0.6931471805599453) / v51) / v51;
        for v53 = 1, 2 * v46 do
            local v54 = v52 + v53 / (2 * v46);
            local v55 = 1 - math.pow(2, -v47 * v54) * math.cos(v51 * v54);
            if v40 == Enum.PoseEasingDirection.In then
                v54 = 1 - v54;
                v55 = 1 - v55;
            end;
            local v56 = v2.getNearestTick(v41 + v54 * v49);
            local v57 = v3.keyframe();
            v57.InterpolationMode = Enum.KeyInterpolationMode.Cubic;
            v57.LeftSlope = 0;
            v57.RightSlope = 0;
            if not v45 then
                v57.Value = v42.Value + v55 * (v44.Value - v42.Value);
            else
                v57.Value = v42.Value:lerp(v44.Value, v55);
            end;
            v48[v56] = v57;
        end;
        if v40 == Enum.PoseEasingDirection.In then
            v42.RightSlope = 0;
            v44.LeftSlope = ((v47 * 0.6931471805599453) * v50) / v49;
            return v48;
        else
            v42.RightSlope = ((v47 * 0.6931471805599453) * v50) / v49;
            v44.LeftSlope = 0;
            return v48;
        end;
    end
};
v58.generateCurve = function(v59, v60, v61, v62, v63, v64, v65)
    local v66 = {
        [Enum.PoseEasingStyle.Cubic] = v58.makeCubic,
        [Enum.PoseEasingStyle.Bounce] = v58.makeBounce,
        [Enum.PoseEasingStyle.Elastic] = v58.makeElastic
    };
    local v67 = v59 == v4.TRACK_TYPES.Quaternion;
    v63.InterpolationMode = v4.POSE_EASING_STYLE_TO_KEY_INTERPOLATION[v60];
    v63.EasingStyle = nil;
    v63.EasingDirection = nil;
    if (v61 == Enum.PoseEasingDirection.InOut and v60 ~= Enum.PoseEasingStyle.Constant) and v60 ~= Enum.PoseEasingStyle.Linear then
        local v68 = v2.getNearestTick((v62 + v64) * 0.5);
        local v69 = v3.keyframe();
        if not v67 then
            v69.Value = (v63.Value + v65.Value) * 0.5;
        else
            v69.Value = v63.Value:lerp(v65.Value, 0.5);
        end;
        local v70 = v1.Dictionary.join(v58.generateCurve(v59, v60, Enum.PoseEasingDirection.In, v62, v63, v68, v69), (v58.generateCurve(v59, v60, Enum.PoseEasingDirection.Out, v68, v69, v64, v65)));
        if v60 ~= Enum.PoseEasingStyle.Elastic then
            v70[v68] = v69;
        end;
        return v70;
    elseif not v66[v60] then
        return {};
    else
        return v66[v60](v61, v62, v63, v64, v65, v67);
    end;
end;
v58.getYExtents = function(v71, v72, v73, v74, v75, v76)
    local l_v71_0 = v71;
    local l_v72_0 = v72;
    local l_v74_0 = v74;
    local l_v75_0 = v75;
    local l_l_v72_0_0 = l_v72_0;
    local l_l_v72_0_1 = l_v72_0;
    local v83 = (v73 * (l_v74_0 - l_v71_0)) / (l_v75_0 - l_v72_0);
    local v84 = (v76 * (l_v74_0 - l_v71_0)) / (l_v75_0 - l_v72_0);
    local v85 = (6 - 4 * v83) - 2 * v84;
    local v86 = v85 * v85 - (4 * ((3 * v83 + 3 * v84) - 6)) * v83;
    local function _(v87)
        return v87 * (v87 * (((3 - 2 * v87) + (v87 - 2) * v83) + (v87 - 1) * v84) + v83);
    end;
    if v86 >= 0 then
        local v89 = math.sqrt(v86);
        local v90 = (((4 * v83 + 2 * v84) - 6) + v89) / ((6 * v83 + 6 * v84) - 12);
        if v90 > 0 and v90 < 1 then
            l_l_v72_0_0 = l_v72_0 + (v90 * (v90 * (((3 - 2 * v90) + (v90 - 2) * v83) + (v90 - 1) * v84) + v83)) * (l_v75_0 - l_v72_0);
        end;
        local v91 = (((4 * v83 + 2 * v84) - 6) - v89) / ((6 * v83 + 6 * v84) - 12);
        if v91 > 0 and v91 < 1 then
            l_l_v72_0_1 = l_v72_0 + (v91 * (v91 * (((3 - 2 * v91) + (v91 - 2) * v83) + (v91 - 1) * v84) + v83)) * (l_v75_0 - l_v72_0);
        end;
    end;
    return math.min(l_v72_0, l_l_v72_0_0, l_l_v72_0_1, l_v75_0), (math.max(l_v72_0, l_l_v72_0_0, l_l_v72_0_1, l_v75_0));
end;
return v58;


local function v0(v1, v2)
    local v3 = v1.Name .. "\n";
    local v4 = string.rep("..", v2);
    for _, v6 in pairs(v1:GetChildren()) do
        v3 = v3 .. v4 .. ".." .. v0(v6, v2 + 1);
    end;
    return v3;
end;
return function(v7)
    if not v7 then
        print("<nil>");
        return ;
    else
        print((v0(v7, 0)));
        return ;
    end;
end;


return function(v0)
    for _, v2 in pairs((v0:GetKeys())) do
        print("{", v2.Time, v2.Value, v2.Interpolation.Name, v2.LeftTangent, v2.RightTangent, "}");
    end;
end;


local v0 = require(script.Parent.Parent.Parent.Parent.Packages.Cryo);
local function v1(v2, v3)
    if v2 == nil then
        return "<nil>";
    else
        local v4 = string.rep("  ", v3);
        local v5 = "{\n";
        local v6 = v0.Dictionary.keys(v2);
        table.sort(v6, function(v7, v8)
            return tostring(v7) < tostring(v8);
        end);
        for _, v10 in ipairs(v6) do
            local v11 = v2[v10];
            v5 = v5 .. string.format("%s  %s%s:", v4, tostring(v10), if typeof(v10) ~= "string" and typeof(v10) ~= "number" then string.format("[%s]", (typeof(v10))) else "");
            if type(v11) == "table" then
                v5 = v5 .. v1(v11, v3 + 1);
            else
                v5 = v5 .. tostring(v11) .. "\n";
            end;
        end;
        return v5 .. v4 .. "}\n";
    end;
end;
return function(v12)
    print((v1(v12, 0)));
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Src.Util.KeyframeUtils);
local v2 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local function _(v3, v4)
    if v3 then
        local function v5(v6, v7, v8)
            if not v6.Components then
                v8(v6, v7);
                return ;
            else
                for v9, v10 in pairs(v6.Components) do
                    v5(v10, (v7 ~= "" and v7 .. "." or "") .. v9, v8);
                end;
                return ;
            end;
        end;
        if not v3.Components then
            v4(v3, "");
            return ;
        else
            for v11, v12 in pairs(v3.Components) do
                v5(v12, "" .. v11, v4);
            end;
            return ;
        end;
    else
        return ;
    end;
end;
local _ = function(v14)
    local v15 = 0;
    local function v18(v16, _)
        if v16.Keyframes and #v16.Keyframes > 0 then
            v15 = math.max(v15, v16.Keyframes[#v16.Keyframes]);
        end;
    end;
    if v14 then
        local function v19(v20, v21, v22)
            if not v20.Components then
                v22(v20, v21);
                return ;
            else
                for v23, v24 in pairs(v20.Components) do
                    v19(v24, (v21 ~= "" and v21 .. "." or "") .. v23, v22);
                end;
                return ;
            end;
        end;
        if not v14.Components then
            v18(v14, "");
        else
            for v25, v26 in pairs(v14.Components) do
                v19(v26, "" .. v25, v18);
            end;
        end;
    end;
    return v15;
end;
local function _(v28)
    return (tostring(math.round(v28 * 10000) / 10000));
end;
local function v38(v30, v31, v32)
    local v33 = {};
    if v30.Type == v2.TRACK_TYPES.Facs then
        return {
            (tostring(math.round(v1.getValue(v30, v31, v32) * 10000) / 10000))
        };
    else
        if v30.Type == v2.TRACK_TYPES.CFrame then
            local v34 = v1.getValue(v30, v31, v32);
            local v35, v36, v37 = v34:ToEulerAnglesXYZ();
            v33 = {
                tostring(math.round(v34.X * 10000) / 10000),
                tostring(math.round(v34.Y * 10000) / 10000),
                tostring(math.round(v34.Z * 10000) / 10000),
                tostring(math.round(math.deg(v35) * 10000) / 10000),
                tostring(math.round(math.deg(v36) * 10000) / 10000),
                (tostring(math.round(math.deg(v37) * 10000) / 10000))
            };
        end;
        return v33;
    end;
end;
local function _(v39, v40)
    return tostring(math.round((v39 / v2.TICK_FREQUENCY) * 10000) / 10000) .. "," .. table.concat(v40, ",") .. "\n";
end;
return function(v42, v43, v44)
    local v45 = 0;
    local v46;
    do
        local l_v45_0 = v45;
        local function v50(v48, _)
            if v48.Keyframes and #v48.Keyframes > 0 then
                l_v45_0 = math.max(l_v45_0, v48.Keyframes[#v48.Keyframes]);
            end;
        end;
        if v42 then
            local function v51(v52, v53, v54)
                if not v52.Components then
                    v54(v52, v53);
                    return ;
                else
                    for v55, v56 in pairs(v52.Components) do
                        v51(v56, (v53 ~= "" and v53 .. "." or "") .. v55, v54);
                    end;
                    return ;
                end;
            end;
            if not v42.Components then
                v50(v42, "");
            else
                for v57, v58 in pairs(v42.Components) do
                    v51(v58, "" .. v57, v50);
                end;
            end;
        end;
        v46 = l_v45_0;
    end;
    v45 = nil;
    local v59 = "\n" .. table.concat(if not not v42 and v42.Type == v2.TRACK_TYPES.Facs then {
        v43 or "FACS",
        "Value"
    } else {
        v43 or "CFrame",
        "Px1",
        "Py1",
        "Pz1",
        "Rx1",
        "Ry1",
        "Rz1"
    }, ",") .. "\n";
    if v42 then
        for v60 = 0, v46, 20 do
            v59 = v59 .. tostring(math.round((v60 / v2.TICK_FREQUENCY) * 10000) / 10000) .. "," .. table.concat(v38(v42, v60, v44), ",") .. "\n";
        end;
    end;
    print(v59);
end;


local l_Workspace_0 = game:GetService("Workspace");
local v1 = pcall(function()
    return game:GetService("ProcessService");
end);
local function _(v2, v3)
    v3 = v3 or false;
    return function()
        local l_AnimationClipEditorFlags_0 = l_Workspace_0:FindFirstChild("AnimationClipEditorFlags");
        if l_AnimationClipEditorFlags_0 and l_AnimationClipEditorFlags_0:FindFirstChild(v2) then
            return l_AnimationClipEditorFlags_0[v2].Value;
        else
            return v3;
        end;
    end;
end;
local v6 = {};
local v7 = nil or false;
local v8 = "RunTests";
local l_v8_0 = v8 --[[ copy: 6 -> 7 ]];
local v10;
do
    local l_v7_0 = v7;
    v10 = function()
        local l_AnimationClipEditorFlags_1 = l_Workspace_0:FindFirstChild("AnimationClipEditorFlags");
        if l_AnimationClipEditorFlags_1 and l_AnimationClipEditorFlags_1:FindFirstChild(l_v8_0) then
            return l_AnimationClipEditorFlags_1[l_v8_0].Value;
        else
            return l_v7_0;
        end;
    end;
end;
v6.RunTests = v10;
v7 = nil or false;
v8 = "RunRhodiumTests";
local l_v8_1 = v8 --[[ copy: 6 -> 8 ]];
do
    local l_v7_1 = v7;
    v10 = function()
        local l_AnimationClipEditorFlags_2 = l_Workspace_0:FindFirstChild("AnimationClipEditorFlags");
        if l_AnimationClipEditorFlags_2 and l_AnimationClipEditorFlags_2:FindFirstChild(l_v8_1) then
            return l_AnimationClipEditorFlags_2[l_v8_1].Value;
        else
            return l_v7_1;
        end;
    end;
end;
v6.RunRhodiumTests = v10;
v7 = nil or false;
v8 = "LogRoduxEvents";
local l_v8_2 = v8 --[[ copy: 6 -> 9 ]];
do
    local l_v7_2 = v7;
    v10 = function()
        local l_AnimationClipEditorFlags_3 = l_Workspace_0:FindFirstChild("AnimationClipEditorFlags");
        if l_AnimationClipEditorFlags_3 and l_AnimationClipEditorFlags_3:FindFirstChild(l_v8_2) then
            return l_AnimationClipEditorFlags_3[l_v8_2].Value;
        else
            return l_v7_2;
        end;
    end;
end;
v6.LogRoduxEvents = v10;
v7 = nil or false;
v8 = "LogAnalytics";
local l_v8_3 = v8 --[[ copy: 6 -> 10 ]];
do
    local l_v7_3 = v7;
    v10 = function()
        local l_AnimationClipEditorFlags_4 = l_Workspace_0:FindFirstChild("AnimationClipEditorFlags");
        if l_AnimationClipEditorFlags_4 and l_AnimationClipEditorFlags_4:FindFirstChild(l_v8_3) then
            return l_AnimationClipEditorFlags_4[l_v8_3].Value;
        else
            return l_v7_3;
        end;
    end;
end;
v6.LogAnalytics = v10;
v7 = v1 or false;
v8 = "RunningUnderCLI";
do
    local l_v7_4 = v7;
    v10 = function()
        local l_AnimationClipEditorFlags_5 = l_Workspace_0:FindFirstChild("AnimationClipEditorFlags");
        if l_AnimationClipEditorFlags_5 and l_AnimationClipEditorFlags_5:FindFirstChild(v8) then
            return l_AnimationClipEditorFlags_5[v8].Value;
        else
            return l_v7_4;
        end;
    end;
end;
v6.RunningUnderCLI = v10;
return v6;


local v0 = {};
v0.__index = v0;
v0.new = function()
    local v1 = {
        lastClick = 0
    };
    setmetatable(v1, v0);
    return v1;
end;
v0.isDoubleClick = function(v2)
    local v3 = tick();
    local v4 = v3 < v2.lastClick + 0.2;
    v2.lastClick = v3;
    return v4;
end;
return v0;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Packages.Cryo);
local v2 = require(l_script_FirstAncestor_0.Src.Util.AnimationData);
local v3 = require(l_script_FirstAncestor_0.Src.Util.deepCopy);
local v4 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local v5 = {};
v5.__index = v5;
v5.new = function(v6, v7, v8, v9)
    v6 = v1.Dictionary.join({}, v6);
    v6.Instances = v1.Dictionary.join({}, v6.Instances);
    for v10, v11 in pairs(v7) do
        v6.Instances[v10] = v1.Dictionary.join({}, v6.Instances[v10]);
        v6.Instances[v10].Tracks = v1.Dictionary.join({}, v6.Instances[v10].Tracks);
        local v12 = v6.Instances[v10];
        for v13, _ in pairs(v11) do
            v12.Tracks[v13] = v3(v12.Tracks[v13]);
        end;
    end;
    v7 = v3(v7);
    local v15, v16 = v2.getSelectionBounds(v6, v7);
    local v17 = {
        animationData = v6,
        selectedKeyframes = v7,
        pivotTick = v8,
        newTick = v8,
        pivotValue = v9,
        newValue = v9,
        scale = 1,
        earliestTick = v15,
        latestTick = v16,
        dragMode = v4.DRAG_MODE.Keyframe
    };
    setmetatable(v17, v5);
    return v17;
end;
v5.newTangentContext = function(v18, v19, v20, v21, v22)
    local v23 = v2.getTrack(v18, v19, v20);
    if v23 then
        local v24 = v23.Data[v21];
        if v24 then
            local v25 = {
                instance = v19,
                path = v20,
                tck = v21,
                value = v24.Value,
                side = v22,
                dragMode = v4.DRAG_MODE.Tangent,
                trackType = v23.Type
            };
            setmetatable(v25, v5);
            return v25;
        else
            return nil;
        end;
    else
        return nil;
    end;
end;
v5.moveKeyframes = function(v26, v27, v28)
    v26.newTick = v27;
    v26.newValue = v28;
end;
v5.scaleKeyframes = function(v29, v30)
    v29.newTick = v30;
    local l_pivotTick_0 = v29.pivotTick;
    v29.scale = (l_pivotTick_0 == v29.latestTick and l_pivotTick_0 - v30 or v30 - l_pivotTick_0) / (v29.latestTick - v29.earliestTick);
end;
v5.newEvents = function(v32, v33, v34, v35)
    v32 = v1.Dictionary.join({}, v32);
    v32.Events = v3(v32.Events);
    local v36 = {
        pivotTick = v35,
        newTick = v35,
        animationData = v32,
        eventFilters = v34,
        selectedEvents = v3(v33)
    };
    setmetatable(v36, v5);
    return v36;
end;
v5.moveEvents = function(v37, v38)
    v37.newTick = v38;
end;
return v5;