local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_withAbsoluteSize_0 = v4.Wrappers.withAbsoluteSize;
local l_join_0 = v4.Dash.join;
local l_withContext_0 = v4.ContextServices.withContext;
local l_LayoutOrderIterator_0 = v4.Util.LayoutOrderIterator;
local l_Stylizer_0 = v4.Style.Stylizer;
local l_UI_0 = v4.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_SplitPane_0 = l_UI_0.SplitPane;
local l_IconButton_0 = l_UI_0.IconButton;
local v14 = require(l_Parent_0.Src.Actions.SetMaterialBrowserLayout);
local v15 = require(l_Parent_0.Src.Controllers.PluginController);
local l_Components_0 = l_Parent_0.Src.Components;
local v17 = require(l_Components_0.MaterialBrowser.MaterialEditor);
local v18 = require(l_Components_0.MaterialBrowser.MaterialGrid);
local v19 = require(l_Components_0.MaterialBrowser.SideBar);
local v20 = require(l_Components_0.MaterialBrowser.TopBar);
local v21 = require(l_Parent_0.Src.Resources.Constants.getViewTypes)();
local v22 = require(l_Parent_0.Src.Flags.getFFlagMaterialActionAsTool);
local v23 = v2.PureComponent:extend("MaterialBrowser");
v23.init = function(v24)
    v24.onHideButtonClicked = function()
        local l_props_0 = v24.props;
        local v26 = l_join_0(l_props_0.MaterialBrowserLayout, {
            BaseShowSideBar = false,
            OverrideShowSideBar = false,
            SideBarWidth = 200
        });
        l_props_0.dispatchSetMaterialBrowserLayout(v26);
        l_props_0.PluginController:setMaterialBrowserLayout(v26);
    end;
    v24.onShowButtonClicked = function()
        local l_props_1 = v24.props;
        local l_MaterialBrowser_0 = l_props_1.Stylizer.MaterialBrowser;
        local v29 = l_join_0(l_props_1.MaterialBrowserLayout, {
            BaseShowSideBar = true,
            OverrideShowSideBar = l_props_1.AbsoluteSize.X < ((l_MaterialBrowser_0.MaterialTileWidth + l_MaterialBrowser_0.Padding * 2) + (not l_props_1.Material and 0 or l_MaterialBrowser_0.MaterialEditorWidth)) + l_MaterialBrowser_0.MinSideBarWidth
        });
        l_props_1.dispatchSetMaterialBrowserLayout(v29);
        l_props_1.PluginController:setMaterialBrowserLayout(v29);
    end;
    v24.setSideBarWidth = function(v30)
        local l_props_2 = v24.props;
        local v32 = l_join_0(l_props_2.MaterialBrowserLayout, {
            SideBarWidth = v30
        });
        l_props_2.dispatchSetMaterialBrowserLayout(v32);
        l_props_2.PluginController:setMaterialBrowserLayout(v32);
    end;
end;
v23.render = function(v33)
    local l_props_3 = v33.props;
    local l_MaterialBrowser_1 = l_props_3.Stylizer.MaterialBrowser;
    local v36 = l_LayoutOrderIterator_0.new();
    local l_Material_0 = l_props_3.Material;
    local l_MaterialBrowserLayout_0 = l_props_3.MaterialBrowserLayout;
    local l_BaseShowSideBar_0 = l_MaterialBrowserLayout_0.BaseShowSideBar;
    local v40 = true;
    local v41 = if not v22() then l_Material_0 and not l_props_3.DEPRECATED_ActiveAsTool else l_Material_0;
    local v42 = (if l_props_3.ViewType == v21.Grid then l_props_3.MaterialTileSize else l_MaterialBrowser_1.MaterialTileWidth + l_MaterialBrowser_1.Padding * 2) + (not v41 and 0 or l_MaterialBrowser_1.MaterialEditorWidth);
    local v43 = v42 + l_MaterialBrowser_1.MinSideBarWidth;
    local v44 = v43 <= l_props_3.AbsoluteSize.X;
    if not v41 then
        if l_props_3.AbsoluteSize.X < v42 then
            if not l_MaterialBrowserLayout_0.OverrideShowSideBar then
                l_BaseShowSideBar_0 = false;
            else
                v40 = false;
            end;
        end;
    elseif l_props_3.AbsoluteSize.X < v42 then
        l_BaseShowSideBar_0 = false;
        v40 = false;
    elseif l_props_3.AbsoluteSize.X < v43 then
        if not l_MaterialBrowserLayout_0.OverrideShowSideBar then
            l_BaseShowSideBar_0 = false;
        else
            v40 = false;
        end;
    end;
    local v45 = if not l_BaseShowSideBar_0 then nil else v2.createElement(l_Pane_0, {
        LayoutOrder = v36:getNextOrder(),
        Size = if not v40 and v41 then l_MaterialBrowser_1.MaterialGridSize else UDim2.fromScale(1, 1)
    }, {
        SideBar = v2.createElement(v19, {
            Size = UDim2.fromScale(1, 1),
            ZIndex = 1
        }),
        HideButton = v2.createElement(l_IconButton_0, {
            Size = l_MaterialBrowser_1.IconSize,
            LeftIcon = l_MaterialBrowser_1.HideIcon,
            IconColor = l_MaterialBrowser_1.IconColor,
            BorderColor = l_MaterialBrowser_1.BackgroundColor,
            OnClick = v33.onHideButtonClicked,
            AnchorPoint = Vector2.new(1, 1),
            Position = UDim2.new(1, -5, 1, -5),
            ZIndex = 2
        })
    });
    local v46 = if not v40 then if l_BaseShowSideBar_0 then nil else v2.createElement(l_Pane_0, {
        BackgroundColor = l_MaterialBrowser_1.GridBackgroundColor,
        LayoutOrder = v36:getNextOrder(),
        Size = l_MaterialBrowser_1.MaterialGridSize
    }) else v2.createElement(v18, {
        LayoutOrder = v36:getNextOrder(),
        Size = if v41 or not v44 and l_BaseShowSideBar_0 then l_MaterialBrowser_1.MaterialGridSize else UDim2.fromScale(1, 1),
        OnShowButtonClicked = v33.onShowButtonClicked,
        SideBarVisible = l_BaseShowSideBar_0
    });
    local v47 = if not v41 then nil else v2.createElement(v17, {
        LayoutOrder = v36:getNextOrder(),
        Size = l_MaterialBrowser_1.MaterialEditorSize
    });
    local v48 = l_props_3.AbsoluteSize.X - v42;
    local v49 = if l_MaterialBrowserLayout_0.SideBarWidth < v48 then l_MaterialBrowserLayout_0.SideBarWidth else v48;
    return v2.createElement(l_Pane_0, l_join_0({
        Style = "Box",
        Layout = Enum.FillDirection.Vertical,
        VerticalAlignment = Enum.VerticalAlignment.Top,
        Size = UDim2.fromScale(1, 1)
    }, l_props_3.WrapperProps), {
        TopBar = v2.createElement(v20, {
            Size = l_MaterialBrowser_1.TopBarSize
        }),
        MainView = if not not v44 and l_BaseShowSideBar_0 then v2.createElement(l_SplitPane_0, {
            ClampSize = true,
            Sizes = {
                UDim.new(0, v49),
                UDim.new(1, -v49)
            },
            Layout = Enum.FillDirection.Horizontal,
            MinSizes = {
                UDim.new(0, l_MaterialBrowser_1.MinSideBarWidth),
                UDim.new(0, v42)
            },
            OnSizesChange = function(v50)
                v33.setSideBarWidth(v50[1].Offset);
            end,
            Size = l_MaterialBrowser_1.MainViewSize
        }, {
            v45,
            v2.createElement(l_Pane_0, {
                Size = UDim2.fromScale(1, 1),
                Layout = Enum.FillDirection.Horizontal,
                LayoutOrder = v36:getNextOrder()
            }, {
                MaterialGrid = v46,
                MaterialEditor = v47
            })
        }) else v2.createElement(l_Pane_0, {
            Size = l_MaterialBrowser_1.MainViewSize
        }, {
            MainView = v2.createElement(l_Pane_0, {
                Size = UDim2.fromScale(1, 1),
                Layout = Enum.FillDirection.Horizontal,
                LayoutOrder = v36:getNextOrder()
            }, {
                SideBar = v45,
                MaterialGrid = v46,
                MaterialEditor = v47
            })
        })
    });
end;
return v3.connect(function(v51, _)
    return {
        DEPRECATED_ActiveAsTool = if not v22() then v51.MaterialBrowserReducer.DEPRECATED_ActiveAsTool else nil,
        Material = v51.MaterialBrowserReducer.Material,
        MaterialBrowserLayout = v51.MaterialBrowserReducer.MaterialBrowserLayout,
        MaterialTileSize = v51.MaterialBrowserReducer.MaterialTileSize,
        ViewType = v51.MaterialBrowserReducer.ViewType
    };
end, function(v53)
    return {
        dispatchSetMaterialBrowserLayout = function(v54)
            v53(v14(v54));
        end
    };
end)(l_withAbsoluteSize_0((l_withContext_0({
    PluginController = v15,
    Stylizer = l_Stylizer_0
})(v23))));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.RoactRodux);
local v3 = require(l_Parent_0.Packages.Framework);
local _ = require(l_Parent_0.Src.Types);
local l_withContext_0 = v3.ContextServices.withContext;
local l_Stylizer_0 = v3.Style.Stylizer;
local l_prioritize_0 = v3.Util.prioritize;
local l_UI_0 = v3.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_AssetRenderModel_0 = l_UI_0.AssetRenderModel;
local v11 = require(l_Parent_0.Src.Flags);
local l_getFFlagBetterMaterialManagerPreviews_0 = v11.getFFlagBetterMaterialManagerPreviews;
local l_getFFlagEnableSkyForMetalBalls_0 = v11.getFFlagEnableSkyForMetalBalls;
local _ = require(l_Parent_0.Src.Reducers.MainReducer);
local l_Controllers_0 = l_Parent_0.Src.Controllers;
local v16 = require(l_Controllers_0.GeneralServiceController);
local v17 = require(l_Controllers_0.MaterialServiceController);
local l_Constants_0 = l_Parent_0.Src.Resources.Constants;
local v19 = require(l_Constants_0.getMaterialColor);
local v20 = require(l_Constants_0.BASE_MATERIALS_WITH_METALNESS);
local v21 = v1.Component:extend("MaterialPreview");
v21.defaultProps = {
    InitialDistance = 6.3,
    Material = Enum.Material.Plastic
};
v21.shouldUpdate = function(v22, v23)
    if not ((v23.MaterialWrapper == v22.props.MaterialWrapper and v23.MaterialOverride == v22.props.MaterialOverride) and v23.MaterialOverrides == v22.props.MaterialOverrides) or v23.Use2022Materials ~= v22.props.Use2022Materials then
        return true;
    else
        return false;
    end;
end;
v21.render = function(v24)
    local l_props_0 = v24.props;
    local l_MaterialPreview_0 = l_props_0.Stylizer.MaterialPreview;
    local l_MaterialWrapper_0 = l_props_0.MaterialWrapper;
    if l_MaterialWrapper_0 then
        local v28 = if not l_MaterialWrapper_0.MaterialVariant then nil else l_MaterialWrapper_0.MaterialVariant.Name;
        local l_Material_0 = l_MaterialWrapper_0.Material;
        if not v24.materialModel then
            v24.materialModel = l_props_0.GeneralServiceController:LoadLocalAsset("rbxasset://models/MaterialManager/smooth_material_model.rbxm");
        end;
        v24.model = v24.materialModel:Clone();
        v24.model.MeshPart.Material = l_Material_0;
        if l_getFFlagBetterMaterialManagerPreviews_0() then
            v24.model.MeshPart.CFrame = CFrame.Angles(0, 0.7853981633974483, 0) * CFrame.Angles(0.7853981633974483, 0, 0);
        end;
        if not v28 then
            if not ((not l_props_0.MaterialOverrides or not l_props_0.MaterialOverride) or not l_props_0.MaterialServiceController:hasDefaultMaterial(l_Material_0, l_props_0.MaterialOverrides[l_props_0.MaterialOverride])) then
                v24.model.MeshPart.Color = v19(l_Material_0, l_props_0.Use2022Materials) or Color3.fromRGB(163, 162, 165);
            end;
        else
            v24.model.MeshPart.MaterialVariant = v28;
        end;
        return v1.createElement(l_Pane_0, {
            BackgroundColor = l_props_0.BackgroundColor,
            Position = l_props_0.Position,
            Size = l_props_0.Size,
            LayoutOrder = l_props_0.LayoutOrder
        }, {
            AssetRenderModel = v1.createElement(l_AssetRenderModel_0, {
                Ambient = l_MaterialPreview_0.Ambient,
                BackgroundColor3 = l_prioritize_0(l_props_0.BackgroundColor, if not l_props_0.Hover then l_MaterialPreview_0.BackgroundColor else l_MaterialPreview_0.BackgroundColorHover),
                DisablePan = true,
                DisableZoom = l_props_0.DisableZoom,
                EnableSky = if not l_getFFlagEnableSkyForMetalBalls_0() then nil else v20[l_Material_0] and not v28,
                InitialDistance = l_props_0.InitialDistance,
                LightColor = l_MaterialPreview_0.LightColor,
                LightDirection = l_MaterialPreview_0.LightDirection,
                Model = v24.model,
                Size = UDim2.fromScale(1, 1),
                Static = l_props_0.Static
            })
        });
    else
        return v1.createElement(l_Pane_0, {
            BackgroundColor = l_props_0.BackgroundColor,
            Position = l_props_0.Position,
            Size = l_props_0.Size,
            LayoutOrder = l_props_0.LayoutOrder
        });
    end;
end;
return v2.connect(function(v30, v31)
    return {
        MaterialWrapper = if not v31.MaterialVariant then v30.MaterialBrowserReducer.Materials[v31.Material] else v30.MaterialBrowserReducer.Materials[v31.MaterialVariant],
        MaterialOverride = if v31.MaterialVariant then nil else v30.MaterialBrowserReducer.MaterialOverride[v31.Material],
        MaterialOverrides = if v31.MaterialVariant then nil else v30.MaterialBrowserReducer.MaterialOverrides[v31.Material],
        Use2022Materials = v30.MaterialBrowserReducer.Use2022Materials
    };
end, function(_)
    return {};
end)((l_withContext_0({
    MaterialServiceController = v17,
    GeneralServiceController = v16,
    Stylizer = l_Stylizer_0
})(v21)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Framework);
local l_withContext_0 = v2.ContextServices.withContext;
local l_Stylizer_0 = v2.Style.Stylizer;
local l_UI_0 = v2.UI;
local l_Container_0 = l_UI_0.Container;
local l_LayoutOrderIterator_0 = v2.Util.LayoutOrderIterator;
local l_Dialog_0 = l_UI_0.Dialog;
local l_Image_0 = l_UI_0.Image;
local l_TextLabel_0 = l_UI_0.TextLabel;
local v11 = require(l_Parent_0.Src.Components.LoadingImage);
local v12 = v1.PureComponent:extend("PreviewDialog");
v12.render = function(v13)
    local l_props_0 = v13.props;
    local l_PromptSelectorWithPreview_0 = l_props_0.Stylizer.PromptSelectorWithPreview;
    local v16 = l_props_0.PreviewTitle or "";
    local v17 = l_props_0.Metadata or {};
    local v18 = #v17 > 0 and 8 + l_PromptSelectorWithPreview_0.TextHeight or 0;
    local v19 = l_LayoutOrderIterator_0.new();
    local v20 = {
        UIListLayout = v1.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            Padding = UDim.new(0, 4)
        }),
        PreviewContentContainer = v1.createElement("Frame", {
            LayoutOrder = v19:getNextOrder(),
            Size = UDim2.new(1, 0, 1, -v18),
            BackgroundColor3 = l_PromptSelectorWithPreview_0.PreviewBackgroundColor,
            BorderColor3 = l_PromptSelectorWithPreview_0.PreviewBorderColor
        }, {
            PreviewContent = if l_props_0.IsTempId == true then v1.createElement(v11, {
                BackgroundTransparency = 1,
                Size = UDim2.new(1, 0, 1, 0),
                Image = l_props_0.ImageId,
                ScaleType = Enum.ScaleType.Fit
            }) else v1.createElement(l_Image_0, {
                Size = UDim2.new(1, 0, 1, 0),
                Image = l_props_0.ImageId
            })
        }),
        EmptyRow = v1.createElement(l_Container_0, {
            LayoutOrder = v19:getNextOrder(),
            Size = UDim2.new(1, 0, 0, 0)
        })
    };
    for v21, v22 in ipairs(v17) do
        v20["Metadata_" .. tostring(v21)] = v1.createElement(l_TextLabel_0, {
            LayoutOrder = v19:getNextOrder(),
            Size = UDim2.new(1, 0, 0, l_PromptSelectorWithPreview_0.TextHeight),
            Text = v22,
            TextSelectable = true,
            TextSize = l_PromptSelectorWithPreview_0.TextHeight,
            TextXAlignment = Enum.TextXAlignment.Left
        });
    end;
    return v1.createElement(l_Dialog_0, {
        Title = v16,
        Size = l_PromptSelectorWithPreview_0.ExpandedPreviewDefaultSize,
        MinSize = l_PromptSelectorWithPreview_0.ExpandedPreviewMinSize,
        Resizable = true,
        Enabled = true,
        Modal = true,
        OnClose = l_props_0.OnClose
    }, {
        Background = v1.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundColor3 = l_PromptSelectorWithPreview_0.PreviewBackgroundColor
        }, {
            UIPadding = v1.createElement("UIPadding", {
                PaddingTop = l_PromptSelectorWithPreview_0.ExpandedPreviewPadding,
                PaddingBottom = l_PromptSelectorWithPreview_0.ExpandedPreviewPadding,
                PaddingLeft = l_PromptSelectorWithPreview_0.ExpandedPreviewPadding,
                PaddingRight = l_PromptSelectorWithPreview_0.ExpandedPreviewPadding
            }),
            Container = v1.createElement(l_Container_0, {}, v20)
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_Stylizer_0
})(v12));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v2.ContextServices;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Stylizer_0 = v2.Style.Stylizer;
local l_UI_0 = v2.UI;
local l_Image_0 = l_UI_0.Image;
local l_TextLabel_0 = l_UI_0.TextLabel;
local v10 = require(l_Parent_0.Src.Components.PromptSelectorWithPreview.PreviewToolbarButton);
local v11 = require(l_Parent_0.Src.Components.LoadingImage);
local v12 = v1.PureComponent:extend("PreviewImage");
v12.init = function(v13)
    v13.state = {
        promptSelectionHovered = false
    };
    v13.onPromptSelectionHover = function()
        v13:setState({
            promptSelectionHovered = true
        });
    end;
    v13.onPromptSelectionHoverEnd = function()
        v13:setState({
            promptSelectionHovered = false
        });
    end;
end;
v12.render = function(v14)
    local l_props_0 = v14.props;
    local l_PromptSelectorWithPreview_0 = l_props_0.Stylizer.PromptSelectorWithPreview;
    local l_Localization_1 = l_props_0.Localization;
    local l_state_0 = v14.state;
    local v19 = l_props_0.ImageId and l_props_0.ImageId ~= "";
    return v1.createElement("ImageLabel", {
        ZIndex = 1,
        Size = UDim2.new(0, l_PromptSelectorWithPreview_0.PreviewSize, 0, l_PromptSelectorWithPreview_0.PreviewSize),
        Image = "",
        [v1.Event.MouseEnter] = v14.onPromptSelectionHover,
        [v1.Event.MouseLeave] = v14.onPromptSelectionHoverEnd
    }, {
        PreviewNoImageSign = not v19 and v1.createElement("Frame", {
            ZIndex = 2,
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundColor3 = l_PromptSelectorWithPreview_0.ImportImageBackground
        }, {
            NoImageText = v1.createElement(l_TextLabel_0, {
                Size = UDim2.new(1, 0, 1, 0),
                TextXAlignment = Enum.TextXAlignment.Center,
                TextSize = l_PromptSelectorWithPreview_0.TextHeight,
                Text = l_Localization_1:getText("CreateDialog", "NoImageSelected"),
                TextWrapped = true,
                TextColor = l_PromptSelectorWithPreview_0.ButtonIconColor
            })
        }),
        PreviewContentContainer = v19 and v1.createElement("Frame", {
            ZIndex = 2,
            Size = UDim2.new(1, 0, 1, 0)
        }, {
            PreviewContent = if l_props_0.IsTempId == true then v1.createElement(v11, {
                BackgroundTransparency = 1,
                Size = UDim2.new(1, 0, 1, 0),
                Image = l_props_0.ImageId,
                ScaleType = Enum.ScaleType.Fit
            }) else v1.createElement(l_Image_0, {
                Size = UDim2.new(1, 0, 1, 0),
                Image = l_props_0.ImageId
            })
        }),
        Toolbar = if l_props_0.IsTempId == false then v1.createElement("Frame", {
            ZIndex = 3,
            AnchorPoint = Vector2.new(0, 1),
            Position = UDim2.new(0, 0, 1, 0),
            Size = UDim2.new(1, 0, 0, l_PromptSelectorWithPreview_0.ToolbarHeight),
            Visible = not not v19 and (l_state_0.promptSelectionHovered and true or false),
            BackgroundTransparency = l_PromptSelectorWithPreview_0.ToolbarTransparency,
            BorderSizePixel = 0,
            BackgroundColor3 = l_PromptSelectorWithPreview_0.ToolbarBackgroundColor
        }, {
            ExpandPreview = v1.createElement(v10, {
                Icon = l_PromptSelectorWithPreview_0.ExpandIcon,
                [v1.Event.Activated] = l_props_0.OpenExpandedPreview
            }),
            ClearButton = v1.createElement(v10, {
                AnchorPoint = Vector2.new(1, 0),
                Position = UDim2.new(1, 0, 0, 0),
                Icon = l_PromptSelectorWithPreview_0.ClearIcon,
                [v1.Event.Activated] = l_props_0.ClearSelection
            })
        }) else nil
    });
end;
return (l_withContext_0({
    Stylizer = l_Stylizer_0,
    Localization = l_Localization_0
})(v12));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Framework);
local l_withContext_0 = v2.ContextServices.withContext;
local l_Stylizer_0 = v2.Style.Stylizer;
local l_Dash_0 = v2.Dash;
local v6 = v1.PureComponent:extend("PreviewToolbarButton");
v6.init = function(v7)
    v7.state = {
        isHovered = false
    };
    v7.onHovered = function()
        v7:setState({
            isHovered = true
        });
    end;
    v7.onHoverEnded = function()
        v7:setState({
            isHovered = false
        });
    end;
end;
v6.render = function(v8)
    local l_props_0 = v8.props;
    local l_state_0 = v8.state;
    local l_PromptSelectorWithPreview_0 = l_props_0.Stylizer.PromptSelectorWithPreview;
    local v12 = l_PromptSelectorWithPreview_0.ToolbarHeight - 4;
    local v13 = v12 - 10;
    return v1.createElement("ImageButton", l_Dash_0.join(l_props_0, {
        Size = UDim2.new(1, 0, 1, 0),
        SizeConstraint = Enum.SizeConstraint.RelativeYY,
        BackgroundTransparency = 1,
        BorderSizePixel = 0,
        [v1.Event.MouseEnter] = v8.onHovered,
        [v1.Event.MouseLeave] = v8.onHoverEnded,
        Image = "",
        Icon = l_Dash_0.None,
        Stylizer = l_Dash_0.None
    }), {
        Background = v1.createElement("Frame", {
            AnchorPoint = Vector2.new(0.5, 0.5),
            Position = UDim2.new(0.5, 0, 0.5, 0),
            Size = UDim2.new(0, v12, 0, v12),
            BackgroundTransparency = not l_state_0.isHovered and 1 or 0,
            BorderSizePixel = 1,
            BackgroundColor3 = l_PromptSelectorWithPreview_0.ToolbarButtonBackgroundColor
        }, {
            Icon = v1.createElement("ImageLabel", {
                AnchorPoint = Vector2.new(0.5, 0.5),
                Position = UDim2.new(0.5, 0, 0.5, 0),
                Size = UDim2.new(0, v13, 0, v13),
                BackgroundTransparency = 1,
                BorderSizePixel = 1,
                Image = l_props_0.Icon,
                ImageColor3 = not not l_state_0.isHovered and l_PromptSelectorWithPreview_0.ButtonIconHoveredColor or l_PromptSelectorWithPreview_0.ButtonIconColor
            })
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_Stylizer_0
})(v6));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v2.ContextServices;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Stylizer_0 = v2.Style.Stylizer;
local l_UI_0 = v2.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_IconButton_0 = l_UI_0.IconButton;
local l_DEPRECATED_TextInput_0 = l_UI_0.DEPRECATED_TextInput;
local l_Components_0 = l_Parent_0.Src.Components;
local v12 = require(l_Components_0.PromptSelectorWithPreview.PreviewDialog);
local v13 = require(l_Components_0.PromptSelectorWithPreview.PreviewImage);
local v14 = v1.PureComponent:extend("PromptSelectorWithPreview");
v14.init = function(v15)
    v15.state = {
        showingExpandedPreview = false
    };
    v15.openExpandedPreview = function()
        v15:setState({
            showingExpandedPreview = true
        });
    end;
    v15.closeExpandedPreview = function()
        v15:setState({
            showingExpandedPreview = false
        });
    end;
end;
v14.render = function(v16)
    local l_props_0 = v16.props;
    local l_Localization_1 = l_props_0.Localization;
    local l_state_0 = v16.state;
    local l_PromptSelectorWithPreview_0 = l_props_0.Stylizer.PromptSelectorWithPreview;
    local v21 = l_props_0.SelectionName or "";
    local v22 = l_props_0.PreviewTitle or "";
    local v23 = l_props_0.ColumnWidth or l_PromptSelectorWithPreview_0.ColumnWidth;
    local v24 = (v23 - 60) / 2 - 5;
    local v25 = (v23 - 60) / 2 + 5;
    local v26 = v23 + l_PromptSelectorWithPreview_0.LabelColumnWidth.Offset;
    local l_PreviewSize_0 = l_PromptSelectorWithPreview_0.PreviewSize;
    local l_LabelWidth_0 = l_props_0.LabelWidth;
    local l_ButtonHeight_0 = l_PromptSelectorWithPreview_0.ButtonHeight;
    local l_showingExpandedPreview_0 = l_state_0.showingExpandedPreview;
    local v31 = nil;
    if l_showingExpandedPreview_0 then
        v31 = {
            v21
        };
    end;
    return v1.createElement("Frame", {
        BackgroundTransparency = 1,
        Size = UDim2.new(0, v26, 0, l_PreviewSize_0 + l_PromptSelectorWithPreview_0.PaddingVertical)
    }, {
        UIListLayout = v1.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            Padding = UDim.new(0, l_PromptSelectorWithPreview_0.PaddingVertical)
        }),
        TwoColumn = v1.createElement(l_Pane_0, {
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            Layout = Enum.FillDirection.Horizontal,
            Size = UDim2.new(1, 0, 0, l_PreviewSize_0),
            Spacing = l_PromptSelectorWithPreview_0.PaddingHorizontal
        }, {
            PreviewColumn = v1.createElement(l_Pane_0, {
                LayoutOrder = 1,
                Size = UDim2.new(l_LabelWidth_0, UDim.new(1, 0))
            }, {
                PreviewImage = v1.createElement(v13, {
                    ImageId = l_props_0.ImageId,
                    IsTempId = l_props_0.IsTempId,
                    ClearSelection = l_props_0.ClearSelection,
                    OpenExpandedPreview = v16.openExpandedPreview
                }),
                ExpandedPreview = l_showingExpandedPreview_0 and v1.createElement(v12, {
                    PreviewTitle = v22,
                    ImageId = l_props_0.ImageId,
                    IsTempId = l_props_0.IsTempId,
                    Metadata = v31,
                    OnClose = v16.closeExpandedPreview
                })
            }),
            ImportColumn = v1.createElement(l_Pane_0, {
                Size = UDim2.new(0, v23, 1, 0),
                Style = "RoundBox",
                Spacing = 10,
                VerticalAlignment = Enum.VerticalAlignment.Top,
                Layout = Enum.FillDirection.Vertical,
                LayoutOrder = 2
            }, {
                UrlImport = v1.createElement(l_DEPRECATED_TextInput_0, {
                    PlaceholderText = l_Localization_1:getText("CreateDialog", "InsertAssetURL"),
                    Text = l_props_0.SearchUrl,
                    Size = UDim2.new(1, 0, 0, l_ButtonHeight_0),
                    OnFocusLost = l_props_0.OnFocusLost,
                    Style = "FilledRoundedBorder"
                }),
                IconImport = v1.createElement(l_IconButton_0, {
                    Size = UDim2.new(1, 0, 0, l_ButtonHeight_0),
                    Text = l_Localization_1:getText("CreateDialog", "Import"),
                    TextXAlignment = Enum.TextXAlignment.Left,
                    LeftIcon = l_PromptSelectorWithPreview_0.ImportIcon,
                    IconColor = l_PromptSelectorWithPreview_0.ImportIconColor,
                    BackgroundColor = l_PromptSelectorWithPreview_0.ButtonColor,
                    OnClick = l_props_0.PromptSelection,
                    Padding = {
                        Left = v24,
                        Right = v25
                    }
                })
            })
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_Stylizer_0,
    Localization = l_Localization_0
})(v14));


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Stylizer_0 = v3.Style.Stylizer;
local l_UI_0 = v3.UI;
local l_Container_0 = l_UI_0.Container;
local l_Image_0 = l_UI_0.Image;
local l_Pane_0 = l_UI_0.Pane;
local l_Tooltip_0 = l_UI_0.Tooltip;
local v13 = v2.PureComponent:extend("StatusIcon");
v13.render = function(v14)
    local l_props_0 = v14.props;
    local l_StatusIcon_0 = l_props_0.Stylizer.StatusIcon;
    local l_Status_0 = l_props_0.Status;
    local v18 = nil;
    local v19 = l_props_0.StatusText or "";
    if l_Status_0 == Enum.PropertyStatus.Error then
        v18 = l_StatusIcon_0.Error;
    elseif l_Status_0 == Enum.PropertyStatus.Warning then
        v18 = l_StatusIcon_0.Warning;
    elseif l_Status_0 == Enum.PropertyStatus.Ok then
        return v2.createElement(l_Pane_0, {
            LayoutOrder = l_props_0.LayoutOrder,
            Size = UDim2.fromOffset(0, 0)
        });
    end;
    return v2.createElement(l_Container_0, {
        LayoutOrder = l_props_0.LayoutOrder,
        Position = l_props_0.Position,
        Size = l_props_0.Size,
        ZIndex = l_props_0.ZIndex
    }, {
        Image = v2.createElement(l_Image_0, {
            Style = v18
        }),
        Tooltip = v2.createElement(l_Tooltip_0, {
            Text = v19
        })
    });
end;
return (l_withContext_0({
    Analytics = l_Analytics_0,
    Stylizer = l_Stylizer_0
})(v13));


local v0 = require(script.Parent.Parent.Parent.Packages.Framework);
local l_ContextItem_0 = v0.ContextServices.ContextItem;
local l_Signal_0 = v0.Util.Signal;
local l_ServiceWrapper_0 = v0.TestHelpers.ServiceWrapper;
local function v6(v4)
    local l_ImageLabel_0 = Instance.new("ImageLabel");
    l_ImageLabel_0.Size = UDim2.new(0, 0, 0, 0);
    l_ImageLabel_0.BackgroundTransparency = 1;
    l_ImageLabel_0.Parent = v4;
    return l_ImageLabel_0;
end;
local v7 = l_ContextItem_0:extend("ImageLoader");
v7.new = function(v8, v9)
    local v10 = setmetatable({
        ImageLoaded = l_Signal_0.new(),
        _loadedImagesCache = {},
        _imageLabelPool = {},
        _loadingImageLabels = {},
        _loadingImageIds = {},
        _alive = true,
        _createImageLabel = not not v8 and v8.createImageLabel or v6
    }, v7);
    local v11 = l_ServiceWrapper_0.new("CoreGui", v9);
    v10._hostGui = Instance.new("ScreenGui");
    v10._hostGui.Name = "ImageLoader";
    v10._hostGui.Enabled = true;
    v10._hostGui.Parent = v11:asInstance();
    if not (v8 and v8._dontPoll) then
        spawn(function()
            v10:_pollImageLoop();
        end);
    end;
    return v10;
end;
v7.mock = function(v12)
    return v7.new({
        dontPoll = true,
        createImageLabel = v12
    }, true);
end;
v7.loadImage = function(v13, v14)
    if not (v14 ~= nil) or v14 == "" then
        return false;
    elseif not v13._loadedImagesCache[v14] then
        if not v13._loadingImageIds[v14] then
            local v15 = nil;
            v15 = if #v13._imageLabelPool > 0 then table.remove(v13._imageLabelPool) else v13._createImageLabel(v13._hostGui);
            v15.Image = v14;
            v13._loadingImageIds[v14] = true;
            table.insert(v13._loadingImageLabels, v15);
            return false;
        else
            return false;
        end;
    else
        v13.ImageLoaded:Fire(v14);
        return true;
    end;
end;
v7.hasImageLoaded = function(v16, v17)
    return v16._loadedImagesCache[v17] or false;
end;
v7.destroy = function(v18)
    v18._alive = false;
    for _, v20 in ipairs(v18._imageLabelPool) do
        v20:Destroy();
    end;
    v18._imageLabelPool = nil;
    for _, v22 in ipairs(v18._loadingImageLabels) do
        v22:Destroy();
    end;
    v18._loadingImageLabels = nil;
    v18._hostGui:Destroy();
    v18._hostGui = nil;
end;
v7._pollImageLoop = function(v23)
    while v23._alive do
        v23:_checkImages();
        wait(0.1);
    end;
end;
v7._checkImages = function(v24)
    local v25 = 1;
    while v25 <= #v24._loadingImageLabels do
        local v26 = v24._loadingImageLabels[v25];
        if not v26.IsLoaded then
            v25 = v25 + 1;
        else
            local l_Image_0 = v26.Image;
            v24._loadedImagesCache[l_Image_0] = true;
            v24.ImageLoaded:Fire(l_Image_0);
            v26.Image = "";
            v24._loadingImageIds[l_Image_0] = nil;
            table.remove(v24._loadingImageLabels, v25);
            table.insert(v24._imageLabelPool, v26);
        end;
    end;
end;
return v7;


local v0 = require(script.Parent.Parent.Parent.Packages.Framework);
local l_ContextItem_0 = v0.ContextServices.ContextItem;
local l_Promise_0 = v0.Util.Promise;
local v3 = l_ContextItem_0:extend("ImportAssetHandler");
v3.__index = v3;
v3.new = function(v4, v5)
    local v6 = setmetatable({
        _imageUploader = v4,
        _userId = v5 or game:GetService("StudioService"):GetUserId()
    }, v3);
    assert(v6._imageUploader, "ImportAssetHandler expects an ImageUploader");
    return v6;
end;
v3.mock = function(v7, v8)
    return v3.new(v7, v8);
end;
v3.handleAsset = function(v9, v10, v11)
    assert(v10, "ImportAssetHandler:handleAsset() requires an assetFile");
    if v11 then
        v11(true);
    end;
    local l_v10_TemporaryId_0 = v10:GetTemporaryId();
    local v13 = nil;
    local l_status_0, l_result_0 = pcall(function()
        v13 = v10:GetBinaryContents();
    end);
    if l_status_0 then
        return v9._imageUploader:upload(l_v10_TemporaryId_0, v10.Name, "", v13):andThen(function(v16)
            local v17 = tonumber(v16);
            if not v17 then
                local v18 = ("Asset id \"%s\" for temp id \"%s\" could not be cast to an integer"):format(v16, l_v10_TemporaryId_0);
                warn(v18);
                assert(v17, v18);
            end;
            return "rbxassetid://" .. v17;
        end);
    else
        return l_Promise_0.reject(l_result_0);
    end;
end;
return v3;


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Framework);
local l_ContextItem_0 = v2.ContextServices.ContextItem;
local l_ServiceWrapper_0 = v2.TestHelpers.ServiceWrapper;
local _ = require(l_Parent_0.Src.Reducers.MaterialBrowserReducer);
local l_Actions_0 = l_Parent_0.Src.Actions;
local v7 = require(l_Actions_0.ClearMaterialWrapper);
local v8 = require(l_Actions_0.SetMaterialOverride);
local v9 = require(l_Actions_0.SetMaterialOverrides);
local v10 = require(l_Actions_0.SetMaterial);
local v11 = require(l_Actions_0.SetMaterialList);
local v12 = require(l_Actions_0.SetMaterialStatus);
local v13 = require(l_Actions_0.SetMaterialWrapper);
local v14 = require(l_Actions_0.SetPath);
local v15 = require(l_Actions_0.SetSearch);
local v16 = require(l_Actions_0.SetUse2022Materials);
local l_Constants_0 = l_Parent_0.Src.Resources.Constants;
local v18 = require(l_Constants_0.getCategoryDefault);
local v19 = require(l_Constants_0.getMaterialPath);
local v20 = require(l_Constants_0.getMaterialType);
local v21 = require(l_Constants_0.getMaterialName);
local v22 = require(l_Constants_0.getSupportedMaterials);
local l_Util_0 = l_Parent_0.Src.Util;
local v24 = require(l_Util_0.CheckMaterialName);
local v25 = require(l_Util_0.ContainsPath);
local v26 = require(l_Util_0.getMaterials);
local v27 = require(l_Util_0.getOverrides);
local v28 = v22();
local v29 = l_ContextItem_0:extend("MaterialServiceController");
v29.new = function(v30, v31)
    local v32 = setmetatable({
        _materialChangedListeners = {},
        _overrideChangedListeners = {},
        _changeHistoryService = l_ServiceWrapper_0.new("ChangeHistoryService", v31),
        _rootCategory = {
            Categories = {},
            CategoryNames = {},
            Materials = {}
        },
        _materialPaths = {},
        _materialWrappers = {},
        _materialStatuses = {},
        _materialServiceWrapper = l_ServiceWrapper_0.new("MaterialService", v31),
        _nameToEnum = {},
        _store = v30,
        _mock = v31
    }, v29);
    v32._materialServiceAdded = v32._materialServiceWrapper:asInstance().DescendantAdded:Connect(function(v33)
        if not v33:IsA("MaterialVariant") then
            if not ((not v33:IsA("TerrainDetail") or not v33.Parent) or not v33.Parent:IsA("MaterialVariant")) then
                local l_Parent_1 = v33.Parent;
                local v35 = v32:getMaterialWrapper(l_Parent_1.BaseMaterial, l_Parent_1);
                v32._materialChangedListeners[v33] = v33.Changed:Connect(function(_)
                    v32._store:dispatch(v13((v32:getMaterialWrapper(l_Parent_1.BaseMaterial, l_Parent_1))));
                end);
                v32._store:dispatch(v13(v35));
            end;
            return ;
        else
            v32:addMaterial(v33.BaseMaterial, v33, v19(v33.BaseMaterial));
            return ;
        end;
    end);
    v32._materialServiceRemoved = v32._materialServiceWrapper:asInstance().DescendantRemoving:Connect(function(v37)
        if not v37:IsA("MaterialVariant") then
            if not ((not v37:IsA("TerrainDetail") or not v37.Parent) or not v37.Parent:IsA("MaterialVariant")) then
                local l_Parent_2 = v37.Parent;
                local v39 = v32:getMaterialWrapper(l_Parent_2.BaseMaterial, l_Parent_2);
                v32._materialChangedListeners[v37] = nil;
                v32._store:dispatch(v13(v39));
            end;
            return ;
        else
            v32:removeMaterial(v37);
            return ;
        end;
    end);
    v32._materialServiceChanged = v32._materialServiceWrapper:asInstance().Changed:Connect(function(v40)
        if v32._nameToEnum[v40] then
            v32._overrideChangedSignal:Fire(v32._nameToEnum[v40]);
        end;
    end);
    v32._materialServiceStatus = v32._materialServiceWrapper:asService().OverrideStatusChanged:Connect(function(v41)
        v32._store:dispatch(v12(v41, v32._materialServiceWrapper:asService():GetOverrideStatus(v41)));
    end);
    if not v31 then
        v32._uses2022MaterialsChanged = v32._materialServiceWrapper:asInstance():GetPropertyChangedSignal("Use2022Materials"):Connect(function()
            v32._store:dispatch(v16(v32._materialServiceWrapper:asService().Use2022Materials));
        end);
        v32._store:dispatch(v16(v32._materialServiceWrapper:asService().Use2022Materials));
    end;
    for v42, v43 in pairs(v28) do
        v32:addMaterial(v42, nil, v19(v42));
        if v43 then
            v32._overrideChangedListeners[v42] = v32._materialServiceWrapper:asService():GetMaterialOverrideChanged(v42):Connect(function()
                v32:updateOverrides(v42);
            end);
        end;
    end;
    for _, v45 in ipairs(v32._materialServiceWrapper:asInstance():GetDescendants()) do
        if v45:IsA("MaterialVariant") then
            v32:addMaterial(v45.BaseMaterial, v45, v19(v45.BaseMaterial));
        end;
    end;
    for v46, _ in ipairs(v28) do
        v32._nameToEnum[v21(v46) .. "Name"] = v46;
    end;
    return v32;
end;
v29.mock = function(v48)
    return v29.new(v48, true);
end;
v29.destroy = function(v49)
    v49._materialServiceAdded:Disconnect();
    v49._materialServiceRemoved:Disconnect();
    v49._materialServiceChanged:Disconnect();
    v49._materialServiceStatus:Disconnect();
    if not v49._mock then
        v49._uses2022MaterialsChanged:Disconnect();
    end;
    v49._materialServiceWrapper:destroy();
    for v50, _ in ipairs(v49._materialChangedListeners) do
        v49._materialChangedListeners[v50]:Disconnect();
        v49._materialChangedListeners[v50] = nil;
    end;
end;
v29.getRootCategory = function(v52)
    return v52._rootCategory;
end;
v29.getMaterialWrapper = function(_, v54, v55)
    return {
        Material = v54,
        MaterialPath = v19(v54),
        MaterialType = v20(v54),
        MaterialVariant = v55
    };
end;
v29.addCategory = function(v56, v57, v58)
    return v56:findCategory(v57, v58, true);
end;
v29.findCategory = function(v59, v60, v61, v62)
    local v63 = true;
    if #v60 <= 0 then
        v63 = not v62;
    end;
    assert(v63, "Can't add root category");
    local l__rootCategory_0 = v59._rootCategory;
    for _, v66 in ipairs(v60) do
        if not l__rootCategory_0.Categories[v66] then
            if not v62 then
                return nil;
            else
                l__rootCategory_0.Categories[v66] = {
                    Builtin = v61,
                    Categories = {},
                    CategoryNames = {},
                    Materials = {}
                };
                table.insert(l__rootCategory_0.CategoryNames, v66);
                table.sort(l__rootCategory_0.CategoryNames);
                l__rootCategory_0 = l__rootCategory_0.Categories[v66];
            end;
        else
            l__rootCategory_0 = l__rootCategory_0.Categories[v66];
        end;
    end;
    return l__rootCategory_0;
end;
v29.addMaterial = function(v67, v68, v69, _)
    local v71 = v19(v68);
    local v72 = v67:getMaterialWrapper(v68, v69);
    local v73 = v67:addCategory(v71, not v72.MaterialVariant);
    assert(v73, "Category to which a Material is added should exist, or be created");
    table.insert(v73.Materials, v72);
    if not v69 then
        v67._store:dispatch(v12(v68, v67._materialServiceWrapper:asService():GetOverrideStatus(v68)));
    else
        v67._materialPaths[v69] = v71;
        v67._materialWrappers[v69] = v72;
        for _, v75 in ipairs(v69:GetChildren()) do
            assert(not v67._materialChangedListeners[v75], "Already connected to material changed");
            v67._materialChangedListeners[v75] = v75.Changed:Connect(function(_)
                v67._store:dispatch(v13((v67:getMaterialWrapper(v69.BaseMaterial, v69))));
            end);
        end;
        if v67._materialChangedListeners[v69] then
            v67._materialChangedListeners[v69]:disconnect();
        end;
        v67._materialChangedListeners[v69] = v69.Changed:Connect(function(v77)
            local v78 = v67:getMaterialWrapper(v69.BaseMaterial, v69);
            if not (v77 ~= "BaseMaterial") or v77 == "Name" then
                v67:moveMaterial(v78);
            end;
            v67._store:dispatch(v13(v78));
        end);
    end;
    if v28[v68] then
        v67:updateOverrides(v68);
    end;
    v67._store:dispatch(v13(v72));
    if v25(v67._store:getState().MaterialBrowserReducer.Path, v71) then
        v67:updateMaterialList();
    end;
end;
v29.removeMaterial = function(v79, v80, _)
    local v82 = v79._materialPaths[v80];
    assert(v82, "Cannot remove material that does not exist");
    local v83 = v79:findCategory(v82);
    assert(v83, "Cannot remove material from category that does not exist");
    for v84, v85 in ipairs(v83.Materials) do
        if v85.MaterialVariant == v80 then
            table.remove(v83.Materials, v84);
            break;
        end;
    end;
    if v79._materialChangedListeners[v80] then
        v79._materialChangedListeners[v80]:Disconnect();
        v79._materialChangedListeners[v80] = nil;
    end;
    for _, v87 in pairs(v80:GetChildren()) do
        if v79._materialChangedListeners[v87] then
            v79._materialChangedListeners[v87]:Disconnect();
            v79._materialChangedListeners[v87] = nil;
        end;
    end;
    v79._store:dispatch(v7(v79._store:getState().MaterialBrowserReducer.Materials[v80]));
    v79:updateOverrides(v80.BaseMaterial);
    if v25(v79._store:getState().MaterialBrowserReducer.Path, v82) then
        v79:updateMaterialList();
    end;
end;
v29.moveMaterial = function(v88, v89)
    assert(v88._materialPaths[v89.MaterialVariant], "Tried to move material that wasn't registered.");
    local v90 = v88._materialPaths[v89.MaterialVariant];
    assert(v90, "Cannot remove material that does not exist");
    local v91 = v88:findCategory(v90);
    assert(v91, "Cannot remove material from category that does not exist");
    for v92, v93 in ipairs(v91.Materials) do
        if v93.MaterialVariant == v89.MaterialVariant then
            table.remove(v91.Materials, v92);
            v88:updateOverrides(v93.Material);
            break;
        end;
    end;
    v88._materialPaths[v89.MaterialVariant] = v19(v89.Material);
    v91 = v88:addCategory(v88._materialPaths[v89.MaterialVariant], not v89.MaterialVariant);
    assert(v91, "Category to which a Material is added should exist, or be created");
    table.insert(v91.Materials, v89);
    v88:updateOverrides(v89.Material);
    if not (not v25(v88._store:getState().MaterialBrowserReducer.Path, v90) and not v25(v88._materialPaths[v89.MaterialVariant], v89.MaterialPath)) then
        v88:updateMaterialList();
    end;
end;
v29.updateOverrides = function(v94, v95)
    local v96, v97 = v27(v94._materialServiceWrapper:asService():GetBaseMaterialOverride(v95), v94:findCategory({}), v95);
    v94._store:dispatch(v9(v95, v96));
    v94._store:dispatch(v8(v95, v97));
end;
v29.setMaterialOverride = function(v98, v99, v100)
    v98._materialServiceWrapper:asService():SetBaseMaterialOverride(v99, v100 or "");
end;
v29.updateMaterialList = function(v101, v102, v103)
    local l_MaterialBrowserReducer_0 = v101._store:getState().MaterialBrowserReducer;
    local v105 = v102 or l_MaterialBrowserReducer_0.Path;
    v101._store:dispatch(v11((v26(v101:findCategory(v105), v105, v103 or l_MaterialBrowserReducer_0.Search))));
end;
v29.setPath = function(v106, v107)
    v106:updateMaterialList(v107);
    v106._store:dispatch(v14(v107));
end;
v29.setSearch = function(v108, v109)
    v108:updateMaterialList(nil, v109);
    v108._store:dispatch(v15(v109));
end;
v29.setMaterial = function(v110, v111)
    v110._store:dispatch(v10(v110._materialWrappers[v111]));
end;
v29.hasDefaultMaterial = function(v112, v113, v114)
    if v114 == "None" then
        v114 = "";
    end;
    local v115;
    if v21(v113) ~= v114 then
        v115 = false;
        if not (v114 == "") then
            goto label0;
        end;
    end;
    v115 = not v112._materialServiceWrapper:asService():GetMaterialVariant(v113, v114);
    ::label0::;
    return v115;
end;
v29.checkMaterialName = function(v116, v117, v118)
    local v119 = v116:findCategory({});
    assert(v119, "Tried to get materials for path which does not exist");
    return (v24(v119, v117, v118));
end;
v29.getCategoryDefaultMaterial = function(v120, v121)
    local v122 = v18(v121);
    if not v122 then
        local v123 = v120:findCategory(v121);
        if #v123.Materials > 0 then
            return v123.Materials[1].Material;
        else
            v122 = Enum.Material.Plastic;
        end;
    end;
    return v122;
end;
return v29;


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Framework);
local v3 = require(l_Parent_0.Src.Flags.getFFlagMaterialActionAsTool);
local l_Actions_0 = l_Parent_0.Src.Actions;
local v5 = require(l_Actions_0.DEPRECATED_SetMaterialAsTool);
local v6 = require(l_Actions_0.SetMaterialBrowserLayout);
local v7 = require(l_Actions_0.SetMaterialTileSize);
local v8 = require(l_Actions_0.SetViewType);
local v9 = require(l_Parent_0.Src.Controllers.GeneralServiceController);
local v10 = require(l_Parent_0.Src.Util.DEPRECATED_SetHighlight);
local l_ContextItem_0 = v2.ContextServices.ContextItem;
local v12 = not v3() and "rbxasset://SystemCursors/Arrow" or nil;
local v13 = not v3() and "rbxasset://textures/FillCursor.png" or nil;
local v14 = l_ContextItem_0:extend("PluginController");
v14.new = function(v15, v16, v17, v18, v19)
    local v20 = setmetatable({
        _plugin = v15,
        _store = v16,
        _mouse = v17,
        _generalServiceController = v18,
        _mock = v19
    }, v14);
    v20._mouseMoveConnection = nil;
    v20._mouseClickedConnection = nil;
    v20._deactivationConnection = nil;
    return v20;
end;
v14.mock = function()
    return v14.new(nil, nil, v9.mock(), true);
end;
v14.initialize = function(v21)
    if not v21._mock then
        local l_Setting_0 = v21._plugin:GetSetting("MaterialBrowserLayout");
        local l_Setting_1 = v21._plugin:GetSetting("MaterialTileSize");
        local l_Setting_2 = v21._plugin:GetSetting("ViewType");
        if l_Setting_0 then
            v21._store:dispatch(v6(l_Setting_0));
        end;
        if l_Setting_1 then
            v21._store:dispatch(v7(l_Setting_1));
        end;
        if l_Setting_2 then
            v21._store:dispatch(v8(l_Setting_2));
        end;
        return ;
    else
        return ;
    end;
end;
v14.setMaterialTileSize = function(v25, v26)
    if not v25._mock then
        v25._plugin:SetSetting("MaterialTileSize", v26);
        return ;
    else
        return ;
    end;
end;
v14.setViewType = function(v27, v28)
    if not v27._mock then
        v27._plugin:SetSetting("ViewType", v28);
        return ;
    else
        return ;
    end;
end;
v14.setMaterialBrowserLayout = function(v29, v30)
    if not v29._mock then
        v29._plugin:SetSetting("MaterialBrowserLayout", v30);
        return ;
    else
        return ;
    end;
end;
v14.DEPRECATED_toggleMaterialAsTool = function(v31)
    if not v31._mock then
        v31._plugin:Activate(true);
        v31._store:dispatch(v5(true));
        local v32 = nil;
        v31._mouseMoveConnection = v31._mouse.Move:Connect(function()
            if not v31._store:getState().MaterialBrowserReducer.Material then
                v31._mouse.Icon = if not v3() then v12 else nil;
                return ;
            else
                v31._mouse.Icon = if not v3() then v13 else nil;
                v32 = v10(v32, v31._mouse.Target);
                return ;
            end;
        end);
        v31._mouseClickedConnection = v31._mouse.Button1Down:Connect(function()
            local l_Material_0 = v31._store:getState().MaterialBrowserReducer.Material;
            if l_Material_0 then
                v31._mouse.Icon = if not v3() then v13 else nil;
                v31._generalServiceController:ApplyToBasePart(v31._mouse.Target, l_Material_0.Material, if not l_Material_0.MaterialVariant then nil else l_Material_0.MaterialVariant.Name);
            end;
        end);
        v31._deactivationConnection = v31._plugin.Deactivation:Connect(function()
            v31._store:dispatch(v5(false));
            if v32 then
                v32:Destroy();
            end;
            v31._mouse.Icon = if not v3() then v12 else nil;
            if v31._mouseMoveConnection then
                v31._mouseMoveConnection:Disconnect();
                v31._mouseMoveConnection = nil;
            end;
            if v31._mouseClickedConnection then
                v31._mouseClickedConnection:Disconnect();
                v31._mouseClickedConnection = nil;
            end;
            if v31._deactivationConnection then
                v31._deactivationConnection:Disconnect();
                v31._deactivationConnection = nil;
            end;
        end);
        return ;
    else
        return ;
    end;
end;
v14.DEPRECATED_untoggleMaterialAsTool = function(v34)
    if not v34._mock then
        v34._plugin:Deactivate();
        return ;
    else
        return ;
    end;
end;
v14.destroy = function(v35)
    if not v35._mock then
        if v35._mouseMoveConnection then
            v35._mouseMoveConnection:Disconnect();
        end;
        if v35._mouseClickedConnection then
            v35._mouseClickedConnection:Disconnect();
        end;
        if v35._deactivationConnection then
            v35._deactivationConnection:Disconnect();
        end;
        return ;
    else
        return ;
    end;
end;
return v14;


game:DefineFastFlag("BetterMaterialManagerPreviews", false);
return function()
    return game:GetFastFlag("BetterMaterialManagerPreviews");
end;


game:DefineFastFlag("EnableSkyForMetalBalls", false);
return function()
    return game:GetFastFlag("EnableSkyForMetalBalls");
end;


game:DefineFastFlag("FixMaterialManagerUploadImage", false);
return function()
    return game:GetFastFlag("FixMaterialManagerUploadImage");
end;


game:DefineFastFlag("FixMaterialSearchCrash", false);
return function()
    return game:GetFastFlag("FixMaterialSearchCrash");
end;


game:DefineFastFlag("MSPhase02", false);
return function()
    return game:GetFastFlag("MSPhase02");
end;


game:DefineFastFlag("MSPhase02FixCategory", false);
return function()
    return game:GetFastFlag("MSPhase02FixCategory");
end;


game:DefineFastFlag("MaterialActionAsTool", false);
game:DefineFastFlag("MaterialPickerBetaEnabled", false);
return function()
    return game:GetFastFlag("MaterialActionAsTool") and game:GetFastFlag("MaterialPickerBetaEnabled");
end;


local v0 = {};
for _, v2 in script:GetChildren() do
    v0[v2.Name] = require(v2);
end;
return v0;


local l_StudioFixPluginWidgetLocalizedIds_0 = game:GetFastFlag("StudioFixPluginWidgetLocalizedIds");
local l_Parent_0 = script.Parent.Parent;
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.Rodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_UI_0 = v4.UI;
local l_DockWidget_0 = l_UI_0.DockWidget;
local l_PluginButton_0 = l_UI_0.PluginButton;
local l_PluginToolbar_0 = l_UI_0.PluginToolbar;
local l_ContextServices_0 = v4.ContextServices;
local l_Plugin_0 = l_ContextServices_0.Plugin;
local l_Mouse_0 = l_ContextServices_0.Mouse;
local l_Store_0 = l_ContextServices_0.Store;
local v13 = require(l_Parent_0.SharedPluginConstants);
local l_MemStorageService_0 = game:GetService("MemStorageService");
local l_Http_0 = v4.Http;
local v16 = require(l_Parent_0.Src.Reducers.MainReducer);
local v17 = require(l_Parent_0.Src.Resources.MakeTheme);
local v18 = require(l_Parent_0.Src.Resources.createAnalyticsHandlers);
local l_SourceStrings_0 = l_Parent_0.Src.Resources.Localization.SourceStrings;
local l_LocalizedStrings_0 = l_Parent_0.Src.Resources.Localization.LocalizedStrings;
local v21 = require(l_Parent_0.Src.Components.MaterialBrowser);
local l_Controllers_0 = l_Parent_0.Src.Controllers;
local v23 = require(l_Controllers_0.GeneralServiceController);
local v24 = require(l_Controllers_0.ImageUploader);
local v25 = require(l_Controllers_0.ImportAssetHandler);
local v26 = require(l_Controllers_0.ImageLoader);
local v27 = require(l_Controllers_0.MaterialServiceController);
local v28 = require(l_Controllers_0.PluginController);
local v29 = require(l_Parent_0.Src.Flags.getFFlagMaterialPickerUIChanges);
local v30 = require(l_Parent_0.Src.Flags.getFFlagMaterialPickerRemoveToggles);
local v31 = require(l_Parent_0.Src.Flags.getFFlagMaterialPickerFixButtonState);
local v32 = v2.PureComponent:extend("MainPlugin");
v32.init = function(v33, v34)
    local l_Plugin_1 = v34.Plugin;
    v33.state = {
        enabled = false
    };
    v33.assetHandler = v25.new((v24.new((l_Http_0.Networking.new({
        isInternal = true
    })))));
    v33.imageLoader = v26.new();
    v33.setEnabled = function(v36)
        if v29() then
            l_MemStorageService_0:setItem(v13.MATERIAL_MANAGER_ENABLED, (tostring(v36)));
        end;
        v33:setState({
            enabled = v36
        });
    end;
    v33.toggleEnabled = function()
        if not v31() then
            v33:setState(function(v37)
                return {
                    enabled = not v37.enabled
                };
            end);
            return ;
        else
            v33.setEnabled(not v33.state.enabled);
            return ;
        end;
    end;
    v33.onClose = function()
        if not v31() then
            v33:setState({
                enabled = false
            });
            return ;
        else
            v33.setEnabled(false);
            return ;
        end;
    end;
    v33.onRestore = function(v38)
        if not v31() then
            v33:setState({
                enabled = v38
            });
            return ;
        else
            v33.setEnabled(v38);
            return ;
        end;
    end;
    v33.onWidgetEnabledChanged = function(v39)
        if not v31() then
            v33:setState({
                enabled = v39.Enabled
            });
            return ;
        else
            v33.setEnabled(v39.Enabled);
            return ;
        end;
    end;
    v33.store = v3.Store.new(v16, nil, {
        v3.thunkMiddleware
    }, nil);
    v33.localization = l_ContextServices_0.Localization.new({
        stringResourceTable = l_SourceStrings_0,
        translationResourceTable = l_LocalizedStrings_0,
        pluginName = "MaterialManager"
    });
    v33.analytics = l_ContextServices_0.Analytics.new(v18);
    v33.materialServiceController = v27.new(v33.store);
    v33.generalServiceController = v23.new();
    v33.pluginController = v28.new(l_Plugin_1, v33.store, l_Plugin_1:getMouse(), v33.generalServiceController);
    v33.pluginController:initialize();
    if not (not game:GetEngineFeature("MaterialPickerBetaEnabled") and not game:GetFastFlag("ShowMaterialManagerFromElsewhere")) then
        l_MemStorageService_0:Bind(v13.SHOW_MATERIAL_MANAGER_PLUGIN_EVENT, function()
            if not v31() then
                v33:setState({
                    enabled = true
                });
                return ;
            else
                v33.setEnabled(true);
                return ;
            end;
        end);
        if not v30() then
            l_MemStorageService_0:Bind(v13.DEPRECATED_HIDE_MATERIAL_MANAGER_PLUGIN_EVENT, function()
                v33.onClose();
            end);
        end;
    end;
end;
v32.willUnmount = function(v40)
    if v40.imageLoader then
        v40.imageLoader:destroy();
    end;
    if v40.materialServiceController then
        v40.materialServiceController:destroy();
    end;
    if v40.generalServiceController then
        v40.generalServiceController:destroy();
    end;
    if v40.pluginController then
        v40.pluginController:destroy();
    end;
end;
v32.renderButtons = function(v41, v42)
    return {
        Toggle = v2.createElement(l_PluginButton_0, {
            Toolbar = v42,
            Active = v41.state.enabled,
            Title = "MaterialManager",
            Tooltip = "",
            Icon = "",
            OnClick = v41.toggleEnabled,
            ClickableWhenViewportHidden = true
        })
    };
end;
v32.render = function(v43)
    local l_props_0 = v43.props;
    local l_state_0 = v43.state;
    local l_Plugin_2 = l_props_0.Plugin;
    local l_enabled_0 = l_state_0.enabled;
    if not (v31() or not v29()) then
        l_MemStorageService_0:setItem(v13.MATERIAL_MANAGER_ENABLED, not l_enabled_0 and "false" or "true");
    end;
    return l_ContextServices_0.provide({
        l_Plugin_0.new(l_Plugin_2),
        l_Store_0.new(v43.store),
        l_Mouse_0.new(l_Plugin_2:getMouse()),
        v17(),
        v43.localization,
        v43.analytics,
        v43.generalServiceController,
        v43.materialServiceController,
        v43.imageLoader,
        v43.assetHandler,
        v43.pluginController
    }, {
        Toolbar = v2.createElement(l_PluginToolbar_0, {
            Title = "Edit",
            RenderButtons = function(v48)
                return v43:renderButtons(v48);
            end
        }),
        MainWidget = v2.createElement(l_DockWidget_0, {
            Id = if not l_StudioFixPluginWidgetLocalizedIds_0 then nil else "MaterialManager",
            Enabled = l_enabled_0,
            Title = v43.localization:getText("Plugin", "Name"),
            ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
            InitialDockState = Enum.InitialDockState.Bottom,
            Size = Vector2.new(640, 480),
            MinSize = Vector2.new(300, 200),
            OnClose = v43.onClose,
            ShouldRestore = true,
            OnWidgetRestored = v43.onRestore,
            [v2.Change.Enabled] = if not v31() then nil else v43.toggleEnabled
        }, {
            v2.createElement(v21)
        })
    });
end;
return v32;


local l_Promise_0 = require(script.Parent.Parent.Parent.Packages.Framework).Util.Promise;
local v1 = {};
v1.__index = v1;
v1.new = function()
    local v2 = {};
    setmetatable(v2, v1);
    return v2;
end;
v1.CreateAssetOrAssetVersionAndPollAssetWithTelemetryAsync_Impl = function(_, ...)
    return {
        AssetId = "123"
    };
end;
v1.CreateAssetOrAssetVersionAndPollAssetWithTelemetryAsync = function(v4, ...)
    local v5 = {
        ...
    };
    return l_Promise_0.new(function(v6, _)
        v6(v4:CreateAssetOrAssetVersionAndPollAssetWithTelemetryAsync_Impl(unpack(v5)));
    end);
end;
return v1;


local l_Parent_0 = script.Parent.Parent.Parent;
return (require(l_Parent_0.Packages.Rodux).combineReducers({
    MaterialBrowserReducer = require(l_Parent_0.Src.Reducers.MaterialBrowserReducer)
}));


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Rodux);
local v3 = require(l_Parent_0.Packages.Cryo);
local l_Actions_0 = l_Parent_0.Src.Actions;
local v5 = require(l_Actions_0.ClearMaterial);
local v6 = require(l_Actions_0.ClearMaterialWrapper);
local v7 = require(l_Actions_0.SetExpandedPane);
local v8 = require(l_Actions_0.SetMaterial);
local v9 = require(l_Actions_0.DEPRECATED_SetMaterialAsTool);
local v10 = require(l_Actions_0.SetMaterialBrowserLayout);
local v11 = require(l_Actions_0.SetMaterialList);
local v12 = require(l_Actions_0.SetMaterialOverride);
local v13 = require(l_Actions_0.SetMaterialOverrides);
local v14 = require(l_Actions_0.SetMaterialStatus);
local v15 = require(l_Actions_0.SetMaterialTileSize);
local v16 = require(l_Actions_0.SetMaterialVariant);
local v17 = require(l_Actions_0.SetMaterialWrapper);
local v18 = require(l_Actions_0.SetMenuHover);
local v19 = require(l_Actions_0.SetPath);
local v20 = require(l_Actions_0.SetSearch);
local v21 = require(l_Actions_0.SetUse2022Materials);
local v22 = require(l_Actions_0.SetViewType);
local v23 = require(l_Parent_0.Src.Util.CompareMaterials);
local v24 = require(l_Parent_0.Src.Resources.Constants.getSettingsNames);
local v25 = require(l_Parent_0.Src.Flags.getFFlagMaterialActionAsTool);
local v26 = v24();
local v27 = {};
for _, v29 in pairs(v26) do
    v27[v29] = true;
end;
return (v2.createReducer({
    DEPRECATED_ActiveAsTool = not not v25() and nil,
    ExpandedPane = v27,
    MaterialBrowserLayout = {
        BaseShowSideBar = true,
        OverrideShowSideBar = false,
        SideBarWidth = 200
    },
    MaterialOverride = {},
    MaterialOverrides = {},
    Materials = {},
    MaterialStatus = {},
    MaterialTileSize = 130,
    MenuHover = false,
    Path = {},
    Search = "",
    Use2022Materials = false,
    ViewType = "Grid"
}, {
    [v5.name] = function(v30, _)
        return v3.Dictionary.join(v30, {
            Material = v3.None
        });
    end,
    [v6.name] = function(v32, v33)
        local v34 = if not v33.MaterialWrapper.MaterialVariant then v33.MaterialWrapper.Material else v33.MaterialWrapper.MaterialVariant;
        return v3.Dictionary.join(v32, {
            Materials = v3.Dictionary.join(v32.Materials, {
                [v34] = v3.None
            }),
            Material = if not v23(v32.Materials[v34], v32.Material) then nil else v3.None
        });
    end,
    [v7.name] = function(v35, v36)
        return v3.Dictionary.join(v35, {
            ExpandedPane = v3.Dictionary.join(v35.ExpandedPane, {
                [v36.PaneName] = v36.ExpandedPaneState
            })
        });
    end,
    [v8.name] = function(v37, v38)
        return v3.Dictionary.join(v37, {
            Material = v38.Material
        });
    end,
    [v9.name] = not v25() and function(v39, v40)
        return v3.Dictionary.join(v39, {
            DEPRECATED_ActiveAsTool = v40.DEPRECATED_ActiveAsTool
        });
    end or nil,
    [v10.name] = function(v41, v42)
        return v3.Dictionary.join(v41, {
            MaterialBrowserLayout = v3.Dictionary.join(v41.MaterialBrowserLayout, v42.MaterialBrowserLayout)
        });
    end,
    [v11.name] = function(v43, v44)
        return v3.Dictionary.join(v43, {
            MaterialList = v44.MaterialList
        });
    end,
    [v12.name] = function(v45, v46)
        return v3.Dictionary.join(v45, {
            MaterialOverride = v3.Dictionary.join(v45.MaterialOverride, {
                [v46.Material] = v46.Index
            })
        });
    end,
    [v13.name] = function(v47, v48)
        return v3.Dictionary.join(v47, {
            MaterialOverrides = v3.Dictionary.join(v47.MaterialOverrides, {
                [v48.Material] = v48.Overrides
            })
        });
    end,
    [v14.name] = function(v49, v50)
        return v3.Dictionary.join(v49, {
            MaterialStatus = v3.Dictionary.join(v49.MaterialStatus, {
                [v50.Material] = v50.MaterialStatus
            })
        });
    end,
    [v15.name] = function(v51, v52)
        return v3.Dictionary.join(v51, {
            MaterialTileSize = v52.MaterialTileSize
        });
    end,
    [v16.name] = function(v53, v54)
        return v3.Dictionary.join(v53, {
            Material = v53.Materials[v54.MaterialVariant]
        });
    end,
    [v17.name] = function(v55, v56)
        local v57 = if not v56.MaterialWrapper.MaterialVariant then v56.MaterialWrapper.Material else v56.MaterialWrapper.MaterialVariant;
        return v3.Dictionary.join(v55, {
            Materials = v3.Dictionary.join(v55.Materials, {
                [v57] = v56.MaterialWrapper
            }),
            Material = if not not v55.Material and v23(v55.Materials[v57], v55.Material) then v56.MaterialWrapper else nil
        });
    end,
    [v18.name] = function(v58, v59)
        return v3.Dictionary.join(v58, {
            MenuHover = v59.MenuHover
        });
    end,
    [v19.name] = function(v60, v61)
        return v3.Dictionary.join(v60, {
            Path = v61.Path
        });
    end,
    [v20.name] = function(v62, v63)
        return v3.Dictionary.join(v62, {
            Search = v63.Search
        });
    end,
    [v22.name] = function(v64, v65)
        return v3.Dictionary.join(v64, {
            ViewType = v65.ViewType
        });
    end,
    [v21.name] = function(v66, v67)
        return v3.Dictionary.join(v66, {
            Use2022Materials = v67.Use2022Materials
        });
    end
}));


return table.freeze({
    [Enum.Material.CorrodedMetal] = true,
    [Enum.Material.DiamondPlate] = true,
    [Enum.Material.Foil] = true,
    [Enum.Material.Metal] = true
});


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local l_getFFlagMSPhase02_0 = require(l_Parent_0.Src.Flags).getFFlagMSPhase02;
local v3 = {
    Materials = {
        Concrete = Enum.Material.Concrete,
        Fabric = Enum.Material.Fabric,
        Ground = Enum.Material.Ground,
        Metal = Enum.Material.Metal,
        Organic = Enum.Material.Ice,
        Plastic = Enum.Material.Plastic,
        Rock = Enum.Material.Rock,
        Stone = Enum.Material.Slate,
        Wood = Enum.Material.Wood
    }
};
local v4 = {
    Materials = {
        Ceramic = Enum.Material.CeramicTiles,
        Concrete = Enum.Material.Concrete,
        Fabric = Enum.Material.Fabric,
        Ground = Enum.Material.Ground,
        Metal = Enum.Material.Metal,
        Organic = Enum.Material.Ice,
        Paper = Enum.Material.Cardboard,
        Plastic = Enum.Material.Plastic,
        Rock = Enum.Material.Rock,
        Stone = Enum.Material.Slate,
        Synthetic = Enum.Material.Rubber,
        Wood = Enum.Material.Wood
    }
};
return function(v5)
    local v6 = nil;
    v6 = if not l_getFFlagMSPhase02_0() then v3 else v4;
    for _, v8 in v5, nil, nil do
        v6 = v6[v8];
        if not v6 then
            return v6;
        end;
    end;
    if type(v6) == "table" then
        return nil;
    else
        return v6;
    end;
end;


local _ = require(script.Parent.Parent.Parent.Parent.Src.Types);
local v1 = {
    FailedUrl = "FailedUrl",
    FailedToImportMap = "FailedToImportMap",
    FailedToUploadFromFileMap = "FailedToUploadFromFileMap",
    FailedToUploadTooLarge = "FailedToUploadTooLarge",
    FailedToInsertAssetManager = "FailedToInsertAssetManager",
    MissingMaterial = "MissingMaterial",
    None = "None"
};
return function()
    return v1;
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Src.Resources.Constants.getMaterialName);
return function(v3, v4)
    return v4:getText("Materials", v2(v3.Material) .. (not v3.MaterialVariant and "Material" or "Variant"));
end;


local l_getFFlagMSPhase02_0 = require(script.Parent.Parent.Parent.Parent.Src.Flags).getFFlagMSPhase02;
local v1 = {
    [Enum.Material.Asphalt] = {
        Color = Color3.fromRGB(55, 56, 56),
        OldColor = Color3.fromRGB(115, 123, 107)
    },
    [Enum.Material.Basalt] = {
        Color = Color3.fromRGB(43, 44, 35),
        OldColor = Color3.fromRGB(30, 30, 37)
    },
    [Enum.Material.Brick] = {
        Color = Color3.fromRGB(121, 86, 70),
        OldColor = Color3.fromRGB(198, 195, 194)
    },
    [Enum.Material.Cobblestone] = {
        Color = Color3.fromRGB(101, 92, 63),
        OldColor = Color3.fromRGB(207, 193, 180)
    },
    [Enum.Material.Concrete] = {
        Color = Color3.fromRGB(107, 103, 98),
        OldColor = Color3.fromRGB(203, 203, 203)
    },
    [Enum.Material.CorrodedMetal] = {
        Color = Color3.fromRGB(147, 106, 88),
        OldColor = Color3.fromRGB(150, 109, 86)
    },
    [Enum.Material.CrackedLava] = {
        Color = Color3.fromRGB(67, 39, 41),
        OldColor = Color3.fromRGB(232, 156, 74)
    },
    [Enum.Material.DiamondPlate] = {
        Color = Color3.fromRGB(204, 203, 202),
        OldColor = Color3.fromRGB(161, 161, 161)
    },
    [Enum.Material.Fabric] = {
        Color = Color3.fromRGB(145, 137, 129),
        OldColor = Color3.fromRGB(96, 95, 93)
    },
    [Enum.Material.Foil] = {
        Color = Color3.fromRGB(236, 236, 236),
        OldColor = Color3.fromRGB(255, 255, 255)
    },
    [Enum.Material.Glacier] = {
        Color = Color3.fromRGB(175, 217, 228),
        OldColor = Color3.fromRGB(101, 176, 234)
    },
    [Enum.Material.Granite] = {
        Color = Color3.fromRGB(88, 78, 68),
        OldColor = Color3.fromRGB(104, 104, 104)
    },
    [Enum.Material.Grass] = {
        Color = Color3.fromRGB(71, 77, 37),
        OldColor = Color3.fromRGB(157, 157, 150)
    },
    [Enum.Material.Ground] = {
        Color = Color3.fromRGB(74, 67, 46),
        OldColor = Color3.fromRGB(112, 87, 43)
    },
    [Enum.Material.Ice] = {
        Color = Color3.fromRGB(195, 224, 239),
        OldColor = Color3.fromRGB(255, 255, 255)
    },
    [Enum.Material.LeafyGrass] = {
        Color = Color3.fromRGB(74, 72, 35),
        OldColor = Color3.fromRGB(115, 132, 74)
    },
    [Enum.Material.Limestone] = {
        Color = Color3.fromRGB(217, 185, 142),
        OldColor = Color3.fromRGB(206, 173, 148)
    },
    [Enum.Material.Marble] = {
        Color = Color3.fromRGB(168, 171, 181),
        OldColor = Color3.fromRGB(193, 193, 193)
    },
    [Enum.Material.Metal] = {
        Color = Color3.fromRGB(192, 192, 192),
        OldColor = Color3.fromRGB(193, 192, 193)
    },
    [Enum.Material.Mud] = {
        Color = Color3.fromRGB(83, 73, 57),
        OldColor = Color3.fromRGB(44, 20, 11)
    },
    [Enum.Material.Pavement] = {
        Color = Color3.fromRGB(86, 86, 88),
        OldColor = Color3.fromRGB(148, 148, 140)
    },
    [Enum.Material.Pebble] = {
        Color = Color3.fromRGB(134, 134, 129),
        OldColor = Color3.fromRGB(203, 203, 203)
    },
    [Enum.Material.Rock] = {
        Color = Color3.fromRGB(62, 59, 58),
        OldColor = Color3.fromRGB(102, 108, 111)
    },
    [Enum.Material.Salt] = {
        Color = Color3.fromRGB(180, 180, 179),
        OldColor = Color3.fromRGB(198, 189, 181)
    },
    [Enum.Material.Sand] = {
        Color = Color3.fromRGB(122, 111, 84),
        OldColor = Color3.fromRGB(216, 216, 216)
    },
    [Enum.Material.Sandstone] = {
        Color = Color3.fromRGB(118, 77, 61),
        OldColor = Color3.fromRGB(137, 90, 71)
    },
    [Enum.Material.Slate] = {
        Color = Color3.fromRGB(118, 126, 142),
        OldColor = Color3.fromRGB(186, 186, 186)
    },
    [Enum.Material.Snow] = {
        Color = Color3.fromRGB(179, 185, 195),
        OldColor = Color3.fromRGB(195, 199, 218)
    },
    [Enum.Material.Wood] = {
        Color = Color3.fromRGB(136, 101, 71),
        OldColor = Color3.fromRGB(224, 224, 224)
    },
    [Enum.Material.WoodPlanks] = {
        Color = Color3.fromRGB(126, 99, 68),
        OldColor = Color3.fromRGB(207, 203, 197)
    }
};
local v2 = {
    [Enum.Material.Asphalt] = {
        Color = Color3.fromRGB(55, 56, 56),
        OldColor = Color3.fromRGB(115, 123, 107)
    },
    [Enum.Material.Basalt] = {
        Color = Color3.fromRGB(43, 44, 35),
        OldColor = Color3.fromRGB(30, 30, 37)
    },
    [Enum.Material.Brick] = {
        Color = Color3.fromRGB(121, 86, 70),
        OldColor = Color3.fromRGB(198, 195, 194)
    },
    [Enum.Material.Cardboard] = {
        Color = Color3.fromRGB(255, 206, 152),
        OldColor = Color3.fromRGB(255, 206, 152)
    },
    [Enum.Material.Carpet] = {
        Color = Color3.fromRGB(163, 162, 165),
        OldColor = Color3.fromRGB(163, 162, 165)
    },
    [Enum.Material.CeramicTiles] = {
        Color = Color3.fromRGB(181, 173, 156),
        OldColor = Color3.fromRGB(181, 173, 156)
    },
    [Enum.Material.ClayRoofTiles] = {
        Color = Color3.fromRGB(255, 142, 87),
        OldColor = Color3.fromRGB(255, 142, 87)
    },
    [Enum.Material.Cobblestone] = {
        Color = Color3.fromRGB(101, 92, 63),
        OldColor = Color3.fromRGB(207, 193, 180)
    },
    [Enum.Material.Concrete] = {
        Color = Color3.fromRGB(107, 103, 98),
        OldColor = Color3.fromRGB(203, 203, 203)
    },
    [Enum.Material.CorrodedMetal] = {
        Color = Color3.fromRGB(147, 106, 88),
        OldColor = Color3.fromRGB(150, 109, 86)
    },
    [Enum.Material.CrackedLava] = {
        Color = Color3.fromRGB(67, 39, 41),
        OldColor = Color3.fromRGB(232, 156, 74)
    },
    [Enum.Material.DiamondPlate] = {
        Color = Color3.fromRGB(204, 203, 202),
        OldColor = Color3.fromRGB(161, 161, 161)
    },
    [Enum.Material.Fabric] = {
        Color = Color3.fromRGB(145, 137, 129),
        OldColor = Color3.fromRGB(96, 95, 93)
    },
    [Enum.Material.Foil] = {
        Color = Color3.fromRGB(236, 236, 236),
        OldColor = Color3.fromRGB(255, 255, 255)
    },
    [Enum.Material.Glacier] = {
        Color = Color3.fromRGB(175, 217, 228),
        OldColor = Color3.fromRGB(101, 176, 234)
    },
    [Enum.Material.Granite] = {
        Color = Color3.fromRGB(88, 78, 68),
        OldColor = Color3.fromRGB(104, 104, 104)
    },
    [Enum.Material.Grass] = {
        Color = Color3.fromRGB(71, 77, 37),
        OldColor = Color3.fromRGB(157, 157, 150)
    },
    [Enum.Material.Ground] = {
        Color = Color3.fromRGB(74, 67, 46),
        OldColor = Color3.fromRGB(112, 87, 43)
    },
    [Enum.Material.Ice] = {
        Color = Color3.fromRGB(195, 224, 239),
        OldColor = Color3.fromRGB(255, 255, 255)
    },
    [Enum.Material.LeafyGrass] = {
        Color = Color3.fromRGB(74, 72, 35),
        OldColor = Color3.fromRGB(115, 132, 74)
    },
    [Enum.Material.Leather] = {
        Color = Color3.fromRGB(110, 73, 53),
        OldColor = Color3.fromRGB(110, 73, 53)
    },
    [Enum.Material.Limestone] = {
        Color = Color3.fromRGB(217, 185, 142),
        OldColor = Color3.fromRGB(206, 173, 148)
    },
    [Enum.Material.Marble] = {
        Color = Color3.fromRGB(168, 171, 181),
        OldColor = Color3.fromRGB(193, 193, 193)
    },
    [Enum.Material.Metal] = {
        Color = Color3.fromRGB(192, 192, 192),
        OldColor = Color3.fromRGB(193, 192, 193)
    },
    [Enum.Material.Mud] = {
        Color = Color3.fromRGB(83, 73, 57),
        OldColor = Color3.fromRGB(44, 20, 11)
    },
    [Enum.Material.Pavement] = {
        Color = Color3.fromRGB(86, 86, 88),
        OldColor = Color3.fromRGB(148, 148, 140)
    },
    [Enum.Material.Pebble] = {
        Color = Color3.fromRGB(134, 134, 129),
        OldColor = Color3.fromRGB(203, 203, 203)
    },
    [Enum.Material.Plaster] = {
        Color = Color3.fromRGB(204, 142, 105),
        OldColor = Color3.fromRGB(204, 142, 105)
    },
    [Enum.Material.Rock] = {
        Color = Color3.fromRGB(62, 59, 58),
        OldColor = Color3.fromRGB(102, 108, 111)
    },
    [Enum.Material.RoofShingles] = {
        Color = Color3.fromRGB(66, 66, 66),
        OldColor = Color3.fromRGB(66, 66, 66)
    },
    [Enum.Material.Rubber] = {
        Color = Color3.fromRGB(32, 32, 32),
        OldColor = Color3.fromRGB(32, 32, 32)
    },
    [Enum.Material.Salt] = {
        Color = Color3.fromRGB(180, 180, 179),
        OldColor = Color3.fromRGB(198, 189, 181)
    },
    [Enum.Material.Sand] = {
        Color = Color3.fromRGB(122, 111, 84),
        OldColor = Color3.fromRGB(216, 216, 216)
    },
    [Enum.Material.Sandstone] = {
        Color = Color3.fromRGB(118, 77, 61),
        OldColor = Color3.fromRGB(137, 90, 71)
    },
    [Enum.Material.Slate] = {
        Color = Color3.fromRGB(118, 126, 142),
        OldColor = Color3.fromRGB(186, 186, 186)
    },
    [Enum.Material.Snow] = {
        Color = Color3.fromRGB(179, 185, 195),
        OldColor = Color3.fromRGB(195, 199, 218)
    },
    [Enum.Material.Wood] = {
        Color = Color3.fromRGB(136, 101, 71),
        OldColor = Color3.fromRGB(224, 224, 224)
    },
    [Enum.Material.WoodPlanks] = {
        Color = Color3.fromRGB(126, 99, 68),
        OldColor = Color3.fromRGB(207, 203, 197)
    }
};
return function(v3, _)
    if not l_getFFlagMSPhase02_0() then
        if not v1[v3] then
            return nil;
        else
            return v1[v3].Color;
        end;
    elseif not v2[v3] then
        return nil;
    else
        return v2[v3].Color;
    end;
end;


local l_getFFlagMSPhase02_0 = require(script.Parent.Parent.Parent.Parent.Src.Flags).getFFlagMSPhase02;
local v1 = {
    [Enum.Material.Air] = "Air",
    [Enum.Material.Asphalt] = "Asphalt",
    [Enum.Material.Basalt] = "Basalt",
    [Enum.Material.Brick] = "Brick",
    [Enum.Material.Cobblestone] = "Cobblestone",
    [Enum.Material.Concrete] = "Concrete",
    [Enum.Material.CorrodedMetal] = "CorrodedMetal",
    [Enum.Material.CrackedLava] = "CrackedLava",
    [Enum.Material.DiamondPlate] = "DiamondPlate",
    [Enum.Material.Fabric] = "Fabric",
    [Enum.Material.Foil] = "Foil",
    [Enum.Material.ForceField] = "ForceField",
    [Enum.Material.Glacier] = "Glacier",
    [Enum.Material.Glass] = "Glass",
    [Enum.Material.Granite] = "Granite",
    [Enum.Material.Grass] = "Grass",
    [Enum.Material.Ground] = "Ground",
    [Enum.Material.Ice] = "Ice",
    [Enum.Material.LeafyGrass] = "LeafyGrass",
    [Enum.Material.Limestone] = "Limestone",
    [Enum.Material.Marble] = "Marble",
    [Enum.Material.Metal] = "Metal",
    [Enum.Material.Mud] = "Mud",
    [Enum.Material.Neon] = "Neon",
    [Enum.Material.Pavement] = "Pavement",
    [Enum.Material.Pebble] = "Pebble",
    [Enum.Material.Plastic] = "Plastic",
    [Enum.Material.Rock] = "Rock",
    [Enum.Material.Salt] = "Salt",
    [Enum.Material.Sand] = "Sand",
    [Enum.Material.Slate] = "Slate",
    [Enum.Material.Sandstone] = "Sandstone",
    [Enum.Material.SmoothPlastic] = "SmoothPlastic",
    [Enum.Material.Snow] = "Snow",
    [Enum.Material.Water] = "Water",
    [Enum.Material.Wood] = "Wood",
    [Enum.Material.WoodPlanks] = "WoodPlanks"
};
local v2 = {
    [Enum.Material.Air] = "Air",
    [Enum.Material.Asphalt] = "Asphalt",
    [Enum.Material.Basalt] = "Basalt",
    [Enum.Material.Brick] = "Brick",
    [Enum.Material.Cardboard] = "Cardboard",
    [Enum.Material.Carpet] = "Carpet",
    [Enum.Material.CeramicTiles] = "CeramicTiles",
    [Enum.Material.ClayRoofTiles] = "ClayRoofTiles",
    [Enum.Material.Cobblestone] = "Cobblestone",
    [Enum.Material.Concrete] = "Concrete",
    [Enum.Material.CorrodedMetal] = "CorrodedMetal",
    [Enum.Material.CrackedLava] = "CrackedLava",
    [Enum.Material.DiamondPlate] = "DiamondPlate",
    [Enum.Material.Fabric] = "Fabric",
    [Enum.Material.Foil] = "Foil",
    [Enum.Material.ForceField] = "ForceField",
    [Enum.Material.Glacier] = "Glacier",
    [Enum.Material.Glass] = "Glass",
    [Enum.Material.Granite] = "Granite",
    [Enum.Material.Grass] = "Grass",
    [Enum.Material.Ground] = "Ground",
    [Enum.Material.Ice] = "Ice",
    [Enum.Material.LeafyGrass] = "LeafyGrass",
    [Enum.Material.Leather] = "Leather",
    [Enum.Material.Limestone] = "Limestone",
    [Enum.Material.Marble] = "Marble",
    [Enum.Material.Metal] = "Metal",
    [Enum.Material.Mud] = "Mud",
    [Enum.Material.Neon] = "Neon",
    [Enum.Material.Pavement] = "Pavement",
    [Enum.Material.Pebble] = "Pebble",
    [Enum.Material.Plaster] = "Plaster",
    [Enum.Material.Plastic] = "Plastic",
    [Enum.Material.Rock] = "Rock",
    [Enum.Material.RoofShingles] = "RoofShingles",
    [Enum.Material.Rubber] = "Rubber",
    [Enum.Material.Salt] = "Salt",
    [Enum.Material.Sand] = "Sand",
    [Enum.Material.Slate] = "Slate",
    [Enum.Material.Sandstone] = "Sandstone",
    [Enum.Material.SmoothPlastic] = "SmoothPlastic",
    [Enum.Material.Snow] = "Snow",
    [Enum.Material.Water] = "Water",
    [Enum.Material.Wood] = "Wood",
    [Enum.Material.WoodPlanks] = "WoodPlanks"
};
return function(v3)
    if not l_getFFlagMSPhase02_0() then
        return v1[v3];
    else
        return v2[v3];
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Src.Flags);
local l_getFFlagMSPhase02_0 = v2.getFFlagMSPhase02;
local l_getFFlagMSPhase02FixCategory_0 = v2.getFFlagMSPhase02FixCategory;
local v5 = {
    [Enum.Material.Aluminum] = {
        "Materials",
        "Metal"
    },
    [Enum.Material.Asphalt] = {
        "Materials",
        "Concrete"
    },
    [Enum.Material.Basalt] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.Brick] = {
        "Materials",
        "Stone"
    },
    [Enum.Material.Cobblestone] = {
        "Materials",
        "Stone"
    },
    [Enum.Material.Concrete] = {
        "Materials",
        "Concrete"
    },
    [Enum.Material.CorrodedMetal] = {
        "Materials",
        "Metal"
    },
    [Enum.Material.CrackedLava] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.DiamondPlate] = {
        "Materials",
        "Metal"
    },
    [Enum.Material.Fabric] = {
        "Materials",
        "Fabric"
    },
    [Enum.Material.ForceField] = {
        "Materials",
        "Special"
    },
    [Enum.Material.Glacier] = {
        "Materials",
        "Organic"
    },
    [Enum.Material.Glass] = {
        "Materials",
        "Translucent"
    },
    [Enum.Material.Granite] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.Grass] = {
        "Materials",
        "Ground"
    },
    [Enum.Material.Ground] = {
        "Materials",
        "Ground"
    },
    [Enum.Material.Ice] = {
        "Materials",
        "Organic"
    },
    [Enum.Material.LeafyGrass] = {
        "Materials",
        "Ground"
    },
    [Enum.Material.Limestone] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.Neon] = {
        "Materials",
        "Special"
    },
    [Enum.Material.Marble] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.Metal] = {
        "Materials",
        "Metal"
    },
    [Enum.Material.Mud] = {
        "Materials",
        "Ground"
    },
    [Enum.Material.Pavement] = {
        "Materials",
        "Concrete"
    },
    [Enum.Material.Pebble] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.Plastic] = {
        "Materials",
        "Plastic"
    },
    [Enum.Material.Rock] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.Salt] = {
        "Materials",
        "Organic"
    },
    [Enum.Material.Sand] = {
        "Materials",
        "Ground"
    },
    [Enum.Material.Sandstone] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.Slate] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.SmoothPlastic] = {
        "Materials",
        "Plastic"
    },
    [Enum.Material.Snow] = {
        "Materials",
        "Ground"
    },
    [Enum.Material.Wood] = {
        "Materials",
        "Wood"
    },
    [Enum.Material.WoodPlanks] = {
        "Materials",
        "Wood"
    }
};
local v6 = {
    [Enum.Material.Aluminum] = {
        "Materials",
        "Metal"
    },
    [Enum.Material.Asphalt] = {
        "Materials",
        "Concrete"
    },
    [Enum.Material.Basalt] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.Brick] = {
        "Materials",
        "Stone"
    },
    [Enum.Material.Cardboard] = {
        "Materials",
        "Paper"
    },
    [Enum.Material.Carpet] = {
        "Materials",
        "Fabric"
    },
    [Enum.Material.CeramicTiles] = {
        "Materials",
        "Ceramic"
    },
    [Enum.Material.ClayRoofTiles] = {
        "Materials",
        "Ceramic"
    },
    [Enum.Material.Cobblestone] = {
        "Materials",
        "Stone"
    },
    [Enum.Material.Concrete] = {
        "Materials",
        "Concrete"
    },
    [Enum.Material.CorrodedMetal] = {
        "Materials",
        "Metal"
    },
    [Enum.Material.CrackedLava] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.DiamondPlate] = {
        "Materials",
        "Metal"
    },
    [Enum.Material.Fabric] = {
        "Materials",
        "Fabric"
    },
    [Enum.Material.ForceField] = {
        "Materials",
        "Special"
    },
    [Enum.Material.Glacier] = {
        "Materials",
        "Organic"
    },
    [Enum.Material.Glass] = {
        "Materials",
        "Translucent"
    },
    [Enum.Material.Granite] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.Grass] = {
        "Materials",
        "Ground"
    },
    [Enum.Material.Ground] = {
        "Materials",
        "Ground"
    },
    [Enum.Material.Ice] = {
        "Materials",
        "Organic"
    },
    [Enum.Material.LeafyGrass] = {
        "Materials",
        "Ground"
    },
    [Enum.Material.Leather] = {
        "Materials",
        "Leather"
    },
    [Enum.Material.Limestone] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.Neon] = {
        "Materials",
        "Special"
    },
    [Enum.Material.Marble] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.Metal] = {
        "Materials",
        "Metal"
    },
    [Enum.Material.Mud] = {
        "Materials",
        "Ground"
    },
    [Enum.Material.Pavement] = {
        "Materials",
        "Concrete"
    },
    [Enum.Material.Pebble] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.Plaster] = {
        "Materials",
        "Ceramic"
    },
    [Enum.Material.Plastic] = {
        "Materials",
        "Plastic"
    },
    [Enum.Material.Rock] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.RoofShingles] = {
        "Materials",
        "Synthetic"
    },
    [Enum.Material.Rubber] = {
        "Materials",
        "Synthetic"
    },
    [Enum.Material.Salt] = {
        "Materials",
        "Organic"
    },
    [Enum.Material.Sand] = {
        "Materials",
        "Ground"
    },
    [Enum.Material.Sandstone] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.Slate] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.SmoothPlastic] = {
        "Materials",
        "Plastic"
    },
    [Enum.Material.Snow] = {
        "Materials",
        "Ground"
    },
    [Enum.Material.Wood] = {
        "Materials",
        "Wood"
    },
    [Enum.Material.WoodPlanks] = {
        "Materials",
        "Wood"
    }
};
local v7 = {
    [Enum.Material.Aluminum] = {
        "Materials",
        "Metal"
    },
    [Enum.Material.Asphalt] = {
        "Materials",
        "Concrete"
    },
    [Enum.Material.Basalt] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.Brick] = {
        "Materials",
        "Stone"
    },
    [Enum.Material.Cardboard] = {
        "Materials",
        "Paper"
    },
    [Enum.Material.Carpet] = {
        "Materials",
        "Fabric"
    },
    [Enum.Material.CeramicTiles] = {
        "Materials",
        "Ceramic"
    },
    [Enum.Material.ClayRoofTiles] = {
        "Materials",
        "Ceramic"
    },
    [Enum.Material.Cobblestone] = {
        "Materials",
        "Stone"
    },
    [Enum.Material.Concrete] = {
        "Materials",
        "Concrete"
    },
    [Enum.Material.CorrodedMetal] = {
        "Materials",
        "Metal"
    },
    [Enum.Material.CrackedLava] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.DiamondPlate] = {
        "Materials",
        "Metal"
    },
    [Enum.Material.Fabric] = {
        "Materials",
        "Fabric"
    },
    [Enum.Material.ForceField] = {
        "Materials",
        "Special"
    },
    [Enum.Material.Glacier] = {
        "Materials",
        "Organic"
    },
    [Enum.Material.Glass] = {
        "Materials",
        "Translucent"
    },
    [Enum.Material.Granite] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.Grass] = {
        "Materials",
        "Ground"
    },
    [Enum.Material.Ground] = {
        "Materials",
        "Ground"
    },
    [Enum.Material.Ice] = {
        "Materials",
        "Organic"
    },
    [Enum.Material.LeafyGrass] = {
        "Materials",
        "Ground"
    },
    [Enum.Material.Leather] = {
        "Materials",
        "Fabric"
    },
    [Enum.Material.Limestone] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.Neon] = {
        "Materials",
        "Special"
    },
    [Enum.Material.Marble] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.Metal] = {
        "Materials",
        "Metal"
    },
    [Enum.Material.Mud] = {
        "Materials",
        "Ground"
    },
    [Enum.Material.Pavement] = {
        "Materials",
        "Concrete"
    },
    [Enum.Material.Pebble] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.Plaster] = {
        "Materials",
        "Ceramic"
    },
    [Enum.Material.Plastic] = {
        "Materials",
        "Plastic"
    },
    [Enum.Material.Rock] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.RoofShingles] = {
        "Materials",
        "Synthetic"
    },
    [Enum.Material.Rubber] = {
        "Materials",
        "Synthetic"
    },
    [Enum.Material.Salt] = {
        "Materials",
        "Organic"
    },
    [Enum.Material.Sand] = {
        "Materials",
        "Ground"
    },
    [Enum.Material.Sandstone] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.Slate] = {
        "Materials",
        "Rock"
    },
    [Enum.Material.SmoothPlastic] = {
        "Materials",
        "Plastic"
    },
    [Enum.Material.Snow] = {
        "Materials",
        "Ground"
    },
    [Enum.Material.Wood] = {
        "Materials",
        "Wood"
    },
    [Enum.Material.WoodPlanks] = {
        "Materials",
        "Wood"
    }
};
return function(v8)
    if not l_getFFlagMSPhase02_0() then
        return v5[v8];
    elseif not l_getFFlagMSPhase02FixCategory_0() then
        return v6[v8];
    else
        return v7[v8];
    end;
end;


local v0 = {
    [Enum.MaterialPattern.Regular] = "Regular",
    [Enum.MaterialPattern.Organic] = "Organic"
};
return function(v1)
    return v0[v1];
end;


local _ = require(script.Parent.Parent.Parent.Parent.Src.Types);
local v1 = {
    Enum.MaterialPattern.Regular,
    Enum.MaterialPattern.Organic
};
return function()
    return v1;
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local l_getFFlagMSPhase02_0 = require(l_Parent_0.Src.Flags).getFFlagMSPhase02;
local v3 = {
    [Enum.Material.Air] = "Terrain",
    [Enum.Material.Asphalt] = "Terrain",
    [Enum.Material.Basalt] = "Terrain",
    [Enum.Material.Brick] = "Base",
    [Enum.Material.Cobblestone] = "Base",
    [Enum.Material.Concrete] = "Base",
    [Enum.Material.CorrodedMetal] = "Part",
    [Enum.Material.CrackedLava] = "Terrain",
    [Enum.Material.DiamondPlate] = "Part",
    [Enum.Material.Fabric] = "Part",
    [Enum.Material.Foil] = "Part",
    [Enum.Material.ForceField] = "Part",
    [Enum.Material.Glacier] = "Terrain",
    [Enum.Material.Glass] = "Part",
    [Enum.Material.Granite] = "Part",
    [Enum.Material.Grass] = "Base",
    [Enum.Material.Ground] = "Terrain",
    [Enum.Material.Ice] = "Base",
    [Enum.Material.LeafyGrass] = "Terrain",
    [Enum.Material.Limestone] = "Terrain",
    [Enum.Material.Marble] = "Part",
    [Enum.Material.Metal] = "Part",
    [Enum.Material.Mud] = "Terrain",
    [Enum.Material.Neon] = "Part",
    [Enum.Material.Pavement] = "Terrain",
    [Enum.Material.Pebble] = "Part",
    [Enum.Material.Plastic] = "Part",
    [Enum.Material.Rock] = "Terrain",
    [Enum.Material.Salt] = "Terrain",
    [Enum.Material.Sand] = "Base",
    [Enum.Material.Slate] = "Base",
    [Enum.Material.Sandstone] = "Terrain",
    [Enum.Material.SmoothPlastic] = "Part",
    [Enum.Material.Water] = "Terrain",
    [Enum.Material.Wood] = "Part",
    [Enum.Material.WoodPlanks] = "Base"
};
local v4 = {
    [Enum.Material.Air] = "Terrain",
    [Enum.Material.Asphalt] = "Terrain",
    [Enum.Material.Basalt] = "Terrain",
    [Enum.Material.Brick] = "Base",
    [Enum.Material.Cardboard] = "Part",
    [Enum.Material.Carpet] = "Part",
    [Enum.Material.CeramicTiles] = "Part",
    [Enum.Material.ClayRoofTiles] = "Part",
    [Enum.Material.Cobblestone] = "Base",
    [Enum.Material.Concrete] = "Base",
    [Enum.Material.CorrodedMetal] = "Part",
    [Enum.Material.CrackedLava] = "Terrain",
    [Enum.Material.DiamondPlate] = "Part",
    [Enum.Material.Fabric] = "Part",
    [Enum.Material.Foil] = "Part",
    [Enum.Material.ForceField] = "Part",
    [Enum.Material.Glacier] = "Terrain",
    [Enum.Material.Glass] = "Part",
    [Enum.Material.Granite] = "Part",
    [Enum.Material.Grass] = "Base",
    [Enum.Material.Ground] = "Terrain",
    [Enum.Material.Ice] = "Base",
    [Enum.Material.LeafyGrass] = "Terrain",
    [Enum.Material.Leather] = "Part",
    [Enum.Material.Limestone] = "Terrain",
    [Enum.Material.Marble] = "Part",
    [Enum.Material.Metal] = "Part",
    [Enum.Material.Mud] = "Terrain",
    [Enum.Material.Neon] = "Part",
    [Enum.Material.Pavement] = "Terrain",
    [Enum.Material.Pebble] = "Part",
    [Enum.Material.Plaster] = "Part",
    [Enum.Material.Plastic] = "Part",
    [Enum.Material.Rock] = "Terrain",
    [Enum.Material.RoofShingles] = "Part",
    [Enum.Material.Rubber] = "Part",
    [Enum.Material.Salt] = "Terrain",
    [Enum.Material.Sand] = "Base",
    [Enum.Material.Slate] = "Base",
    [Enum.Material.Sandstone] = "Terrain",
    [Enum.Material.SmoothPlastic] = "Part",
    [Enum.Material.Water] = "Terrain",
    [Enum.Material.Wood] = "Part",
    [Enum.Material.WoodPlanks] = "Base"
};
return function(v5)
    if not l_getFFlagMSPhase02_0() then
        return v3[v5];
    else
        return v4[v5];
    end;
end;


local _ = require(script.Parent.Parent.Parent.Parent.Src.Types);
local v1 = {
    GeneralSettings = "GeneralSettings",
    TextureSettings = "TextureSettings",
    OverrideSettings = "OverrideSettings",
    TilingSettings = "TilingSettings",
    PhysicalSettings = "PhysicalSettings",
    TerrainDetailsSettings = "TerrainDetailsSettings",
    TerrainDetailsEditor = {
        Top = "TerrainDetailsTop",
        Side = "TerrainDetailsSide",
        Bottom = "TerrainDetailsBottom"
    }
};
return function()
    return v1;
end;