local _ = {
    Enum.PoseEasingStyle.Linear,
    Enum.PoseEasingStyle.Constant,
    Enum.PoseEasingStyle.Cubic,
    Enum.PoseEasingStyle.Elastic,
    Enum.PoseEasingStyle.Bounce
};
local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v2 = require(l_script_FirstAncestor_0.Packages.Roact);
local v3 = require(l_script_FirstAncestor_0.Packages.RoactRodux);
local v4 = require(l_script_FirstAncestor_0.Packages.Cryo);
local l_ContextServices_0 = require(l_script_FirstAncestor_0.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v7 = require(l_script_FirstAncestor_0.Src.Actions.SetEventEditingTick);
local v8 = require(l_script_FirstAncestor_0.Src.Actions.SetRightClickContextInfo);
local v9 = require(l_script_FirstAncestor_0.Src.Actions.SetSelectedEvents);
local v10 = require(l_script_FirstAncestor_0.Src.Actions.SetSelectedKeyframes);
local v11 = require(l_script_FirstAncestor_0.Src.Actions.SetShowEvents);
local v12 = require(l_script_FirstAncestor_0.Src.Actions.SetTool);
local v13 = require(l_script_FirstAncestor_0.Src.Components.ContextMenu);
local v14 = require(l_script_FirstAncestor_0.Src.Context.Signals);
local v15 = require(l_script_FirstAncestor_0.Src.Thunks.AddKeyframe);
local v16 = require(l_script_FirstAncestor_0.Src.Thunks.History.AddWaypoint);
local v17 = require(l_script_FirstAncestor_0.Src.Thunks.Selection.CopySelectedKeyframes);
local v18 = require(l_script_FirstAncestor_0.Src.Thunks.Selection.DeleteSelectedKeyframes);
local v19 = require(l_script_FirstAncestor_0.Src.Thunks.PasteKeyframes);
local v20 = require(l_script_FirstAncestor_0.Src.Thunks.History.Redo);
local v21 = require(l_script_FirstAncestor_0.Src.Thunks.Selection.ResetSelectedKeyframes);
local v22 = require(l_script_FirstAncestor_0.Src.Thunks.Selection.SelectAllKeyframes);
local v23 = require(l_script_FirstAncestor_0.Src.Thunks.SplitTrack);
local v24 = require(l_script_FirstAncestor_0.Src.Thunks.ToggleBoneVisibility);
local v25 = require(l_script_FirstAncestor_0.Src.Thunks.Playback.TogglePlay);
local v26 = require(l_script_FirstAncestor_0.Src.Thunks.History.Undo);
local v27 = require(l_script_FirstAncestor_0.Src.Util.AnimationData);
local v28 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local v29 = require(l_script_FirstAncestor_0.Src.Util.isEmpty);
local v30 = require(l_script_FirstAncestor_0.Src.Util.KeyframeUtils);
local v31 = require(l_script_FirstAncestor_0.Src.Util.SelectionUtils);
local v32 = require(l_script_FirstAncestor_0.Src.Util.TrackUtils);
local v33 = v2.PureComponent:extend("TimelineActions");
v33.getSharedPropertyValue = function(v34, v35)
    local l_props_0 = v34.props;
    local l_SelectedKeyframes_0 = l_props_0.SelectedKeyframes;
    local l_AnimationData_0 = l_props_0.AnimationData;
    local v39 = false;
    local v40 = nil;
    for v41, v42 in pairs(l_SelectedKeyframes_0) do
        local v43 = l_AnimationData_0.Instances[v41];
        for v44, v45 in pairs(v42) do
            v31.traverse(v45, v43.Tracks[v44], function(v46, v47)
                if not (not v46.Selection or not v47.Data) and not v39 then
                    for v48, _ in pairs(v46.Selection) do
                        local v50 = v47.Data[v48];
                        if v50 then
                            if v40 == nil then
                                v40 = v50[v35];
                            elseif v40 ~= v50[v35] then
                                v40 = nil;
                                v39 = true;
                                return ;
                            end;
                        end;
                    end;
                    return ;
                else
                    return ;
                end;
            end);
        end;
    end;
    return v40 and v40.Value;
end;
v33.makeSelectionSubMenu = function(v51, v52, v53)
    local l_props_1 = v51.props;
    local v55 = {
        Text = l_props_1.Localization:getText("ContextMenu", v53)
    };
    local v56 = v51:getSharedPropertyValue(v53);
    local function v58(v57)
        l_props_1.OnItemSelected(v53, v57.Data);
    end;
    for _, v60 in v52, nil, nil do
        table.insert(v55, {
            Text = v60.Name,
            Data = v60,
            Checked = v56 == v60.Value,
            OnItemClicked = v58
        });
    end;
    return v55;
end;
v33.makeGenerateCurveMenu = function(v61)
    local l_props_2 = v61.props;
    local l_Localization_0 = l_props_2.Localization;
    local function v67(v64)
        local function v66(v65)
            l_props_2.OnGenerateCurve(v64, v65.Data);
        end;
        return {
            Text = v64.Name;
            {
                Text = Enum.PoseEasingDirection.In.Name,
                Data = Enum.PoseEasingDirection.In,
                OnItemClicked = v66
            },
            {
                Text = Enum.PoseEasingDirection.Out.Name,
                Data = Enum.PoseEasingDirection.Out,
                OnItemClicked = v66
            },
            {
                Text = Enum.PoseEasingDirection.InOut.Name,
                Data = Enum.PoseEasingDirection.InOut,
                OnItemClicked = v66
            }
        };
    end;
    return {
        Text = l_Localization_0:getText("ContextMenu", "GenerateCurve");
        v67(Enum.PoseEasingStyle.Bounce),
        (v67(Enum.PoseEasingStyle.Elastic))
    };
end;
v33.multipleSelected = function(v68)
    local l_props_3 = v68.props;
    local l_AnimationData_1 = l_props_3.AnimationData;
    local l_SelectedKeyframes_1 = l_props_3.SelectedKeyframes;
    local v72, v73 = v27.getSelectionBounds(l_AnimationData_1, l_SelectedKeyframes_1);
    return l_SelectedKeyframes_1 and v72 ~= v73;
end;
v33.makeMenuActions = function(v74)
    local l_props_4 = v74.props;
    local l_SelectedKeyframes_2 = l_props_4.SelectedKeyframes;
    local l_SummaryKeyframe_0 = l_props_4.SummaryKeyframe;
    local l_PluginActions_0 = v74.props.PluginActions;
    local l_IsChannelAnimation_0 = l_props_4.IsChannelAnimation;
    local v80 = {
        l_PluginActions_0:get("AddKeyframeHere"),
        l_PluginActions_0:get("DeleteSelected"),
        v28.MENU_SEPARATOR,
        l_PluginActions_0:get("CutSelected"),
        l_PluginActions_0:get("CopySelected"),
        l_PluginActions_0:get("PasteKeyframes"),
        v28.MENU_SEPARATOR
    };
    if not l_SelectedKeyframes_2 or v29(l_SelectedKeyframes_2) then
        table.insert(v80, l_PluginActions_0:get("AddResetKeyframe"));
    else
        table.insert(v80, l_PluginActions_0:get("ResetSelected"));
        table.insert(v80, v28.MENU_SEPARATOR);
        table.insert(v80, l_PluginActions_0:get("ChangeDuration"));
        table.insert(v80, v28.MENU_SEPARATOR);
        if not l_IsChannelAnimation_0 then
            table.insert(v80, v74:makeSelectionSubMenu(v28.EASING_STYLE_ORDER, "EasingStyle"));
            table.insert(v80, v74:makeSelectionSubMenu(v28.EASING_DIRECTION_ORDER, "EasingDirection"));
        else
            table.insert(v80, v74:makeSelectionSubMenu(v28.KEY_INTERPOLATION_MODE_ORDER, "InterpolationMode"));
            table.insert(v80, l_PluginActions_0:get("ClearBothTangents"));
            if v74:multipleSelected() then
                table.insert(v80, v74:makeGenerateCurveMenu());
            end;
        end;
    end;
    table.insert(v80, v28.MENU_SEPARATOR);
    table.insert(v80, l_PluginActions_0:get("AddEvent"));
    if l_SummaryKeyframe_0 ~= nil then
        table.insert(v80, l_PluginActions_0:get("RenameKeyframe"));
    end;
    return v80;
end;
v33.addAction = function(v81, v82, v83)
    if v82 then
        v82.Enabled = false;
        table.insert(v81.Actions, v82);
        table.insert(v81.Connections, v82.Triggered:Connect(v83));
    end;
end;
v33.didMount = function(v84)
    local l_PluginActions_1 = v84.props.PluginActions;
    v84.Connections = {};
    v84.Actions = {};
    v84:addAction(l_PluginActions_1:get("AddKeyframeHere"), function()
        local l_props_5 = v84.props;
        local l_Tick_0 = l_props_5.Tick;
        local _ = l_props_5.TrackName;
        local l_InstanceName_0 = l_props_5.InstanceName;
        local l_Tracks_0 = l_props_5.Tracks;
        local l_TrackType_0 = l_props_5.TrackType;
        local l_RotationType_0 = l_props_5.RotationType;
        local l_Path_0 = l_props_5.Path;
        local l_AnimationData_2 = l_props_5.AnimationData;
        local l_IsChannelAnimation_1 = l_props_5.IsChannelAnimation;
        local function v102(v96, v97)
            l_TrackType_0 = l_TrackType_0 or v32.getTrackTypeFromName(v97[1], l_Tracks_0);
            l_RotationType_0 = l_RotationType_0 or v32.getRotationTypeFromName(v97[1], l_Tracks_0);
            if not l_IsChannelAnimation_1 then
                local v98 = v27.getTrack(l_AnimationData_2, v96, v97);
                local _ = nil;
                l_props_5.AddKeyframe(v96, v97, l_TrackType_0, nil, l_Tick_0, {
                    Value = if not not v98 and v98.Keyframes then v30.getValue(v98, l_Tick_0) else v30.getDefaultValue(l_TrackType_0),
                    EasingStyle = Enum.PoseEasingStyle.Linear,
                    EasingDirection = Enum.PoseEasingDirection.In
                }, l_props_5.Analytics);
                return ;
            else
                v32.traverseComponents(l_TrackType_0, function(v100, v101)
                    l_props_5.SplitTrack(v96, v4.List.join(v97, v101), v100, l_RotationType_0, l_Tick_0, l_props_5.Analytics);
                end, l_RotationType_0);
                return ;
            end;
        end;
        if not l_InstanceName_0 or not l_Path_0 then
            for v103, _ in pairs(l_props_5.AnimationData.Instances) do
                for _, v106 in pairs(l_Tracks_0) do
                    v102(v103, {
                        v106.Name
                    });
                end;
            end;
        else
            v102(l_InstanceName_0, l_Path_0);
        end;
    end);
    v84:addAction(l_PluginActions_1:get("AddKeyframeAtScrubber"), function()
        local l_props_6 = v84.props;
        local l_Tracks_1 = l_props_6.Tracks;
        local l_Playhead_0 = l_props_6.Playhead;
        local l_SelectedTracks_0 = l_props_6.SelectedTracks;
        local l_IsChannelAnimation_2 = l_props_6.IsChannelAnimation;
        if l_SelectedTracks_0 then
            for v112, _ in pairs(l_props_6.AnimationData.Instances) do
                for _, v115 in pairs(l_SelectedTracks_0) do
                    local v116 = v27.getTrack(l_props_6.AnimationData, v112, v115);
                    local v117 = not not v116 and v116.Type or v32.getComponentTypeFromPath(v115, l_Tracks_1);
                    if not l_IsChannelAnimation_2 then
                        local _ = nil;
                        l_props_6.AddKeyframe(v112, v115, v117, nil, l_Playhead_0, {
                            Value = if not not v116 and v116.Keyframes then v30.getValue(v116, l_Playhead_0) else v30.getDefaultValue(v117),
                            EasingStyle = Enum.PoseEasingStyle.Linear,
                            EasingDirection = Enum.PoseEasingDirection.In
                        }, l_props_6.Analytics);
                    else
                        local v119 = not not v116 and v32.getRotationType(v116) or l_props_6.DefaultRotationType;
                        v32.traverseComponents(v117, function(v120, v121)
                            l_props_6.SplitTrack(v112, v4.List.join(v115, v121), v120, v119, l_Playhead_0, l_props_6.Analytics);
                        end, v119);
                    end;
                end;
            end;
        end;
    end);
    v84:addAction(l_PluginActions_1:get("AddResetKeyframe"), function()
        local l_props_7 = v84.props;
        local l_Tick_1 = l_props_7.Tick;
        local l_InstanceName_1 = l_props_7.InstanceName;
        local l_Tracks_2 = l_props_7.Tracks;
        local l_Path_1 = l_props_7.Path;
        local l_IsChannelAnimation_3 = l_props_7.IsChannelAnimation;
        if not l_InstanceName_1 or not l_Path_1 then
            for v128, v129 in pairs(l_props_7.AnimationData.Instances) do
                for _, v131 in pairs(l_Tracks_2) do
                    local l_Name_0 = v131.Name;
                    local v133 = v129.Tracks[l_Name_0];
                    local v134 = nil;
                    local v135 = nil;
                    local v136 = nil;
                    do
                        local l_v134_0, l_v136_0 = v134, v136;
                        if not l_IsChannelAnimation_3 then
                            v135 = not not v133 and v133.Type or v32.getTrackTypeFromName(l_Name_0, l_Tracks_2);
                            l_props_7.AddKeyframe(v128, {
                                l_Name_0
                            }, v135, nil, l_Tick_1, {
                                Value = v30.getDefaultValue(v135),
                                EasingStyle = Enum.PoseEasingStyle.Linear,
                                EasingDirection = Enum.PoseEasingDirection.In
                            }, l_props_7.Analytics);
                        else
                            if not v133 then
                                v135 = v32.getTrackTypeFromName(l_Name_0, l_Tracks_2);
                                l_v136_0 = v32.getRotationTypeFromName(l_Name_0, l_Tracks_2);
                            else
                                v135 = v133.Type;
                                local v139 = v133.Components and v133.Components[v28.PROPERTY_KEYS.Rotation];
                                l_v136_0 = not not v139 and v139.Type or nil;
                            end;
                            v32.traverseComponents(v135, function(v140, v141)
                                local v142 = v4.List.join({
                                    l_Name_0
                                }, v141);
                                l_v134_0 = v30.getDefaultValue(v140);
                                l_props_7.AddKeyframe(v128, v142, v140, l_v136_0, l_Tick_1, {
                                    Value = l_v134_0,
                                    InterpolationMode = Enum.KeyInterpolationMode.Cubic
                                }, l_props_7.Analytics);
                            end, l_v136_0);
                        end;
                    end;
                end;
            end;
            return ;
        else
            local v143 = nil;
            local l_TrackType_1 = l_props_7.TrackType;
            local l_RotationType_1 = l_props_7.RotationType;
            if not l_IsChannelAnimation_3 then
                l_props_7.AddKeyframe(l_InstanceName_1, l_Path_1, l_TrackType_1, nil, l_Tick_1, {
                    Value = v30.getDefaultValue(l_TrackType_1),
                    EasingStyle = Enum.PoseEasingStyle.Linear,
                    EasingDirection = Enum.PoseEasingDirection.In
                }, l_props_7.Analytics);
            else
                v32.traverseComponents(l_TrackType_1, function(v146, v147)
                    local v148 = v4.List.join(l_Path_1, v147);
                    v143 = v30.getDefaultValue(v146);
                    l_props_7.AddKeyframe(l_InstanceName_1, v148, v146, l_RotationType_1, l_Tick_1, {
                        Value = v143,
                        InterpolationMode = Enum.KeyInterpolationMode.Cubic
                    }, l_props_7.Analytics);
                end, l_RotationType_1);
            end;
            return ;
        end;
    end);
    v84:addAction(l_PluginActions_1:get("RenameKeyframe"), function()
        local l_props_8 = v84.props;
        l_props_8.OnRenameKeyframe(l_props_8.Tick);
    end);
    v84:addAction(l_PluginActions_1:get("PasteKeyframes"), function()
        local l_props_9 = v84.props;
        l_props_9.PasteKeyframes(l_props_9.Tick or l_props_9.Playhead, l_props_9.Analytics);
    end);
    v84:addAction(l_PluginActions_1:get("CutSelected"), function()
        local l_props_10 = v84.props;
        l_props_10.CopySelectedKeyframes();
        l_props_10.DeleteSelectedKeyframes(l_props_10.Analytics);
    end);
    v84:addAction(l_PluginActions_1:get("AddEvent"), function()
        v84.props.OnEditEvents(v84.props.Tick);
    end);
    v84:addAction(l_PluginActions_1:get("ToggleTool"), function()
        local l_props_11 = v84.props;
        if l_props_11.Tool == Enum.RibbonTool.Move then
            l_props_11.SetTool(Enum.RibbonTool.Rotate);
            return ;
        else
            l_props_11.SetTool(Enum.RibbonTool.Move);
            return ;
        end;
    end);
    local function v153()
        return v84.props.TogglePlay(v84.props.Analytics);
    end;
    local function v154()
        return v84.props.DeleteSelectedKeyframes(v84.props.Analytics);
    end;
    local function v155()
        return v84.props.Undo(v84.props.Signals);
    end;
    v84:addAction(l_PluginActions_1:get("CopySelected"), v84.props.CopySelectedKeyframes);
    v84:addAction(l_PluginActions_1:get("DeleteSelected"), v154);
    v84:addAction(l_PluginActions_1:get("ResetSelected"), v84.props.ResetSelectedKeyframes);
    v84:addAction(l_PluginActions_1:get("SelectAll"), v84.props.SelectAllKeyframes);
    v84:addAction(l_PluginActions_1:get("DeselectAll"), v84.props.DeselectAllKeyframes);
    v84:addAction(l_PluginActions_1:get("ChangeDuration"), v84.props.OnChangeDuration);
    v84:addAction(l_PluginActions_1:get("Undo"), v155);
    v84:addAction(l_PluginActions_1:get("Redo"), v84.props.Redo);
    v84:addAction(l_PluginActions_1:get("TogglePlay"), v153);
    v84:addAction(l_PluginActions_1:get("ToggleBoneVis"), v84.props.ToggleBoneVisibility);
    v84:addAction(l_PluginActions_1:get("ClearBothTangents"), v84.props.OnClearTangentsSelected);
end;
v33.render = function(v156)
    local l_props_12 = v156.props;
    local l_ShowMenu_0 = l_props_12.ShowMenu;
    local l_Clipboard_0 = l_props_12.Clipboard;
    local l_ClipboardType_0 = l_props_12.ClipboardType;
    local l_SelectedKeyframes_3 = l_props_12.SelectedKeyframes;
    local l_SummaryKeyframe_1 = l_props_12.SummaryKeyframe;
    local l_MultipleSelected_0 = l_props_12.MultipleSelected;
    local l_Tool_0 = l_props_12.Tool;
    local l_Tracks_3 = l_props_12.Tracks;
    local l_IsChannelAnimation_4 = l_props_12.IsChannelAnimation;
    local l_ReadOnly_0 = l_props_12.ReadOnly;
    local l_Actions_0 = v156.Actions;
    local l_PluginActions_2 = v156.props.PluginActions;
    if not v29(l_PluginActions_2) and l_Actions_0 ~= nil then
        for _, v171 in ipairs(l_Actions_0) do
            v171.Enabled = false;
        end;
        local v172 = not not l_IsChannelAnimation_4 and v28.CLIPBOARD_TYPE.Channels or v28.CLIPBOARD_TYPE.Keyframes;
        if not (not l_Clipboard_0 or v29(l_Clipboard_0)) and l_ClipboardType_0 == v172 then
            l_PluginActions_2:get("PasteKeyframes").Enabled = not l_ReadOnly_0;
        end;
        if not l_SelectedKeyframes_3 or v29(l_SelectedKeyframes_3) then
            l_PluginActions_2:get("SelectAll").Enabled = not l_ReadOnly_0;
        else
            l_PluginActions_2:get("DeselectAll").Enabled = true;
            l_PluginActions_2:get("CutSelected").Enabled = not l_ReadOnly_0;
            l_PluginActions_2:get("CopySelected").Enabled = not l_ReadOnly_0;
            l_PluginActions_2:get("ResetSelected").Enabled = not l_ReadOnly_0;
            l_PluginActions_2:get("DeleteSelected").Enabled = not l_ReadOnly_0;
        end;
        if not (l_props_12.OnKeyframe or v29(l_Tracks_3)) then
            l_PluginActions_2:get("AddKeyframeHere").Enabled = not l_ReadOnly_0;
            l_PluginActions_2:get("AddResetKeyframe").Enabled = not l_ReadOnly_0;
        end;
        l_PluginActions_2:get("AddKeyframeAtScrubber").Enabled = not l_ReadOnly_0;
        if l_MultipleSelected_0 then
            l_PluginActions_2:get("ChangeDuration").Enabled = not l_ReadOnly_0;
        end;
        if l_SummaryKeyframe_1 ~= nil then
            l_PluginActions_2:get("RenameKeyframe").Enabled = true;
        end;
        if l_IsChannelAnimation_4 then
            l_PluginActions_2:get("ClearBothTangents").Enabled = not l_ReadOnly_0;
        end;
        if not (l_Tool_0 ~= Enum.RibbonTool.Rotate) or l_Tool_0 == Enum.RibbonTool.Move then
            l_PluginActions_2:get("ToggleTool").Enabled = not l_ReadOnly_0;
        end;
        l_PluginActions_2:get("Undo").Enabled = not l_ReadOnly_0;
        l_PluginActions_2:get("Redo").Enabled = not l_ReadOnly_0;
        l_PluginActions_2:get("TogglePlay").Enabled = true;
        l_PluginActions_2:get("AddEvent").Enabled = true;
        l_PluginActions_2:get("ToggleBoneVis").Enabled = true;
    end;
    if not l_ShowMenu_0 or l_ReadOnly_0 then
        return nil;
    else
        return (v2.createElement(v13, {
            Actions = v156:makeMenuActions(),
            OnMenuOpened = l_props_12.OnMenuOpened
        }));
    end;
end;
v33.willUnmount = function(v173)
    if v173.Connections then
        for _, v175 in ipairs(v173.Connections) do
            v175:Disconnect();
        end;
        v173.Connections = {};
    end;
    if v173.Actions then
        for _, v177 in ipairs(v173.Actions) do
            v177.Enabled = false;
        end;
    end;
end;
return v3.connect(function(v178, _)
    local l_Status_0 = v178.Status;
    return {
        Clipboard = l_Status_0.Clipboard,
        ClipboardType = l_Status_0.ClipboardType,
        SelectedKeyframes = l_Status_0.SelectedKeyframes,
        Playhead = l_Status_0.Playhead,
        AnimationData = v178.AnimationData,
        Tracks = l_Status_0.Tracks,
        Path = l_Status_0.RightClickContextInfo.Path,
        TrackName = l_Status_0.RightClickContextInfo.TrackName,
        TrackType = l_Status_0.RightClickContextInfo.TrackType,
        RotationType = l_Status_0.RightClickContextInfo.RotationType,
        InstanceName = l_Status_0.RightClickContextInfo.InstanceName,
        Tick = l_Status_0.RightClickContextInfo.Tick,
        SummaryKeyframe = l_Status_0.RightClickContextInfo.SummaryKeyframe,
        OnKeyframe = l_Status_0.RightClickContextInfo.OnKeyframe,
        Tool = l_Status_0.Tool,
        SelectedTracks = l_Status_0.SelectedTracks,
        DefaultRotationType = l_Status_0.DefaultRotationType,
        ReadOnly = l_Status_0.ReadOnly
    };
end, function(v181)
    return {
        SelectAllKeyframes = function()
            v181(v22());
            v181(v9({}));
        end,
        DeselectAllKeyframes = function()
            v181(v10({}));
            v181(v9({}));
        end,
        DeleteSelectedKeyframes = function(v182)
            v181(v16());
            v181(v18(v182));
            v181(v8({}));
        end,
        ResetSelectedKeyframes = function()
            v181(v16());
            v181(v21());
            v181(v8({}));
        end,
        CopySelectedKeyframes = function()
            v181(v17());
            v181(v8({}));
        end,
        PasteKeyframes = function(v183, v184)
            v181(v16());
            v181(v19(v183, v184));
            v181(v8({}));
        end,
        SplitTrack = function(v185, v186, v187, v188, v189, v190)
            v181(v16());
            v181(v23(v185, v186, v187, v188, v189, v190));
            v181(v8({}));
        end,
        AddKeyframe = function(v191, v192, v193, v194, v195, v196, v197)
            v181(v16());
            v181(v15(v191, v192, v193, v194, v195, v196, v197));
            v181(v8({}));
        end,
        OnEditEvents = function(v198)
            v181(v11(true));
            v181(v7(v198));
        end,
        Undo = function(v199)
            v181(v26(v199));
        end,
        Redo = function()
            v181(v20());
        end,
        TogglePlay = function(v200)
            v181(v25(v200));
        end,
        SetTool = function(v201)
            v181(v12(v201));
        end,
        ToggleBoneVisibility = function()
            v181(v24());
        end
    };
end)((l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    PluginActions = l_ContextServices_0.PluginActions,
    Analytics = l_ContextServices_0.Analytics,
    Signals = v14
})(v33)));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Packages.Roact);
local v2 = require(l_script_FirstAncestor_0.Src.Util.TrackUtils);
local v3 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local v4 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_Button_0 = v4.UI.Button;
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_KeyboardListener_0 = v4.UI.KeyboardListener;
local v9 = require(l_script_FirstAncestor_0.Src.Util.Input);
local v10 = require(l_script_FirstAncestor_0.Src.Components.Timeline.Timeline);
local v11 = require(l_script_FirstAncestor_0.Src.Components.Tooltip);
local v12 = require(l_script_FirstAncestor_0.Src.Components.TeachingCallout);
local v13 = require(l_script_FirstAncestor_0.LuaFlags.GetFFlagTimelineUnitSeconds);
local v14 = v1.PureComponent:extend("TimelineContainer");
local function _(v15)
    local v16 = -1;
    while v15 > 1 do
        v16 = v16 + 1;
        v15 = v15 / 10;
    end;
    return v16;
end;
local function _(v18, v19, v20)
    local v21 = (v3.TICK_SPACING * (v20 - v19)) / v18;
    local v22 = 10;
    local l_v21_0 = v21;
    local v24 = -1;
    while l_v21_0 > 1 do
        v24 = v24 + 1;
        l_v21_0 = l_v21_0 / 10;
    end;
    local v25 = math.pow(v22, v24);
    v22 = 3 * v25;
    if v21 < v22 then
        return v25, (math.max(v25 / v3.NUM_TICKS, 1));
    else
        return v22, (math.max(v22 / v3.NUM_TICKS, 1));
    end;
end;
v14.init = function(v27)
    v27.moveToTick = function(v28)
        local l_props_0 = v27.props;
        if l_props_0.SnapMode == v3.SNAP_MODES.Keyframes then
            l_props_0.SnapToNearestKeyframe(v28, l_props_0.ParentSize.X - l_props_0.TrackPadding);
            return ;
        elseif l_props_0.SnapMode == v3.SNAP_MODES.Frames then
            l_props_0.SnapToNearestFrame(v28);
            return ;
        else
            l_props_0.StepAnimation(v28);
            return ;
        end;
    end;
    v27.onScrubberMoved = function(v30)
        if v27.props.StepAnimation then
            v27.moveToTick((math.clamp(v2.getKeyframeFromPosition(v30.Position, v27.props.StartTick, v27.props.EndTick, v27.props.ParentPosition.X + v27.props.TrackPadding / 2, v27.props.ParentSize.X - v27.props.TrackPadding), v27.props.StartTick, v27.props.EndTick)));
        end;
    end;
    v27.onTimelineClicked = function(_, v32)
        if v32.UserInputType == Enum.UserInputType.MouseButton1 then
            v27.onScrubberMoved(v32);
        end;
    end;
    v27.moveScrubberForward = function()
        v27.moveToTick((math.clamp(v27.props.Playhead + 5, v27.props.StartTick, v27.props.EndTick)));
    end;
    v27.moveScrubberBackward = function()
        v27.moveToTick((math.clamp(v27.props.Playhead - 5, v27.props.StartTick, v27.props.EndTick)));
    end;
end;
v14.render = function(v33)
    local l_props_1 = v33.props;
    local l_Stylizer_0 = l_props_1.Stylizer;
    local l_StartTick_0 = l_props_1.StartTick;
    local l_EndTick_0 = l_props_1.EndTick;
    local l_LastTick_0 = l_props_1.LastTick;
    local l_FrameRate_0 = l_props_1.FrameRate;
    local v40 = if not v13() then l_props_1.ShowAsSeconds else nil;
    local l_TimelineUnit_0 = l_props_1.TimelineUnit;
    local l_LayoutOrder_0 = l_props_1.LayoutOrder;
    local l_ParentSize_0 = l_props_1.ParentSize;
    local l_AnimationData_0 = l_props_1.AnimationData;
    local v45 = l_props_1.EditorMode == v3.EDITOR_MODE.CurveCanvas;
    l_StartTick_0 = (l_StartTick_0 * l_FrameRate_0) / v3.TICK_FREQUENCY;
    l_EndTick_0 = (l_EndTick_0 * l_FrameRate_0) / v3.TICK_FREQUENCY;
    l_LastTick_0 = not not l_LastTick_0 and (l_LastTick_0 * l_FrameRate_0) / v3.TICK_FREQUENCY or nil;
    local v46 = (v3.TICK_SPACING * (l_EndTick_0 - l_StartTick_0)) / (l_ParentSize_0.X - v33.props.TrackPadding);
    local v47 = 10;
    local l_v46_0 = v46;
    local v49 = -1;
    while l_v46_0 > 1 do
        v49 = v49 + 1;
        l_v46_0 = l_v46_0 / 10;
    end;
    local v50 = math.pow(v47, v49);
    v47 = 3 * v50;
    local v51, v52;
    if v46 < v47 then
        v51 = v50;
        v52 = math.max(v50 / v3.NUM_TICKS, 1);
    else
        v51 = v47;
        v52 = math.max(v47 / v3.NUM_TICKS, 1);
    end;
    return v1.createElement("Frame", {
        Size = UDim2.new(1, 0, 0, v3.TIMELINE_HEIGHT + 1),
        LayoutOrder = l_LayoutOrder_0,
        BorderSizePixel = 0,
        BackgroundColor3 = l_Stylizer_0.timelineTheme.backgroundColor,
        BorderColor3 = l_Stylizer_0.borderColor,
        ZIndex = l_props_1.ZIndex
    }, {
        Timeline = v1.createElement(v10, {
            StartTick = l_StartTick_0,
            EndTick = l_EndTick_0,
            LastTick = l_LastTick_0,
            MajorInterval = v51,
            MinorInterval = v52,
            Position = UDim2.new(0, v33.props.TrackPadding / 2, 0, 0),
            Height = v3.TIMELINE_HEIGHT,
            Width = l_ParentSize_0.X - v33.props.TrackPadding,
            TickHeightScale = 0.7,
            SmallTickHeightScale = 0.3,
            ShowAsTime = if not v13() then v40 else nil,
            TimelineUnit = l_TimelineUnit_0,
            OnInputBegan = v33.onTimelineClicked,
            OnDragMoved = v33.onScrubberMoved,
            AnimationData = l_AnimationData_0,
            FrameRate = l_FrameRate_0,
            ZIndex = 2
        }),
        ToggleEditorButton = v1.createElement(l_Button_0, {
            ZIndex = 1,
            AnchorPoint = Vector2.new(0.5, 0.5),
            Size = UDim2.fromOffset(v3.TOGGLE_EDITOR_BUTTON_WIDTH, v3.TOGGLE_EDITOR_BUTTON_HEIGHT),
            Position = UDim2.fromOffset(v33.props.TrackPadding / 4, v3.TIMELINE_HEIGHT / 2),
            Style = l_Stylizer_0.button.MediaControl,
            OnClick = l_props_1.OnToggleEditorClicked
        }, {
            Image = v1.createElement("ImageLabel", {
                BackgroundTransparency = 1,
                Size = UDim2.new(0, v3.TOGGLE_EDITOR_BUTTON_WIDTH, 0, v3.TOGGLE_EDITOR_BUTTON_HEIGHT),
                Position = UDim2.new(0.5, 0, 0.5, 0),
                AnchorPoint = Vector2.new(0.5, 0.5),
                Image = if not v45 then l_Stylizer_0.curveTheme.curveEditorButton else l_Stylizer_0.curveTheme.dopesheetButton,
                ImageColor3 = l_Stylizer_0.playbackTheme.iconColor
            }),
            Tooltip = v1.createElement(v11, {
                TextKey = not v45 and "GoToCurveEditor" or "GoToDopesheetEditor"
            }),
            TeachingCallout = v1.createElement(v12, {
                Offset = Vector2.new(0, 6),
                DefinitionId = "CurveEditorCallout",
                LocationId = "ToggleEditorButton"
            })
        }),
        KeyboardListener = v1.createElement(l_KeyboardListener_0, {
            OnKeyPressed = function(v53)
                if v9.isLeftBracket(v53.KeyCode) then
                    v33.moveScrubberBackward();
                end;
                if v9.isRightBracket(v53.KeyCode) then
                    v33.moveScrubberForward();
                end;
            end
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v14));


local v0 = Vector2.new(340, 10000);
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(l_script_FirstAncestor_0.Src.Util.Constants);
local v5 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_Button_0 = v5.UI.Button;
local l_ContextServices_0 = v5.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v9 = require(l_script_FirstAncestor_0.Src.Components.Toast.BaseToast);
local v10 = v3.PureComponent:extend("ActionToast");
v10.renderButton = function(v11, v12, v13, _)
    local l_props_0 = v11.props;
    return v3.createElement(l_Button_0, {
        Size = UDim2.new(0, l_props_0.ButtonWidth or v4.PROMPT_BUTTON_SIZE.X, 0, v4.PROMPT_BUTTON_SIZE.Y),
        LayoutOrder = v12,
        Style = v13.Style,
        Text = v13.Text,
        OnClick = function()
            l_props_0.OnButtonClicked(v13.Key);
        end
    });
end;
v10.render = function(v16)
    local l_props_1 = v16.props;
    local l_Stylizer_0 = l_props_1.Stylizer;
    local l_toastTheme_0 = l_Stylizer_0.toastTheme;
    local l_PROMPT_BUTTON_PADDING_0 = v4.PROMPT_BUTTON_PADDING;
    local l_Y_0 = v4.PROMPT_BUTTON_SIZE.Y;
    local l_Text_0 = l_props_1.Text;
    local l_Buttons_0 = l_props_1.Buttons;
    local v24 = (l_TextService_0:GetTextSize(l_Text_0, l_toastTheme_0.textSize, l_Stylizer_0.font, v0).Y + v4.PROMPT_VERTICAL_PADDING * 3) + l_Y_0;
    local v25 = {
        Layout = v3.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            FillDirection = Enum.FillDirection.Horizontal,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            Padding = UDim.new(0, l_PROMPT_BUTTON_PADDING_0)
        })
    };
    for v26, v27 in ipairs(l_Buttons_0) do
        table.insert(v25, v16:renderButton(v26, v27, l_toastTheme_0.textSize));
    end;
    return v3.createElement(v9, {
        AnchorPoint = Vector2.new(1, 1),
        Size = UDim2.new(0, 380, 0, v24)
    }, {
        Padding = v3.createElement("UIPadding", {
            PaddingTop = UDim.new(0, v4.PROMPT_VERTICAL_PADDING),
            PaddingBottom = UDim.new(0, v4.PROMPT_VERTICAL_PADDING),
            PaddingLeft = UDim.new(0, v4.PROMPT_HORIZONTAL_PADDING),
            PaddingRight = UDim.new(0, v4.PROMPT_HORIZONTAL_PADDING)
        }),
        Text = v3.createElement("TextLabel", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundTransparency = 1,
            Text = l_Text_0,
            TextWrapped = true,
            TextXAlignment = Enum.TextXAlignment.Left,
            TextYAlignment = Enum.TextYAlignment.Top,
            TextSize = l_toastTheme_0.textSize,
            TextColor3 = l_toastTheme_0.textColor,
            Font = l_Stylizer_0.font
        }),
        Buttons = v3.createElement("Frame", {
            Size = UDim2.new(1, 0, 0, l_Y_0),
            AnchorPoint = Vector2.new(0.5, 1),
            Position = UDim2.new(0.5, 0, 1, 0),
            BackgroundTransparency = 1
        }, v25)
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v10));


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.Framework);
local l_ShowOnTop_0 = v2.UI.ShowOnTop;
local l_DropShadow_0 = v2.UI.DropShadow;
local l_ContextServices_0 = v2.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v7 = v1.PureComponent:extend("BaseToast");
v7.render = function(v8)
    local l_props_0 = v8.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_toastTheme_0 = l_Stylizer_0.toastTheme;
    local l_AnchorPoint_0 = l_props_0.AnchorPoint;
    local l_Size_0 = l_props_0.Size;
    local v14 = l_props_0.Transparency or 0;
    local v15 = nil;
    v15 = l_AnchorPoint_0.X == 0 and 28 or (l_AnchorPoint_0.X == 1 and -28 or 0);
    local _ = nil;
    return v1.createElement(l_ShowOnTop_0, {
        Priority = -1
    }, {
        Container = v1.createElement("Frame", {
            AnchorPoint = l_AnchorPoint_0,
            Size = l_Size_0,
            Position = UDim2.new(l_AnchorPoint_0.X, v15, l_AnchorPoint_0.Y, l_AnchorPoint_0.Y == 0 and 28 or (l_AnchorPoint_0.Y == 1 and -28 or 0)),
            BackgroundTransparency = 1
        }, {
            Background = v1.createElement("Frame", {
                Size = UDim2.new(1, 0, 1, 0),
                BackgroundColor3 = l_Stylizer_0.backgroundColor,
                BackgroundTransparency = v14,
                BorderSizePixel = 0,
                ZIndex = 2
            }, {
                Shadow = v1.createElement(l_DropShadow_0, {
                    Transparency = l_toastTheme_0.shadowTransparency + (1 - l_toastTheme_0.shadowTransparency) * v14,
                    Color = l_toastTheme_0.shadowColor,
                    Radius = l_toastTheme_0.shadowSize,
                    Offset = Vector2.new()
                }, l_props_0[v1.Children])
            })
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v7));


local l_RunService_0 = game:GetService("RunService");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v2 = require(l_script_FirstAncestor_0.Packages.Roact);
local v3 = require(l_script_FirstAncestor_0.Src.Util.StringUtils);
local l_ContextServices_0 = require(l_script_FirstAncestor_0.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v6 = require(l_script_FirstAncestor_0.Src.Components.Toast.BaseToast);
local v7 = v2.PureComponent:extend("NoticeToast");
v7.init = function(v8, v9)
    v8.state = {
        showingToast = true,
        fadeAmount = 0
    };
    v8.startTimer = function()
        local v10 = v9.ShowTime or 3;
        local v11 = v9.FadeTime or 0.5;
        v8.hideTime = tick() + v10;
        v8.fadeTime = v8.hideTime - v11;
        v8.fadeMultiplier = v11 == 0 and 1 or 1 / v11;
        v8:setState({
            fadeAmount = 0
        });
    end;
    v8.connectTimer = function()
        v8.timerConnection = l_RunService_0.Heartbeat:Connect(function()
            if not (not v8 or not v8.state.showingToast) then
                if v8.hideTime <= tick() then
                    v8.disconnectTimer();
                    v8.onClose();
                    v8:setState({
                        showingToast = false
                    });
                    return ;
                elseif v8.fadeTime <= tick() then
                    v8:setState({
                        fadeAmount = (tick() - v8.fadeTime) * v8.fadeMultiplier
                    });
                end;
            end;
        end);
    end;
    v8.disconnectTimer = function()
        if v8.timerConnection then
            v8.timerConnection:Disconnect();
        end;
    end;
    v8.onClose = function()
        if v8.props.OnClose then
            v8.props.OnClose();
        end;
    end;
end;
v7.didUpdate = function(v12, v13)
    if v12.props.Text ~= v13.Text then
        v12.startTimer();
    end;
end;
v7.didMount = function(v14)
    v14.startTimer();
    v14.connectTimer();
end;
v7.willUnmount = function(v15)
    v15.disconnectTimer();
end;
v7.render = function(v16)
    local l_props_0 = v16.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_toastTheme_0 = l_Stylizer_0.toastTheme;
    local l_state_0 = v16.state;
    local l_Text_0 = l_props_0.Text;
    local l_showingToast_0 = l_state_0.showingToast;
    local l_fadeAmount_0 = l_state_0.fadeAmount;
    return l_showingToast_0 and v2.createElement(v6, {
        AnchorPoint = Vector2.new(0.5, 1),
        Size = UDim2.new(0, v3.getTextWidth(l_Text_0, l_toastTheme_0.textSize, l_Stylizer_0.font) + 40, 0, 35),
        Transparency = l_fadeAmount_0
    }, {
        Text = v2.createElement("TextLabel", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundTransparency = 1,
            Text = l_Text_0,
            TextSize = l_toastTheme_0.textSize,
            TextColor3 = l_toastTheme_0.textColor,
            TextTransparency = l_fadeAmount_0,
            Font = l_Stylizer_0.font
        }, {
            Padding = v2.createElement("UIPadding", {
                PaddingLeft = UDim.new(0, 20),
                PaddingRight = UDim.new(0, 20)
            })
        })
    });
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.Roact);
local v2 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_ContextServices_0 = v2.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local _ = l_ContextServices_0.Localization;
local l_Tooltip_0 = v2.UI.Tooltip;
local v7 = v1.PureComponent:extend("Tooltip");
v7.render = function(v8)
    local l_props_0 = v8.props;
    local l_Text_0 = l_props_0.Text;
    local l_TextKey_0 = l_props_0.TextKey;
    local l_ShowDelay_0 = l_props_0.ShowDelay;
    local l_Priority_0 = l_props_0.Priority;
    local l_Localization_1 = v8.props.Localization;
    assert(l_Text_0 or l_TextKey_0, "Expected either a Text or TextKey prop.");
    local v15 = nil;
    if not l_Text_0 then
        if l_TextKey_0 then
            v15 = l_Localization_1:getText("Tooltip", l_TextKey_0);
        end;
    else
        v15 = l_Text_0;
    end;
    return v1.createElement(l_Tooltip_0, {
        Text = v15,
        ShowDelay = l_ShowDelay_0,
        Enabled = true,
        Priority = l_Priority_0 or -100
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization
})(v7));


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);
local v3 = require(l_script_FirstAncestor_0.Packages.RoactRodux);
local l_ContextServices_0 = require(l_script_FirstAncestor_0.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v6 = require(l_script_FirstAncestor_0.Src.Components.ContextMenu);
local v7 = require(l_script_FirstAncestor_0.Src.Thunks.AddKeyframe);
local v8 = require(l_script_FirstAncestor_0.Src.Thunks.History.AddWaypoint);
local v9 = require(l_script_FirstAncestor_0.Src.Thunks.ClearTrack);
local v10 = require(l_script_FirstAncestor_0.Src.Thunks.ConvertTrack);
local v11 = require(l_script_FirstAncestor_0.Src.Thunks.DeleteTrack);
local v12 = require(l_script_FirstAncestor_0.Src.Thunks.SetTrackEulerAnglesOrder);
local v13 = require(l_script_FirstAncestor_0.Src.Actions.SetRightClickContextInfo);
local v14 = require(l_script_FirstAncestor_0.Src.Thunks.SplitTrack);
local v15 = require(l_script_FirstAncestor_0.Src.Util.AnimationData);
local v16 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local v17 = require(l_script_FirstAncestor_0.Src.Util.isEmpty);
local v18 = require(l_script_FirstAncestor_0.Src.Util.KeyframeUtils);
local _ = require(l_script_FirstAncestor_0.Src.Util.PathUtils);
local v20 = require(l_script_FirstAncestor_0.Src.Util.TrackUtils);
local _ = {
    Enum.RotationOrder.XYZ,
    Enum.RotationOrder.XZY,
    Enum.RotationOrder.YXZ,
    Enum.RotationOrder.YZX,
    Enum.RotationOrder.ZXY,
    Enum.RotationOrder.ZYX
};
local v22 = v1.PureComponent:extend("TrackActions");
v22.init = function(v23)
    v23.hasInternalPermission = false;
end;
v22.makeEulerAnglesOrderSubMenu = function(v24)
    local l_props_0 = v24.props;
    local l_Localization_0 = v24.props.Localization;
    local l_AnimationData_0 = v24.props.AnimationData;
    local l_InstanceName_0 = v24.props.InstanceName;
    local l_Path_0 = v24.props.Path;
    local v30 = v20.getEulerAnglesOrder((v15.getTrack(l_AnimationData_0, l_InstanceName_0, l_Path_0))) or l_props_0.DefaultEulerAnglesOrder;
    local function v32(v31)
        l_props_0.SetTrackEulerAnglesOrder(l_InstanceName_0, l_Path_0, v31.Data);
    end;
    local v33 = {
        Text = l_Localization_0:getText("ContextMenu", "EulerAnglesOrder")
    };
    for _, v35 in v16.EULER_ANGLES_ORDER, nil, nil do
        table.insert(v33, {
            Text = v35.Name,
            Data = v35,
            Checked = v30 == v35.Value,
            OnItemClicked = v32
        });
    end;
    return v33;
end;
v22.makeMenuActions = function(v36)
    local l_props_1 = v36.props;
    local l_PluginActions_0 = l_props_1.PluginActions;
    local l_IsChannelAnimation_0 = l_props_1.IsChannelAnimation;
    local l_Path_1 = l_props_1.Path;
    local l_TrackType_0 = l_props_1.TrackType;
    local l_AnimationData_1 = l_props_1.AnimationData;
    local l_InstanceName_1 = l_props_1.InstanceName;
    local l_TrackName_0 = l_props_1.TrackName;
    local v45 = v15.getTrack(l_AnimationData_1, l_InstanceName_1, l_Path_1);
    local v46 = false;
    if v45 ~= nil then
        v46 = true;
        if v45.Type ~= v16.TRACK_TYPES.Quaternion then
            v46 = false;
            if v45.Type == v16.TRACK_TYPES.CFrame then
                v46 = v20.getRotationType(v45) == v16.TRACK_TYPES.Quaternion;
            end;
        end;
    end;
    local v47 = not l_IsChannelAnimation_0;
    if not v47 then
        v47 = false;
        if l_Path_1 ~= nil then
            v47 = #l_Path_1 <= 1;
        end;
    end;
    local v48 = {
        l_PluginActions_0:get("AddKeyframe"),
        l_PluginActions_0:get(not v47 and "ClearTrack" or "DeleteTrack")
    };
    local v49 = false;
    if not (not l_IsChannelAnimation_0 or not v46) then
        table.insert(v48, v16.MENU_SEPARATOR);
        table.insert(v48, l_PluginActions_0:get("ConvertToEulerAngles"));
        v49 = true;
    end;
    if l_TrackType_0 == v16.TRACK_TYPES.EulerAngles then
        if not v49 then
            table.insert(v48, v16.MENU_SEPARATOR);
        end;
        table.insert(v48, v36:makeEulerAnglesOrderSubMenu());
    end;
    if v36.hasInternalPermission then
        table.insert(v48, {
            Text = "[INTERNAL] Dump track data",
            OnItemClicked = function()
                local v50 = l_AnimationData_1.Instances[l_InstanceName_1];
                l_TrackName_0 = l_TrackName_0 or l_Path_1[1];
                require(l_script_FirstAncestor_0.Src.Util.Debug.dumpTable)(v50.Tracks[l_TrackName_0]);
            end
        });
        table.insert(v48, {
            Text = "[INTERNAL] Dump track as CSV",
            OnItemClicked = function()
                local v51 = require(l_script_FirstAncestor_0.Src.Util.Debug.dumpTrack);
                local v52 = l_AnimationData_1.Instances[l_InstanceName_1];
                l_TrackName_0 = l_TrackName_0 or l_Path_1[1];
                local v53 = v52.Tracks[l_TrackName_0];
                v51(v53, l_TrackName_0, v20.getEulerAnglesOrder(v53) or l_props_1.DefaultEulerAnglesOrder);
            end
        });
    end;
    return v48;
end;
v22.addAction = function(v54, v55, v56)
    if v55 then
        v55.Enabled = false;
        table.insert(v54.Actions, v55);
        table.insert(v54.Connections, v55.Triggered:Connect(v56));
    end;
end;
v22.didMount = function(v57)
    local l_PluginActions_1 = v57.props.PluginActions;
    v57.Actions = {};
    v57.Connections = {};
    local l_status_0, l_result_0 = pcall(function()
        return game:GetService("StudioService"):HasInternalPermission();
    end);
    if not (not l_status_0 or not l_result_0) then
        v57.hasInternalPermission = true;
    end;
    v57:addAction(l_PluginActions_1:get("DeleteTrack"), function()
        local l_props_2 = v57.props;
        l_props_2.DeleteTrack(l_props_2.Path[1], l_props_2.Analytics);
    end);
    v57:addAction(l_PluginActions_1:get("ClearTrack"), function()
        local l_props_3 = v57.props;
        l_props_3.ClearTrack(l_props_3.InstanceName, l_props_3.Path, l_props_3.Analytics);
    end);
    v57:addAction(l_PluginActions_1:get("AddKeyframe"), function()
        local l_props_4 = v57.props;
        local l_Playhead_0 = l_props_4.Playhead;
        local l_TrackType_1 = l_props_4.TrackType;
        local l_RotationType_0 = l_props_4.RotationType;
        local l_InstanceName_2 = l_props_4.InstanceName;
        local l_AnimationData_2 = l_props_4.AnimationData;
        local l_IsChannelAnimation_1 = l_props_4.IsChannelAnimation;
        local l_Path_2 = l_props_4.Path;
        local _ = nil;
        if not (not l_InstanceName_2 or not l_Path_2) then
            if not l_IsChannelAnimation_1 then
                local v72 = v15.getTrack(l_AnimationData_2, l_InstanceName_2, l_Path_2);
                l_props_4.AddKeyframe(l_InstanceName_2, l_Path_2, l_TrackType_1, nil, l_Playhead_0, {
                    Value = if not not v72 and v72.Keyframes then v18.getValue(v72, l_Playhead_0) else v18.getDefaultValue(l_TrackType_1),
                    EasingStyle = Enum.PoseEasingStyle.Linear,
                    EasingDirection = Enum.PoseEasingDirection.In
                }, l_props_4.Analytics);
            else
                v20.traverseComponents(l_TrackType_1, function(v73, v74)
                    l_props_4.SplitTrack(l_InstanceName_2, v2.List.join(l_Path_2, v74), v73, l_RotationType_0, l_Playhead_0, l_props_4.Analytics);
                end, l_RotationType_0);
                return ;
            end;
        end;
    end);
    v57:addAction(l_PluginActions_1:get("ConvertToEulerAngles"), function()
        local l_props_5 = v57.props;
        local l_Path_3 = l_props_5.Path;
        local l_InstanceName_3 = l_props_5.InstanceName;
        local l_TrackType_2 = l_props_5.TrackType;
        local l_AnimationData_3 = l_props_5.AnimationData;
        if l_TrackType_2 == v16.TRACK_TYPES.CFrame then
            table.insert(l_Path_3, v16.PROPERTY_KEYS.Rotation);
            local v80 = v15.getTrack(l_AnimationData_3, l_InstanceName_3, l_Path_3);
            if not v80 or v80.Type ~= v16.TRACK_TYPES.Quaternion then
                return ;
            end;
        end;
        l_props_5.ConvertTrack(l_InstanceName_3, l_Path_3, v16.TRACK_TYPES.EulerAngles, l_props_5.Analytics);
    end);
end;
v22.render = function(v81)
    local l_props_6 = v81.props;
    local l_ShowMenu_0 = l_props_6.ShowMenu;
    local l_Path_4 = l_props_6.Path;
    local l_InstanceName_4 = l_props_6.InstanceName;
    local l_AnimationData_4 = l_props_6.AnimationData;
    local l_Playhead_1 = l_props_6.Playhead;
    local l_ReadOnly_0 = l_props_6.ReadOnly;
    local l_Actions_0 = v81.Actions;
    local l_PluginActions_2 = v81.props.PluginActions;
    local l_IsChannelAnimation_2 = v81.props.IsChannelAnimation;
    if not v17(l_PluginActions_2) and l_Actions_0 ~= nil then
        for _, v93 in ipairs(l_Actions_0) do
            v93.Enabled = false;
        end;
        if not (not l_Path_4 or not l_InstanceName_4) then
            local v94 = v15.getTrack(l_AnimationData_4, l_InstanceName_4, l_Path_4);
            local v95 = nil;
            if l_IsChannelAnimation_2 then
                if v94 then
                    local v96 = v20.getComponentsInfo(v94, l_Playhead_1);
                    v95 = not v96[l_Playhead_1] or not v96[l_Playhead_1].Complete;
                else
                    v95 = true;
                end;
            else
                v95 = not ((v94 and v94.Data) and v94.Data[l_Playhead_1]);
            end;
            l_PluginActions_2:get("AddKeyframe").Enabled = not l_ReadOnly_0 and v95;
        end;
        l_PluginActions_2:get("DeleteTrack").Enabled = not l_ReadOnly_0;
        l_PluginActions_2:get("ClearTrack").Enabled = not l_ReadOnly_0;
        if l_IsChannelAnimation_2 then
            l_PluginActions_2:get("ConvertToEulerAngles").Enabled = not l_ReadOnly_0;
        end;
    end;
    return not not l_ShowMenu_0 and v1.createElement(v6, {
        Actions = v81:makeMenuActions(),
        OnMenuOpened = l_props_6.OnMenuOpened
    }) or nil;
end;
v22.willUnmount = function(v97)
    if v97.Connections then
        for _, v99 in ipairs(v97.Connections) do
            v99:Disconnect();
        end;
        v97.Connections = {};
    end;
    if v97.Actions then
        for _, v101 in ipairs(v97.Actions) do
            v101.Enabled = false;
        end;
    end;
end;
return v3.connect(function(v102)
    local l_Status_0 = v102.Status;
    return {
        AnimationData = v102.AnimationData,
        DefaultEulerAnglesOrder = l_Status_0.DefaultEulerAnglesOrder,
        InstanceName = l_Status_0.RightClickContextInfo.InstanceName,
        Path = l_Status_0.RightClickContextInfo.Path,
        Playhead = l_Status_0.Playhead,
        ReadOnly = l_Status_0.ReadOnly,
        RotationType = l_Status_0.RightClickContextInfo.RotationType,
        TrackName = l_Status_0.RightClickContextInfo.TrackName,
        TrackType = l_Status_0.RightClickContextInfo.TrackType
    };
end, function(v104)
    return {
        AddKeyframe = function(v105, v106, v107, v108, v109, v110, v111)
            v104(v8());
            v104(v7(v105, v106, v107, v108, v109, v110, v111));
            v104(v13({}));
        end,
        ClearTrack = function(v112, v113, v114)
            v104(v8());
            v104(v9(v112, v113, v114));
            v104(v13({}));
        end,
        ConvertTrack = function(v115, v116, v117, v118)
            v104(v8());
            v104(v10(v115, v116, v117, v118));
            v104(v13({}));
        end,
        DeleteTrack = function(v119, v120)
            v104(v8());
            v104(v11(v119, v120));
            v104(v13({}));
        end,
        SetTrackEulerAnglesOrder = function(v121, v122, v123)
            v104(v8());
            v104(v12(v121, v122, v123));
            v104(v13({}));
        end,
        SplitTrack = function(v124, v125, v126, v127, v128, v129)
            v104(v8());
            v104(v14(v124, v125, v126, v127, v128, v129));
            v104(v13({}));
        end
    };
end)((l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    PluginActions = l_ContextServices_0.PluginActions,
    Analytics = l_ContextServices_0.Analytics
})(v22)));


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.RoactRodux);
local v3 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_KeyboardListener_0 = v3.UI.KeyboardListener;
local l_Separator_0 = v3.UI.Separator;
local v8 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local v9 = require(l_script_FirstAncestor_0.Src.Util.TrackUtils);
local v10 = require(l_script_FirstAncestor_0.Src.Util.Input);
local v11 = require(l_script_FirstAncestor_0.Src.Components.DopeSheetController);
local v12 = require(l_script_FirstAncestor_0.Src.Components.Curves.CurveEditorController);
local v13 = require(l_script_FirstAncestor_0.Src.Components.TimelineContainer);
local v14 = require(l_script_FirstAncestor_0.Src.Components.ZoomBar);
local v15 = require(l_script_FirstAncestor_0.Src.Components.Timeline.Scrubber);
local v16 = require(l_script_FirstAncestor_0.Src.Components.Toast.NoticeToast);
local v17 = require(l_script_FirstAncestor_0.Src.Actions.SetEditorMode);
local v18 = require(l_script_FirstAncestor_0.Src.Actions.SetHorizontalScrollZoom);
local v19 = require(l_script_FirstAncestor_0.Src.Actions.SetNotification);
local v20 = require(l_script_FirstAncestor_0.Src.Actions.SetVerticalScrollZoom);
local v21 = require(l_script_FirstAncestor_0.Src.Thunks.SnapToNearestFrame);
local v22 = require(l_script_FirstAncestor_0.Src.Thunks.SnapToNearestKeyframe);
local v23 = require(l_script_FirstAncestor_0.Src.Thunks.Playback.StepAnimation);
local v24 = require(l_script_FirstAncestor_0.Src.Thunks.SwitchEditorMode);
local v25 = require(l_script_FirstAncestor_0.LuaFlags.GetFFlagTimelineUnitSeconds);
local v26 = v1.PureComponent:extend("TrackEditor");
v26.init = function(v27)
    v27.ctrlHeld = false;
    v27.dragging = false;
    v27.updateSize = function(v28)
        v27:setState({
            AbsoluteSize = v28.AbsoluteSize,
            AbsolutePosition = v28.AbsolutePosition
        });
    end;
    v27.inputChanged = function(_, v30)
        local l_props_0 = v27.props;
        local l_HorizontalZoom_0 = l_props_0.HorizontalZoom;
        local l_HorizontalScroll_0 = l_props_0.HorizontalScroll;
        local l_X_0 = v27.state.AbsoluteSize.X;
        local l_X_1 = v27.state.AbsolutePosition.X;
        if v30.UserInputType == Enum.UserInputType.MouseWheel then
            local v36 = math.clamp(l_HorizontalScroll_0 + ((v30.Position.X - l_X_1) / l_X_0 - l_HorizontalScroll_0) * (1 - l_HorizontalZoom_0), 0, 1);
            if not v27.ctrlHeld then
                l_props_0.OnScroll(v30.Position.Z);
                return ;
            elseif v30.Position.Z > 0 then
                l_props_0.SetHorizontalScrollZoom(v36, (math.clamp(l_HorizontalZoom_0 + v8.ZOOM_INCREMENT, 0, 1)));
                return ;
            elseif v30.Position.Z < 0 then
                l_props_0.SetHorizontalScrollZoom(v36, (math.clamp(l_HorizontalZoom_0 - v8.ZOOM_INCREMENT, 0, 1)));
                return ;
            end;
        elseif not (not (v30.UserInputType == Enum.UserInputType.MouseMovement) or not v27.dragging) then
            l_props_0.SetHorizontalScrollZoom(math.clamp(l_HorizontalScroll_0 + (-v30.Delta.X / l_X_0) * (1 / math.max(0.01, l_HorizontalZoom_0)), 0, 1), l_HorizontalZoom_0);
        end;
    end;
    v27.startDragging = function()
        v27.dragging = true;
    end;
    v27.stopDragging = function()
        v27.dragging = false;
    end;
    v27.getPlayheadPositionX = function()
        local l_props_1 = v27.props;
        return v27.getTrackPadding() * 0.5 + v9.getScaledKeyframePosition(l_props_1.Playhead, l_props_1.StartTick, l_props_1.EndTick, (v27.state.AbsoluteSize or Vector2.new()).X - v27.getTrackPadding());
    end;
    v27.stepAnimation = function(v38)
        local l_props_2 = v27.props;
        if l_props_2.PlayState == v8.PLAY_STATE.Pause then
            l_props_2.StepAnimation(v38);
        end;
    end;
    v27.inputBegan = function(_, v41)
        if v27.props.Mouse and v41.UserInputType == Enum.UserInputType.MouseButton3 then
            v27.props.Mouse:__pushCursor("ClosedHand");
            v27.startDragging();
        end;
    end;
    v27.inputEnded = function(_, v43)
        if not ((not v27.props.Mouse or not v27.dragging) or v43.UserInputType ~= Enum.UserInputType.MouseMovement) or v43.UserInputType == Enum.UserInputType.MouseButton3 then
            v27.props.Mouse:__popCursor();
            v27.stopDragging();
        end;
    end;
    v27.getTrackPadding = function()
        local v44 = (math.max(v27.props.LastTick, v27.props.EndTick) * v27.props.FrameRate) / v8.TICK_FREQUENCY;
        if v44 < 100 then
            return v8.TRACK_PADDING_SMALL;
        elseif v44 < 1000 then
            return v8.TRACK_PADDING_MEDIUM;
        else
            return v8.TRACK_PADDING_LARGE;
        end;
    end;
    v27.toggleEditorClicked = function()
        if not v27.props.IsChannelAnimation then
            if not v27.props.ReadOnly then
                v27.props.OnPromoteRequested();
            end;
            return ;
        elseif v27.props.EditorMode == v8.EDITOR_MODE.CurveCanvas then
            v27.props.SwitchEditorMode(v8.EDITOR_MODE.DopeSheet, v27.props.Analytics);
            return ;
        else
            v27.props.SwitchEditorMode(v8.EDITOR_MODE.CurveCanvas, v27.props.Analytics);
            return ;
        end;
    end;
end;
v26.render = function(v45)
    local l_props_3 = v45.props;
    local l_state_0 = v45.state;
    local l_StartTick_0 = l_props_3.StartTick;
    local l_EndTick_0 = l_props_3.EndTick;
    local l_LastTick_0 = l_props_3.LastTick;
    local l_SnapMode_0 = l_props_3.SnapMode;
    local l_FrameRate_0 = l_props_3.FrameRate;
    local v53 = if not v25() then l_props_3.ShowAsSeconds else nil;
    local l_TimelineUnit_0 = l_props_3.TimelineUnit;
    local l_HorizontalScroll_1 = l_props_3.HorizontalScroll;
    local l_HorizontalZoom_1 = l_props_3.HorizontalZoom;
    local l_VerticalScroll_0 = l_props_3.VerticalScroll;
    local l_VerticalZoom_0 = l_props_3.VerticalZoom;
    local l_LayoutOrder_0 = l_props_3.LayoutOrder;
    local l_ZIndex_0 = l_props_3.ZIndex;
    local l_Size_0 = l_props_3.Size;
    local l_TopTrackIndex_0 = l_props_3.TopTrackIndex;
    local l_ShowEvents_0 = l_props_3.ShowEvents;
    local l_Playhead_0 = l_props_3.Playhead;
    local l_IsChannelAnimation_0 = l_props_3.IsChannelAnimation;
    local l_ColorsPosition_0 = l_props_3.ColorsPosition;
    local l_Localization_0 = l_props_3.Localization;
    local l_SnapToNearestKeyframe_0 = l_props_3.SnapToNearestKeyframe;
    local l_SnapToNearestFrame_0 = l_props_3.SnapToNearestFrame;
    local v70 = l_state_0.AbsoluteSize or Vector2.new();
    local v71 = l_state_0.AbsolutePosition or Vector2.new();
    local v72 = v45.getTrackPadding();
    local v73 = false;
    if l_StartTick_0 <= l_Playhead_0 then
        v73 = l_Playhead_0 <= l_EndTick_0;
    end;
    local v74 = l_props_3.EditorMode == v8.EDITOR_MODE.DopeSheet;
    local v75 = l_props_3.EditorMode == v8.EDITOR_MODE.CurveCanvas;
    return v1.createElement("Frame", {
        BackgroundTransparency = 1,
        ZIndex = l_ZIndex_0,
        LayoutOrder = l_LayoutOrder_0,
        Size = l_Size_0,
        [v1.Change.AbsoluteSize] = v45.updateSize,
        [v1.Event.InputBegan] = v45.inputBegan,
        [v1.Event.InputEnded] = v45.inputEnded,
        [v1.Event.MouseLeave] = v45.stopDragging
    }, {
        Layout = v1.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Vertical,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            SortOrder = Enum.SortOrder.LayoutOrder,
            VerticalAlignment = Enum.VerticalAlignment.Top
        }),
        TimelineContainer = v1.createElement(v13, {
            StartTick = l_StartTick_0,
            EndTick = l_EndTick_0,
            LastTick = l_LastTick_0,
            SnapMode = l_SnapMode_0,
            TrackPadding = v72,
            FrameRate = l_FrameRate_0,
            ShowAsSeconds = if not v25() then v53 else nil,
            TimelineUnit = l_TimelineUnit_0,
            LayoutOrder = 0,
            ParentSize = v70,
            ParentPosition = v71,
            StepAnimation = v45.stepAnimation,
            SnapToNearestKeyframe = l_SnapToNearestKeyframe_0,
            SnapToNearestFrame = l_SnapToNearestFrame_0,
            AnimationData = l_props_3.AnimationData,
            Playhead = l_Playhead_0,
            ZIndex = 2,
            EditorMode = l_props_3.EditorMode,
            OnToggleEditorClicked = v45.toggleEditorClicked
        }),
        DopeSheetController = not not v74 and v1.createElement(v11, {
            ShowEvents = l_ShowEvents_0,
            StartTick = l_StartTick_0,
            EndTick = l_EndTick_0,
            TrackPadding = v72,
            TopTrackIndex = l_TopTrackIndex_0,
            Size = UDim2.new(1, 0, 1, -v8.TIMELINE_HEIGHT - v8.SCROLL_BAR_SIZE),
            ShowAsSeconds = if not v25() then v53 else nil,
            TimelineUnit = l_TimelineUnit_0,
            IsChannelAnimation = l_IsChannelAnimation_0,
            ColorsPosition = l_ColorsPosition_0,
            ZIndex = 1,
            OnInputChanged = v45.inputChanged
        }) or nil,
        CurveEditorController = not not v75 and v1.createElement(v12, {
            ShowEvents = l_ShowEvents_0,
            StartTick = l_StartTick_0,
            EndTick = l_EndTick_0,
            TrackPadding = v72,
            Size = UDim2.new(1, 0, 1, -v8.TIMELINE_HEIGHT - v8.SCROLL_BAR_SIZE),
            ShowAsSeconds = if not v25() then v53 else nil,
            TimelineUnit = l_TimelineUnit_0,
            Playhead = l_Playhead_0,
            ZIndex = 1,
            OnInputChanged = v45.inputChanged
        }) or nil,
        CannotPasteToast = not not l_props_3.CannotPasteError and v1.createElement(v16, {
            Text = l_Localization_0:getText("Toast", "CannotPasteError"),
            OnClose = l_props_3.CloseCannotPasteToast
        }) or nil,
        IgnoreLayout = v1.createElement("Folder", {}, {
            TimelineBorder = v1.createElement(l_Separator_0, {
                Position = UDim2.new(0.5, 0, 0, v8.TIMELINE_HEIGHT),
                DominantAxis = Enum.DominantAxis.Width,
                Weight = 1,
                Padding = 0,
                ZIndex = 2
            }),
            Scrubber = v73 and v1.createElement(v15, {
                Position = UDim2.new(0, v45.getPlayheadPositionX(), 0, 0),
                AnchorPoint = Vector2.new(0.5, 0),
                Height = v70.Y,
                ShowHead = true,
                HeadSize = UDim2.new(0, 5, 0, 5),
                ZIndex = 3,
                Thickness = 1
            }),
            HorizontalZoomBar = v1.createElement(v14, {
                Size = UDim2.new(0, (v70.X - v8.SCROLL_BAR_PADDING) + 1, 0, v8.SCROLL_BAR_SIZE),
                Position = UDim2.new(0, 0, 1, -v8.SCROLL_BAR_SIZE),
                Direction = v14.HORIZONTAL,
                ZIndex = 4,
                LayoutOrder = 2,
                ContainerSize = Vector2.new(v70.X, v70.Y),
                AdjustScrollZoom = l_props_3.SetHorizontalScrollZoom,
                Scroll = l_HorizontalScroll_1,
                Zoom = l_HorizontalZoom_1,
                Min = v71.X + 1
            }),
            VerticalZoomBar = v75 and v1.createElement(v14, {
                Size = UDim2.new(0, v8.SCROLL_BAR_SIZE, 0, (((v70.Y - v8.SCROLL_BAR_SIZE) - v8.SCROLL_BAR_PADDING) - v8.TIMELINE_HEIGHT) + 1),
                Position = UDim2.new(1, 0, 0, v8.TIMELINE_HEIGHT),
                Direction = v14.VERTICAL,
                ZIndex = 4,
                LayoutOrder = 2,
                ContainerSize = Vector2.new(v70.X, (v70.Y - v8.SCROLL_BAR_SIZE) - v8.TIMELINE_HEIGHT),
                AdjustScrollZoom = l_props_3.SetVerticalScrollZoom,
                Scroll = l_VerticalScroll_0,
                Zoom = l_VerticalZoom_0,
                Min = (v71.Y + v8.TIMELINE_HEIGHT) + 1
            }),
            KeyboardListener = v1.createElement(l_KeyboardListener_0, {
                OnKeyPressed = function(v76)
                    if v10.isControl(v76.KeyCode) then
                        v45.ctrlHeld = true;
                    end;
                end,
                OnKeyReleased = function(v77)
                    if v10.isControl(v77.KeyCode) then
                        v45.ctrlHeld = false;
                    end;
                end
            })
        })
    });
end;
return v2.connect(function(v78)
    return {
        AnimationData = v78.AnimationData,
        CannotPasteError = v78.Notifications.CannotPasteError,
        EditorMode = v78.Status.EditorMode,
        IsPlaying = v78.Status.IsPlaying,
        PlayState = v78.Status.PlayState,
        SnapMode = v78.Status.SnapMode,
        ReadOnly = v78.Status.ReadOnly
    };
end, function(v79)
    return {
        CloseCannotPasteToast = function()
            v79(v19("CannotPasteError", false));
        end,
        SetHorizontalScrollZoom = function(v80, v81)
            v79(v18(v80, v81));
        end,
        SetVerticalScrollZoom = function(v82, v83)
            v79(v20(v82, v83));
        end,
        StepAnimation = function(v84)
            v79(v23(v84));
        end,
        SnapToNearestKeyframe = function(v85, v86)
            v79(v22(v85, v86));
        end,
        SnapToNearestFrame = function(v87)
            v79(v21(v87));
        end,
        SetEditorMode = function(v88)
            v79(v17(v88));
        end,
        SwitchEditorMode = function(v89, v90)
            v79(v24(v89, v90));
        end
    };
end)((l_withContext_0({
    Analytics = l_ContextServices_0.Analytics,
    Localization = l_ContextServices_0.Localization,
    Mouse = l_ContextServices_0.Mouse
})(v26)));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local _ = require(l_script_FirstAncestor_0.Packages.Roact);
local v2 = require(l_script_FirstAncestor_0.Packages.Framework);
local v3 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local v4 = require(l_script_FirstAncestor_0.Packages.Cryo);
local v5 = require(l_script_FirstAncestor_0.Packages.Roact);
local v6 = require(l_script_FirstAncestor_0.Packages.RoactRodux);
local v7 = require(l_script_FirstAncestor_0.Src.Components.ContextMenu);
local v8 = require(l_script_FirstAncestor_0.Src.Components.Tooltip);
local l_ContextServices_0 = v2.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local _ = require(l_script_FirstAncestor_0.Src.Util.RigUtils);
local v12 = require(l_script_FirstAncestor_0.Src.Util.RigInfo);
local v13 = v5.PureComponent:extend("AddTrackButton");
v13.init = function(v14)
    v14.state = {
        showMenu = false
    };
    v14.showMenu = function()
        v14:setState({
            showMenu = true
        });
    end;
    v14.hideMenu = function()
        v14:setState({
            showMenu = false
        });
    end;
    v14.mouseEnter = function()
        if v14.props.Mouse then
            v14.props.Mouse:__pushCursor("PointingHand");
        end;
        v14:setState({
            hovering = true
        });
    end;
    v14.mouseLeave = function()
        if v14.props.Mouse then
            v14.props.Mouse:__popCursor();
        end;
        v14:setState({
            hovering = false
        });
    end;
end;
v13.willUnmount = function(v15)
    v15.props.Mouse:__resetCursor();
end;
v13.makeFacialAnimationControlSubMenu = function(v16, v17)
    local v18 = {};
    for _, v20 in ipairs(v17) do
        table.insert(v18, {
            Name = v20.Name,
            ItemSelected = function()
                if v16.props.OnTrackSelected then
                    v16.props.OnTrackSelected(v20.Instance, v20.Name, v20.Type);
                end;
            end
        });
    end;
    return v18;
end;
v13.makeFacialAnimationRegionSubMenu = function(v21)
    local l_props_0 = v21.props;
    local l_Localization_0 = l_props_0.Localization;
    local v24 = {};
    local v25 = {};
    local v26 = false;
    for _, v28 in ipairs(l_props_0.Facs) do
        local v29 = v3.FacsControlToRegionMap[v28.Name] or v3.FACS_REGIONS.Other;
        if not v25[v29] then
            v25[v29] = {};
        end;
        table.insert(v25[v29], v28);
        v26 = true;
    end;
    if v26 then
        local v30 = v4.Dictionary.keys(v25);
        table.sort(v30);
        for _, v32 in ipairs(v30) do
            if v25[v32] then
                local v33 = {
                    Text = l_Localization_0:getText("Menu", v32)
                };
                for _, v35 in ipairs(v25[v32]) do
                    table.insert(v33, {
                        Text = v35.Name,
                        OnItemClicked = function()
                            if v21.props.OnTrackSelected then
                                v21.props.OnTrackSelected(v35.Instance, v35.Name, v35.Type);
                            end;
                        end
                    });
                end;
                table.insert(v24, v33);
            end;
        end;
        table.insert(v24, v3.MENU_SEPARATOR);
        table.insert(v24, {
            Text = l_Localization_0:getText("Menu", "AddAllFacs"),
            OnItemClicked = function()
                for _, v37 in ipairs(l_props_0.Facs) do
                    v21.props.OnTrackSelected(v37.Instance, v37.Name, v37.Type);
                end;
            end
        });
    end;
    return v24;
end;
v13.makeTrackActions = function(v38)
    local l_props_1 = v38.props;
    local l_Localization_1 = l_props_1.Localization;
    local v41 = {};
    for _, v43 in ipairs(l_props_1.Tracks) do
        table.insert(v41, {
            Text = v43.Name,
            OnItemClicked = function()
                v38.props.OnTrackSelected(v43.Instance, v43.Name, v43.Type);
            end
        });
    end;
    if #l_props_1.Tracks > 0 then
        table.insert(v41, v3.MENU_SEPARATOR);
        table.insert(v41, {
            Text = l_Localization_1:getText("Menu", "AddAllTracks"),
            OnItemClicked = function()
                for _, v45 in ipairs(l_props_1.Tracks) do
                    v38.props.OnTrackSelected(v45.Instance, v45.Name, v45.Type);
                end;
            end
        });
        table.insert(v41, v3.MENU_SEPARATOR);
    end;
    if v12.getFaceControls(v38.props.RootInstance) then
        for _, v47 in pairs((v38:makeFacialAnimationRegionSubMenu())) do
            table.insert(v41, v47);
        end;
    end;
    return v41;
end;
v13.render = function(v48)
    local _ = v48.props.Localization;
    local l_props_2 = v48.props;
    local l_Stylizer_0 = l_props_2.Stylizer;
    local l_state_0 = v48.state;
    local l_showMenu_0 = l_state_0.showMenu;
    local l_hovering_0 = l_state_0.hovering;
    local l_Size_0 = l_props_2.Size;
    local l_Position_0 = l_props_2.Position;
    local l_trackTheme_0 = l_Stylizer_0.trackTheme;
    return v5.createElement("ImageButton", {
        Size = l_Size_0,
        Position = l_Position_0,
        AnchorPoint = Vector2.new(1, 0.5),
        Image = l_trackTheme_0.addButtonBackground,
        ImageColor3 = not not l_hovering_0 and l_trackTheme_0.hoveredAddButtonColor or l_trackTheme_0.addButtonColor,
        BackgroundTransparency = 1,
        [v5.Event.Activated] = v48.showMenu,
        [v5.Event.MouseEnter] = v48.mouseEnter,
        [v5.Event.MouseLeave] = v48.mouseLeave
    }, {
        PlusIcon = v5.createElement("ImageLabel", {
            Size = UDim2.new(0, 9, 0, 8),
            Position = UDim2.new(0.5, 0, 0.5, 0),
            AnchorPoint = Vector2.new(0.5, 0.5),
            Image = l_trackTheme_0.plusIcon,
            ImageColor3 = not not l_hovering_0 and l_trackTheme_0.hoveredPlusIconColor or l_trackTheme_0.plusIconColor,
            BackgroundTransparency = 1
        }),
        TrackMenu = l_showMenu_0 and v5.createElement(v7, {
            Actions = v48:makeTrackActions(),
            OnMenuOpened = v48.hideMenu
        }),
        Tooltip = v5.createElement(v8, {
            TextKey = "AddTrackButton"
        })
    });
end;
return v6.connect(function(v58, _)
    return {
        RootInstance = v58.Status.RootInstance
    };
end)((l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization,
    Mouse = l_ContextServices_0.Mouse
})(v13)));


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.Framework);
local v3 = require(l_script_FirstAncestor_0.Src.Util.StringUtils);
local l_ContextServices_0 = v2.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v6 = require(l_script_FirstAncestor_0.Src.Components.TrackList.TrackListEntry);
local v7 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local v8 = v1.PureComponent:extend("AnimationEventsTrack");
v8.init = function(v9)
    v9.state = {
        hovering = false
    };
    v9.getTextWidth = function(v10, v11)
        return v3.getTextWidth(v10, v11.trackTheme.textSize, v11.font);
    end;
    v9.onButtonClick = function()
        if v9.props.OnButtonClick then
            v9.props.OnButtonClick();
        end;
    end;
    v9.mouseEnter = function()
        if v9.props.Mouse then
            v9.props.Mouse:__pushCursor("PointingHand");
        end;
        v9:setState({
            hovering = true
        });
    end;
    v9.mouseLeave = function()
        if v9.props.Mouse then
            v9.props.Mouse:__popCursor();
        end;
        v9:setState({
            hovering = false
        });
    end;
end;
v8.willUnmount = function(v12)
    v12.props.Mouse:__resetCursor();
end;
v8.render = function(v13)
    local l_Localization_0 = v13.props.Localization;
    local l_props_0 = v13.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_state_0 = v13.state;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local v19 = l_props_0.Indent or 0;
    local _ = l_state_0.hovering;
    local l_trackTheme_0 = l_Stylizer_0.trackTheme;
    return v1.createElement(v6, {
        Height = v7.TRACK_HEIGHT,
        Indent = v19,
        ShowBackground = true,
        LayoutOrder = l_LayoutOrder_0
    }, {
        TitleLabel = v1.createElement("TextLabel", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundTransparency = 1,
            Text = l_Localization_0:getText("Title", "AnimationEvents"),
            Font = l_Stylizer_0.font,
            TextSize = l_trackTheme_0.textSize,
            TextColor3 = l_trackTheme_0.textColor,
            TextXAlignment = Enum.TextXAlignment.Left
        }),
        AddEvent = v1.createElement("ImageButton", {
            Size = UDim2.new(0, v7.TRACKLIST_BUTTON_SIZE, 0, v7.TRACKLIST_BUTTON_SIZE),
            AnchorPoint = Vector2.new(1, 0.5),
            Position = UDim2.new(1, -v7.TRACKLIST_RIGHT_PADDING, 0.5, 0),
            BackgroundTransparency = 1,
            ImageTransparency = 1,
            [v1.Event.Activated] = v13.onButtonClick,
            [v1.Event.MouseEnter] = v13.mouseEnter,
            [v1.Event.MouseLeave] = v13.mouseLeave
        }, {
            EventMarker = v1.createElement("ImageLabel", {
                Size = UDim2.new(0, 5, 0, 15),
                Position = UDim2.new(0, 1, 0, 1),
                Image = l_trackTheme_0.addEventBackground,
                ImageColor3 = l_Stylizer_0.eventMarker.imageColor,
                BackgroundTransparency = 1
            }),
            EventBorder = v1.createElement("ImageLabel", {
                Size = UDim2.new(0, 15, 0, 15),
                Position = UDim2.new(0.5, 0, 0.5, 0),
                AnchorPoint = Vector2.new(0.5, 0.5),
                Image = l_trackTheme_0.addEventBorder,
                ImageColor3 = l_trackTheme_0.plusIconColor,
                BackgroundTransparency = 1
            })
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization,
    Mouse = l_ContextServices_0.Mouse
})(v8));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Packages.Roact);
local v2 = require(l_script_FirstAncestor_0.Src.Util.DoubleClickDetector);
local l_ContextServices_0 = require(l_script_FirstAncestor_0.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v5 = require(l_script_FirstAncestor_0.Src.Components.TrackList.TrackListEntry);
local v6 = require(l_script_FirstAncestor_0.Src.Components.ContextButton);
local v7 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local v8 = v1.PureComponent:extend("ExpandableTrack");
v8.init = function(v9)
    local v10 = v2.new();
    v9.onExpandToggled = function()
        if v9.props.OnExpandToggled then
            v9.props.OnExpandToggled(not v9.props.Expanded);
        end;
    end;
    v9.onTrackSelected = function()
        if v10:isDoubleClick() then
            v9.onExpandToggled();
        end;
        if v9.props.OnTrackSelected then
            v9.props.OnTrackSelected();
        end;
    end;
    v9.onContextButtonClick = function()
        if v9.props.OnContextButtonClick then
            v9.props.OnContextButtonClick();
        end;
    end;
end;
v8.render = function(v11)
    local l_props_0 = v11.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local v15 = l_props_0.Indent or 0;
    local l_Name_0 = l_props_0.Name;
    local l_trackTheme_0 = l_Stylizer_0.trackTheme;
    local l_arrow_0 = l_trackTheme_0.arrow;
    local v19 = l_props_0.Expanded or false;
    local v20 = l_props_0.Selected or false;
    return v1.createElement(v5, {
        Selected = v20,
        Height = v7.TRACK_HEIGHT,
        Indent = v15,
        LayoutOrder = l_LayoutOrder_0
    }, {
        Arrow = v1.createElement("ImageButton", {
            Size = UDim2.new(0, v7.ARROW_SIZE, 0, v7.ARROW_SIZE),
            AnchorPoint = Vector2.new(0, 0.5),
            Position = UDim2.new(0, v7.ARROW_SIZE / 2, 0.5, 0),
            BackgroundTransparency = 1,
            Image = not not v19 and l_arrow_0.expanded or l_arrow_0.collapsed,
            ImageColor3 = not not v20 and l_trackTheme_0.selectedTextColor or l_trackTheme_0.textColor,
            ScaleType = Enum.ScaleType.Fit,
            [v1.Event.Activated] = v11.onExpandToggled
        }),
        NameLabel = v1.createElement("TextButton", {
            Size = UDim2.new(1, -v7.TRACKLIST_BUTTON_SIZE - v7.ARROW_SIZE * 2, 1, 0),
            Position = UDim2.new(0, v7.ARROW_SIZE * 2, 0, 0),
            BackgroundTransparency = 1,
            AutoButtonColor = false,
            Text = l_Name_0,
            Font = l_Stylizer_0.font,
            TextSize = l_trackTheme_0.textSize,
            TextColor3 = not not v20 and l_trackTheme_0.selectedTextColor or l_trackTheme_0.textColor,
            TextXAlignment = Enum.TextXAlignment.Left,
            [v1.Event.Activated] = v11.onTrackSelected
        }),
        ContextButton = v1.createElement(v6, {
            AnchorPoint = Vector2.new(1, 0.5),
            Position = UDim2.new(1, -v7.TRACKLIST_RIGHT_PADDING, 0.5, 0),
            TrackSelected = v20,
            OnActivated = v11.onContextButtonClick
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v8));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Packages.Roact);
local v2 = require(l_script_FirstAncestor_0.Src.Util.StringUtils);
local v3 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local v4 = require(l_script_FirstAncestor_0.Src.Components.DragListenerArea);
local v5 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_Pane_0 = v5.UI.Pane;
local l_ContextServices_0 = v5.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v9 = require(l_script_FirstAncestor_0.Src.Components.TextBox);
local v10 = v1.PureComponent:extend("NumberBox");
v10.init = function(v11)
    v11.state = {
        focused = false
    };
    v11.getTextWidth = function(v12, v13)
        return v2.getTextWidth(v12, v13.trackTheme.textSize, v13.font);
    end;
    v11.focusChanged = function(v14, v15, v16)
        v11:setState({
            focused = v15
        });
        if not v15 then
            if not v16 then
                v14.Text = v11.props.Number;
            else
                local v17 = tonumber(v14.Text);
                if not v17 or not v11.props.SetNumber then
                    v14.Text = v11.props.Number;
                    return ;
                else
                    local v18 = v11.props.SetNumber(v17);
                    if v18 then
                        v14.Text = v11:formatNumber(v18);
                        return ;
                    end;
                end;
            end;
        end;
    end;
    v11.onDragMoved = function(v19)
        if v11.props.OnDragMoved then
            v11.props.OnDragMoved(v19);
        end;
    end;
    v11.onDragBegan = function(v20)
        if v11.props.OnDragBegan then
            v11.props.OnDragBegan(v20);
        end;
    end;
end;
v10.formatNumber = function(v21, v22)
    local v23 = v21.props.Precision or v3.NUMBER_PRECISION;
    return (tostring(math.floor(0.5 + v22 * v23) / v23));
end;
v10.render = function(v24)
    local l_props_0 = v24.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_textBox_0 = l_Stylizer_0.textBox;
    local l_trackTheme_0 = l_Stylizer_0.trackTheme;
    local l_state_0 = v24.state;
    local l_Name_0 = l_props_0.Name;
    local l_Color_0 = l_props_0.Color;
    local l_Size_0 = l_props_0.Size;
    local l_Position_0 = l_props_0.Position;
    local l_AnchorPoint_0 = l_props_0.AnchorPoint;
    local l_Number_0 = l_props_0.Number;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_ReadOnly_0 = l_props_0.ReadOnly;
    local v38 = not not l_state_0.focused and l_textBox_0.focusedBorder or l_textBox_0.defaultBorder;
    local v39 = v24.getTextWidth(l_Name_0, l_Stylizer_0) + 12;
    return v1.createElement(l_Pane_0, {
        Style = "BorderBox",
        Size = l_Size_0,
        Position = l_Position_0,
        ZIndex = 2,
        AnchorPoint = l_AnchorPoint_0,
        BackgroundColor3 = l_textBox_0.backgroundColor,
        BorderColor3 = v38,
        LayoutOrder = l_LayoutOrder_0
    }, {
        Layout = v1.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            FillDirection = Enum.FillDirection.Horizontal
        }),
        LabelFrame = v1.createElement(l_Pane_0, {
            Style = "BorderBox",
            Size = UDim2.new(0, v39, 1, 0),
            BackgroundColor3 = l_trackTheme_0.shadedBackgroundColor,
            BorderColor3 = v38,
            LayoutOrder = 1
        }, {
            NameLabel = v1.createElement("TextLabel", {
                Size = UDim2.new(1, 0, 1, 0),
                BackgroundTransparency = 1,
                ZIndex = 2,
                Text = l_Name_0,
                Font = l_Stylizer_0.font,
                TextSize = l_trackTheme_0.textSize,
                TextColor3 = l_Color_0 or l_trackTheme_0.textColor,
                TextXAlignment = Enum.TextXAlignment.Center
            }),
            LeftBorderOverlay = v1.createElement("Frame", {
                Size = UDim2.new(0, 5, 1, -2),
                Position = UDim2.new(1, 0, 0.5, 0),
                AnchorPoint = Vector2.new(1, 0.5),
                BackgroundColor3 = l_trackTheme_0.shadedBackgroundColor,
                BorderSizePixel = 0
            }),
            RightBorderOverlay = v1.createElement("Frame", {
                Size = UDim2.new(0, 5, 1, -2),
                Position = UDim2.new(1, 0, 0.5, 0),
                AnchorPoint = Vector2.new(0, 0.5),
                BackgroundColor3 = l_textBox_0.backgroundColor,
                BorderSizePixel = 0
            }),
            DragArea = not l_ReadOnly_0 and v1.createElement(v4, {
                Size = UDim2.new(1, 0, 1, 0),
                Cursor = "SizeEW",
                OnDragMoved = v24.onDragMoved,
                OnDragBegan = v24.onDragBegan
            }) or nil
        }),
        TextBox = v1.createElement(v9, {
            Size = UDim2.new(1, -v39, 1, 0),
            Text = v24:formatNumber(l_Number_0),
            TextXAlignment = Enum.TextXAlignment.Left,
            ReadOnly = l_ReadOnly_0,
            LayoutOrder = 2,
            ClearTextOnFocus = false,
            FocusChanged = v24.focusChanged
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v10));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Packages.Roact);
local v2 = require(l_script_FirstAncestor_0.Src.Util.StringUtils);
local v3 = require(l_script_FirstAncestor_0.Src.Util.LayoutOrderIterator);
local l_ContextServices_0 = require(l_script_FirstAncestor_0.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v6 = require(l_script_FirstAncestor_0.Src.Components.TrackList.TrackListEntry);
local v7 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local v8 = require(l_script_FirstAncestor_0.Src.Components.TrackList.NumberBox);
local v9 = v1.PureComponent:extend("NumberTrack");
v9.init = function(v10, _)
    v10.state = {
        values = nil,
        renderFromNumberEntry = false
    };
    v10.getTextWidth = function(v12, v13)
        return v2.getTextWidth(v12, v13.trackTheme.textSize, v13.font);
    end;
    v10.onSetNumber = function(v14, v15)
        local l_props_0 = v10.props;
        local l_state_0 = v10.state;
        local l_Items_0 = l_props_0.Items;
        local l_Values_0 = l_state_0.Values;
        local v20 = {};
        for v21, v22 in ipairs(l_Items_0) do
            if not l_Values_0 or not l_Values_0[v21] then
                v20[v21] = v22.Value;
            else
                v20[v21] = l_Values_0[v21];
            end;
        end;
        v20[v14] = v15;
        v10:setState({
            renderFromNumberEntry = 2,
            values = v20
        });
    end;
    v10.onItemChanged = function(v23, v24)
        if not v10.props.OnItemChanged then
            return ;
        else
            return v10.props.OnItemChanged(v23, v24);
        end;
    end;
end;
v9.getDerivedStateFromProps = function(_, v26)
    local l_renderFromNumberEntry_0 = v26.renderFromNumberEntry;
    if l_renderFromNumberEntry_0 and l_renderFromNumberEntry_0 > 0 then
        return {
            renderFromNumberEntry = l_renderFromNumberEntry_0 - 1
        };
    else
        return {
            values = v1.None
        };
    end;
end;
v9.render = function(v28)
    local l_props_1 = v28.props;
    local l_Stylizer_0 = l_props_1.Stylizer;
    local l_state_1 = v28.state;
    local l_LayoutOrder_0 = l_props_1.LayoutOrder;
    local v33 = l_props_1.Indent or 0;
    local l_Name_0 = l_props_1.Name;
    local l_Items_1 = l_props_1.Items;
    local l_ReadOnly_0 = l_props_1.ReadOnly;
    local l_values_0 = l_state_1.values;
    local l_trackTheme_0 = l_Stylizer_0.trackTheme;
    local v39 = l_props_1.NameWidth or v28.getTextWidth(l_Name_0, l_Stylizer_0);
    local v40 = v3.new();
    local v41 = {
        Layout = v1.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            FillDirection = Enum.FillDirection.Horizontal,
            VerticalAlignment = Enum.VerticalAlignment.Center,
            Padding = UDim.new(0, v7.NUMBERTRACK_PADDING)
        }),
        ArrowPadding = v1.createElement("Frame", {
            Size = UDim2.new(0, v7.ARROW_SIZE * 2 - v7.NUMBERTRACK_PADDING, 1, 0),
            BackgroundTransparency = 1,
            LayoutOrder = v40:getNextOrder()
        }),
        NameLabel = v1.createElement("TextLabel", {
            Size = UDim2.new(0, v39, 1, 0),
            BackgroundTransparency = 1,
            LayoutOrder = v40:getNextOrder(),
            Text = l_Name_0,
            Font = l_Stylizer_0.font,
            TextSize = l_trackTheme_0.textSize,
            TextColor3 = l_trackTheme_0.textColor,
            TextXAlignment = Enum.TextXAlignment.Left
        })
    };
    for v42, v43 in ipairs(l_Items_1) do
        v41[v43.Key .. "_Entry"] = v1.createElement(v8, {
            Size = UDim2.new(0, v7.NUMBERBOX_WIDTH, 1, -4),
            LayoutOrder = v40:getNextOrder(),
            Number = not not l_values_0 and l_values_0[v42] or v43.Value,
            Name = v43.Name,
            ReadOnly = l_ReadOnly_0,
            SetNumber = function(v44)
                l_props_1.OnChangeBegan();
                v28.onSetNumber(v42, v44);
                return v28.onItemChanged(v43.Key, v44);
            end,
            OnDragMoved = function(v45)
                v28.onItemChanged(v43.Key, v43.Value + v45.Delta.X * 0.05);
            end,
            OnDragBegan = l_props_1.OnChangeBegan
        });
    end;
    return v1.createElement(v6, {
        Height = v7.TRACK_HEIGHT,
        Indent = v33,
        LayoutOrder = l_LayoutOrder_0
    }, v41);
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v9));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Packages.Roact);
local l_ContextServices_0 = require(l_script_FirstAncestor_0.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v4 = require(l_script_FirstAncestor_0.Src.Components.IK.IKController);
local v5 = require(l_script_FirstAncestor_0.Src.Components.FaceControlsEditor.FaceControlsEditorController);
local v6 = require(l_script_FirstAncestor_0.Src.Components.FacialAnimationRecorder.RecordingModeButton);
local v7 = require(l_script_FirstAncestor_0.Src.Components.TrackList.TrackListEntry);
local v8 = require(l_script_FirstAncestor_0.Src.Components.TrackList.AddTrackButton);
local v9 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local v10 = require(l_script_FirstAncestor_0.Src.Util.isEmpty);
local v11 = require(l_script_FirstAncestor_0.Src.Util.StringUtils);
local v12 = require(l_script_FirstAncestor_0.LuaFlags.GetFFlagFacialAnimationRecordingInStudio);
local v13 = v1.PureComponent:extend("SummaryTrack");
v13.init = function(v14)
    v14.onTrackAdded = function(v15, v16, v17)
        if v14.props.OnTrackAdded then
            v14.props.OnTrackAdded(v15, v16, v17);
        end;
    end;
end;
truncateAtMiddle = function(v18, v19, v20)
    if v19 < #v18 then
        local v21 = v20 or "...";
        local v22 = v19 - #v21;
        return string.sub(v18, 0, (math.ceil(v22 / 2))) .. v21 .. string.sub(v18, #v18 - math.floor(v22 / 2));
    else
        return v18;
    end;
end;
v13.render = function(v23)
    local l_props_0 = v23.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_Name_0 = l_props_0.Name;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_UnusedTracks_0 = l_props_0.UnusedTracks;
    local l_UnusedFacs_0 = l_props_0.UnusedFacs;
    local l_trackTheme_0 = l_Stylizer_0.trackTheme;
    local v31 = "";
    local v32 = v11.getTextWidth(l_Name_0, l_trackTheme_0.textSize, l_Stylizer_0.font);
    if v12() then
        v31 = truncateAtMiddle(l_Name_0, 16);
        v32 = v11.getTextWidth(v31, l_trackTheme_0.textSize, l_Stylizer_0.font);
    end;
    return v1.createElement(v7, {
        Height = v9.SUMMARY_TRACK_HEIGHT,
        Indent = 1,
        LayoutOrder = l_LayoutOrder_0,
        Primary = true
    }, {
        NameLabel = v1.createElement("TextLabel", {
            Size = UDim2.new(1, 0, 1, 0),
            Position = UDim2.new(0, 0, 0, 0),
            BackgroundTransparency = 1,
            Text = not not v12() and v31 or l_Name_0,
            Font = l_Stylizer_0.font,
            TextSize = l_trackTheme_0.textSize,
            TextColor3 = l_trackTheme_0.textColor,
            TextXAlignment = Enum.TextXAlignment.Left
        }),
        LeftButtonsListContainer = v1.createElement("Frame", {
            AnchorPoint = Vector2.new(0, 0.5),
            BorderSizePixel = 0,
            BackgroundTransparency = 0,
            Position = UDim2.new(0, v32 + 12, 0.5, 0)
        }, {
            LeftButtonsList = v1.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Horizontal,
                VerticalAlignment = Enum.VerticalAlignment.Center,
                SortOrder = Enum.SortOrder.LayoutOrder,
                Padding = UDim.new(0, 12)
            }),
            IKController = v1.createElement(v4, {}),
            FaceControlsEditorController = v1.createElement(v5, {}),
            RecordingModeButton = v12() and v1.createElement(v6, {})
        }),
        AddTrackButton = not not (not not l_UnusedTracks_0 and not v10(l_UnusedTracks_0) or l_UnusedFacs_0 and not v10(l_UnusedFacs_0)) and v1.createElement(v8, {
            Size = UDim2.new(0, v9.TRACKLIST_BUTTON_SIZE, 0, v9.TRACKLIST_BUTTON_SIZE),
            Position = UDim2.new(1, -v9.TRACKLIST_RIGHT_PADDING, 0.5, 0),
            Tracks = l_UnusedTracks_0,
            Facs = l_UnusedFacs_0,
            OnTrackSelected = v23.onTrackAdded
        }) or nil
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v13));