local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local l_Packages_0 = l_script_FirstAncestor_0.Packages;
local v2 = require(l_Packages_0.Framework);
local v3 = require(l_Packages_0.Roact);
local v4 = require(l_script_FirstAncestor_0.Core.Components.Categorization.SectionHeader);
local _ = require(l_Packages_0.Dash);
local l_LayoutOrderIterator_0 = v2.Util.LayoutOrderIterator;
local l_Pane_0 = v2.UI.Pane;
local l_ContextServices_0 = v2.ContextServices;
local _ = v2.UI.HoverArea;
local l_withContext_0 = l_ContextServices_0.withContext;
local v11 = v3.PureComponent:extend("ExpandableTeaser");
v11.defaultProps = {
    AlwaysExpanded = false,
    AutomaticSize = Enum.AutomaticSize.Y,
    Layout = Enum.FillDirection.Vertical,
    Size = UDim2.new(1, 0, 0, 0),
    TeaserSize = Vector2.new(0, 0)
};
v11.init = function(v12)
    v12.contentRef = v3.createRef();
    v12.state = {
        contentSize = Vector2.new(0, 0),
        isExpanded = false
    };
    v12.toggleContent = function()
        v12:setState(function(v13)
            local l_OnExpandChanged_0 = v12.props.OnExpandChanged;
            local v15 = not v13.isExpanded;
            if l_OnExpandChanged_0 then
                l_OnExpandChanged_0(v15);
            end;
            return {
                isExpanded = v15
            };
        end);
    end;
    v12.onContentSizeChange = function()
        v12:setState(function(_)
            local l_current_0 = v12.contentRef.current;
            if l_current_0 then
                return {
                    contentSize = l_current_0.AbsoluteSize
                };
            else
                return ;
            end;
        end);
    end;
end;
v11.render = function(v18)
    local l_props_0 = v18.props;
    local l_state_0 = v18.state;
    local l_AutomaticSize_0 = l_props_0.AutomaticSize;
    local l_Layout_0 = l_props_0.Layout;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_Localization_0 = l_props_0.Localization;
    local l_Size_0 = l_props_0.Size;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_TeaserSize_0 = l_props_0.TeaserSize;
    local l_Title_0 = l_props_0.Title;
    local l_contentSize_0 = l_state_0.contentSize;
    local _ = l_Stylizer_0.searchPill;
    local v31 = l_Localization_0:getText("General", "ShowLess");
    local v32 = l_Localization_0:getText("General", "ShowMore");
    local v33 = l_LayoutOrderIterator_0.new();
    local v34 = nil;
    local v35 = nil;
    local v36 = nil;
    if not l_state_0.isExpanded then
        v35 = v32 .. " +";
        v36 = l_TeaserSize_0;
    else
        v34 = l_AutomaticSize_0;
        v35 = v31 .. " -";
        v36 = l_contentSize_0;
    end;
    local _ = nil;
    return v3.createElement(l_Pane_0, {
        AutomaticSize = l_AutomaticSize_0,
        Layout = l_Layout_0,
        LayoutOrder = l_LayoutOrder_0,
        Size = l_Size_0,
        Spacing = 5,
        HorizontalAlignment = Enum.HorizontalAlignment.Left,
        VerticalAlignment = Enum.VerticalAlignment.Top
    }, {
        SectionHeader = v3.createElement(v4, {
            OnClickSeeAll = v18.toggleContent,
            LayoutOrder = v33:getNextOrder(),
            SeeAllText = v35,
            Title = l_Title_0
        }),
        Content = v3.createElement(l_Pane_0, {
            AutomaticSize = v34,
            ClipsDescendants = true,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            Layout = Enum.FillDirection.Vertical,
            LayoutOrder = v33:getNextOrder(),
            Size = if l_AutomaticSize_0 == Enum.AutomaticSize.Y then UDim2.new(1, 0, 0, v36.Y) else UDim2.new(0, v36.X, 1, 0),
            VerticalAlignment = Enum.VerticalAlignment.Top,
            [v3.Change.AbsoluteSize] = v18.onContentSizeChange,
            [v3.Ref] = v18.contentRef
        }, v18.props[v3.Children])
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v11));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_game_FastInt_0 = game:GetFastInt("ToolboxHomeViewInitialPageSize");
local v2 = require(l_Parent_0.Core.Util.SharedFlags.getFFlagToolboxFixInventoryGridSearch);
local v3 = require(l_Parent_0.Core.Flags.getFFlagQualityFiltersInToolboxSearch);
local l_Packages_0 = l_Parent_0.Packages;
local v5 = require(l_Packages_0.Framework);
local v6 = require(l_Packages_0.Roact);
local v7 = require(l_Packages_0.RoactRodux);
local _ = require(l_Packages_0.Dash);
local l_ContextServices_0 = v5.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v11 = require(l_Parent_0.Core.ContextServices.Settings);
local v12 = require(l_Parent_0.Core.Util.Layouter);
local v13 = require(l_Parent_0.Core.ContextServices.NetworkContext);
local l_LayoutOrderIterator_0 = v5.Util.LayoutOrderIterator;
local l_LoadingIndicator_0 = v5.UI.LoadingIndicator;
local l_Pane_0 = v5.UI.Pane;
local _ = require(l_Parent_0.Core.Components.Asset.Asset);
local v18 = require(l_Parent_0.Core.Components.AssetGrid);
local _ = require(l_Parent_0.Core.Components.AssetLogicWrapper);
local v20 = require(l_Parent_0.Core.Components.Categorization.IconTile);
local v21 = require(l_Parent_0.Core.Components.ResultsFetcher);
local _ = require(l_Parent_0.Core.Types.Category);
local v23 = require(l_Parent_0.Core.Components.Categorization.AssetSwimlane);
local _ = require(l_Parent_0.Core.Components.Categorization.ExpandableTeaser);
local v25 = require(l_Parent_0.Core.Components.Categorization.SearchList);
local v26 = require(l_Parent_0.Core.Components.Categorization.SectionHeader);
local v27 = require(l_Parent_0.Core.Components.Categorization.Swimlane);
local l_Util_0 = l_Parent_0.Core.Util;
local v29 = require(l_Util_0.Constants);
local v30 = require(l_Util_0.getStartupAssetId);
local v31 = require(l_Util_0.Urls);
local v32 = require(l_Parent_0.Core.Thunks.GetAssetPreviewDataForStartup);
local v33 = require(l_Parent_0.Core.Networking.Requests.RequestSearchRequest);
local v34 = require(l_Parent_0.Core.Thunks.LogMarketplaceSearchAnalytics);
local _ = require(l_Parent_0.Core.Models.AssetInfo);
local _ = require(l_Parent_0.Core.Types.HomeTypes);
local v37 = Vector2.new(75, 90);
local l_ASSET_THUMBNAIL_REQUESTED_IMAGE_SIZE_0 = v29.ASSET_THUMBNAIL_REQUESTED_IMAGE_SIZE;
local v39 = v6.PureComponent:extend("HomeView");
v39.defaultProps = {
    Size = UDim2.new(1, 0, 0, 0)
};
v39.didMount = function(v40)
    local l_props_0 = v40.props;
    local v42 = tonumber((v30()));
    if v42 then
        l_props_0.getAssetPreviewDataForStartup(v42, l_props_0.TryInsert, l_props_0.Localization, l_props_0.Network.networkInterface, l_props_0.OnAssetPreviewButtonClicked);
    end;
    v40.onOverallAbsoluteSizeChange();
end;
v39.init = function(v43)
    v43.sizerRef = v6.createRef();
    v43.state = {
        showTopSearchesFullHeight = false,
        swimlaneWidth = 0
    };
    v43.onOverallAbsoluteSizeChange = function()
        v43:setState(function(v44)
            local l_current_0 = v43.sizerRef.current;
            if l_current_0 then
                local v46 = v12.getSwimlaneWidth(l_current_0.AbsoluteSize.X);
                local v47 = l_current_0.AbsoluteSize.Y > 475;
                if not (v47 == v44.showTopSearchesFullHeight) or v46 ~= v44.swimlaneWidth then
                    return {
                        absoluteSize = l_current_0.absoluteSize,
                        showTopSearchesFullHeight = v47,
                        swimlaneWidth = v46
                    };
                else
                    return ;
                end;
            else
                return ;
            end;
        end);
    end;
    v43.onAbsolutePositionChange = function(v48)
        v43:setState(function(_)
            return {
                absolutePosition = v48.AbsolutePosition
            };
        end);
    end;
    v43.onClickSubcategory = function(v50)
        local l_props_1 = v43.props;
        local l_CategoryName_0 = l_props_1.CategoryName;
        local l_OnClickSubcategory_0 = l_props_1.OnClickSubcategory;
        local l_SortName_0 = l_props_1.SortName;
        local v55 = l_props_1.SubcategoryDict[v50];
        l_OnClickSubcategory_0(v50, v55, l_CategoryName_0, l_SortName_0, v55.queryParams);
    end;
    v43.onClickSeeAllSubcategories = function()
        local l_props_2 = v43.props;
        local l_CategoryName_1 = l_props_2.CategoryName;
        local l_SortName_1 = l_props_2.SortName;
        local l_SubcategoryDict_0 = l_props_2.SubcategoryDict;
        local l_OnClickSeeAllSubcategories_0 = l_props_2.OnClickSeeAllSubcategories;
        if l_OnClickSeeAllSubcategories_0 then
            l_OnClickSeeAllSubcategories_0(l_SubcategoryDict_0, l_CategoryName_1, l_SortName_1);
        end;
    end;
    v43.onClickSearchPill = function(v61)
        local l_props_3 = v43.props;
        local l_CategoryName_2 = l_props_3.CategoryName;
        local _ = l_props_3.SortName;
        local l_requestSearchRequest_0 = l_props_3.requestSearchRequest;
        local l_logSearchAnalytics_0 = l_props_3.logSearchAnalytics;
        l_requestSearchRequest_0(l_props_3.Network.networkInterface, v43.props.Settings:get("Plugin"), v61, l_CategoryName_2);
        l_logSearchAnalytics_0(v61, nil);
    end;
    v43.renderSubcategory = function(_, v68)
        local v69 = "";
        local v70 = nil;
        if not (not v68 or not v68.thumbnail) then
            v69 = v31.constructAssetThumbnailUrl(v68.thumbnail.assetId, l_ASSET_THUMBNAIL_REQUESTED_IMAGE_SIZE_0, l_ASSET_THUMBNAIL_REQUESTED_IMAGE_SIZE_0);
            v70 = Color3.fromHex(v68.thumbnail.backgroundColor);
        end;
        return v6.createElement(v20, {
            BackgroundColor = v70,
            Image = v69,
            LayoutOrder = v68.index,
            Key = v68.name,
            OnClick = v43.onClickSubcategory,
            Size = UDim2.new(0, v37.X, 0, v37.Y),
            Title = v68.displayName
        });
    end;
    v43.createTopContent = function()
        local l_state_0 = v43.state;
        local l_props_4 = v43.props;
        local l_AssetSections_0 = l_props_4.AssetSections;
        local l_CanInsertAsset_0 = l_props_4.CanInsertAsset;
        local l_CategoryName_3 = l_props_4.CategoryName;
        local _ = l_props_4.contextualAssets;
        local l_IncludeUnverifiedCreators_0 = l_props_4.IncludeUnverifiedCreators;
        local l_Localization_0 = l_props_4.Localization;
        local l_OnClickSeeAllAssets_0 = l_props_4.OnClickSeeAllAssets;
        local l_OnAssetPreviewButtonClicked_0 = l_props_4.OnAssetPreviewButtonClicked;
        local l_SortName_3 = l_props_4.SortName;
        local l_TopKeywords_0 = l_props_4.TopKeywords;
        local l_TryInsert_0 = l_props_4.TryInsert;
        local l_TryOpenAssetConfig_0 = l_props_4.TryOpenAssetConfig;
        local l_swimlaneWidth_0 = l_state_0.swimlaneWidth;
        local v86 = l_LayoutOrderIterator_0.new();
        local l_SubcategoryDict_1 = l_props_4.SubcategoryDict;
        local v88 = 0;
        if l_SubcategoryDict_1 then
            for _ in pairs(l_SubcategoryDict_1) do
                v88 = v88 + 1;
            end;
        end;
        local l_Stylizer_0 = l_props_4.Stylizer;
        local l_searchList_0 = l_Stylizer_0.searchList;
        local l_searchPill_0 = l_Stylizer_0.searchPill;
        local l_sectionHeader_0 = l_Stylizer_0.sectionHeader;
        local v94 = l_Localization_0:getText("General", "Categories");
        local _ = l_Localization_0:getText("HomeView", "TheEssentials");
        local v96 = l_Localization_0:getText("HomeView", "TopSearches");
        local v97 = {
            UIListLayout = v6.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Vertical,
                Padding = UDim.new(0, 10),
                SortOrder = Enum.SortOrder.LayoutOrder
            })
        };
        local v98 = #l_AssetSections_0;
        local _ = v43.sizerRef.current;
        local l_absoluteSize_0 = l_state_0.absoluteSize;
        local l_absolutePosition_0 = l_state_0.absolutePosition;
        for v102, v103 in pairs(l_AssetSections_0) do
            if v102 ~= v98 then
                v97["AssetSwimlane_" .. v102] = v6.createElement(v23, {
                    CanInsertAsset = l_CanInsertAsset_0,
                    CategoryName = l_CategoryName_3,
                    IncludeUnverifiedCreators = l_IncludeUnverifiedCreators_0,
                    InitialPageSize = 20,
                    LayoutOrder = v102,
                    LogAssetImpression = l_props_4.LogAssetImpression,
                    OnClickSeeAllAssets = l_OnClickSeeAllAssets_0,
                    OnAssetPreviewButtonClicked = l_OnAssetPreviewButtonClicked_0,
                    OnSearchByCreator = if not v2() then nil else l_props_4.OnSearchByCreator,
                    ParentAbsolutePosition = l_absolutePosition_0,
                    ParentAbsoluteSize = l_absoluteSize_0,
                    QualityFilterData = if not v3() then nil else l_props_4.qualityFilterData,
                    SortName = l_SortName_3,
                    SearchTerm = nil,
                    SectionName = v103.name,
                    SwimlaneCategory = v103.name,
                    SwimlaneWidth = l_swimlaneWidth_0,
                    Title = v103.displayName,
                    TryInsert = l_TryInsert_0,
                    TryOpenAssetConfig = l_TryOpenAssetConfig_0,
                    ZIndex = (v98 - v102) + 1
                });
            else
                break;
            end;
        end;
        local v104 = l_TopKeywords_0 and #l_TopKeywords_0 > 0;
        local _ = (l_searchPill_0.textSize + l_searchPill_0.padding.left) + l_searchPill_0.padding.right;
        local v106 = 1;
        if l_state_0.showTopSearchesFullHeight then
            v106 = 2;
        end;
        return v6.createElement(l_Pane_0, {
            AutomaticSize = Enum.AutomaticSize.Y,
            Layout = Enum.FillDirection.Vertical,
            Size = UDim2.new(1, 0, 0, 0),
            Spacing = 20,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            VerticalAlignment = Enum.VerticalAlignment.Top
        }, {
            SubcategorySwimlane = if v88 > 0 then v6.createElement(v27, {
                Data = l_SubcategoryDict_1,
                LayoutOrder = v86:getNextOrder(),
                OnClickSeeAll = v43.onClickSeeAllSubcategories,
                OnRenderItem = v43.renderSubcategory,
                Size = UDim2.new(0, l_swimlaneWidth_0, 0, 0),
                Title = v94,
                Total = v88
            }) else nil,
            TopKeywords = if not v104 then nil else v6.createElement(l_Pane_0, {
                AutomaticSize = Enum.AutomaticSize.Y,
                Layout = Enum.FillDirection.Vertical,
                LayoutOrder = v86:getNextOrder(),
                Size = UDim2.new(0, l_swimlaneWidth_0, 0, ((l_searchPill_0.textSize + l_searchPill_0.padding.top) + l_searchPill_0.padding.bottom) * v106 + l_searchList_0.buttonSpacing),
                Spacing = 10,
                HorizontalAlignment = Enum.HorizontalAlignment.Left,
                VerticalAlignment = Enum.VerticalAlignment.Top
            }, {
                SectionHeader = v6.createElement(v26, {
                    OnClickSeeAll = function()
                    end,
                    LayoutOrder = v86:getNextOrder(),
                    SeeAllText = "",
                    Title = v96
                }),
                SearchList = v6.createElement(v25, {
                    Items = l_TopKeywords_0,
                    ItemMinWidth = l_searchPill_0.padding.left + l_searchPill_0.padding.right,
                    LayoutOrder = v86:getNextOrder(),
                    MaxRowCount = v106,
                    OnClick = v43.onClickSearchPill
                })
            }),
            AssetSections = v6.createElement("Frame", {
                AutomaticSize = Enum.AutomaticSize.Y,
                BackgroundTransparency = 1,
                LayoutOrder = v86:getNextOrder(),
                Size = UDim2.new(1, 0, 0, 0)
            }, v97),
            GridHeader = l_AssetSections_0[v98] and v6.createElement("TextLabel", {
                AutomaticSize = Enum.AutomaticSize.XY,
                BackgroundTransparency = 1,
                Font = l_sectionHeader_0.font,
                LayoutOrder = v86:getNextOrder(),
                Size = UDim2.new(1, 0, 0, l_sectionHeader_0.textSize),
                Text = l_AssetSections_0[v98].displayName,
                TextColor3 = l_sectionHeader_0.textColor,
                TextSize = l_sectionHeader_0.textSize,
                TextXAlignment = Enum.TextXAlignment.Left
            })
        });
    end;
end;
v39.render = function(v107)
    local l_props_5 = v107.props;
    local l_CategoryName_4 = l_props_5.CategoryName;
    local l_IncludeUnverifiedCreators_1 = l_props_5.IncludeUnverifiedCreators;
    local l_LayoutOrder_0 = l_props_5.LayoutOrder;
    local l_Position_0 = l_props_5.Position;
    local l_SortName_4 = l_props_5.SortName;
    local l_Size_0 = l_props_5.Size;
    local l_Stylizer_1 = l_props_5.Stylizer;
    local l_AssetSections_1 = l_props_5.AssetSections;
    local l_SubcategoryDict_2 = l_props_5.SubcategoryDict;
    local v118 = not not l_AssetSections_1[#l_AssetSections_1] and l_AssetSections_1[#l_AssetSections_1].name or nil;
    local v119 = next(l_SubcategoryDict_2) ~= nil;
    local v120 = false;
    if #l_AssetSections_1 == 1 then
        v120 = (((not v119 and l_AssetSections_1[#l_AssetSections_1]) and not l_AssetSections_1[#l_AssetSections_1].subcategory) and l_props_5.TopKeywords) and #l_props_5.TopKeywords == 0;
    end;
    local l_CanInsertAsset_1 = l_props_5.CanInsertAsset;
    local l_OnAssetPreviewButtonClicked_1 = l_props_5.OnAssetPreviewButtonClicked;
    local l_TryInsert_1 = l_props_5.TryInsert;
    local l_TryOpenAssetConfig_1 = l_props_5.TryOpenAssetConfig;
    local v125 = if not v120 then v107.createTopContent() else nil;
    local function v126()
        return v125;
    end;
    if not l_props_5.hasTutorialLimits then
        return v6.createElement("Frame", {
            BackgroundTransparency = 0,
            Size = UDim2.new(1, 0, 1, 0),
            [v6.Ref] = v107.sizerRef,
            [v6.Change.AbsoluteSize] = v107.onOverallAbsoluteSizeChange,
            [v6.Change.AbsolutePosition] = v107.onAbsolutePositionChange
        }, {
            v21.Generator({
                networkInterface = l_props_5.Network.networkInterface,
                categoryName = l_CategoryName_4,
                sortName = l_SortName_4,
                searchTerm = nil,
                queryParams = {},
                sectionName = v118,
                initialPageSize = l_game_FastInt_0,
                includeUnverifiedCreators = l_IncludeUnverifiedCreators_1,
                qualityFilterData = if not v3() then nil else l_props_5.qualityFilterData,
                render = function(v127)
                    if v127.loading and #v127.assetIds == 0 then
                        return v6.createElement("Frame", {
                            BackgroundColor3 = l_Stylizer_1.backgroundColor,
                            LayoutOrder = l_LayoutOrder_0,
                            Position = l_Position_0,
                            Size = l_Size_0
                        }, {
                            LoadingIndicator = v6.createElement(l_LoadingIndicator_0, {
                                AnchorPoint = Vector2.new(0.5, 0.5),
                                Position = UDim2.new(0.5, 0, 0.5, 0)
                            })
                        });
                    else
                        return v18({
                            AssetIds = v127.assetIds,
                            AssetMap = v127.assetMap,
                            LayoutOrder = l_LayoutOrder_0,
                            Position = l_Position_0,
                            RenderTopContent = v126,
                            RequestNextPage = v127.fetchNextPage,
                            Size = l_Size_0,
                            CanInsertAsset = l_CanInsertAsset_1,
                            OnAssetPreviewButtonClicked = l_OnAssetPreviewButtonClicked_1,
                            OnSearchByCreator = if not v2() then nil else l_props_5.OnSearchByCreator,
                            LogAssetImpression = l_props_5.LogAssetImpression,
                            TryInsert = l_TryInsert_1,
                            TryOpenAssetConfig = l_TryOpenAssetConfig_1
                        });
                    end;
                end
            })
        });
    else
        return v6.createElement(l_Pane_0, {});
    end;
end;
mapStateToProps = function(v128, _)
    v128 = v128 or {};
    local v130 = v128.pageInfo or {};
    return {
        IncludeUnverifiedCreators = v130.includeUnverifiedCreators,
        hasTutorialLimits = v128.tutorialLimits.assetIds ~= nil,
        qualityFilterData = if not v3() then nil else v130.qualityFilterData
    };
end;
return v7.connect(mapStateToProps, function(v131)
    return {
        getAssetPreviewDataForStartup = function(v132, v133, v134, v135, v136)
            v131(v32(v132, v133, v134, v135, v136));
        end,
        requestSearchRequest = function(v137, v138, v139, v140)
            v131(v33(v137, v138, v139, v140, true));
        end,
        logSearchAnalytics = function(v141, _)
            v131(v34(v141, true));
        end
    };
end)((l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Settings = v11,
    Stylizer = l_ContextServices_0.Stylizer,
    Network = v13
})(v39)));


local v0 = require(script.Parent.Parent.Parent.Parent.Packages.Roact);
local v1 = v0.PureComponent:extend("HorizontalList");
v1.render = function(v2)
    local v3 = v2.props.Data or {};
    local l_OnRenderItem_0 = v2.props.OnRenderItem;
    local l_Position_0 = v2.props.Position;
    local l_LayoutOrder_0 = v2.props.LayoutOrder;
    local l_DisplayCount_0 = v2.props.DisplayCount;
    local v8 = {
        Layout = v0.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Horizontal,
            SortOrder = Enum.SortOrder.LayoutOrder,
            Padding = UDim.new(0, 8)
        })
    };
    local v9 = 0;
    for v10, v11 in pairs(v3) do
        local l_v9_0 = v9;
        if typeof(v11) == "table" and v11.index ~= nil then
            l_v9_0 = v11.index;
        end;
        if l_v9_0 < l_DisplayCount_0 then
            v9 = v9 + 1;
            v8[tostring(v10)] = l_OnRenderItem_0(v10, v11);
        end;
    end;
    return v0.createElement("Frame", {
        LayoutOrder = l_LayoutOrder_0,
        AutomaticSize = Enum.AutomaticSize.Y,
        Size = UDim2.fromScale(1, 0),
        Position = l_Position_0,
        BackgroundTransparency = 1
    }, v8);
end;
return v1;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local l_Packages_0 = l_script_FirstAncestor_0.Packages;
local v2 = require(l_Packages_0.Framework);
local v3 = require(l_Packages_0.Roact);
local v4 = require(l_script_FirstAncestor_0.Core.Util.LayoutOrderIterator);
local _ = require(l_script_FirstAncestor_0.Core.Util.multiLanguageUtils);
local l_ContextServices_0 = v2.ContextServices;
local l_HoverArea_0 = v2.UI.HoverArea;
local l_Pane_0 = v2.UI.Pane;
local l_TextLabel_0 = v2.UI.TextLabel;
local l_withContext_0 = l_ContextServices_0.withContext;
local v11 = v3.PureComponent:extend("IconTile");
v11.defaultProps = {
    Size = UDim2.fromScale(0, 0),
    AutomaticSize = Enum.AutomaticSize.XY
};
v11.init = function(v12)
    v12.state = {
        isHovered = false
    };
    v12.onMouseEnter = function()
        v12:setState(function(v13)
            if v13.isHovered then
                return ;
            else
                return {
                    isHovered = true
                };
            end;
        end);
    end;
    v12.onMouseLeave = function()
        v12:setState(function(v14)
            if not v14.isHovered then
                return ;
            else
                return {
                    isHovered = false
                };
            end;
        end);
    end;
    v12.onClick = function()
        local l_props_0 = v12.props;
        if l_props_0.OnClick ~= nil then
            l_props_0.OnClick(l_props_0.Key);
        end;
    end;
    v12.onAbsoluteSizeChanged = function(v16)
        local l_props_1 = v12.props;
        if l_props_1.OnAbsoluteSizeChanged then
            l_props_1.OnAbsoluteSizeChanged(v16.AbsoluteSize);
        end;
    end;
end;
v11.render = function(v18)
    local l_props_2 = v18.props;
    local l_state_0 = v18.state;
    local l_iconTile_0 = l_props_2.Stylizer.iconTile;
    local v22 = v4.new();
    return v3.createElement(l_Pane_0, {
        BackgroundColor = l_props_2.BackgroundColor,
        LayoutOrder = l_props_2.LayoutOrder,
        AutomaticSize = l_props_2.AutomaticSize,
        Size = l_props_2.Size,
        OnClick = v18.onClick,
        [v3.Event.MouseEnter] = v18.onMouseEnter,
        [v3.Event.MouseLeave] = v18.onMouseLeave,
        [v3.Change.AbsoluteSize] = v18.onAbsoluteSizeChanged
    }, {
        UICorner = v3.createElement("UICorner", {
            CornerRadius = UDim.new(0, 4)
        }),
        DarkOverlay = l_state_0.isHovered and v3.createElement(l_Pane_0, {
            BackgroundTransparency = l_iconTile_0.overlayTransparency,
            BackgroundColor = l_iconTile_0.overlayColor,
            ZIndex = 2
        }, {
            UICorner = v3.createElement("UICorner", {
                CornerRadius = UDim.new(0, 4)
            })
        }),
        Contents = v3.createElement(l_Pane_0, {
            AutomaticSize = Enum.AutomaticSize.XY,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            Layout = Enum.FillDirection.Vertical,
            Padding = l_iconTile_0.padding,
            Spacing = l_iconTile_0.spacing
        }, {
            Title = v3.createElement(l_TextLabel_0, {
                AutomaticSize = Enum.AutomaticSize.XY,
                Font = l_iconTile_0.font,
                LayoutOrder = v22:getNextOrder(),
                Text = l_props_2.Title,
                TextColor = l_iconTile_0.textColor,
                TextSize = l_iconTile_0.textSize,
                TextTruncate = Enum.TextTruncate.AtEnd,
                TextXAlignment = Enum.TextXAlignment.Left
            }),
            ImageIcon = v3.createElement("ImageLabel", {
                BackgroundTransparency = 1,
                Image = l_props_2.Image,
                LayoutOrder = v22:getNextOrder(),
                Size = UDim2.fromOffset(63, 63)
            })
        }),
        UIGradientContainer = v3.createElement("Frame", {
            BackgroundColor3 = l_props_2.BackgroundColor,
            BackgroundTransparency = 0.7,
            ClipsDescendants = true,
            Size = UDim2.fromScale(1, 1),
            ZIndex = -1
        }, {
            UIGradient = v3.createElement("UIGradient", {
                Transparency = NumberSequence.new({
                    NumberSequenceKeypoint.new(0, 0),
                    NumberSequenceKeypoint.new(1, 1)
                }),
                Rotation = -90,
                Color = if not l_props_2.BackgroundColor then nil else ColorSequence.new({
                    ColorSequenceKeypoint.new(0, l_iconTile_0.gradientColor),
                    ColorSequenceKeypoint.new(1, l_props_2.BackgroundColor)
                })
            })
        }),
        HoverArea = l_props_2.OnClick and v3.createElement(l_HoverArea_0, {
            Cursor = "PointingHand",
            Size = UDim2.fromScale(1, 1)
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v11));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Packages.Framework);
local v3 = require(l_script_FirstAncestor_0.Packages.Dash);
local v4 = require(l_script_FirstAncestor_0.Core.Components.AssetGrid);
local _ = require(l_script_FirstAncestor_0.Core.Components.AssetLogicWrapper);
local v6 = require(l_script_FirstAncestor_0.Core.Components.Audio.AudioScrollerWrapper);
local v7 = require(l_script_FirstAncestor_0.Core.Types.Category);
local v8 = require(l_script_FirstAncestor_0.Core.Util.Constants);
local v9 = require(l_script_FirstAncestor_0.Core.Localization.getLocalizedCategoryMap);
local _ = require(l_script_FirstAncestor_0.Core.Types.HomeTypes);
local v11 = require(l_script_FirstAncestor_0.Core.ContextServices.NetworkContext);
local v12 = require(l_script_FirstAncestor_0.Core.Components.ResultsFetcher);
local v13 = require(l_script_FirstAncestor_0.Core.Types.Sort);
local v14 = require(l_script_FirstAncestor_0.Core.Hooks.useSelector);
local v15 = require(l_script_FirstAncestor_0.Core.Hooks.useContextualAssets);
local v16 = require(l_script_FirstAncestor_0.Core.Util.SharedFlags.getFFlagToolboxFixInventoryGridSearch);
local v17 = require(l_script_FirstAncestor_0.Core.Flags.getFFlagQualityFiltersInToolboxSearch);
local v18 = require(l_script_FirstAncestor_0.Core.Flags.getFFlagQualityFiltersFixInResultsView);
local l_LoadingIndicator_0 = v2.UI.LoadingIndicator;
local l_LinkText_0 = v2.UI.LinkText;
local l_useCallback_0 = v1.useCallback;
local l_TOOLBOX_ITEM_SEARCH_LIMIT_0 = v8.TOOLBOX_ITEM_SEARCH_LIMIT;
local v23 = {
    Size = UDim2.new(1, 0, 0, 0),
    Category = v7.FREE_MODELS.name,
    SearchTerm = nil,
    SectionName = nil,
    SortName = v13.getDefaultSortNameForCategory(v7.FREE_MODELS.name)
};
local function v25(v24)
    return v24.pageInfo or {};
end;
return function(v26)
    local v27 = v3.join(v23, v26);
    local v28 = v2.ContextServices.Localization:use();
    local v29 = v2.ContextServices.Stylizer:use();
    local v30 = v11:use();
    local v31 = v14(v25);
    local v32 = v15();
    local v33 = l_useCallback_0(function()
        return v1.createElement(l_LinkText_0, {
            LayoutOrder = 1,
            OnClick = v27.OnClickBack,
            Style = "Unobtrusive",
            Text = "< " .. v28:getText("General", "BackToHome", {
                assetType = v9(v28)[v27.CategoryName]
            })
        });
    end, {
        v28,
        v27.CategoryName,
        v27.OnClickBack
    });
    return v12.Generator({
        assetsInCameraViewport = if v27.SectionName == v8.CONTEXTUAL_RECOMMENDATIONS_HOME_CONFIG_SECTION_NAME then v32.assetsInCameraViewport else nil,
        assetsInCameraVicinity = if v27.SectionName == v8.CONTEXTUAL_RECOMMENDATIONS_HOME_CONFIG_SECTION_NAME then v32.assetsInCameraVicinity else nil,
        networkInterface = v30.networkInterface,
        categoryName = v27.CategoryName,
        sectionName = v27.SectionName,
        sortName = v27.SortName,
        searchTerm = v27.SearchTerm,
        queryParams = v27.QueryParams,
        initialPageSize = l_TOOLBOX_ITEM_SEARCH_LIMIT_0,
        includeUnverifiedCreators = v31.includeUnverifiedCreators,
        searchSource = v27.SearchSource,
        qualityFilterData = if not not v17() and v18() then v31.qualityFilterData else nil,
        render = l_useCallback_0(function(v34)
            if v34.loading and #v34.assetIds == 0 then
                return v1.createElement("Frame", {
                    BackgroundColor3 = v29.backgroundColor,
                    LayoutOrder = v27.LayoutOrder,
                    Position = v27.Position,
                    Size = v27.Size
                }, {
                    LoadingIndicator = v1.createElement(l_LoadingIndicator_0, {
                        AnchorPoint = Vector2.new(0.5, 0.5),
                        Position = UDim2.new(0.5, 0, 0.5, 0)
                    })
                });
            elseif not v7.categoryIsAudio(v27.CategoryName) then
                return v4({
                    AssetIds = v34.assetIds,
                    AssetMap = v34.assetMap,
                    LayoutOrder = v27.LayoutOrder,
                    Position = v27.Position,
                    RenderTopContent = v33,
                    RequestNextPage = v34.fetchNextPage,
                    Size = v27.Size,
                    CanInsertAsset = v27.CanInsertAsset,
                    LogAssetImpression = v27.LogAssetImpression,
                    OnAssetPreviewButtonClicked = v27.OnAssetPreviewButtonClicked,
                    OnSearchByCreator = if not v16() then nil else v27.OnSearchByCreator,
                    TryInsert = v27.TryInsert,
                    TryOpenAssetConfig = v27.TryOpenAssetConfig
                });
            else
                return v1.createElement(v6, {
                    ResultsState = v34,
                    PageSize = l_TOOLBOX_ITEM_SEARCH_LIMIT_0,
                    RenderTopContent = v33,
                    SwimlaneName = v27.SwimlaneName,
                    AssetLogicWrapperProps = {
                        CanInsertAsset = v27.CanInsertAsset,
                        LogAssetImpression = v27.LogAssetImpression,
                        OnAssetPreviewButtonClicked = v27.OnAssetPreviewButtonClicked,
                        TryInsert = v27.TryInsert,
                        TryOpenAssetConfig = v27.TryOpenAssetConfig
                    }
                });
            end;
        end, {})
    });
end;


local l_Packages_0 = script:FindFirstAncestor("Toolbox").Packages;
local v1 = require(l_Packages_0.Framework);
local v2 = require(l_Packages_0.Roact);
local l_ContextServices_0 = v1.ContextServices;
local l_HoverArea_0 = v1.UI.HoverArea;
local l_withContext_0 = l_ContextServices_0.withContext;
local v6 = v2.PureComponent:extend("SearchPill");
v6.init = function(v7)
    v7.state = {
        isHovered = false
    };
    v7.onMouseEnter = function()
        v7:setState(function(v8)
            if v8.isHovered then
                return v8;
            else
                return {
                    isHovered = true
                };
            end;
        end);
    end;
    v7.onMouseLeave = function()
        v7:setState(function(v9)
            if not v9.isHovered then
                return v9;
            else
                return {
                    isHovered = false
                };
            end;
        end);
    end;
    v7.onClick = function()
        local l_props_0 = v7.props;
        if l_props_0.OnClick ~= nil then
            l_props_0.OnClick(l_props_0.Text);
        end;
    end;
end;
v6.render = function(v11)
    local l_props_1 = v11.props;
    local l_Stylizer_0 = l_props_1.Stylizer;
    local l_AutomaticSize_0 = l_props_1.AutomaticSize;
    local l_LayoutOrder_0 = l_props_1.LayoutOrder;
    local l_OnClick_0 = l_props_1.OnClick;
    local l_Size_0 = l_props_1.Size;
    local l_Text_0 = l_props_1.Text;
    local l_isHovered_0 = v11.state.isHovered;
    local l_searchPill_0 = l_Stylizer_0.searchPill;
    local v21 = nil;
    v21 = if not l_isHovered_0 then l_searchPill_0.backgroundColor else l_searchPill_0.backgroundColorHovered;
    local v22 = if not l_Size_0 then l_searchPill_0.padding.left + l_searchPill_0.padding.right else 0;
    return v2.createElement("TextButton", {
        AutomaticSize = l_AutomaticSize_0,
        AutoButtonColor = false,
        BackgroundColor3 = v21,
        ClipsDescendants = true,
        Font = l_searchPill_0.font,
        LayoutOrder = l_LayoutOrder_0,
        Size = l_Size_0,
        Text = l_Text_0,
        TextColor3 = l_searchPill_0.textColor,
        TextSize = l_searchPill_0.textSize,
        [v2.Event.Activated] = v11.onClick,
        [v2.Event.MouseEnter] = v11.onMouseEnter,
        [v2.Event.MouseLeave] = v11.onMouseLeave
    }, {
        UICorner = v2.createElement("UICorner", {
            CornerRadius = UDim.new(0, 14)
        }),
        UIPadding = v2.createElement("UIPadding", {
            PaddingBottom = UDim.new(0, l_searchPill_0.padding.bottom),
            PaddingLeft = UDim.new(0, v22),
            PaddingRight = UDim.new(0, v22),
            PaddingTop = UDim.new(0, l_searchPill_0.padding.top)
        }),
        HoverArea = l_OnClick_0 and v2.createElement(l_HoverArea_0, {
            Cursor = "PointingHand",
            Size = UDim2.new(1, 0, 1, 0)
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v6));


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.Types.Sort);
local v5 = require(l_Packages_0.RoactRodux);
local v6 = require(l_Packages_0.Dash);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v9 = require(l_script_FirstAncestor_0.Core.ContextServices.NetworkContext);
local l_LinkText_0 = v3.UI.LinkText;
local l_Pane_0 = v3.UI.Pane;
local _ = require(l_script_FirstAncestor_0.Core.Components.AssetLogicWrapper);
local v13 = require(l_script_FirstAncestor_0.Core.Components.Categorization.AssetSwimlane);
local _ = require(l_script_FirstAncestor_0.Core.Types.HomeTypes);
local v15 = require(l_script_FirstAncestor_0.Core.Util.Layouter);
local v16 = require(l_script_FirstAncestor_0.Core.Localization.getLocalizedCategoryMap);
local _ = require(l_script_FirstAncestor_0.Core.Models.AssetInfo);
local l_ScrollingFrame_0 = v3.UI.ScrollingFrame;
local v19 = require(l_script_FirstAncestor_0.Core.Util.Constants);
local l_withAbsoluteSizeAndPosition_0 = v3.Wrappers.withAbsoluteSizeAndPosition;
local v21 = require(l_script_FirstAncestor_0.Core.Util.SharedFlags.getFFlagToolboxFixInventoryGridSearch);
local v22 = require(l_script_FirstAncestor_0.Core.Flags.getFFlagQualityFiltersInToolboxSearch);
local v23 = v2.PureComponent:extend("SubcategoriesSwimlaneView");
v23.defaultProps = {
    Size = UDim2.new(1, 0, 1, 0)
};
v23.init = function(v24)
    v24.onClickBack = function(_)
        local l_OnClickBack_0 = v24.props.OnClickBack;
        if l_OnClickBack_0 then
            l_OnClickBack_0();
        end;
    end;
    v24.onClickSeeAllAssets = function(_, _, _, _, v31)
        local l_props_0 = v24.props;
        local l_CategoryName_0 = l_props_0.CategoryName;
        local l_OnClickSeeAllAssets_0 = l_props_0.OnClickSeeAllAssets;
        local l_SortName_0 = l_props_0.SortName;
        if l_OnClickSeeAllAssets_0 then
            l_OnClickSeeAllAssets_0(nil, l_CategoryName_0, l_SortName_0, nil, v31.queryParams);
        end;
    end;
    v24.renderSwimlanes = function()
        local l_props_1 = v24.props;
        local _ = v24.state;
        local l_CategoryName_1 = l_props_1.CategoryName;
        local _ = l_props_1.Localization;
        local _ = l_props_1.Size;
        local _ = l_props_1.SectionName;
        local v42 = l_props_1.SortName or v4.getDefaultSortNameForCategory(l_CategoryName_1);
        local l_SubcategoryDict_0 = l_props_1.SubcategoryDict;
        local _ = l_props_1.Stylizer;
        local l_IncludeUnverifiedCreators_0 = l_props_1.IncludeUnverifiedCreators;
        local l_CanInsertAsset_0 = l_props_1.CanInsertAsset;
        local l_TryInsert_0 = l_props_1.TryInsert;
        local l_TryOpenAssetConfig_0 = l_props_1.TryOpenAssetConfig;
        local l_OnClickSeeAllAssets_1 = l_props_1.OnClickSeeAllAssets;
        local v50 = v15.getSwimlaneWidth(l_props_1.AbsoluteSize.X);
        local l_OnAssetPreviewButtonClicked_0 = l_props_1.OnAssetPreviewButtonClicked;
        local v52 = {};
        local v54 = v6.reduce(l_SubcategoryDict_0, function(v53)
            return v53 + 1;
        end, 1);
        for v55, v56 in pairs(l_SubcategoryDict_0) do
            v52["AssetSwimlane_" .. v55] = v2.createElement(v13, {
                CanInsertAsset = l_CanInsertAsset_0,
                CategoryName = l_CategoryName_1,
                SwimlaneCategory = v56.name,
                OnClickSeeAll = function(v57, v58, v59, _)
                    return v24.onClickSeeAllAssets(v57, v58, v59, nil, v56, v56.queryParams);
                end,
                NetworkInterface = l_props_1.Network.networkInterface,
                ShouldLogAssetOnMount = false,
                SortName = v42,
                SearchTerm = v56.searchKeywords,
                IncludeUnverifiedCreators = l_IncludeUnverifiedCreators_0,
                QualityFilterData = if not v22() then nil else l_props_1.QualityFilterData,
                QueryParams = v56.queryParams,
                InitialPageSize = 20,
                LayoutOrder = v56.index,
                LogAssetImpression = l_props_1.LogAssetImpression,
                OnClickSeeAllAssets = l_OnClickSeeAllAssets_1,
                OnAssetPreviewButtonClicked = l_OnAssetPreviewButtonClicked_0,
                OnSearchByCreator = if not v21() then nil else l_props_1.OnSearchByCreator,
                PathName = v56.name,
                ParentAbsolutePosition = l_props_1.AbsolutePosition,
                ParentAbsoluteSize = l_props_1.AbsoluteSize,
                SwimlaneWidth = v50,
                Title = v56.displayName,
                TryInsert = l_TryInsert_0,
                TryOpenAssetConfig = l_TryOpenAssetConfig_0,
                ZIndex = v54 - v56.index,
                searchSource = v19.SEARCH_SOURCE.CATEGORY
            });
        end;
        return v52;
    end;
end;
v23.render = function(v61)
    local l_props_2 = v61.props;
    local l_CategoryName_2 = l_props_2.CategoryName;
    local l_LayoutOrder_0 = l_props_2.LayoutOrder;
    local l_Localization_1 = l_props_2.Localization;
    local l_Size_1 = l_props_2.Size;
    local _ = l_props_2.SectionName;
    if not l_props_2.SortName then
        local _ = v4.getDefaultSortNameForCategory(l_CategoryName_2);
    end;
    local _ = l_props_2.SubcategoryDict;
    local l_Stylizer_1 = l_props_2.Stylizer;
    local _ = l_props_2.CanInsertAsset;
    local _ = l_props_2.TryInsert;
    local _ = l_props_2.TryOpenAssetConfig;
    local _ = l_props_2.OnClickSeeAllAssets;
    return v2.createElement(l_Pane_0, v6.join({
        BackgroundColor3 = l_Stylizer_1.backgroundColor,
        LayoutOrder = l_LayoutOrder_0,
        Size = l_Size_1
    }, l_props_2.WrapperProps), {
        ScrollingFrame = v2.createElement(l_ScrollingFrame_0, {
            AutoSizeCanvas = true,
            EnableScrollBarBackground = true,
            LayoutOrder = l_LayoutOrder_0,
            Padding = v19.MAIN_VIEW_PADDING,
            Size = l_Size_1
        }, {
            Contents = v2.createElement(l_Pane_0, {
                AutomaticSize = Enum.AutomaticSize.Y,
                BackgroundColor3 = l_Stylizer_1.backgroundColor,
                HorizontalAlignment = Enum.HorizontalAlignment.Left,
                Layout = Enum.FillDirection.Vertical,
                LayoutOrder = 2,
                Spacing = 20,
                Size = UDim2.new(1, 0, 0, 0),
                VerticalAlignment = Enum.VerticalAlignment.Top
            }, v6.join({
                BackButton = v2.createElement(l_LinkText_0, {
                    LayoutOrder = -1,
                    OnClick = v61.onClickBack,
                    Style = "Unobtrusive",
                    Text = "< " .. l_Localization_1:getText("General", "BackToHome", {
                        assetType = v16(l_Localization_1)[l_props_2.CategoryName]
                    })
                })
            }, (v61.renderSwimlanes())))
        })
    });
end;
mapStateToProps = function(v75, _)
    local v77 = (v75 or {}).pageInfo or {};
    return {
        IncludeUnverifiedCreators = v77.includeUnverifiedCreators,
        QualityFilterData = if not v22() then nil else v77.qualityFilterData
    };
end;
return l_withAbsoluteSizeAndPosition_0((v5.connect(mapStateToProps)((l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer,
    Network = v9
})(v23)))));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.Roact);
local v2 = require(l_script_FirstAncestor_0.Core.Util.MockWrapper);
local v3 = require(l_script_FirstAncestor_0.Core.Types.Category);
local v4 = require(script.Parent.SubcategoriesSwimlaneView);
return {
    summary = "A grid of Subcategory IconTiles with flexible widths.",
    story = function()
        return v1.createElement(v2, {}, {
            SubcategoriesSwimlaneView = v1.createElement(v4, {
                CategoryName = v3.FREE_MODELS.name,
                OnClickBack = function()
                end,
                OnClickSeeAllAssets = function()
                end,
                SubcategoryDict = {
                    {
                        displayName = "Category",
                        children = {},
                        childCount = 0,
                        index = 1,
                        name = "1",
                        path = {},
                        thumbnail = {
                            assetId = 5657301130,
                            backgroundColor = "#32a852"
                        }
                    },
                    {
                        displayName = "Vehicle",
                        children = {},
                        childCount = 0,
                        index = 2,
                        name = "2",
                        path = {},
                        thumbnail = {
                            assetId = 5657301130,
                            backgroundColor = "#32a852"
                        }
                    },
                    {
                        displayName = "3rd",
                        children = {},
                        childCount = 0,
                        index = 3,
                        name = "3",
                        path = {},
                        thumbnail = {
                            assetId = 5657301130,
                            backgroundColor = "#32a852"
                        }
                    },
                    {
                        displayName = "4",
                        children = {},
                        childCount = 0,
                        index = 3,
                        name = "4",
                        path = {},
                        thumbnail = {
                            assetId = 5657301130,
                            backgroundColor = "#32a852"
                        }
                    },
                    {
                        displayName = "5",
                        children = {},
                        childCount = 0,
                        name = "5",
                        index = 3,
                        path = {},
                        thumbnail = {
                            assetId = 5657301130,
                            backgroundColor = "#32a852"
                        }
                    }
                }
            })
        });
    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 _ = require(l_Packages_0.Dash);
local l_Util_0 = l_script_FirstAncestor_0.Core.Util;
local _ = require(l_Util_0.LayoutOrderIterator);
local v7 = require(l_Util_0.Constants);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Array_0 = require(l_Packages_0.LuauPolyfill).Array;
local _ = require(l_script_FirstAncestor_0.Core.Util.Images);
local v12 = require(l_script_FirstAncestor_0.Core.Types.Category);
local _ = require(l_script_FirstAncestor_0.Core.Types.HomeTypes);
local v14 = require(l_script_FirstAncestor_0.Core.Components.DropdownMenu);
local v15 = v2.PureComponent:extend("CategoryDropDown");
v15.init = function(v16)
    v16.state = {
        selectedIndex = 1
    };
end;
v15.didUpdate = function(v17, v18)
    if v17.props.AudioType ~= v18.AudioType then
        v17:setState({
            selectedIndex = 1
        });
    end;
end;
v15.render = function(v19)
    local l_props_0 = v19.props;
    local l_state_0 = v19.state;
    local l_Localization_0 = l_props_0.Localization;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_OnCategorySelect_0 = l_props_0.OnCategorySelect;
    local l_AudioType_0 = l_props_0.AudioType;
    local l_selectedIndex_0 = l_state_0.selectedIndex;
    local v27 = if v12.MUSIC.name == l_AudioType_0 then l_props_0.Subcategories.music else l_props_0.Subcategories["sound-effect"];
    local v28 = {};
    table.insert(v28, {
        index = 1,
        name = if v12.MUSIC.name == l_AudioType_0 then l_Localization_0:getText("Audio.Music", "Browse") else l_Localization_0:getText("Audio.SoundEffect", "Browse")
    });
    if not (not v27 or not v27.children) then
        for v29, v30 in pairs(v27.children) do
            local v31 = v12.MUSIC.name == l_AudioType_0 and "Audio.Music.Genre" or "Audio.SoundEffect.Category";
            if not v30.hidden then
                table.insert(v28, {
                    name = l_Localization_0:getText(v31, v29),
                    subcategory = v30,
                    index = v30.index + 1
                });
            end;
        end;
    end;
    v28 = l_Array_0.sort(v28, function(v32, v33)
        return v32.index - v33.index;
    end);
    return v2.createElement(v14, {
        Size = UDim2.new(1, 0, 0, 40),
        visibleDropDownCount = 5,
        selectedDropDownIndex = l_selectedIndex_0,
        fontSize = v7.FONT_SIZE_LARGE,
        items = v28,
        onItemClicked = function(v34)
            v19:setState({
                selectedIndex = v34
            });
            l_OnCategorySelect_0(v28[v34].subcategory);
        end,
        setDropdownHeight = function()
            return 152;
        end,
        LayoutOrder = l_LayoutOrder_0
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization
})(v15));


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_ContextServices_0 = require(l_Packages_0.Framework).ContextServices;
local _ = l_Parent_0.Core.Util;
local v5 = require(l_Parent_0.Core.ContextServices.ModalContext);
local l_withContext_0 = l_ContextServices_0.withContext;
local v7 = v2.PureComponent:extend("ClickEventDetectFrame");
v7.getScrollBlocker = function(_, v9)
    return v2.createElement("ScrollingFrame", {
        Size = UDim2.new(1, 0, 1, 0),
        ScrollingEnabled = true,
        CanvasSize = UDim2.new(1, 0, 1, 0),
        BackgroundTransparency = 1,
        BorderSizePixel = 0,
        ScrollBarThickness = 0
    }, v9);
end;
v7.getClickDetectFrameWithWindow = function(v10, v11, v12)
    local v13 = {
        ScrollBlocker = v10:getScrollBlocker()
    };
    return v2.createElement("Frame", {
        ZIndex = 10,
        Position = UDim2.new(0, 0, 0, 0),
        Size = UDim2.new(1, 0, 1, 0),
        BackgroundTransparency = 1
    }, {
        Top = v2.createElement("ImageButton", {
            AutoButtonColor = false,
            BackgroundTransparency = 1,
            Position = UDim2.new(0, 0, 0, 0),
            Size = UDim2.new(1, 0, 0, v11.Y),
            [v2.Event.Activated] = v10.props[v2.Event.Activated]
        }, v13),
        Left = v2.createElement("ImageButton", {
            AutoButtonColor = false,
            BackgroundTransparency = 1,
            Position = UDim2.new(0, 0, 0, v11.Y),
            Size = UDim2.new(0, v11.X, 0, v12.Y),
            [v2.Event.Activated] = v10.props[v2.Event.Activated]
        }, v13),
        Right = v2.createElement("ImageButton", {
            AutoButtonColor = false,
            BackgroundTransparency = 1,
            Position = UDim2.new(0, v11.X + v12.X, 0, v11.Y),
            Size = UDim2.new(1, -(v11.X + v12.X), 0, v12.Y),
            [v2.Event.Activated] = v10.props[v2.Event.Activated]
        }, v13),
        Bottom = v2.createElement("ImageButton", {
            AutoButtonColor = false,
            BackgroundTransparency = 1,
            Position = UDim2.new(0, 0, 0, v11.Y + v12.Y),
            Size = UDim2.new(1, 0, 1, -(v11.Y + v12.Y)),
            [v2.Event.Activated] = v10.props[v2.Event.Activated]
        }, v13),
        Content = v2.createElement("Frame", {
            BackgroundTransparency = 1,
            Position = UDim2.new(0, 0, 0, 0),
            Size = UDim2.new(1, 0, 1, 0)
        }, v10.props[v2.Children])
    });
end;
v7.getClickDetectFrame = function(v14)
    return v2.createElement("ImageButton", {
        ZIndex = 10,
        Position = UDim2.new(0, 0, 0, 0),
        Size = UDim2.new(1, 0, 1, 0),
        BackgroundTransparency = 1,
        AutoButtonColor = false,
        [v2.Event.Activated] = v14.props[v2.Event.Activated]
    }, {
        ScrollBlocker = v14:getScrollBlocker(v14.props[v2.Children])
    });
end;
v7.render = function(v15)
    local l_props_0 = v15.props;
    local l_modalTarget_0 = l_props_0.Modal.modalTarget;
    local v18 = l_props_0.windowPosition or UDim2.new(0, 0, 0, 0);
    local l_windowSize_0 = l_props_0.windowSize;
    local _ = nil;
    return l_modalTarget_0 and v2.createElement(v2.Portal, {
        target = l_modalTarget_0
    }, {
        ClickEventDetectFrame = if not l_windowSize_0 then v15:getClickDetectFrame() else v15:getClickDetectFrameWithWindow(v18, l_windowSize_0)
    });
end;
return (l_withContext_0({
    Modal = v5
})(v7));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Packages.Framework);
local v3 = require(l_script_FirstAncestor_0.Core.Util.Urls);
local v4 = require(l_script_FirstAncestor_0.Core.Util.LayoutOrderIterator);
local v5 = require(l_script_FirstAncestor_0.Core.Types.ThumbnailTypes);
local l_Pane_0 = v2.UI.Pane;
local l_TextLabel_0 = v2.UI.TextLabel;
local l_Stylizer_0 = v2.ContextServices.Stylizer;
return function(v9)
    local v10 = v1.useMemo(function()
        if v9.CreatorType == Enum.CreatorType.Group then
            return v5.Icon.GroupIcon;
        else
            return v5.Icon.AvatarHeadShot;
        end;
    end, {
        v9.CreatorType
    });
    local v11 = l_Stylizer_0:use();
    local v12 = v4.new();
    return v1.createElement(l_Pane_0, {
        AutomaticSize = Enum.AutomaticSize.XY,
        Layout = Enum.FillDirection.Horizontal,
        LayoutOrder = v9.LayoutOrder,
        Spacing = v11.creatorLabel.spacingUnit
    }, {
        Thumbnail = v1.createElement("ImageLabel", {
            BackgroundColor3 = v11.creatorLabel.thumbnailBackgroundColor,
            Image = v3.constructAssetThumbnailUrl(v9.CreatorId, 150, 150, v10),
            LayoutOrder = v12:getNextOrder(),
            Size = UDim2.fromOffset(v11.creatorLabel.textSize, v11.creatorLabel.textSize)
        }, {
            Corner = v1.createElement("UICorner", {
                CornerRadius = if v9.CreatorType == Enum.CreatorType.User then UDim.new(0.5, 0) else UDim.new(0, v11.creatorLabel.spacingUnit / 2)
            })
        }),
        Name = v1.createElement(l_TextLabel_0, {
            AutomaticSize = Enum.AutomaticSize.XY,
            Font = v11.creatorLabel.font,
            LayoutOrder = v12:getNextOrder(),
            Text = v9.CreatorName,
            TextColor = v11.creatorLabel.textColor,
            TextSize = v11.creatorLabel.textSize
        })
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local l_Players_0 = game:GetService("Players");
local l_GroupService_0 = game:GetService("GroupService");
local v3 = require(l_script_FirstAncestor_0.Packages.React);
local v4 = require(l_script_FirstAncestor_0.Stories.ToolboxStoryWrapper);
local v5 = require(script.Parent.CreatorLabel);
return {
    controls = {
        CreatorType = {
            Enum.CreatorType.User,
            Enum.CreatorType.Group
        }
    },
    story = function(v6)
        local v7 = nil;
        local v8 = nil;
        if v6.controls.CreatorType == Enum.CreatorType.User then
            v8 = 957765952;
            v7 = l_Players_0:GetNameFromUserIdAsync(957765952);
        else
            local l_l_GroupService_0_GroupInfoAsync_0 = l_GroupService_0:GetGroupInfoAsync(1208727);
            v8 = 1208727;
            v7 = l_l_GroupService_0_GroupInfoAsync_0.Name;
        end;
        return v3.createElement(v4, {}, {
            CreatorLabel = v3.createElement(v5, {
                CreatorId = v8,
                CreatorName = v7,
                CreatorType = v6.controls.CreatorType
            })
        });
    end
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Packages.Framework);
local v3 = require(l_script_FirstAncestor_0.Core.Components.CreatorLabel);
local v4 = require(l_script_FirstAncestor_0.Core.Util.Images);
local v5 = require(l_script_FirstAncestor_0.Core.Util.LayoutOrderIterator);
local l_Stylizer_0 = v2.ContextServices.Stylizer;
local l_Pane_0 = v2.UI.Pane;
return function(v8)
    local v9 = l_Stylizer_0:use();
    local v10 = UDim.new(0, v9.creatorPill.spacingUnit / 2);
    local v11 = v5.new();
    return v1.createElement(l_Pane_0, {
        AutomaticSize = Enum.AutomaticSize.XY,
        BackgroundColor3 = v9.searchPill.backgroundColor,
        Layout = Enum.FillDirection.Horizontal,
        LayoutOrder = v8.LayoutOrder,
        OnClick = v8.OnActivated,
        Padding = v10.Offset,
        Spacing = v10.Offset,
        VerticalAlignment = Enum.VerticalAlignment.Center
    }, {
        Corner = v1.createElement("UICorner", {
            CornerRadius = v10
        }),
        CreatorLabel = v1.createElement(v3, {
            CreatorId = v8.CreatorId,
            CreatorName = v8.CreatorName,
            CreatorType = v8.CreatorType,
            LayoutOrder = v11:getNextOrder()
        }),
        Close = v1.createElement("ImageLabel", {
            BackgroundTransparency = 1,
            Image = v4.CLOSE_BUTTON,
            LayoutOrder = v11:getNextOrder(),
            Size = UDim2.fromOffset(16, 16)
        })
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Toolbox");
local l_Players_0 = game:GetService("Players");
local l_GroupService_0 = game:GetService("GroupService");
local v3 = require(l_script_FirstAncestor_0.Packages.React);
local v4 = require(l_script_FirstAncestor_0.Stories.ToolboxStoryWrapper);
local v5 = require(script.Parent.CreatorPill);
return {
    controls = {
        CreatorType = {
            Enum.CreatorType.User,
            Enum.CreatorType.Group
        }
    },
    story = function(v6)
        local v7 = nil;
        local v8 = nil;
        if v6.controls.CreatorType == Enum.CreatorType.User then
            v8 = 957765952;
            v7 = l_Players_0:GetNameFromUserIdAsync(957765952);
        else
            local l_l_GroupService_0_GroupInfoAsync_0 = l_GroupService_0:GetGroupInfoAsync(1208727);
            v8 = 1208727;
            v7 = l_l_GroupService_0_GroupInfoAsync_0.Name;
        end;
        return v3.createElement(v4, {}, {
            CreatorPill = v3.createElement(v5, {
                CreatorId = v8,
                CreatorName = v7,
                CreatorType = v6.controls.CreatorType,
                OnActivated = function()
                    print("clicked");
                end
            })
        });
    end
};


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.Cryo);
local v4 = require(l_Parent_0.Core.Util.DebugFlags);
local v5 = v2.PureComponent:extend("DraggableButton");
v5.init = function(v6, v7)
    v6.clicked = false;
    v6.clickPosition = Vector2.new(0, 0);
    v6.willFireClickOnMouseUp = false;
    if v4.shouldDebugWarnings() then
        if v7[v2.Event.MouseButton1Down] then
            warn("MouseButton1Down should not be defined on DraggableButton. Use onMouseDown instead.");
        end;
        if v7[v2.Event.MouseMoved] then
            warn("MouseButton1Down should not be defined on DraggableButton. Use onMouseMoved instead.");
        end;
        if v7[v2.Event.MouseButton1Up] then
            warn("MouseButton1Up should not be defined on DraggableButton. Use onMouseUp instead.");
        end;
    end;
    v6.onMouseButton1Down = function(v8, v9, v10)
        v6.clicked = true;
        v6.clickPosition = Vector2.new(v9, v10);
        v6.willFireClickOnMouseUp = true;
        if v7.onMouseDown then
            v7.onMouseDown(v8, v9, v10);
        end;
    end;
    v6.onMouseMoved = function(v11, v12, v13)
        if not (not v6.clicked or not v6.willFireClickOnMouseUp) and (Vector2.new(v12, v13) - v6.clickPosition).magnitude > 4 then
            v6.willFireClickOnMouseUp = false;
            if v7.onDragStart then
                v7.onDragStart(v11, v12, v13);
            end;
        end;
        if v7.onMouseMoved then
            v7.onMouseMoved(v11, v12, v13);
        end;
    end;
    v6.onMouseButton1Up = function(v14, v15, v16)
        v6.clicked = false;
        v6.clickPosition = Vector2.new(v15, v16);
        if v6.willFireClickOnMouseUp then
            v6.willFireClickOnMouseUp = false;
            if v7.onClick then
                v7.onClick(v14, v15, v16);
            end;
        end;
        if v7.onMouseUp then
            v7.onMouseUp(v14, v15, v16);
        end;
    end;
end;
v5.render = function(v17)
    local _ = nil;
    return v2.createElement("ImageButton", (v3.Dictionary.join(v17.props, {
        [v2.Event.MouseButton1Down] = v17.onMouseButton1Down,
        [v2.Event.MouseMoved] = v17.onMouseMoved,
        [v2.Event.MouseButton1Up] = v17.onMouseButton1Up,
        onDragStart = v3.None,
        onClick = v3.None,
        onMouseDown = v3.None,
        onMouseMoved = v3.None,
        onMouseUp = v3.None
    })));
end;
return v5;


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.Cryo);
local v4 = require(l_Parent_0.Core.Util.Constants);
local v5 = require(l_Parent_0.Core.Util.Images);
local v6 = require(l_Parent_0.Core.Util.Immutable);
return function(v7)
    return v2.createElement("ImageLabel", ((v3.Dictionary.join or v6.JoinDictionaries)(v7, {
        BackgroundTransparency = 1,
        BorderSizePixel = 0,
        Image = v5.DROP_SHADOW_IMAGE,
        ImageColor3 = v4.DROP_SHADOW_COLOR,
        ImageTransparency = v4.DROP_SHADOW_TRANSPARENCY,
        ScaleType = Enum.ScaleType.Slice,
        SliceCenter = v4.DROP_SHADOW_SLICE_CENTER
    })));
end;


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 l_Util_0 = l_Parent_0.Core.Util;
local v5 = require(l_Util_0.Constants);
local v6 = require(l_Util_0.DebugFlags);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_GetTextSize_0 = v3.Util.GetTextSize;
local l_Components_0 = l_Parent_0.Core.Components;
local v11 = require(l_Components_0.StyledScrollingFrame);
local v12 = require(l_Components_0.ClickEventDetectFrame);
local v13 = require(l_Components_0.RoundFrame);
local v14 = require(l_Parent_0.Core.Util.SharedFlags.getFFlagToolboxDropdownItemsListHoverFix);
local v15 = v2.PureComponent:extend("DropdownItemsList");
v15.init = function(v16)
    v16.state = {
        dropdownHoveredItemIndex = 0
    };
    v16.onDropdownItemMouseEntered = function(v17)
        if not v14() then
            v16:setState({
                dropdownHoveredItemIndex = v17
            });
            return ;
        else
            v16:setState(function(v18)
                if v18.dropdownHoveredItemIndex == v17 then
                    return ;
                else
                    return {
                        dropdownHoveredItemIndex = v17
                    };
                end;
            end);
            return ;
        end;
    end;
    v16.onDropdownItemMouseLeft = function(v19)
        if not v14() then
            if v16.state.dropdownHoveredItemIndex == v19 then
                v16:setState({
                    dropdownHoveredItemIndex = 0
                });
            end;
            return ;
        else
            v16:setState(function(v20)
                if v20.dropdownHoveredItemIndex == v19 then
                    return {
                        dropdownHoveredItemIndex = 0
                    };
                else
                    return ;
                end;
            end);
            return ;
        end;
    end;
    v16.onDropdownItemActivated = function(v21, v22, v23)
        if v23 then
            v23(v21, v22);
        end;
    end;
    v16.lastReportedHeight = nil;
end;
local function _(v24)
    local v25 = true;
    if v24.selectable ~= nil then
        v25 = v24.selectable;
    end;
    return v25;
end;
v15.getScrollButtons = function(v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37)
    local l_isDarkerTheme_0 = v37.isDarkerTheme;
    local l_dropdownMenu_0 = v37.dropdownMenu;
    local l_item_0 = l_dropdownMenu_0.item;
    local v41 = {
        UIListLayout = v2.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Vertical,
            SortOrder = Enum.SortOrder.LayoutOrder
        })
    };
    for v42, v43 in ipairs(v28) do
        if not (v43.name or not v6.shouldDebugWarnings()) then
            warn(("Index %d in DropdownMenu doesn't have a 'name' member"):format(v42));
        end;
        local v44 = true;
        if v43.selectable ~= nil then
            v44 = v43.selectable;
        end;
        local v45 = not not v44 and l_item_0.textColor or l_item_0.labelTextColor;
        local l_name_0 = v43.name;
        local v47 = false;
        if v29 == v42 then
            v47 = v44;
        end;
        local v48 = not not v30 and v43[v30] or l_name_0;
        v31 = math.max(v31, (l_GetTextSize_0(l_name_0, v34, nil, Vector2.new(0, 0)).X + v32 * 2) + v5.SCROLLBAR_BACKGROUND_THICKNESS);
        v41[v48 or l_name_0] = v2.createElement("ImageButton", {
            Size = UDim2.new(1, -v5.SCROLLBAR_BACKGROUND_THICKNESS + v5.SCROLLBAR_PADDING, 0, v33),
            BackgroundColor3 = not not v47 and l_item_0.backgroundSelectedColor or l_item_0.backgroundColor,
            BorderSizePixel = 0,
            LayoutOrder = v42,
            ZIndex = 2,
            AutoButtonColor = false,
            [v2.Event.Activated] = function(_, _, _)
                if v44 then
                    v27.onDropdownItemActivated(v42, v43, v35);
                end;
            end,
            [v2.Event.MouseEnter] = function(_, _, _)
                v27.onDropdownItemMouseEntered(v42);
            end,
            [v2.Event.MouseLeave] = function(_, _, _)
                v27.onDropdownItemMouseLeft(v42);
            end,
            [v2.Event.InputEnded] = v27.focusLost
        }, {
            SelectedBar = not l_isDarkerTheme_0 and v2.createElement("Frame", {
                Size = UDim2.new(0, v36, 1, 0),
                BorderSizePixel = 0,
                BackgroundColor3 = l_dropdownMenu_0.item.selectedBarColor,
                Visible = v47,
                ZIndex = 2
            }),
            TextLabel = v2.createElement("TextLabel", {
                Position = UDim2.new(0, v32, 0, 0),
                Size = UDim2.new(1, -v32, 1, 0),
                BackgroundTransparency = 1,
                Text = l_name_0,
                TextColor3 = v45,
                Font = v5.FONT,
                TextSize = v34,
                TextXAlignment = Enum.TextXAlignment.Left,
                TextYAlignment = Enum.TextYAlignment.Center,
                ClipsDescendants = true,
                ZIndex = 3
            })
        });
    end;
    return v41;
end;
v15.render = function(v58)
    local l_props_0 = v58.props;
    local l_state_0 = v58.state;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_listKey_0 = l_props_0.listKey;
    local l_left_0 = l_props_0.left;
    local l_top_0 = l_props_0.top;
    local l_dropDownWidth_0 = l_props_0.dropDownWidth;
    local v66 = l_props_0.items or {};
    local v67 = #v66;
    local v68 = math.min(l_props_0.visibleDropDownCount or 5, v67);
    local v69 = l_props_0.rowHeight or 24;
    local v70 = l_props_0.fontSize or v5.FONT_SIZE_MEDIUM;
    local l_setDropdownHeight_0 = l_props_0.setDropdownHeight;
    local l_windowPosition_0 = l_props_0.windowPosition;
    local l_windowSize_0 = l_props_0.windowSize;
    local l_onItemClicked_0 = l_props_0.onItemClicked;
    local l_DROPDOWN_SELECTED_BAR_0 = v5.DROPDOWN_SELECTED_BAR;
    local v76 = l_DROPDOWN_SELECTED_BAR_0 + v5.DROPDOWN_TEXT_INSET;
    local l_dropdownMenu_1 = l_Stylizer_0.dropdownMenu;
    local l_dropdownHoveredItemIndex_0 = l_state_0.dropdownHoveredItemIndex;
    local l_DROPDOWN_WIDTH_0 = v5.DROPDOWN_WIDTH;
    local v80 = v68 * v69;
    if l_setDropdownHeight_0 and v58.lastReportedHeight ~= v80 then
        v58.lastReportedHeight = v80;
        l_setDropdownHeight_0(v80);
    end;
    return v2.createElement(v12, {
        windowPosition = l_windowPosition_0,
        windowSize = l_windowSize_0,
        [v2.Event.Activated] = v58.props.closeDropdown
    }, {
        StyledScrollingFrame = v2.createElement(v11, {
            Position = UDim2.new(0, l_left_0, 0, l_top_0),
            Size = UDim2.new(0, l_dropDownWidth_0, 0, v80),
            CanvasSize = UDim2.new(0, 0, 0, v67 * v69),
            ZIndex = 1
        }, (v58:getScrollButtons(v66, l_dropdownHoveredItemIndex_0, l_listKey_0, l_DROPDOWN_WIDTH_0, v76, v69, v70, l_onItemClicked_0, l_DROPDOWN_SELECTED_BAR_0, l_Stylizer_0))),
        DropDownContainer = v2.createElement(v13, {
            Position = UDim2.new(0, l_left_0, 0, l_top_0),
            Size = UDim2.new(0, l_dropDownWidth_0, 0, v80),
            BackgroundTransparency = 1,
            ZIndex = 2,
            BorderColor3 = l_dropdownMenu_1.dropdownFrame.borderColor
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v15));


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 l_Util_0 = l_Parent_0.Core.Util;
local v5 = require(l_Util_0.Constants);
local v6 = require(l_Parent_0.Core.ContextServices.ModalContext);
local v7 = require(l_Util_0.Images);
local l_ShowOnTop_0 = v3.UI.ShowOnTop;
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Components_0 = l_Parent_0.Core.Components;
local v12 = require(l_Components_0.RoundButton);
local v13 = require(l_Components_0.DropdownItemsList);
local v14 = v2.PureComponent:extend("DropdownMenu");
v14.init = function(v15, _)
    v15.state = {
        isShowingDropdown = false,
        showDropDownButtonHovered = false
    };
    v15.currentSelectionRef = v2.createRef();
    v15.baseFrameRef = v2.createRef();
    v15.openDropdown = function()
        if not v15.props.Disabled then
            v15:setState(function(_, _)
                v15.props.Modal.onDropdownToggled(true);
                return {
                    isShowingDropdown = true
                };
            end);
            return ;
        else
            return ;
        end;
    end;
    v15.showDropDownButtonEntered = function()
        if not v15.props.Disabled then
            v15:setState({
                showDropDownButtonHovered = true
            });
            return ;
        else
            return ;
        end;
    end;
    v15.showDropDownButtonLeft = function()
        if not v15.props.Disabled then
            v15:setState({
                showDropDownButtonHovered = false
            });
            return ;
        else
            return ;
        end;
    end;
    v15.closeDropdown = function()
        v15.props.Modal.onDropdownToggled(false);
        v15:setState({
            isShowingDropdown = false
        });
    end;
    v15.focusLost = function(_, v20)
        if v20.UserInputType == Enum.UserInputType.Focus then
            v15.closeDropdown();
        end;
    end;
    v15.refresh = function(_)
        if v15.currentSelectionRef.current then
            local l_current_0 = v15.currentSelectionRef.current;
            local l_AbsoluteSize_0 = l_current_0.AbsoluteSize;
            local l_AbsolutePosition_0 = l_current_0.AbsolutePosition;
            local v25 = l_AbsoluteSize_0.X or v5.DROPDOWN_WIDTH;
            local v26 = (l_AbsolutePosition_0.y + l_AbsoluteSize_0.y) + 2;
            local l_x_0 = l_AbsolutePosition_0.x;
            if not (v15.state.dropDownWidth == v25 and v15.state.dropDownTop == v26) or v15.state.dropDownLeft ~= l_x_0 then
                v15:setState({
                    dropDownWidth = v25,
                    dropDownTop = v26,
                    dropDownLeft = l_x_0
                });
            end;
        end;
    end;
    v15.onItemClicked = function(v28, v29)
        if v15.props.onItemClicked then
            v15.props.onItemClicked(v28, v29);
        end;
        v15.closeDropdown();
    end;
end;
local function _(v30)
    local v31 = true;
    if v30.selectable ~= nil then
        v31 = v30.selectable;
    end;
    return v31;
end;
local function v37(v33)
    for v34, v35 in ipairs(v33) do
        local v36 = true;
        if v35.selectable ~= nil then
            v36 = v35.selectable;
        end;
        if v36 then
            return v34;
        end;
    end;
    warn("No selectable items found in DropdownMenu");
    return 1;
end;
v14.didMount = function(v38)
    v38.refresh();
end;
v14.render = function(v39)
    local l_props_0 = v39.props;
    local l_state_0 = v39.state;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_menuKey_0 = l_props_0.menuKey;
    local l_Position_0 = l_props_0.Position;
    local l_Size_0 = l_props_0.Size;
    local v46 = l_props_0.LayoutOrder or 0;
    local v47 = l_props_0.items or {};
    local v48 = math.min(l_props_0.visibleDropDownCount or 5, #v47);
    local v49 = l_props_0.rowHeight or 24;
    local v50 = l_props_0.selectedDropDownIndex or 1;
    local v51 = l_props_0.fontSize or v5.FONT_SIZE_MEDIUM;
    local l_setDropdownHeight_0 = l_props_0.setDropdownHeight;
    if #v47 < v50 then
        v50 = 0;
    end;
    local v53 = false;
    if v50 > 0 then
        v53 = false;
        if v50 <= #v47 then
            v53 = v47[v50];
            if v53 then
                local v54 = v47[v50];
                local v55 = true;
                if v54.selectable ~= nil then
                    v55 = v54.selectable;
                end;
                v53 = not v55;
            end;
        end;
    end;
    if v53 then
        v50 = v37(v47);
    end;
    local v56 = false;
    if v50 > 0 then
        v56 = v50 <= #v47;
    end;
    local v57 = l_props_0.Localization:getText("Dropdown", "ChooseOne");
    if not ((not v56 or not v47[v50]) or not v47[v50].name) then
        v57 = v47[v50].name;
    end;
    local v58 = v5.DROPDOWN_SELECTED_BAR + v5.DROPDOWN_TEXT_INSET;
    local v59 = (v5.DROPDOWN_ICON_SIZE * v51) / v5.FONT_SIZE_MEDIUM;
    local l_DROPDOWN_ICON_FROM_RIGHT_0 = v5.DROPDOWN_ICON_FROM_RIGHT;
    local l_currentSelection_0 = l_Stylizer_0.dropdownMenu.currentSelection;
    local l_showDropDownButtonHovered_0 = l_state_0.showDropDownButtonHovered;
    local l_isShowingDropdown_0 = l_state_0.isShowingDropdown;
    local v64 = l_isShowingDropdown_0 or l_showDropDownButtonHovered_0;
    return v2.createElement("Frame", {
        Position = l_Position_0,
        Size = l_Size_0,
        BackgroundTransparency = 1,
        [v2.Ref] = v39.baseFrameRef,
        LayoutOrder = v46
    }, {
        CurrentSelection = v2.createElement(v12, {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundColor3 = if not l_props_0.Disabled then if v64 then l_currentSelection_0.backgroundSelectedColor else l_currentSelection_0.backgroundColor else l_currentSelection_0.backgroundDisabledColor,
            BorderColor3 = not not v64 and l_currentSelection_0.borderSelectedColor or l_currentSelection_0.borderColor,
            [v2.Ref] = v39.currentSelectionRef,
            [v2.Event.Activated] = v39.openDropdown,
            [v2.Event.MouseEnter] = v39.showDropDownButtonEntered,
            [v2.Event.MouseLeave] = v39.showDropDownButtonLeft,
            [v2.Event.InputEnded] = v39.focusLost,
            [v2.Change.AbsolutePosition] = v39.refresh,
            [v2.Change.AbsoluteSize] = v39.refresh
        }, {
            CurrentSelectionLabel = v2.createElement("TextLabel", {
                Position = UDim2.new(0, v58, 0, 0),
                Size = UDim2.new(1, -((v58 + v59) + l_DROPDOWN_ICON_FROM_RIGHT_0), 1, 0),
                BackgroundTransparency = 1,
                TextColor3 = not not v64 and l_currentSelection_0.textSelectedColor or l_currentSelection_0.textColor,
                Text = v57,
                Font = v5.FONT,
                TextSize = v51,
                TextXAlignment = Enum.TextXAlignment.Left,
                TextYAlignment = Enum.TextYAlignment.Center,
                ClipsDescendants = true,
                TextTruncate = Enum.TextTruncate.AtEnd
            }),
            DropDownIcon = v2.createElement("ImageLabel", {
                AnchorPoint = Vector2.new(1, 0.5),
                Size = UDim2.new(0, v59, 0, v59),
                Position = UDim2.new(1, -l_DROPDOWN_ICON_FROM_RIGHT_0, 0.5, 0),
                Image = v7.ARROW_DOWN_ICON,
                Rotation = not l_isShowingDropdown_0 and 0 or 180,
                ImageColor3 = l_currentSelection_0.dropdownIconColor,
                BackgroundTransparency = 1
            })
        }),
        DropdownItemsWrapper = l_isShowingDropdown_0 and v2.createElement(l_ShowOnTop_0, {
            Priority = 2
        }, {
            DropdownItemsList = v2.createElement(v13, {
                listKey = l_menuKey_0,
                items = v47,
                visibleDropDownCount = v48,
                rowHeight = v49,
                fontSize = v51,
                onItemClicked = v39.onItemClicked,
                closeDropdown = v39.closeDropdown,
                setDropdownHeight = l_setDropdownHeight_0,
                dropDownWidth = l_state_0.dropDownWidth,
                top = l_state_0.dropDownTop,
                left = l_state_0.dropDownLeft
            })
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization,
    Modal = v6
})(v14));


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 l_ContextServices_0 = v3.ContextServices;
local l_Button_0 = v3.UI.Button;
local l_Separator_0 = v3.UI.Separator;
local v7 = v2.PureComponent:extend("DropdownMenuItem");
local l_withContext_0 = l_ContextServices_0.withContext;
local v9 = require(l_Parent_0.Core.Util.SharedFlags.getFFlagToolboxAddRecentSearchesToAutoComplete);
v7.defaultProps = {
    Size = UDim2.new(0, 200, 0, 25)
};
local function _(v10)
    return v10:gsub("[</>]", "");
end;
local function v16(v12, v13)
    local v14 = string.find(v12:lower():gsub("[</>]", ""), v13:lower():gsub("[</>]", ""), 1, true);
    local _ = nil;
    return "" .. if v14 ~= nil then string.sub(v12, 0, v14 - 1) .. "" .. string.sub(v12, v14, (v14 + string.len(v13)) - 1) .. "" .. string.sub(v12, v14 + string.len(v13), (string.len(v12))) else v12 .. "";
end;
v7.render = function(v17)
    local l_props_0 = v17.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_TextSize_0 = l_Stylizer_0.TextSize;
    local v21 = nil;
    v21 = if l_props_0.FocusedText ~= nil then v16(l_props_0.Text, l_props_0.FocusedText) else l_props_0.Text;
    return v2.createElement(l_Button_0, {
        AutomaticSize = Enum.AutomaticSize.Y,
        OnClick = l_props_0.OnClick,
        Position = l_props_0.Position,
        Size = l_props_0.Size,
        LayoutOrder = l_props_0.LayoutOrder,
        Style = if not v9() then nil else l_props_0.DropdownMenuItemButtonStyle,
        DisableHover = if not v9() then nil else l_props_0.DisableHover,
        OnMouseEnter = if not v9() then nil else l_props_0.OnMouseEnter,
        OnMouseLeave = if not v9() then nil else l_props_0.OnMouseLeave
    }, {
        Layout = v2.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Vertical,
            SortOrder = Enum.SortOrder.LayoutOrder
        }),
        ItemLabel = if not not v9() and v17.props.ItemButtonContentOverride then v2.createElement("Frame", {
            BackgroundTransparency = 1,
            Size = UDim2.fromScale(1, 1)
        }, {
            ItemLabel = v2.createElement("TextLabel", {
                BackgroundTransparency = 1,
                ClipsDescendants = true,
                Font = l_Stylizer_0.Font,
                LayoutOrder = 1,
                RichText = true,
                Size = UDim2.new(1, -40, 1, 0),
                Text = v21,
                TextColor3 = l_Stylizer_0.TextColor,
                TextSize = l_TextSize_0,
                TextTruncate = Enum.TextTruncate.AtEnd,
                TextXAlignment = Enum.TextXAlignment.Left,
                TextYAlignment = Enum.TextYAlignment.Center
            }, {
                Padding = v2.createElement("UIPadding", {
                    PaddingLeft = UDim.new(0, 10)
                })
            }),
            ButtonComponent = v17.props.ItemButtonContentOverride
        }) else v2.createElement("TextLabel", {
            BackgroundTransparency = 1,
            ClipsDescendants = true,
            Font = l_Stylizer_0.Font,
            LayoutOrder = 1,
            RichText = true,
            Size = l_props_0.Size,
            Text = v21,
            TextColor3 = l_Stylizer_0.TextColor,
            TextSize = l_TextSize_0,
            TextTruncate = Enum.TextTruncate.AtEnd,
            TextXAlignment = Enum.TextXAlignment.Left,
            TextYAlignment = Enum.TextYAlignment.Center
        }, {
            Padding = v2.createElement("UIPadding", {
                PaddingLeft = UDim.new(0, 10)
            })
        }),
        Separator = not l_props_0.HideSeparator and v2.createElement(l_Separator_0, {
            DominantAxis = Enum.DominantAxis.Width,
            LayoutOrder = 2
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v7));


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.ReactUtils);
local v4 = require(l_Packages_0.ReactSceneUnderstanding);
local l_ContextServices_0 = require(l_Packages_0.Framework).ContextServices;
local v6 = require(l_Parent_0.Core.ContextServices.ModalContext);
local v7 = require(l_Parent_0.Core.ContextServices.NetworkContext);
local v8 = require(l_Parent_0.Core.Flags.getFFlagToolboxThrottleContextualRecommendationRequests);
local v9 = v2.Component:extend("ExternalServicesWrapper");
local l_game_FastInt_0 = game:GetFastInt("ToolboxSceneAnalysisPollingSeconds");
local l_game_FastInt_1 = game:GetFastInt("ToolboxSceneAnalysisViewportMaxScreenDivisions");
local l_game_FastInt_2 = game:GetFastInt("ToolboxSceneAnalysisViewportMaxDistance");
local l_game_FastInt_3 = game:GetFastInt("ToolboxSceneAnalysisRangeMaxDistance");
local l_game_FastInt_4 = game:GetFastInt("ToolboxSceneAnalysisAssetLimit");
v9.render = function(v15)
    local l_props_0 = v15.props;
    return v2.createElement(v3.ContextStack, {
        providers = {
            v2.createElement(v4.SceneAnalysisProvider, {
                pollingSeconds = if not v8() then l_game_FastInt_0 else nil,
                rangeQueryOptions = {
                    limit = l_game_FastInt_4,
                    maxDistance = l_game_FastInt_3
                },
                viewportQueryOptions = {
                    limit = l_game_FastInt_4,
                    maxDistance = l_game_FastInt_2,
                    maxScreenDivisions = l_game_FastInt_1
                }
            })
        }
    }, l_ContextServices_0.provide({
        v6.new(l_props_0.pluginGui),
        v7.new(l_props_0.networkInterface)
    }, l_props_0[v2.Children]));
end;
return v9;


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 l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v6 = require(l_Packages_0.Dash);
local l_withAbsoluteSizeAndPosition_0 = v3.Wrappers.withAbsoluteSizeAndPosition;
local l_LayoutOrderIterator_0 = v3.Util.LayoutOrderIterator;
local l_Pane_0 = v3.UI.Pane;
local l_TextLabel_0 = v3.UI.TextLabel;
local _ = require(l_Parent_0.Core.Models.AssetInfo);
local _ = require(l_Parent_0.Core.Components.AssetLogicWrapper);
local v13 = require(l_Parent_0.Core.Util.Constants);
local v14 = require(l_Parent_0.Core.Components.Asset.Preview.PopUpWrapperButton);
local v15 = require(l_Parent_0.Core.Util.Urls);
local v16 = UDim2.new(0, -14, 0, 14);
local l_FONT_TILE_HEIGHT_0 = v13.FONT_TILE_HEIGHT;
local v18 = v2.PureComponent:extend("FontTile");
v18.defaultProps = {
    Size = UDim2.new(1, 0, 0, l_FONT_TILE_HEIGHT_0)
};
v18.init = function(v19, _)
    v19.wasAssetBoundsWithinScrollingBounds = false;
    v19.state = {
        isHovered = false
    };
    v19.onMouseEnter = function()
        v19:setState(function()
            return {
                isHovered = true
            };
        end);
    end;
    v19.onMouseLeave = function()
        v19:setState(function()
            return {
                isHovered = false
            };
        end);
    end;
    v19.logImpression = function()
        local l_props_0 = v19.props;
        local l_AssetInfo_0 = l_props_0.AssetInfo;
        if l_props_0.LogImpression then
            v19.wasAssetBoundsWithinScrollingBounds = l_props_0.LogImpression(l_AssetInfo_0, l_props_0.AbsoluteSize, l_props_0.AbsolutePosition, v19.wasAssetBoundsWithinScrollingBounds);
        end;
    end;
end;
v18.didMount = function(v23)
    local l_props_1 = v23.props;
    local l_AssetInfo_1 = l_props_1.AssetInfo;
    local l_LogImpression_0 = l_props_1.LogImpression;
    if not (not l_AssetInfo_1 or not l_LogImpression_0) then
        v23.logImpression();
    end;
end;
v18.didUpdate = function(v27, v28, _)
    local l_props_2 = v27.props;
    if not (v28.AbsolutePosition == l_props_2.AbsolutePosition and v28.ParentAbsoluteSize == l_props_2.ParentAbsoluteSize) or v28.AbsoluteSize ~= l_props_2.AbsoluteSize then
        v27.logImpression();
    end;
end;
v18.render = function(v31)
    local l_props_3 = v31.props;
    local l_state_0 = v31.state;
    local l_Asset_0 = l_props_3.AssetInfo.Asset;
    local v35 = not l_Asset_0 and "" or tostring(l_Asset_0.Id);
    local v36 = not l_Asset_0 and "" or tostring(l_Asset_0.Name);
    local v37 = v15.constructAssetThumbnailUrl(v35, 1200, 80, "FontFamily");
    local l_isHovered_0 = l_state_0.isHovered;
    local l_Stylizer_0 = l_props_3.Stylizer;
    local l_backgroundColor_0 = l_Stylizer_0.fontTile.backgroundColor;
    if l_isHovered_0 then
        l_backgroundColor_0 = l_Stylizer_0.fontTile.hoveredBackgroundColor;
    end;
    local l_textFillColor_0 = l_Stylizer_0.fontTile.textFillColor;
    local v42 = l_LayoutOrderIterator_0.new();
    return v2.createElement(l_Pane_0, v6.join({
        BackgroundColor = l_backgroundColor_0,
        BorderSizePixel = 1,
        LayoutOrder = l_props_3.LayoutOrder,
        OnClick = l_props_3.OnAssetPreviewButtonClicked,
        Padding = {
            Right = 1
        },
        Size = l_props_3.Size,
        Style = "BorderBox",
        [v2.Event.MouseEnter] = v31.onMouseEnter,
        [v2.Event.MouseLeave] = v31.onMouseLeave
    }, l_props_3.WrapperProps), {
        AssetPreviewTriggerButtonFrame = v2.createElement("Frame", {
            AnchorPoint = Vector2.new(1, 0),
            AutomaticSize = Enum.AutomaticSize.XY,
            BackgroundTransparency = 1,
            Position = UDim2.new(1, 0, 0, 0),
            ZIndex = 200
        }, {
            AssetPreviewTriggerButton = v2.createElement(v14, {
                onClick = l_props_3.OnAssetPreviewButtonClicked,
                position = v16,
                ShowIcon = l_isHovered_0
            })
        }),
        UIGradientFrame = v2.createElement("Frame", {
            AnchorPoint = Vector2.new(1, 0.5),
            BackgroundColor3 = l_backgroundColor_0,
            BorderSizePixel = 0,
            Position = UDim2.new(1, 0, 0.5, 0),
            Size = UDim2.new(0, 60, 1, -2),
            ZIndex = 100
        }, {
            UIGradient = v2.createElement("UIGradient", {
                Transparency = NumberSequence.new({
                    NumberSequenceKeypoint.new(0, 1),
                    NumberSequenceKeypoint.new(1, 0)
                })
            })
        }),
        TileComponent = v2.createElement(l_Pane_0, {
            AutomaticSize = Enum.AutomaticSize.Y,
            BackgroundTransparency = 1,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            Layout = Enum.FillDirection.Vertical,
            Padding = {
                Bottom = 12,
                Left = 10,
                Right = 0,
                Top = 12
            },
            Size = UDim2.new(1, 0, 0, 0),
            Spacing = 8
        }, {
            FontTitle = v2.createElement(l_TextLabel_0, {
                AutomaticSize = Enum.AutomaticSize.XY,
                BackgroundTransparency = 1,
                Font = v13.FONT,
                LayoutOrder = v42:getNextOrder(),
                Text = v36,
                TextSize = v13.FONT_SIZE_MEDIUM,
                TextXAlignment = Enum.TextXAlignment.Left
            }),
            FontThumbnailPane = v2.createElement(l_Pane_0, {
                AutomaticSize = Enum.AutomaticSize.Y,
                BackgroundColor = l_backgroundColor_0,
                BorderSizePixel = 0,
                ClipsDescendants = true,
                LayoutOrder = v42:getNextOrder(),
                Size = UDim2.new(1, 0, 0, 0)
            }, {
                FontThumbnail = v2.createElement("ImageLabel", {
                    BackgroundTransparency = 1,
                    Image = v37,
                    ImageColor3 = l_textFillColor_0,
                    Size = UDim2.new(0, 600, 0, 40)
                })
            })
        })
    });
end;
return l_withAbsoluteSizeAndPosition_0((l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v18)));