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.Cryo);
local v4 = require(l_script_FirstAncestor_0.Src.Util.deepCopy);
local v5 = require(l_script_FirstAncestor_0.Src.Util.AnimationData);
local v6 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_DragListener_0 = v6.UI.DragListener;
local l_ContextServices_0 = v6.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_KeyboardListener_0 = v6.UI.KeyboardListener;
local v11 = require(l_script_FirstAncestor_0.Src.Actions.SetNotification);
local v12 = require(l_script_FirstAncestor_0.Src.Actions.SetPlayState);
local v13 = require(l_script_FirstAncestor_0.Src.Actions.SetRightClickContextInfo);
local v14 = require(l_script_FirstAncestor_0.Src.Actions.SetSelectedKeyframes);
local v15 = require(l_script_FirstAncestor_0.Src.Actions.SetSelectedEvents);
local v16 = require(l_script_FirstAncestor_0.Src.Components.DopeSheet);
local v17 = require(l_script_FirstAncestor_0.Src.Components.TrackList.TrackColors);
local v18 = require(l_script_FirstAncestor_0.Src.Components.EventsController);
local v19 = require(l_script_FirstAncestor_0.Src.Components.SelectionBox);
local v20 = require(l_script_FirstAncestor_0.Src.Components.TimelineActions);
local v21 = require(l_script_FirstAncestor_0.Src.Components.ScaleControls.ScaleControls);
local v22 = require(l_script_FirstAncestor_0.Src.Components.TextEntryPrompt);
local v23 = require(l_script_FirstAncestor_0.Src.Components.Toast.NoticeToast);
local v24 = require(l_script_FirstAncestor_0.Src.Thunks.History.AddWaypoint);
local v25 = require(l_script_FirstAncestor_0.Src.Thunks.Selection.SelectKeyframeRange);
local v26 = require(l_script_FirstAncestor_0.Src.Thunks.Selection.DeselectKeyframe);
local v27 = require(l_script_FirstAncestor_0.Src.Thunks.Selection.SelectKeyframesAtTick);
local v28 = require(l_script_FirstAncestor_0.Src.Thunks.Selection.DeselectKeyframesAtTick);
local v29 = require(l_script_FirstAncestor_0.Src.Thunks.Selection.MoveSelectedKeyframes);
local v30 = require(l_script_FirstAncestor_0.Src.Thunks.Selection.ScaleSelectedKeyframes);
local v31 = require(l_script_FirstAncestor_0.Src.Thunks.Selection.SetSelectedKeyframeData);
local v32 = require(l_script_FirstAncestor_0.Src.Thunks.Selection.GenerateCurve);
local v33 = require(l_script_FirstAncestor_0.Src.Thunks.RenameKeyframe);
local _ = require(l_script_FirstAncestor_0.Src.Thunks.QuantizeKeyframes);
local v35 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local v36 = require(l_script_FirstAncestor_0.Src.Util.DragContext);
local v37 = require(l_script_FirstAncestor_0.Src.Util.Input);
local v38 = require(l_script_FirstAncestor_0.Src.Util.isEmpty);
local v39 = require(l_script_FirstAncestor_0.Src.Util.KeyframeUtils);
local v40 = require(l_script_FirstAncestor_0.Src.Util.PathUtils);
local v41 = require(l_script_FirstAncestor_0.Src.Util.StringUtils);
local v42 = require(l_script_FirstAncestor_0.Src.Util.TrackUtils);
local v43 = require(l_script_FirstAncestor_0.LuaFlags.GetFFlagTimelineUnitSeconds);
local v44 = v1.Component:extend("DopeSheetController");
v44.init = function(v45)
    v45.state = {
        AbsoluteSize = Vector2.new(),
        AbsolutePosition = Vector2.new(),
        dragging = false,
        draggingScale = false,
        draggingSelection = false,
        dragTick = nil,
        showContextMenu = false,
        renamingKeyframe = nil,
        changingDuration = nil,
        hasDragWaypoint = false
    };
    v45.DragContext = nil;
    v45.isMultiSelecting = false;
    v45.mouseDownOnKeyframe = false;
    v45.mouseDownInTimeline = false;
    v45.tracks = {};
    local v46, v47 = v1.createBinding(nil);
    v45.selectDragStart = v46;
    v45.updateSelectDragStart = v47;
    v46, v47 = v1.createBinding(nil);
    v45.selectDragEnd = v46;
    v45.updateSelectDragEnd = v47;
    v45.lastMinTick = nil;
    v45.lastMinTrack = nil;
    v45.lastMaxTick = nil;
    v45.lastMaxTrack = nil;
    v45.getTickFromPosition = function(v48, v49)
        local v50 = v42.getKeyframeFromPosition(v48, v45.props.StartTick, v45.props.EndTick, v45.state.AbsolutePosition.X + v45.props.TrackPadding / 2, v45.state.AbsoluteSize.X - v45.props.TrackPadding);
        if v49 and v45.props.SnapMode ~= v35.SNAP_MODES.None then
            v50 = v39.getNearestFrame(v50, v45.props.FrameRate);
        end;
        return v50;
    end;
    v45.getTrackFromPosition = function(v51)
        local l_TopTrackIndex_0 = v45.props.TopTrackIndex;
        local v53 = v51.Y - v45.state.AbsolutePosition.Y;
        if not v45.props.IsChannelAnimation then
            return v42.getTrackFromPosition(v45.tracks, l_TopTrackIndex_0, v53);
        else
            local v54, v55 = v42.getTrackInfoFromPosition(v45.tracks, l_TopTrackIndex_0, v53);
            return v54 + v40.getPathValue(v40.getRelativePath(v55));
        end;
    end;
    v45.getTrackInfoFromPosition = function(v56)
        return v42.getTrackInfoFromPosition(v45.tracks, v45.props.TopTrackIndex, v56.Y - v45.state.AbsolutePosition.Y);
    end;
    v45.addDragWaypoint = function()
        if not v45.state.hasDragWaypoint then
            v45.props.AddWaypoint();
            v45:setState({
                hasDragWaypoint = true
            });
        end;
    end;
    v45.onScaleHandleDragStarted = function(v57)
        v45.DragContext = v36.new(v45.props.AnimationData, v45.props.SelectedKeyframes, v57);
        v45:setState({
            draggingScale = true,
            dragTick = v57,
            hasDragWaypoint = false
        });
    end;
    v45.onKeyframeDragStarted = function(v58)
        v45.DragContext = v36.new(v45.props.AnimationData, v45.props.SelectedKeyframes, v58);
        v45:setState({
            dragging = true,
            dragTick = v58,
            hasDragWaypoint = false
        });
    end;
    v45.onScaleHandleDragMoved = function(v59)
        local v60 = v45.getTickFromPosition(v59.Position, true);
        if not (not (v45.state.dragTick ~= v60) or not v45.DragContext) then
            v45.addDragWaypoint();
            v45.DragContext:scaleKeyframes(v60, v45.props.StartTick);
            v45.props.ScaleSelectedKeyframes(v45.DragContext.pivotTick, v45.DragContext.scale, v45.DragContext);
            v45:setState({
                dragTick = v60
            });
        end;
    end;
    v45.onKeyframeDragMoved = function(v61)
        local v62 = v45.getTickFromPosition(v61.Position, true);
        if not (not (v45.state.dragTick ~= v62) or not v45.DragContext) then
            v45.addDragWaypoint();
            v45.DragContext:moveKeyframes(v62);
            v45.props.MoveSelectedKeyframes(v45.DragContext.pivotTick, v45.DragContext.newTick, v45.DragContext);
            v45:setState({
                dragTick = v62
            });
        end;
    end;
    v45.onKeyframeDragEnded = function()
        v45.DragContext = nil;
        v45:setState({
            dragging = false,
            dragTick = v1.None,
            hasDragWaypoint = false
        });
    end;
    v45.onScaleHandleDragEnded = function()
        v45.DragContext = nil;
        v45:setState({
            draggingScale = false,
            dragTick = v1.None,
            hasDragWaypoint = false
        });
    end;
    v45.onSelectDragStarted = function(v63)
        if not (v45.state.showContextMenu or v45.props.ReadOnly) then
            v45.updateSelectDragStart(v63.Position);
            v45.updateSelectDragEnd(v63.Position);
            v45:setState({
                draggingSelection = true
            });
        end;
    end;
    v45.onSelectDragMoved = function(v64)
        local l_props_0 = v45.props;
        local l_Position_0 = v64.Position;
        v45.updateSelectDragEnd(l_Position_0);
        local v67 = v45.selectDragStart:getValue();
        local l_SelectedKeyframes_0 = l_props_0.SelectedKeyframes;
        local l_IsChannelAnimation_0 = l_props_0.IsChannelAnimation;
        local v70 = Vector2.new(math.min(l_Position_0.X, v67.X), (math.min(l_Position_0.Y, v67.Y)));
        local v71 = Vector2.new(math.max(l_Position_0.X, v67.X), (math.max(l_Position_0.Y, v67.Y)));
        local v72 = Vector2.new(((v45.state.AbsoluteSize.X - l_props_0.TrackPadding) / (l_props_0.EndTick - l_props_0.StartTick)) / 2, v35.TRACK_HEIGHT / 2);
        local v73 = v45.getTickFromPosition(v70 + v72, false);
        local v74 = v45.getTrackFromPosition(v70 + v72);
        local v75 = v45.getTickFromPosition(v71 - v72, false);
        local v76 = v45.getTrackFromPosition(v71 - v72);
        local v77 = v45.lastMinTick or v73;
        local v78 = v45.lastMinTrack or v74;
        local v79 = v45.lastMaxTick or v75;
        local v80 = v45.lastMaxTrack or v76;
        if not v38(l_SelectedKeyframes_0) and (not ((v77 >= v73 and v78 >= v74) and v75 >= v79) or v76 < v80) then
            l_props_0.DeselectAllKeyframes();
        end;
        for v81, v82 in ipairs(v45.tracks) do
            if not l_IsChannelAnimation_0 then
                if v74 <= v81 and v81 <= v76 then
                    l_props_0.SelectKeyframeRange(v82.Instance, {
                        v82.Name
                    }, v73, v75, true);
                end;
            else
                local v83 = {};
                v42.traverseTracks(v82.Name, v82, function(_, _, v86)
                    local v87 = v40.getPathValue(v40.getRelativePath(v86));
                    local v88 = v81 + v87;
                    if not (not v83[v87] and v88 >= v74) or v76 < v88 then
                        return ;
                    else
                        v83[v87] = true;
                        l_props_0.SelectKeyframeRange(v82.Instance, v86, v73, v75, true);
                        return ;
                    end;
                end);
            end;
        end;
        if v74 == 0 then
            local v89 = v42.getSummaryKeyframes(v45.tracks, v73, v75);
            if #v89 > 0 then
                v42.traverseKeyframeRange(v89, v73, v75, function(v90)
                    l_props_0.SelectKeyframesAtTick(v90, true);
                end);
            end;
        end;
        v45.lastMinTick = v73;
        v45.lastMinTrack = v74;
        v45.lastMaxTick = v75;
        v45.lastMaxTrack = v76;
    end;
    v45.onSelectDragEnded = function()
        v45:setState({
            draggingSelection = v1.None
        });
        v45.updateSelectDragStart(nil);
        v45.updateSelectDragEnd(nil);
        v45.lastMinTick = nil;
        v45.lastMinTrack = nil;
        v45.lastMaxTick = nil;
        v45.lastMaxTrack = nil;
    end;
    v45.recalculateExtents = function(v91)
        v45:setState({
            AbsoluteSize = v91.AbsoluteSize,
            AbsolutePosition = v91.AbsolutePosition
        });
    end;
    v45.onEasingItemSelected = function(v92, v93)
        v45.props.SetSelectedKeyframeData({
            [v92] = v93
        });
    end;
    v45.onClearTangentsSelected = function(_, _)
        v45.props.SetSelectedKeyframeData({
            LeftSlope = v3.None,
            RightSlope = v3.None
        });
    end;
    v45.showMenu = function()
        v45.props.SetPlayState(v35.PLAY_STATE.Pause);
        v45:setState({
            showContextMenu = true
        });
    end;
    v45.hideMenu = function()
        v45:setState({
            showContextMenu = false
        });
    end;
    v45.setRenamingKeyframe = function(v96)
        v45:setState({
            renamingKeyframe = v96 or v1.None
        });
    end;
    v45.setChangingDuration = function(v97)
        v45:setState({
            changingDuration = v97 or v1.None
        });
    end;
    v45.setSelectedKeyframeDuration = function(v98)
        v45.setChangingDuration();
        local v99 = v41.parseTime(v98, v45.props.FrameRate, v45.props.TimelineUnit);
        if v99 ~= nil then
            local v100, v101 = v5.getSelectionBounds(v45.props.AnimationData, v45.props.SelectedKeyframes);
            v45.props.ScaleSelectedKeyframes(v100, v99 / (v101 - v100));
        end;
    end;
end;
v44.hasSelectedKeyframes = function(v102)
    local v103 = not not v102.DragContext and v102.DragContext.selectedKeyframe or v102.props.SelectedKeyframes;
    local v104 = false;
    if v103 ~= nil then
        v104 = not v38(v103);
    end;
    return v104;
end;
v44.multipleFramesSelected = function(v105)
    local v106 = not not v105.DragContext and v105.DragContext.animationData or v105.props.AnimationData;
    local v107 = not not v105.DragContext and v105.DragContext.selectedKeyframes or v105.props.SelectedKeyframes;
    local v108, v109 = v5.getSelectionBounds(v106, v107);
    return v107 and v108 ~= v109;
end;
v44.handleTimelineInputBegan = function(v110, v111, _)
    if v111.UserInputType == Enum.UserInputType.Keyboard then
        if v37.isMultiSelectKey(v111.KeyCode) then
            v110.isMultiSelecting = true;
            return ;
        end;
    elseif v111.UserInputType == Enum.UserInputType.MouseButton1 then
        v110.props.DeselectAllKeyframes();
        v110.mouseDownInTimeline = true;
        v110.onSelectDragStarted(v111);
    end;
end;
v44.handleTimelineInputEnded = function(v113, v114)
    if v114.UserInputType == Enum.UserInputType.Keyboard then
        if v37.isMultiSelectKey(v114.KeyCode) then
            v113.isMultiSelecting = false;
            return ;
        end;
    elseif v114.UserInputType == Enum.UserInputType.MouseButton1 then
        v113.mouseDownInTimeline = false;
        return ;
    elseif v114.UserInputType == Enum.UserInputType.MouseButton2 then
        local v115 = nil;
        local v116 = nil;
        local v117 = nil;
        local v118 = nil;
        local v119 = nil;
        if not v113.props.IsChannelAnimation then
            v116 = v113.tracks[v113.getTrackFromPosition(v114.Position)];
            if v116 then
                v115 = {
                    v116.Name
                };
                v118 = v116.Type;
                v119 = v42.getRotationType(v116);
            end;
        else
            local v120, v121, v122, v123 = v113.getTrackInfoFromPosition(v114.Position);
            v117 = v120;
            v115 = v121;
            v118 = v122;
            v119 = v123;
            v116 = v113.tracks[v117];
        end;
        v113.props.SetRightClickContextInfo({
            Tick = v113.getTickFromPosition(v114.Position, true),
            Path = v115,
            TrackType = v118,
            RotationType = v119,
            InstanceName = not not v116 and v116.Instance or nil
        });
        v113.showMenu();
    end;
end;
v44.handleKeyframeRightClick = function(v124, v125, v126, v127, _)
    local v129 = {
        Tick = v127,
        OnKeyframe = true
    };
    if v38(v124.props.SelectedKeyframes) then
        if v125 == nil then
            v124.props.SelectKeyframesAtTick(v127);
        else
            v124.props.SelectKeyframeRange(v125, v126, v127, v127, false);
        end;
    end;
    if v125 == nil then
        v129.SummaryKeyframe = v127;
    end;
    v124.props.SetRightClickContextInfo(v129);
    v124.showMenu();
end;
v44.handleKeyframeInputBegan = function(v130, v131, v132, v133, v134, v135)
    if not v130.props.ReadOnly and v135.UserInputType == Enum.UserInputType.MouseButton1 then
        v130.mouseDownOnKeyframe = true;
        if not v134 then
            if not v131 then
                v130.props.SelectKeyframesAtTick(v133, v130.isMultiSelecting);
            else
                v130.props.SelectKeyframeRange(v131, v132, v133, v133, v130.isMultiSelecting);
                return ;
            end;
        elseif v130.isMultiSelecting then
            if not v131 then
                v130.props.DeselectKeyframesAtTick(v133, v130.isMultiSelecting);
                return ;
            else
                v130.props.DeselectKeyframe(v131, v132, v133);
                return ;
            end;
        end;
    end;
end;
v44.handleKeyframeInputEnded = function(v136, v137, v138, v139)
    if not ((not (v139.UserInputType == Enum.UserInputType.MouseMovement) or not v138) or not v136.mouseDownOnKeyframe) then
        v136.onKeyframeDragStarted(v137);
        v136.onKeyframeDragMoved(v139);
        v136.mouseDownOnKeyframe = false;
    end;
    if v139.UserInputType == Enum.UserInputType.MouseButton1 then
        v136.mouseDownOnKeyframe = false;
    end;
end;
v44.makeTracks = function(v140)
    local l_props_1 = v140.props;
    local l_AnimationData_0 = l_props_1.AnimationData;
    local l_Tracks_0 = l_props_1.Tracks;
    local v144 = {};
    local function v145(v146, v147)
        v146.Keyframes = v147.Keyframes;
        v146.Data = v147.Data;
        v146.IsCurveTrack = v147.IsCurveTrack;
        v146.EulerAnglesOrder = v147.EulerAnglesOrder;
        local l_pairs_0 = pairs;
        local v149 = v147.Components or {};
        for v150, v151 in l_pairs_0(v149) do
            if v146.Components then
                local v152 = v146.Components[v150];
                if v152 then
                    v145(v152, v151);
                end;
            end;
        end;
    end;
    for v153, v154 in ipairs(l_Tracks_0) do
        v144[v153] = v4(v154);
        if l_AnimationData_0 then
            for _, v156 in pairs(l_AnimationData_0.Instances) do
                for v157, v158 in pairs(v156.Tracks) do
                    if v154.Name == v157 then
                        v145(v144[v153], v158);
                    end;
                end;
            end;
        end;
    end;
    return v144;
end;
v44.shouldUpdate = function(v159, v160, v161)
    if v161 ~= v159.state then
        return true;
    else
        for v162, _ in pairs(v160) do
            if v160[v162] ~= v159.props[v162] then
                return true;
            end;
        end;
        return false;
    end;
end;
v44.render = function(v164)
    local l_props_2 = v164.props;
    local l_state_0 = v164.state;
    local l_dragging_0 = l_state_0.dragging;
    local l_draggingScale_0 = l_state_0.draggingScale;
    local l_draggingSelection_0 = l_state_0.draggingSelection;
    local l_AbsoluteSize_0 = l_state_0.AbsoluteSize;
    local l_AbsolutePosition_0 = l_state_0.AbsolutePosition;
    local l_showContextMenu_0 = l_state_0.showContextMenu;
    local l_renamingKeyframe_0 = l_state_0.renamingKeyframe;
    local l_changingDuration_0 = l_state_0.changingDuration;
    local l_Active_0 = l_props_2.Active;
    local l_AnimationData_1 = l_props_2.AnimationData;
    local l_SelectedKeyframes_1 = l_props_2.SelectedKeyframes;
    local l_StartTick_0 = l_props_2.StartTick;
    local l_EndTick_0 = l_props_2.EndTick;
    local l_TrackPadding_0 = l_props_2.TrackPadding;
    local l_TopTrackIndex_1 = l_props_2.TopTrackIndex;
    local l_ShowEvents_0 = l_props_2.ShowEvents;
    local l_Localization_0 = l_props_2.Localization;
    local l_FrameRate_0 = l_props_2.FrameRate;
    local v185 = if not v43() then l_props_2.ShowAsSeconds else nil;
    local l_TimelineUnit_0 = l_props_2.TimelineUnit;
    local l_IsChannelAnimation_1 = l_props_2.IsChannelAnimation;
    local v188 = l_props_2.ColorsPosition or 0;
    local l_Tracks_1 = l_props_2.Tracks;
    local v190 = (not not l_AnimationData_1 and l_AnimationData_1.Events) and l_AnimationData_1.Events.NamedKeyframes or {};
    local _ = l_Localization_0:getText("Toast", "QuantizeWarning");
    local l_Loaded_0 = l_props_2.Loaded;
    local l_Saved_0 = l_props_2.Saved;
    local l_ClippedWarning_0 = l_props_2.ClippedWarning;
    local l_InvalidIdWarning_0 = l_props_2.InvalidIdWarning;
    local v196 = not l_ClippedWarning_0;
    local l_Size_0 = l_props_2.Size;
    local l_Position_1 = l_props_2.Position;
    local v199 = v164:hasSelectedKeyframes() and v164:multipleFramesSelected();
    local v200 = nil;
    if l_changingDuration_0 then
        local v201, v202 = v5.getSelectionBounds(v164.props.AnimationData, v164.props.SelectedKeyframes);
        v200 = ((v202 - v201) * l_props_2.FrameRate) / v35.TICK_FREQUENCY;
    end;
    v164.tracks = v164:makeTracks();
    if not l_AnimationData_1 or not l_AnimationData_1.Instances.Root then
        return v1.createElement("Frame", {
            Size = l_Size_0,
            Position = l_Position_1,
            BackgroundTransparency = 1,
            [v1.Change.AbsoluteSize] = v164.recalculateExtents
        });
    else
        local l_createElement_0 = v1.createElement;
        local v204 = "Frame";
        local v205 = {
            Size = l_Size_0,
            Position = l_Position_1,
            BackgroundTransparency = 1,
            ZIndex = l_props_2.ZIndex,
            [v1.Event.InputChanged] = v164.props.OnInputChanged
        };
        local v206 = {
            Layout = v1.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Vertical,
                SortOrder = Enum.SortOrder.LayoutOrder
            }),
            Events = l_ShowEvents_0 and v1.createElement(v18, {
                AbsolutePosition = l_AbsolutePosition_0 - Vector2.new(0, v35.TRACK_HEIGHT),
                AbsoluteSize = Vector2.new(l_AbsoluteSize_0.X, v35.TRACK_HEIGHT),
                AnimationData = l_AnimationData_1,
                StartTick = l_StartTick_0,
                EndTick = l_EndTick_0,
                TrackPadding = l_TrackPadding_0
            })
        };
        local l_createElement_1 = v1.createElement;
        local v208 = "Frame";
        local v213 = {
            Size = not not l_ShowEvents_0 and UDim2.new(1, 0, 1, -v35.TRACK_HEIGHT) or UDim2.new(1, 0, 1, 0),
            BackgroundTransparency = 1,
            LayoutOrder = 1,
            ClipsDescendants = true,
            [v1.Change.AbsoluteSize] = v164.recalculateExtents,
            [v1.Event.InputBegan] = function(_, v210)
                if v210.UserInputType ~= Enum.UserInputType.Keyboard then
                    v164:handleTimelineInputBegan(v210);
                end;
            end,
            [v1.Event.InputEnded] = function(_, v212)
                if v212.UserInputType ~= Enum.UserInputType.Keyboard then
                    v164:handleTimelineInputEnded(v212);
                end;
            end
        };
        local v230 = {
            KeyboardListener = v1.createElement(l_KeyboardListener_0, {
                OnKeyPressed = function(v214, v215)
                    v164:handleTimelineInputBegan(v214, v215);
                end,
                OnKeyReleased = function(v216)
                    v164:handleTimelineInputEnded(v216);
                end
            }),
            DopeSheet = v1.createElement(v16, {
                Size = UDim2.new(1, 0, 1, 0),
                ParentSize = l_AbsoluteSize_0,
                Padding = l_props_2.TrackPadding,
                StartTick = l_StartTick_0,
                EndTick = l_EndTick_0,
                TopTrackIndex = l_TopTrackIndex_1,
                SelectedKeyframes = l_props_2.SelectedKeyframes,
                SelectedEvents = l_props_2.SelectedEvents,
                Tracks = v164.tracks,
                IsChannelAnimation = l_IsChannelAnimation_1,
                NamedKeyframes = v190,
                TrackHeight = v35.TRACK_HEIGHT,
                SummaryTrackHeight = v35.SUMMARY_TRACK_HEIGHT,
                ZIndex = 1,
                OnKeyRightClick = function(v217, v218, v219, v220)
                    v164:handleKeyframeRightClick(v217, v218, v219, v220);
                end,
                OnKeyInputBegan = function(v221, v222, v223, v224, v225)
                    v164:handleKeyframeInputBegan(v221, v222, v223, v224, v225);
                end,
                OnKeyInputEnded = function(v226, v227, v228)
                    v164:handleKeyframeInputEnded(v226, v227, v228);
                end
            }),
            DragTarget = l_dragging_0 and v1.createElement(l_DragListener_0, {
                OnDragMoved = v164.onKeyframeDragMoved,
                OnDragEnded = v164.onKeyframeDragEnded
            }),
            MultiSelectBox = l_draggingSelection_0 and v1.createElement(v19, {
                OnDragMoved = v164.onSelectDragMoved,
                OnDragEnded = v164.onSelectDragEnded,
                SelectionStart = v164.selectDragStart,
                SelectionEnd = v164.selectDragEnd,
                SourceExtents = Rect.new(l_AbsolutePosition_0, l_AbsolutePosition_0 + l_AbsoluteSize_0)
            }),
            TimelineActions = l_Active_0 and v1.createElement(v20, {
                ShowMenu = l_showContextMenu_0,
                MultipleSelected = v199,
                IsChannelAnimation = l_IsChannelAnimation_1,
                OnMenuOpened = v164.hideMenu,
                OnItemSelected = v164.onEasingItemSelected,
                OnClearTangentsSelected = v164.onClearTangentsSelected,
                OnGenerateCurve = v164.props.GenerateCurve,
                OnRenameKeyframe = function(v229)
                    spawn(function()
                        v164.setRenamingKeyframe(v229);
                    end);
                end,
                OnChangeDuration = function()
                    spawn(function()
                        v164.setChangingDuration(true);
                    end);
                end
            }),
            ScaleControls = (v199 and not l_draggingSelection_0) and v1.createElement(v21, {
                SelectedKeyframes = l_SelectedKeyframes_1,
                StartTick = l_StartTick_0,
                EndTick = l_EndTick_0,
                TopTrackIndex = l_TopTrackIndex_1,
                Tracks = v164.tracks,
                TrackPadding = l_TrackPadding_0,
                Dragging = l_draggingScale_0 or l_dragging_0,
                ShowAsSeconds = if not v43() then v185 else nil,
                TimelineUnit = l_TimelineUnit_0,
                FrameRate = l_FrameRate_0,
                DopeSheetWidth = l_AbsoluteSize_0.X - l_props_2.TrackPadding,
                ZIndex = 2,
                ShowSelectionArea = true,
                IsChannelAnimation = l_IsChannelAnimation_1,
                OnScaleHandleDragStart = v164.onScaleHandleDragStarted,
                OnScaleHandleDragEnd = v164.onScaleHandleDragEnded,
                OnScaleHandleDragMoved = v164.onScaleHandleDragMoved
            })
        };
        local v231 = false;
        if l_renamingKeyframe_0 ~= nil then
            v231 = v1.createElement(v22, {
                PromptText = l_Localization_0:getText("ContextMenu", "RenameKeyframe"),
                InputText = l_Localization_0:getText("Menu", "RenameKeyframePrompt"),
                Text = v190[l_renamingKeyframe_0] or v35.DEFAULT_KEYFRAME_NAME,
                Buttons = {
                    {
                        Key = "Delete",
                        Text = l_Localization_0:getText("Dialog", "Delete"),
                        Style = "Round"
                    },
                    {
                        Key = false,
                        Text = l_Localization_0:getText("Dialog", "Cancel"),
                        Style = "Round"
                    },
                    {
                        Key = true,
                        Text = l_Localization_0:getText("Dialog", "Save"),
                        Style = "RoundPrimary"
                    }
                },
                OnButtonClicked = function(v232)
                    if v232 == "Delete" then
                        v164.setRenamingKeyframe();
                        l_props_2.RenameKeyframe(l_renamingKeyframe_0, v35.DEFAULT_KEYFRAME_NAME, l_props_2.Analytics);
                    end;
                end,
                OnTextSubmitted = function(v233)
                    v164.setRenamingKeyframe();
                    l_props_2.RenameKeyframe(l_renamingKeyframe_0, v233, l_props_2.Analytics);
                end,
                OnClose = v164.setRenamingKeyframe
            });
        end;
        v230.RenameKeyframePrompt = v231;
        v230.ChangeDurationPrompt = v200 and v1.createElement(v22, {
            PromptText = l_Localization_0:getText("Title", "ChangeDuration"),
            InputText = l_Localization_0:getText("Title", "NewDuration"),
            NoticeText = l_Localization_0:getText("Title", "CurrentDuration_Migrated", {
                currentDuration = v200
            }),
            Text = v200,
            Buttons = {
                {
                    Key = false,
                    Text = l_Localization_0:getText("Dialog", "Cancel"),
                    Style = "Round"
                },
                {
                    Key = true,
                    Text = l_Localization_0:getText("Dialog", "Save"),
                    Style = "RoundPrimary"
                }
            },
            OnTextSubmitted = v164.setSelectedKeyframeDuration,
            OnClose = v164.setChangingDuration
        });
        v230.ClippedToast = l_ClippedWarning_0 and v1.createElement(v23, {
            Text = l_Localization_0:getText("Toast", "ClippedWarning"),
            OnClose = l_props_2.CloseClippedToast
        });
        v230.SavedToast = l_Saved_0 and v1.createElement(v23, {
            Text = l_Localization_0:getText("Toast", "Saved_Migrated", {
                savedAnimName = l_Saved_0
            }),
            OnClose = l_props_2.CloseSavedToast
        });
        v230.LoadedToast = (v196 and l_Loaded_0) and v1.createElement(v23, {
            Text = l_Localization_0:getText("Toast", "Loaded_Migrated", {
                loadedAnimName = l_Loaded_0
            }),
            OnClose = l_props_2.CloseLoadedToast
        });
        v230.InvalidId = l_InvalidIdWarning_0 and v1.createElement(v23, {
            Text = l_Localization_0:getText("Toast", "InvalidAnimation"),
            OnClose = l_props_2.CloseInvalidAnimationToast
        });
        v206.DopeSheetContainer = l_createElement_1(v208, v213, v230);
        v206.IgnoreLayout = v1.createElement("Folder", {}, {
            TrackColors = v1.createElement(v17, {
                Tracks = l_Tracks_1,
                TopTrackIndex = l_TopTrackIndex_1,
                Position = UDim2.new(0, 0, 0, v188),
                MaxHeight = l_AbsoluteSize_0.Y - v188
            })
        });
        return l_createElement_0(v204, v205, v206);
    end;
end;
return v2.connect(function(v234, _)
    local l_Status_0 = v234.Status;
    return {
        Active = l_Status_0.Active,
        SelectedKeyframes = l_Status_0.SelectedKeyframes,
        Clipboard = l_Status_0.Clipboard,
        AnimationData = v234.AnimationData,
        QuantizeWarning = v234.Notifications.QuantizeWarning,
        Saved = v234.Notifications.Saved,
        Loaded = v234.Notifications.Loaded,
        ClippedWarning = v234.Notifications.ClippedWarning,
        FrameRate = l_Status_0.FrameRate,
        SnapMode = l_Status_0.SnapMode,
        InvalidIdWarning = v234.Notifications.InvalidAnimation,
        Tracks = l_Status_0.Tracks,
        ReadOnly = l_Status_0.ReadOnly
    };
end, function(v237)
    return {
        AddWaypoint = function()
            v237(v24());
        end,
        MoveSelectedKeyframes = function(v238, v239, v240)
            v237(v29(v238, v239, nil, nil, v240));
        end,
        ScaleSelectedKeyframes = function(v241, v242, v243)
            v237(v30(v241, v242, v243));
        end,
        DeselectKeyframe = function(v244, v245, v246)
            v237(v26(v244, v245, v246));
        end,
        SelectKeyframeRange = function(v247, v248, v249, v250, v251)
            v237(v15({}));
            v237(v25(v247, v248, v249, v250, v251));
        end,
        SelectKeyframesAtTick = function(v252, v253)
            v237(v15({}));
            v237(v27(v252, v253));
        end,
        DeselectKeyframesAtTick = function(v254, v255)
            v237(v28(v254, v255));
        end,
        DeselectAllKeyframes = function()
            v237(v14({}));
            v237(v15({}));
        end,
        SetRightClickContextInfo = function(v256)
            v237(v13(v256));
        end,
        SetSelectedKeyframeData = function(v257)
            v237(v24());
            v237(v31(v257));
        end,
        RenameKeyframe = function(v258, v259, v260)
            v237(v24());
            v237(v33(v258, v259, v260));
        end,
        CloseSavedToast = function()
            v237(v11("Saved", false));
        end,
        CloseLoadedToast = function()
            v237(v11("Loaded", false));
        end,
        CloseClippedToast = function()
            v237(v11("ClippedWarning", false));
        end,
        CloseInvalidAnimationToast = function()
            v237(v11("InvalidAnimation", false));
        end,
        GenerateCurve = function(v261, v262)
            v237(v24());
            v237(v32(v261, v262));
        end,
        SetPlayState = function(v263)
            v237(v12(v263));
        end
    };
end)((l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Analytics = l_ContextServices_0.Analytics
})(v44)));


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.Components.BaseTrack);
local v3 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local v4 = require(l_script_FirstAncestor_0.Src.Util.TrackUtils);
local v5 = require(l_script_FirstAncestor_0.Src.Components.Timeline.Keyframe);
local v6 = require(l_script_FirstAncestor_0.Src.Components.KeyframeCluster);
local v7 = require(l_script_FirstAncestor_0.Src.Components.Tooltip);
local v8 = v1.PureComponent:extend("DopeSheetTrack");
v8.renderKeyframe = function(v9, v10, v11, v12, v13, v14, v15, v16)
    local l_props_0 = v9.props;
    local v18 = l_props_0.Path or {
        v12.Name
    };
    local v19 = nil;
    v19 = if not l_props_0.IsChannelAnimation then ((not not v15 and v15.EasingStyle) and v15.EasingStyle ~= Enum.PoseEasingStyle.Linear) and v15.EasingStyle.Name .. ", " .. v15.EasingDirection.Name or nil else ((not not v15 and v15.InterpolationMode) and v15.InterpolationMode ~= Enum.KeyInterpolationMode.Linear) and v15.InterpolationMode.Name or nil;
    return v1.createElement(v5, {
        Selected = v10,
        Position = UDim2.new(0, v11, 0.5, 0),
        ZIndex = l_props_0.ZIndex,
        Width = v3.KEYFRAME_WIDTH,
        BorderSizePixel = not v10 and 1 or 2,
        KeyframeStyle = v3.KEYFRAME_STYLE[v14] or nil,
        Filled = v16,
        OnActivated = l_props_0.OnKeyActivated,
        OnRightClick = function(_, _)
            l_props_0.OnKeyRightClick(v12.Instance, v18, v13, v10);
        end,
        OnInputBegan = function(_, v23)
            l_props_0.OnKeyInputBegan(v12.Instance, v18, v13, v10, v23);
        end,
        OnInputEnded = function(_, v25)
            l_props_0.OnKeyInputEnded(v13, v10, v25);
        end
    }, {
        Tooltip = not not v19 and v1.createElement(v7, {
            Text = v19,
            ShowDelay = 0
        }) or nil
    });
end;
v8.renderKeyframeCluster = function(_, v27, v28, v29, v30)
    return v1.createElement(v6, {
        Position = UDim2.new(0, v27, 0.5, 0),
        Size = UDim2.new(0, v28 - v27, 0, v29),
        ZIndex = v30
    });
end;
v8.renderKeyframes = function(v31, v32)
    local l_props_1 = v31.props;
    local l_Width_0 = l_props_1.Width;
    local l_Track_0 = l_props_1.Track;
    local l_StartTick_0 = l_props_1.StartTick;
    local l_EndTick_0 = l_props_1.EndTick;
    local l_SelectedKeyframes_0 = l_props_1.SelectedKeyframes;
    local l_ShowCluster_0 = l_props_1.ShowCluster;
    local l_IsChannelAnimation_0 = l_props_1.IsChannelAnimation;
    local v41 = l_props_1.Path or {
        l_Track_0.Name
    };
    local l_Keyframes_0 = l_Track_0.Keyframes;
    local l_Data_0 = l_Track_0.Data;
    local l_Instance_0 = l_Track_0.Instance;
    if not l_ShowCluster_0 then
        local v45 = v4.getComponentsInfo(l_Track_0, l_StartTick_0, l_EndTick_0);
        local v46 = l_SelectedKeyframes_0[l_Instance_0];
        for _, v48 in ipairs(v41) do
            if v46 then
                v46 = not not v46.Components and v46.Components[v48] or v46[v48];
            else
                break;
            end;
        end;
        for v49, v50 in pairs(v45) do
            local v51 = nil;
            local v52 = l_Data_0 and l_Data_0[v49];
            local v53 = not l_IsChannelAnimation_0 or v50.Complete;
            if v45[v49].Complete then
                v51 = not not l_IsChannelAnimation_0 and v45[v49].InterpolationMode or v45[v49].EasingStyle;
            end;
            table.insert(v32, v31:renderKeyframe((v46 and v46.Selection) and v46.Selection[v49], v4.getScaledKeyframePosition(v49, l_StartTick_0, l_EndTick_0, l_Width_0), l_Track_0, v49, v51, v52, v53));
        end;
    else
        local v54, v55 = v4.getKeyframesExtents(l_Keyframes_0, l_StartTick_0, l_EndTick_0);
        if v54 ~= nil and v55 ~= nil then
            v32[v55] = v31:renderKeyframeCluster(v4.getScaledKeyframePosition(l_Keyframes_0[v54], l_StartTick_0, l_EndTick_0, l_Width_0), v4.getScaledKeyframePosition(l_Keyframes_0[v55], l_StartTick_0, l_EndTick_0, l_Width_0), v3.MIN_SPACE_BETWEEN_KEYS);
            return ;
        end;
    end;
end;
v8.render = function(v56)
    local l_props_2 = v56.props;
    local v58 = {};
    v56:renderKeyframes(v58);
    return v1.createElement(v2, l_props_2, v58);
end;
return 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.Packages.Framework);
local l_ContextServices_0 = v2.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_DragListener_0 = v2.UI.DragListener;
local v6 = v1.PureComponent:extend("DragListenerArea");
v6.init = function(v7)
    v7.state = {
        Dragging = false
    };
    v7.onMouseEnter = function()
        if v7.props.Mouse then
            v7.props.Mouse:__pushCursor(v7.props.Cursor);
        end;
    end;
    v7.onMouseLeave = function()
        if not (not v7.props.Mouse or v7.state.Dragging) then
            v7.props.Mouse:__popCursor();
        end;
    end;
    v7.startDragging = function()
        if v7.props.OnDragBegan then
            v7.props.OnDragBegan();
        end;
        v7:setState({
            Dragging = true
        });
    end;
    v7.onDragMoved = function(v8)
        if v7.props.OnDragMoved then
            v7.props.OnDragMoved(v8);
        end;
    end;
end;
v6.didMount = function(v9)
    local l_Mouse_0 = v9.props.Mouse;
    v9.stopDragging = function()
        l_Mouse_0:__resetCursor();
        v9:setState({
            Dragging = false
        });
        if v9.props.OnDragEnded then
            v9.props.OnDragEnded();
        end;
    end;
end;
v6.willUnmount = function(v11)
    v11.props.Mouse:__resetCursor();
end;
v6.render = function(v12)
    local l_state_0 = v12.state;
    local l_props_0 = v12.props;
    return v1.createElement("ImageButton", {
        Size = l_props_0.Size or UDim2.new(1, 0, 1, 0),
        AnchorPoint = l_props_0.AnchorPoint or Vector2.new(),
        ImageTransparency = 1,
        BackgroundTransparency = 1,
        [v1.Event.MouseEnter] = v12.onMouseEnter,
        [v1.Event.MouseLeave] = v12.onMouseLeave,
        [v1.Event.MouseButton1Down] = v12.startDragging
    }, {
        Target = l_state_0.Dragging and v1.createElement(l_DragListener_0, {
            OnDragMoved = v12.onDragMoved,
            OnDragEnded = v12.stopDragging
        })
    });
end;
return (l_withContext_0({
    Mouse = l_ContextServices_0.Mouse
})(v6));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Packages.Roact);
local _ = require(l_script_FirstAncestor_0.Packages.RoactRodux);
local l_DraggerFramework_0 = l_script_FirstAncestor_0.Packages.DraggerFramework;
local v4 = require(l_DraggerFramework_0.DraggerTools.DraggerToolComponent);
local v5 = require(l_DraggerFramework_0.Handles.MoveHandles);
local v6 = require(l_DraggerFramework_0.Handles.RotateHandles);
local _ = require(l_DraggerFramework_0.Handles.ExtrudeHandles);
local v8 = require(l_script_FirstAncestor_0.Src.Util.DraggerSchema.DraggerSchema);
local v9 = v1.PureComponent:extend("AnimationClipEditorDragger");
v9.render = function(v10)
    local l_props_0 = v10.props;
    local l_Mouse_0 = l_props_0.Mouse;
    local l_Tool_0 = l_props_0.Tool;
    local l_Context_0 = l_props_0.Context;
    local function v18(v15, v16, v17)
        return v15:moveToWithIk(v16, v17);
    end;
    local function v22(v19, v20, v21)
        return v19:rotateToWithIk(v20, v21);
    end;
    local v23 = {};
    if l_Tool_0 == Enum.RibbonTool.Move then
        table.insert(v23, v5.new(l_Context_0, nil, v8.TransformHandlesImplementation.new(l_Context_0, v18, Enum.RibbonTool.Move)));
    elseif l_Tool_0 == Enum.RibbonTool.Rotate then
        table.insert(v23, v6.new(l_Context_0, nil, v8.TransformHandlesImplementation.new(l_Context_0, v22, Enum.RibbonTool.Rotate)));
    end;
    return v1.createElement(v4, {
        Mouse = l_Mouse_0,
        DraggerContext = l_Context_0,
        DraggerSchema = v8,
        DraggerSettings = {
            AnalyticsName = "AnimationClipEditor" .. l_Tool_0.Name,
            AllowDragSelect = false,
            AllowFreeformDrag = false,
            ShowLocalSpaceIndicator = true,
            HandlesList = v23
        }
    });
end;
return v9;


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.Cryo);
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.Context.Signals);
local v7 = require(l_script_FirstAncestor_0.Src.Actions.SetSelectedTrackInstances);
local v8 = require(l_script_FirstAncestor_0.Src.Components.Draggers.AnimationClipEditorDragger);
local v9 = require(l_script_FirstAncestor_0.Packages.DraggerFramework.Implementation.DraggerContext_PluginImpl);
local l_Thunks_0 = l_script_FirstAncestor_0.Src.Thunks;
local v11 = require(l_Thunks_0.History.AddWaypoint);
local v12 = require(l_Thunks_0.SetSelectedTrackInstances);
local v13 = require(l_Thunks_0.SortAndSetSelectedTrackInstances);
local v14 = require(l_Thunks_0.ValueChanged);
local l_Util_0 = l_script_FirstAncestor_0.Src.Util;
local v16 = require(l_Util_0.AnimationData);
local v17 = require(l_Util_0.Constants);
local v18 = require(l_Util_0.DraggerSchema.DraggerSchema);
local _ = require(l_Util_0.RigUtils);
local v20 = require(l_Util_0.TrackUtils);
local v21 = require(l_script_FirstAncestor_0.LuaFlags.GetFFlagMultiSelectionTransform);
local v22 = require(l_script_FirstAncestor_0.LuaFlags.GetFFlagSelectFromViewport);
local v23 = v1.PureComponent:extend("DraggerWrapper");
v23.didUpdate = function(v24, v25)
    local l_props_0 = v24.props;
    if v24.selection and l_props_0.SelectedTrackInstances ~= v25.SelectedTrackInstances then
        v24.selection.selectedTrackInstances = l_props_0.SelectedTrackInstances;
        v24.props.Signals:get(v17.SIGNAL_KEYS.SelectionChanged):Fire();
    end;
end;
local function v43(v27, v28)
    v27.RootInstance = v28.RootInstance;
    v27.IKMode = v28.IKMode;
    v27.StartingPose = v28.StartingPose;
    v27.PinnedParts = v28.PinnedParts;
    v27.IKEnabled = v28.IKEnabled;
    v27.Tool = v28.Tool;
    v27.IsPlaying = v28.PlayState ~= v17.PLAY_STATE.Pause;
    v27.VisualizeBones = v28.VisualizeBones;
    v27.ScrubberSignal = v28.Signals:get(v17.SIGNAL_KEYS.ScrubberChanged);
    v27.OnManipulateJoints = function(v29, v30)
        if v28.ReadOnly or v28.PlayState ~= v17.PLAY_STATE.Pause then
            return ;
        else
            if v27.RootInstance:IsA("Model") then
                local l_Scale_0 = v27.RootInstance:GetScale();
                for v32, v33 in v30, nil, nil do
                    v30[v32] = v33.Rotation + v33.Position / l_Scale_0;
                end;
            end;
            for v34, v35 in pairs(v30) do
                local v36 = {
                    v34
                };
                if v16.isChannelAnimation(v28.AnimationData) then
                    local v37 = nil;
                    local l_DefaultEulerAnglesOrder_0 = v28.DefaultEulerAnglesOrder;
                    v37 = v20.getRotationTypeFromName(v34, v28.Tracks) or v28.DefaultRotationType;
                    if v37 == v17.TRACK_TYPES.EulerAngles then
                        l_DefaultEulerAnglesOrder_0 = v20.getEulerAnglesOrder((v16.getTrack(v28.AnimationData, "Root", v36))) or l_DefaultEulerAnglesOrder_0;
                    end;
                    do
                        local l_v37_0 = v37;
                        v20.traverseValue(v17.TRACK_TYPES.CFrame, v35, function(v40, v41, v42)
                            v28.ValueChanged(v29, v3.List.join(v36, v41), v40, l_v37_0, v28.Playhead, v42, v28.Analytics);
                        end, l_v37_0, l_DefaultEulerAnglesOrder_0);
                    end;
                else
                    v28.ValueChanged(v29, v36, v17.TRACK_TYPES.CFrame, nil, v28.Playhead, v35, v28.Analytics);
                end;
            end;
            return ;
        end;
    end;
end;
local function v48(v44)
    local v45 = v44.Plugin:get();
    local v46 = v18.Selection.new(v44.Signals:get(v17.SIGNAL_KEYS.SelectionChanged), if not v21() then v44.SetSelectedTrackInstances else v44.SortAndSetSelectedTrackInstances);
    local v47 = v9.new(v45, game, settings(), v46);
    v47.AddWaypoint = function()
        v44.AddWaypoint();
    end;
    return v46, v47;
end;
v23.render = function(v49)
    local l_props_1 = v49.props;
    local l_Tool_0 = l_props_1.Tool;
    local v52 = l_props_1.Mouse:get();
    if not v49.draggerContext then
        if l_props_1.AnimationData ~= nil then
            local v53, v54 = v48(l_props_1);
            v49.selection = v53;
            v49.draggerContext = v54;
        else
            return ;
        end;
    end;
    if l_props_1.AnimationData ~= nil then
        v43(v49.draggerContext, l_props_1);
    end;
    return v1.createElement(v8, {
        Context = v49.draggerContext,
        Tool = l_Tool_0,
        Mouse = v52
    });
end;
return v2.connect(function(v55, _)
    local l_Status_0 = v55.Status;
    return {
        Tool = v55.Status.Tool,
        SelectedTrackInstances = v55.Status.SelectedTrackInstances,
        RootInstance = v55.Status.RootInstance,
        IKMode = v55.Status.IKMode,
        StartingPose = v55.Status.StartingPose,
        PinnedParts = v55.Status.PinnedParts,
        IKEnabled = v55.Status.IKEnabled,
        Playhead = v55.Status.Playhead,
        Tracks = v55.Status.Tracks,
        PlayState = l_Status_0.PlayState,
        AnimationData = v55.AnimationData,
        DefaultRotationType = l_Status_0.DefaultRotationType,
        DefaultEulerAnglesOrder = l_Status_0.DefaultEulerAnglesOrder,
        VisualizeBones = v55.Status.VisualizeBones,
        ReadOnly = v55.Status.ReadOnly
    };
end, function(v58)
    return {
        SetSelectedTrackInstances = if v21() then nil else function(v59)
            if not v22() then
                v58(v7(v59));
                return ;
            else
                v58(v12(v59));
                return ;
            end;
        end,
        SortAndSetSelectedTrackInstances = function(v60)
            v58(v13(v60));
        end,
        ValueChanged = function(v61, v62, v63, v64, v65, v66, v67)
            v58(v14(v61, v62, v63, v64, v65, v66, v67));
        end,
        AddWaypoint = function()
            v58(v11());
        end
    };
end)((l_withContext_0({
    Plugin = l_ContextServices_0.Plugin,
    PluginActions = l_ContextServices_0.PluginActions,
    Signals = v6,
    Mouse = l_ContextServices_0.Mouse,
    Analytics = l_ContextServices_0.Analytics
})(v23)));


local v0 = UDim2.new(0, 9, 0, 8);
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.Framework);
local v4 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v7 = v2.PureComponent:extend("AddEventEntry");
v7.init = function(v8)
    v8.mouseEnter = function()
        if v8.props.Mouse then
            v8.props.Mouse:__pushCursor("PointingHand");
        end;
    end;
    v8.mouseLeave = function()
        if v8.props.Mouse then
            v8.props.Mouse:__popCursor();
        end;
    end;
end;
v7.render = function(v9)
    local l_Localization_0 = v9.props.Localization;
    local l_props_0 = v9.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_Size_0 = l_props_0.Size;
    local l_PaddingLeft_0 = l_props_0.PaddingLeft;
    local l_PaddingRight_0 = l_props_0.PaddingRight;
    local l_dialogTheme_0 = l_Stylizer_0.dialogTheme;
    return v2.createElement("ImageButton", {
        Size = l_Size_0,
        BackgroundTransparency = 1,
        AutoButtonColor = false,
        [v2.Event.Activated] = l_props_0.OnAddEvent,
        [v2.Event.MouseEnter] = v9.mouseEnter,
        [v2.Event.MouseLeave] = v9.mouseLeave
    }, {
        Padding = v2.createElement("UIPadding", {
            PaddingLeft = l_PaddingLeft_0,
            PaddingRight = l_PaddingRight_0,
            PaddingTop = UDim.new(0, 2),
            PaddingBottom = UDim.new(0, 2)
        }),
        Label = v2.createElement("TextLabel", {
            Size = UDim2.new(1, -v4.TRACKLIST_BUTTON_SIZE, 1, 0),
            Text = l_Localization_0:getText("Title", "AddEvent"),
            TextColor3 = l_dialogTheme_0.subTextColor,
            Font = l_Stylizer_0.font,
            TextSize = l_dialogTheme_0.textSize,
            TextXAlignment = Enum.TextXAlignment.Left,
            BackgroundTransparency = 1
        }),
        AddImage = v2.createElement("ImageLabel", {
            Size = v0,
            AnchorPoint = Vector2.new(0.5, 0.5),
            Position = UDim2.new(0, -l_PaddingLeft_0.Offset / 2, 0.5, 0),
            BackgroundTransparency = 1,
            Image = l_dialogTheme_0.addImage,
            ImageColor3 = l_dialogTheme_0.subTextColor
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization,
    Mouse = l_ContextServices_0.Mouse
})(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 v3 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local l_ContextServices_0 = v2.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v6 = require(l_script_FirstAncestor_0.Src.Components.ContextMenu);
local v7 = v1.PureComponent:extend("EditEventMenu");
v7.makeMenuActions = function(v8, v9)
    local l_props_0 = v8.props;
    local v11 = {};
    local function v13(v12)
        l_props_0.OnMenuItemClicked(v12.Data);
    end;
    table.insert(v11, {
        Text = v9:getText("ContextMenu", "EditEventName"),
        Data = v3.ACTION_KEYS.Edit,
        OnItemClicked = v13
    });
    table.insert(v11, {
        Text = v9:getText("ContextMenu", "DeleteAllSameEvents"),
        Data = v3.ACTION_KEYS.Delete,
        OnItemClicked = v13
    });
    return v11;
end;
v7.render = function(v14)
    local l_Localization_0 = v14.props.Localization;
    local l_props_1 = v14.props;
    return not not l_props_1.ShowMenu and v1.createElement(v6, {
        Actions = v14:makeMenuActions(l_Localization_0),
        OnMenuOpened = l_props_1.OnMenuOpened
    }) or nil;
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.Src.Util.Constants);
local v2 = v1.PROMPT_BUTTON_SIZE.Y + 30;
local v3 = require(l_script_FirstAncestor_0.Packages.Roact);
local v4 = require(l_script_FirstAncestor_0.Packages.Cryo);
local v5 = require(l_script_FirstAncestor_0.Src.Util.LayoutOrderIterator);
local v6 = require(l_script_FirstAncestor_0.Src.Util.AnimationData);
local v7 = require(l_script_FirstAncestor_0.Src.Util.deepCopy);
local v8 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_StyledDialog_0 = v8.UI.StyledDialog;
local l_ContextServices_0 = v8.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v12 = require(l_script_FirstAncestor_0.Src.Components.TextBox);
local v13 = require(l_script_FirstAncestor_0.Src.Components.EditEventsDialog.EventNameEntry);
local v14 = require(l_script_FirstAncestor_0.Src.Components.EditEventsDialog.AddEventEntry);
local v15 = require(l_script_FirstAncestor_0.Src.Components.EditEventsDialog.FocusedPrompt);
local v16 = v3.PureComponent:extend("EditEventsDialog");
v16.init = function(v17, v18)
    v17.state = {
        CurrentEvents = v7(v18.Events),
        deleteAllName = nil,
        renameAllNames = nil
    };
    v17.onButtonClicked = function(v19)
        if v19 then
            v17.props.OnSaved(v17.state.CurrentEvents);
        end;
        v17.props.OnClose();
    end;
    v17.onAddEvent = function()
        local l_CurrentEvents_0 = v17.state.CurrentEvents;
        v6.addEvent(l_CurrentEvents_0, v17.props.Tick, "", "");
        v17:setState({
            CurrentEvents = l_CurrentEvents_0
        });
    end;
    v17.onRenameEvent = function(v21, v22)
        local l_CurrentEvents_1 = v17.state.CurrentEvents;
        local l_Tick_0 = v17.props.Tick;
        if not (not l_CurrentEvents_1.Data[l_Tick_0] or not l_CurrentEvents_1.Data[l_Tick_0][v21]) then
            local v25 = l_CurrentEvents_1.Data[l_Tick_0][v21];
            v6.removeEvent(l_CurrentEvents_1, l_Tick_0, v21);
            v6.addEvent(l_CurrentEvents_1, l_Tick_0, v22, v25);
        end;
        v17:setState({
            CurrentEvents = l_CurrentEvents_1
        });
    end;
    v17.onSetEventValue = function(v26, v27)
        local l_CurrentEvents_2 = v17.state.CurrentEvents;
        v6.setEventValue(l_CurrentEvents_2, v17.props.Tick, v26, v27);
        v17:setState({
            CurrentEvents = l_CurrentEvents_2
        });
    end;
    v17.onDeleteEvent = function(v29)
        local l_CurrentEvents_3 = v17.state.CurrentEvents;
        v6.removeEvent(l_CurrentEvents_3, v17.props.Tick, v29);
        v17:setState({
            CurrentEvents = l_CurrentEvents_3
        });
    end;
    v17.onDeleteAllEvents = function(v31)
        local l_CurrentEvents_4 = v17.state.CurrentEvents;
        for v33, v34 in pairs(l_CurrentEvents_4.Data) do
            if v34[v31] then
                v6.removeEvent(l_CurrentEvents_4, v33, v31);
            end;
        end;
        v17:setState({
            CurrentEvents = l_CurrentEvents_4
        });
    end;
    v17.onRenameAllEvents = function(v35, v36)
        local l_CurrentEvents_5 = v17.state.CurrentEvents;
        for v38, v39 in pairs(l_CurrentEvents_5.Data) do
            if v39[v35] then
                local v40 = v39[v35];
                v6.removeEvent(l_CurrentEvents_5, v38, v35);
                v6.addEvent(l_CurrentEvents_5, v38, v36, v40);
            end;
        end;
        v17:setState({
            CurrentEvents = l_CurrentEvents_5
        });
    end;
    v17.showDeleteAllPrompt = function(v41)
        v17:setState({
            deleteAllName = v41
        });
    end;
    v17.hideDeleteAllPrompt = function()
        v17:setState({
            deleteAllName = v3.None
        });
    end;
    v17.showRenameAllPrompt = function(v42, v43)
        v17:setState({
            renameAllNames = {
                Name = v42,
                NewName = v43
            }
        });
    end;
    v17.hideRenameAllPrompt = function()
        v17:setState({
            renameAllNames = v3.None
        });
    end;
    v17.getUnusedEvents = function(v44)
        local v45 = {};
        local l_CurrentEvents_6 = v17.state.CurrentEvents;
        for _, v48 in pairs(l_CurrentEvents_6.Data) do
            for v49, _ in pairs(v48) do
                v45[v49] = true;
            end;
        end;
        if l_CurrentEvents_6.Data[v44] then
            for v51, _ in pairs(l_CurrentEvents_6.Data[v44]) do
                v45[v51] = nil;
            end;
        end;
        local v53 = v4.Dictionary.keys(v45);
        table.sort(v53);
        return v53;
    end;
end;
v16.didMount = function(v54)
    v54.props.Mouse:__resetCursor();
end;
v16.makeText = function(_, v56, v57, v58, v59)
    return v3.createElement("TextLabel", {
        LayoutOrder = 0,
        Size = UDim2.new(0, 220, 0, 22),
        Text = v57,
        TextColor3 = v58 or v56.dialogTheme.textColor,
        Font = v56.font,
        TextSize = v56.dialogTheme.textSize,
        TextXAlignment = Enum.TextXAlignment.Left,
        BackgroundTransparency = 1
    }, {
        Padding = v3.createElement("UIPadding", {
            PaddingLeft = UDim.new(0, not v59 and 20 or 8),
            PaddingRight = UDim.new(0, not v59 and 8 or 20)
        })
    });
end;
v16.addTitleRow = function(v60, v61, v62)
    return v3.createElement("Frame", {
        Size = UDim2.new(0, 440, 0, 22),
        BackgroundTransparency = 1,
        LayoutOrder = v60.layout:getNextOrder()
    }, {
        [1] = v60:makeText(v61, v62:getText("Title", "EventName")),
        [2] = v60:makeText(v61, v62:getText("Title", "Parameter"), nil, true)
    });
end;
v16.addEventRow = function(v63, v64, v65, v66, v67)
    return v3.createElement("Frame", {
        Size = UDim2.new(0, 440, 0, 22),
        BackgroundTransparency = 1,
        LayoutOrder = v63.layout:getNextOrder()
    }, {
        [1] = v3.createElement(v13, {
            Size = UDim2.new(0, 220, 0, 22),
            Name = v65,
            PaddingLeft = UDim.new(0, 20),
            PaddingRight = UDim.new(0, 8),
            OnDeleteEvent = v63.onDeleteEvent,
            OnDeleteAllEvents = v63.showDeleteAllPrompt,
            UnusedEvents = v67,
            OnRenameEvent = function(v68, v69)
                if v68 == "" then
                    v63.onRenameEvent(v68, v69);
                    return ;
                else
                    if v68 ~= v69 then
                        v63.showRenameAllPrompt(v68, v69);
                    end;
                    return ;
                end;
            end
        }),
        [2] = v3.createElement("Frame", {
            Size = UDim2.new(0, 220, 0, 22),
            BackgroundColor3 = v64.trackTheme.shadedBackgroundColor,
            BorderColor3 = v64.borderColor
        }, {
            Padding = v3.createElement("UIPadding", {
                PaddingLeft = UDim.new(0, 8),
                PaddingRight = UDim.new(0, 20),
                PaddingTop = UDim.new(0, 2),
                PaddingBottom = UDim.new(0, 2)
            }),
            TextBox = v3.createElement(v12, {
                Size = UDim2.new(1, 0, 1, 0),
                TextXAlignment = Enum.TextXAlignment.Left,
                Text = v66,
                ClearTextOnFocus = false,
                FocusChanged = function(v70, v71)
                    if not v71 then
                        v63.onSetEventValue(v65, v70.Text);
                    end;
                end
            })
        })
    });
end;
v16.addNewEventRow = function(v72, v73, _)
    return v3.createElement("Frame", {
        Size = UDim2.new(0, 440, 0, 22),
        BorderColor3 = v73.borderColor,
        BackgroundColor3 = v73.backgroundColor,
        LayoutOrder = v72.layout:getNextOrder()
    }, {
        AddEventEntry = v3.createElement(v14, {
            Size = UDim2.new(0, 220, 0, 22),
            PaddingLeft = UDim.new(0, 20),
            PaddingRight = UDim.new(0, 8),
            OnAddEvent = v72.onAddEvent
        })
    });
end;
v16.renderEvents = function(v75, v76, v77)
    local l_props_0 = v75.props;
    local l_state_0 = v75.state;
    local l_Tick_1 = l_props_0.Tick;
    local l_CurrentEvents_7 = l_state_0.CurrentEvents;
    local v82 = 66;
    if not ((not l_CurrentEvents_7 or not l_CurrentEvents_7.Data) or not l_CurrentEvents_7.Data[l_Tick_1]) then
        local v83 = v75.getUnusedEvents(l_Tick_1);
        local v84 = v4.Dictionary.keys(l_CurrentEvents_7.Data[l_Tick_1]);
        table.sort(v84, function(v85, v86)
            if v85 == "" then
                return false;
            elseif v86 == "" then
                return true;
            else
                return v85 < v86;
            end;
        end);
        for _, v88 in ipairs(v84) do
            v77["Event_" .. v88] = v75:addEventRow(v76, v88, l_CurrentEvents_7.Data[l_Tick_1][v88], v83);
            v82 = v82 + 22;
        end;
    end;
    return v82;
end;
v16.renderDeleteAllPrompt = function(v89, v90, v91)
    local l_deleteAllName_0 = v89.state.deleteAllName;
    local _ = v90.button;
    return v3.createElement(v15, {
        Buttons = {
            {
                Key = false,
                Text = v91:getText("Dialog", "No"),
                Style = "Round"
            },
            {
                Key = true,
                Text = v91:getText("Dialog", "Yes"),
                Style = "RoundPrimary"
            }
        },
        PromptText = v91:getText("Dialog", "DeleteAllPrompt_Migrated", {
            name = l_deleteAllName_0
        }),
        OnButtonClicked = function(v94)
            if v94 then
                v89.onDeleteAllEvents(l_deleteAllName_0);
            end;
            v89.hideDeleteAllPrompt();
        end,
        OnClose = v89.hideDeleteAllPrompt
    });
end;
v16.renderRenameAllPrompt = function(v95, _, v97)
    local l_state_1 = v95.state;
    local l_Name_0 = l_state_1.renameAllNames.Name;
    local l_NewName_0 = l_state_1.renameAllNames.NewName;
    return v3.createElement(v15, {
        Buttons = {
            {
                Key = false,
                Text = v97:getText("Dialog", "ChangeThis"),
                Style = "Round"
            },
            {
                Key = true,
                Text = v97:getText("Dialog", "ChangeAll"),
                Style = "Round"
            }
        },
        PromptText = v97:getText("Dialog", "RenameAllPrompt_Migrated", {
            name = l_Name_0,
            newName = l_NewName_0
        }),
        OnButtonClicked = function(v101)
            if not v101 then
                v95.onRenameEvent(l_Name_0, l_NewName_0);
            else
                v95.onRenameAllEvents(l_Name_0, l_NewName_0);
            end;
            v95.hideRenameAllPrompt();
        end,
        OnClose = v95.hideRenameAllPrompt
    });
end;
v16.render = function(v102)
    local l_Stylizer_0 = v102.props.Stylizer;
    local l_Localization_0 = v102.props.Localization;
    v102.layout = v5.new();
    local l_props_1 = v102.props;
    local l_state_2 = v102.state;
    local l_dialogTheme_0 = l_Stylizer_0.dialogTheme;
    local _ = l_Stylizer_0.button;
    local v109 = l_state_2.deleteAllName ~= nil;
    local v110 = l_state_2.renameAllNames ~= nil;
    local v111 = {
        {
            Key = false,
            Text = l_Localization_0:getText("Dialog", "Cancel"),
            Style = "Round"
        },
        {
            Key = true,
            Text = l_Localization_0:getText("Dialog", "Save"),
            Style = "RoundPrimary"
        }
    };
    local v112 = {
        Layout = v3.createElement("UITableLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            FillEmptySpaceColumns = true
        }),
        TitleRow = v102:addTitleRow(l_Stylizer_0, l_Localization_0)
    };
    local v113 = v102:renderEvents(l_Stylizer_0, v112);
    v112.AddNew = v102:addNewEventRow(l_Stylizer_0, l_Localization_0);
    if not v109 then
        if v110 then
            v112.RenameAllPrompt = v102:renderRenameAllPrompt(l_Stylizer_0, l_Localization_0);
        end;
    else
        v112.DeleteAllPrompt = v102:renderDeleteAllPrompt(l_Stylizer_0, l_Localization_0);
    end;
    local v114 = Vector2.new(460, math.max(v113, 110) + v2);
    return v3.createElement(l_StyledDialog_0, {
        Size = v114,
        MinContentSize = v114,
        TextSize = l_dialogTheme_0.textSize,
        Resizable = true,
        Buttons = v111,
        OnButtonPressed = v102.onButtonClicked,
        OnClose = l_props_1.OnClose,
        BorderPadding = 10,
        ButtonPadding = v1.PROMPT_BUTTON_PADDING,
        ButtonHeight = v1.PROMPT_BUTTON_SIZE.Y,
        ButtonWidth = v1.PROMPT_BUTTON_SIZE.X,
        Title = l_Localization_0:getText("Title", "EditEvents")
    }, {
        Container = v3.createElement("ScrollingFrame", {
            BorderSizePixel = 0,
            BackgroundColor3 = l_Stylizer_0.backgroundColor,
            Size = UDim2.new(1, 0, 1, -10),
            ScrollBarThickness = 8,
            CanvasSize = UDim2.new(0, 0, 0, v113)
        }, v112)
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization,
    Mouse = l_ContextServices_0.Mouse
})(v16));


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.Constants);
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.FilteringTextBox);
local v6 = require(l_script_FirstAncestor_0.Src.Components.EditEventsDialog.EditEventMenu);
local v7 = require(l_script_FirstAncestor_0.Src.Components.ContextButton);
local v8 = v1.PureComponent:extend("EventNameEntry");
v8.init = function(v9)
    v9.state = {
        editing = false,
        showContextMenu = false
    };
    v9.onMenuItemClicked = function(v10)
        if v10 == v2.ACTION_KEYS.Edit then
            v9:setState({
                editing = true
            });
            return ;
        else
            if v10 == v2.ACTION_KEYS.Delete then
                v9.props.OnDeleteAllEvents(v9.props.Name);
            end;
            return ;
        end;
    end;
    v9.onDeleteEvent = function()
        v9.props.OnDeleteEvent(v9.props.Name);
    end;
    v9.focusChanged = function(v11, v12)
        if not v12 then
            v9:setState({
                editing = false
            });
            local l_Name_0 = v9.props.Name;
            local l_Text_0 = v11.Text;
            if l_Text_0 == "" then
                v9.props.OnDeleteEvent(l_Name_0);
                return ;
            else
                v9.props.OnRenameEvent(l_Name_0, l_Text_0);
            end;
        end;
    end;
    v9.onItemClicked = function(v15)
        v9:setState({
            editing = false
        });
        local l_Name_1 = v9.props.Name;
        if l_Name_1 == "" and v15 == "" then
            v9.props.OnDeleteEvent(l_Name_1);
            return ;
        else
            if v15 ~= "" and v15 ~= l_Name_1 then
                v9.props.OnRenameEvent(l_Name_1, v15);
            end;
            return ;
        end;
    end;
    v9.showMenu = function()
        v9:setState({
            showContextMenu = true
        });
    end;
    v9.hideMenu = function()
        v9:setState({
            showContextMenu = false
        });
    end;
    v9.mouseEnter = function()
        if v9.props.Mouse then
            v9.props.Mouse:__pushCursor("PointingHand");
        end;
    end;
    v9.mouseLeave = function()
        if v9.props.Mouse then
            v9.props.Mouse:__popCursor();
        end;
    end;
end;
v8.didMount = function(v17)
    if v17.props.Name == "" then
        v17:setState({
            editing = true
        });
    end;
end;
v8.willUnmount = function(v18)
    v18.props.Mouse:__resetCursor();
end;
v8.render = function(v19)
    local l_props_0 = v19.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_state_0 = v19.state;
    local l_Size_0 = l_props_0.Size;
    local l_Name_2 = l_props_0.Name;
    local l_PaddingLeft_0 = l_props_0.PaddingLeft;
    local l_PaddingRight_0 = l_props_0.PaddingRight;
    local l_UnusedEvents_0 = l_props_0.UnusedEvents;
    local l_editing_0 = l_state_0.editing;
    local l_trackTheme_0 = l_Stylizer_0.trackTheme;
    local l_dialogTheme_0 = l_Stylizer_0.dialogTheme;
    return v1.createElement("Frame", {
        Size = l_Size_0,
        BackgroundColor3 = l_trackTheme_0.shadedBackgroundColor,
        BorderColor3 = l_Stylizer_0.borderColor
    }, {
        Padding = v1.createElement("UIPadding", {
            PaddingLeft = l_PaddingLeft_0,
            PaddingRight = l_PaddingRight_0,
            PaddingTop = UDim.new(0, 2),
            PaddingBottom = UDim.new(0, 2)
        }),
        Label = not l_editing_0 and v1.createElement("TextLabel", {
            Size = UDim2.new(1, -v2.TRACKLIST_BUTTON_SIZE, 1, 0),
            Text = l_Name_2,
            TextColor3 = l_dialogTheme_0.textColor,
            TextTruncate = Enum.TextTruncate.AtEnd,
            Font = l_Stylizer_0.font,
            TextSize = l_dialogTheme_0.textSize,
            TextXAlignment = Enum.TextXAlignment.Left,
            BackgroundTransparency = 1
        }),
        TextBox = l_editing_0 and v1.createElement(v5, {
            Size = UDim2.new(1, -v2.TRACKLIST_BUTTON_SIZE - 8, 1, 0),
            TextXAlignment = Enum.TextXAlignment.Left,
            CaptureFocus = true,
            Text = l_Name_2,
            ClearTextOnFocus = false,
            FocusChanged = v19.focusChanged,
            OnItemClicked = v19.onItemClicked,
            Items = l_UnusedEvents_0,
            MaxItems = 3
        }),
        DeleteButton = v1.createElement("ImageButton", {
            Size = UDim2.new(0, 8, 0, 8),
            AnchorPoint = Vector2.new(0.5, 0.5),
            Position = UDim2.new(0, -l_PaddingLeft_0.Offset / 2, 0.5, 0),
            BackgroundTransparency = 1,
            Image = l_dialogTheme_0.deleteImage,
            ImageColor3 = l_dialogTheme_0.subTextColor,
            ScaleType = Enum.ScaleType.Fit,
            [v1.Event.Activated] = v19.onDeleteEvent,
            [v1.Event.MouseEnter] = v19.mouseEnter,
            [v1.Event.MouseLeave] = v19.mouseLeave
        }),
        ContextButton = v1.createElement(v7, {
            AnchorPoint = Vector2.new(1, 0.5),
            Position = UDim2.new(1, 0, 0.5, 0),
            OnActivated = v19.showMenu
        }),
        EditEventMenu = v1.createElement(v6, {
            ShowMenu = l_state_0.showContextMenu,
            OnMenuOpened = v19.hideMenu,
            OnMenuItemClicked = v19.onMenuItemClicked
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer,
    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.Constants);
local v3 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_Button_0 = v3.UI.Button;
local l_CaptureFocus_0 = v3.UI.CaptureFocus;
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v8 = v1.PureComponent:extend("FocusedPrompt");
v8.renderButton = function(v9, v10, v11, _)
    local l_props_0 = v9.props;
    return v1.createElement(l_Button_0, {
        Size = UDim2.new(0, v2.PROMPT_BUTTON_SIZE.X, 0, v2.PROMPT_BUTTON_SIZE.Y),
        LayoutOrder = v10,
        Style = v11.Style,
        Text = v11.Text,
        OnClick = function()
            l_props_0.OnButtonClicked(v11.Key);
        end
    });
end;
v8.render = function(v14)
    local l_props_1 = v14.props;
    local l_Stylizer_0 = l_props_1.Stylizer;
    local l_dialogTheme_0 = l_Stylizer_0.dialogTheme;
    local l_PROMPT_BUTTON_PADDING_0 = v2.PROMPT_BUTTON_PADDING;
    local l_Y_0 = v2.PROMPT_BUTTON_SIZE.Y;
    local l_Buttons_0 = l_props_1.Buttons;
    local l_PromptText_0 = l_props_1.PromptText;
    local v22 = l_props_1.Size or v2.PROMPT_SIZE;
    local v23 = nil;
    v23 = if not l_PromptText_0 then v14.props[v1.Children] else {
        PromptText = v1.createElement("TextLabel", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundTransparency = 1,
            TextSize = l_dialogTheme_0.textSize,
            TextColor3 = l_dialogTheme_0.textColor,
            TextXAlignment = Enum.TextXAlignment.Left,
            Font = l_Stylizer_0.font,
            Text = l_PromptText_0,
            TextWrapped = true
        })
    };
    local v24 = {
        Layout = v1.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            FillDirection = Enum.FillDirection.Horizontal,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            Padding = UDim.new(0, l_PROMPT_BUTTON_PADDING_0)
        })
    };
    for v25, v26 in ipairs(l_Buttons_0) do
        table.insert(v24, v14:renderButton(v25, v26, l_dialogTheme_0.textSize));
    end;
    return v1.createElement(l_CaptureFocus_0, {}, {
        Background = v1.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundTransparency = 0.35,
            BorderSizePixel = 0,
            BackgroundColor3 = Color3.new()
        }, {
            CenterFrame = v1.createElement("ImageButton", {
                Size = v22,
                Position = UDim2.new(0.5, 0, 0.5, 0),
                AnchorPoint = Vector2.new(0.5, 0.5),
                BorderSizePixel = 0,
                BackgroundColor3 = l_Stylizer_0.backgroundColor,
                AutoButtonColor = false,
                ImageTransparency = 1
            }, {
                Padding = v1.createElement("UIPadding", {
                    PaddingTop = UDim.new(0, v2.PROMPT_VERTICAL_PADDING),
                    PaddingBottom = UDim.new(0, v2.PROMPT_VERTICAL_PADDING),
                    PaddingLeft = UDim.new(0, v2.PROMPT_HORIZONTAL_PADDING),
                    PaddingRight = UDim.new(0, v2.PROMPT_HORIZONTAL_PADDING)
                }),
                Container = v1.createElement("Frame", {
                    Size = UDim2.new(1, 0, 1, -(l_Y_0 + v2.PROMPT_VERTICAL_PADDING)),
                    AnchorPoint = Vector2.new(0.5, 0),
                    Position = UDim2.new(0.5, 0, 0, 0),
                    BackgroundTransparency = 1
                }, v23),
                Buttons = v1.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
                }, v24)
            })
        })
    });
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.Packages.RoactRodux);
local v3 = require(l_script_FirstAncestor_0.Src.Util.isEmpty);
local v4 = require(l_script_FirstAncestor_0.Src.Util.Constants);
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.Components.ContextMenu);
local v8 = require(l_script_FirstAncestor_0.Src.Thunks.History.AddWaypoint);
local v9 = require(l_script_FirstAncestor_0.Src.Thunks.Events.PasteEvents);
local v10 = require(l_script_FirstAncestor_0.Src.Thunks.Events.CopySelectedEvents);
local v11 = require(l_script_FirstAncestor_0.Src.Thunks.Events.DeleteSelectedEvents);
local v12 = require(l_script_FirstAncestor_0.Src.Actions.SetRightClickContextInfo);
local v13 = v1.PureComponent:extend("EventActions");
v13.makeMenuActionsDeprecated = function(v14)
    local l_PluginActions_0 = v14.props.PluginActions;
    if not l_PluginActions_0 then
        return ;
    else
        local l_props_0 = v14.props;
        local v17 = {
            l_PluginActions_0:get("DeleteEvents"),
            v4.MENU_SEPARATOR,
            l_PluginActions_0:get("CutEvents"),
            l_PluginActions_0:get("CopyEvents"),
            l_PluginActions_0:get("PasteEvents")
        };
        if not l_props_0.OnEvent then
            table.insert(v17, 1, l_PluginActions_0:get("AddEvent"));
            return v17;
        else
            table.insert(v17, 1, l_PluginActions_0:get("EditEvents"));
            return v17;
        end;
    end;
end;
v13.makeMenuActions = function(v18)
    local l_PluginActions_1 = v18.props.PluginActions;
    if not l_PluginActions_1 then
        return nil;
    else
        return {
            l_PluginActions_1:get(not v18.props.OnEvent and "AddEvent" or "EditEvents"),
            l_PluginActions_1:get("DeleteEvents"),
            v4.MENU_SEPARATOR,
            l_PluginActions_1:get("CutEvents"),
            l_PluginActions_1:get("CopyEvents"),
            l_PluginActions_1:get("PasteEvents")
        };
    end;
end;
v13.addAction = function(v20, v21, v22)
    if v21 then
        v21.Enabled = false;
        table.insert(v20.Actions, v21);
        table.insert(v20.Connections, v21.Triggered:Connect(v22));
    end;
end;
v13.didMount = function(v23)
    local l_PluginActions_2 = v23.props.PluginActions;
    v23.Connections = {};
    v23.Actions = {};
    v23:addAction(l_PluginActions_2:get("EditEvents"), function()
        local l_props_1 = v23.props;
        l_props_1.OnEditEvents(l_props_1.Tick);
    end);
    v23:addAction(l_PluginActions_2:get("PasteEvents"), function()
        local l_props_2 = v23.props;
        l_props_2.PasteEvents(l_props_2.Tick or l_props_2.Playhead);
    end);
    v23:addAction(l_PluginActions_2:get("CutEvents"), function()
        local l_props_3 = v23.props;
        l_props_3.CopySelectedEvents(v23.props.EventFilters);
        l_props_3.DeleteSelectedEvents(v23.props.EventFilters);
    end);
    v23:addAction(l_PluginActions_2:get("CopyEvents"), function()
        v23.props.CopySelectedEvents(v23.props.EventFilters);
    end);
    v23:addAction(l_PluginActions_2:get("DeleteEvents"), function()
        v23.props.DeleteSelectedEvents(v23.props.EventFilters);
    end);
end;
v13.render = function(v28)
    local l_props_4 = v28.props;
    local l_ShowMenu_0 = l_props_4.ShowMenu;
    local l_Clipboard_0 = l_props_4.Clipboard;
    local l_ClipboardType_0 = l_props_4.ClipboardType;
    local l_SelectedEvents_0 = l_props_4.SelectedEvents;
    local l_OnMenuOpened_0 = l_props_4.OnMenuOpened;
    local l_Actions_0 = v28.Actions;
    local l_PluginActions_3 = v28.props.PluginActions;
    if not v3(l_PluginActions_3) and l_Actions_0 ~= nil then
        for _, v38 in ipairs(l_Actions_0) do
            v38.Enabled = false;
        end;
        if not (not l_Clipboard_0 or v3(l_Clipboard_0)) and l_ClipboardType_0 == v4.CLIPBOARD_TYPE.Events then
            l_PluginActions_3:get("PasteEvents").Enabled = true;
        end;
        if not (not l_SelectedEvents_0 or v3(l_SelectedEvents_0)) then
            l_PluginActions_3:get("CutEvents").Enabled = true;
            l_PluginActions_3:get("CopyEvents").Enabled = true;
            l_PluginActions_3:get("DeleteEvents").Enabled = true;
        end;
        if l_props_4.OnEvent then
            l_PluginActions_3:get("EditEvents").Enabled = true;
        end;
    end;
    local v39 = v28:makeMenuActions();
    if not l_ShowMenu_0 or not v39 then
        return nil;
    else
        return (v1.createElement(v7, {
            Actions = v28:makeMenuActions(),
            OnMenuOpened = l_OnMenuOpened_0
        }));
    end;
end;
v13.willUnmount = function(v40)
    if v40.Connections then
        for _, v42 in ipairs(v40.Connections) do
            v42:Disconnect();
        end;
        v40.Connections = {};
    end;
    if v40.Actions then
        for _, v44 in ipairs(v40.Actions) do
            v44.Enabled = false;
        end;
    end;
end;
return v2.connect(function(v45, _)
    local l_Status_0 = v45.Status;
    return {
        Clipboard = l_Status_0.Clipboard,
        ClipboardType = l_Status_0.ClipboardType,
        SelectedEvents = l_Status_0.SelectedEvents,
        Playhead = l_Status_0.Playhead,
        OnEvent = l_Status_0.RightClickContextInfo.OnEvent,
        Tick = l_Status_0.RightClickContextInfo.Tick
    };
end, function(v48)
    return {
        DeleteSelectedEvents = function(v49)
            v48(v8());
            v48(v11(v49));
            v48(v12({}));
        end,
        CopySelectedEvents = function(v50)
            v48(v10(v50));
            v48(v12({}));
        end,
        PasteEvents = function(v51)
            v48(v8());
            v48(v9(v51));
            v48(v12({}));
        end
    };
end)((l_withContext_0({
    Analytics = l_ContextServices_0.Analytics,
    PluginActions = l_ContextServices_0.PluginActions
})(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.Src.Util.Constants);
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.Tooltip);
local v6 = v1.PureComponent:extend("EventMarker");
v6.getTooltip = function(_, v8)
    local v9 = "";
    for v10, v11 in ipairs(v8) do
        v9 = v9 .. v11;
        if v10 ~= #v8 then
            v9 = v9 .. ", ";
        end;
    end;
    return v9;
end;
v6.render = function(v12)
    local l_props_0 = v12.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_Selected_0 = l_props_0.Selected;
    local l_Names_0 = l_props_0.Names;
    local l_eventMarker_0 = l_Stylizer_0.eventMarker;
    return v1.createElement("ImageButton", {
        Size = v2.EVENT_MARKER_SIZE,
        AnchorPoint = Vector2.new(0.5, 0.5),
        Position = l_props_0.Position,
        ZIndex = l_props_0.ZIndex,
        BackgroundTransparency = 1,
        AutoButtonColor = false,
        ImageColor3 = l_eventMarker_0.imageColor,
        Image = l_eventMarker_0.mainImage,
        [v1.Event.MouseButton2Click] = l_props_0.OnRightClick,
        [v1.Event.InputBegan] = l_props_0.OnInputBegan,
        [v1.Event.InputEnded] = l_props_0.OnInputEnded
    }, {
        Tooltip = l_Names_0 and v1.createElement(v5, {
            Text = v12:getTooltip(l_Names_0),
            ShowDelay = 0
        }),
        Border = v1.createElement("ImageLabel", {
            Size = v2.EVENT_MARKER_SIZE,
            AnchorPoint = Vector2.new(0.5, 0),
            Position = UDim2.new(0.5, 0, 0, 0),
            BackgroundTransparency = 1,
            ImageColor3 = not not l_Selected_0 and l_eventMarker_0.selectionBorderColor or l_eventMarker_0.borderColor,
            Image = l_eventMarker_0.borderImage
        }),
        SelectionBorder = l_Selected_0 and v1.createElement("ImageLabel", {
            Size = v2.EVENT_MARKER_BORDER_SIZE,
            AnchorPoint = Vector2.new(0.5, 0),
            Position = UDim2.new(0.5, 0, 0, 0),
            BackgroundTransparency = 1,
            ImageColor3 = l_eventMarker_0.selectionBorderColor,
            Image = l_eventMarker_0.selectionBorderImage
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v6));


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.Framework);
local _ = v3.Util.StyleModifier;
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v7 = require(l_script_FirstAncestor_0.Src.Components.BaseTrack);
local v8 = require(l_script_FirstAncestor_0.Src.Components.EventMarker);
local v9 = require(l_script_FirstAncestor_0.Src.Components.ContextMenu);
local l_Util_0 = l_script_FirstAncestor_0.Src.Util;
local v11 = require(l_Util_0.Constants);
local v12 = require(l_Util_0.TrackUtils);
local l_UI_0 = v3.UI;
local l_Button_0 = l_UI_0.Button;
local l_Pane_0 = l_UI_0.Pane;
local l_Tooltip_0 = l_UI_0.Tooltip;
local v17 = v1.PureComponent:extend("EventTrack");
v17.init = function(v18)
    v18.state = {
        showFilterMenu = false
    };
    v18.showFilterMenu = function()
        v18:setState({
            showFilterMenu = true
        });
    end;
    v18.hideFilterMenu = function()
        v18:setState({
            showFilterMenu = false
        });
    end;
end;
v17.renderEvent = function(v19, v20, v21, v22)
    local l_props_0 = v19.props;
    local l_Events_0 = l_props_0.Events;
    local l_EventFilters_0 = l_props_0.EventFilters;
    local v26 = not not l_Events_0.Data[v22] and v2.Dictionary.keys(l_Events_0.Data[v22]) or {};
    if l_EventFilters_0 then
        local v27 = {};
        for _, v29 in v26, nil, nil do
            if l_EventFilters_0[v29] then
                table.insert(v27, v29);
            end;
        end;
        v26 = v27;
    end;
    table.sort(v26);
    if not next(v26) then
        return nil;
    else
        return (v1.createElement(v8, {
            Selected = v20,
            Names = v26,
            Position = UDim2.new(0, v21, 0.5, 0),
            ZIndex = l_props_0.ZIndex,
            OnRightClick = function(_, _)
                l_props_0.OnEventRightClick(v22, v20);
            end,
            OnInputBegan = function(_, v33)
                l_props_0.OnEventInputBegan(v22, v20, v33);
            end,
            OnInputEnded = function(_, v35)
                l_props_0.OnEventInputEnded(v22, v20, v35);
            end
        }));
    end;
end;
v17.renderPreviewEvent = function(v36, v37, _)
    return v1.createElement(v8, {
        Selected = true,
        Position = UDim2.new(0, v37, 0.5, 0),
        ZIndex = v36.props.ZIndex + 1
    });
end;
v17.renderEvents = function(v39, v40)
    local l_props_1 = v39.props;
    local l_Width_0 = l_props_1.Width;
    local l_StartTick_0 = l_props_1.StartTick;
    local l_EndTick_0 = l_props_1.EndTick;
    local l_Keyframes_0 = l_props_1.Events.Keyframes;
    local l_SelectedEvents_0 = l_props_1.SelectedEvents;
    local v47, v48 = v12.getKeyframesExtents(l_Keyframes_0, l_StartTick_0, l_EndTick_0);
    if v47 ~= nil and v48 ~= nil then
        for v49 = v47, v48 do
            local v50 = l_Keyframes_0[v49];
            v40[v49] = v39:renderEvent(l_SelectedEvents_0 and l_SelectedEvents_0[v50], v12.getScaledKeyframePosition(v50, l_StartTick_0, l_EndTick_0, l_Width_0), v50);
        end;
    end;
end;
v17.makeFilterActions = function(v51)
    local l_props_2 = v51.props;
    local l_Localization_0 = l_props_2.Localization;
    local v54 = {};
    local l_AvailableEvents_0 = l_props_2.AvailableEvents;
    local l_EventFilters_1 = l_props_2.EventFilters;
    for _, v58 in ipairs(l_AvailableEvents_0) do
        table.insert(v54, {
            Text = v58,
            Checked = l_EventFilters_1 and l_EventFilters_1[v58],
            OnItemClicked = function(v59)
                l_props_2.ToggleEventFilter(v59.Text);
            end
        });
    end;
    if #v54 > 0 then
        table.insert(v54, v11.MENU_SEPARATOR);
    end;
    local v60 = {
        Text = l_Localization_0:getText("Menu", "Nothing")
    };
    local v61 = false;
    if #l_AvailableEvents_0 > 0 then
        v61 = not l_EventFilters_1 or #v2.Dictionary.keys(l_EventFilters_1) == 0;
    end;
    v60.Checked = v61;
    v60.OnItemClicked = v51.props.ClearEventFilters;
    table.insert(v54, v60);
    table.insert(v54, {
        Text = l_Localization_0:getText("Menu", "Everything"),
        Checked = not l_EventFilters_1 or #v2.Dictionary.keys(l_EventFilters_1) == #l_AvailableEvents_0,
        OnItemClicked = v51.props.SetAllEventFilters
    });
    return v54;
end;
v17.render = function(v62)
    local l_props_3 = v62.props;
    local l_Stylizer_0 = l_props_3.Stylizer;
    local l_Localization_1 = l_props_3.Localization;
    local l_showFilterMenu_0 = v62.state.showFilterMenu;
    local v67 = l_props_3[v1.Children] or {};
    l_props_3[v1.Children] = nil;
    local l_Events_1 = l_props_3.Events;
    if not (not l_Events_1 or not l_Events_1.Keyframes) and #l_Events_1.Keyframes > 0 then
        v62:renderEvents(v67);
    end;
    return v1.createElement(l_Pane_0, {}, {
        FilterButton = v1.createElement(l_Button_0, {
            AnchorPoint = Vector2.new(0.5, 0.5),
            Size = UDim2.fromOffset(v11.TOGGLE_EDITOR_BUTTON_WIDTH, v11.TOGGLE_EDITOR_BUTTON_HEIGHT),
            Position = UDim2.fromOffset(v62.props.TrackPadding / 4, v11.TIMELINE_HEIGHT / 2),
            Style = l_Stylizer_0.button.EventFilter,
            OnClick = v62.showFilterMenu
        }, {
            Image = v1.createElement("ImageLabel", {
                BackgroundTransparency = 1,
                Size = l_Stylizer_0.eventTheme.filterButton.size,
                Position = UDim2.new(0.5, 0, 0.5, 0),
                AnchorPoint = Vector2.new(0.5, 0.5),
                Image = l_Stylizer_0.eventTheme.filterButton.image,
                ImageColor3 = l_Stylizer_0.playbackTheme.iconColor
            }),
            Tooltip = v1.createElement(l_Tooltip_0, {
                Text = l_Localization_1:getText("Tooltip", "FilterEvents")
            }),
            FilterMenu = l_showFilterMenu_0 and v1.createElement(v9, {
                Actions = v62:makeFilterActions(),
                OnMenuOpened = v62.hideFilterMenu
            })
        }),
        Markers = v1.createElement(v7, l_props_3, v67)
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization
})(v17));