local _ = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Packages.React);
local l_useDesignTokens_0 = require(l_CorePackages_0.Workspace.Packages.Style).useDesignTokens;
local v4 = require(l_CorePackages_0.UIBlox);
local l_Images_0 = v4.App.ImageSet.Images;
local l_ImageSetButton_0 = v4.Core.ImageSet.ImageSetButton;
local l_ContextualMenu_0 = v4.App.Menu.ContextualMenu;
local l_MenuDirection_0 = v4.App.Menu.MenuDirection;
return function(v9)
    local l_Semantic_0 = l_useDesignTokens_0().Semantic;
    local l_Medium_0 = l_Semantic_0.Icon.Size.Medium;
    return v2.createElement(l_ImageSetButton_0, {
        Size = UDim2.fromOffset(l_Medium_0, l_Medium_0),
        AnchorPoint = Vector2.new(0.25, 0.75),
        Position = UDim2.fromScale(1, 0),
        Image = l_Images_0["icons/common/overflow"],
        ImageColor3 = l_Semantic_0.Color.Icon.Emphasis.Color3,
        BackgroundTransparency = 1,
        LayoutOrder = 1,
        [v2.Event.Activated] = v9.onActivated
    }, {
        Menu = v2.createElement("Frame", {
            BackgroundTransparency = 1
        }, {
            ContextualMenu = v2.createElement(l_ContextualMenu_0, {
                buttonProps = v9.buttonProps,
                screenSize = v9.screenSize,
                menuDirection = l_MenuDirection_0.Down,
                openPositionY = UDim.new(0, l_Medium_0),
                openPositionX = UDim.new(0, -100),
                open = v9.showMenu,
                onDismiss = v9.onDismiss,
                elementHeight = 38,
                closeBackgroundVisible = false,
                contextMenuWidthOverride = UDim.new(0, 155)
            })
        })
    });
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Packages.React);
local l_useDesignTokens_0 = require(l_CorePackages_0.Workspace.Packages.Style).useDesignTokens;
local l_useLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).Hooks.useLocalization;
local v5 = require(l_CorePackages_0.UIBlox);
local l_Button_0 = v5.App.Button.Button;
local l_StyledTextLabel_0 = v5.App.Text.StyledTextLabel;
local v8 = require(l_Modules_0.LuaApp.Components.Subscriptions.MoreMenu);
return function(v9)
    local v10, v11 = v2.useState(0);
    local v12, v13 = v2.useState(0);
    local v14 = l_useDesignTokens_0();
    local l_Semantic_0 = v14.Semantic;
    local l_Subheader_0 = l_Semantic_0.Typography.Subheader;
    local l_CaptionBody_0 = l_Semantic_0.Typography.CaptionBody;
    local l_Color_0 = l_Semantic_0.Color;
    local l_Medium_0 = l_Semantic_0.Radius.Medium;
    local l_XLarge_0 = l_Semantic_0.Icon.Size.XLarge;
    local l_Global_0 = v14.Global;
    local l_Size_450_0 = l_Global_0.Size_450;
    local l_Space_300_0 = l_Global_0.Space_300;
    local l_Space_300_1 = l_Global_0.Space_300;
    local l_Space_150_0 = l_Global_0.Space_150;
    local l_Space_150_1 = l_Global_0.Space_150;
    local l_LineHeight_0 = l_Subheader_0.LineHeight;
    local l_LineHeight_1 = l_CaptionBody_0.LineHeight;
    local l_FontSize_0 = l_Subheader_0.FontSize;
    local l_FontSize_1 = l_CaptionBody_0.FontSize;
    local v31 = l_LineHeight_0 * l_FontSize_0;
    local v32 = v31 * 2;
    local v33 = l_LineHeight_1 * l_FontSize_1;
    local l_subscriptionProduct_0 = v9.subscriptionProduct;
    local v35 = l_useLocalization_0({
        subscribed = "Feature.Subscription.Text.Subscribed",
        perMonth = "Feature.Subscription.Text.PerMonth",
        seeMore = "Feature.Subscription.Action.SeeMore",
        reportSubscription = "Feature.Subscription.Action.ReportSubscription",
        disclaimerText = "Feature.Subscription.Text.DisclaimerTextMonthly"
    });
    local l_isSubscribed_0 = v9.isSubscribed;
    local v37 = if not l_isSubscribed_0 then l_subscriptionProduct_0.displayPrice .. " " .. v35.perMonth else v35.subscribed;
    local v38, v39 = v2.useState(false);
    return v2.createElement("Frame", {
        Size = UDim2.fromScale(1, 1),
        BackgroundColor3 = l_Color_0.BackgroundUi.Default.Color3,
        BackgroundTransparency = l_Color_0.BackgroundUi.Default.Transparency
    }, {
        UIPadding = v2.createElement("UIPadding", {
            PaddingTop = UDim.new(0, l_Space_300_1),
            PaddingBottom = UDim.new(0, l_Space_300_1),
            PaddingLeft = UDim.new(0, l_Space_300_1),
            PaddingRight = UDim.new(0, l_Space_300_1)
        }),
        UICorners = v2.createElement("UICorner", {
            CornerRadius = UDim.new(0, l_Medium_0)
        }),
        TileContent = v2.createElement("Frame", {
            Size = UDim2.fromScale(1, 1),
            BackgroundTransparency = 1
        }, {
            UIListLayout = v2.createElement("UIListLayout", {
                SortOrder = Enum.SortOrder.LayoutOrder,
                FillDirection = Enum.FillDirection.Vertical,
                Padding = UDim.new(0, l_Space_150_1)
            }),
            SubscriptionInfoFrame = v2.createElement("Frame", {
                Size = UDim2.new(1, 0, 0, 128),
                BackgroundTransparency = 1,
                LayoutOrder = 0
            }, {
                UIListLayout = v2.createElement("UIListLayout", {
                    SortOrder = Enum.SortOrder.LayoutOrder,
                    FillDirection = Enum.FillDirection.Horizontal,
                    Padding = UDim.new(0, l_Space_300_0)
                }),
                Thumbnail = v2.createElement("ImageLabel", {
                    Size = UDim2.fromOffset(l_XLarge_0, l_XLarge_0),
                    BackgroundTransparency = 1,
                    Image = v9.thumbnailString
                }, {
                    UICorners = v2.createElement("UICorner", {
                        CornerRadius = UDim.new(0, l_Medium_0)
                    })
                }),
                TextContent = v2.createElement("Frame", {
                    Size = UDim2.new(1, -l_XLarge_0 - l_Space_300_0, 0, 0),
                    BackgroundTransparency = 1,
                    [v2.Change.AbsoluteSize] = function(v40)
                        v11(v40.AbsoluteSize.X);
                    end
                }, {
                    UIListLayout = v2.createElement("UIListLayout", {
                        SortOrder = Enum.SortOrder.LayoutOrder,
                        FillDirection = Enum.FillDirection.Vertical,
                        Padding = UDim.new(0, l_Space_150_0)
                    }),
                    SubscriptionTitle = v2.createElement(l_StyledTextLabel_0, {
                        maxSize = Vector2.new(v10, v32),
                        fontStyle = l_Subheader_0,
                        colorStyle = l_Color_0.Text.Emphasis,
                        fluidSizing = false,
                        richText = false,
                        textWrapped = true,
                        lineHeight = l_Subheader_0.LineHeight,
                        textTruncate = Enum.TextTruncate.AtEnd,
                        text = l_subscriptionProduct_0.name,
                        layoutOrder = 0,
                        onAbsoluteSizeChange = function(v41)
                            v13(v41.AbsoluteSize.Y / v31);
                        end
                    }),
                    Description = v2.createElement(l_StyledTextLabel_0, {
                        maxSize = Vector2.new(v10, v33 * (5 - v12)),
                        fontStyle = l_CaptionBody_0,
                        colorStyle = l_Color_0.Text.Emphasis,
                        fluidSizing = false,
                        richText = false,
                        textWrapped = true,
                        textTruncate = Enum.TextTruncate.AtEnd,
                        lineHeight = l_CaptionBody_0.LineHeight,
                        text = l_subscriptionProduct_0.description,
                        layoutOrder = 1
                    }),
                    SeeMore = v2.createElement("TextButton", {
                        Size = UDim2.new(1, 0, 0, 0),
                        Text = v35.seeMore,
                        AutomaticSize = Enum.AutomaticSize.Y,
                        TextXAlignment = Enum.TextXAlignment.Left,
                        BackgroundTransparency = 1,
                        TextColor3 = l_Color_0.Text.Emphasis.Color,
                        TextSize = l_CaptionBody_0.FontSize,
                        Font = l_CaptionBody_0.Font,
                        LayoutOrder = 2,
                        [v2.Event.Activated] = function()
                        end
                    })
                })
            }),
            PurchaseButton = v2.createElement(l_Button_0, {
                size = UDim2.new(1, 0, 0, l_Size_450_0),
                text = v37,
                isDisabled = l_isSubscribed_0,
                onActivated = function()
                end,
                layoutOrder = 1
            })
        }),
        MoreMenuButton = v2.createElement(v8, {
            buttonProps = {
                {
                    text = v35.reportSubscription,
                    onActivated = function()
                        v39(false);
                    end,
                    fontStyle = {
                        Font = l_CaptionBody_0.Font,
                        RelativeSize = 0.625,
                        RelativeMinSize = 0.625
                    },
                    textOnlyPadding = l_Space_150_0
                }
            },
            screenSize = v9.screenSize,
            showMenu = v38,
            onDismiss = function()
                v39(false);
            end,
            onActivated = function()
                v39(not v38);
            end
        })
    });
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Packages.React);
local l_useDesignTokens_0 = require(l_CorePackages_0.Workspace.Packages.Style).useDesignTokens;
local l_useSelector_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useSelector;
local v5 = require(l_CorePackages_0.UIBlox);
local l_GridMetrics_0 = v5.App.Grid.GridMetrics;
local l_DefaultMetricsGridView_0 = v5.App.Grid.DefaultMetricsGridView;
local v8 = require(l_Modules_0.LuaApp.Components.Subscriptions.SubscriptionTile);
local function v18(v9, v10, v11, v12)
    local v13 = {};
    if v9 then
        for _, v15 in v9, nil, nil do
            local v16 = "";
            local v17 = false;
            if not (not v10 or not v10[tostring(v15.iconImageAssetId)]) then
                v16 = v10[tostring(v15.iconImageAssetId)].url;
            end;
            if not (not v11 or not v11[v15.subscriptionTargetKey]) then
                v17 = v11[v15.subscriptionTargetKey].isSubscribed;
            end;
            table.insert(v13, {
                subscriptionProduct = v15,
                thumbnailString = v16,
                screenSize = v12,
                isSubscribed = v17
            });
        end;
    end;
    return v13;
end;
return function(v19)
    local v21 = l_useSelector_0((v2.useCallback(function(v20)
        return (v18(v19.subscriptionProducts, v20.SubscriptionProductsThumbnails, v20.SubscriptionStatuses, v20.ScreenSize));
    end, {
        v19.subscriptionProducts
    })));
    local l_Space_300_0 = l_useDesignTokens_0().Global.Space_300;
    return v2.createElement(l_DefaultMetricsGridView_0, {
        renderItem = function(v23)
            return v2.createElement(v8, v23);
        end,
        getItemHeight = function()
            return 224;
        end,
        getItemMetrics = l_GridMetrics_0.getLargeMetrics,
        itemPadding = Vector2.new(l_Space_300_0, l_Space_300_0),
        items = v21,
        LayoutOrder = v19.layoutOrder
    });
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Roact);
local v2 = require(l_CorePackages_0.Cryo);
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v4 = require(l_Modules_0.LuaApp.Components.GenericTextButton);
local v5 = require(l_Modules_0.LuaApp.ThemeContext_DEPRECATED);
local v6 = v1.PureComponent:extend("SystemPrimaryButton");
v6.render = function(v7)
    return v1.createElement(v5.Consumer, {
        render = function(v8)
            return v1.createElement(v4, (v2.Dictionary.join(v7.props, {
                themeSettings = v8.SystemPrimaryButton
            })));
        end
    });
end;
return v6;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Roact);
local v3 = require(l_CorePackages_0.Cryo);
local v4 = require(l_Modules_0.LuaApp.Components.GenericTextButton);
local l_withStyle_0 = require(l_CorePackages_0.UIBlox).Style.withStyle;
local v6 = require(l_Modules_0.LuaApp.Flags.GetFFlagEnableHomePageUpsellCard);
local v7 = v2.PureComponent:extend("AuthSystemPrimaryButton");
v7.render = function(v8)
    local l_props_0 = v8.props;
    l_props_0 = v3.Dictionary.join(l_props_0, {
        forwardRef = v3.None,
        [v2.Ref] = l_props_0.forwardRef
    });
    return l_withStyle_0(function(v10)
        local v11 = {
            Color = v10.Theme.SystemPrimaryDefault.Color,
            Transparency = v10.Theme.SystemPrimaryDefault.Transparency,
            OnPressTransparency = 0.5,
            DisabledTransparency = 0.5,
            Text = {
                Color = v10.Theme.SystemPrimaryContent.Color,
                Transparency = v10.Theme.SystemPrimaryContent.Transparency
            },
            Border = {
                Hidden = false,
                Transparency = 1
            }
        };
        local v12 = "Header2";
        if not (not v6() or not v8.props.fontStyle) then
            v12 = v8.props.fontStyle;
        end;
        return v2.createElement(v4, v3.Dictionary.join(l_props_0, {
            Font = v10.Font[v12].Font,
            TextSize = if not v8.props.TextSize then v10.Font.BaseSize * v10.Font[v12].RelativeSize else v8.props.TextSize,
            themeSettings = v11
        }));
    end);
end;
return v2.forwardRef(function(v13, v14)
    return v2.createElement(v7, v3.Dictionary.join(v13, {
        forwardRef = v14
    }));
end);


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_RunService_0 = game:GetService("RunService");
local l_CorePackages_0 = game:GetService("CorePackages");
local v3 = require(l_Modules_0.Common.Roact);
local v4 = require(l_Modules_0.Common.RoactUtilities.ExternalEventConnection);
local v5 = require(l_Modules_0.LuaApp.Components.DEPRECATED_ImageSetLabel);
local v6 = require(l_Modules_0.LuaApp.ArgCheck);
local v7 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetFFlagMigrateRoactUtilsToReactUtils();
local v8 = v3.PureComponent:extend("TextureScroller");
v8.init = function(v9)
    v9.lerpValue = 0;
    v9.imageRef = v3.createRef();
    v9.renderSteppedCallback = function(v10)
        local l_imageScrollCycleTime_0 = v9.props.imageScrollCycleTime;
        local l_imagePositionStart_0 = v9.props.imagePositionStart;
        local l_imagePositionEnd_0 = v9.props.imagePositionEnd;
        local v14 = 0;
        if l_imageScrollCycleTime_0 ~= 0 then
            v14 = v10 / l_imageScrollCycleTime_0;
        end;
        v9.lerpValue = (v9.lerpValue + v14) % 1;
        if not (v7 and not v9.imageRef.current) then
            v9.imageRef.current.Position = l_imagePositionStart_0:lerp(l_imagePositionEnd_0, v9.lerpValue);
        end;
    end;
end;
v8.render = function(v15)
    v6.isType(v15.props.Image, "string", "self.props.Image");
    v6.isType(v15.props.imageScrollCycleTime, "number", "self.props.imageScrollCycleTime");
    v6.isType(v15.props.imagePositionStart, "UDim2", "self.props.imagePositionStart");
    v6.isType(v15.props.imagePositionEnd, "UDim2", "self.props.imagePositionEnd");
    return v3.createElement("Frame", {
        Size = v15.props.Size,
        Position = v15.props.Position,
        AnchorPoint = v15.props.AnchorPoint,
        LayoutOrder = v15.props.LayoutOrder,
        BackgroundTransparency = 1,
        ClipsDescendants = true
    }, {
        v3.createElement(v5, {
            Size = v15.props.imageSize,
            Position = v15.props.imagePositionStart,
            AnchorPoint = v15.props.imageAnchorPoint,
            BackgroundTransparency = 1,
            Image = v15.props.Image,
            ImageTransparency = v15.props.ImageTransparency,
            [v3.Ref] = v15.imageRef
        });
        renderStepped = v3.createElement(v4, {
            event = l_RunService_0.renderStepped,
            callback = v15.renderSteppedCallback
        })
    });
end;
return v8;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local l_UserInputService_0 = game:GetService("UserInputService");
local v3 = require(l_CorePackages_0.Roact);
local v4 = require(l_CorePackages_0.RoactRodux);
local v5 = require(l_CorePackages_0.Packages.t);
local v6 = require(l_CorePackages_0.UIBlox);
local l_Toast_0 = v6.App.Dialog.Toast;
local v8 = require(l_CorePackages_0.Workspace.Packages.RoactAppExperiment);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v10 = require(l_Modules_0.LuaApp.Services.RoactLocalization);
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local v12 = require(l_Modules_0.LuaApp.Experiment.AppUserLayers);
local v13 = require(l_Modules_0.LuaApp.Actions.RemoveCurrentToastMessage);
local v14 = require(l_Modules_0.LuaApp.Thunks.OpenGameDetails);
local v15 = require(l_Modules_0.LuaApp.Enum.ToastType);
local v16 = require(l_Modules_0.LuaApp.Components.ScreenGuiWithBlurControl);
local v17 = require(l_Modules_0.LuaApp.Components.Images);
local l_Images_0 = v6.App.ImageSet.Images;
local v19 = v17["LuaApp/graphic/ic_alert"];
local v20 = v17["LuaApp/graphic/ic_logo"];
local v21 = l_Images_0["icons/common/notificationOn"];
local v22 = l_Images_0["icons/common/notificationOff"];
local v23 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppUseWithLocalization);
local l_GetFFlagAdjustVRFloor_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetFFlagAdjustVRFloor;
local l_GetNotificationsExperienceDetailsVariant_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetNotificationsExperienceDetailsVariant;
local v26 = require(l_CorePackages_0.Workspace.Packages.VrCompatibility);
local l_VRReadyWrapper_0 = v26.VRReadyWrapper;
local l_VRConstants_0 = v26.VRConstants;
local v29 = v3.PureComponent:extend("ToastV2");
v29.defaultProps = {
    duration = 3,
    springOptions = {
        frequency = 150,
        damping = 1
    }
};
v29.validateProps = v5.strictInterface({
    duration = v5.optional(v5.integer),
    springOptions = v5.optional(v5.table),
    displayOrder = v5.optional(v5.integer),
    localization = v5.table,
    currentToastMessage = v5.optional(v5.table),
    currentRoute = v5.table,
    openGameDetails = v5.callback,
    removeCurrentToastMessage = v5.callback,
    enableNotificationsDiscoverability = v5.optional(v5.boolean)
});
v29.openLuaGameDetails = function(v30, v31)
    v30.props.openGameDetails(v31);
end;
v29.init = function(v32)
    v32.onDismissed = function()
        v32.props.removeCurrentToastMessage();
    end;
    v32.onButtonActivated = function()
        if v32.props.currentToastMessage then
            local l_currentToastMessage_0 = v32.props.currentToastMessage;
            local l_toastType_0 = l_currentToastMessage_0.toastType;
            local l_universeId_0 = l_currentToastMessage_0.universeId;
            if not (not (l_toastType_0 == v15.QuickLaunchError) or not l_universeId_0) then
                v32:openLuaGameDetails(l_universeId_0);
            end;
            v32.props.removeCurrentToastMessage();
        end;
    end;
end;
v29.onRender = function(v36)
    local l_localization_0 = v36.props.localization;
    local l_enableNotificationsDiscoverability_0 = v36.props.enableNotificationsDiscoverability;
    local l_currentToastMessage_1 = v36.props.currentToastMessage;
    local l_toastMessage_0 = l_currentToastMessage_1.toastMessage;
    local l_toastSubMessage_0 = l_currentToastMessage_1.toastSubMessage;
    local l_sequenceNumber_0 = l_currentToastMessage_1.sequenceNumber;
    local v43 = l_currentToastMessage_1.isLocalized or false;
    local v44 = nil;
    local v45 = nil;
    local l_toastType_1 = l_currentToastMessage_1.toastType;
    if l_toastType_1 == v15.QuickLaunchError then
        v45 = v36.onButtonActivated;
    elseif l_toastType_1 == v15.SuccessConfirmation then
        v44 = v20;
    elseif l_toastType_1 == v15.NetworkingError then
        v44 = v19;
    elseif l_toastType_1 == v15.InformationMessage then
        v44 = v20;
    elseif l_enableNotificationsDiscoverability_0 and l_toastType_1 == v15.NotificationsTurnedOn then
        v44 = v21;
    elseif l_enableNotificationsDiscoverability_0 and l_toastType_1 == v15.NotificationsTurnedOff then
        v44 = v22;
    end;
    local v47 = UDim2.new(0.5, 0, 0, (not not l_UserInputService_0.StatusBarSize and l_UserInputService_0.StatusBarSize.Y or 0) + 20);
    local function v49(v48)
        return v3.createElement(l_Toast_0, {
            position = v47,
            show = true,
            toastContent = {
                iconImage = v44,
                onActivated = v45,
                onDismissed = v36.onDismissed,
                toastSubtitle = v48.toastSubMessage,
                sequenceNumber = l_sequenceNumber_0,
                toastTitle = v48.toastMessage
            },
            duration = v36.props.duration,
            springOptions = v36.props.springOptions
        });
    end;
    if not v23() then
        return v49(not not v43 and {
            toastMessage = l_toastMessage_0,
            toastSubMessage = l_toastSubMessage_0
        } or {
            toastMessage = not not l_toastMessage_0 and l_localization_0:Format(l_toastMessage_0) or nil,
            toastSubMessage = not not l_toastSubMessage_0 and l_localization_0:Format(l_toastSubMessage_0) or nil
        });
    elseif not v43 then
        return l_withLocalization_0({
            toastMessage = l_toastMessage_0,
            toastSubMessage = l_toastSubMessage_0
        })(v49);
    else
        return v49({
            toastMessage = l_toastMessage_0,
            toastSubMessage = l_toastSubMessage_0
        });
    end;
end;
v29.render = function(v50)
    local l_displayOrder_0 = v50.props.displayOrder;
    if v50.props.currentToastMessage then
        return v3.createElement(l_VRReadyWrapper_0, {
            component = v16,
            props = {
                ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
                DisplayOrder = l_displayOrder_0
            },
            vrProps = {
                partSize = l_VRConstants_0.ToastSize,
                offset = not not l_GetFFlagAdjustVRFloor_0() and l_VRConstants_0.ToastPosition or CFrame.lookAt(l_VRConstants_0.ToastPosition, l_VRConstants_0.DefaultCameraPosition),
                virtualScreenSize = l_VRConstants_0.ToastResolution,
                curvature = l_VRConstants_0.ToastCurvature,
                panelName = "Toast"
            }
        }, {
            Toast = v50:onRender()
        });
    else
        return nil;
    end;
end;
v29.didUpdate = function(v52, v53, _)
    local l_currentToastMessage_2 = v52.props.currentToastMessage;
    if l_currentToastMessage_2 then
        if not (next(l_currentToastMessage_2) and l_currentToastMessage_2.toastMessage) then
            v52.props.removeCurrentToastMessage();
        end;
        if v53.currentRoute ~= v52.props.currentRoute and l_currentToastMessage_2.toastType == v15.QuickLaunchError then
            v52.props.removeCurrentToastMessage();
        end;
    end;
end;
v29 = v4.connect(function(v56, _)
    return {
        currentToastMessage = v56.CurrentToastMessages.currentToastMessage,
        currentRoute = v56.Navigation.history[#v56.Navigation.history]
    };
end, function(v58)
    return {
        removeCurrentToastMessage = function()
            return v58(v13());
        end,
        openGameDetails = function(v59)
            v58(v14(v59));
        end
    };
end)(v29);
if l_GetNotificationsExperienceDetailsVariant_0.enableNotificationsEDPChanges then
    v29 = v8.connectUserLayer({
        v12.ExperienceDetailsPageLayer
    }, function(v60, _)
        return {
            enableNotificationsDiscoverability = ((v60[v12.ExperienceDetailsPageLayer] or {})[l_GetNotificationsExperienceDetailsVariant_0.getNotificationsVariantFieldName] or -1) == 2
        };
    end)(v29);
end;
return l_RoactServices_0.connect({
    localization = v10
})(v29);


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Packages.React);
local l_FormFactor_0 = require(l_CorePackages_0.Workspace.Packages.FormFactor).Enums.FormFactor;
local v4 = require(l_CorePackages_0.Workspace.Packages.RoactUtils);
local l_useDispatch_0 = v4.Hooks.RoactRodux.useDispatch;
local l_useSelector_0 = v4.Hooks.RoactRodux.useSelector;
local l_useRouteName_0 = v4.Hooks.useRouteName;
local v8 = require(l_Modules_0.LuaApp.Services.RoactAnalyticsTopBar);
local v9 = require(l_Modules_0.LuaApp.Components.TopBar.Utils.getIconButtonSize);
local v10 = require(l_Modules_0.LuaApp.Thunks.NavigateDownToAddFriendsPage);
local v11 = require(l_Modules_0.LuaApp.Hooks.useRoactService);
local v12 = require(l_CorePackages_0.UIBlox);
local l_Images_0 = v12.App.ImageSet.Images;
local l_IconButton_0 = v12.App.Button.IconButton;
local l_IconSize_0 = v12.App.ImageSet.Enum.IconSize;
local v16 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppEnableTopBarShowItemsOnSearching);
local v17 = l_Images_0["icons/actions/friends/friendAdd"];
return function(v18)
    local v20 = l_useSelector_0(function(v19)
        return v19.FormFactor;
    end);
    local v21 = v9(v20);
    local v22 = l_useDispatch_0();
    local v23 = l_useRouteName_0();
    local v24 = v11(v8);
    local function v25()
        if not v18.isSearching then
            v22(v10());
            v24.reportAddFriendsButtonClick(v23);
            return ;
        else
            return ;
        end;
    end;
    v2.useEffect(function()
        v18.setVisible((not not v16() and v20 == l_FormFactor_0.WIDE or v18.isUnderTitleSearchBarEnabled) or not v18.isSearching);
    end, {
        v20,
        v18.isUnderTitleSearchBarEnabled,
        v18.isSearching,
        v18.setVisible
    });
    return v2.createElement(l_IconButton_0, {
        icon = v17,
        size = UDim2.new(0, v21, 1, 0),
        iconSize = l_IconSize_0.Medium,
        onActivated = v25,
        buttonRef = v18.buttonRef
    });
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local _ = game:GetService("UserInputService");
local _ = game:GetService("RunService");
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local v5 = require(l_Modules_0.LuaApp.Constants);
local v6 = require(l_CorePackages_0.Packages.Dash);
local v7 = require(l_CorePackages_0.Packages.t);
local v8 = require(l_CorePackages_0.Roact);
local v9 = require(l_CorePackages_0.RoactRodux);
local _ = require(l_CorePackages_0.RoactNavigation);
local v11 = require(l_CorePackages_0.UIBlox);
local l_Images_0 = v11.App.ImageSet.Images;
local l_withStyle_0 = v11.Style.withStyle;
local l_IconButton_0 = v11.App.Button.IconButton;
local l_IconSize_0 = v11.App.ImageSet.Enum.IconSize;
local _ = require(l_Modules_0.LuaApp.Components.TopBar.TopBarConstants);
local v17 = require(l_Modules_0.LuaApp.Components.TopBar.Utils.getIconButtonSize);
local l_FormFactor_0 = require(l_CorePackages_0.Workspace.Packages.FormFactor).Enums.FormFactor;
local v19 = require(l_Modules_0.LuaApp.AppPage);
local v20 = require(l_Modules_0.LuaApp.Thunks.NavigateDown);
local _ = require(l_Modules_0.AvatarExperience.Common.Thunks.NavigateIntoAvatarExperience);
local _ = require(l_Modules_0.LuaApp.Components.NumericalBadge);
local v23 = require(l_Modules_0.LuaApp.Services.RoactAnalyticsTopBar);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v25 = require(l_Modules_0.LuaApp.Actions.SetCurrentToastMessage);
local v26 = require(l_Modules_0.LuaApp.Thunks.OpenPurchaseRobuxPage);
local l_GetFFlagOpenVngShopForVngRobuxPurchase_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetFFlagOpenVngShopForVngRobuxPurchase;
local v28 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppEnableTopBarShowItemsOnSearching);
local v29 = l_Images_0["icons/common/goldrobux"];
local v30 = v8.PureComponent:extend("BuyRobuxButton");
v30.validateProps = v7.strictInterface({
    formFactor = v7.string,
    isCompactView = v7.boolean,
    isUnderTitleSearchBarEnabled = v7.boolean,
    isSearching = v7.boolean,
    isSecondary = v7.optional(v7.boolean),
    setVisible = v6.isCallable,
    cancelSearch = v6.isCallable,
    activateSearch = v6.isCallable,
    buttonRef = v7.optional(v7.table),
    currentRoute = v7.table,
    openPurchaseRobuxPage = v6.isCallable,
    analytics = v7.any,
    disableIAPEntryPoint = v7.boolean
});
v30.init = function(v31)
    v31.showBuyRobuxCallback = function()
        local l_name_0 = v31.props.currentRoute[1].name;
        v31.props.openPurchaseRobuxPage(v31.props.disableIAPEntryPoint);
        v31.props.analytics.reportRobuxButtonClick(l_name_0);
    end;
end;
local function _(v33)
    if v28() and v33.formFactor == l_FormFactor_0.WIDE then
        return true;
    else
        return v33.isUnderTitleSearchBarEnabled or not v33.isSearching;
    end;
end;
v30.updateVisibility = function(v35, v36)
    local l_props_0 = v35.props;
    local v38 = (not not v28() and l_props_0.formFactor == l_FormFactor_0.WIDE or l_props_0.isUnderTitleSearchBarEnabled) or not l_props_0.isSearching;
    if v38 ~= v36 then
        v35.props.setVisible(v38);
    end;
end;
v30.didMount = function(v39)
    v39:updateVisibility(nil);
end;
v30.didUpdate = function(v40, v41, _)
    v40:updateVisibility((not not v28() and v41.formFactor == l_FormFactor_0.WIDE or v41.isUnderTitleSearchBarEnabled) or not v41.isSearching);
end;
v30.render = function(v43)
    return l_withStyle_0(function(_)
        return v8.createElement(l_IconButton_0, {
            size = UDim2.new(0, v17(v43.props.formFactor), 1, 0),
            icon = v29,
            iconSize = l_IconSize_0.Medium,
            onActivated = not not v43.props.isSearching and v43.props.cancelSearch or v43.showBuyRobuxCallback,
            buttonRef = v43.props.buttonRef
        });
    end);
end;
return (l_RoactAppPolicy_0.connect(function(v45)
    return {
        disableIAPEntryPoint = v45.getDisableIAPEntryPoint()
    };
end)((l_RoactServices_0.connect({
    analytics = v23
})((v9.connect(function(v46, _)
    return {
        currentRoute = v46.Navigation.history[#v46.Navigation.history]
    };
end, function(v48)
    return {
        openPurchaseRobuxPage = function(v49)
            if not v49 then
                if not l_GetFFlagOpenVngShopForVngRobuxPurchase_0() then
                    return v48(v20({
                        name = v19.PurchaseRobux
                    }));
                else
                    return v48(v26());
                end;
            else
                v48(v25(v5.WEBVIEWS_UNAVAILABLE_TOAST));
                return ;
            end;
        end
    };
end)(v30))))));


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local _ = game:GetService("UserInputService");
local _ = game:GetService("RunService");
local l_IXPService_0 = game:GetService("IXPService");
local v5 = require(l_CorePackages_0.Packages.Dash);
local v6 = require(l_CorePackages_0.Packages.t);
local v7 = require(l_CorePackages_0.Roact);
local v8 = require(l_CorePackages_0.RoactRodux);
local _ = require(l_CorePackages_0.RoactNavigation);
local v10 = require(l_CorePackages_0.UIBlox);
local l_Images_0 = v10.App.ImageSet.Images;
local l_withStyle_0 = v10.Style.withStyle;
local l_IconButton_0 = v10.App.Button.IconButton;
local l_IconSize_0 = v10.App.ImageSet.Enum.IconSize;
local _ = require(l_Modules_0.LuaApp.Components.TopBar.TopBarConstants);
local v16 = require(l_Modules_0.LuaApp.Components.TopBar.Utils.getIconButtonSize);
local l_FormFactor_0 = require(l_CorePackages_0.Workspace.Packages.FormFactor).Enums.FormFactor;
local v18 = require(l_Modules_0.LuaApp.AppPage);
local v19 = require(l_Modules_0.LuaApp.Thunks.NavigateDown);
local _ = require(l_Modules_0.AvatarExperience.Common.Thunks.NavigateIntoAvatarExperience);
local v21 = require(l_Modules_0.LuaApp.Components.NumericalBadge);
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local v23 = require(l_Modules_0.LuaApp.Services.RoactAnalyticsTopBar);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v25 = require(l_Modules_0.LuaApp.Experiment.AppUserLayers);
local v26 = require(l_Modules_0.LuaApp.Experiment.RoactAppExperiment);
local v27 = require(l_Modules_0.LuaApp.Flags.GetFFlagReportNotificationStreamCTA);
local v28 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppEnableTopBarShowItemsOnSearching);
local v29 = l_Images_0["icons/common/notificationOn"];
local l_GetFFlagLuaAppNewStreamNotificationsEnabled_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetFFlagLuaAppNewStreamNotificationsEnabled;
local l_StreamNotificationsBellIcon_0 = require(l_CorePackages_0.Workspace.Packages.StreamNotifications).StreamNotificationsBellIcon;
local v32 = v7.PureComponent:extend("NotificationsButton");
v32.validateProps = v6.strictInterface({
    formFactor = v6.string,
    isCompactView = v6.boolean,
    isUnderTitleSearchBarEnabled = v6.boolean,
    isSearching = v6.boolean,
    isSecondary = v6.optional(v6.boolean),
    setVisible = v5.isCallable,
    cancelSearch = v5.isCallable,
    activateSearch = v5.isCallable,
    buttonRef = v6.optional(v6.table),
    newStreamNotificationsEnabled = v6.optional(v6.boolean),
    numberOfNotifications = v6.integer,
    openNotificationsPage = v5.isCallable,
    analytics = v6.table,
    enableNotifications = v6.boolean
});
v32.init = function(v33)
    v33.showNotificationsCallback = function()
        v33.props.openNotificationsPage(not not l_GetFFlagLuaAppNewStreamNotificationsEnabled_0() and v33.props.newStreamNotificationsEnabled);
        v33.props.analytics.reportNSButtonTouch((tonumber(v33.props.numberOfNotifications)));
        if l_GetFFlagLuaAppNewStreamNotificationsEnabled_0() then
            l_IXPService_0:LogUserLayerExposure(v25.NotificationsStreamNotificationUXLayer);
        end;
    end;
end;
local function _(v34)
    if v28() and v34.formFactor == l_FormFactor_0.WIDE then
        return v34.enableNotifications;
    else
        return v34.enableNotifications and (v34.isUnderTitleSearchBarEnabled or not v34.isSearching);
    end;
end;
v32.updateVisibility = function(v36, v37)
    local l_props_0 = v36.props;
    local v39 = if not not v28() and l_props_0.formFactor == l_FormFactor_0.WIDE then l_props_0.enableNotifications else l_props_0.enableNotifications and (l_props_0.isUnderTitleSearchBarEnabled or not l_props_0.isSearching);
    if v39 ~= v37 then
        v36.props.setVisible(v39);
    end;
end;
v32.reportCTAIfNecessary = function(v40, v41)
    if v27() then
        local v42 = tonumber(v40.props.numberOfNotifications);
        local v43 = not not v41 and tonumber(v41.numberOfNotifications) or 0;
        if v42 > 0 and v43 == 0 then
            v40.props.analytics.reportNSOpenCTAShown(v42);
        end;
    end;
end;
v32.didMount = function(v44)
    v44:updateVisibility(nil);
end;
v32.didUpdate = function(v45, v46, _)
    v45:updateVisibility(if not not v28() and v46.formFactor == l_FormFactor_0.WIDE then v46.enableNotifications else v46.enableNotifications and (v46.isUnderTitleSearchBarEnabled or not v46.isSearching));
    v45:reportCTAIfNecessary(v46);
end;
v32.render = function(v48)
    return l_withStyle_0(function(v49)
        local l_numberOfNotifications_0 = v48.props.numberOfNotifications;
        local v51 = v16(v48.props.formFactor);
        if not (not not l_GetFFlagLuaAppNewStreamNotificationsEnabled_0() and v48.props.newStreamNotificationsEnabled) then
            return v7.createElement(l_IconButton_0, {
                size = UDim2.new(0, v51, 1, 0),
                icon = v29,
                iconSize = l_IconSize_0.Medium,
                iconColor3 = v49.Theme.SystemPrimaryDefault.Color,
                iconTransparency = v49.Theme.SystemPrimaryDefault.Transparency,
                onActivated = not not v48.props.isSearching and v48.props.cancelSearch or v48.showNotificationsCallback,
                buttonRef = v48.props.buttonRef
            }, {
                NotificationBadge = v7.createElement(v21, {
                    AnchorPoint = Vector2.new(0, 1),
                    Position = UDim2.new(0.5, 0, 0.5, 0),
                    badgeCount = l_numberOfNotifications_0 and tonumber(l_numberOfNotifications_0),
                    redBadgeVariant = true
                })
            });
        else
            return v7.createElement(l_StreamNotificationsBellIcon_0, {
                notificationCount = l_numberOfNotifications_0 and tonumber(l_numberOfNotifications_0),
                compactWidth = v48.props.formFactor == l_FormFactor_0.COMPACT
            });
        end;
    end);
end;
return (l_RoactAppPolicy_0.connect(function(v52, _)
    return {
        enableNotifications = v52.getWebViewSupport() and v52.getNotifications()
    };
end)((l_RoactServices_0.connect({
    analytics = v23
})((v8.connect(function(v54, _)
    return {
        numberOfNotifications = v54.NotificationBadgeCounts.TopBarNotificationIcon or 0
    };
end, function(v56, _)
    return {
        openNotificationsPage = function()
            return v56(v19({
                name = v18.Notifications
            }));
        end
    };
end)(if not l_GetFFlagLuaAppNewStreamNotificationsEnabled_0() then v26.connectUserLayer({
    v25.NotificationsStreamNotificationUXLayer
}, function(v58)
    return {
        newStreamNotificationsEnabled = (v58[v25.NotificationsStreamNotificationUXLayer] or {}).newStreamNotificationsEnabled or false
    };
end)(v32) else v26.connectUserLayer({
    v25.NotificationsStreamNotificationUXLayer
}, function(v59)
    return {
        newStreamNotificationsEnabled = (v59[v25.NotificationsStreamNotificationUXLayer] or {}).newStreamNotificationsEnabled or false
    };
end, false)(v32)))))));


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local _ = game:GetService("UserInputService");
local _ = game:GetService("RunService");
local v4 = require(l_CorePackages_0.Packages.Dash);
local v5 = require(l_CorePackages_0.Packages.t);
local v6 = require(l_CorePackages_0.Roact);
local _ = require(l_CorePackages_0.RoactRodux);
local _ = require(l_CorePackages_0.RoactNavigation);
local v9 = require(l_CorePackages_0.UIBlox);
local l_Images_0 = v9.App.ImageSet.Images;
local l_withStyle_0 = v9.Style.withStyle;
local l_IconButton_0 = v9.App.Button.IconButton;
local l_IconSize_0 = v9.App.ImageSet.Enum.IconSize;
local _ = require(l_Modules_0.LuaApp.Components.TopBar.TopBarConstants);
local v15 = require(l_Modules_0.LuaApp.Components.TopBar.Utils.getIconButtonSize);
local _ = require(l_CorePackages_0.Workspace.Packages.FormFactor).Enums.FormFactor;
local _ = require(l_Modules_0.LuaApp.AppPage);
local _ = require(l_Modules_0.LuaApp.Thunks.NavigateDown);
local _ = require(l_Modules_0.AvatarExperience.Common.Thunks.NavigateIntoAvatarExperience);
local _ = require(l_Modules_0.LuaApp.Components.NumericalBadge);
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local _ = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v23 = l_Images_0["icons/common/search"];
local v24 = v6.PureComponent:extend("SearchButton");
v24.validateProps = v5.strictInterface({
    formFactor = v5.string,
    isCompactView = v5.boolean,
    isUnderTitleSearchBarEnabled = v5.boolean,
    isSearching = v5.boolean,
    isSecondary = v5.optional(v5.boolean),
    setVisible = v4.isCallable,
    cancelSearch = v4.isCallable,
    activateSearch = v4.isCallable,
    buttonRef = v5.optional(v5.table),
    enableSearch = v5.boolean
});
local function _(v25)
    return (v25.enableSearch and v25.isCompactView) and not v25.isUnderTitleSearchBarEnabled;
end;
v24.updateVisibility = function(v27, v28)
    local l_props_0 = v27.props;
    local v30 = (l_props_0.enableSearch and l_props_0.isCompactView) and not l_props_0.isUnderTitleSearchBarEnabled;
    if v30 ~= v28 then
        v27.props.setVisible(v30);
    end;
end;
v24.didMount = function(v31)
    v31:updateVisibility(nil);
end;
v24.didUpdate = function(v32, v33, _)
    v32:updateVisibility((v33.enableSearch and v33.isCompactView) and not v33.isUnderTitleSearchBarEnabled);
end;
v24.render = function(v35)
    return l_withStyle_0(function(v36)
        return v6.createElement(l_IconButton_0, {
            size = UDim2.new(0, v15(v35.props.formFactor), 1, 0),
            layoutOrder = 3,
            icon = v23,
            iconSize = l_IconSize_0.Medium,
            iconColor3 = v36.Theme.SystemPrimaryDefault.Color,
            iconTransparency = v36.Theme.SystemPrimaryDefault.Transparency,
            onActivated = v35.props.activateSearch,
            buttonRef = v35.props.buttonRef
        });
    end);
end;
return (l_RoactAppPolicy_0.connect(function(v37, _)
    return {
        enableSearch = v37.getSearchBar()
    };
end)(v24));


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local l_GuiService_0 = game:GetService("GuiService");
local l_RunService_0 = game:GetService("RunService");
local v4 = require(l_CorePackages_0.Packages.Dash);
local v5 = require(l_CorePackages_0.Packages.t);
local v6 = require(l_CorePackages_0.Roact);
local v7 = require(l_CorePackages_0.RoactRodux);
local v8 = require(l_CorePackages_0.RoactNavigation);
local v9 = require(l_CorePackages_0.UIBlox);
local l_Images_0 = v9.App.ImageSet.Images;
local l_withStyle_0 = v9.Style.withStyle;
local l_IconButton_0 = v9.App.Button.IconButton;
local l_IconSize_0 = v9.App.ImageSet.Enum.IconSize;
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v15 = require(l_Modules_0.LuaApp.Services.RoactAnalyticsTopBar);
local v16 = require(l_Modules_0.LuaApp.AppPage);
local v17 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local v18 = require(l_CorePackages_0.Packages.RoactGamepad);
local v19 = require(l_Modules_0.LuaApp.Thunks.NavigateBack);
local v20 = require(l_Modules_0.LuaApp.AppPageProperties);
local v21 = require(l_Modules_0.LuaApp.Components.TopBar.TopBarConstants);
local l_GetFFlagEnableUseShowTopBar_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).GetFFlagEnableUseShowTopBar;
local l_FFlagLuaAppImproveInfoPeekView_0 = require(l_CorePackages_0.Workspace.Packages.AppBlox).FFlagLuaAppImproveInfoPeekView;
local v24 = require(l_Modules_0.LuaApp.Flags.FFlagLuaAppImproveAccountSwitcherPeekView);
local v25 = l_GuiService_0:IsTenFootInterface();
local v26 = l_Images_0["icons/navigation/pushBack"];
return function(v27, v28)
    local v29 = v6.PureComponent:extend("BackButton");
    v29.validateProps = v5.strictInterface({
        formFactor = v5.string,
        isCompactView = v5.boolean,
        isUnderTitleSearchBarEnabled = v5.boolean,
        isSearching = v5.boolean,
        isSecondary = v5.optional(v5.boolean),
        setVisible = v4.isCallable,
        cancelSearch = v4.isCallable,
        activateSearch = v4.isCallable,
        buttonRef = v5.optional(v5.table),
        currentRoute = v5.table,
        navigateBack = v4.isCallable,
        navigation = v5.table,
        analytics = v5.table
    });
    local function _(v30)
        if not if not l_GetFFlagEnableUseShowTopBar_0() then v25 else false then
            local l_currentRoute_0 = v30.currentRoute;
            return l_currentRoute_0[#l_currentRoute_0].name == v16.AvatarExperienceRoot;
        else
            return true;
        end;
    end;
    local function _(v33)
        return ((not not v33 and v33.state) and v33.state.routeName or "") ~= v17.AvatarExperienceLandingPage;
    end;
    v29.init = function(v35)
        v35.defaultBackButtonHandler = function()
            local l_analytics_0 = v35.props.analytics;
            local l_currentRoute_1 = v35.props.currentRoute;
            local l_navigation_0 = v35.props.navigation;
            local l_navigateBack_0 = v35.props.navigateBack;
            local l_props_0 = v35.props;
            local v41;
            if not if not l_GetFFlagEnableUseShowTopBar_0() then v25 else false then
                local l_currentRoute_2 = l_props_0.currentRoute;
                v41 = l_currentRoute_2[#l_currentRoute_2].name == v16.AvatarExperienceRoot;
            else
                v41 = true;
            end;
            if not v41 then
                l_analytics_0.reportBackButtonClick(l_currentRoute_1[#l_currentRoute_1].name);
                l_navigateBack_0();
                return ;
            else
                l_analytics_0.reportBackButtonClick(l_navigation_0.state.routeName);
                l_navigation_0.goBack();
                return ;
            end;
        end;
        v35.onBackButtonActivated = v27 or v35.defaultBackButtonHandler;
    end;
    local function v49(v43)
        if not v28 then
            local v44;
            if not if not l_GetFFlagEnableUseShowTopBar_0() then v25 else false then
                local l_currentRoute_3 = v43.currentRoute;
                v44 = l_currentRoute_3[#l_currentRoute_3].name == v16.AvatarExperienceRoot;
            else
                v44 = true;
            end;
            if not v44 then
                v44 = v43.currentRoute;
                for v46 = #v44, 1, -1 do
                    local l_name_0 = v44[v46].name;
                    if ((((((((l_name_0 ~= v16.GameDetail and l_name_0 ~= v16.ProfilePeekView) and l_name_0 ~= v16.InviteLinkExpiredModal) and l_name_0 ~= v16.ShareLinkInvalidModal) and l_name_0 ~= v16.SocialMessageToast) and l_name_0 ~= v16.SquadPage) and (not l_FFlagLuaAppImproveInfoPeekView_0 or l_name_0 ~= v16.InfoPeekView)) and (not l_FFlagLuaAppImproveInfoPeekView_0 or l_name_0 ~= v16.SponsoredTooltipPeekView)) and (not v24 or l_name_0 ~= v16.AccountSelectorPeekView)) and (not v24 or l_name_0 ~= v16.AccountSwitchingAddAccountPeekView) then
                        if (not v20[l_name_0] or not v20[l_name_0].nativeWrapper) or l_RunService_0:IsStudio() then
                            return v46 > 1;
                        else
                            return false;
                        end;
                    end;
                end;
                return false;
            else
                local l_navigation_1 = v43.navigation;
                return ((not not l_navigation_1 and l_navigation_1.state) and l_navigation_1.state.routeName or "") ~= v17.AvatarExperienceLandingPage;
            end;
        else
            return true;
        end;
    end;
    v29.updateVisibility = function(v50, v51)
        local v52 = v49(v50.props);
        if v52 ~= v51 then
            v50.props.setVisible(v52);
        end;
    end;
    v29.didMount = function(v53)
        v53:updateVisibility(nil);
    end;
    v29.didUpdate = function(v54, v55, _)
        v54:updateVisibility((v49(v55)));
    end;
    v29.render = function(v57)
        return l_withStyle_0(function(v58)
            return v6.createElement(l_IconButton_0, {
                size = UDim2.new(0, v21.BACK_BUTTON_SIZE, 1, 0),
                position = if not v57.props.isSecondary then nil else UDim2.new(0, 0, 0, -8),
                icon = v26,
                iconSize = l_IconSize_0.Medium,
                iconColor3 = v58.Theme.SystemPrimaryDefault.Color,
                iconTransparency = v58.Theme.SystemPrimaryDefault.Transparency,
                onActivated = v57.onBackButtonActivated,
                inputBindings = {
                    Back = v18.Input.onBegin(Enum.KeyCode.ButtonB, v57.onBackButtonActivated)
                },
                buttonRef = v57.props.buttonRef
            });
        end);
    end;
    return (v7.connect(function(v59, _)
        local l_history_0 = v59.Navigation.history;
        return {
            currentRoute = l_history_0[#l_history_0]
        };
    end, function(v62)
        return {
            navigateBack = function()
                return v62(v19());
            end
        };
    end)((l_RoactServices_0.connect({
        analytics = v15
    })((v8.withNavigation(v29))))));
end;


return {
    Container = require(script.Parent.TopBarContainer),
    PageContent = require(script.Parent.TopBarPageContent),
    PageWrapper = require(script.Parent.TopBarPageWrapper),
    makeBackButton = require(script.Parent.Buttons.makeBackButton),
    BackButton = require(script.Parent.Buttons.BackButton),
    BuyRobuxButton = require(script.Parent.Buttons.BuyRobuxButton),
    NotificationsButton = require(script.Parent.Buttons.NotificationsButton),
    SearchButton = require(script.Parent.Buttons.SearchButton),
    AddFriendsPageButton = if not require(game:GetService("CorePackages").Workspace.Packages.SocialCommon).Experiments.NewChatTabExperimentation.default.isEnabled() then nil else require(script.Parent.Buttons.AddFriendsPageButton),
    selectTopBarHeight = require(script.Parent.Utils.selectTopBarHeight),
    selectTopBarHeightNoBanners = require(script.Parent.Utils.selectTopBarHeightNoBanners),
    Constants = require(script.Parent.TopBarConstants),
    getIconButtonSize = require(script.Parent.Utils.getIconButtonSize),
    GridConfig = require(script.Parent.Utils.TopBarGridConfig)
};


local _ = game:GetService("CoreGui").RobloxGui.Modules;
return {
    ICON_IMAGE_SIZE = 36,
    DEFAULT_ICON_BUTTON_SIZE = 44,
    BACK_BUTTON_SIZE = 28,
    COMPACT_WIDTH_BREAKPOINT = 1180
};


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local l_UserInputService_0 = game:GetService("UserInputService");
local v3 = require(l_CorePackages_0.UIBlox);
local l_withStyle_0 = v3.Style.withStyle;
local l_HeaderBar_0 = v3.App.Bar.HeaderBar;
local l_getPageMargin_0 = v3.App.Container.getPageMargin;
local l_withGridConfig_DEPRECATED_0 = v3.Core.Layout.Grid.withGridConfig_DEPRECATED;
local v8 = require(l_CorePackages_0.Packages.t);
local v9 = require(l_CorePackages_0.Cryo);
local v10 = require(l_CorePackages_0.Packages.Dash);
local v11 = require(l_CorePackages_0.Roact);
local v12 = require(l_CorePackages_0.RoactRodux);
local v13 = require(l_CorePackages_0.Packages.RoactGamepad);
local v14 = require(l_CorePackages_0.RoactNavigation);
local l_Focusable_0 = v13.Focusable;
local v16 = require(l_Modules_0.LuaApp.Services.RoactAnalyticsTopBar);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local l_AppSessionService_0 = require(l_CorePackages_0.Workspace.Packages.RoactServiceTags).AppSessionService;
local v19 = require(l_Modules_0.LuaApp.Services.AppEventIngestService);
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local v21 = require(l_Modules_0.LuaApp.Experiment.RoactAppExperiment);
local v22 = require(l_Modules_0.LuaApp.Experiment.AppUserLayers);
local v23 = require(l_Modules_0.LuaApp.Thunks.ConfirmSearch);
local v24 = require(l_Modules_0.LuaApp.AppPage);
local v25 = require(l_Modules_0.LuaApp.AppPageProperties);
local v26 = require(l_Modules_0.LuaApp.Actions.SetTopBarHeight);
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local l_FormFactor_0 = require(l_CorePackages_0.Workspace.Packages.FormFactor).Enums.FormFactor;
local v29 = require(l_Modules_0.LuaApp.Constants);
local v30 = require(l_Modules_0.LuaApp.AppPageLocalizationKeys);
local v31 = require(l_Modules_0.LuaApp.Components.SearchBar);
local l_SessionType_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppSessionization).SessionType;
local v33 = require(l_Modules_0.LuaApp.Analytics.Events.search);
local v34 = require(l_Modules_0.LuaApp.Common.wrapComponent);
local l_ExternalEventConnection_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).ExternalEventConnection;
local v36 = require(l_Modules_0.LuaApp.Components.Banner.useBannerContainer);
local v37 = require(l_Modules_0.LuaApp.Flags.UseGameDetailsPeekView);
local v38 = require(l_Modules_0.LuaApp.Context.withTopBarSearchSignal);
local v39 = require(l_Modules_0.LuaApp.Components.SignalConnection);
local v40 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.withAvatarRoute);
local v41 = require(script.Parent.Buttons.SearchButton);
local l_LayoutConfig_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppEnums).LayoutConfig;
local v43 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppPhoneModeUnderTitleSearchBar);
local v44 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppPhoneModeUnderTitleSearchBarIXP);
local v45 = require(l_Modules_0.LuaApp.Flags.GetFFlagLuaAppEnableTopBarShowItemsOnSearching);
local v46 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagAvatarAutocompleteEnabledForAll);
local v47 = require(l_Modules_0.LuaApp.Flags.FFlagOmniSearchUpdatePlaceholderTextIXP);
local l_FFlagCleanPlayerSearchProp_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).FFlagCleanPlayerSearchProp;
local l_FFlagOmniSearchAutoTabIXP_0 = require(l_CorePackages_0.Workspace.Packages.SharedFlags).FFlagOmniSearchAutoTabIXP;
local l_NAV_BAR_SIZE_0 = v29.NAV_BAR_SIZE;
local v51 = {
    [Enum.UserInputType.Gamepad1] = true,
    [Enum.UserInputType.Gamepad2] = true,
    [Enum.UserInputType.Gamepad3] = true,
    [Enum.UserInputType.Gamepad4] = true,
    [Enum.UserInputType.Gamepad5] = true,
    [Enum.UserInputType.Gamepad6] = true,
    [Enum.UserInputType.Gamepad7] = true,
    [Enum.UserInputType.Gamepad8] = true
};
local v52 = v11.Component:extend("TopBarContainer");
v52.validateProps = v8.strictInterface({
    searchType = v8.string,
    ZIndex = v8.number,
    hideSiteMessageBanner = v8.boolean,
    forceCompactMode = v8.boolean,
    transparentBackground = v8.boolean,
    searchParameters = v8.optional(v8.table),
    onConfirmSearchCallback = v8.optional(v8.callback),
    titleText = v8.optional(v8.string),
    NextSelectionUp = v8.optional(v8.table),
    NextSelectionDown = v8.optional(v8.table),
    NextSelectionLeft = v8.optional(v8.table),
    NextSelectionRight = v8.optional(v8.table),
    leftItem = v8.optional(v8.any),
    centerItem = v8.optional(v8.any),
    rightItems = v8.optional(v8.array(v8.any)),
    isSecondary = v8.optional(v8.boolean),
    useParentSizeForCenterItem = v8.optional(v8.boolean),
    setDefaultRefOverride = v8.optional(v8.callback),
    gridConfig = v8.optional(v8.table),
    focusController = v8.optional(v8.table),
    totalBannerHeight = v8.optional(v8.number),
    bannerContainer = v8.optional(v8.table),
    screenSize = v8.Vector2,
    formFactor = v8.string,
    currentRoute = v8.table,
    navigationHistory = v8.table,
    showSearchBar = v8.boolean,
    statusBarHeight = v8.number,
    userId = v8.string,
    opaquePage = v8.string,
    confirmSearch = v8.callback,
    setTopBarHeight = v8.callback,
    analytics = v8.table,
    sessionService = v8.optional(v8.union(v8.Instance, v8.table)),
    eventIngest = v8.table,
    enableNotifications = v8.boolean,
    enableSearch = v8.boolean,
    enableSearchAutoComplete = v8.boolean,
    phoneModeUnderTitleSearchBar = v8.optional(v8.boolean),
    shouldUpdateSearchPlaceholderText = if not v47 then nil else v8.optional(v8.boolean),
    navigation = v8.table,
    avatarRoute = v8.optional(v8.table),
    forwardRef = v8.optional(v8.table)
});
v52.defaultProps = {
    searchType = v29.SearchTypes.Games,
    enableSearch = false,
    ZIndex = 2,
    phoneModeUnderTitleSearchBar = false,
    shouldUpdateSearchPlaceholderText = if not v47 then nil else false,
    onConfirmSearchCallback = nil,
    hideSiteMessageBanner = false,
    forceCompactMode = false,
    transparentBackground = false,
    rightItems = {}
};
local function v60(v53)
    if not v43() and not v44() then
        return false;
    else
        local v54 = v43() or v53.phoneModeUnderTitleSearchBar;
        local l_formFactor_0 = v53.formFactor;
        local l_currentRoute_0 = v53.currentRoute;
        local l_name_0 = l_currentRoute_0[#l_currentRoute_0].name;
        local v58 = #l_currentRoute_0 > 1 and l_currentRoute_0[#l_currentRoute_0 - 1].name or "";
        local l_v54_0 = v54;
        if l_v54_0 then
            l_v54_0 = false;
            if l_formFactor_0 == l_FormFactor_0.COMPACT then
                l_v54_0 = true;
                if l_name_0 ~= v24.Home then
                    l_v54_0 = true;
                    if l_name_0 ~= v24.Games then
                        if v58 == v24.Home then
                            l_v54_0 = true;
                            if not (l_name_0 ~= v24.GameDetail) then
                                goto label0;
                            end;
                        end;
                        l_v54_0 = false;
                        if v58 == v24.Games then
                            l_v54_0 = l_name_0 == v24.GameDetail;
                        end;
                    end;
                end;
            end;
        end;
        ::label0::;
        return l_v54_0;
    end;
end;
local _ = function(v61, _)
    local l_statusBarHeight_0 = v61.statusBarHeight;
    local v64 = nil;
    v64 = (l_statusBarHeight_0 + l_NAV_BAR_SIZE_0) + math.round(v61.totalBannerHeight);
    if v60(v61) then
        v64 = v64 + 55;
    end;
    return v64 + 2 * v61.gridConfig[l_LayoutConfig_0.Keys.PaddingVertical];
end;
local function _(v66)
    if v66 == v29.SearchTypes.Auto then
        return v29.SearchTypes.Games;
    else
        return v66;
    end;
end;
v52.shouldUpdate = function(v68, v69, v70)
    if v70 ~= v68.state then
        return true;
    elseif v69 == v68.props then
        return false;
    else
        for v71, v72 in pairs(v69) do
            if v71 ~= "rightItems" and v68.props[v71] ~= v72 then
                return true;
            end;
        end;
        for v73, v74 in pairs(v68.props) do
            if v73 ~= "rightItems" and v69[v73] ~= v74 then
                return true;
            end;
        end;
        return not v10.shallowEqual(v68.props.rightItems, v69.rightItems);
    end;
end;
v52.getPageOwner = function(v75)
    return v75.props.navigation.state.routeName;
end;
local function _(v76)
    local l_currentRoute_1 = v76.currentRoute;
    local l_name_1 = l_currentRoute_1[#l_currentRoute_1].name;
    local v79 = nil;
    v79 = if not v76.avatarRoute then v76.opaquePage else v76.avatarRoute.opaque.name;
    local l_routeName_0 = v76.navigation.state.routeName;
    local v81 = true;
    if l_routeName_0 ~= l_name_1 then
        v81 = l_routeName_0 == v79;
    end;
    return v81;
end;
v52.updateTopBarHeight = function(v83, v84, v85)
    local l_props_0 = v83.props;
    local l_state_0 = v83.state;
    local l_statusBarHeight_1 = l_props_0.statusBarHeight;
    local v89 = nil;
    v89 = (l_statusBarHeight_1 + l_NAV_BAR_SIZE_0) + math.round(l_props_0.totalBannerHeight);
    if v60(l_props_0) then
        v89 = v89 + 55;
    end;
    local v90 = v89 + 2 * l_props_0.gridConfig[l_LayoutConfig_0.Keys.PaddingVertical];
    l_state_0 = v83.props;
    l_statusBarHeight_1 = l_state_0.currentRoute;
    v89 = l_statusBarHeight_1[#l_statusBarHeight_1].name;
    local v91 = nil;
    v91 = if not l_state_0.avatarRoute then l_state_0.opaquePage else l_state_0.avatarRoute.opaque.name;
    local l_routeName_1 = l_state_0.navigation.state.routeName;
    l_props_0 = true;
    if l_routeName_1 ~= v89 then
        l_props_0 = l_routeName_1 == v91;
    end;
    if not (not v84 or not v85) and v84.navigation == v83.props.navigation then
        l_statusBarHeight_1 = v84.statusBarHeight;
        v89 = nil;
        v89 = (l_statusBarHeight_1 + l_NAV_BAR_SIZE_0) + math.round(v84.totalBannerHeight);
        if v60(v84) then
            v89 = v89 + 55;
        end;
        l_state_0 = v89 + 2 * v84.gridConfig[l_LayoutConfig_0.Keys.PaddingVertical];
        v89 = v84.currentRoute;
        v91 = v89[#v89].name;
        l_routeName_1 = nil;
        l_routeName_1 = if not v84.avatarRoute then v84.opaquePage else v84.avatarRoute.opaque.name;
        local l_routeName_2 = v84.navigation.state.routeName;
        l_statusBarHeight_1 = true;
        if l_routeName_2 ~= v91 then
            l_statusBarHeight_1 = l_routeName_2 == l_routeName_1;
        end;
        if l_state_0 == v90 and l_props_0 == l_statusBarHeight_1 then
            return ;
        end;
    end;
    if l_props_0 then
        v83.props.setTopBarHeight(v90);
    end;
end;
v52.init = function(v94)
    v94.searchBarRef = v11.createRef();
    v94.isMounted = false;
    v94.rightItemRefs = v13.createRefCache();
    v94.itemDefaultChildRefs = v13.createRefCache();
    v94.leftItemRef = v11.createRef();
    v94.centerItemRef = v11.createRef();
    v94.buttonVisibilityCallbacks = {};
    v94.state = {
        isSearching = false,
        absolutePosition = Vector2.new(0, 0),
        lastInputType = l_UserInputService_0:GetLastInputType(),
        hiddenItems = {}
    };
    v94:bindFunctions();
    v94:updateTopBarHeight();
end;
v52.bindFunctions = function(v95)
    v95.onSearchButtonActivated = function()
        if v95.isMounted then
            v95:setIsSearching(true);
            local l_currentRoute_2 = v95.props.currentRoute;
            v95.props.analytics.reportSearchButtonClick(l_currentRoute_2[#l_currentRoute_2].name);
            return ;
        else
            return ;
        end;
    end;
    v95.onExitSearch = function()
        if v95.isMounted then
            v95:setIsSearching(false);
            return ;
        else
            return ;
        end;
    end;
    v95.cancelSearchCallback = function()
        if v95.isMounted then
            local l_searchType_0 = v95.props.searchType;
            local v98 = if not l_FFlagOmniSearchAutoTabIXP_0 then nil else l_searchType_0 == v29.SearchTypes.Auto;
            if l_searchType_0 ~= v29.SearchTypes.Games and (not l_FFlagOmniSearchAutoTabIXP_0 or not v98) then
                if l_searchType_0 == v29.SearchTypes.Players then
                    v33(v95.props.eventIngest, "players", "cancel", nil);
                elseif l_searchType_0 == v29.SearchTypes.Catalog then
                    v95.props.analytics.reportSearchCanceled("catalog");
                end;
            else
                v33(v95.props.eventIngest, "games", "cancel", nil, if not l_FFlagOmniSearchAutoTabIXP_0 then nil else v98);
            end;
            v95.onExitSearch();
            return ;
        else
            return ;
        end;
    end;
    v95.cancelSearchAndEndSession = function()
        v95.cancelSearchCallback();
        if v95.props.searchType == v29.SearchTypes.Games then
            v95.props.sessionService:RemoveSession(l_SessionType_0.StructuralIdentifier.GameSearchAutocomplete);
        end;
    end;
    v95.onSearchBarFocused = function()
        if v95.isMounted then
            local l_searchType_1 = v95.props.searchType;
            local v100 = if not l_FFlagOmniSearchAutoTabIXP_0 then nil else l_searchType_1 == v29.SearchTypes.Auto;
            if l_searchType_1 ~= v29.SearchTypes.Games and (not l_FFlagOmniSearchAutoTabIXP_0 or not v100) then
                if l_searchType_1 == v29.SearchTypes.Players then
                    v33(v95.props.eventIngest, "players", "open", nil);
                elseif l_searchType_1 == v29.SearchTypes.Catalog then
                    v95.props.analytics.reportSearchFocused("catalog");
                end;
            else
                if v95.props.enableSearchAutoComplete then
                    v95.props.sessionService:SetSession(l_SessionType_0.StructuralIdentifier.Level1, l_SessionType_0.StructuralIdentifier.GameSearchAutocomplete, l_SessionType_0.StructuralIdentifier.GameSearchAutocomplete);
                end;
                v33(v95.props.eventIngest, "games", "open", nil, if not l_FFlagOmniSearchAutoTabIXP_0 then nil else v100);
            end;
            v95:setIsSearching(true);
            return ;
        else
            return ;
        end;
    end;
    v95.onTextCleared = function()
        if v95.isMounted then
            return ;
        else
            return ;
        end;
    end;
    v95.confirmSearchCallback = function(v101, v102, v103)
        if v95.isMounted then
            local l_searchType_2 = v95.props.searchType;
            v95.props.confirmSearch(v101, {
                isAutocompleteSuggestion = v102,
                allAutocompleteSuggestions = v103,
                searchType = l_searchType_2,
                playerSearch = not l_FFlagCleanPlayerSearchProp_0 and true or nil,
                isAvatarAutocompleteEnabled = v46(),
                navigation = v95.props.navigation,
                pageOwner = v95:getPageOwner(),
                sessionService = v95.props.sessionService,
                eventIngest = v95.props.eventIngest,
                topBarAnalytics = v95.props.analytics
            });
            if v29.IsSearchTypeInOmniSearch(l_searchType_2) or l_searchType_2 == v29.SearchTypes.Catalog then
                v95.onExitSearch();
            end;
            if not (not v46() or not v95.props.onConfirmSearchCallback) then
                v95.props.onConfirmSearchCallback();
            end;
            return ;
        else
            return ;
        end;
    end;
    v95.absolutePositionChangedCallback = function(v105)
        v95:setState({
            absolutePosition = v105.AbsolutePosition
        });
    end;
    v95.searchSignalCallback = function(v106)
        if v95:getPageOwner() == v106 then
            v95.onSearchButtonActivated();
        end;
    end;
end;
v52.setIsSearching = function(v107, v108)
    v107:setState({
        isSearching = v108
    });
    if v107.props.setDefaultRefOverride then
        v107.props.setDefaultRefOverride(if not v108 then nil else v107.searchBarRef);
    end;
end;
v52.didMount = function(v109)
    v109.isMounted = true;
end;
v52.willUnmount = function(v110)
    v110.isMounted = false;
    if v110.abTestConnection then
        v110.abTestConnection:disconnect();
        v110.abTestConnection = nil;
    end;
end;
v52.isCompactViewMode = function(v111)
    return v111.props.forceCompactMode or v111.props.formFactor == l_FormFactor_0.COMPACT;
end;
v52.getPageNameLocalizationKey = function(v112)
    return v30[v112.props.navigation.state.routeName] or v30[v112.props.currentRoute[1].name];
end;
v52.maybeRenderRightItems = function(v113, v114, v115, v116)
    if not v115 or v60(v113.props) then
        return v113:renderRightItems(v114, if not v113:shouldShowCenterItem() then if v116 then v113.leftItemRef else nil else v113.centerItemRef);
    else
        return {};
    end;
end;
v52.renderRightItems = function(v117, _, v119)
    local v120 = {};
    v120 = v117.props.rightItems;
    local v121 = {};
    local function v124(v122)
        while true do
            if v122 < #v120 then
                v122 = v122 + 1;
                local v123 = v120[v122];
                if not v117.state.hiddenItems[v123] then
                    return v117.rightItemRefs[v123];
                end;
            else
                return nil;
            end;
        end;
    end;
    local function v127(v125)
        while true do
            if v125 > 1 then
                v125 = v125 - 1;
                local v126 = v120[v125];
                if not v117.state.hiddenItems[v126] then
                    return v117.rightItemRefs[v126];
                end;
            else
                return nil;
            end;
        end;
    end;
    for v128, v129 in ipairs(v120) do
        v121["topBarItem_" .. tostring(v128)] = v117:renderTopBarItem(v129, v127(v128) or v119, v124(v128), v128);
    end;
    return v121;
end;
v52.renderTopBarItem = function(v130, v131, v132, v133, v134, v135)
    local l_formFactor_1 = v130.props.formFactor;
    local l_isSearching_0 = v130.state.isSearching;
    local l_isSecondary_0 = v130.props.isSecondary;
    local v139 = v130:isCompactViewMode();
    local v140 = v60(v130.props);
    local v141 = v130:getItemRef(v131);
    local v142 = v130:getItemDefaultChildRef(v131);
    return v11.createElement(l_Focusable_0.Frame, {
        AutomaticSize = if v135 then nil else Enum.AutomaticSize.X,
        Size = if v135 then UDim2.fromScale(1, 1) else UDim2.fromScale(0, 1),
        BackgroundTransparency = 1,
        BorderSizePixel = 0,
        LayoutOrder = v134,
        NextSelectionLeft = v132,
        NextSelectionRight = v133,
        [v11.Ref] = v141,
        defaultChild = v142,
        Visible = not v130.state.hiddenItems[v131]
    }, {
        Button = v11.createElement(v131, {
            formFactor = l_formFactor_1,
            isCompactView = v139,
            isUnderTitleSearchBarEnabled = v140,
            isSearching = l_isSearching_0,
            isSecondary = l_isSecondary_0,
            cancelSearch = v130.cancelSearchAndEndSession,
            activateSearch = v130.onSearchButtonActivated,
            setVisible = v130:getButtonVisibilityCallback(v131),
            buttonRef = v142
        })
    });
end;
v52.shouldShowLeftItem = function(v143)
    local l_leftItem_0 = v143.props.leftItem;
    return (not not l_leftItem_0 and not v143.state.hiddenItems[l_leftItem_0]) and (not v143.state.isSearching or false);
end;
v52.shouldShowCenterItem = function(v145)
    local l_centerItem_0 = v145.props.centerItem;
    return not not l_centerItem_0 and (not v145.state.hiddenItems[l_centerItem_0] or false);
end;
v52.getItemRef = function(v147, v148)
    if v148 == nil then
        return nil;
    elseif v148 == v147.props.leftItem then
        return v147.leftItemRef;
    elseif v148 == v147.props.centerItem then
        return v147.centerItemRef;
    else
        return v147.rightItemRefs[v148];
    end;
end;
v52.getItemDefaultChildRef = function(v149, v150)
    if v150 == nil then
        return nil;
    else
        return v149.itemDefaultChildRefs[v150];
    end;
end;
v52.hasSearchButton = function(v151)
    for _, v153 in ipairs(v151.props.rightItems) do
        if v153 == v41 then
            return true;
        end;
    end;
    return false;
end;
v52.getFirstRightItemRef = function(v154)
    for _, v156 in ipairs(v154.props.rightItems) do
        if not v154.state.hiddenItems[v156] then
            return v154.rightItemRefs[v156];
        end;
    end;
    return nil;
end;
v52.getButtonVisibilityCallback = function(v157, v158)
    local v159 = v157.buttonVisibilityCallbacks[v158];
    if not v159 then
        v159 = function(v160)
            v157:setState(function(v161)
                return {
                    hiddenItems = v9.Dictionary.join(v161.hiddenItems, {
                        [v158] = not v160 or v9.None
                    })
                };
            end);
        end;
        v157.buttonVisibilityCallbacks[v158] = v159;
    end;
    return v159;
end;
v52.getRenderSearchBar = function(v162, v163, v164, v165, v166, v167, v168, v169, v170)
    if not v163 or v60(v162.props) then
        return nil;
    else
        local v171 = if not l_FFlagOmniSearchAutoTabIXP_0 then nil else if v166 == v29.SearchTypes.Auto then v29.SearchTypes.Games else v166;
        return function()
            return v11.createElement(v31, {
                cancelSearch = v162.cancelSearchCallback,
                confirmSearch = v162.confirmSearchCallback,
                onFocused = v162.onSearchBarFocused,
                onTextCleared = v162.onTextCleared,
                isCompactView = v164,
                placeholderText = v165,
                searchType = v166,
                autocomplete = not not v167 and if not l_FFlagOmniSearchAutoTabIXP_0 then v166 == v29.SearchTypes.Games else v171 == v29.SearchTypes.Games or v46() and v166 == v29.SearchTypes.Catalog,
                [v11.Ref] = v162.searchBarRef,
                focusController = v162.props.focusController,
                isSearching = v162.state.isSearching,
                animated = v168,
                initialSearchText = not not v162.props.searchParameters and v162.props.searchParameters.searchKeyword or "",
                searchBarPadding = if not v169 then nil else 0,
                textSize = if (not not v47 and v162.props.shouldUpdateSearchPlaceholderText) and v166 ~= v29.SearchTypes.Catalog then v170.Tokens.Global.FontSize_75 else nil
            });
        end;
    end;
end;
v52.getRenderRootSearchBar = function(v172, v173, v174, v175, v176, v177, v178, v179)
    local v180 = if not l_FFlagOmniSearchAutoTabIXP_0 then nil else if v177 == v29.SearchTypes.Auto then v29.SearchTypes.Games else v177;
    if (v173 or not v174) or v175 then
        return nil;
    else
        return function()
            return v11.createElement(v31, {
                Size = UDim2.new(0, 400, 1, 0),
                cancelSearch = v172.cancelSearchCallback,
                confirmSearch = v172.confirmSearchCallback,
                onFocused = v172.onSearchBarFocused,
                onTextCleared = v172.onTextCleared,
                placeholderText = v176,
                isCompactView = v175,
                modernUI = true,
                searchType = if not l_FFlagOmniSearchAutoTabIXP_0 then v177 else v180,
                autocomplete = not not v178 and if not l_FFlagOmniSearchAutoTabIXP_0 then v177 == v29.SearchTypes.Games else v180 == v29.SearchTypes.Games or v46() and v177 == v29.SearchTypes.Catalog,
                isSearching = v172.state.isSearching,
                initialSearchText = not not v172.props.searchParameters and v172.props.searchParameters.searchKeyword or "",
                textSize = if (not not v47 and v172.props.shouldUpdateSearchPlaceholderText) and v177 ~= v29.SearchTypes.Catalog then v179.Tokens.Global.FontSize_100 else nil,
                [v11.Ref] = v172.searchBarRef
            });
        end;
    end;
end;
v52.getHeaderBarProps = function(v181, v182, v183, v184, v185, v186, v187)
    local v188 = nil;
    if not v183 then
        if not v184 then
            local l_centerItem_1 = v181.props.centerItem;
            local l_l_centerItem_1_0 = l_centerItem_1 --[[ copy: 8 -> 9 ]];
            v188 = {
                title = v185 or v182.pageTitle,
                renderRight = function()
                    return v11.createFragment(v186);
                end,
                renderCenter = not not l_centerItem_1 and function()
                    local v191 = not not v187 and v181.leftItemRef or nil;
                    local v192 = v181:getFirstRightItemRef() or v181.props.NextSelectionRight;
                    if not v181.props.useParentSizeForCenterItem then
                        return v181:renderTopBarItem(l_l_centerItem_1_0, v191, v192);
                    else
                        return v181:renderTopBarItem(l_l_centerItem_1_0, v191, v192, nil, true);
                    end;
                end or nil
            };
        else
            v188 = {
                title = v185 or v182.pageTitle,
                renderCenter = function()
                    return v184();
                end,
                renderRight = function()
                    return v11.createFragment(v186);
                end
            };
            if v181.state.isSearching then
                if v45() and v181.props.formFactor == l_FormFactor_0.WIDE then
                    v188.renderLeft = nil;
                else
                    v188.renderLeft = function()
                        return nil;
                    end;
                end;
            end;
        end;
    else
        v188 = {
            title = "",
            renderCenter = function()
                return v183();
            end
        };
    end;
    if v181.props.transparentBackground then
        v188.backgroundTransparency = 1;
    end;
    v188.barHeight = l_NAV_BAR_SIZE_0;
    v188.isSecondary = v181.props.isSecondary;
    v188.shouldHideSecondaryLeftItem = not v187;
    if v187 then
        v188.renderLeft = function()
            return v181:renderTopBarItem(v181.props.leftItem, nil, (not not v181:shouldShowCenterItem() and v181.centerItemRef or v181:getFirstRightItemRef()) or v181.props.NextSelectionRight);
        end;
    end;
    local l_gridConfig_0 = v181.props.gridConfig;
    v188.margin = l_gridConfig_0[l_LayoutConfig_0.Keys.PaddingHorizontal];
    v188.contentPaddingRight = UDim.new(0, l_gridConfig_0[l_LayoutConfig_0.Keys.PaddingRightItems]);
    return v188;
end;
v52.renderWithProviders = function(v194, v195, v196, v197)
    local l_focusController_0 = v194.props.focusController;
    local l_titleText_0 = v194.props.titleText;
    local v200 = v194:shouldShowLeftItem();
    local v201 = v194:hasSearchButton() and v194.props.enableSearch;
    local l_searchType_3 = v194.props.searchType;
    local l_enableSearchAutoComplete_0 = v194.props.enableSearchAutoComplete;
    local l_ZIndex_0 = v194.props.ZIndex;
    local l_gridConfig_1 = v194.props.gridConfig;
    local v206 = l_gridConfig_1[l_LayoutConfig_0.Keys.PaddingVertical];
    local v207 = l_gridConfig_1[l_LayoutConfig_0.Keys.PaddingHorizontal];
    local v208 = (v194.props.statusBarHeight + l_NAV_BAR_SIZE_0) + v206;
    local l_v208_0 = v208;
    if v60(v194.props) then
        l_v208_0 = l_v208_0 + 55;
    end;
    local v210 = l_v208_0 + v194.props.totalBannerHeight;
    local v211 = v194:isCompactViewMode();
    local l_searchPlaceholderSearchGames_0 = v197.searchPlaceholderSearchGames;
    if not (not v47 or not v194.props.shouldUpdateSearchPlaceholderText) then
        l_searchPlaceholderSearchGames_0 = v197.searchPlaceholderSearchPeopleOrExperiences;
    end;
    if l_searchType_3 == v29.SearchTypes.Catalog then
        l_searchPlaceholderSearchGames_0 = v197.searchPlaceholderSearchMarketplace;
    end;
    local v213 = v211 and (v194.state.isSearching or v194.props.showSearchBar);
    local v214 = not v194.props.showSearchBar;
    local v215 = v194:maybeRenderRightItems(v196, v213, v200);
    local v216 = v194:getRenderSearchBar(v213, v211, l_searchPlaceholderSearchGames_0, l_searchType_3, l_enableSearchAutoComplete_0, v214, v200, if not v47 then nil else v196);
    local v217 = v194:getRenderRootSearchBar(v213, v201, v211, l_searchPlaceholderSearchGames_0, l_searchType_3, l_enableSearchAutoComplete_0, if not v47 then nil else v196);
    local v218 = {
        Active = true,
        BackgroundColor3 = v196.Theme.BackgroundDefault.Color,
        BackgroundTransparency = if not v194.props.transparentBackground then v196.Theme.BackgroundDefault.Transparency else 1,
        BorderSizePixel = 0,
        Position = UDim2.new(0, 0, 0, 0),
        Size = UDim2.new(1, 0, 0, v208),
        ZIndex = 2
    };
    local v219 = v194:getHeaderBarProps(v197, v216, v217, l_titleText_0, v215, v200);
    local v220 = UDim2.new(0, v194.props.screenSize.X, 0, v194.props.screenSize.Y);
    local v221 = UDim2.new(0, -v194.state.absolutePosition.X, 0, -v194.state.absolutePosition.Y);
    local l_forwardRef_0 = v194.props.forwardRef;
    local v223 = if not l_FFlagOmniSearchAutoTabIXP_0 then nil else if l_searchType_3 == v29.SearchTypes.Auto then v29.SearchTypes.Games else l_searchType_3;
    return v11.createElement("Frame", {
        BackgroundTransparency = 1,
        BorderSizePixel = 0,
        Size = UDim2.new(1, 0, 1, 0),
        ZIndex = l_ZIndex_0,
        [v11.Change.AbsolutePosition] = v194.absolutePositionChangedCallback
    }, {
        TopBarContents = v11.createElement("Frame", {
            BackgroundTransparency = 1,
            Size = UDim2.new(1, 0, 0, v210)
        }, {
            TopBar = v11.createElement("Frame", v218, {
                NavBar = v11.createElement(l_Focusable_0.Frame, {
                    AnchorPoint = Vector2.new(0, 1),
                    BackgroundColor3 = v196.Theme.BackgroundDefault.Color,
                    BackgroundTransparency = if not v194.props.transparentBackground then v196.Theme.BackgroundDefault.Transparency else 1,
                    BorderSizePixel = 0,
                    Position = UDim2.new(0, 0, 1, 0),
                    Size = UDim2.new(1, 0, 0, l_NAV_BAR_SIZE_0),
                    [v11.Ref] = l_forwardRef_0,
                    NextSelectionRight = not (not not v211 and v194.state.isSearching) and v194.props.NextSelectionRight or nil,
                    NextSelectionDown = not (not not v211 and v194.state.isSearching) and v194.props.NextSelectionDown or nil,
                    defaultChild = if v217 or v211 and v194.state.isSearching then v194.searchBarRef else if v194:shouldShowLeftItem() then v194.leftItemRef else if v194:shouldShowCenterItem() then v194.centerItemRef else v194:getFirstRightItemRef()
                }, {
                    UIBloxHeaderBar = v11.createElement(l_HeaderBar_0, v219)
                })
            }),
            SearchBar = v60(v194.props) and v11.createElement(v31, {
                position = UDim2.new(0.5, 0, 0, v208),
                anchorPoint = Vector2.new(0.5, 0),
                Size = UDim2.new(1, -v207 * 2, 0, 55),
                modernUI = true,
                cancelSearch = v194.cancelSearchCallback,
                confirmSearch = v194.confirmSearchCallback,
                onFocused = v194.onSearchBarFocused,
                onTextCleared = v194.onTextCleared,
                isCompactView = v211,
                placeholderText = l_searchPlaceholderSearchGames_0,
                searchType = if not l_FFlagOmniSearchAutoTabIXP_0 then l_searchType_3 else v223,
                autocomplete = not not l_enableSearchAutoComplete_0 and if not l_FFlagOmniSearchAutoTabIXP_0 then l_searchType_3 == v29.SearchTypes.Games else v223 == v29.SearchTypes.Games or v46() and l_searchType_3 == v29.SearchTypes.Catalog,
                [v11.Ref] = v194.searchBarRef,
                focusController = l_focusController_0,
                isSearching = v194.state.isSearching,
                initialSearchText = not not v194.props.searchParameters and v194.props.searchParameters.searchKeyword or ""
            }),
            BannerContainer = v11.createElement("Frame", {
                Size = UDim2.fromScale(1, 1),
                Position = UDim2.new(0, 0, 0, l_v208_0),
                BackgroundTransparency = 1
            }, v194.props.bannerContainer)
        }),
        DarkOverlay = v11.createElement("TextButton", {
            Size = v220,
            Position = v221,
            AutoButtonColor = false,
            BackgroundColor3 = v196.Theme.Overlay.Color,
            BackgroundTransparency = 1,
            Text = "",
            Visible = v194.state.isSearching,
            [v11.Event.Activated] = v194.cancelSearchAndEndSession,
            ZIndex = 1
        }),
        LastInputChangedListener = v11.createElement(l_ExternalEventConnection_0, {
            event = l_UserInputService_0.LastInputTypeChanged,
            callback = function(v224)
                v194:setState({
                    lastInputType = v224
                });
            end
        }),
        SignalConnection = v11.createElement(v39, {
            signal = v195,
            callback = v194.searchSignalCallback
        }),
        HiddenItems = v194:renderHiddenItems()
    });
end;
v52.renderHiddenItems = function(v225)
    return v11.createElement("Frame", {
        Visible = false
    }, {
        leftItem = (v225.props.leftItem and not v225:shouldShowLeftItem()) and v225:renderTopBarItem(v225.props.leftItem),
        centerItem = (v225.props.centerItem and not v225:shouldShowCenterItem()) and v225:renderTopBarItem(v225.props.centerItem)
    });
end;
v52.render = function(v226)
    return v38(function(v227)
        return l_withStyle_0(function(v228)
            return l_withLocalization_0({
                pageTitle = v226:getPageNameLocalizationKey(),
                searchPlaceholderSearchGames = "Search.GlobalSearch.Example.SearchGames",
                searchPlaceholderSearchMarketplace = "Search.GlobalSearch.Example.SearchMarketplace",
                searchPlaceholderSearchPeopleOrExperiences = "Search.GlobalSearch.Example.SearchPeopleOrExperiences"
            })(function(v229)
                return v226:renderWithProviders(v227, v228, v229);
            end);
        end);
    end);
end;
v52.didUpdate = function(v230, v231, v232)
    v230:updateTopBarHeight(v231, v232);
    local v233 = v51[v230.state.lastInputType];
    local l_focusController_1 = v230.props.focusController;
    if ((not v230.state.isSearching or v232.isSearching) or not v233) or not l_focusController_1 then
        if not (((v230.state.isSearching or not v232.isSearching) or not v233) or not l_focusController_1) then
            l_focusController_1.moveFocusTo(v230.searchButtonRef);
        end;
    else
        l_focusController_1.moveFocusTo(v230.searchBarRef);
    end;
    v230:closeSearchBarIfLeavingPage(v231);
end;
v52.closeSearchBarIfLeavingPage = function(v235, v236)
    local l_currentRoute_3 = v235.props.currentRoute;
    local l_currentRoute_4 = v236.currentRoute;
    if l_currentRoute_3[#l_currentRoute_3].name ~= l_currentRoute_4[#l_currentRoute_4].name and v235.state.isSearching == true then
        v235.onExitSearch();
    end;
    if (not (not v235.props.avatarRoute or not v236.avatarRoute) and v235.props.avatarRoute.opaque.key ~= v236.avatarRoute.opaque.key) and v235.state.isSearching == true then
        v235.onExitSearch();
    end;
end;
local function _(v239)
    local l_name_2 = v239[#v239].name;
    local v241;
    if not v37() or l_name_2 ~= v24.GameDetail then
        v241 = false;
        if not (l_name_2 == v24.ProfilePeekView) then
            goto label1;
        end;
    end;
    v241 = false;
    if #v239 > 1 then
        v241 = v239[#v239 - 1].name == v24.SearchPage;
    end;
    ::label1::;
    return v241;
end;
local function _(v243)
    if v243[#v243].name == v24.SearchPage then
        return true;
    else
        local l_name_3 = v243[#v243].name;
        local v245;
        if not v37() or l_name_3 ~= v24.GameDetail then
            v245 = false;
            if not (l_name_3 == v24.ProfilePeekView) then
                goto label2;
            end;
        end;
        v245 = false;
        if #v243 > 1 then
            v245 = v243[#v243 - 1].name == v24.SearchPage;
        end;
        ::label2::;
        if not v245 then
            return false;
        else
            return true;
        end;
    end;
end;
local function v251(v247)
    for v248 = #v247, 1, -1 do
        local l_name_4 = v247[v248].name;
        local v250 = v25[l_name_4];
        if not (v250 ~= nil and v250.renderUnderlyingPage) then
            return l_name_4;
        end;
    end;
    return nil;
end;
v52 = v40(v14.withNavigation((l_RoactAppPolicy_0.connect(function(v252, _)
    return {
        enableNotifications = v252.getNotifications(),
        enableSearch = v252.getSearchBar(),
        enableSearchAutoComplete = v252.getSearchAutoComplete()
    };
end)((l_RoactServices_0.connect({
    analytics = v16,
    sessionService = l_AppSessionService_0,
    eventIngest = v19
})((v12.connect(function(v254, _)
    local v256 = v254.Navigation.history[#v254.Navigation.history];
    local v257 = {
        screenSize = v254.ScreenSize,
        formFactor = v254.FormFactor,
        currentRoute = v256,
        navigationHistory = v254.Navigation.history
    };
    local v258;
    if v256[#v256].name == v24.SearchPage then
        v258 = true;
    else
        local l_name_5 = v256[#v256].name;
        local v260;
        if not v37() or l_name_5 ~= v24.GameDetail then
            v260 = false;
            if not (l_name_5 == v24.ProfilePeekView) then
                goto label3;
            end;
        end;
        v260 = false;
        if #v256 > 1 then
            v260 = v256[#v256 - 1].name == v24.SearchPage;
        end;
        ::label3::;
        v258 = not not v260 or false;
    end;
    v257.showSearchBar = v258;
    v257.statusBarHeight = v254.TopBar.statusBarHeight;
    v257.userId = v254.LocalUserId;
    v257.opaquePage = v251(v256);
    return v257;
end, function(v261)
    return {
        confirmSearch = function(v262, v263)
            return v261(v23(v262, v263));
        end,
        setTopBarHeight = function(v264)
            return v261(v26(v264));
        end
    };
end)((v34(function(v265, v266)
    return l_withGridConfig_DEPRECATED_0({
        [l_LayoutConfig_0.Keys.PaddingRightItems] = 0,
        [l_LayoutConfig_0.Keys.PaddingHorizontal] = l_getPageMargin_0(v266.screenSize.X),
        [l_LayoutConfig_0.Keys.PaddingVertical] = 0
    }, l_LayoutConfig_0.Kind)(function(v267)
        return v11.createElement(v265, v9.Dictionary.join(v266, {
            gridConfig = v267
        }));
    end);
end)(v52))))))))), {
    required = false
});
if not (not v44() and not v47) then
    v52 = v21.connectUserLayer({
        v22.SearchBarLayer
    }, function(v268, _)
        local v270 = v268[v22.SearchBarLayer] or {};
        return {
            phoneModeUnderTitleSearchBar = if not v44() then nil else v270.phoneModeUnderTitleSearchBar == "true",
            shouldUpdateSearchPlaceholderText = if not v47 then nil else v270.shouldUpdateSearchPlaceholderText
        };
    end)(v52);
end;
local l_v52_0 = v52;
v52 = function(v272)
    local v273, v274 = v36(v272.hideSiteMessageBanner);
    return v13.withFocusController(function(v275)
        return v11.createElement(l_v52_0, v9.Dictionary.join(v272, {
            focusController = v275,
            bannerContainer = v273,
            totalBannerHeight = v274
        }));
    end);
end;
return v11.forwardRef(function(v276, v277)
    return v11.createElement(v52, v9.Dictionary.join(v276, {
        forwardRef = v277
    }));
end);


local v0 = require(game:GetService("CorePackages").Packages.React);
local v1 = {
    BackgroundTransparency = 1,
    BorderSizePixel = 0,
    heightOffset = 0
};
return function(v2)
    local v3 = v2.heightOffset or v1.heightOffset;
    return v0.createElement("Frame", {
        Position = UDim2.new(0, 0, 0, v3),
        Size = UDim2.new(1, 0, 1, -v3),
        ZIndex = v2.ZIndex,
        BackgroundColor3 = v2.BackgroundColor3,
        BackgroundTransparency = v2.BackgroundTransparency or v1.BackgroundTransparency,
        BorderSizePixel = v2.BorderSizePixel or v1.BorderSizePixel,
        ClipsDescendants = v2.ClipsDescendants
    }, v2.children);
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Packages.React);
local v2 = require(l_CorePackages_0.RoactRodux);
local l_withGridConfig_DEPRECATED_0 = require(l_CorePackages_0.UIBlox).Core.Layout.Grid.withGridConfig_DEPRECATED;
local l_LayoutConfig_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppEnums).LayoutConfig;
local v5 = require(script.Parent.TopBarContentFrame);
local function v10(v6, _)
    local l_topBarHeight_0 = v6.topBarHeight;
    local v9 = table.clone(v6);
    v9.heightOffset = l_topBarHeight_0;
    v9.topBarHeight = nil;
    return v1.createElement(v5, v9);
end;
return (v2.connect(function(v11, _)
    return {
        topBarHeight = v11.TopBar.topBarHeight
    };
end, nil)(function(v13)
    return l_withGridConfig_DEPRECATED_0({
        [l_LayoutConfig_0.Keys.PaddingVertical] = 0
    }, l_LayoutConfig_0.Kind)(function(v14)
        return v10(v13, v14);
    end);
end));


local v0 = require(game:GetService("CorePackages").Packages.React);
local v1 = require(script.Parent.TopBarPageContent);
local v2 = require(script.Parent.TopBarContentFrame);
return function(v3)
    local l_topBarSlot_0 = v3.topBarSlot;
    local v5 = table.clone(v3);
    v5.topBarSlot = nil;
    if not l_topBarSlot_0 then
        return v0.createElement(v2, v5);
    else
        return v0.createElement(v0.Fragment, nil, {
            TopBar = l_topBarSlot_0,
            TopBarPageContent = v0.createElement(v1, v5)
        });
    end;
end;


return {
    Kind = "top bar",
    Keys = {
        PaddingRightItems = "PaddingRightItems",
        PaddingHorizontal = "margin",
        PaddingVertical = "PaddingVertical"
    }
};


local l_CorePackages_0 = game:GetService("CorePackages");
local _ = game:GetService("CoreGui").RobloxGui.Modules;
local l_FormFactor_0 = require(l_CorePackages_0.Workspace.Packages.FormFactor).Enums.FormFactor;
local _ = require(l_CorePackages_0.Cryo);
local _ = require(l_CorePackages_0.Roact);
local _ = require(l_CorePackages_0.RoactNavigation);
local v6 = require(script.Parent.Parent.TopBarConstants);
local v7 = {
    [l_FormFactor_0.COMPACT] = {
        IconButtonSize = 34
    },
    [l_FormFactor_0.WIDE] = {
        IconButtonSize = 44
    }
};
return function(v8)
    local v9 = v7[v8];
    return not not v9 and v9.IconButtonSize or v6.DEFAULT_ICON_BUTTON_SIZE;
end;


local _ = game:GetService("CoreGui").RobloxGui.Modules;
local l_IsVRAppBuild_0 = require(game:GetService("CorePackages").Workspace.Packages.AppCommonLib).IsVRAppBuild;
return function(v2)
    if not l_IsVRAppBuild_0() then
        return v2.TopBar.topBarHeight;
    else
        return 0;
    end;
end;


local v0 = require(game:GetService("CoreGui").RobloxGui.Modules.LuaApp.Constants);
return function(v1)
    return v1.TopBar.statusBarHeight + v0.NAV_BAR_SIZE;
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v1 = require(l_Modules_0.Common.Roact);
local v2 = require(l_Modules_0.LuaApp.RoactMotion);
local v3 = v1.PureComponent:extend("UIScaler");
v3.render = function(v4)
    return v1.createElement(v2.SimpleMotion, {
        style = {
            scale = v4.props.scaleValue
        },
        onRested = v4.props.onRested,
        render = function(v5)
            return v1.createElement("UIScale", {
                Scale = v5.scale
            });
        end
    });
end;
return v3;