local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Core.Util.SharedFlags.getFFlagToolboxEnableSearchOptionsRefactor);
local l_Packages_0 = l_Parent_0.Packages;
local v3 = require(l_Packages_0.Roact);
local v4 = require(l_Packages_0.RoactRodux);
local v5 = require(l_Packages_0.Framework);
local l_Util_0 = l_Parent_0.Core.Util;
local v7 = require(l_Util_0.Constants);
local v8 = require(l_Util_0.Images);
local v9 = require(l_Util_0.debounce);
local _ = require(l_Parent_0.Core.Components.createFitToContent);
local l_ContextServices_0 = v5.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v13 = require(l_Parent_0.Core.ContextServices.Settings);
local v14 = require(l_Parent_0.Core.ContextServices.ModalContext);
local v15 = require(l_Parent_0.Core.ContextServices.NetworkContext);
local v16 = require(l_Parent_0.Core.Components.SearchOptions.LiveSearchBar);
local l_RadioButtonList_0 = require(l_Packages_0.Framework).UI.RadioButtonList;
local l_UI_0 = v5.UI;
local l_Checkbox_0 = l_UI_0.Checkbox;
local l_Pane_0 = l_UI_0.Pane;
local l_Image_0 = l_UI_0.Image;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_ShowOnTop_0 = l_UI_0.ShowOnTop;
local l_ScrollingFrame_0 = l_UI_0.ScrollingFrame;
local l_Tooltip_0 = l_UI_0.Tooltip;
local v26 = require(l_Parent_0.Core.Components.Audio.AudioSearch);
local v27 = require(l_Parent_0.Core.Components.SearchOptions.SearchOptionsEntry);
local v28 = require(l_Parent_0.Core.Components.SearchOptions.SearchOptionsFooter);
local l_getShouldHideNonRelevanceSorts_0 = require(l_Parent_0.Core.Util.ToolboxUtilities).getShouldHideNonRelevanceSorts;
local l_Separator_0 = l_UI_0.Separator;
local v31 = require(l_Parent_0.Core.Networking.Requests.SearchWithOptions);
local v32 = require(l_Parent_0.Core.Networking.Requests.UserSearchRequest);
local l_showRobloxCreatedAssets_0 = require(l_Parent_0.Core.Util.ToolboxUtilities).showRobloxCreatedAssets;
local v34 = require(l_Parent_0.Core.Types.Category);
local l_game_FastInt_0 = game:GetFastInt("ToolboxLiveSearchDebounceWait");
local v36 = v3.PureComponent:extend("SearchOptions");
if not v1() then
    v36.defaultProps = {
        showCreatorSearch = true
    };
    v36.init = function(v37, v38)
        v37.layoutRef = v3.createRef();
        v37.containerRef = v3.createRef();
        v37.buttonsContainerRef = v3.createRef();
        v37.currentLayout = 0;
        v37.searchTerm = v38.LiveSearchData.searchTerm;
        v37.extraSearchDetails = {};
        local l_audioSearchInfo_0 = v37.props.audioSearchInfo;
        v37.state = {
            minDuration = not not l_audioSearchInfo_0 and l_audioSearchInfo_0.minDuration or v7.MIN_AUDIO_SEARCH_DURATION,
            maxDuration = not not l_audioSearchInfo_0 and l_audioSearchInfo_0.maxDuration or v7.MAX_AUDIO_SEARCH_DURATION,
            SortIndex = nil,
            includeUnverifiedCreators = v37.props.includeUnverifiedCreators
        };
        v37.sortsList = {};
        v37.mouseEnter = function()
            v37.props.Modal.onSearchOptionsMouse(true);
        end;
        v37.mouseLeave = function()
            v37.props.Modal.onSearchOptionsMouse(false);
        end;
        v37.debouncedUserSearch = v9(function(v40)
            local l_props_0 = v37.props;
            l_props_0.userSearch(l_props_0.Network.networkInterface, v40);
        end, l_game_FastInt_0);
        v37.updateSearch = function(v42, v43)
            v37.searchTerm = v42;
            v37.extraSearchDetails = v43;
            v37.debouncedUserSearch(v42);
        end;
        v37.selectSort = function(v44)
            local v45 = nil;
            for v46, v47 in pairs(v37.sortsList) do
                if v47.Key == v44 then
                    v45 = v46;
                end;
            end;
            v37:setState({
                SortIndex = v45
            });
        end;
        v37.apply = function(v48)
            v37.onSearchOptionsClosed(v48);
        end;
        v37.cancel = function()
            v37.onSearchOptionsClosed(nil);
        end;
        v37.footerButtonClicked = function(v49)
            local v50 = {
                SortIndex = v37.state.SortIndex,
                Creator = v37.searchTerm
            };
            if not (v37.state.minDuration == v7.MIN_AUDIO_SEARCH_DURATION) or v37.state.maxDuration ~= v7.MAX_AUDIO_SEARCH_DURATION then
                v50.AudioSearch = {
                    minDuration = v37.state.minDuration,
                    maxDuration = v37.state.maxDuration
                };
            end;
            if v37.extraSearchDetails and next(v37.extraSearchDetails) ~= nil then
                v50.Creator = {
                    Name = v37.extraSearchDetails.Name,
                    Id = v37.extraSearchDetails.Id
                };
            end;
            v50.includeUnverifiedCreators = v37.state.includeUnverifiedCreators;
            v37:setState({
                SortIndex = v3.None,
                Creator = v3.None
            });
            if v49 == "Cancel" then
                v37.cancel();
                return ;
            else
                if v49 == "Apply" then
                    v37.apply(v50);
                end;
                return ;
            end;
        end;
        v37.onDurationChange = function(v51, v52)
            if not (v51 == v37.state.minDuration) or v52 ~= v37.state.maxDuration then
                v37:setState({
                    minDuration = v51,
                    maxDuration = v52
                });
            end;
        end;
        v37.onToggleIdVerified = function()
            v37:setState(function(v53)
                return {
                    includeUnverifiedCreators = not v53.includeUnverifiedCreators
                };
            end);
        end;
        v37.updateContainerSize = function(v54)
            v37:setState({
                windowSize = v54.AbsoluteSize
            });
        end;
        v37.updateContentsSize = function(v55)
            spawn(function()
                v37:setState({
                    contentSize = v55
                });
            end);
        end;
        v37.onSearchOptionsClosed = function(v56)
            if v56 then
                v37.props.searchWithOptions(v37.props.Network.networkInterface, v37.props.Settings:get("Plugin"), v56);
            end;
            if v37.props.onSearchOptionsToggled then
                v37.props.onSearchOptionsToggled();
            end;
        end;
    end;
    v36.createSeparator = function(v57, _)
        return v3.createElement(l_Separator_0, {
            LayoutOrder = v57:nextLayout()
        });
    end;
    v36.resetLayout = function(v59)
        v59.currentLayout = 0;
    end;
    v36.nextLayout = function(v60)
        v60.currentLayout = v60.currentLayout + 1;
        return v60.currentLayout;
    end;
    v36.render = function(v61)
        local l_state_0 = v61.state;
        local l_searchOptions_0 = v61.props.Stylizer.searchOptions;
        local l_LiveSearchData_0 = v61.props.LiveSearchData;
        local l_minDuration_0 = l_state_0.minDuration;
        local l_maxDuration_0 = l_state_0.maxDuration;
        local l_Localization_0 = v61.props.Localization;
        local v68 = l_Localization_0:getText("General", "SearchOptionAudioLength");
        local v69 = l_Localization_0:getText("General", "SearchOptionsIncludeUnverifiedDescription");
        local v70 = l_Localization_0:getText("General", "SearchOptionsIncludeUnverifiedHeader");
        local v71 = l_Localization_0:getText("General", "SearchOptionsIncludeUnverifiedTooltip");
        local v72 = v34.categoryIsAudio(v61.props.categoryName);
        local v73 = true;
        if l_showRobloxCreatedAssets_0() then
            v73 = false;
        end;
        v61.sortsList = {
            {
                Key = "Relevance",
                Text = l_Localization_0:getText("General", "SortByRelevance")
            },
            {
                Key = "MostTaken",
                Text = l_Localization_0:getText("General", "SortByMostTaken")
            },
            {
                Key = "Favorites",
                Text = l_Localization_0:getText("General", "SortByFavorites")
            },
            {
                Key = "Updated",
                Text = l_Localization_0:getText("General", "SortByUpdated")
            },
            {
                Key = "Ratings",
                Text = l_Localization_0:getText("General", "SortByRatings")
            }
        };
        local l_Key_0 = v61.sortsList[v61.state.SortIndex or v61.props.SortIndex].Key;
        local l_TAB_WIDGET_HEIGHT_0 = v7.TAB_WIDGET_HEIGHT;
        v61:resetLayout();
        local v76 = not l_getShouldHideNonRelevanceSorts_0();
        local v77 = v73 and not v72;
        local v78 = l_TAB_WIDGET_HEIGHT_0 + v7.HEADER_HEIGHT;
        local v79 = nil;
        v79 = if not v61.state.contentSize then UDim2.new(0, 0, 0, 0) else UDim2.new(0, v61.state.contentSize.X, 0, v61.state.contentSize.Y);
        local v80 = true;
        local v81 = UDim2.new(1, 0, 1, 0);
        if v61.containerRef.current then
            local v82 = v61.containerRef.current.AbsoluteSize.Y - (v78 + 40);
            local v83 = v79.Y.Offset + 42;
            if v83 < v82 then
                v81 = UDim2.new(1, 0, 0, v83);
                v80 = false;
            end;
        end;
        return v3.createElement("Frame", {
            BackgroundTransparency = 1
        }, {
            Portal = v3.createElement(l_ShowOnTop_0, {
                Priority = 2
            }, {
                ClickEventDetectFrame = v3.createElement("ImageButton", {
                    ZIndex = 10,
                    Position = UDim2.new(0, 0, 0, 0),
                    Size = UDim2.new(1, 0, 1, 0),
                    BackgroundTransparency = 1,
                    AutoButtonColor = false,
                    [v3.Ref] = v61.containerRef,
                    [v3.Event.Activated] = v61.cancel
                }, {
                    Main = v3.createElement("Frame", {
                        BackgroundTransparency = 1,
                        AnchorPoint = Vector2.new(1, 0),
                        Position = UDim2.new(1, -4, 0, v78 + 4),
                        Size = UDim2.new(0, v7.TOOLBOX_MIN_WIDTH, 1, -((v78 + 8) + 42)),
                        [v3.Ref] = v61.containerRef,
                        [v3.Change.AbsoluteSize] = v61.updateContainerSize
                    }, {
                        Contents = v3.createElement("Frame", {
                            BackgroundColor3 = l_searchOptions_0.background,
                            BorderColor3 = l_searchOptions_0.border,
                            BackgroundTransparency = 0,
                            Size = v81,
                            [v3.Event.MouseEnter] = v61.mouseEnter,
                            [v3.Event.MouseLeave] = v61.mouseLeave
                        }, {
                            Container = v3.createElement(l_ScrollingFrame_0, {
                                Position = UDim2.new(0, 0, 0, 0),
                                Size = UDim2.new(1, 0, 1, -42),
                                OnCanvasResize = v61.updateContentsSize,
                                Layout = Enum.FillDirection.Vertical,
                                AutoSizeCanvas = true,
                                AutoSizeLayoutOptions = {
                                    SortOrder = Enum.SortOrder.LayoutOrder,
                                    Padding = UDim.new(0, 10)
                                }
                            }, {
                                Padding = v3.createElement("UIPadding", {
                                    PaddingLeft = UDim.new(0, 10),
                                    PaddingRight = UDim.new(0, 10),
                                    PaddingTop = UDim.new(0, 10),
                                    PaddingBottom = UDim.new(0, 10)
                                }),
                                AllViews = v3.createElement(v27, {
                                    Header = l_Localization_0:getText("General", "SearchOptionsAllViews"),
                                    LayoutOrder = v61:nextLayout()
                                }, {
                                    CheckboxAndDescriptionContainer = v3.createElement(l_Pane_0, {
                                        AutomaticSize = Enum.AutomaticSize.XY,
                                        HorizontalAlignment = Enum.HorizontalAlignment.Left,
                                        Layout = Enum.FillDirection.Vertical,
                                        LayoutOrder = v61:nextLayout(),
                                        Spacing = 3
                                    }, {
                                        IncludeUnverifiedToggle = v3.createElement(l_Checkbox_0, {
                                            Checked = l_state_0.includeUnverifiedCreators,
                                            LayoutOrder = v61:nextLayout(),
                                            OnClick = v61.onToggleIdVerified,
                                            Text = v70,
                                            TextWrapped = true
                                        }),
                                        VerifiedDescriptionContainer = v3.createElement(l_Pane_0, {
                                            AutomaticSize = Enum.AutomaticSize.XY,
                                            HorizontalAlignment = Enum.HorizontalAlignment.Left,
                                            Layout = Enum.FillDirection.Horizontal,
                                            LayoutOrder = v61:nextLayout(),
                                            Padding = {
                                                Left = 24
                                            },
                                            Spacing = 6,
                                            VerticalAlignment = Enum.VerticalAlignment.Top
                                        }, {
                                            Image = v3.createElement(l_Image_0, {
                                                AnchorPoint = Vector2.new(0, 0.5),
                                                Image = v8.WARNING_ICON_SMALL,
                                                ImageColor3 = l_searchOptions_0.warningIconColor,
                                                LayoutOrder = v61:nextLayout(),
                                                Size = UDim2.fromOffset(16, 16)
                                            }, {
                                                Tooltip = v3.createElement(l_Tooltip_0, {
                                                    Text = v71,
                                                    Priority = 11
                                                })
                                            }),
                                            VerifiedDescription = v3.createElement(l_TextLabel_0, {
                                                AutomaticSize = Enum.AutomaticSize.XY,
                                                LayoutOrder = v61:nextLayout(),
                                                Style = "SubText",
                                                Text = v69,
                                                TextSize = 14,
                                                TextWrapped = true,
                                                TextXAlignment = Enum.TextXAlignment.Left
                                            })
                                        })
                                    })
                                }),
                                Separator = v61:createSeparator(l_searchOptions_0.separator),
                                Creator = v73 and v3.createElement(v27, {
                                    LayoutOrder = v61:nextLayout(),
                                    Header = l_Localization_0:getText("General", "SearchOptionCreator")
                                }, {
                                    SearchBar = v3.createElement(v16, {
                                        defaultTextKey = "SearchBarCreatorText",
                                        searchTerm = l_LiveSearchData_0.searchTerm,
                                        results = l_LiveSearchData_0.results,
                                        updateSearch = v61.updateSearch,
                                        width = v7.SEARCH_BAR_WIDTH
                                    })
                                }),
                                Separator1 = v77 and v61:createSeparator(l_searchOptions_0.separator),
                                AudioSearchHeader = v72 and v3.createElement(v27, {
                                    LayoutOrder = v61:nextLayout(),
                                    Header = v68
                                }, {
                                    AudioSearch = v3.createElement(v26, {
                                        minDuration = l_minDuration_0,
                                        maxDuration = l_maxDuration_0,
                                        onDurationChange = v61.onDurationChange
                                    })
                                }),
                                Separator2 = v72 and v61:createSeparator(l_searchOptions_0.separator),
                                SortBy = v76 and v3.createElement(v27, {
                                    LayoutOrder = v61:nextLayout(),
                                    Header = l_Localization_0:getText("General", "SearchOptionSort")
                                }, {
                                    RadioButtons = v3.createElement(l_RadioButtonList_0, {
                                        Buttons = v61.sortsList,
                                        SelectedKey = l_Key_0,
                                        OnClick = v61.selectSort
                                    })
                                }),
                                ViewPadding = v76 and v3.createElement("Frame", {
                                    BackgroundTransparency = 1,
                                    Size = UDim2.new(1, 0, 0, 10),
                                    LayoutOrder = v61:nextLayout()
                                })
                            }),
                            BottomButtonsContainer = v3.createElement("Frame", {
                                BackgroundTransparency = 1,
                                Size = UDim2.new(1, 0, 0, 42),
                                Position = UDim2.new(0, 0, 1, -42),
                                ZIndex = 3
                            }, {
                                Padding = v3.createElement("UIPadding", {
                                    PaddingLeft = UDim.new(0, 10),
                                    PaddingRight = UDim.new(0, 10)
                                }),
                                GradientOverlay = v80 and v3.createElement("Frame", {
                                    LayoutOrder = v61:nextLayout(),
                                    Size = UDim2.new(1, -8, 0, 20),
                                    Position = UDim2.new(0, 0, 0, -20),
                                    BackgroundColor3 = Color3.new(1, 1, 1),
                                    BorderColor3 = Color3.new(1, 1, 1)
                                }, {
                                    Gradient = v3.createElement("UIGradient", {
                                        Color = ColorSequence.new(l_searchOptions_0.background),
                                        Rotation = 90,
                                        Transparency = NumberSequence.new({
                                            NumberSequenceKeypoint.new(0, 1),
                                            NumberSequenceKeypoint.new(1, 0.25)
                                        })
                                    })
                                }),
                                Separator = v3.createElement(l_Separator_0, {
                                    Position = UDim2.new(0.5, 0, 0, 0),
                                    ZIndex = 2
                                }),
                                Footer = v3.createElement(v28, {
                                    AnchorPoint = Vector2.new(0, 1),
                                    Position = UDim2.new(0, 0, 1, -8),
                                    onButtonClicked = v61.footerButtonClicked
                                })
                            })
                        })
                    })
                })
            })
        });
    end;
    return v4.connect(function(v84, _)
        v84 = v84 or {};
        local v86 = v84.pageInfo or {};
        local v87 = nil;
        if v84.liveSearch then
            v87 = {
                searchTerm = v84.liveSearch.searchTerm,
                results = v84.liveSearch.results
            };
        end;
        return {
            audioSearchInfo = v86.audioSearchInfo,
            includeUnverifiedCreators = v86.includeUnverifiedCreators,
            categoryName = v86.categoryName or v34.DEFAULT.name,
            LiveSearchData = v87,
            SortIndex = v86.sortIndex or 1
        };
    end, function(v88)
        return {
            userSearch = function(v89, v90)
                v88(v32(v89, v90));
            end,
            searchWithOptions = function(v91, v92, v93)
                v88(v31(v91, v92, v93));
            end
        };
    end)((l_withContext_0({
        Localization = l_ContextServices_0.Localization,
        Settings = v13,
        Stylizer = l_ContextServices_0.Stylizer,
        Modal = v14,
        Network = v15
    })(v36)));
else
    return nil;
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.Cryo);
local v4 = require(l_Packages_0.Framework);
local l_LayoutOrderIterator_0 = v4.Util.LayoutOrderIterator;
local l_Separator_0 = v4.UI.Separator;
local v7 = require(l_Parent_0.Core.Util.Constants);
local l_Pane_0 = v4.UI.Pane;
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_GetTextSize_0 = v4.Util.GetTextSize;
local v12 = require(l_Parent_0.Core.Util.SharedFlags.getFFlagToolboxEnableSearchOptionsRefactor);
local v13 = v2.PureComponent:extend("SearchOptionsEntry");
v13.render = function(v14)
    local l_Stylizer_0 = v14.props.Stylizer;
    local l_Header_0 = v14.props.Header;
    local l_LayoutOrder_0 = v14.props.LayoutOrder;
    local v18 = v14.props.ZIndex or 1;
    local v19 = v14.props[v2.Children] or {};
    local l_searchOptions_0 = l_Stylizer_0.searchOptions;
    local v21 = l_GetTextSize_0(l_Header_0, nil, nil, Vector2.new(0, 0));
    local v22 = if not v12() then nil else l_LayoutOrderIterator_0.new();
    return v2.createElement(l_Pane_0, {
        AutomaticSize = Enum.AutomaticSize.XY,
        HorizontalAlignment = Enum.HorizontalAlignment.Left,
        Layout = Enum.FillDirection.Vertical,
        LayoutOrder = l_LayoutOrder_0,
        Padding = 6,
        Spacing = if not v12() then nil else 6,
        VerticalAlignment = Enum.VerticalAlignment.Top,
        ZIndex = v18
    }, if not v12() then v3.Dictionary.join(v19, {
        Header = v2.createElement("TextLabel", {
            LayoutOrder = -1,
            BackgroundTransparency = 1,
            Font = v7.FONT,
            TextSize = v7.FONT_SIZE_MEDIUM,
            TextColor3 = l_searchOptions_0.headerTextColor,
            Size = UDim2.new(0, v21.X, 0, v21.Y),
            Text = l_Header_0
        })
    }) else {
        Header = v2.createElement("TextLabel", {
            LayoutOrder = v22:getNextOrder(),
            BackgroundTransparency = 1,
            Font = v7.FONT,
            TextSize = v7.FONT_SIZE_MEDIUM,
            TextColor3 = l_searchOptions_0.headerTextColor,
            Size = UDim2.new(0, v21.X, 0, v21.Y),
            Text = l_Header_0
        }),
        Content = v2.createElement(l_Pane_0, {
            AutomaticSize = Enum.AutomaticSize.XY,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            Layout = Enum.FillDirection.Vertical,
            LayoutOrder = v22:getNextOrder(),
            Size = UDim2.fromScale(1, 0),
            Spacing = 10
        }, v19),
        SeparatorWithPadding = if v14.props.HideLowerSeparator then nil else v2.createElement(l_Pane_0, {
            AutomaticSize = Enum.AutomaticSize.XY,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            Layout = Enum.FillDirection.Vertical,
            LayoutOrder = v22:getNextOrder(),
            Padding = {
                Top = 10
            },
            Size = UDim2.fromScale(1, 0)
        }, {
            Separator = v2.createElement(l_Separator_0)
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v13));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Core.Util.SharedFlags.getFFlagToolboxEnableSearchOptionsRefactor);
local l_Packages_0 = l_Parent_0.Packages;
local v3 = require(l_Packages_0.Roact);
local v4 = require(l_Packages_0.Framework);
local v5 = require(l_Parent_0.Core.Util.Constants);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_GetTextSize_0 = v4.Util.GetTextSize;
local v9 = require(l_Parent_0.Core.Components.RoundButton);
local v10 = v3.PureComponent:extend("SearchOptionsFooter");
if not v1() then
    v10.init = function(v11)
        v11.onButtonClicked = function(v12, v13)
            if v11.props.onButtonClicked then
                v11.props.onButtonClicked(v12, v13);
            end;
        end;
    end;
    v10.render = function(v14)
        local l_Stylizer_0 = v14.props.Stylizer;
        local v16 = v14.props.Localization:getText("General", "SearchOptionsApply");
        local v17 = v14.props.Localization:getText("General", "SearchOptionsCancel");
        local v18 = l_GetTextSize_0(v16, nil, nil, Vector2.new(0, 0)).X + 20;
        local v19 = l_GetTextSize_0(v17, nil, nil, Vector2.new(0, 0)).X + 20;
        local l_cancelButton_0 = l_Stylizer_0.searchOptions.cancelButton;
        local l_applyButton_0 = l_Stylizer_0.searchOptions.applyButton;
        return v3.createElement("Frame", {
            AnchorPoint = v14.props.AnchorPoint,
            Position = v14.props.Position,
            LayoutOrder = v14.props.LayoutOrder,
            Size = UDim2.new(1, 0, 0, v5.FOOTER_BUTTON_HEIGHT),
            BackgroundTransparency = 1
        }, {
            UIListLayout = v3.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Horizontal,
                HorizontalAlignment = Enum.HorizontalAlignment.Right,
                SortOrder = Enum.SortOrder.LayoutOrder,
                Padding = UDim.new(0, 10)
            }),
            CancelButton = v3.createElement(v9, {
                LayoutOrder = 1,
                Size = UDim2.new(0, math.max(55, v19), 1, 0),
                BackgroundColor3 = l_cancelButton_0.backgroundColor,
                BorderColor3 = l_cancelButton_0.borderColor,
                [v3.Event.Activated] = function()
                    v14.onButtonClicked("Cancel");
                end
            }, {
                TextLabel = v3.createElement("TextLabel", {
                    Size = UDim2.new(1, 0, 1, 0),
                    BackgroundTransparency = 1,
                    Font = v5.FONT,
                    TextSize = v5.FONT_SIZE_MEDIUM,
                    Text = v17,
                    TextColor3 = l_cancelButton_0.textColor
                })
            }),
            ApplyButton = v3.createElement(v9, {
                LayoutOrder = 2,
                Size = UDim2.new(0, math.max(55, v18), 1, 0),
                BackgroundColor3 = l_applyButton_0.backgroundColor,
                BorderColor3 = l_applyButton_0.borderColor,
                [v3.Event.Activated] = function()
                    v14.onButtonClicked("Apply");
                end
            }, {
                TextLabel = v3.createElement("TextLabel", {
                    Size = UDim2.new(1, 0, 1, 0),
                    BackgroundTransparency = 1,
                    Font = v5.FONT,
                    TextSize = v5.FONT_SIZE_MEDIUM,
                    Text = v16,
                    TextColor3 = l_applyButton_0.textColor
                })
            })
        });
    end;
    return (l_withContext_0({
        Localization = l_ContextServices_0.Localization,
        Stylizer = l_ContextServices_0.Stylizer
    })(v10));
else
    return nil;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local l_Packages_0 = l_script_FirstAncestor_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.RoactRodux);
local v4 = require(l_Packages_0.Framework);
local v5 = require(l_script_FirstAncestor_0.Core.Networking.Requests.SearchWithOptions);
local v6 = require(l_script_FirstAncestor_0.Core.Util.Constants);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v9 = require(l_script_FirstAncestor_0.Core.ContextServices.ModalContext);
local v10 = require(l_script_FirstAncestor_0.Core.ContextServices.Settings);
local v11 = require(l_script_FirstAncestor_0.Core.ContextServices.NetworkContext);
local v12 = require(l_Packages_0.Dash);
local l_GetTextSize_0 = v4.Util.GetTextSize;
local l_LayoutOrderIterator_0 = v4.Util.LayoutOrderIterator;
local l_withAbsoluteSize_0 = v4.Wrappers.withAbsoluteSize;
local l_Button_0 = v4.UI.Button;
local l_HoverArea_0 = v4.UI.HoverArea;
local l_LinkText_0 = v4.UI.LinkText;
local l_Pane_0 = v4.UI.Pane;
local l_ShowOnTop_0 = v4.UI.ShowOnTop;
local l_ScrollingFrame_0 = v4.UI.ScrollingFrame;
local v22 = Vector2.new(17, 6);
local v23 = Color3.fromRGB(0, 0, 0);
local v24 = v6.TAB_WIDGET_HEIGHT + v6.HEADER_HEIGHT;
local v25 = v2.PureComponent:extend("SearchOptionsLayout");
v25.init = function(v26, _)
    v26.state = {};
    v26.layoutRef = v2.createRef();
    v26.cancel = function()
        v26.props.OnClose();
    end;
    v26.mouseEnter = function()
        v26.props.Modal.onSearchOptionsMouse(true);
    end;
    v26.mouseLeave = function()
        v26.props.Modal.onSearchOptionsMouse(false);
    end;
    v26.onReset = function()
        v26.props.OnReset();
    end;
    v26.onSubmit = function()
        v26.search(v26.props.GetSearchOptions());
    end;
    v26.search = function(v28)
        local l_props_0 = v26.props;
        l_props_0.searchWithOptions(l_props_0.Network.networkInterface, l_props_0.Settings:get("Plugin"), v28);
        v26.cancel();
    end;
    v26.updateContentsSize = function(v30)
        v26:setState({
            contentSize = v30
        });
    end;
end;
v25.render = function(v31)
    local l_props_1 = v31.props;
    local l_state_0 = v31.state;
    local l_AbsoluteSize_0 = l_props_1.AbsoluteSize;
    local l_Localization_0 = l_props_1.Localization;
    local l_Stylizer_0 = l_props_1.Stylizer;
    local l_contentSize_0 = l_state_0.contentSize;
    local l_searchOptions_0 = l_Stylizer_0.searchOptions;
    local v39 = l_Localization_0:getText("General", "SearchOptionsDone");
    local v40 = l_GetTextSize_0(v39, nil, nil, Vector2.new(0, 0));
    local v41 = true;
    local v42 = UDim2.new(1, 0, 1, 0);
    if l_contentSize_0 then
        local v43 = l_AbsoluteSize_0.Y - (v24 + 40);
        local v44 = l_contentSize_0.Y + 42;
        if v44 < v43 then
            v42 = UDim2.new(1, 0, 0, v44);
            v41 = false;
        end;
    end;
    local v45 = l_LayoutOrderIterator_0.new();
    return v2.createElement(l_ShowOnTop_0, {
        Priority = 2
    }, {
        ClickEventDetectFrame = v2.createElement("ImageButton", {
            AutoButtonColor = false,
            BackgroundTransparency = 0.25,
            BackgroundColor3 = v23,
            Size = UDim2.fromScale(1, 1),
            ZIndex = 10,
            [v2.Event.Activated] = v31.cancel
        }, {
            MainPositioning = v2.createElement(l_Pane_0, v12.join({
                AnchorPoint = Vector2.new(1, 0),
                Position = UDim2.new(1, -4, 0, v24 + 4),
                Size = UDim2.new(0, v6.TOOLBOX_MIN_WIDTH, 1, -((v24 + 8) + 42))
            }, l_props_1.WrapperProps), {
                Contents = v2.createElement(l_Pane_0, {
                    BackgroundColor = l_searchOptions_0.background,
                    OnClick = function()
                    end,
                    Size = v42,
                    Style = "BorderBox",
                    [v2.Event.MouseEnter] = v31.mouseEnter,
                    [v2.Event.MouseLeave] = v31.mouseLeave
                }, {
                    Container = v2.createElement(l_ScrollingFrame_0, {
                        AutoSizeCanvas = true,
                        AutoSizeLayoutOptions = {
                            SortOrder = Enum.SortOrder.LayoutOrder
                        },
                        Layout = Enum.FillDirection.Vertical,
                        OnCanvasResize = v31.updateContentsSize,
                        Position = UDim2.new(0, 0, 0, 0),
                        Size = UDim2.new(1, 0, 1, -42)
                    }, {
                        Padding = v2.createElement("UIPadding", {
                            PaddingLeft = UDim.new(0, 10),
                            PaddingRight = UDim.new(0, 10),
                            PaddingTop = UDim.new(0, 10),
                            PaddingBottom = UDim.new(0, 20)
                        }),
                        Content = v2.createElement(l_Pane_0, {
                            AutomaticSize = Enum.AutomaticSize.XY,
                            HorizontalAlignment = Enum.HorizontalAlignment.Left,
                            Layout = Enum.FillDirection.Vertical,
                            Spacing = 0,
                            Size = UDim2.fromScale(1, 0)
                        }, v31.props[v2.Children]),
                        ExtraPadding = v2.createElement("Frame", {
                            BackgroundTransparency = 1,
                            Size = UDim2.new(1, 0, 0, 10),
                            LayoutOrder = v45:getNextOrder()
                        })
                    }),
                    BottomButtonsContainer = v2.createElement(l_Pane_0, {
                        Padding = {
                            Left = 10,
                            Right = 10
                        },
                        Position = UDim2.new(0, 0, 1, -42),
                        Spacing = 20,
                        Size = UDim2.new(1, 0, 0, 42),
                        ZIndex = 3
                    }, {
                        GradientOverlay = v41 and v2.createElement("Frame", {
                            LayoutOrder = v45:getNextOrder(),
                            Size = UDim2.new(1, -8, 0, 20),
                            Position = UDim2.new(0, 0, 0, -20),
                            BackgroundColor3 = Color3.new(1, 1, 1),
                            BorderColor3 = Color3.new(1, 1, 1)
                        }, {
                            Gradient = v2.createElement("UIGradient", {
                                Color = ColorSequence.new(l_searchOptions_0.background),
                                Rotation = 90,
                                Transparency = NumberSequence.new({
                                    NumberSequenceKeypoint.new(0, 1),
                                    NumberSequenceKeypoint.new(1, 0.25)
                                })
                            })
                        }),
                        Footer = v2.createElement(l_Pane_0, {
                            AutomaticSize = Enum.AutomaticSize.Y,
                            AnchorPoint = Vector2.new(0, 1),
                            HorizontalAlignment = Enum.HorizontalAlignment.Right,
                            VerticalAlignment = Enum.VerticalAlignment.Center,
                            Layout = Enum.FillDirection.Horizontal,
                            OnClick = v31.footerButtonClicked,
                            Padding = {
                                Bottom = 8
                            },
                            Position = UDim2.new(0, 0, 1, 0),
                            Size = UDim2.new(1, 0, 0, 0),
                            Spacing = 20
                        }, {
                            CancelButton = v2.createElement(l_LinkText_0, {
                                AutomaticSize = Enum.AutomaticSize.XY,
                                LayoutOrder = v45:getNextOrder(),
                                OnClick = v31.onReset,
                                Text = l_Localization_0:getText("General", "SearchOptionsResetAll")
                            }),
                            ApplyButton = v2.createElement(l_Button_0, {
                                LayoutOrder = v45:getNextOrder(),
                                OnClick = v31.onSubmit,
                                Style = "RoundPrimary",
                                Size = UDim2.fromOffset(v40.X + v22.X * 2, v40.Y + v22.Y * 2),
                                Text = v39
                            }, {
                                HoverArea = v2.createElement(l_HoverArea_0, {
                                    Cursor = "PointingHand"
                                })
                            })
                        })
                    })
                })
            })
        })
    });
end;
return l_withAbsoluteSize_0((v3.connect(nil, function(v46)
    return {
        searchWithOptions = function(v47, v48, v49)
            v46(v5(v47, v48, v49));
        end
    };
end)((l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Modal = v9,
    Network = v11,
    Stylizer = l_ContextServices_0.Stylizer,
    Settings = v10
})(v25)))));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.Roact);
local v2 = require(script.Parent.SearchOptionsLayout);
local v3 = require(l_script_FirstAncestor_0.TestUtils.ClickToShowInteractiveStoryWrapper);
local v4 = require(l_script_FirstAncestor_0.Stories.ToolboxStoryWrapper);
return {
    name = "SearchOptionsLayout",
    summary = "The layout for the Search Option component",
    stories = {
        {
            story = function()
                return v1.createElement(v4, {}, {
                    ClickToShowInteractiveStoryWrapper = v1.createElement(v3, {
                        OnRender = function(_, v6)
                            return v1.createElement(v2, {
                                SearchOptions = {},
                                OnClose = v6
                            });
                        end
                    })
                });
            end
        }
    }
};


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.Framework);
local v4 = require(l_Parent_0.Core.Util.Images);
local v5 = require(l_Parent_0.Core.Util.Constants);
local v6 = require(l_Parent_0.Core.Components.RoundFrame);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_GetTextSize_0 = v3.Util.GetTextSize;
local l_SEARCH_TAG_HEIGHT_0 = v5.SEARCH_TAG_HEIGHT;
local v11 = v2.PureComponent:extend("SearchTag");
v11.defaultProps = {
    Name = "",
    prefix = ""
};
v11.render = function(v12)
    local l_Stylizer_0 = v12.props.Stylizer;
    local l_prefix_0 = v12.props.prefix;
    local l_Name_0 = v12.props.Name;
    local l_onDelete_0 = v12.props.onDelete;
    local l_X_0 = l_GetTextSize_0(l_Name_0, nil, nil, Vector2.new(0, 0)).X;
    local l_X_1 = l_GetTextSize_0(l_prefix_0, v5.FONT_SIZE_MEDIUM, v5.FONT_BOLD, Vector2.new(0, 0)).X;
    return v2.createElement(v6, {
        Size = UDim2.new(0, ((l_X_1 + l_X_0) + 10) + 16, 0, l_SEARCH_TAG_HEIGHT_0),
        BackgroundColor3 = l_Stylizer_0.searchTag.backgroundColor,
        BorderColor3 = l_Stylizer_0.searchTag.borderColor,
        AnchorPoint = Vector2.new(0.5, 0.5),
        Position = UDim2.new(0.5, 0, 0.5, 0),
        LayoutOrder = v12.props.LayoutOrder or 1
    }, {
        UIPadding = v2.createElement("UIPadding", {
            PaddingLeft = UDim.new(0, 4),
            PaddingRight = UDim.new(0, 4)
        }),
        ByLabel = v2.createElement("TextLabel", {
            Font = v5.FONT_BOLD,
            TextSize = v5.FONT_SIZE_MEDIUM,
            TextColor3 = l_Stylizer_0.searchTag.textColor,
            Size = UDim2.new(0, l_X_1, 1, 0),
            BackgroundTransparency = 1,
            ZIndex = 2,
            Text = l_prefix_0
        }),
        NameLabel = v2.createElement("TextLabel", {
            Font = v5.FONT,
            TextSize = v5.FONT_SIZE_MEDIUM,
            TextColor3 = l_Stylizer_0.searchTag.textColor,
            Size = UDim2.new(0, l_X_0, 1, 0),
            Position = UDim2.new(0, l_X_1 + 4, 0, 0),
            BackgroundTransparency = 1,
            ZIndex = 2,
            Text = l_Name_0
        }),
        DeleteButton = v2.createElement("ImageButton", {
            AnchorPoint = Vector2.new(1, 0.5),
            Position = UDim2.new(1, 0, 0.5, 0),
            Size = UDim2.new(0, 10, 0, 10),
            BackgroundTransparency = 1,
            Image = v4.DELETE_BUTTON,
            ImageColor3 = l_Stylizer_0.searchTag.textColor,
            [v2.Event.Activated] = l_onDelete_0
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v11));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.Framework);
local v4 = require(l_Parent_0.Core.Util.Constants);
local v5 = require(l_Parent_0.Core.Localization.getLocalizedCategoryMap);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_LinkText_0 = v3.UI.LinkText;
local l_ScrollingFrame_0 = v3.UI.ScrollingFrame;
local l_GetTextSize_0 = v3.Util.GetTextSize;
local v11 = require(l_Parent_0.Core.Components.SearchOptions.SearchTag);
local l_SEARCH_TAG_HEIGHT_0 = v4.SEARCH_TAG_HEIGHT;
local v13 = UDim.new(0, 3);
local v14 = v2.PureComponent:extend("SearchTags");
local v15 = require(l_Parent_0.Core.Util.SharedFlags.getFFlagToolboxAddAutocorrect);
v14.createTag = function(_, v17, v18)
    return v2.createElement(v11, {
        Name = v17.text,
        LayoutOrder = v18,
        onDelete = function()
            if v17.onDelete then
                v17.onDelete(v17);
            end;
        end,
        prefix = v17.prefix
    });
end;
v14.createTags = function(v19, v20, v21)
    local v22 = {
        UIListLayout = v2.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            FillDirection = Enum.FillDirection.Horizontal,
            Padding = v13
        })
    };
    for v23, v24 in ipairs(v20) do
        v22[v24] = v19:createTag(v24, v23);
    end;
    return v2.createElement(l_ScrollingFrame_0, {
        AnchorPoint = Vector2.new(0, 1),
        AutomaticCanvasSize = Enum.AutomaticSize.X,
        BackgroundTransparency = 1,
        Size = v21,
        ScrollingEnabled = true,
        Position = UDim2.new(0, 0, 1, 0),
        ScrollingDirection = Enum.ScrollingDirection.X,
        ScrollBarThickness = 0
    }, v22);
end;
v14.createPrompt = function(v25, v26, v27)
    local l_props_0 = v25.props;
    local l_textColor_0 = v27.searchTag.textColor;
    local l_FONT_SIZE_SMALL_0 = v4.FONT_SIZE_SMALL;
    return v2.createElement("Frame", {
        Size = UDim2.new(1, 0, 0, l_SEARCH_TAG_HEIGHT_0),
        BackgroundTransparency = 1
    }, {
        UIListLayout = v2.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            FillDirection = Enum.FillDirection.Horizontal,
            Padding = v13
        }),
        BackToHome = v2.createElement(l_LinkText_0, {
            LayoutOrder = 1,
            OnClick = l_props_0.onBackToHome,
            Style = "Unobtrusive",
            Text = ("< %* /"):format((l_props_0.Localization:getText("General", "BackToHome", {
                assetType = v5(l_props_0.Localization)[l_props_0.categoryName]
            })))
        }),
        Prompt = v2.createElement("TextLabel", {
            LayoutOrder = 2,
            Font = v4.FONT,
            Text = if not (v26 ~= "") or v26 == nil then l_props_0.Localization:getText("General", "SearchResults") else l_props_0.Localization:getText("General", "SearchResultsKeyword"),
            TextSize = l_FONT_SIZE_SMALL_0,
            TextColor3 = l_textColor_0,
            AutomaticSize = Enum.AutomaticSize.XY,
            BackgroundTransparency = 1
        }),
        SearchTerm = v2.createElement("TextLabel", {
            LayoutOrder = 3,
            Font = v4.FONT_BOLD,
            Text = v26 or "",
            TextXAlignment = Enum.TextXAlignment.Left,
            TextSize = l_FONT_SIZE_SMALL_0,
            TextColor3 = l_textColor_0,
            AutomaticSize = Enum.AutomaticSize.XY,
            TextTruncate = Enum.TextTruncate.AtEnd,
            BackgroundTransparency = 1
        })
    });
end;
v14.render = function(v31)
    local l_props_1 = v31.props;
    local l_Stylizer_0 = l_props_1.Stylizer;
    local l_Tags_0 = l_props_1.Tags;
    local l_searchTerm_0 = l_props_1.searchTerm;
    local l_onClearTags_0 = l_props_1.onClearTags;
    local v37 = l_props_1.Localization:getText("General", "SearchResultsClearAll");
    local l_x_0 = l_GetTextSize_0(v37, nil, nil, Vector2.new(0, 0)).x;
    local v39 = UDim2.new(1, -l_x_0 - v13.Offset, 0, l_SEARCH_TAG_HEIGHT_0);
    local v40 = l_searchTerm_0 or "Prompt";
    local v41 = l_Tags_0 and #l_Tags_0 > 0;
    return v2.createElement("Frame", {
        Size = UDim2.new(1, 0, not v15() and 1 or (not v41 and 0.3333333333333333 or 0.6666666666666666), 0),
        BackgroundTransparency = 1,
        LayoutOrder = l_props_1.LayoutOrder
    }, {
        [v40] = v31:createPrompt(l_searchTerm_0, l_Stylizer_0),
        ClearAll = v41 and v2.createElement("TextButton", {
            Font = v4.FONT,
            Text = v37,
            TextSize = v4.FONT_SIZE_MEDIUM,
            TextColor3 = l_Stylizer_0.searchTag.clearAllText,
            Size = UDim2.new(0, l_x_0, 0, l_SEARCH_TAG_HEIGHT_0),
            Position = UDim2.new(1, 0, 0, not v15() and 29 or 20),
            AnchorPoint = Vector2.new(1, 0),
            BackgroundTransparency = 1,
            LayoutOrder = #l_Tags_0 + 1,
            [v2.Event.Activated] = l_onClearTags_0
        }),
        Tags = v41 and v31:createTags(l_Tags_0, v39)
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v14));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local l_Packages_0 = l_script_FirstAncestor_0.Packages;
local v2 = require(l_Packages_0.Roact);
local l_ContextServices_0 = require(l_Packages_0.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v5 = require(l_script_FirstAncestor_0.Core.Util.Constants);
local v6 = require(l_script_FirstAncestor_0.Core.Components.RoundFrame);
local v7 = v2.PureComponent:extend("TimeTextBox");
v7.defaultProps = {
    defaultValue = 0,
    max = math.huge,
    min = 0
};
local function _(v8)
    return v8 % 60 or 0;
end;
local function _(v10)
    return math.floor(v10 / 60) or 0;
end;
v7.init = function(v12)
    v12.minuteRef = v2.createRef();
    v12.secondRef = v2.createRef();
    local l_currentValue_0 = v12.props.currentValue;
    v12.sec = l_currentValue_0 % 60 or 0;
    v12.minute = math.floor(l_currentValue_0 / 60) or 0;
    v12.totalSeconds = l_currentValue_0 or 0;
    v12.state = {
        isTextboxFocused = false,
        showSecLabel = false
    };
    v12.getClampedMinute = function(v14, v15)
        return (math.clamp(v14, math.max(math.floor(v15.min / 60) or 0, 0), math.floor(v15.max / 60) or 0));
    end;
    v12.getClampedSec = function(v16, v17)
        local v18 = 0;
        local v19 = 59;
        local v20 = math.floor(v17.min / 60) or 0;
        local v21 = math.floor(v17.max / 60) or 0;
        if v12.minute <= v20 then
            v18 = math.max(v17.min % 60 or 0, v18);
        end;
        if v21 <= v12.minute then
            v19 = math.min(v17.max % 60 or 0, v19);
        end;
        return (math.clamp(v16, v18, v19));
    end;
    v12.updateTextboxes = function(_)
        if v12.secondRef.current and v12.minuteRef.current then
            local v23 = nil;
            local v24 = nil;
            local l_minute_0 = v12.minute;
            local l_sec_0 = v12.sec;
            if v12.totalSeconds == v12.props.defaultValue then
                v23 = "";
                v24 = "";
            else
                v23 = l_minute_0;
                v24 = l_sec_0 > 0 and l_sec_0 or "";
            end;
            v12.minuteRef.current.Text = v23;
            v12.secondRef.current.Text = v24;
            return ;
        else
            return ;
        end;
    end;
    v12.onFocused = function()
        v12:setState({
            showSecLabel = true,
            isTextboxFocused = true
        });
    end;
    v12.onFocusLost = function()
        if v12.secondRef.current then
            v12.minute = v12.getClampedMinute(v12.minute, v12.props);
            v12.sec = v12.getClampedSec(v12.sec, v12.props);
            v12.totalSeconds = 60 * v12.minute + v12.sec;
            v12.updateTextboxes(false);
            v12:setState({
                hasSeconds = v12.secondRef.current.Text ~= "",
                showSecLabel = v12.secondRef.current.Text ~= "",
                isTextboxFocused = false
            });
            if v12.props.onDurationChange then
                v12.props.onDurationChange(v12.totalSeconds);
            end;
            return ;
        else
            return ;
        end;
    end;
    v12.onMinuteChanged = function(v27, v28)
        if v12.secondRef.current and v12.minuteRef.current then
            if v28 == "Text" then
                if #v27.Text <= 2 and not string.find(v27.Text, "\t") then
                    v12.minute = tonumber(v27.Text) or (math.floor(v12.props.defaultValue / 60) or 0);
                    if not tonumber(v12.secondRef.current.Text) then
                        v12.sec = 0;
                    end;
                else
                    local l_current_0 = v12.secondRef.current;
                    if l_current_0 then
                        l_current_0:CaptureFocus();
                    end;
                    v12.minuteRef.current.Text = tonumber(v12.minute);
                    return ;
                end;
            end;
            return ;
        else
            return ;
        end;
    end;
    v12.onSecondChange = function(v30, v31)
        if v12.secondRef.current and v12.minuteRef.current then
            if v31 == "Text" then
                if #v30.Text > 2 then
                    v12.secondRef.current.Text = tonumber(v12.sec);
                    return ;
                else
                    v12.sec = tonumber(v30.Text) or 0;
                    if not tonumber(v12.minuteRef.current.Text) then
                        v12.minute = 0;
                    end;
                    spawn(function()
                        if v12.secondRef.current then
                            v12:setState({
                                hasSeconds = v12.secondRef.current.Text ~= ""
                            });
                            return ;
                        else
                            return ;
                        end;
                    end);
                end;
            end;
            return ;
        else
            return ;
        end;
    end;
end;
v7.didMount = function(v32)
    v32.updateTextboxes(false);
end;
v7.didUpdate = function(v33, v34)
    if not (v34.min == v33.props.min and v34.max == v33.props.max) or v34.currentValue ~= v33.props.currentValue then
        local v35 = v33.props.currentValue % 60 or 0;
        v33.minute = v33.getClampedMinute(math.floor(v33.props.currentValue / 60) or 0, v33.props);
        v33.sec = v33.getClampedSec(v35, v33.props);
        v33.totalSeconds = 60 * v33.minute + v33.sec;
        v33.updateTextboxes(v33.state.isTextboxFocused);
        if v33.props.onDurationChange then
            v33.props.onDurationChange(v33.totalSeconds);
        end;
    end;
end;
v7.render = function(v36)
    local l_props_0 = v36.props;
    local l_state_0 = v36.state;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local v40 = l_state_0.showSecLabel or v36.sec > 0;
    local l_isTextboxFocused_0 = l_state_0.isTextboxFocused;
    local v42 = if not l_isTextboxFocused_0 then l_props_0.defaultValue % 60 or 0 else "0";
    local v43 = math.floor(l_props_0.defaultValue / 60) or 0;
    local v44 = not not l_isTextboxFocused_0 and if not l_state_0.hasSeconds then v43 else "0" or v43;
    local l_timeTextBox_0 = l_Stylizer_0.searchOptions.timeTextBox;
    return v2.createElement(v6, {
        BackgroundTransparency = 0,
        BackgroundColor3 = l_timeTextBox_0.backgroundColor,
        BorderColor3 = not not l_isTextboxFocused_0 and l_timeTextBox_0.selectedBorderColor or l_timeTextBox_0.borderColor,
        BorderSizePixel = 1,
        LayoutOrder = l_props_0.layoutOrder,
        Position = l_props_0.position,
        Size = l_props_0.size
    }, {
        Padding = v2.createElement("UIPadding", {
            PaddingTop = UDim.new(0, 0),
            PaddingBottom = UDim.new(0, 0),
            PaddingLeft = UDim.new(0, 5),
            PaddingRight = UDim.new(0, 5)
        }),
        MinuteTextField = v2.createElement("TextBox", {
            BackgroundTransparency = 1,
            ClearTextOnFocus = false,
            Font = v5.FONT,
            LayoutOrder = 1,
            Size = UDim2.new(0.5, 0, 1, 0),
            PlaceholderText = v44,
            PlaceholderColor3 = not not l_isTextboxFocused_0 and l_timeTextBox_0.placeholderTextColor or l_timeTextBox_0.textColor,
            Text = "",
            TextColor3 = l_timeTextBox_0.textColor,
            TextSize = v5.FONT_SIZE_MEDIUM,
            TextXAlignment = Enum.TextXAlignment.Left,
            ZIndex = 2,
            [v2.Event.Changed] = v36.onMinuteChanged,
            [v2.Event.Focused] = v36.onFocused,
            [v2.Event.FocusLost] = v36.onFocusLost,
            [v2.Ref] = v36.minuteRef
        }),
        MinuteLabel = v2.createElement("TextLabel", {
            BackgroundTransparency = 1,
            Font = v5.FONT,
            LayoutOrder = 2,
            Position = UDim2.new(0, 15, 0, 0),
            Size = UDim2.new(0, 15, 1, 0),
            Text = l_props_0.Localization:getText("General", "AbbreviatedMinutes"),
            TextColor3 = l_timeTextBox_0.textColor,
            TextSize = v5.FONT_SIZE_MEDIUM,
            TextXAlignment = Enum.TextXAlignment.Center
        }),
        SecondTextField = v2.createElement("TextBox", {
            BackgroundTransparency = 1,
            ClearTextOnFocus = false,
            Font = v5.FONT,
            LayoutOrder = 3,
            PlaceholderText = not not v40 and v42 or "",
            PlaceholderColor3 = l_timeTextBox_0.placeholderTextColor,
            Position = UDim2.new(0.5, 0, 0, 0),
            Size = UDim2.new(0.5, 0, 1, 0),
            Text = "",
            TextColor3 = l_timeTextBox_0.textColor,
            TextSize = v5.FONT_SIZE_MEDIUM,
            TextXAlignment = Enum.TextXAlignment.Left,
            ZIndex = 2,
            [v2.Event.Changed] = v36.onSecondChange,
            [v2.Event.Focused] = v36.onFocused,
            [v2.Event.FocusLost] = v36.onFocusLost,
            [v2.Ref] = v36.secondRef
        }),
        SecondLabel = v2.createElement("TextLabel", {
            BackgroundTransparency = 1,
            Font = v5.FONT,
            LayoutOrder = 4,
            Position = UDim2.new(0.5, 15, 0, 0),
            Size = UDim2.new(0, 15, 1, 0),
            Text = l_props_0.Localization:getText("General", "AbbreviatedSeconds"),
            TextColor3 = l_timeTextBox_0.textColor,
            TextSize = v5.FONT_SIZE_MEDIUM,
            TextTransparency = not v40 and 1 or 0,
            TextXAlignment = Enum.TextXAlignment.Center
        })
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v7));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local l_Packages_0 = l_script_FirstAncestor_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.RoactRodux);
local v4 = require(l_Packages_0.Framework);
local l_Pane_0 = v4.UI.Pane;
local l_Util_0 = l_script_FirstAncestor_0.Core.Util;
local v7 = require(l_Util_0.Constants);
local v8 = require(l_Util_0.debounce);
local l_withContext_0 = v4.ContextServices.withContext;
local v10 = require(l_script_FirstAncestor_0.Core.ContextServices.NetworkContext);
local v11 = require(l_script_FirstAncestor_0.Core.Components.SearchOptions.LiveSearchBar);
local v12 = require(l_script_FirstAncestor_0.Core.Components.CreatorPill);
local l_Requests_0 = l_script_FirstAncestor_0.Core.Networking.Requests;
local v14 = require(l_Requests_0.GetManageableGroupsRequest);
local v15 = require(l_Requests_0.UserAndGroupLiveSearchRequest);
local _ = require(l_script_FirstAncestor_0.Core.Types.CreatorTypes);
local _ = require(l_script_FirstAncestor_0.Core.Types.GroupTypes);
local _ = require(l_script_FirstAncestor_0.Core.Types.SearchOptionsTypes);
local v19 = require(l_script_FirstAncestor_0.Core.Util.SharedFlags.getFFlagToolboxPillsForCreators);
local l_game_FastInt_0 = game:GetFastInt("ToolboxLiveSearchDebounceWait");
local l_LayoutOrderIterator_0 = v4.Util.LayoutOrderIterator;
local v22 = v2.PureComponent:extend("UserAndGroupFilter");
v22.init = function(v23)
    v23.getKey = function(v24)
        return v24.Type.Value .. "_" .. v24.Id;
    end;
    v23.onClickCreatorPill = function(v25, v26)
        v23.props.OnDeleteCreatorPill(v25, v26);
    end;
    v23.onSelectCreator = function(v27)
        v23.props.OnSelectCreator(v27);
    end;
    v23.debouncedUserGroupSearchRequest = v8(function(v28, _)
        local l_props_0 = v23.props;
        l_props_0.userGroupSearchRequest(l_props_0.Network.networkInterface, v28, l_props_0.manageableGroups);
    end, l_game_FastInt_0);
    v23.updateUserSearch = function(v31, v32)
        local l_props_1 = v23.props;
        l_props_1.OnSearchUpdate(v31, v32);
        v23.debouncedUserGroupSearchRequest(v31, l_props_1.manageableGroups);
    end;
end;
v22.didMount = function(v34)
    local l_props_2 = v34.props;
    l_props_2.getManageableGroups(l_props_2.Network.networkInterface);
end;
v22.render = function(v36)
    local l_props_3 = v36.props;
    local _ = v36.state;
    local v39 = {};
    local v40 = 0;
    for _, v42 in {
        l_props_3.SelectedUsers,
        l_props_3.SelectedGroups
    }, nil, nil do
        for _, v44 in v42, nil, nil do
            local v45 = v36.getKey(v44);
            local v46 = if not v44.Index then v40 else v44.Index;
            v39[v45] = if not v19() then v2.createElement("TextButton", {
                LayoutOrder = v46,
                Size = UDim2.fromOffset(70, 20),
                Text = v44.Name,
                [v2.Event.Activated] = function()
                    return v36.onClickCreatorPill(v46, v44);
                end
            }) else v2.createElement(v12, {
                LayoutOrder = v46,
                CreatorId = v44.Id,
                CreatorName = not v44.Name and "" or v44.Name,
                CreatorType = v44.Type,
                OnActivated = function()
                    return v36.onClickCreatorPill(v46, v44);
                end
            });
            v40 = v40 + 1;
        end;
    end;
    local v47 = l_LayoutOrderIterator_0.new();
    return v2.createElement(l_Pane_0, {
        AutomaticSize = Enum.AutomaticSize.XY,
        HorizontalAlignment = Enum.HorizontalAlignment.Left,
        Layout = Enum.FillDirection.Vertical,
        LayoutOrder = l_props_3.LayoutOrder,
        Spacing = 6
    }, {
        LiveSearchBar = v2.createElement(v11, {
            defaultTextKey = "SearchBarCreatorAndGroupText",
            GetKey = v36.getKey,
            LayoutOrder = v47:getNextOrder(),
            OnSelectItem = v36.onSelectCreator,
            results = l_props_3.CreatorResults,
            searchTerm = l_props_3.SearchTerm,
            updateSearch = v36.updateUserSearch,
            width = v7.SEARCH_BAR_WIDTH
        }),
        SelectedPills = v2.createElement(l_Pane_0, {
            AutomaticSize = Enum.AutomaticSize.XY,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            Layout = Enum.FillDirection.Vertical,
            LayoutOrder = v47:getNextOrder(),
            Spacing = 6
        }, v39)
    });
end;
return v3.connect(function(v48, _)
    return {
        manageableGroups = ((v48 or {}).groups or {}).manageableGroups or {}
    };
end, function(v50)
    return {
        getManageableGroups = function(v51)
            v50(v14(v51));
        end,
        userGroupSearchRequest = function(v52, v53, v54)
            v50(v15(v52, v53, v54));
        end
    };
end)((l_withContext_0({
    Network = v10
})(v22)));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.Roact);
local v2 = require(script.Parent.UserAndGroupFilter);
local v3 = require(l_script_FirstAncestor_0.Stories.ToolboxStoryWrapper);
return {
    name = "UserAndGroupFilter",
    summary = "A live Search Bar for users and groups",
    stories = {
        {
            story = function()
                return v1.createElement(v3, {}, {
                    UserAndGroupFilter = v1.createElement(v2, {
                        OnDeleteCreatorPill = function()
                            print("onDeleteCreatorPill");
                        end,
                        OnSearchUpdate = function()
                            print("onDeleteCreatorPill");
                        end,
                        OnSelectCreator = function()
                            print("onDeleteCreatorPill");
                        end,
                        SelectedUsers = {
                            {
                                Name = "Selected Username",
                                Id = 123,
                                Type = Enum.CreatorType.User
                            }
                        },
                        SelectedGroups = {
                            {
                                Name = "Selected Group name",
                                Id = 123,
                                Type = Enum.CreatorType.Group
                            }
                        }
                    })
                });
            end
        }
    }
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local l_Packages_0 = l_script_FirstAncestor_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.Framework);
local v4 = require(l_script_FirstAncestor_0.Core.Util.Images);
local l_Checkbox_0 = v3.UI.Checkbox;
local l_UI_0 = v3.UI;
local l_Image_0 = l_UI_0.Image;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_LayoutOrderIterator_0 = v3.Util.LayoutOrderIterator;
local l_Pane_0 = l_UI_0.Pane;
local l_Tooltip_0 = l_UI_0.Tooltip;
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v14 = v2.PureComponent:extend("VerfifiedCreatorCheckbox");
v14.render = function(v15)
    local l_props_0 = v15.props;
    local l_searchOptions_0 = l_props_0.Stylizer.searchOptions;
    local l_Localization_0 = l_props_0.Localization;
    local v19 = l_Localization_0:getText("General", "SearchOptionsIncludeUnverifiedDescription");
    local v20 = l_Localization_0:getText("General", "SearchOptionsIncludeUnverifiedHeader");
    local v21 = l_Localization_0:getText("General", "SearchOptionsIncludeUnverifiedTooltip");
    local v22 = l_LayoutOrderIterator_0.new();
    return v2.createElement(l_Pane_0, {
        AutomaticSize = Enum.AutomaticSize.XY,
        HorizontalAlignment = Enum.HorizontalAlignment.Left,
        Layout = Enum.FillDirection.Vertical,
        LayoutOrder = l_props_0.LayoutOrder,
        Spacing = 3
    }, {
        IncludeUnverifiedToggle = v2.createElement(l_Checkbox_0, {
            Checked = l_props_0.IsChecked,
            LayoutOrder = v22:getNextOrder(),
            OnClick = l_props_0.OnClick,
            Text = v20,
            TextWrapped = true
        }),
        VerifiedDescriptionContainer = v2.createElement(l_Pane_0, {
            AutomaticSize = Enum.AutomaticSize.XY,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            Layout = Enum.FillDirection.Horizontal,
            LayoutOrder = v22:getNextOrder(),
            Padding = {
                Left = 24
            },
            Spacing = 6,
            VerticalAlignment = Enum.VerticalAlignment.Top
        }, {
            Image = v2.createElement(l_Image_0, {
                AnchorPoint = Vector2.new(0, 0.5),
                Image = v4.WARNING_ICON_SMALL,
                ImageColor3 = l_searchOptions_0.warningIconColor,
                LayoutOrder = v22:getNextOrder(),
                Size = UDim2.fromOffset(16, 16)
            }, {
                Tooltip = v2.createElement(l_Tooltip_0, {
                    Text = v21,
                    Priority = 11
                })
            }),
            VerifiedDescription = v2.createElement(l_TextLabel_0, {
                AutomaticSize = Enum.AutomaticSize.XY,
                LayoutOrder = v22:getNextOrder(),
                Style = "SubText",
                Text = v19,
                TextSize = 14,
                TextWrapped = true,
                TextXAlignment = Enum.TextXAlignment.Left
            })
        })
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v14));


local l_RunService_0 = game:GetService("RunService");
local l_Parent_0 = script.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v3 = require(l_Packages_0.Roact);
local v4 = require(l_Packages_0.RoactRodux);
local v5 = require(l_Parent_0.Core.Util.Urls);
local v6 = require(l_Parent_0.Core.Actions.StopPreviewSound);
local v7 = require(l_Parent_0.Core.Actions.SetSoundLoading);
local v8 = require(l_Parent_0.Core.Actions.SetSoundElapsedTime);
local v9 = require(l_Parent_0.Core.Actions.SetSoundTotalTime);
local v10 = v3.Component:extend("SoundPreviewComponent");
v10.init = function(v11)
    v11.ref = v3.createRef();
    v11.onSoundChange = function(_, v13)
        local l_current_0 = v11.ref.current;
        if l_current_0 then
            if l_current_0.IsLoaded ~= v11.props.isLoaded then
                v11.props.setSoundLoaded(not l_current_0.IsLoaded);
            end;
            if v13 == "TimeLength" and l_current_0.TimeLength ~= v11.props.totalTime then
                v11.props.setSoundTotalTime(l_current_0.TimeLength);
            end;
            return ;
        else
            return ;
        end;
    end;
    v11.updateSound = function()
        local l_current_1 = v11.ref.current;
        local l_currentSoundId_0 = v11.props.currentSoundId;
        local l_isPlaying_0 = v11.props.isPlaying;
        if l_current_1 then
            local l_lastSoundId_0 = v11.lastSoundId;
            if l_currentSoundId_0 ~= 0 and l_isPlaying_0 then
                if l_currentSoundId_0 == l_lastSoundId_0 then
                    l_current_1.Playing = true;
                    return ;
                else
                    l_current_1.TimePosition = 0;
                    l_current_1.Playing = true;
                    l_current_1.SoundId = v5.constructAssetIdString(l_currentSoundId_0);
                    v11.lastSoundId = l_currentSoundId_0;
                end;
            elseif l_current_1.isPlaying then
                l_current_1.Playing = false;
                return ;
            end;
            return ;
        else
            return ;
        end;
    end;
    v11.onSoundEnded = function(_)
        v11.props.stopPreviewSound();
    end;
end;
v10.didMount = function(v20)
    v20.runServiceConnection = l_RunService_0.RenderStepped:Connect(function(v21)
        local l_current_2 = v20.ref.current;
        local l_elapsedTime_0 = v20.props.elapsedTime;
        if l_current_2 and l_current_2.Playing then
            local v24 = l_elapsedTime_0 + v21;
            local l_TimeLength_0 = l_current_2.TimeLength;
            if l_TimeLength_0 <= v24 then
                v24 = l_TimeLength_0;
            end;
            if l_elapsedTime_0 ~= v24 then
                v20.props.setSoundElapsedTime(v24);
            end;
            return ;
        else
            return ;
        end;
    end);
end;
v10.willUnmount = function(v26)
    if v26.runServiceConnection then
        v26.runServiceConnection:Disconnect();
        v26.runServiceConnection = nil;
    end;
end;
v10.render = function(v27)
    return v3.createElement("Sound", {
        [v3.Ref] = v27.ref,
        [v3.Event.Ended] = v27.onSoundEnded,
        [v3.Event.Changed] = v27.onSoundChange,
        UsageContextPermission = Enum.UsageContext.Preview
    });
end;
v10.didUpdate = function(v28)
    v28.updateSound();
end;
return v4.connect(function(v29, _)
    local v31 = (v29 or {}).sound or {};
    return {
        currentSoundId = v31.currentSoundId or 0,
        elapsedTime = v31.elapsedTime or 0,
        isPlaying = v31.isPlaying or false
    };
end, function(v32)
    return {
        stopPreviewSound = function()
            v32(v6());
        end,
        setSoundLoaded = function(v33)
            v32(v7(v33));
        end,
        setSoundElapsedTime = function(v34)
            v32(v8(v34));
        end,
        setSoundTotalTime = function(v35)
            v32(v9(v35));
        end
    };
end)(v10);


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.Framework);
local v4 = require(l_Parent_0.Core.Util.Constants);
local v5 = require(l_Parent_0.Core.Util.Images);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_withForwardRef_0 = v3.Wrappers.withForwardRef;
local v9 = v2.PureComponent:extend("StyledScrollingFrame");
v9.render = function(v10)
    local l_props_0 = v10.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local _ = l_props_0.AutomaticCanvasSize;
    local v14 = l_props_0.Position or UDim2.new(0, 0, 0, 0);
    local v15 = l_props_0.Size or UDim2.new(1, 0, 1, 0);
    local v16 = l_props_0.CanvasSize or UDim2.new(1, 0, 1, 0);
    local v17 = l_props_0.LayoutOrder or 1;
    local v18 = l_props_0.ZIndex or 1;
    local v19 = l_props_0.Visible ~= nil and l_props_0.Visible or l_props_0.Visible == nil;
    local l_onScroll_0 = l_props_0.onScroll;
    local l_ForwardRef_0 = l_props_0.ForwardRef;
    local v22 = l_props_0[v2.Children];
    local l_scrollingEnabled_0 = l_props_0.scrollingEnabled;
    local l_scrollingFrame_0 = l_Stylizer_0.scrollingFrame;
    return v2.createElement("ImageButton", {
        Position = v14,
        Size = v15,
        BackgroundTransparency = 1,
        LayoutOrder = v17,
        ZIndex = v18,
        Visible = v19,
        AutoButtonColor = false
    }, {
        ScrollBarBackground = v2.createElement("Frame", {
            AnchorPoint = Vector2.new(1, 0),
            Position = UDim2.new(1, 0, 0, 0),
            Size = UDim2.new(0, v4.SCROLLBAR_BACKGROUND_THICKNESS, 1, 0),
            BorderSizePixel = 0,
            BackgroundColor3 = l_props_0.BackgroundColor or l_scrollingFrame_0.scrollbarBackgroundColor
        }),
        ScrollingFrame = v2.createElement("ScrollingFrame", {
            Position = UDim2.new(0, 0, 0, 0),
            Size = UDim2.new(1, -v4.SCROLLBAR_PADDING, 1, 0),
            CanvasSize = v16,
            BorderSizePixel = 0,
            BackgroundTransparency = 1,
            ScrollBarThickness = v4.SCROLLBAR_THICKNESS,
            ZIndex = 2,
            TopImage = v5.SCROLLBAR_TOP_IMAGE,
            MidImage = v5.SCROLLBAR_MIDDLE_IMAGE,
            BottomImage = v5.SCROLLBAR_BOTTOM_IMAGE,
            ScrollBarImageColor3 = l_scrollingFrame_0.scrollbarImageColor,
            ScrollingEnabled = l_scrollingEnabled_0,
            ElasticBehavior = Enum.ElasticBehavior.Always,
            ScrollingDirection = Enum.ScrollingDirection.Y,
            [v2.Change.AbsoluteSize] = l_props_0.OnAbsoluteSizeChanged,
            [v2.Change.CanvasPosition] = l_onScroll_0,
            [v2.Ref] = l_ForwardRef_0
        }, v22)
    });
end;
return (l_withForwardRef_0((l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v9))));


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.Framework);
local v4 = require(l_Parent_0.Core.Util.Constants);
local l_Tooltip_0 = v3.UI.Tooltip;
local l_GetTextSize_0 = v3.Util.GetTextSize;
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v9 = v2.PureComponent:extend("Tab");
v9.init = function(v10)
    v10.state = {
        hovered = false
    };
    v10.onClick = function()
        if not v10.props.Disabled then
            if v10.props.onClick then
                v10.props.onClick();
            end;
            return ;
        else
            return ;
        end;
    end;
    v10.mouseEnter = function()
        if not v10.props.Disabled then
            v10:setState({
                hovered = true
            });
            return ;
        else
            return ;
        end;
    end;
    v10.mouseLeave = function()
        if not v10.props.Disabled then
            v10:setState({
                hovered = false
            });
            return ;
        else
            return ;
        end;
    end;
end;
v9.render = function(v11)
    local l_Stylizer_0 = v11.props.Stylizer;
    local v13 = v11.props.Text or "";
    local l_Image_0 = v11.props.Image;
    local v15 = v11.props.LayoutOrder or 0;
    local v16 = v11.props.Selected or false;
    local l_hovered_0 = v11.state.hovered;
    local l_tabSet_0 = l_Stylizer_0.tabSet;
    local l_TabWidth_0 = v11.props.TabWidth;
    local l_DisplayText_0 = v11.props.DisplayText;
    local l_Disabled_0 = v11.props.Disabled;
    local l_X_0 = l_GetTextSize_0(v13, nil, v4.FONT_BOLD, Vector2.new(0, 0)).X;
    local v23 = if not l_Disabled_0 then if v16 or l_hovered_0 then l_tabSet_0.selectedColor else l_tabSet_0.contentColor else l_tabSet_0.disabledColor;
    return v2.createElement("ImageButton", {
        LayoutOrder = v15,
        Size = UDim2.new(0, l_TabWidth_0, 1, 0),
        BorderSizePixel = not v16 and 0 or 2,
        BorderColor3 = l_tabSet_0.borderColor,
        ZIndex = not v16 and 0 or 2,
        BackgroundColor3 = l_tabSet_0.tabBackground,
        AutoButtonColor = false,
        [v2.Event.MouseEnter] = v11.mouseEnter,
        [v2.Event.MouseLeave] = v11.mouseLeave,
        [v2.Event.Activated] = v11.onClick
    }, {
        Tooltip = not l_DisplayText_0 and v2.createElement(l_Tooltip_0, {
            Text = v13
        }) or nil,
        UpperBorder = v16 and v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 0, 2),
            BorderSizePixel = 0,
            BackgroundColor3 = l_tabSet_0.topBorderColor
        }),
        LowerBorder = not v16 and v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 0, 2),
            AnchorPoint = Vector2.new(0, 1),
            Position = UDim2.new(0, 0, 1, 0),
            BorderSizePixel = 0,
            BackgroundColor3 = l_tabSet_0.borderColor
        }),
        Content = v2.createElement("Frame", {
            Size = UDim2.new(1, -(v4.TAB_OUTER_PADDING * 2), 1, 0),
            Position = UDim2.new(0, v4.TAB_OUTER_PADDING, 0, 0),
            BackgroundTransparency = 1,
            LayoutOrder = 1
        }, {
            Layout = v2.createElement("UIListLayout", {
                SortOrder = Enum.SortOrder.LayoutOrder,
                FillDirection = Enum.FillDirection.Horizontal,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                VerticalAlignment = Enum.VerticalAlignment.Center,
                Padding = UDim.new(0, v4.TAB_INNER_PADDING)
            }),
            Icon = v2.createElement("ImageLabel", {
                LayoutOrder = 1,
                Size = UDim2.new(0, v4.TAB_ICON_SIZE, 0, v4.TAB_ICON_SIZE),
                BackgroundTransparency = 1,
                ImageColor3 = v23,
                Image = l_Image_0
            }),
            Text = l_DisplayText_0 and v2.createElement("TextLabel", {
                LayoutOrder = 2,
                Text = v13,
                Font = not not v16 and v4.FONT_BOLD or v4.FONT,
                TextSize = v4.FONT_SIZE_MEDIUM,
                BackgroundTransparency = 1,
                TextColor3 = v23,
                Size = UDim2.new(0, l_X_0, 1, 0),
                TextXAlignment = Enum.TextXAlignment.Left,
                ClipsDescendants = true
            })
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v9));


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.Framework);
local v4 = require(l_Parent_0.Core.Util.Constants);
local v5 = require(l_Parent_0.Core.ContextServices.IXPContext);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_GetTextSize_0 = v3.Util.GetTextSize;
local v9 = require(l_Parent_0.Core.Components.Tab);
local v10 = require(l_Parent_0.Core.Util.SharedFlags.getFFlagToolboxContentManagementCombineTabs);
local v11 = require(l_Parent_0.Core.Util.SharedFlags.getIsIXPEnabledForListView);
local v12 = v2.PureComponent:extend("TabSet");
v12.init = function(v13)
    v13.state = {
        currentWidth = 0
    };
    v13.tabSetRef = v2.createRef();
    v13.onAbsoluteSizeChange = function()
        local l_x_0 = v13.tabSetRef.current.AbsoluteSize.x;
        if v13.state.currentWidth ~= l_x_0 then
            v13:setState({
                currentWidth = l_x_0
            });
        end;
    end;
    v13.onTabSelected = function(v15)
        if v13.props.onTabSelected then
            v13.props.onTabSelected(v15);
        end;
    end;
end;
v12.resetLayout = function(v16)
    v16.currentLayout = 0;
end;
v12.nextLayout = function(v17)
    v17.currentLayout = v17.currentLayout + 1;
    return v17.currentLayout;
end;
v12.createTab = function(v18, v19, v20, v21, v22, v23, v24, v25)
    return v2.createElement(v9, {
        Disabled = v25,
        LayoutOrder = v18:nextLayout(),
        Image = v22,
        Text = v21,
        Selected = v19 == v20,
        TabWidth = v23,
        DisplayText = if not not v10() and v11(v18.props.IXP) then nil else v24,
        onClick = function()
            v18.onTabSelected(v19);
        end
    });
end;
local function _(v26, v27)
    return #v26 > 0 and v27 / #v26 or 0;
end;
local function _(v29)
    return ((l_GetTextSize_0(v29, nil, v4.FONT_BOLD, Vector2.new(0, 0)).X + v4.TAB_ICON_SIZE) + v4.TAB_INNER_PADDING) + v4.TAB_OUTER_PADDING * 2;
end;
local function v35(v31, v32)
    if #v31 > 0 then
        for _, v34 in ipairs(v31) do
            if v32 < ((l_GetTextSize_0(v34.Text, nil, v4.FONT_BOLD, Vector2.new(0, 0)).X + v4.TAB_ICON_SIZE) + v4.TAB_INNER_PADDING) + v4.TAB_OUTER_PADDING * 2 then
                return false;
            end;
        end;
    end;
    return true;
end;
v12.render = function(v36)
    local l_Stylizer_0 = v36.props.Stylizer;
    local v38 = v36.props.Size or UDim2.new();
    local v39 = v36.props.Position or UDim2.new();
    local v40 = v36.props.Tabs or {};
    local l_CurrentTab_0 = v36.props.CurrentTab;
    local l_Disabled_0 = v36.props.Disabled;
    local l_tabSet_0 = l_Stylizer_0.tabSet;
    local l_currentWidth_0 = v36.state.currentWidth;
    v36:resetLayout();
    local v45 = {
        Layout = v2.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            FillDirection = Enum.FillDirection.Horizontal,
            HorizontalAlignment = Enum.HorizontalAlignment.Left
        }),
        LeftPadding = v2.createElement("Frame", {
            LayoutOrder = v36:nextLayout(),
            Size = UDim2.new(0, 1, 1, 0),
            BorderSizePixel = 0,
            BackgroundColor3 = l_tabSet_0.tabBackground
        })
    };
    local v46 = #v40 > 0 and l_currentWidth_0 / #v40 or 0;
    local v47 = if not not v10() and v11(v36.props.IXP) then nil else v35(v40, v46);
    for _, v49 in ipairs(v40) do
        v45[v49.Key] = v36:createTab(v49.Key, l_CurrentTab_0, v49.Text, v49.Image, v46, v47, l_Disabled_0);
    end;
    v45.RightPadding = v2.createElement("Frame", {
        LayoutOrder = v36:nextLayout(),
        Size = UDim2.new(1, 0, 1, 0),
        BorderSizePixel = 0,
        BackgroundColor3 = l_tabSet_0.tabBackground
    }, {
        LowerBorder = v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 0, 2),
            AnchorPoint = Vector2.new(0, 1),
            Position = UDim2.new(0, 0, 1, 0),
            BorderSizePixel = 0,
            BackgroundColor3 = l_tabSet_0.borderColor
        })
    });
    return v2.createElement("Frame", {
        Size = v38,
        Position = v39,
        BackgroundColor3 = l_tabSet_0.backgroundColor,
        BorderSizePixel = 0,
        [v2.Ref] = v36.tabSetRef,
        [v2.Change.AbsoluteSize] = v36.onAbsoluteSizeChange
    }, v45);
end;
return (l_withContext_0({
    IXP = if not v10() then nil else v5,
    Stylizer = l_ContextServices_0.Stylizer
})(v12));


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v2 = require(l_Packages_0.Roact);
local l_GetTextSize_0 = require(l_Packages_0.Framework).Util.GetTextSize;
local v4 = require(l_Parent_0.Core.Util.Colors);
local v5 = require(l_Parent_0.Core.Util.Constants);
local v6 = require(l_Parent_0.Core.Components.RoundFrame);
return function(v7)
    local v8 = v7.Text or "";
    local v9 = l_GetTextSize_0(v8, v5.FONT_SIZE_SMALL, v5.FONT, Vector2.new(0, 0));
    return v2.createElement(v6, {
        AnchorPoint = Vector2.new(0.5, 1),
        Position = UDim2.new(0.5, 0, 1, -16),
        Size = UDim2.new(0, (12 + v9.x) + 12, 0, (8 + v9.y) + 8),
        ZIndex = 10,
        BackgroundColor3 = v4.GRAY_2,
        BackgroundTransparency = 0.2
    }, {
        TextLabel = v2.createElement("TextLabel", {
            Position = UDim2.new(0, 0, 0, -1),
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundTransparency = 1,
            Text = v8,
            Font = v5.FONT,
            TextSize = v5.FONT_SIZE_SMALL,
            TextColor3 = v4.GRAY_6
        })
    });
end;