local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.React);
local v3 = require(l_Parent_0.Packages.Framework);
local l_pretty_0 = require(l_Parent_0.Packages.Dash).pretty;
local v5 = require(l_Parent_0.Src.Util.diff);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Stylizer_0 = v3.Style.Stylizer;
local l_UI_0 = v3.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_IconButton_0 = l_UI_0.IconButton;
local l_Separator_0 = l_UI_0.Separator;
local l_ScrollingFrame_0 = l_UI_0.ScrollingFrame;
local l_ExpandablePane_0 = l_UI_0.ExpandablePane;
local l_Tabs_0 = l_UI_0.Tabs;
local v19 = require(script.Parent.Parent.LongText);
local v20 = require(script.Parent.Parent.Parent.Util.counter)();
local function v24(v21)
    local v22 = {};
    for v23 = 1, v21.LineCount or 5 do
        v22[v23] = v2.createElement("Frame", {
            Size = UDim2.fromOffset(math.random(50, 400), 16),
            BackgroundTransparency = 0.85,
            BackgroundColor3 = Color3.new(0, 0, 0)
        }, {
            Corner = v2.createElement("UICorner", {
                CornerRadius = UDim.new(0, 8)
            })
        });
    end;
    return v2.createElement("Frame", {
        Size = UDim2.fromOffset(1, 0),
        AutomaticSize = Enum.AutomaticSize.Y,
        BackgroundTransparency = 1
    }, {
        Layout = v2.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.Name,
            FillDirection = Enum.FillDirection.Vertical,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            VerticalAlignment = Enum.VerticalAlignment.Top,
            Padding = UDim.new(0, 8)
        }),
        Placeholders = v2.createElement(v2.Fragment, nil, v22)
    });
end;
local function v26(v25)
    return v2.createElement(l_Pane_0, {
        Size = v25.Size,
        Position = v25.Position,
        LayoutOrder = v25.LayoutOrder,
        Layout = Enum.FillDirection.Horizontal,
        HorizontalAlignment = Enum.HorizontalAlignment.Right,
        VerticalAlignment = Enum.VerticalAlignment.Center
    }, {
        ToggleAction = v2.createElement(l_IconButton_0, {
            Size = UDim2.fromScale(0, 1),
            AutomaticSize = Enum.AutomaticSize.X,
            BackgroundStyle = "None",
            LeftIcon = not v25.IsUndone and "rbxasset://textures/RoduxDevtools/Undo.png" or "rbxasset://textures/RoduxDevtools/Redo.png",
            Text = if not v25.IsUndone then v25.Localization:getText("ReduceDetails", "ToggleAction.UndoText") else v25.Localization:getText("ReduceDetails", "ToggleAction.RedoText"),
            TooltipText = if not v25.IsDevtools then if v25.IsUndone then v25.Localization:getText("ReduceDetails", "ToggleAction.RedoTooltip") else v25.Localization:getText("ReduceDetails", "ToggleAction.UndoTooltip") else v25.Localization:getText("ReduceDetails", "ToggleAction.IsDevtools"),
            Disabled = v25.IsDevtools,
            OnClick = v25.OnToggleActionClick
        })
    });
end;
local function v28(v27)
    return v2.createElement(l_Pane_0, {
        Size = v27.Size,
        Position = v27.Position,
        LayoutOrder = v27.LayoutOrder,
        Layout = Enum.FillDirection.Horizontal,
        HorizontalAlignment = Enum.HorizontalAlignment.Right,
        VerticalAlignment = Enum.VerticalAlignment.Center
    }, {
        SetState = v2.createElement(l_IconButton_0, {
            LayoutOrder = -1,
            Size = UDim2.fromScale(0, 1),
            AutomaticSize = Enum.AutomaticSize.X,
            BackgroundStyle = "None",
            LeftIcon = "rbxasset://textures/RoduxDevtools/SetState.png",
            Text = v27.Localization:getText("ReduceDetails", "SetState.Text"),
            TooltipText = v27.Localization:getText("ReduceDetails", "SetState.Tooltip"),
            OnClick = v27.OnSetStateClick
        }),
        Tabs = v2.createElement(l_Tabs_0, {
            Tabs = v27.Tabs,
            SelectedTab = v27.Selected,
            OnTabSelected = v27.OnTabSelected
        })
    });
end;
local v29 = v2.PureComponent:extend("ReduceDetails");
v29.init = function(v30)
    v30.stateTabs = {
        {
            Icon = "rbxasset://textures/RoduxDevtools/StateTabs/Diff.png",
            Label = "Diff",
            Tooltip = "The changes in state as a result of the reduced action"
        },
        {
            Icon = "rbxasset://textures/RoduxDevtools/StateTabs/Full.png",
            Label = "Full",
            Tooltip = "The full state after the action was reduced"
        }
    };
    v30.setStateTab = function(v31)
        v30:setState({
            selectedStateTab = v31
        });
    end;
    v30:setState({
        summaryExpanded = true,
        actionExpanded = true,
        stateExpanded = true,
        selectedStateTab = v30.stateTabs[1],
        diffText = nil,
        fullText = nil,
        actionText = nil
    });
end;
v29.didMount = function(v32)
    v32.stateTabs[1].Label = v32.props.Localization:getText("ReduceDetails", "StateTab.Diff.Label");
    v32.stateTabs[1].Tooltip = v32.props.Localization:getText("ReduceDetails", "StateTab.Diff.Tooltip");
    v32.stateTabs[2].Label = v32.props.Localization:getText("ReduceDetails", "StateTab.Full.Label");
    v32.stateTabs[2].Tooltip = v32.props.Localization:getText("ReduceDetails", "StateTab.Full.Tooltip");
    task.defer(function()
        v32:computeText();
    end);
end;
v29.computeText = function(v33)
    local l_props_0 = v33.props;
    local l_state_0 = v33.state;
    local l_Event_0 = l_props_0.Event;
    if l_Event_0 then
        if not l_Event_0.isStub then
            local l_props_1 = l_Event_0.props;
            local v38 = {};
            if l_state_0.selectedStateTab == v33.stateTabs[1] then
                v38[1] = "diff";
                v38[2] = "full";
            else
                v38[1] = "full";
                v38[2] = "diff";
            end;
            if not l_state_0.actionExpanded then
                v38[3] = "action";
            else
                table.insert(v38, 1, "action");
            end;
            for _, v40 in v38, nil, nil do
                if v33.props.Event ~= l_Event_0 then
                    return ;
                else
                    if v40 == "action" then
                        v33:setState({
                            actionText = l_pretty_0(l_props_1.action, {
                                depth = 100,
                                multiline = true,
                                maxLineLength = 100,
                                indent = "  "
                            })
                        });
                    elseif v40 == "diff" then
                        v33:setState({
                            diffText = if l_props_1.lastState ~= nil then v5(l_props_1.lastState, l_props_1.state) else v33.props.Localization:getText("ReduceDetails", "NoPriorState")
                        });
                    elseif v40 == "full" then
                        v33:setState({
                            fullText = l_pretty_0(l_props_1.state, {
                                depth = 100,
                                multiline = true,
                                maxLineLength = 100,
                                indent = "  "
                            })
                        });
                    end;
                    task.wait(0.03333333333333333);
                end;
            end;
            return ;
        else
            return ;
        end;
    else
        return ;
    end;
end;
v29.didUpdate = function(v41, v42)
    if v41.props.Event ~= v42.Event then
        v41:setState({
            diffText = v2.None,
            fullText = v2.None,
            actionText = v2.None
        });
        task.defer(function()
            v41:computeText();
        end);
    end;
end;
v29.render = function(v43)
    local l_Event_1 = v43.props.Event;
    if l_Event_1 then
        local l_props_2 = l_Event_1.props;
        local v46 = if v43.state.selectedStateTab == v43.stateTabs[1] then v43.state.diffText else v43.state.fullText;
        local l_actionText_0 = v43.state.actionText;
        local v48 = false;
        if l_Event_1.altered ~= nil then
            v48 = l_Event_1.altered.skipped == true;
        end;
        local v49 = l_props_2.isDevtools == true;
        return v2.createElement(l_Pane_0, nil, {
            ReduceDetails = v2.createElement(l_ScrollingFrame_0, {
                Size = UDim2.fromScale(1, 1),
                AutomaticCanvasSize = Enum.AutomaticSize.Y,
                Layout = Enum.FillDirection.Vertical,
                Spacing = UDim.new(0, 5)
            }, {
                SummaryInfo = v2.createElement(l_ExpandablePane_0, {
                    Style = "Section",
                    LayoutOrder = v20(),
                    Size = UDim2.new(1, 0, 0, 32),
                    Text = v43.props.Localization:getText("ReduceDetails", "SummaryTitle"),
                    ContentPadding = 5,
                    HorizontalAlignment = Enum.HorizontalAlignment.Left,
                    Expanded = v43.state.summaryExpanded,
                    OnExpandedChanged = function()
                        v43:setState(function(v50)
                            return {
                                summaryExpanded = not v50.summaryExpanded
                            };
                        end);
                    end
                }, {
                    SummaryLabel = v2.createElement(l_TextLabel_0, {
                        Size = UDim2.new(1, 0, 0, 0),
                        AutomaticSize = Enum.AutomaticSize.Y,
                        TextXAlignment = Enum.TextXAlignment.Left,
                        TextWrapped = true,
                        Text = if not l_Event_1.isStub then v43.props.Localization:getText("ReduceDetails", "Summary", {
                            action = l_props_2.action.type,
                            elapsed = l_props_2.elapsedMs,
                            timestamp = DateTime.fromUnixTimestampMillis(l_Event_1.timestamp):FormatLocalTime("h:mm:ss.SSS a", "en-us"),
                            source = l_Event_1.source
                        }) else v43.props.Localization:getText("Common", "LoadingStub")
                    })
                }),
                SummarySeparator = v2.createElement(l_Separator_0, {
                    LayoutOrder = v20()
                }),
                ActionInfo = v2.createElement(l_ExpandablePane_0, {
                    Style = "Section",
                    LayoutOrder = v20(),
                    Size = UDim2.new(1, 0, 0, 32),
                    Text = v43.props.Localization:getText("ReduceDetails", "ActionTitle"),
                    ContentPadding = 5,
                    HorizontalAlignment = Enum.HorizontalAlignment.Left,
                    Expanded = v43.state.actionExpanded,
                    OnExpandedChanged = function()
                        v43:setState(function(v51)
                            return {
                                actionExpanded = not v51.actionExpanded
                            };
                        end);
                    end,
                    HeaderComponent = v26,
                    HeaderComponentProps = {
                        Localization = v43.props.Localization,
                        IsUndone = v48,
                        IsDevtools = v49,
                        OnToggleActionClick = function()
                            if not v49 then
                                if not v48 then
                                    if v43.props.OnUndoAction then
                                        v43.props.OnUndoAction(v43.props.SelectedIndex);
                                        return ;
                                    else
                                        return ;
                                    end;
                                elseif v43.props.OnRedoAction then
                                    v43.props.OnRedoAction(v43.props.SelectedIndex);
                                    return ;
                                else
                                    return ;
                                end;
                            else
                                return ;
                            end;
                        end
                    }
                }, {
                    ActionLabel = if l_actionText_0 ~= nil then v2.createElement(v19, {
                        MaxHeight = 300,
                        TextXAlignment = Enum.TextXAlignment.Left,
                        TextYAlignment = Enum.TextYAlignment.Top,
                        Font = Enum.Font.RobotoMono,
                        Text = l_actionText_0
                    }) else v2.createElement(v24, {
                        LineCount = 5
                    })
                }),
                ActionSeparator = v2.createElement(l_Separator_0, {
                    LayoutOrder = v20()
                }),
                StateInfo = v2.createElement(l_ExpandablePane_0, {
                    Style = "Section",
                    LayoutOrder = v20(),
                    Size = UDim2.new(1, 0, 0, 32),
                    Text = v43.props.Localization:getText("ReduceDetails", "StateTitle"),
                    ContentPadding = 5,
                    HorizontalAlignment = Enum.HorizontalAlignment.Left,
                    Expanded = v43.state.stateExpanded,
                    OnExpandedChanged = function()
                        v43:setState(function(v52)
                            return {
                                stateExpanded = not v52.stateExpanded
                            };
                        end);
                    end,
                    HeaderComponent = v28,
                    HeaderComponentProps = {
                        Localization = v43.props.Localization,
                        Tabs = v43.stateTabs,
                        Selected = v43.state.selectedStateTab,
                        OnTabSelected = v43.setStateTab,
                        OnSetStateClick = function()
                            if v43.props.OnSetState then
                                v43.props.OnSetState(v43.props.SelectedIndex);
                                return ;
                            else
                                return ;
                            end;
                        end
                    }
                }, {
                    StateLabel = if v46 ~= nil then v2.createElement(v19, {
                        MaxHeight = 400,
                        TextXAlignment = Enum.TextXAlignment.Left,
                        TextYAlignment = Enum.TextYAlignment.Top,
                        Font = Enum.Font.RobotoMono,
                        Text = v46,
                        RichText = true
                    }) else v2.createElement(v24, {
                        LineCount = v43.state.selectedStateTab == v43.stateTabs[1] and 10 or 30
                    })
                })
            })
        });
    else
        return nil;
    end;
end;
return (l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v29));


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.React);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Stylizer_0 = v4.Style.Stylizer;
local v10 = require(script.FlushDetails);
local v11 = require(script.ReduceDetails);
local v12 = v2.PureComponent:extend("Details");
v12.render = function(v13)
    local l_props_0 = v13.props;
    local v15 = l_props_0.Events[l_props_0.SelectedIndex];
    if v15 then
        local v16 = if v15.eventType == "Flush" then v10 else if v15.eventType == "Reduce" then v11 else nil;
        if v16 then
            return v2.createElement(v16, {
                Event = v15,
                SelectedIndex = l_props_0.SelectedIndex,
                OnSetState = l_props_0.OnSetState,
                OnRedoAction = l_props_0.OnRedoAction,
                OnUndoAction = l_props_0.OnUndoAction
            });
        else
            return nil;
        end;
    else
        return nil;
    end;
end;
return v3.connect(function(v17, v18)
    return {
        SelectedIndex = v18.SelectedIndex or v17.selectedIndex,
        Events = v18.Events or v17.events
    };
end)((l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v12)));


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.React);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Stylizer_0 = v4.Style.Stylizer;
local l_StyleKey_0 = v4.Style.StyleKey;
local l_UI_0 = v4.UI;
local l_List_0 = l_UI_0.List;
local l_TextLabel_0 = l_UI_0.TextLabel;
local v14 = v2.PureComponent:extend("EventList");
v14.init = function(v15)
    v15.rightAlignSizes = {};
end;
v14.render = function(v16)
    local l_props_0 = v16.props;
    local l_Stylizer_1 = l_props_0.Stylizer;
    local l_SelectedIndex_0 = l_props_0.SelectedIndex;
    local v20 = string.lower(l_props_0.SearchTerm);
    return v2.createElement(l_List_0, {
        Rows = l_props_0.Events,
        RowComponent = "TextButton",
        GetRowProps = function(v21, v22, v23, v24)
            local l_props_1 = v21.props;
            local l_name_0 = l_props_1.name;
            local l_elapsedMs_0 = l_props_1.elapsedMs;
            local v28 = v22 == l_SelectedIndex_0;
            local v29 = v20 ~= "" and string.find(string.lower(l_name_0), v20, 1, true) ~= nil;
            local v30 = v21.eventType == "Flush" and 6 or 1;
            local v31 = v30 * 0.75;
            local v32 = nil;
            if v31 <= l_elapsedMs_0 then
                v32 = l_Stylizer_1[l_StyleKey_0.ErrorText]:Lerp(l_Stylizer_1[l_StyleKey_0.WarningText], (math.clamp((v30 - l_elapsedMs_0) / (v30 - v31), 0, 1)));
            end;
            if v16.rightAlignSizes[v22] == nil then
                v16.rightAlignSizes[v22] = {
                    v2.createBinding(Vector2.zero)
                };
            end;
            return {
                LayoutOrder = v22,
                Position = v23,
                Size = v24,
                BackgroundColor3 = if not v28 then l_Stylizer_1[l_StyleKey_0.SecondaryMain] else l_Stylizer_1[l_StyleKey_0.MenuEntryHighlight],
                BackgroundTransparency = (v28 or v29) and 0 or 1,
                AutoButtonColor = false,
                Text = "",
                [v2.Event.Activated] = function()
                    l_props_0.OnSelected(v22);
                end,
                children = {
                    Padding = v2.createElement("UIPadding", {
                        PaddingLeft = UDim.new(0, 5),
                        PaddingRight = UDim.new(0, 12)
                    }),
                    Corner = v2.createElement("UICorner", {
                        CornerRadius = UDim.new(0, 3)
                    }),
                    Title = v2.createElement("Frame", {
                        BackgroundTransparency = 1,
                        Size = v16.rightAlignSizes[v22][1]:map(function(v33)
                            return UDim2.new(1, -v33.X - 5, 1, 0);
                        end)
                    }, {
                        Label = v2.createElement(l_TextLabel_0, {
                            Size = UDim2.fromScale(1, 1),
                            Text = l_name_0,
                            TextColor = if not not v21.altered and v21.altered.skipped then l_Stylizer_1[l_StyleKey_0.SubText] else nil,
                            TextXAlignment = Enum.TextXAlignment.Left,
                            TextTruncate = Enum.TextTruncate.AtEnd
                        }, {
                            Strikethrough = v2.createElement("Frame", {
                                Visible = not not v21.altered and v21.altered.skipped,
                                BackgroundColor3 = l_Stylizer_1[l_StyleKey_0.SubText],
                                BorderSizePixel = 0,
                                Size = UDim2.new(1, 0, 0, 1),
                                Position = UDim2.fromScale(0.5, 0.5),
                                AnchorPoint = Vector2.new(0.5, 0.5)
                            })
                        })
                    }),
                    RightAligned = v2.createElement("Frame", {
                        BackgroundTransparency = 1,
                        Size = UDim2.fromScale(0.5, 1),
                        Position = UDim2.fromScale(0.5, 0)
                    }, {
                        Layout = v2.createElement("UIListLayout", {
                            FillDirection = Enum.FillDirection.Horizontal,
                            HorizontalAlignment = Enum.HorizontalAlignment.Right,
                            VerticalAlignment = Enum.VerticalAlignment.Center,
                            SortOrder = Enum.SortOrder.LayoutOrder,
                            Padding = UDim.new(0, 5),
                            [v2.Change.AbsoluteContentSize] = function(v34)
                                v16.rightAlignSizes[v22][2](v34.AbsoluteContentSize);
                            end
                        }),
                        ElapsedMs = v2.createElement(l_TextLabel_0, {
                            Style = "SubText",
                            Text = string.format("%.1f ms", l_elapsedMs_0),
                            TextXAlignment = Enum.TextXAlignment.Right,
                            TextColor = v32,
                            Size = UDim2.fromScale(0, 1),
                            AutomaticSize = Enum.AutomaticSize.X
                        })
                    })
                }
            };
        end
    });
end;
return v3.connect(function(v35, _)
    return {
        SelectedIndex = v35.selectedIndex,
        SearchTerm = v35.searchTerm,
        Events = v35.events
    };
end)((l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v14)));


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.React);
local v3 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Stylizer_0 = v3.Style.Stylizer;
local l_UI_0 = v3.UI;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_List_0 = l_UI_0.List;
local v12 = v2.PureComponent:extend("LongText");
v12.render = function(v13)
    local v14 = string.split(v13.props.Text, "\n");
    return v2.createElement("Frame", {
        BackgroundTransparency = 1,
        Size = UDim2.new(1, 0, 0, (math.min(v13.props.MaxHeight, #v14 * 20))),
        Position = v13.props.Position,
        AnchorPoint = v13.props.AnchorPoint,
        AutomaticSize = v13.props.AutomaticSize,
        LayoutOrder = v13.props.LayoutOrder
    }, {
        List = v2.createElement(l_List_0, {
            Rows = v14,
            RowHeight = 20,
            RowComponent = function(v15)
                return v2.createElement(l_TextLabel_0, {
                    Text = v15.Text,
                    LayoutOrder = v15.LayoutOrder,
                    Position = v15.Position,
                    Size = v15.Size,
                    Font = v15.Font,
                    FontFace = v15.FontFace,
                    TextXAlignment = v15.TextXAlignment,
                    TextYAlignment = v15.TextYAlignment,
                    RichText = v15.RichText
                });
            end,
            GetRowProps = function(v16, v17, v18, v19)
                return {
                    Text = v16,
                    LayoutOrder = v17,
                    Position = v18,
                    Size = v19,
                    Font = v13.props.Font,
                    FontFace = v13.props.FontFace,
                    TextXAlignment = v13.props.TextXAlignment,
                    TextYAlignment = v13.props.TextYAlignment,
                    RichText = v13.props.RichText
                };
            end
        })
    });
end;
return (l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v12));


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.React);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Stylizer_0 = v4.Style.Stylizer;
local l_UI_0 = v4.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_IconButton_0 = l_UI_0.IconButton;
local l_SearchBar_0 = l_UI_0.SearchBar;
local v14 = v2.PureComponent:extend("Topbar");
v14.render = function(v15)
    local l_props_0 = v15.props;
    return v2.createElement(l_Pane_0, {
        Style = "None",
        Size = UDim2.new(1, 0, 0, 32),
        Layout = Enum.FillDirection.Horizontal,
        VerticalAlignment = Enum.VerticalAlignment.Center,
        HorizontalAlignment = Enum.HorizontalAlignment.Left,
        Spacing = 5
    }, {
        SearchBar = v2.createElement(l_SearchBar_0, {
            LayoutOrder = 1,
            Width = 300,
            IncrementalTextSearch = true,
            IncrementalTextSearchDelay = 150,
            ShowSearchButton = false,
            ShowSearchIcon = true,
            PlaceholderText = l_props_0.Localization:getText("Topbar", "SearchbarPlaceholder"),
            OnSearchRequested = l_props_0.OnSearch
        }),
        ClearList = v2.createElement(l_IconButton_0, {
            LayoutOrder = 2,
            Size = UDim2.fromScale(0, 1),
            AutomaticSize = Enum.AutomaticSize.X,
            LeftIcon = "rbxasset://textures/RoduxDevtools/ClearList.png",
            Text = l_props_0.Localization:getText("Topbar", "ClearList.Text"),
            TooltipText = l_props_0.Localization:getText("Topbar", "ClearList.Tooltip"),
            Disabled = l_props_0.EventCount == 0,
            OnClick = function()
                if l_props_0.OnClearList then
                    l_props_0.OnClearList();
                    return ;
                else
                    return ;
                end;
            end
        })
    });
end;
return v3.connect(function(v17, _)
    return {
        SearchTerm = v17.searchTerm,
        EventCount = #v17.events
    };
end)((l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v14)));


local l_StudioFixPluginWidgetLocalizedIds_0 = game:GetFastFlag("StudioFixPluginWidgetLocalizedIds");
local l_RunService_0 = game:GetService("RunService");
local l_Parent_0 = script.Parent.Parent;
local v3 = require(l_Parent_0.Packages.React);
local v4 = require(l_Parent_0.Packages.ReactRoblox);
local v5 = require(l_Parent_0.Packages.Rodux);
local v6 = require(l_Parent_0.Packages.Framework);
local l_UI_0 = v6.UI;
local l_DockWidget_0 = l_UI_0.DockWidget;
local l_PluginButton_0 = l_UI_0.PluginButton;
local l_PluginToolbar_0 = l_UI_0.PluginToolbar;
local l_Pane_0 = l_UI_0.Pane;
local l_ContextServices_0 = v6.ContextServices;
local l_Plugin_0 = l_ContextServices_0.Plugin;
local l_Mouse_0 = l_ContextServices_0.Mouse;
local l_Store_0 = l_ContextServices_0.Store;
local v16 = require(l_Parent_0.Src.Reducers.MainReducer);
local v17 = require(l_Parent_0.Src.Resources.MakeTheme);
local l_Actions_0 = l_Parent_0.Src.Actions;
local v19 = require(l_Actions_0.UpdateSelectedIndex);
local v20 = require(l_Actions_0.UpdateSearchTerm);
local v21 = require(l_Actions_0.UpdateEvents);
local v22 = require(l_Actions_0.ClearEvents);
local l_SourceStrings_0 = l_Parent_0.Src.Resources.Localization.SourceStrings;
local l_LocalizedStrings_0 = l_Parent_0.Src.Resources.Localization.LocalizedStrings;
local l_Components_0 = l_Parent_0.Src.Components;
local v26 = require(l_Components_0.ControlledSplitPane);
local v27 = require(l_Components_0.Topbar);
local v28 = require(l_Components_0.EventList);
local v29 = require(l_Components_0.Details);
local v30 = v3.PureComponent:extend("MainPlugin");
v30.init = function(v31, _)
    v31:setState({
        enabled = false
    });
    v31.toggleEnabled = function()
        v31:setState(function(v33)
            return {
                enabled = not v33.enabled
            };
        end);
    end;
    v31.onClose = function()
        v31:setState({
            enabled = false
        });
    end;
    v31.onRestore = function(v34)
        v31:setState({
            enabled = v34
        });
    end;
    v31.onWidgetEnabledChanged = function(v35)
        v31:setState({
            enabled = v35.Enabled
        });
    end;
    v31.store = v5.Store.new(v16, nil, {
        v5.thunkMiddleware
    }, nil);
    if not (l_RunService_0:IsEdit() or not l_RunService_0:IsClient()) then
        local l___RoduxDevtoolsPluginBridge_0 = (workspace.CurrentCamera or workspace):FindFirstChild("__RoduxDevtoolsPluginBridge");
        if not l___RoduxDevtoolsPluginBridge_0 or not l___RoduxDevtoolsPluginBridge_0:IsA("BindableEvent") then
            v31.devtoolsBridge = Instance.new("BindableEvent");
            v31.devtoolsBridge.Name = "__RoduxDevtoolsPluginBridge";
            v31.devtoolsBridge.Archivable = false;
            v31.devtoolsBridge.Parent = workspace.CurrentCamera or workspace;
        else
            v31.devtoolsBridge = l___RoduxDevtoolsPluginBridge_0;
        end;
        v31.pluginBatchHandlers = {
            updateEvents = function(v37)
                v31.store:dispatch(v21(v37));
            end,
            updateEvent = function(v38)
                v31.store:dispatch(v21({
                    [v38.index] = v38.event
                }));
            end
        };
        v31.devtoolsBridge.Event:Connect(function(v39, v40)
            if v39 ~= "PluginBatchPackets" then
                return ;
            else
                for _, v42 in v40, nil, nil do
                    local v43 = v31.pluginBatchHandlers[v42.type];
                    if v43 then
                        local l_status_0, l_result_0 = pcall(v43, v42.props);
                        if not l_status_0 then
                            warn((("RoduxDevtools plugin encountered an error while processing packet '%*': %*"):format(v42.type, l_result_0)));
                        end;
                    else
                        warn(("RoduxDevtools plugin received an unknown packet type '%*'"):format(v42.type), v42);
                    end;
                end;
                return ;
            end;
        end);
    end;
    v31.localization = l_ContextServices_0.Localization.new({
        stringResourceTable = l_SourceStrings_0,
        translationResourceTable = l_LocalizedStrings_0,
        pluginName = "RoduxDevtools"
    });
    v31.analytics = l_ContextServices_0.Analytics.new(function()
        return {};
    end, {});
end;
v30.willUnmount = function(v46)
    if v46.devtoolsBridge then
        v46.devtoolsBridge:Destroy();
    end;
end;
v30.renderButtons = function(v47, v48)
    return {
        Toggle = v3.createElement(l_PluginButton_0, {
            Toolbar = v48,
            Active = v47.state.enabled,
            Id = "RoduxDevtools_ToggleButton",
            Title = v47.localization:getText("Plugin", "Button"),
            Tooltip = v47.localization:getText("Plugin", "Description"),
            Icon = "rbxasset://textures/RoduxDevtools/ToolbarIcon.png",
            OnClick = v47.toggleEnabled,
            ClickableWhenViewportHidden = true
        })
    };
end;
v30.render = function(v49)
    local l_props_0 = v49.props;
    local l_state_0 = v49.state;
    local l_Plugin_1 = l_props_0.Plugin;
    return l_ContextServices_0.provide({
        l_Plugin_0.new(l_Plugin_1),
        l_Store_0.new(v49.store),
        l_Mouse_0.new(l_Plugin_1:getMouse()),
        v17(),
        v49.localization,
        v49.analytics
    }, {
        Toolbar = v3.createElement(l_PluginToolbar_0, {
            Title = v49.localization:getText("Plugin", "Toolbar"),
            RenderButtons = function(v53)
                return v49:renderButtons(v53);
            end
        }),
        MainWidget = v3.createElement(l_DockWidget_0, {
            Id = if not l_StudioFixPluginWidgetLocalizedIds_0 then nil else "RoduxDevtools",
            Enabled = l_state_0.enabled,
            Title = v49.localization:getText("Plugin", "Name"),
            ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
            InitialDockState = Enum.InitialDockState.Bottom,
            Size = Vector2.new(640, 480),
            MinSize = Vector2.new(400, 250),
            OnClose = v49.onClose,
            ShouldRestore = true,
            OnWidgetRestored = v49.onRestore,
            [v4.Change.Enabled] = v49.onWidgetEnabledChanged
        }, {
            Main = v3.createElement(l_Pane_0, {
                Style = "Box",
                Padding = 5
            }, {
                Topbar = v3.createElement(v27, {
                    OnSearch = function(v54)
                        v49.store:dispatch(v20(v54));
                    end,
                    OnClearList = function()
                        v49.devtoolsBridge:Fire("DevtoolsCall", "Clear");
                        v49.store:dispatch(v19(0));
                        v49.store:dispatch(v22());
                    end
                }),
                Sections = v3.createElement(v26, {
                    UseScale = false,
                    ClampSize = true,
                    UseDeficit = true,
                    Position = UDim2.fromOffset(0, 37),
                    Size = UDim2.new(1, 0, 1, -37),
                    MinSizes = {
                        UDim.new(0, 150),
                        UDim.new(0, 100)
                    },
                    MaxSizes = {
                        UDim.new(0, 600),
                        nil
                    },
                    InitialSizes = {
                        UDim.new(0, 300),
                        UDim.new(1, -300)
                    }
                }, {
                    v3.createElement(l_Pane_0, {
                        Style = "BorderBox",
                        Padding = 1
                    }, {
                        EventList = v3.createElement(v28, {
                            OnSelected = function(v55)
                                local v56 = v49.store:getState().events[v55];
                                if v56 then
                                    if v56.isStub then
                                        v49.devtoolsBridge:Fire("DevtoolsCall", "_fillPluginStubAtIndex", v55);
                                    end;
                                    v49.store:dispatch(v19(v55));
                                    return ;
                                else
                                    return ;
                                end;
                            end
                        })
                    }),
                    v3.createElement(l_Pane_0, {
                        Style = "BorderBox",
                        Padding = 1
                    }, {
                        Details = v3.createElement(v29, {
                            OnSetState = function(v57)
                                v49.devtoolsBridge:Fire("DevtoolsCall", "RevertToStateAtIndex", v57);
                            end,
                            OnUndoAction = function(v58)
                                v49.devtoolsBridge:Fire("DevtoolsCall", "UndoActionAtIndex", v58);
                            end,
                            OnRedoAction = function(v59)
                                v49.devtoolsBridge:Fire("DevtoolsCall", "RedoActionAtIndex", v59);
                            end
                        })
                    })
                })
            })
        })
    });
end;
return v30;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Rodux);
local v2 = require(l_Parent_0.Packages.Dash);
local l_Actions_0 = l_Parent_0.Src.Actions;
return (v1.createReducer({}, {
    [require(l_Actions_0.UpdateEvents).name] = function(v4, v5)
        return v2.join(v4, v5.events);
    end,
    [require(l_Actions_0.ClearEvents).name] = function(_, _)
        return {};
    end
}));


local v0 = require(script.Parent.Parent.Parent.Packages.Rodux);
local l_Parent_0 = script.Parent;
return (v0.combineReducers({
    selectedIndex = require(l_Parent_0.SelectedIndexReducer),
    searchTerm = require(l_Parent_0.SearchTermReducer),
    events = require(l_Parent_0.EventsReducer)
}));


local l_Parent_0 = script.Parent.Parent.Parent;
return (require(l_Parent_0.Packages.Rodux).createReducer("", {
    [require(l_Parent_0.Src.Actions.UpdateSearchTerm).name] = function(_, v2)
        return v2.searchTerm;
    end
}));


local l_Parent_0 = script.Parent.Parent.Parent;
return (require(l_Parent_0.Packages.Rodux).createReducer(0, {
    [require(l_Parent_0.Src.Actions.UpdateSelectedIndex).name] = function(_, v2)
        return v2.selectedIndex;
    end
}));


local l_Reducers_0 = script.Parent.Reducers;
local _ = require(l_Reducers_0.SelectedIndexReducer);
local _ = require(l_Reducers_0.SearchTermReducer);
local _ = require(l_Reducers_0.EventsReducer);
return {};


return function()
    local v0 = 0;
    return function()
        v0 = v0 + 1;
        return v0;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.JestDiff);
local l_pretty_0 = require(l_Parent_0.Packages.Dash).pretty;
local v3 = {
    contextLines = 3
};
local function v5(v4)
    return v4;
end;
local function v7(v6)
    return "" .. v6 .. "";
end;
local function v9(v8)
    return "" .. v8 .. "";
end;
local function v11(v10)
    return "" .. v10 .. "";
end;
local function v13(v12)
    return "" .. v12 .. "";
end;
local function v24(v14, v15, v16)
    if not (#v14 ~= 0 and #v15 ~= 0) or string.byte(v14, 1) ~= string.byte(v15, 1) then
        return 0;
    else
        local v17 = 1;
        local v18 = math.min(#v14, #v15);
        local l_v18_0 = v18;
        local v20 = 1;
        while v17 < l_v18_0 do
            if string.sub(v14, v20, l_v18_0) == string.sub(v15, v20, l_v18_0) then
                v17 = l_v18_0;
                v20 = v17;
            else
                v18 = l_v18_0;
            end;
            l_v18_0 = math.floor(v17 + (v18 - v17) / 2);
        end;
        local v21 = (not v16 and 0 or v16.contextLines) or 0;
        local v22 = -1;
        for v23 = l_v18_0, 0, -1 do
            l_v18_0 = v23;
            if string.byte(v14, v23) == 10 then
                v22 = v22 + 1;
                if not (v21 > v22) then
                    break;
                end;
            end;
        end;
        return l_v18_0;
    end;
end;
local function v35(v25, v26, v27)
    if not (#v25 ~= 0 and #v26 ~= 0) or string.byte(v25, -1) ~= string.byte(v26, -1) then
        return 0;
    else
        local v28 = 1;
        local v29 = math.min(#v25, #v26);
        local l_v29_0 = v29;
        local v31 = 1;
        while v28 < l_v29_0 do
            if string.sub(v25, -l_v29_0, -v31) == string.sub(v26, -l_v29_0, -v31) then
                v28 = l_v29_0;
                v31 = v28;
            else
                v29 = l_v29_0;
            end;
            l_v29_0 = math.floor(v28 + (v29 - v28) / 2);
        end;
        local v32 = (not v27 and 0 or v27.contextLines) or 0;
        local v33 = -1;
        for v34 = l_v29_0, 0, -1 do
            l_v29_0 = v34;
            if string.byte(v25, -v34) == 10 then
                v33 = v33 + 1;
                if not (v32 > v33) then
                    break;
                end;
            end;
        end;
        return l_v29_0;
    end;
end;
return function(v36, v37, v38)
    if v38 == nil then
        v38 = v3;
    end;
    local l_contextLines_0 = v38.contextLines;
    local v40 = l_pretty_0(v36, {
        depth = 100,
        multiline = true,
        maxLineLength = 100,
        indent = "  "
    });
    local v41 = l_pretty_0(v37, {
        depth = 100,
        multiline = true,
        maxLineLength = 100,
        indent = "  "
    });
    if v40 == v41 then
        return "Compared values have no visual difference.";
    else
        local v42 = v24(v40, v41, {
            contextLines = l_contextLines_0
        });
        if v42 > 0 then
            v40 = string.sub(v40, v42 + 1);
            v41 = string.sub(v41, v42 + 1);
        end;
        local v43 = v35(v40, v41, {
            contextLines = l_contextLines_0
        });
        if v43 > 0 then
            v40 = string.sub(v40, 1, -v43 - 1);
            v41 = string.sub(v41, 1, -v43 - 1);
        end;
        return (v1.diff(v40, v41, {
            contextLines = l_contextLines_0,
            expand = false,
            omitAnnotationLines = true,
            aColor = v13,
            bColor = v11,
            patchColor = v7,
            changeColor = v9,
            commonColor = v5
        }));
    end;
end;


return function(v0, v1)
    local l_Parent_0 = script.Parent.Parent;
    local l_DraggerFramework_0 = l_Parent_0.Packages.DraggerFramework;
    local v4 = require(l_Parent_0.Packages.Roact);
    local v5 = require(l_Parent_0.Packages.DraggerSchemaCore.DraggerSchema);
    local v6 = require(l_DraggerFramework_0.Implementation.DraggerContext_PluginImpl);
    local v7 = require(l_DraggerFramework_0.DraggerTools.DraggerToolComponent);
    local v8 = require(l_DraggerFramework_0.Flags.getFFlagDraggerHandlesIsEnabledFunction);
    local v9 = require(l_DraggerFramework_0.Handles.RotateHandles);
    local v10 = nil;
    local v11 = false;
    local v12 = nil;
    local function v19()
        if not v12 then
            v11 = true;
            v0:Activate(true);
            v1.mainButton:SetActive(true);
            local function v16(v13, v14, v15)
                return v13:rotateToWithIk(v14, v15);
            end;
            local v17 = nil;
            if v8() then
                v17 = function(v18)
                    if not v18 or not v18.basisObject then
                        return false;
                    else
                        return true;
                    end;
                end;
            end;
            v12 = v4.mount(v4.createElement(v7, {
                Mouse = v0:GetMouse(),
                DraggerContext = v10,
                DraggerSchema = v5,
                DraggerSettings = {
                    AnalyticsName = "Rotate",
                    AllowDragSelect = true,
                    AllowFreeformDrag = true,
                    ShowLocalSpaceIndicator = true,
                    ShowPivotIndicator = true,
                    HandlesList = {
                        v9.new(v10, {
                            ShowBoundingBox = true,
                            Summonable = true,
                            IsEnabledFunction = not not v8() and v17 or nil
                        }, v5.TransformHandlesImplementation.new(v10, v16))
                    }
                }
            }));
            return ;
        else
            warn("Plugin handle already exists");
            return ;
        end;
    end;
    local function _()
        v11 = false;
        v1.mainButton:SetActive(false);
        if v12 then
            v4.unmount(v12);
            v12 = nil;
        end;
    end;
    (function()
        v0.Name = "RotateDragger";
        v10 = v6.new(v0, game, settings(), v5.Selection.new());
        v0.Deactivation:connect(function()
            if v11 then
                v11 = false;
                v1.mainButton:SetActive(false);
                if v12 then
                    v4.unmount(v12);
                    v12 = nil;
                end;
            end;
        end);
        v1.mainButtonClickedSignal:Connect(function()
            if not v11 then
                v19();
            else
                v11 = false;
                v1.mainButton:SetActive(false);
                if v12 then
                    v4.unmount(v12);
                    v12 = nil;
                    return ;
                end;
            end;
        end);
    end)();
end;


return function(v0, v1)
    local l_Parent_0 = script.Parent.Parent;
    local l_DraggerFramework_0 = l_Parent_0.Packages.DraggerFramework;
    local v4 = require(l_Parent_0.Packages.Roact);
    local v5 = require(l_DraggerFramework_0.Implementation.DraggerContext_PluginImpl);
    local v6 = require(l_DraggerFramework_0.DraggerTools.DraggerToolComponent);
    local v7 = require(l_DraggerFramework_0.Flags.getFFlagDraggerHandlesIsEnabledFunction);
    local v8 = require(l_DraggerFramework_0.Handles.ExtrudeHandles);
    local v9 = require(l_Parent_0.Packages.DraggerSchemaCore.DraggerSchema);
    local v10 = nil;
    local v11 = false;
    local v12 = nil;
    local function v15()
        if not v12 then
            v11 = true;
            v0:Activate(true);
            v1.mainButton:SetActive(true);
            local v13 = nil;
            if v7() then
                v13 = function(v14)
                    if not v14 or not v14.basisObject then
                        return false;
                    else
                        return true;
                    end;
                end;
            end;
            v12 = v4.mount(v4.createElement(v6, {
                Mouse = v0:GetMouse(),
                DraggerContext = v10,
                DraggerSchema = v9,
                DraggerSettings = {
                    AnalyticsName = "Scale",
                    AllowDragSelect = true,
                    AllowFreeformDrag = true,
                    ShowLocalSpaceIndicator = true,
                    ShowPivotIndicator = true,
                    HandlesList = {
                        v8.new(v10, {
                            ShowBoundingBox = true,
                            Summonable = true,
                            IsEnabledFunction = not not v7() and v13 or nil
                        }, v9.ExtrudeHandlesImplementation.new(v10))
                    }
                }
            }));
            return ;
        else
            warn("Plugin handle already exists");
            return ;
        end;
    end;
    local function _()
        v11 = false;
        v1.mainButton:SetActive(false);
        if v12 then
            v4.unmount(v12);
            v12 = nil;
        end;
    end;
    (function()
        v0.Name = "ScaleDragger";
        v10 = v5.new(v0, game, settings(), v9.Selection.new());
        v0.Deactivation:Connect(function()
            if v11 then
                v11 = false;
                v1.mainButton:SetActive(false);
                if v12 then
                    v4.unmount(v12);
                    v12 = nil;
                end;
            end;
        end);
        v1.mainButtonClickedSignal:Connect(function()
            if not v11 then
                v15();
            else
                v11 = false;
                v1.mainButton:SetActive(false);
                if v12 then
                    v4.unmount(v12);
                    v12 = nil;
                    return ;
                end;
            end;
        end);
    end)();
end;


local l_RunService_0 = game:GetService("RunService");
local l_Parent_0 = script.Parent.Parent;
local l_DraggerFramework_0 = l_Parent_0.Packages.DraggerFramework;
local v3 = require(l_Parent_0.Packages.Roact);
local v4 = require(l_Parent_0.Packages.DraggerSchemaCore.DraggerSchema);
local v5 = require(l_DraggerFramework_0.Implementation.DraggerContext_PluginImpl);
local v6 = require(l_DraggerFramework_0.DraggerTools.DraggerToolComponent);
if not require(l_DraggerFramework_0.Utility.isCli)() then
    local v7 = nil;
    local v8 = false;
    local v9 = nil;
    local v10 = nil;
    local function v12(v11)
        if not v9 then
            v8 = true;
            plugin:Activate(true);
            v10:SetActive(true);
            v9 = v3.mount(v3.createElement(v6, {
                Mouse = plugin:GetMouse(),
                DraggerContext = v7,
                DraggerSchema = v4,
                DraggerSettings = {
                    AnalyticsName = "Select",
                    AllowDragSelect = true,
                    AllowFreeformDrag = true
                },
                WasAutoSelected = v11
            }));
            return ;
        else
            warn("Plugin handle already exists");
            return ;
        end;
    end;
    local function _()
        v8 = false;
        v10:SetActive(false);
        if v9 then
            v3.unmount(v9);
            v9 = nil;
        end;
    end;
    (function()
        plugin.Name = "SelectDragger";
        v10 = plugin:CreateToolbar("Home"):CreateButton("Select", "Select an Object", "", "Select");
        v7 = v5.new(plugin, game, settings(), v4.Selection.new());
        plugin.Deactivation:connect(function()
            if v8 then
                v8 = false;
                v10:SetActive(false);
                if v9 then
                    v3.unmount(v9);
                    v9 = nil;
                end;
            end;
        end);
        v10.Click:Connect(function()
            if not v8 then
                v12(false);
            else
                v8 = false;
                v10:SetActive(false);
                if v9 then
                    v3.unmount(v9);
                    v9 = nil;
                    return ;
                end;
            end;
        end);
    end)();
    if not (l_RunService_0:IsRunning() and not l_RunService_0:IsRunMode()) then
        v12(true);
    end;
    return ;
else
    return ;
end;


local l_Parent_0 = script.Parent.Parent;
local l_DraggerFramework_0 = l_Parent_0.Packages.DraggerFramework;
local v2 = require(l_DraggerFramework_0.Utility.isFTF);
local v3 = require(l_DraggerFramework_0.Utility.isCli);
local v4 = false;
if v2() then
    v4 = true;
end;
if v4 then
    local l_DraggerSchemaCore_0 = l_Parent_0.Packages.DraggerSchemaCore;
    local v6 = require(l_Parent_0.Packages.Dev.TestEZ);
    local l_TestBootstrap_0 = v6.TestBootstrap;
    local v8 = not not _G.TEAMCITY and v6.Reporters.TeamCityReporter or v6.Reporters.TextReporter;
    print("----- All DraggerFramework Tests ------");
    l_TestBootstrap_0:run({
        l_DraggerFramework_0
    }, v8);
    print("----------------------------------");
    print("----- All DraggerSchemaCore Tests ------");
    l_TestBootstrap_0:run({
        l_DraggerSchemaCore_0
    }, v8);
    print("----------------------------------");
end;
if v3() then
    game:GetService("ProcessService"):ExitAsync(0);
end;


require(script.Parent.defineLuaFlags);
if game:GetFastFlag("EnableSimulationStep") then
    plugin.Name = script:FindFirstAncestor("SimulationStep").Name;
    local l_RunService_0 = game:GetService("RunService");
    local v1 = nil;
    local v2 = nil;
    local v3 = nil;
    local v4 = nil;
    local v5 = nil;
    local v6 = nil;
    local v8 = {
        pauseButtons = function(v7)
            if not l_RunService_0:IsEdit() then
                if not v7 then
                    v1.Enabled = false;
                    v2.Enabled = false;
                    v3.Enabled = true;
                    v4.Enabled = true;
                    if game:GetFastFlag("EnableSimulationStepForward") then
                        v5.Enabled = false;
                        v6.Enabled = false;
                    end;
                else
                    v1.Enabled = true;
                    v2.Enabled = true;
                    v3.Enabled = false;
                    v4.Enabled = false;
                    if game:GetFastFlag("EnableSimulationStepForward") then
                        v5.Enabled = true;
                        v6.Enabled = true;
                        return ;
                    end;
                end;
            else
                v1.Enabled = false;
                v2.Enabled = false;
                v3.Enabled = false;
                v4.Enabled = false;
                if game:GetFastFlag("EnableSimulationStepForward") then
                    v5.Enabled = false;
                    v6.Enabled = false;
                    return ;
                end;
            end;
        end
    };
    v8.checkRunState = game:GetService("RunService"):GetPropertyChangedSignal("RunState"):Connect(function()
        v8.pauseButtons(not game:GetService("RunService"):IsRunning());
    end);
    v8.onPause = function()
        game:GetService("RunService"):Pause();
        v8.pauseButtons(true);
    end;
    v8.onResume = function()
        game:GetService("RunService"):Run();
        v8.pauseButtons(false);
    end;
    v8.onStepForward = function()
        if game:GetFastFlag("EnableSimulationStepForward") then
            workspace:StepPhysics(0.016666666666666666);
        end;
    end;
    v8.invokeAction = function(v9)
        if not game:GetService("RunService"):IsEdit() then
            if v9 == "Pause" then
                v8.onPause();
                return ;
            elseif v9 == "Resume" then
                v8.onResume();
                return ;
            else
                if v9 == "StepForward" then
                    v8.onStepForward();
                end;
                return ;
            end;
        else
            return ;
        end;
    end;
    plugin:OnInvoke("syncRunState", v8.invokeAction);
    v8.pauseAll = function()
        plugin:Invoke("syncRunState", "Pause");
    end;
    v8.resumeAll = function()
        plugin:Invoke("syncRunState", "Resume");
    end;
    v8.stepForwardAll = function()
        plugin:Invoke("syncRunState", "StepForward");
    end;
    local v10 = not l_RunService_0:IsRunning();
    local l_plugin_Toolbar_0 = plugin:CreateToolbar("simulationStep");
    v1 = l_plugin_Toolbar_0:CreateButton("ResumeAll", "", "rbxlocaltheme://Resume");
    v1.ClickableWhenViewportHidden = true;
    v1.Click:Connect(v8.resumeAll);
    v2 = l_plugin_Toolbar_0:CreateButton("Resume", "", "rbxlocaltheme://Resume");
    v2.ClickableWhenViewportHidden = true;
    v2.Click:Connect(v8.onResume);
    v3 = l_plugin_Toolbar_0:CreateButton("PauseAll", "", "rbxlocaltheme://Pause");
    v3.ClickableWhenViewportHidden = true;
    v3.Click:Connect(v8.pauseAll);
    v4 = l_plugin_Toolbar_0:CreateButton("Pause", "", "rbxlocaltheme://Pause");
    v4.ClickableWhenViewportHidden = true;
    v4.Click:Connect(v8.onPause);
    if game:GetFastFlag("EnableSimulationStepForward") then
        v5 = l_plugin_Toolbar_0:CreateButton("StepForwardAll", "", "rbxlocaltheme://Fwd");
        v5.ClickableWhenViewportHidden = true;
        v5.Click:Connect(v8.stepForwardAll);
        v6 = l_plugin_Toolbar_0:CreateButton("StepForward", "", "rbxlocaltheme://Fwd");
        v6.ClickableWhenViewportHidden = true;
        v6.Click:Connect(v8.onStepForward);
    end;
    v8.pauseButtons(v10);
    return ;
else
    return ;
end;


game:SetFlagVersion("EnableSocialPresence", 3);
game:DefineFastFlag("EnableSocialPresence", false);
game:DefineFastFlag("COLLAB5718AccessibleColors", false);
game:DefineFastFlag("COLLAB5863Telemetry", false);
game:DefineFastFlag("FixSocialPresenceDropdown", false);
game:DefineFastFlag("COLLAB6395SocialPresenceStylesheets", false);
return nil;


require(script.Parent.defineLuaFlags);
if plugin then
    local l_Parent_0 = script.Parent.Parent;
    local v1 = require(l_Parent_0.Packages.TestLoader);
    v1.launch("SocialPresence", l_Parent_0.Src);
    if not v1.isCli() then
        if game:GetFastFlag("EnableSocialPresence") then
            if game:GetFastFlag("SocialPresenceIxpExperimentation") then
                local l_IXPService_0 = game:GetService("IXPService");
                if l_IXPService_0:GetUserStatusForLayer("Studio.Collaboration.SocialPresence") == Enum.IXPLoadingStatus.Initialized then
                    l_IXPService_0:LogUserLayerExposure("Studio.Collaboration.SocialPresence");
                    if not l_IXPService_0:GetUserLayerVariables("Studio.Collaboration.SocialPresence").enabled then
                        return ;
                    end;
                else
                    return ;
                end;
            end;
            local v3 = require(l_Parent_0.Packages.React);
            local v4 = require(l_Parent_0.Packages.ReactRoblox);
            local v5 = require(l_Parent_0.Src.MainPlugin);
            local v6 = require(l_Parent_0.Src.RibbonPlugin);
            local v7 = nil;
            local v8 = nil;
            local function v13()
                plugin.Name = l_Parent_0.Name;
                local l_BindableEvent_0 = Instance.new("BindableEvent");
                local v10 = v3.createElement(v5, {
                    Plugin = plugin,
                    EnableSignal = l_BindableEvent_0
                });
                v7 = v4.createRoot(Instance.new("Frame"));
                v7:render(v10);
                local l_plugin_QWidgetPluginGui_0 = plugin:CreateQWidgetPluginGui("RibbonWidget", {
                    Id = "RibbonWidget",
                    InitialEnabled = true,
                    MinSize = Vector2.new(27, 15),
                    Panel = true,
                    Resizable = true,
                    Title = "RibbonWidget",
                    Parent = "socialPresenceRibbonPlaceholder",
                    AddToParentLayout = true
                });
                local v12 = v3.createElement(v6, {
                    Plugin = plugin,
                    Widget = l_plugin_QWidgetPluginGui_0,
                    OnClick = function()
                        l_BindableEvent_0:Fire();
                    end
                });
                v8 = v4.createRoot(l_plugin_QWidgetPluginGui_0);
                v8:render(v12);
            end;
            plugin.Unloading:Connect(function()
                if v7 then
                    v7:render(nil);
                    v7 = nil;
                end;
                if v8 then
                    v8:render(nil);
                    v8 = nil;
                end;
            end);
            v13();
            return ;
        else
            return ;
        end;
    else
        return ;
    end;
else
    return ;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("SocialPresence");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_joinTags_0 = v2.Styling.joinTags;
local l_ContextServices_0 = v2.ContextServices;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_CrossPluginCommunication_0 = v2.Util.CrossPluginCommunication;
return function(v8)
    local v9 = v8.MockCrossPluginComm or l_CrossPluginCommunication_0.new("ManageCollaborators");
    local v10 = l_Analytics_0:use();
    return v1.createElement("TextButton", {
        [v1.Event.Activated] = function()
            v10:report("manageCollaboratorsPressed");
            v9:Fire("ToggleManageCollaborators");
        end,
        [v1.Tag] = l_joinTags_0("Component-AddCollaboratorButton Button X-RowS X-Middle X-Center", not v8.IsTeamCreateOn and "X-Pad" or nil)
    }, {
        CollaboratorIcon = v1.createElement("ImageLabel"),
        TextLabel = not v8.IsTeamCreateOn and v1.createElement("TextLabel", {
            Text = l_Localization_0.use():getText("Ribbon", "Collaborate")
        })
    });
end;


local l_createStyleRule_0 = require(script.Parent.Parent.Parent.Parent.Packages.Framework).Styling.createStyleRule;
return l_createStyleRule_0(".Component-AddCollaboratorButton", {
    AutomaticSize = Enum.AutomaticSize.XY,
    Size = UDim2.new(0, 24, 1, 0),
    Text = "",
    LayoutOrder = 100
}, {
    l_createStyleRule_0("> ImageLabel", {
        Image = "$AddCollaboratorIcon",
        Size = UDim2.fromOffset(16, 16),
        BorderSizePixel = 0,
        BackgroundTransparency = 1
    }),
    l_createStyleRule_0("> TextLabel", {
        TextColor3 = "$TextPrimary",
        BackgroundTransparency = 1,
        BorderSizePixel = 0,
        AutomaticSize = Enum.AutomaticSize.X,
        Font = Enum.Font.BuilderSans,
        TextSize = 16
    })
});


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.React);
local v2 = require(l_Parent_0.Packages.Framework);
local l_Localization_0 = v2.ContextServices.Localization;
local l_Stylizer_0 = v2.Style.Stylizer;
local l_UI_0 = v2.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_TextLabel_0 = l_UI_0.TextLabel;
local v8 = require(l_Parent_0.Src.Components.Thumbnails.CollaboratorActivityThumbnail);
local v9 = require(l_Parent_0.Src.Components.JumpToButton);
local v10 = require(l_Parent_0.Src.Components.CollaboratorStatus);
local l_StudioService_0 = game:GetService("StudioService");
local l_TweenService_0 = game:GetService("TweenService");
local l_ScriptRegistrationService_0 = game:GetService("ScriptRegistrationService");
local l_l_StudioService_0_UserId_0 = l_StudioService_0:GetUserId();
local function v18(v15, v16)
    local v17 = l_Localization_0.use();
    if not v15 then
        if v16 then
            return string.format(v17:getText("Collaborator", "Editing"), v16);
        else
            return v17:getText("Collaborator", "Workspace");
        end;
    else
        return v17:getText("Collaborator", "Idle");
    end;
end;
return function(v19)
    local v20, v21 = v1.useState(false);
    local v22, v23 = v1.useState(nil);
    local v24 = l_Stylizer_0:use();
    local v25 = l_Localization_0.use();
    local v26 = v1.useRef(nil);
    v1.useEffect(function()
        local v27 = nil;
        if not (v19.Status ~= v10.Scripting) or v19.Status == v10.PrivateScripting then
            local l_l_ScriptRegistrationService_0_SourceContainerByScriptGuid_0 = l_ScriptRegistrationService_0:GetSourceContainerByScriptGuid(v19.CurDocGUID);
            if not l_l_ScriptRegistrationService_0_SourceContainerByScriptGuid_0 then
                v23(v25:getText("Collaborator", "DeletedScript"));
            else
                v23(l_l_ScriptRegistrationService_0_SourceContainerByScriptGuid_0.Name);
                v27 = l_l_ScriptRegistrationService_0_SourceContainerByScriptGuid_0:GetPropertyChangedSignal("Name"):Connect(function()
                    v23(l_l_ScriptRegistrationService_0_SourceContainerByScriptGuid_0.Name);
                end);
            end;
        elseif not (v19.Status ~= v10.Editing3D) or v19.Status == v10.None then
            v23(nil);
        else
            error("Unsupported collaborator status: " .. v19.Status);
        end;
        return function()
            if v27 then
                v27:Disconnect();
            end;
        end;
    end, {
        v19.Status,
        v19.CurDocGUID
    });
    local v29 = not v19.IsIdle;
    if v29 then
        if v19.Status ~= v10.Editing3D then
            v29 = false;
            if not (v19.Status == v10.Scripting) then
                goto label0;
            end;
        end;
        v29 = v19.CanJumpBack or v19.Id ~= l_l_StudioService_0_UserId_0;
    end;
    ::label0::;
    v1.useEffect(function()
        if not v29 then
            l_TweenService_0:Create(v26.current, TweenInfo.new(0.2, Enum.EasingStyle.Cubic), {
                Size = v24.collaboratorItem.size
            }):Play();
        end;
    end, {
        v29
    });
    local v30 = {
        Icon = v1.createElement(v8, {
            Size = v24.collaboratorItem.thumbnailSize,
            Id = v19.Id,
            RingColor = v19.Color,
            IsIdle = v19.IsIdle
        }),
        UsernameLabel = v1.createElement(l_TextLabel_0, {
            Text = v19.Username,
            TextSize = 18,
            TextXAlignment = Enum.TextXAlignment.Left,
            TextYAlignment = Enum.TextYAlignment.Top,
            Position = v24.collaboratorItem.usernamePosition
        }),
        EditingLabel = v1.createElement(l_TextLabel_0, {
            RichText = true,
            Style = "SubText",
            Text = v18(v19.IsIdle, v22),
            TextSize = 14,
            TextXAlignment = Enum.TextXAlignment.Left,
            TextYAlignment = Enum.TextYAlignment.Top,
            Position = v24.collaboratorItem.subtitlePosition
        })
    };
    if not (not v20 or not v29) then
        v30.JumpTo = v1.createElement(v9, {
            Id = v19.Id,
            OnJump = v19.OnJump
        });
    end;
    return v1.createElement(l_Pane_0, {
        Style = "RoundBox",
        Size = v24.collaboratorItem.size,
        Padding = 8,
        BackgroundColor3 = not not v20 and v24.collaboratorItem.hoveredBackground or nil,
        ForwardRef = v26,
        [v1.Event.MouseEnter] = function()
            v21(true);
            if v29 then
                v26.current.ClipsDescendants = true;
                l_TweenService_0:Create(v26.current, TweenInfo.new(0.2), {
                    Size = v24.collaboratorItem.expandedSize
                }):Play();
            end;
        end,
        [v1.Event.MouseLeave] = function()
            v21(false);
            l_TweenService_0:Create(v26.current, TweenInfo.new(0.2, Enum.EasingStyle.Cubic), {
                Size = v24.collaboratorItem.size
            }):Play();
        end
    }, v30);
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.React);
local v2 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v2.ContextServices;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Stylizer_0 = v2.Style.Stylizer;
local l_UI_0 = v2.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_Button_0 = l_UI_0.Button;
local l_Image_0 = l_UI_0.Image;
local l_ScrollingFrame_0 = l_UI_0.ScrollingFrame;
local v13 = require(l_Parent_0.Src.Components.CollaboratorItem);
local v14 = require(l_Parent_0.Src.Components.CollaboratorListFooter);
local v15 = require(l_Parent_0.Src.ContextServices.CollaboratorsServiceContext);
local l_UserId_0 = game:GetService("StudioService"):GetUserId();
return function()
    local v17 = l_Localization_0.use();
    local v18 = l_Stylizer_0:use();
    local v19 = l_Analytics_0:use();
    local l_StudioPublishService_0 = game:GetService("StudioPublishService");
    local v21 = v15:use():get();
    local v22, v23 = v1.useState({});
    local v24, v25 = v1.useState(true);
    local v26, v27 = v1.useState(false);
    local v28 = game.GameId > 0;
    v1.useEffect(function()
        v23((v21:GetCollaboratorsList()));
        local v29 = v21.CollaboratorInstanceCreatedSignal:Connect(function()
            v23(v21:GetCollaboratorsList());
        end);
        local v30 = v21.CollaboratorInstanceDestroyedSignal:Connect(function()
            v23(v21:GetCollaboratorsList());
        end);
        local v31 = v21.CollaboratorStatusUpdatedSignal:Connect(function()
            v23(v21:GetCollaboratorsList());
        end);
        local v32 = v21.CollaboratorIdleUpdate:Connect(function()
            v23(v21:GetCollaboratorsList());
        end);
        return function()
            v29:Disconnect();
            v30:Disconnect();
            v31:Disconnect();
            v32:Disconnect();
        end;
    end, {});
    if #v22 ~= 0 then
        local v33 = {
            Layout = v1.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Vertical
            })
        };
        for v34, v35 in v22, nil, nil do
            local v36 = v35.UserId == l_UserId_0 and -1 or v34;
            local l_createElement_0 = v1.createElement;
            local l_v13_0 = v13;
            local v39 = {
                Id = v35.UserId,
                Username = v35.Username,
                Color = if game:GetFastFlag("COLLAB5718AccessibleColors") then v35.CollaboratorColor3 else BrickColor.new(v35.CollaboratorColor).Color,
                IsIdle = v35.IsIdle,
                Status = tostring(v35.Status),
                CurDocGUID = v35.CurDocGUID
            };
            local v40 = false;
            if v35.UserId == l_UserId_0 then
                v40 = v26;
            end;
            v39.CanJumpBack = v40;
            v39.OnJump = function()
                v27(v35.UserId ~= l_UserId_0);
            end;
            v33[v36] = l_createElement_0(l_v13_0, v39);
        end;
        return v1.createElement(l_Pane_0, {
            Size = UDim2.fromScale(1, 1)
        }, {
            Body = v1.createElement(l_ScrollingFrame_0, {
                Padding = 8,
                Size = UDim2.new(1, 0, 1, -(v18.footer.height + v18.highlightToggle.height))
            }, v33),
            HighlightToggle = v1.createElement("TextButton", {
                Text = v17:getText("Settings", "ShowSelections"),
                TextXAlignment = Enum.TextXAlignment.Left,
                TextColor3 = v18.footer.iconColor,
                TextSize = 16,
                FontFace = Font.fromEnum(Enum.Font.SourceSans),
                AutoButtonColor = false,
                BackgroundColor3 = v18.highlightToggle.background,
                BorderColor3 = v18.highlightToggle.border,
                Size = UDim2.new(1, 0, 0, v18.highlightToggle.height),
                AnchorPoint = Vector2.new(0, 1),
                Position = UDim2.new(0, 0, 1, -v18.footer.height - 1),
                ZIndex = 2,
                [v1.Event.Activated] = function()
                    v21:ToggleSelectionHighlights(not v24);
                    v19:report("highlightsToggled", not v24);
                    v25(not v24);
                end
            }, {
                Padding = v1.createElement("UIPadding", {
                    PaddingLeft = UDim.new(0, 26)
                }),
                Image = v1.createElement(l_Image_0, {
                    Image = not not v24 and v18.footer.checkedIcon or v18.footer.uncheckedIcon,
                    Size = UDim2.fromOffset(16, 16),
                    Position = UDim2.new(0, -6, 0.5, 0),
                    AnchorPoint = Vector2.new(1, 0.5)
                })
            }),
            Footer = v1.createElement(v14)
        });
    else
        return v1.createElement(l_Pane_0, {
            Size = UDim2.fromScale(1, 1),
            Style = "Box"
        }, {
            TeamCreateText = v1.createElement(l_TextLabel_0, {
                Text = not not v28 and v17:getText("Settings", "EnableTeamCreateText") or v17:getText("Settings", "SaveToRobloxText"),
                Size = UDim2.new(1, 0, 0, 48),
                Position = UDim2.new(0.5, 0, 0.5, -8),
                AnchorPoint = Vector2.new(0.5, 1),
                TextWrapped = true,
                Style = "Body",
                TextSize = 16
            }),
            Button = v1.createElement(l_Button_0, {
                Style = "RoundPrimary",
                Text = not not v28 and v17:getText("Settings", "EnableTeamCreate") or v17:getText("Settings", "SaveToRoblox"),
                OnClick = function()
                    if not v28 then
                        l_StudioPublishService_0:ShowSaveOrPublishPlaceToRoblox(false, false, Enum.StudioCloseMode.None);
                        return ;
                    else
                        v21:ToggleTeamCreate(true);
                        return ;
                    end;
                end,
                Position = UDim2.fromScale(0.5, 0.5),
                AnchorPoint = Vector2.new(0.5, 0),
                Size = UDim2.fromOffset(142, 40)
            })
        });
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.React);
local v2 = require(l_Parent_0.Packages.Framework);
local l_Localization_0 = v2.ContextServices.Localization;
local l_Stylizer_0 = v2.Style.Stylizer;
local l_StyleModifier_0 = v2.Util.StyleModifier;
local l_UI_0 = v2.UI;
local l_IconButton_0 = l_UI_0.IconButton;
local l_DropdownMenu_0 = l_UI_0.DropdownMenu;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_Button_0 = l_UI_0.Button;
local l_TextService_0 = game:GetService("TextService");
local v12 = Vector2.new(1000, 1);
local l_FixSocialPresenceDropdown_0 = game:GetFastFlag("FixSocialPresenceDropdown");
return function()
    local l_CollaboratorsService_0 = game:GetService("CollaboratorsService");
    local v15 = l_Localization_0.use();
    local v16 = l_Stylizer_0:use();
    local v17, v18 = v1.useState(false);
    return v1.createElement("Frame", {
        BackgroundTransparency = 1,
        Size = UDim2.new(1, 0, 0, v16.footer.height),
        AnchorPoint = Vector2.new(0, 1),
        Position = UDim2.fromScale(0, 1),
        ZIndex = 2
    }, {
        Border = v1.createElement("UIStroke", {
            ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
            Thickness = 1,
            Color = v16.footer.borderColor
        }),
        Button = v1.createElement(l_IconButton_0, {
            OnClick = function()
                v18(true);
            end,
            LeftIcon = v16.footer.moreIcon,
            IconColor = v16.footer.iconColor,
            Size = UDim2.fromOffset(16, 16),
            Style = "IconOnly",
            Position = UDim2.new(1, -4, 0.5, 0),
            AnchorPoint = Vector2.new(1, 0.5)
        }),
        Menu = v1.createElement("Frame", {
            Position = not not l_FixSocialPresenceDropdown_0 and UDim2.new(1, -20, 1, -16) or UDim2.new(1, -4, 0.5, 0),
            AnchorPoint = not not l_FixSocialPresenceDropdown_0 and Vector2.new(1, 0) or Vector2.new(1, 0.5),
            BackgroundTransparency = 1
        }, {
            v1.createElement(l_DropdownMenu_0, {
                Hide = not v17,
                Items = {
                    v1.createElement(l_TextLabel_0, {
                        Text = v15:getText("Settings", "DisableTeamCreate"),
                        TextXAlignment = Enum.TextXAlignment.Left,
                        TextColor = v16.footer.disableTeamCreateColor
                    }, {
                        Padding = v1.createElement("UIPadding", {
                            PaddingLeft = UDim.new(0, 10)
                        })
                    })
                },
                OnItemActivated = function(_, v20)
                    if v20 == 1 then
                        l_CollaboratorsService_0:ToggleTeamCreate(false);
                    end;
                end,
                OnRenderItem = function(v21, v22, v23, v24)
                    return v1.createElement(l_Button_0, {
                        LayoutOrder = v22,
                        OnClick = v23,
                        Size = UDim2.new(1, 0, 0, 32),
                        StyleModifier = if not v24 then nil else l_StyleModifier_0.Hover
                    }, {
                        v21
                    });
                end,
                OnFocusLost = function()
                    v18(false);
                end,
                Style = {
                    Width = l_TextService_0:GetTextSize(v15:getText("Settings", "DisableTeamCreate"), 22, Enum.Font.SourceSans, v12).X,
                    MaxHeight = not l_FixSocialPresenceDropdown_0 and 120 or 32,
                    Offset = not not l_FixSocialPresenceDropdown_0 and Vector2.zero or Vector2.new(0, 12)
                }
            })
        })
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("SocialPresence");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local l_Localization_0 = require(l_script_FirstAncestor_0.Packages.Framework).ContextServices.Localization;
local v3 = require(l_script_FirstAncestor_0.Src.ContextServices.CollaboratorsServiceContext);
local v4 = require(l_script_FirstAncestor_0.Src.Components.CollaboratorThumbnail);
local v5 = require(l_script_FirstAncestor_0.Src.Components.AddCollaboratorButton);
local l_TextService_0 = game:GetService("TextService");
local v7 = Vector2.new(1000, 1);
local function v14(v8, v9)
    local v10 = l_Localization_0.use();
    if v8 > 0 then
        local v11 = math.min(v8, 5);
        local v12 = 24 * v11 - (v11 - 1) * 6;
        local v13 = 24;
        if v9 then
            v12 = v12 + 24;
        end;
        return Vector2.new(v12 + 10, v13 + 4);
    else
        return Vector2.new(((24 + l_TextService_0:GetTextSize(v10:getText("Ribbon", "Collaborate"), 18, Enum.Font.SourceSansBold, v7).X) + 4) + 10, 34);
    end;
end;
return function(v15)
    local v16 = v3:use():get();
    local v17, v18 = v1.useState({});
    v1.useEffect(function()
        v18((v16:GetCollaboratorsList()));
        local function v19()
            v18(v16:GetCollaboratorsList());
        end;
        local v20 = v16.CollaboratorInstanceCreatedSignal:Connect(v19);
        local v21 = v16.CollaboratorInstanceDestroyedSignal:Connect(v19);
        local v22 = v16.CollaboratorIdleUpdate:Connect(v19);
        return function()
            v20:Disconnect();
            v21:Disconnect();
            v22:Disconnect();
        end;
    end, {});
    local v23 = {};
    for v24, v25 in v17, nil, nil do
        if v24 <= 4 then
            v23[v25.UserId] = v1.createElement("Frame", {
                Size = UDim2.fromOffset(18, 24),
                BackgroundTransparency = 1
            }, {
                v1.createElement(v4, {
                    UserId = v25.UserId,
                    IsIdle = v25.IsIdle,
                    RingColor = if game:GetFastFlag("COLLAB5718AccessibleColors") then v25.CollaboratorColor3 else BrickColor.new(v25.CollaboratorColor).Color,
                    [v1.Tag] = "RibbonElement"
                })
            });
        else
            break;
        end;
    end;
    if #v17 > 4 then
        table.insert(v23, v1.createElement("Frame", {
            LayoutOrder = 4,
            ZIndex = 4,
            [v1.Tag] = "Component-OverflowBubble RibbonElement"
        }, {
            Text = v1.createElement("TextLabel", {
                Text = "+" .. #v17 - 4,
                ZIndex = 5,
                [v1.Tag] = "X-AnchorCenter"
            })
        }));
    end;
    if v15.Widget then
        local l_StudioWidgetsService_0 = game:GetService("StudioWidgetsService");
        local l_RunService_0 = game:GetService("RunService");
        local l_l_StudioWidgetsService_0_WidgetFromPluginGui_0 = l_StudioWidgetsService_0:GetWidgetFromPluginGui(v15.Widget);
        if not l_RunService_0:IsEdit() then
            l_l_StudioWidgetsService_0_WidgetFromPluginGui_0:SetFixedSize(1, 24);
        else
            local v29 = v14(#v17, true);
            l_l_StudioWidgetsService_0_WidgetFromPluginGui_0:SetFixedSize(v29.X, v29.Y);
        end;
    end;
    local v30 = v14(#v17, false);
    local l_createElement_0 = v1.createElement;
    local v32 = "Frame";
    local v33 = {
        BackgroundTransparency = 1,
        [v1.Tag] = "Component-CollaboratorRibbon X-Row X-Middle"
    };
    local v34 = {};
    local v35 = false;
    if #v17 > 0 then
        v35 = v1.createElement("TextButton", {
            Text = "",
            Size = UDim2.new(0, v30.X, 1, 0),
            [v1.Event.Activated] = v15.OnClick,
            [v1.Tag] = "Button X-Row X-Middle X-PadS"
        }, v23);
    end;
    v34.CollaboratorContainer = v35;
    ??? = v1.createElement(v5, {
        IsTeamCreateOn = #v17 > 0
    });
    setlist { ['R009[1 to ???]'] = 'R010 to ???' };
    return l_createElement_0(v32, v33, v34);
end;


local l_createStyleRule_0 = require(script.Parent.Parent.Parent.Parent.Packages.Framework).Styling.createStyleRule;
return l_createStyleRule_0(".Component-CollaboratorRibbon", {
    BackgroundTransparency = 1,
    AutomaticSize = Enum.AutomaticSize.X,
    Size = UDim2.fromScale(0, 1)
}, {
    l_createStyleRule_0(">> .Component-OverflowBubble", {
        BackgroundTransparency = 0,
        BackgroundColor3 = "$SecondaryMain"
    }, {
        l_createStyleRule_0("> TextLabel", {
            BackgroundTransparency = 1,
            TextSize = 13,
            TextColor3 = "$TextPrimary",
            Font = Enum.Font.BuilderSansBold
        })
    })
});


return {
    None = "Enum.CollaboratorStatus.None",
    Editing3D = "Enum.CollaboratorStatus.Editing3D",
    Scripting = "Enum.CollaboratorStatus.Scripting",
    PrivateScripting = "Enum.CollaboratorStatus.PrivateScripting"
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("SocialPresence");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local l_joinTags_0 = require(l_script_FirstAncestor_0.Packages.Framework).Styling.joinTags;
local function _(v3, v4)
    return "rbxthumb://type=AvatarHeadShot" .. "&id=" .. v3 .. "&w=" .. v4.X .. "&h=" .. v4.Y .. "&filters=circular";
end;
return function(v6)
    local l_createElement_0 = v1.createElement;
    local v8 = "Frame";
    local v9 = {
        Size = v6.Size,
        Position = v6.Position,
        AnchorPoint = v6.AnchorPoint,
        LayoutOrder = v6.LayoutOrder,
        ZIndex = v6.ZIndex,
        [v1.Tag] = l_joinTags_0("Component-CollaboratorThumbnail", v6[v1.Tag])
    };
    local v10 = {
        ActivityRing = v1.createElement("ImageLabel", {
            ImageColor3 = v6.RingColor,
            [v1.Tag] = if not v6.IsIdle then nil else "Idle"
        })
    };
    local l_createElement_1 = v1.createElement;
    local v12 = "ImageLabel";
    local v13 = {};
    local l_UserId_0 = v6.UserId;
    local v15 = Vector2.new(60, 60);
    v13.Image = "rbxthumb://type=AvatarHeadShot" .. "&id=" .. l_UserId_0 .. "&w=" .. v15.X .. "&h=" .. v15.Y .. "&filters=circular";
    v13[v1.Tag] = if not v6.IsIdle then nil else "Idle";
    v10.Avatar = l_createElement_1(v12, v13);
    return l_createElement_0(v8, v9, v10);
end;


local l_createStyleRule_0 = require(script.Parent.Parent.Parent.Parent.Packages.Framework).Styling.createStyleRule;
return l_createStyleRule_0(".Component-CollaboratorThumbnail", {
    BackgroundTransparency = 1
}, {
    l_createStyleRule_0(">> #ActivityRing", {
        Image = "$ActivityRingImage",
        Size = UDim2.fromScale(1, 1),
        BackgroundColor3 = "$ForegroundContrast"
    }, {
        l_createStyleRule_0(".Idle", {
            ImageColor3 = Color3.fromRGB(140, 140, 140),
            ImageTransparency = 0.2
        }),
        l_createStyleRule_0("::UICorner", {
            CornerRadius = UDim.new(1, 0)
        })
    }),
    l_createStyleRule_0(">> #Avatar", {
        Size = UDim2.fromScale(0.7, 0.7),
        Position = UDim2.fromScale(0.5, 0.5),
        AnchorPoint = Vector2.new(0.5, 0.5),
        BackgroundColor3 = "$SecondaryContrast",
        BorderSizePixel = 0
    }, {
        l_createStyleRule_0(".Idle", {
            BackgroundColor3 = "$ForegroundContrast",
            ImageColor3 = Color3.fromRGB(140, 140, 140),
            ImageTransparency = 0.2
        }),
        l_createStyleRule_0("::UICorner", {
            CornerRadius = UDim.new(1, 0)
        })
    })
});


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.React);
local v2 = require(l_Parent_0.Packages.Framework);
local l_UI_0 = v2.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_IconButton_0 = l_UI_0.IconButton;
local l_HoverArea_0 = l_UI_0.HoverArea;
local l_ContextServices_0 = v2.ContextServices;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_CrossPluginCommunication_0 = v2.Util.CrossPluginCommunication;
local l_Stylizer_0 = v2.Style.Stylizer;
local v13 = require(l_Parent_0.Src.ContextServices.CollaboratorsServiceContext);
local v14 = require(l_Parent_0.Src.Components.Thumbnails.CollaboratorActivityThumbnail);
local l_TextService_0 = game:GetService("TextService");
local v16 = Vector2.new(1000, 1);
local function v23(v17, v18)
    local v19 = l_Localization_0.use();
    if v17 > 0 then
        local v20 = math.min(v17, 5);
        local v21 = 24 * v20 - (v20 - 1) * 6;
        local v22 = 24;
        if v18 then
            v21 = v21 + 24;
        end;
        return Vector2.new(v21 + 4, v22 + 4);
    else
        return Vector2.new(((24 + l_TextService_0:GetTextSize(v19:getText("Ribbon", "Collaborate"), 18, Enum.Font.SourceSansBold, v16).X) + 4) + 4, 28);
    end;
end;
return function(v24)
    local v25, v26 = v1.useState(false);
    local v27 = l_CrossPluginCommunication_0.new("ManageCollaborators");
    local v28 = l_Stylizer_0:use();
    local v29 = l_Localization_0.use();
    local v30 = l_Analytics_0:use();
    local v31 = v13:use():get();
    local v32, v33 = v1.useState({});
    v1.useEffect(function()
        v33((v31:GetCollaboratorsList()));
        local function v34()
            v33(v31:GetCollaboratorsList());
        end;
        local v35 = v31.CollaboratorInstanceCreatedSignal:Connect(v34);
        local v36 = v31.CollaboratorInstanceDestroyedSignal:Connect(v34);
        local v37 = v31.CollaboratorIdleUpdate:Connect(v34);
        return function()
            v35:Disconnect();
            v36:Disconnect();
            v37:Disconnect();
        end;
    end, {});
    local v38 = {
        Layout = v1.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            FillDirection = Enum.FillDirection.Horizontal
        }),
        HoverArea = v1.createElement(l_HoverArea_0, {
            AutomaticSize = Enum.AutomaticSize.XY,
            Cursor = "PointingHand"
        })
    };
    for v39, v40 in v32, nil, nil do
        if v39 <= 4 then
            v38[v40.UserId] = v1.createElement(l_Pane_0, {
                Size = UDim2.fromOffset(18, 24),
                OnClick = function()
                    v24.OnClick();
                end
            }, {
                Avatar = v1.createElement(v14, {
                    Id = v40.UserId,
                    IsIdle = v40.IsIdle,
                    Size = v28.ribbonItem.size,
                    RingColor = if game:GetFastFlag("COLLAB5718AccessibleColors") then v40.CollaboratorColor3 else BrickColor.new(v40.CollaboratorColor).Color,
                    BackgroundColor3 = not not v25 and v28.ribbonItem.buttonHover or v28.ribbonItem.background,
                    BackgroundTransparency = 0
                }),
                Corner = v1.createElement("UICorner", {
                    CornerRadius = UDim.new(0.5, 0)
                })
            });
        else
            break;
        end;
    end;
    if #v32 > 4 then
        table.insert(v38, v1.createElement(l_Pane_0, {
            Size = v28.ribbonItem.size,
            BackgroundColor3 = v28.ribbonItem.overflowBackground,
            BackgroundTransparency = 0,
            LayoutOrder = 4,
            ZIndex = 4,
            OnClick = v24.OnClick
        }, {
            Corner = v1.createElement("UICorner", {
                CornerRadius = UDim.new(0.5, 0)
            }),
            Text = v1.createElement(l_TextLabel_0, {
                Text = "+" .. #v32 - 4,
                Position = UDim2.fromOffset(-1, -1),
                TextSize = 13,
                Font = Enum.Font.SourceSansSemibold,
                ZIndex = 5
            })
        }));
    end;
    if v24.Widget then
        local l_StudioWidgetsService_0 = game:GetService("StudioWidgetsService");
        local l_RunService_0 = game:GetService("RunService");
        local l_l_StudioWidgetsService_0_WidgetFromPluginGui_0 = l_StudioWidgetsService_0:GetWidgetFromPluginGui(v24.Widget);
        if not l_RunService_0:IsEdit() then
            l_l_StudioWidgetsService_0_WidgetFromPluginGui_0:SetFixedSize(1, 24);
        else
            local v44 = v23(#v32, true);
            l_l_StudioWidgetsService_0_WidgetFromPluginGui_0:SetFixedSize(v44.X, v44.Y);
        end;
    end;
    return v1.createElement(l_Pane_0, {
        Spacing = 0,
        BackgroundColor3 = v28.ribbonItem.background
    }, {
        v1.createElement(l_Pane_0, {
            Style = "Box",
            Size = UDim2.new(0, v23(#v32, false).X, 1, 0),
            BackgroundColor3 = not not v25 and v28.ribbonItem.buttonHover or v28.ribbonItem.background,
            Padding = #v32 > 0 and 2 or 0,
            OnClick = v24.OnClick,
            [v1.Event.MouseEnter] = function()
                v26(true);
            end,
            [v1.Event.MouseLeave] = function()
                v26(false);
            end
        }, v38);
        AddCollaboratorButton = v1.createElement(l_Pane_0, {
            LayoutOrder = 100
        }, {
            v1.createElement(l_IconButton_0, {
                AutomaticSize = Enum.AutomaticSize.X,
                Size = v28.ribbonItem.size,
                Position = #v32 > 0 and UDim2.new(1, 0, 0, 0) or UDim2.new(1, -6, 0, 0),
                AnchorPoint = Vector2.new(1, 0),
                LeftIcon = v28.ribbonItem.addIcon,
                OnClick = function()
                    v30:report("manageCollaboratorsPressed");
                    v27:Fire("ToggleManageCollaborators");
                end,
                Spacing = 4,
                Padding = 4,
                HoverColor = v28.ribbonItem.buttonHover,
                Text = #v32 == 0 and v29:getText("Ribbon", "Collaborate") or nil,
                BackgroundStyle = "RoundBox",
                BackgroundColor = v28.ribbonItem.background
            })
        })
    });
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.React);
local v2 = require(l_Parent_0.Packages.Framework);
local v3 = require(l_Parent_0.Packages.Dash);
local l_ContextServices_0 = v2.ContextServices;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local v7 = require(l_Parent_0.Src.ContextServices.CollaboratorsServiceContext);
local l_Stylizer_0 = v2.Style.Stylizer;
local l_StyleModifier_0 = v2.Util.StyleModifier;
local l_UI_0 = v2.UI;
local l_Button_0 = l_UI_0.Button;
local l_RoundBox_0 = l_UI_0.RoundBox;
local l_UserId_0 = game:GetService("StudioService"):GetUserId();
return function(v14)
    local v15 = v7:use():get();
    local v16 = l_Localization_0.use();
    local v17 = l_Stylizer_0:use();
    local v18 = l_Analytics_0:use();
    return v1.createElement(l_Button_0, {
        OnClick = function()
            v15:RequestFlyToCollaborator(v14.Id);
            if v14.OnJump then
                v14.OnJump();
            end;
            v18:report("jumpToCollaboratorPressed");
        end,
        Text = v14.Id == l_UserId_0 and v16:getText("Collaborator", "Return") or v16:getText("Collaborator", "Join"),
        Size = UDim2.new(1, 0, 0, 28),
        AnchorPoint = Vector2.new(0, 1),
        Position = UDim2.fromOffset(0, 80),
        Style = {
            Background = l_RoundBox_0,
            BackgroundStyle = v3.join({
                Color = v17.jumpButton.background
            }, v17.jumpButton.baseStyle),
            [l_StyleModifier_0.Hover] = {
                BackgroundStyle = v3.join({
                    Color = v17.jumpButton.hoveredBackground
                }, v17.jumpButton.baseStyle)
            },
            [l_StyleModifier_0.Pressed] = {
                BackgroundStyle = v3.join({
                    Color = v17.jumpButton.pressedBackground
                }, v17.jumpButton.baseStyle)
            },
            Font = Enum.Font.SourceSans,
            TextColor = v17.jumpButton.textColor,
            TextSize = 18
        }
    });
end;


local v0 = require(script.Parent.Parent.Parent.Parent.Packages.React);
local l_ContentProvider_0 = game:GetService("ContentProvider");
local function _(v2, v3)
    return "rbxthumb://type=AvatarHeadShot" .. "&id=" .. v2 .. "&w=" .. v3.X .. "&h=" .. v3.Y;
end;
local v5 = v0.Component:extend(script.Name);
v5.init = function(v6)
    v6.state = {
        fetchStatus = nil,
        contentId = nil
    };
    v6.fetchingContentId = nil;
    v6.currentId = nil;
    v6.updateThumbnail = function()
        local l_Id_0 = v6.props.Id;
        local v8 = Vector2.new(60, 60);
        local v9 = "rbxthumb://type=AvatarHeadShot" .. "&id=" .. l_Id_0 .. "&w=" .. v8.X .. "&h=" .. v8.Y;
        if l_Id_0 ~= v6.currentId then
            v6.currentId = l_Id_0;
            v6:setState({
                fetchStatus = v0.None,
                contentId = v9
            });
        end;
        if v9 ~= v6.state.contentId then
            v6.loadThumbnail(v9);
        end;
    end;
    v6.loadThumbnail = function(v10)
        if v10 == v6.fetchingContentId then
            return ;
        else
            v6.fetchingContentId = v10;
            coroutine.wrap(function()
                l_ContentProvider_0:PreloadAsync({
                    v10
                }, function(v11, v12)
                    if v6.fetchingContentId == v11 then
                        v6.fetchingContentId = nil;
                        v6:setState({
                            fetchStatus = v12,
                            contentId = v11
                        });
                    end;
                end);
            end)();
            return ;
        end;
    end;
end;
v5.didUpdate = function(v13, v14, _)
    if v14.Id ~= v13.props.Id then
        v13.updateThumbnail();
    end;
end;
v5.didMount = function(v16)
    v16.updateThumbnail();
end;
v5.render = function(v17)
    local l_props_0 = v17.props;
    local l_state_0 = v17.state;
    return l_props_0.RenderContents(l_state_0.contentId, l_state_0.fetchStatus);
end;
return v5;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.React);
local v2 = require(l_Parent_0.Packages.Framework);
local l_Stylizer_0 = v2.Style.Stylizer;
local l_withContext_0 = v2.ContextServices.withContext;
local l_Image_0 = v2.UI.Image;
local l_Pane_0 = v2.UI.Pane;
local v7 = require(l_Parent_0.Src.Components.Thumbnails.AutoThumbnail);
local v8 = v1.Component:extend(script.Name);
v8.getThumbnail = function(v9, v10, v11)
    local l_Stylizer_1 = v9.props.Stylizer;
    if v11 == Enum.AssetFetchStatus.Success then
        return v10;
    elseif v11 == Enum.AssetFetchStatus.Failure then
        return l_Stylizer_1.userThumbnail.loadFailureImage;
    else
        return l_Stylizer_1.userThumbnail.loadingImage;
    end;
end;
v8.render = function(v13)
    local l_props_0 = v13.props;
    return v1.createElement("Frame", {
        BackgroundTransparency = 1,
        Size = l_props_0.Size,
        Position = l_props_0.Position,
        AnchorPoint = l_props_0.AnchorPoint,
        LayoutOrder = l_props_0.LayoutOrder,
        ZIndex = l_props_0.ZIndex
    }, {
        AutoThumbnail = v1.createElement(v7, {
            Id = l_props_0.Id,
            RenderContents = function(v15, v16)
                local v17 = v13:getThumbnail(v15, v16);
                local l_Stylizer_2 = l_props_0.Stylizer;
                local v19 = (1 - l_Stylizer_2.userThumbnail.avatarSizeRatio) / 2;
                return v1.createElement(l_Pane_0, {
                    BackgroundColor3 = l_props_0.BackgroundColor3,
                    BackgroundTransparency = l_props_0.BackgroundTransparency
                }, {
                    ActivityRing = v1.createElement(l_Image_0, {
                        Image = l_props_0.Stylizer.activityRing,
                        ImageColor3 = not not l_props_0.IsIdle and l_Stylizer_2.userThumbnail.idleTint or l_props_0.RingColor,
                        Style = {
                            Transparency = not l_props_0.IsIdle and 0 or 0.2
                        },
                        Size = UDim2.fromScale(1, 1)
                    }),
                    Avatar = v1.createElement("ImageLabel", {
                        Image = v17,
                        Size = UDim2.fromScale(l_Stylizer_2.userThumbnail.avatarSizeRatio, l_Stylizer_2.userThumbnail.avatarSizeRatio),
                        Position = UDim2.fromScale(v19, v19),
                        BackgroundColor3 = not not l_props_0.IsIdle and l_Stylizer_2.userThumbnail.avatarIdleBackground or l_Stylizer_2.userThumbnail.avatarBackground,
                        BackgroundTransparency = 0,
                        ImageColor3 = not not l_props_0.IsIdle and l_Stylizer_2.userThumbnail.idleTint or nil,
                        ImageTransparency = not l_props_0.IsIdle and 0 or 0.2
                    }, {
                        Corner = v1.createElement("UICorner", {
                            CornerRadius = UDim.new(0.5, 0)
                        })
                    }),
                    Corner = v1.createElement("UICorner", {
                        CornerRadius = UDim.new(0.5, 0)
                    })
                });
            end
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_Stylizer_0
})(v8));