local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.dependencies);
local l_SocialLibraries_0 = v1.SocialLibraries;
local l_isSubjectTo10ftPolicies_0 = v1.isSubjectTo10ftPolicies;
local l_getDeepValue_0 = l_SocialLibraries_0.Dictionary.getDeepValue;
local l_RODUX_KEY_0 = require(l_Parent_0.Common.Constants).RODUX_KEY;
local l_RECOMMENDATION_SESSION_ID_KEY_0 = require(l_Parent_0.Common.Constants).RECOMMENDATION_SESSION_ID_KEY;
local v7 = require(script.Parent.getFriendsList);
local v8 = require(script.Parent.getRecommendationsList);
local v9 = require(script.Parent.getCarouselList);
local v10 = require(script.Parent.getCarouselFetchingStatus);
local v11 = require(l_Parent_0.Utils.showRecommendations);
local l_NetworkStatus_0 = v1.RoduxNetworking.Enum.NetworkStatus;
local l_getSessionIdByKey_0 = v1.RoduxAnalytics.Selectors.getSessionIdByKey;
local v14 = game:DefineFastFlag("FFlagFriendCarouselLocalShowRecommendationsLogic", false);
return function(v15, v16)
    local v17 = tostring(v15.LocalUserId);
    local v18 = v7(v15, l_RODUX_KEY_0, v16);
    local v19 = l_getDeepValue_0(v15, string.format("%s.Friends.countsByUserId.%s", l_RODUX_KEY_0, v17)) or 0;
    local v20 = if not if not v14 then v16.showRecommendations else v11(v19) then {} else v8(v15, l_RODUX_KEY_0, v16);
    local v21 = v9(v18, v20, not l_isSubjectTo10ftPolicies_0() and "allFriendsThenRecommendations" or "onlineFriendsThenRecommendationsThenOfflineFriends");
    local v22 = l_getDeepValue_0(v15, string.format("%s.Friends.requests.receivedCount", l_RODUX_KEY_0)) or 0;
    local v23 = v10(v15, v17, v11(v19));
    v21 = v21 or {};
    if v23 ~= l_NetworkStatus_0.Done then
        table.insert(v21, {
            isLoading = true
        });
    end;
    return {
        localUserId = v17,
        friendCount = v19,
        friendRequestCount = v22,
        fetchingStatus = v23,
        friendsAndRecList = v21,
        recommendationCount = not not v20 and #v20 or 0,
        recommendationSessionId = l_getSessionIdByKey_0(v15)(l_RECOMMENDATION_SESSION_ID_KEY_0)
    };
end;


local v0 = require(script.Parent.Parent.Parent.dependencies);
local l_NetworkingFriends_0 = v0.NetworkingFriends;
local l_NetworkStatus_0 = v0.RoduxNetworking.Enum.NetworkStatus;
return function(v3, v4, v5)
    local v6 = l_NetworkingFriends_0.GetFriendsFromUserId.getStatus(v3, v4);
    if v5 then
        local v7 = l_NetworkingFriends_0.GetFriendRecommendationsFromUserId.getStatus(v3, v4);
        if v6 == l_NetworkStatus_0.Done then
            v6 = if v7 == l_NetworkStatus_0.Failed then l_NetworkStatus_0.Failed else if v7 == l_NetworkStatus_0.Done then l_NetworkStatus_0.Done else l_NetworkStatus_0.Fetching;
        end;
    end;
    if v6 == l_NetworkStatus_0.Failed then
        v6 = l_NetworkStatus_0.Done;
    end;
    return v6;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.dependencies);
local l_llama_0 = v1.llama;
local l_memoize_0 = v1.memoize;
local _ = require(l_Parent_0.Common.LocalTypes);
local v5 = require(script.Parent.splitSortedFriendsByPresence);
local v6 = game:DefineFastFlag("FriendCarouselGetCarouseListSorting", false);
local v12 = l_memoize_0(function(v7, v8, v9)
    v9 = v9 or "allFriendsThenRecommendations";
    if #v8 == 0 then
        return v7;
    elseif v9 == "onlineFriendsThenRecommendationsThenOfflineFriends" then
        local v10, v11 = v5(v7);
        return l_llama_0.List.join(v10, v8, v11);
    else
        return l_llama_0.List.join(v7, v8);
    end;
end);
local v15 = l_memoize_0(function(v13, v14)
    if #v14 == 0 then
        return v13;
    else
        return l_llama_0.List.join(v13, v14);
    end;
end);
if not v6 then
    return v15;
else
    return v12;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.dependencies);
local l_SocialLibraries_0 = v1.SocialLibraries;
local l_User_0 = l_SocialLibraries_0.User;
local l_llama_0 = v1.llama;
local l_RoduxPresence_0 = v1.RoduxPresence;
local v6 = require(script.Parent.mapIdToUser);
local _ = require(l_Parent_0.Common.LocalTypes);
local l_getDeepValue_0 = l_SocialLibraries_0.Dictionary.getDeepValue;
return function(v9, v10, v11)
    local v12 = tostring(v9.LocalUserId);
    return l_llama_0.List.sort(l_llama_0.List.map(l_getDeepValue_0(v9, string.format("%s.Friends.byUserId.%s", v10, v12)) or {}, function(v13)
        return l_llama_0.Dictionary.join(v6(v9, v10, v11)(v13), l_RoduxPresence_0.Selectors.getUserPresenceByUserId(v9, v13), {
            isFriendWithUser = true,
            friendRank = l_getDeepValue_0(v9, string.format("%s.Friends.friendsRankByUserId.%s.%s", v10, v12, v13))
        });
    end), l_User_0.sortFriendsByCorrectedPresenceAndRank);
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.dependencies);
local l_llama_0 = v1.llama;
local l_getDeepValue_0 = v1.SocialLibraries.Dictionary.getDeepValue;
local v4 = require(script.Parent.mapIdToUser);
local v5 = require(l_Parent_0.Utils.showRecommendations);
local _ = require(l_Parent_0.Common.LocalTypes);
local l_RecommendationSourceEnum_0 = v1.SocialCommon.Enums.RecommendationSourceEnum;
local function v10(v8, v9)
    return v8.rank < v9.rank;
end;
return function(v11, v12, v13)
    local v14 = tostring(v11.LocalUserId);
    local v15 = l_getDeepValue_0(v11, string.format("%s.Friends.countsByUserId.%s", v12, v14)) or 0;
    local v16 = l_getDeepValue_0(v11, string.format("%s.Friends.recommendations.byUserId.%s", v12, v14)) or {};
    local v17 = l_getDeepValue_0(v11, string.format("%s.Friends.friendshipStatus", v12)) or {};
    local v18 = l_llama_0.Dictionary.keys(v16);
    local v19 = l_getDeepValue_0(v11, string.format("%s.Friends.recommendations.bySource.%s", v12, l_RecommendationSourceEnum_0.HomepageFriendsCarousel)) or {};
    v18 = l_llama_0.List.filter(v18, function(v20)
        return v19[v20];
    end);
    local function v24(v21)
        local v22 = v16[v21];
        local v23 = v17[v21];
        return l_llama_0.Dictionary.join(v4(v11, v12, v13)(v21), v22, {
            isFriendWithUser = not not v23 and v23 == Enum.FriendStatus.Friend,
            hasPendingFriendRequest = not not v23 and v23 == Enum.FriendStatus.FriendRequestSent,
            canSendFriendRequest = not v23 and true or v23 == Enum.FriendStatus.NotFriend,
            hasIncomingFriendRequest = l_getDeepValue_0(v11, string.format("%s.Friends.recommendations.hasIncomingFriendRequest.%s", v12, v21))
        });
    end;
    if v5(v15) then
        return l_llama_0.List.sort(l_llama_0.List.map(v18, v24), v10);
    else
        return {};
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Common.ModelTypes);
local l_getDeepValue_0 = require(l_Parent_0.dependencies).SocialLibraries.Dictionary.getDeepValue;
return function(v3, v4, _)
    return function(v6)
        local v7 = l_getDeepValue_0(v3, string.format("%s.Users.byUserId.%s", v4, v6));
        if v7 then
            return v7;
        else
            return nil;
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.dependencies);
local l_llama_0 = v1.llama;
local l_memoize_0 = v1.memoize;
local _ = require(l_Parent_0.Common.LocalTypes);
local l_PresenceType_0 = v1.RoduxPresence.Enums.PresenceType;
return (l_memoize_0(function(v6)
    local v8 = l_llama_0.List.find(l_llama_0.List.map(v6, function(v7)
        return v7.userPresenceType;
    end), l_PresenceType_0.Offline);
    if not v8 then
        return v6, {};
    else
        return l_llama_0.List.slice(v6, 0, v8 - 1), (l_llama_0.List.slice(v6, v8));
    end;
end));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.dependencies);
local l_Roact_0 = v1.Roact;
local l_withLocalization_0 = v1.withLocalization;
local l_memoize_0 = v1.memoize;
local l_Text_0 = v1.Text;
local v6 = require(script.Parent.getUserRecommendationContext);
local v7 = require(script.Parent.getCorrectUserPresence);
local v8 = require(script.Parent.getUserPresenceIcon);
local v9 = require(l_Parent_0.Utils.getUserPresenceLabel);
local _ = require(l_Parent_0.Common.LocalTypes);
local l_UIBlox_0 = v1.UIBlox;
local l_StyledTextLabel_0 = l_UIBlox_0.App.Text.StyledTextLabel;
local l_withStyle_0 = l_UIBlox_0.Style.withStyle;
local l_ImageSetLabel_0 = l_UIBlox_0.Core.ImageSet.ImageSetLabel;
local l_Images_0 = l_UIBlox_0.App.ImageSet.Images;
local l_IconSize_0 = l_UIBlox_0.App.Constant.IconSize;
local v17 = l_Roact_0.PureComponent:extend("CarouselUserContextualInfo");
v17.defaultProps = {
    maxNumberOfLines = 2
};
v17.init = function(v18)
    v18.getTextHeight = l_memoize_0(function(v19, v20, v21)
        return l_Text_0.GetTextHeight(v19, v20, v21);
    end);
    v18.getContextualIconAndText = l_memoize_0(function(v22, v23, v24)
        if not v22.isFriendWithUser then
            return v6(v22);
        else
            local v25 = v7(v22);
            return v8({
                presence = v25,
                theme = v23
            }), (v9({
                presence = v25,
                lastLocation = v22.lastLocation,
                font = v24,
                theme = v23
            }));
        end;
    end);
end;
v17.render = function(v26)
    local l_props_0 = v26.props;
    return l_withStyle_0(function(v28)
        local l_Theme_0 = v28.Theme;
        local l_Font_0 = v28.Font;
        local v31, v32 = v26.getContextualIconAndText(l_props_0.user, l_Theme_0, l_Font_0);
        return l_withLocalization_0({
            labelText = v32.textKey
        })(function(v33)
            local v34 = if not v32.textKey then v32.text else v33.labelText;
            if v32.formatter then
                v34 = v32.formatter(v34);
            end;
            local v35 = v32.font or l_Font_0.CaptionBody;
            return l_Roact_0.createElement("Frame", {
                LayoutOrder = l_props_0.layoutOrder,
                BackgroundTransparency = 1
            }, {
                UIListLayout = l_Roact_0.createElement("UIListLayout", {
                    FillDirection = Enum.FillDirection.Horizontal,
                    SortOrder = Enum.SortOrder.LayoutOrder,
                    Padding = UDim.new(0, 2)
                }),
                IconFrame = (not not v31 and v31.path) and l_Roact_0.createElement("Frame", {
                    Size = UDim2.fromOffset(l_IconSize_0.Small, l_IconSize_0.Small),
                    BackgroundTransparency = 1
                }, {
                    layout = l_Roact_0.createElement("UIListLayout", {
                        VerticalAlignment = Enum.VerticalAlignment.Top,
                        HorizontalAlignment = Enum.HorizontalAlignment.Center
                    }),
                    PresenceIcon = l_Roact_0.createElement(l_ImageSetLabel_0, {
                        LayoutOrder = 1,
                        BackgroundTransparency = 1,
                        Image = l_Images_0[v31.path],
                        ImageColor3 = v31.color or l_Theme_0.IconDefault.Color,
                        ImageTransparency = v31.transparency or l_Theme_0.IconDefault.Transparency,
                        Size = v31.size or UDim2.fromOffset(l_IconSize_0.Small, l_IconSize_0.Small),
                        AnchorPoint = Vector2.new(0.5, 0.5),
                        Position = UDim2.fromScale(0.5, 0.5)
                    })
                }) or nil,
                ContextualText = not not v34 and l_Roact_0.createElement(l_StyledTextLabel_0, {
                    layoutOrder = 2,
                    size = UDim2.fromOffset(not not v31 and l_props_0.tileSize - (l_IconSize_0.Small + 2) or l_props_0.tileSize, v26.getTextHeight(v34, v35.Font, l_Font_0.BaseSize * v35.RelativeSize) * l_props_0.maxNumberOfLines),
                    lineHeight = 1,
                    text = v34,
                    textXAlignment = Enum.TextXAlignment.Left,
                    textYAlignment = Enum.TextYAlignment.Top,
                    textTruncate = Enum.TextTruncate.AtEnd,
                    fontStyle = v35,
                    colorStyle = v32.colorStyle or l_Theme_0.SecondaryContent,
                    fluidSizing = false,
                    richText = false
                }) or nil
            });
        end);
    end);
end;
return v17;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_PresenceType_0 = require(l_Parent_0.dependencies).RoduxPresence.Enums.PresenceType;
local _ = require(l_Parent_0.Common.ModelTypes);
local v3 = require(l_Parent_0.Utils.isUserInGame);
return function(v4)
    local l_userPresenceType_0 = v4.userPresenceType;
    if l_userPresenceType_0 == l_PresenceType_0.InGame then
        return not not v3(v4) and l_PresenceType_0.InGame or l_PresenceType_0.Online;
    else
        return l_userPresenceType_0;
    end;
end;


local l_PresenceType_0 = require(script.Parent.Parent.Parent.dependencies).RoduxPresence.Enums.PresenceType;
local v1 = {
    [l_PresenceType_0.Online] = "component_assets/circle_16",
    [l_PresenceType_0.InGame] = "icons/menu/games_small",
    [l_PresenceType_0.InStudio] = "icons/logo/studiologo_small"
};
local v2 = UDim2.fromOffset(12, 12);
return function(v3)
    local v4 = {
        path = v1[v3.presence]
    };
    if v3.presence == l_PresenceType_0.Online then
        v4.color = v3.theme.OnlineStatus.Color;
        v4.transparency = v3.theme.OnlineStatus.Transparency;
        v4.size = v2;
    end;
    if v3.presence == l_PresenceType_0.InGame then
        v4.transparency = v3.theme.IconEmphasis.Transparency;
    end;
    return v4;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Common.LocalTypes);
local l_RecommendationContextType_0 = require(l_Parent_0.dependencies).RoduxFriends.Enums.RecommendationContextType;
local v3 = require(l_Parent_0.Common.TextKeys);
return function(v4)
    local v5 = nil;
    local v6 = nil;
    local v7 = nil;
    local v8 = nil;
    local v9 = not not v4.mutualFriendsList and #v4.mutualFriendsList or 0;
    if v4.contextType == l_RecommendationContextType_0.MutualFriends and v9 > 0 then
        v8 = function(v10)
            return tostring(v9) .. " " .. v10;
        end;
        v6 = if v9 == 1 then v3.SingularMutualFriend else v3.MutualFriends;
        v5 = {
            path = "icons/status/player/friend"
        };
    elseif v4.contextType == l_RecommendationContextType_0.Frequents then
        v6 = v3.PlayedTogether;
    else
        v7 = "";
    end;
    return v5, {
        formatter = v8,
        text = v7,
        textKey = v6
    };
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.dependencies);
local l_Parent_1 = l_Parent_0.Parent;
local v3 = require(l_Parent_1.React);
local l_Roact_0 = v1.Roact;
local l_llama_0 = v1.llama;
local l_useLocalization_0 = v1.Hooks.useLocalization;
local l_PresenceType_0 = v1.RoduxPresence.Enums.PresenceType;
local v8 = require(l_Parent_1.UserProfiles);
local _ = require(l_Parent_0.Common.LocalTypes);
local v10 = require(l_Parent_0.Utils.isUserInGame);
local v11 = require(l_Parent_0.Common.TextKeys);
local v12 = require(l_Parent_0.Analytics.UILoadingEvents);
local l_getStandardSizeAvatarHeadShotRbxthumb_0 = v1.getStandardSizeAvatarHeadShotRbxthumb;
local l_RecommendationContextType_0 = v1.RoduxFriends.Enums.RecommendationContextType;
local l_PresenceType_1 = require(l_Parent_1.GraphQLServer).types.PresenceType;
local l_FFlagContactRecs_0 = require(l_Parent_1.SharedFlags).FFlagContactRecs;
local l_getFFlagUpdateFriendCarousel10ft_0 = v1.getFFlagUpdateFriendCarousel10ft;
local l_FFlagFriendsCarouselPaginatedFriendsEnabled_0 = require(l_Parent_1.SharedFlags).FFlagFriendsCarouselPaginatedFriendsEnabled;
local v19 = require(l_Parent_0.Flags.FFlagFriendsCarouselUILoadingTime);
local v20 = require(l_Parent_0.Components.UserTileCircular);
local v21 = {
    tileSize = 100,
    tileInfoHeight = 0
};
local _ = function(v22)
    local _ = nil;
    local _ = nil;
    local _ = nil;
    if v22.__typename == "Friend" then
        local v26 = v22.presence or {};
        return v26.userPresenceType, l_PresenceType_1, v26.lastLocation;
    else
        return v22.userPresenceType, l_PresenceType_0, v22.lastLocation;
    end;
end;
local function _(v28)
    local v29 = nil;
    local v30 = nil;
    local v31 = nil;
    if v28.__typename == "Friend" then
        local v32 = v28.presence or {};
        v29 = v32.userPresenceType;
        v30 = l_PresenceType_1;
        v31 = v32.lastLocation;
    else
        v29 = v28.userPresenceType;
        v30 = l_PresenceType_0;
        v31 = v28.lastLocation;
    end;
    local l_v29_0 = v29;
    local l_v30_0 = v30;
    local l_v31_0 = v31;
    return (not not l_v31_0 and l_v31_0 ~= "") and if v28.isFriendWithUser then l_v29_0 == l_v30_0.InStudio or l_v29_0 == l_v30_0.InGame else false, l_v31_0;
end;
local function _(v37)
    local v38 = false;
    if v37.userPresenceType == l_PresenceType_0.InStudio then
        v38 = v37.lastLocation and v37.lastLocation ~= "";
    end;
    return v38;
end;
local function v48(v40)
    if not l_FFlagFriendsCarouselPaginatedFriendsEnabled_0 then
        local v41;
        if not (not v40.isFriendWithUser or not v40.userPresenceType) then
            v41 = true;
            if v40.userPresenceType ~= l_PresenceType_0.Online then
                v41 = true;
                if v40.userPresenceType ~= l_PresenceType_0.InStudio then
                    v41 = true;
                    if not (v40.userPresenceType ~= l_PresenceType_0.InGame) then
                        goto label0;
                    end;
                else
                    goto label0;
                end;
            else
                goto label0;
            end;
        end;
        v41 = false;
        ::label0::;
        return v41;
    else
        local v42 = nil;
        local v43 = nil;
        local v44 = nil;
        if v40.__typename == "Friend" then
            local v45 = v40.presence or {};
            v42 = v45.userPresenceType;
            v43 = l_PresenceType_1;
            v44 = v45.lastLocation;
        else
            v42 = v40.userPresenceType;
            v43 = l_PresenceType_0;
            v44 = v40.lastLocation;
        end;
        local l_v42_0 = v42;
        local l_v43_0 = v43;
        if v40.isFriendWithUser then
            v42 = true;
            if l_v42_0 ~= l_v43_0.Online then
                v42 = true;
                if l_v42_0 ~= l_v43_0.InStudio then
                    v42 = true;
                    if not (l_v42_0 ~= l_v43_0.InGame) then
                        goto label1;
                    end;
                else
                    goto label1;
                end;
            else
                goto label1;
            end;
        end;
        v42 = false;
        ::label1::;
        return v42;
    end;
end;
local function v60(v49)
    local v50 = nil;
    local v51 = nil;
    if not v49.hasIncomingFriendRequest or v49.isFriendWithUser then
        if v49.isFriendWithUser then
            if not l_FFlagFriendsCarouselPaginatedFriendsEnabled_0 then
                if not v10(v49) then
                    local v52 = false;
                    if v49.userPresenceType == l_PresenceType_0.InStudio then
                        v52 = v49.lastLocation and v49.lastLocation ~= "";
                    end;
                    if not v52 then
                        v50 = nil;
                        goto label2 --[[  true, true  ]];
                    end;
                end;
                v50 = v49.lastLocation;
            else
                local v53 = nil;
                local v54 = nil;
                local v55 = nil;
                if v49.__typename == "Friend" then
                    local v56 = v49.presence or {};
                    v53 = v56.userPresenceType;
                    v54 = l_PresenceType_1;
                    v55 = v56.lastLocation;
                else
                    v53 = v49.userPresenceType;
                    v54 = l_PresenceType_0;
                    v55 = v49.lastLocation;
                end;
                local l_v53_0 = v53;
                local l_v54_0 = v54;
                local l_v55_0 = v55;
                v50 = if not ((not not l_v55_0 and l_v55_0 ~= "") and if v49.isFriendWithUser then l_v53_0 == l_v54_0.InStudio or l_v53_0 == l_v54_0.InGame else false) then nil else l_v55_0;
            end;
        else
            v51 = v11.SuggestedContext;
        end;
    else
        v51 = v11.FriendRequestContext;
    end;
    ::label2::;
    return v50 or l_useLocalization_0({
        text = v51
    }).text;
end;
return function(v61)
    local v62 = l_llama_0.Dictionary.join(v21, v61 or {});
    v3.useEffect(function()
        if not (not v19 or not v62.reportRender) then
            v62.reportRender((("%*%*"):format(v12.CarouselFriend, if v62.user.__typename == "Friend" then v12.ExperimentSuffix else "")));
            if not v62.user.userPresenceType then
                if not (not v62.user.presence or not v62.user.presence.userPresenceType) then
                    v62.reportRender((("%*%*"):format(v12.CarouselPresence, v12.ExperimentSuffix)));
                end;
            else
                v62.reportRender((("%*"):format(v12.CarouselPresence)));
                return ;
            end;
        end;
    end, {
        v62.user.__typename,
        v62.user.userPresenceType,
        v62.user.presence
    });
    local v63 = nil;
    local v64 = nil;
    local v65 = nil;
    local v66 = nil;
    v63 = v8.Hooks.useUserProfilesFetch({
        userIds = {
            v62.user.id
        },
        query = if not l_getFFlagUpdateFriendCarousel10ft_0() then v8.Queries.userProfilesCombinedNameAndUsernameByUserIds else v8.Queries.userProfilesCombinedAndPlatformByUserIds
    });
    v65 = if not l_FFlagContactRecs_0 then v63.loading or v63.error else if not not (v62.user.contextType == l_RecommendationContextType_0.Contacts) and v62.user.entityDisplayName ~= nil then nil else v63.loading or v63.error;
    v64 = if not v63.data then nil else v8.Selectors.getCombinedNameFromId(v63.data, v62.user.id);
    if l_getFFlagUpdateFriendCarousel10ft_0() then
        v66 = if not v63.data then nil else v8.Selectors.getPlatformNameFromId(v63.data, v62.user.id);
    end;
    local v67 = v48(v62.user);
    local v68 = v60(v62.user);
    local v69 = nil;
    local v70 = nil;
    local v71 = nil;
    if not l_FFlagContactRecs_0 then
        v69 = l_getStandardSizeAvatarHeadShotRbxthumb_0(v62.user.id);
        v70 = v64;
        v71 = ("@%*"):format(v62.user.username);
    elseif not (v62.user.contextType == l_RecommendationContextType_0.Contacts) then
        v69 = l_getStandardSizeAvatarHeadShotRbxthumb_0(v62.user.id);
        v70 = v64;
        v71 = ("@%*"):format(v62.user.username);
    else
        v69 = if not v62.user.thumbnailEntities then nil else v62.user.thumbnailEntities.headshotImageUrl;
        v70 = v62.user.entityDisplayName;
    end;
    local function v73(v72)
        v62.onActivated(v62.user, {
            headerTitle = v70,
            headerSubtitle = v71,
            contextText = v68,
            absolutePosition = v62.absoluteIndex,
            positionIndex = v62.layoutOrder,
            anchorSpaceSize = Vector2.new(v62.tileSize, v62.tileSize + v62.tileInfoHeight),
            anchorSpacePosition = v72.current.AbsolutePosition,
            onOpen = function()
                v62.setPeopleListFrozen(true);
            end,
            onClose = function()
                v62.setPeopleListFrozen(false);
            end
        });
    end;
    local l_v66_0 = v66;
    if l_v66_0 then
        l_v66_0 = false;
        if v66 ~= "" then
            l_v66_0 = v62.user.isFriendWithUser == false;
        end;
    end;
    return l_Roact_0.createElement(v20, {
        username = if not not l_getFFlagUpdateFriendCarousel10ft_0() and l_v66_0 then v66 else v70,
        shouldShimmerName = v65,
        thumbnail = v69,
        contextualText = v68,
        showOnlineIndicator = v67,
        showVendorIcon = if not l_getFFlagUpdateFriendCarousel10ft_0() then nil else l_v66_0,
        layoutOrder = v62.layoutOrder,
        onActivated = v73,
        isContextualTextMuted = true,
        tileSize = v62.tileSize,
        infoHeight = v62.tileInfoHeight
    });
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.dependencies);
local l_Roact_0 = v1.Roact;
local l_RoactRodux_0 = v1.RoactRodux;
local l_llama_0 = v1.llama;
local v5 = require(script.Parent.userTileMapStateToProps);
local v6 = require(script.Parent.userTileMapDispatchToProps);
local v7 = require(script.Parent.CarouselUserTile);
local v8 = require(l_Parent_0.Analytics);
local l_compose_0 = v1.SocialLibraries.RoduxTools.compose;
local _ = require(l_Parent_0.Common.LocalTypes);
local v11 = l_Roact_0.PureComponent:extend("UserTileContainer");
v11.render = function(v12)
    return l_Roact_0.createElement(v7, l_llama_0.Dictionary.join(v12.props, {
        fireEvent = l_llama_0.None,
        userSeen = l_llama_0.None
    }));
end;
v11.didMount = function(v13)
    local l_props_0 = v13.props;
    l_props_0.userSeen(l_props_0.user, {
        absolutePosition = l_props_0.absoluteIndex
    });
end;
return l_compose_0(l_RoactRodux_0.connect(v5, v6), v8.connect(function(v15)
    return {
        fireEvent = v15.fireEvent
    };
end))(v11);


local v0 = require(script.UserTileContainer);
local _ = require(script.CarouselUserTile);
return v0;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.dependencies);
local l_t_0 = v1.t;
local l_Roact_0 = v1.Roact;
local l_UIBlox_0 = v1.UIBlox;
local l_withLocalization_0 = v1.withLocalization;
local l_Tooltip_0 = l_UIBlox_0.App.Dialog.Tooltip;
local l_TooltipOrientation_0 = l_UIBlox_0.App.Dialog.Enum.TooltipOrientation;
local v8 = require(l_Parent_0.Common.TextKeys);
local v9 = require(l_Parent_0.Flags.FFlagFriendsCarouselUILoadingTime);
local v10 = l_Roact_0.PureComponent:extend("FindFriendsHint");
v10.defaultProps = {
    tileHeight = 100
};
v10.validateProps = l_t_0.strictInterface({
    layoutOrder = l_t_0.number,
    tileHeight = l_t_0.number,
    showNewAddFriendsUIVariant = l_t_0.optional(l_t_0.boolean),
    onDidMount = l_t_0.optional(l_t_0.callback)
});
v10.didMount = function(v11)
    local l_props_0 = v11.props;
    if not (not v9 or not l_props_0.onDidMount) then
        l_props_0.onDidMount();
    end;
end;
v10.render = function(v13)
    local l_props_1 = v13.props;
    return l_withLocalization_0({
        findFriendsTitle = if not l_props_1.showNewAddFriendsUIVariant then v8.FindFriendsTitle else v8.FindFriendsTitleV2,
        findFriendsBody = if not l_props_1.showNewAddFriendsUIVariant then v8.FindFriendsBody else v8.FindFriendsBodyV2
    })(function(v15)
        return l_Roact_0.createElement("Frame", {
            Size = UDim2.new(0, 250, 1, 0),
            LayoutOrder = l_props_1.layoutOrder,
            BackgroundTransparency = 1
        }, {
            HintFrame = l_Roact_0.createElement("Frame", {
                Size = UDim2.new(1, 0, 0, 0),
                BackgroundTransparency = 1
            }, {
                Tooltip = l_Roact_0.createElement(l_Tooltip_0, {
                    triggerPosition = Vector2.new(0, l_props_1.tileHeight),
                    triggerSize = Vector2.new(-12, l_props_1.tileHeight),
                    bodyText = v15.findFriendsBody,
                    headerText = v15.findFriendsTitle,
                    orientation = l_TooltipOrientation_0.Right,
                    forceClickTriggerPoint = true,
                    isDirectChild = true
                })
            })
        });
    end);
end;
return v10;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("FriendsCarousel");
local v1 = require(l_script_FirstAncestor_0.dependencies);
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local l_Roact_0 = v1.Roact;
local l_React_0 = v1.React;
local l_useLocalization_0 = v1.Hooks.useLocalization;
local v6 = require(l_script_FirstAncestor_0.Common.TextKeys);
local v7 = require(l_script_FirstAncestor_0.Components.AddFriendsTileCircular);
local v8 = require(l_script_FirstAncestor_0.Components.AddFriendsTileSquare);
local v9 = require(l_script_FirstAncestor_0.Analytics);
local l_EventNames_0 = v9.EventNames;
local l_useAnalytics_0 = v9.useAnalytics;
local l_useEffectOnce_0 = v1.Hooks.useEffectOnce;
local v13 = require(l_Parent_0.UIBlox).App.ImageSet.Images["icons/menu/friends_large"];
local v14 = require(l_script_FirstAncestor_0.Components.ButtonTileCircular);
local l_getFFlagUpdateFriendCarousel10ft_0 = v1.getFFlagUpdateFriendCarousel10ft;
local l_FFlagFriendsCarouselInjectSocialBtn_0 = require(l_Parent_0.SharedFlags).FFlagFriendsCarouselInjectSocialBtn;
local function _(v17)
    local v18;
    if type(v17) == "number" then
        if v17 > 0 then
            v18 = v17;
            if v18 then
                goto label0;
            end;
        end;
        return nil;
    elseif type(v17) == "string" then
        if v17 ~= "" then
            v18 = v17;
            if v18 then
                goto label0;
            end;
        end;
        return nil;
    else
        v18 = nil;
    end;
    ::label0::;
    return v18;
end;
return function(v20)
    l_React_0.useEffect(function()
        if v20.onDidMount then
            v20.onDidMount();
        end;
    end, {});
    local v23 = l_React_0.useMemo(function()
        local l_badgeValue_0 = v20.badgeValue;
        local v22;
        if type(l_badgeValue_0) == "number" then
            if l_badgeValue_0 > 0 then
                v22 = l_badgeValue_0;
                if v22 then
                    goto label1;
                end;
            end;
            return nil;
        elseif type(l_badgeValue_0) == "string" then
            if l_badgeValue_0 ~= "" then
                v22 = l_badgeValue_0;
                if v22 then
                    goto label1;
                end;
            end;
            return nil;
        else
            v22 = nil;
        end;
        ::label1::;
        return v22;
    end, {
        v20.badgeValue
    });
    local v24 = l_useAnalytics_0();
    l_useEffectOnce_0(function()
        v24.fireEvent(l_EventNames_0.ContactImporterOnAddFriends);
    end, v23);
    local v25 = l_useLocalization_0({
        addFriendText = v6.UpdatedFindFriendsText,
        findFriendsText = v6.FindFriendsText
    });
    if not v20.showNewAddFriendsUIVariant then
        if not l_FFlagFriendsCarouselInjectSocialBtn_0 then
            return (l_Roact_0.createElement(v7, {
                onActivated = v20.onActivated,
                labelText = v25.addFriendText,
                badgeValue = v23,
                thumbnailSize = if not l_getFFlagUpdateFriendCarousel10ft_0() then nil else v20.tileSize
            }));
        else
            return (l_Roact_0.createElement(v14, {
                onActivated = v20.onActivated,
                title = v25.addFriendText,
                badgeValue = v23,
                tileSize = if not l_getFFlagUpdateFriendCarousel10ft_0() then nil else v20.tileSize,
                backgroundColor = v20.backgroundColor,
                noBorder = v20.noBorder,
                icon = v20.icon or v13,
                iconColor = v20.iconColor
            }));
        end;
    else
        return (l_Roact_0.createElement(v8, {
            badgeValue = v23,
            onActivated = v20.onActivated,
            labelText = v25.findFriendsText
        }));
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.dependencies);
local l_Roact_0 = v1.Roact;
local l_t_0 = v1.t;
local l_RoactRodux_0 = v1.RoactRodux;
local v5 = require(l_Parent_0.Components.LoadingTile);
local v6 = l_Roact_0.Component:extend("LoadingCarousel");
v6.validateProps = l_t_0.strictInterface({
    layoutOrder = l_t_0.number,
    tileSize = l_t_0.number,
    tileInfoHeight = l_t_0.number,
    screenWidth = l_t_0.number,
    cardPadding = l_t_0.number
});
v6.defaultProps = {
    layoutOrder = 0,
    tileSize = 100,
    tileInfoHeight = 70,
    cardPadding = 10
};
v6.init = function(v7)
    v7.getListOfTiles = function()
        local l_props_0 = v7.props;
        local v9 = math.ceil(l_props_0.screenWidth / l_props_0.tileSize);
        local v10 = {
            ListLayout = l_Roact_0.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Horizontal,
                HorizontalAlignment = Enum.HorizontalAlignment.Left,
                VerticalAlignment = Enum.VerticalAlignment.Top,
                SortOrder = Enum.SortOrder.LayoutOrder,
                Padding = UDim.new(0, l_props_0.cardPadding)
            })
        };
        for v11 = 1, v9 do
            table.insert(v10, l_Roact_0.createElement(v5, {
                layoutOrder = v11,
                tileSize = l_props_0.tileSize,
                tileInfoHeight = l_props_0.tileInfoHeight
            }));
        end;
        return v10;
    end;
end;
v6.render = function(v12)
    return l_Roact_0.createElement("Frame", {
        LayoutOrder = v12.props.layoutOrder,
        BackgroundTransparency = 1
    }, v12.getListOfTiles());
end;
return l_RoactRodux_0.connect(function(v13)
    return {
        screenWidth = v13.ScreenSize.X
    };
end, nil)(v6);


local v0 = require(script.Parent.Parent.Parent.dependencies);
local l_Roact_0 = v0.Roact;
local l_t_0 = v0.t;
local l_ShimmerPanel_0 = v0.UIBlox.App.Loading.ShimmerPanel;
local v4 = l_Roact_0.PureComponent:extend("LoadingTile");
v4.validateProps = l_t_0.strictInterface({
    layoutOrder = l_t_0.number,
    tileSize = l_t_0.number,
    tileInfoHeight = l_t_0.number
});
v4.defaultProps = {
    layoutOrder = 0,
    tileSize = 100,
    tileInfoHeight = 70
};
v4.render = function(v5)
    local l_props_0 = v5.props;
    return l_Roact_0.createFragment({
        LoadingTile = l_Roact_0.createElement("Frame", {
            LayoutOrder = l_props_0.layoutOrder,
            Size = UDim2.fromOffset(l_props_0.tileSize, 0),
            BackgroundTransparency = 1
        }, {
            Layout = l_Roact_0.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Vertical,
                HorizontalAlignment = Enum.HorizontalAlignment.Left,
                VerticalAlignment = Enum.VerticalAlignment.Top,
                SortOrder = Enum.SortOrder.LayoutOrder,
                Padding = UDim.new(0, 10)
            }),
            PlayerTile = l_Roact_0.createElement(l_ShimmerPanel_0, {
                LayoutOrder = 1,
                Size = UDim2.fromOffset(l_props_0.tileSize, l_props_0.tileSize),
                cornerRadius = UDim.new(0, l_props_0.tileSize)
            })
        })
    });
end;
return v4;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("FriendsCarousel");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.React);
local v3 = require(l_Parent_0.SharedFlags);
local v4 = require(script.Parent.useCarouselList);
local v5 = require(script.Parent.RefreshCarouselWrapper);
local l_Analytics_0 = require(l_script_FirstAncestor_0.Analytics).Analytics;
local l_FFlagFriendsCarouselIXPfriendsSort_0 = v3.FFlagFriendsCarouselIXPfriendsSort;
return function(v8)
    local v9 = v2.useMemo(function()
        return l_Analytics_0({
            infoForAllEvents = {
                uid = v8.localUserId
            }
        });
    end, {
        v8.localUserId
    });
    local v10, v11, v12 = v4({
        userId = v8.localUserId,
        fireAnalyticsEvent = v9 and v9.fireAnalyticsEvent,
        friendsSortVariant = if not l_FFlagFriendsCarouselIXPfriendsSort_0 then nil else v8.friendsSortVariant
    });
    return v2.createElement(v5, {
        refreshSignal = v8.carouselProps.refreshSignal,
        refetchData = v12,
        renderChildComponent = function()
            return v8.renderChildComponent({
                carouselList = v10,
                fetchMoreFriends = v11
            });
        end
    });
end;


local l_Parent_0 = script:FindFirstAncestor("FriendsCarousel").Parent;
local v1 = require(l_Parent_0.React);
local v2 = require(l_Parent_0.RoactAppExperiment);
local v3 = require(l_Parent_0.Cryo);
local v4 = require(l_Parent_0.SharedFlags);
local l_FStringPaginatedCarouselExperimentLayer_0 = v4.FStringPaginatedCarouselExperimentLayer;
local l_FFlagFriendsCarouselIXPfriendsSort_0 = v4.FFlagFriendsCarouselIXPfriendsSort;
local v7 = require(script.Parent.PaginatedCarouselImplementationWrapper);
return function(v8)
    return function(v9)
        local v13, v14 = v2.useUserExperiment({
            l_FStringPaginatedCarouselExperimentLayer_0
        }, function(v10)
            local v11 = v10[l_FStringPaginatedCarouselExperimentLayer_0] or {};
            local l_paginatedFriendsCarouselEnabled_0 = v11.paginatedFriendsCarouselEnabled;
            if not l_FFlagFriendsCarouselIXPfriendsSort_0 then
                return l_paginatedFriendsCarouselEnabled_0, nil;
            else
                return l_paginatedFriendsCarouselEnabled_0, v11.friendsSortVariant;
            end;
        end);
        if not v13 then
            return (v1.createElement(v8, v9));
        else
            return (v1.createElement(v7, v3.Dictionary.join(v9, {
                renderChildComponent = function(v15)
                    return v1.createElement(v8, v3.Dictionary.join(v9, v15 or {}));
                end,
                friendsSortVariant = if not l_FFlagFriendsCarouselIXPfriendsSort_0 then nil else v14
            })));
        end;
    end;
end;


local l_Parent_0 = script:FindFirstAncestor("FriendsCarousel").Parent;
local v1 = require(l_Parent_0.React);
local l_useThrottledCallback_0 = require(l_Parent_0.RoactUtils).Hooks.useThrottledCallback;
local v3 = game:DefineFastInt("FriendsCarouselRefreshThrottleInterval", 3);
return function(v4)
    local v5, v6 = v1.useState(0);
    local v8 = l_useThrottledCallback_0(function()
        v4.refetchData();
        v6(function(v7)
            return v7 + 1;
        end);
    end, v3);
    v1.useEffect(function()
        if v4.refreshSignal then
            v4.refreshSignal:connect(v8);
            return ;
        else
            return ;
        end;
    end, {
        v4.refreshSignal
    });
    return v1.createElement("Frame", {
        key = v5,
        Size = UDim2.new(1, 0, 1, 0),
        BackgroundTransparency = 1
    }, {
        component = v4.renderChildComponent()
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("FriendsCarousel");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.React);
local v3 = require(l_Parent_0.Cryo);
local v4 = require(l_Parent_0.UIBlox);
local v5 = require(l_Parent_0.SharedFlags);
local v6 = require(l_Parent_0.ApolloClient);
local l_useQuery_0 = v6.useQuery;
local l_useApolloClient_0 = v6.useApolloClient;
local l_queries_0 = require(l_Parent_0.ApolloLocalState).queries;
local l_PresenceType_0 = require(l_Parent_0.GraphQLServer).types.PresenceType;
local v11 = require(l_Parent_0.ApolloFriends);
local v12 = require(l_Parent_0.ApolloPresence);
local l_useFetchTimeLogging_0 = require(l_Parent_0.SocialLuaAnalytics).Analytics.Timing.useFetchTimeLogging;
local v14 = require(l_script_FirstAncestor_0.Analytics.EventNames);
local v15 = require(l_script_FirstAncestor_0.Analytics.FetchNames);
local l_RetrievalStatus_0 = v4.App.Loading.Enum.RetrievalStatus;
local l_FriendsCarouselPresenceUpdateSignal_0 = require(l_script_FirstAncestor_0.Signals).FriendsCarouselPresenceUpdateSignal;
local l_FriendsCarouselFriendshipUpdateSignal_0 = require(l_script_FirstAncestor_0.Signals).FriendsCarouselFriendshipUpdateSignal;
local v19 = require(l_script_FirstAncestor_0.Flags.FFlagFriendsCarouselUILoadingTime);
local l_FriendsCarouselFriendshipUpdateSignal_1 = require(l_script_FirstAncestor_0.Signals).FriendsCarouselFriendshipUpdateSignal;
local l_FFlagFriendsCarouselIXPfriendsSort_0 = v5.FFlagFriendsCarouselIXPfriendsSort;
local l_FIntFriendsCarouselInitialFetchSize_0 = v5.FIntFriendsCarouselInitialFetchSize;
local v23 = game:DefineFastInt("FriendsCarouselLoadMoreFetchSize", 10);
local _ = function(v24)
    local v25 = {};
    for _, v27 in v24, nil, nil do
        v25[v27.id] = v27.presence;
    end;
    return v25;
end;
local function v45(v29, v30, v31)
    local v32 = nil;
    local v33 = nil;
    if not v19 then
        v32 = v31;
    else
        v33 = v31;
        v32 = v33.friends or v33.onlineFriends;
    end;
    local v34 = v29 or {};
    local v35 = {};
    for _, v37 in v34, nil, nil do
        v35[v37.id] = v37.presence;
    end;
    local l_v35_0 = v35;
    local v44 = v3.List.map(v3.List.join(v3.List.filter(v29, function(v39)
        return v39.presence.userPresenceType == l_PresenceType_0.InGame;
    end), v3.List.filter(v29, function(v40)
        return v40.presence.userPresenceType == l_PresenceType_0.Online;
    end), v3.List.filter(v29, function(v41)
        return v41.presence.userPresenceType == l_PresenceType_0.InStudio;
    end), (v3.List.filter(v30 or {}, function(v42)
        return not l_v35_0[v42.id];
    end))), function(v43)
        return v3.Dictionary.join(v43, {
            isFriendWithUser = true,
            presence = if not v19 then nil else if v43.presence then v43.presence else if not v19 then nil else if v33.onlineFriends then nil else {
                userPresenceType = l_PresenceType_0.Offline
            }
        });
    end);
    if v32 then
        table.insert(v44, {
            isLoading = true
        });
    end;
    return v44;
end;
local function v50(v46, v47)
    for _, v49 in v47, nil, nil do
        v12.Mutations.createUserPresenceCache(v46, {
            id = v49.userId,
            userPresenceNumber = v49.userPresenceType,
            lastLocation = v49.lastLocation,
            lastOnline = v49.lastOnline,
            gameId = v49.gameId,
            placeId = v49.placeId,
            rootPlaceId = v49.rootPlaceId,
            universeId = v49.universeId
        });
    end;
end;
local function v62(v51, v52, v53)
    local v54 = v51:readQuery({
        query = l_queries_0.onlineFriendsByUserId,
        variables = v52
    });
    local v55 = if not v54 then {} else v54.onlineFriendsByUserId or {};
    local v56 = {};
    for _, v58 in v55, nil, nil do
        v56[v58.id] = v58.presence;
    end;
    local l_v56_0 = v56;
    return #v3.List.filter(v53, function(v60)
        local v61 = false;
        if v12.Formatters.formatNumberToPresenceType(v60.userPresenceType) ~= l_PresenceType_0.Offline then
            v61 = not l_v56_0[tostring(v60.userId)];
        end;
        return v61;
    end);
end;
return function(v63)
    local v64 = l_useApolloClient_0();
    local v65 = {
        userId = v63.userId,
        sort = if not not l_FFlagFriendsCarouselIXPfriendsSort_0 and v63.friendsSortVariant then v63.friendsSortVariant else v11.Enums.Sort.FriendshipScore
    };
    local v66 = v2.useRef(nil);
    local v67 = v2.useRef(nil);
    local v68 = l_useQuery_0(l_queries_0.allFriendsByUserId, {
        errorPolicy = "all",
        notifyOnNetworkStatusChange = true,
        variables = v3.Dictionary.join(v65, {
            pageLimit = l_FIntFriendsCarouselInitialFetchSize_0,
            pageCursor = ""
        })
    });
    local v69 = l_useQuery_0(l_queries_0.onlineFriendsByUserId, {
        notifyOnNetworkStatusChange = true,
        variables = v65
    });
    l_useFetchTimeLogging_0({
        loading = v68.loading,
        error = v67.current or v68.error,
        timerKey = v66.current or v15.AllFriends,
        onSuccess = function(v70, v71)
            if v63.fireAnalyticsEvent then
                v63.fireAnalyticsEvent(v14.PaginatedFriendsCarouselLoadingTime, {
                    status = l_RetrievalStatus_0.Done.rawValue(),
                    loadingTime = v70,
                    nextPage = v71 ~= v15.AllFriends,
                    fetch = v15.AllFriends
                });
            end;
        end,
        onError = function(v72, v73)
            if v63.fireAnalyticsEvent then
                v63.fireAnalyticsEvent(v14.PaginatedFriendsCarouselLoadingTime, {
                    status = l_RetrievalStatus_0.Failed.rawValue(),
                    loadingTime = v72,
                    nextPage = v73 ~= v15.AllFriends,
                    fetch = v15.AllFriends
                });
            end;
        end
    });
    l_useFetchTimeLogging_0({
        loading = v69.loading,
        error = v69.error,
        timerKey = v15.OnlineFriends,
        onSuccess = function(v74)
            if v63.fireAnalyticsEvent then
                v63.fireAnalyticsEvent(v14.PaginatedFriendsCarouselLoadingTime, {
                    status = l_RetrievalStatus_0.Done.rawValue(),
                    loadingTime = v74,
                    fetch = v15.OnlineFriends
                });
            end;
        end,
        onError = function(v75)
            if v63.fireAnalyticsEvent then
                v63.fireAnalyticsEvent(v14.PaginatedFriendsCarouselLoadingTime, {
                    status = l_RetrievalStatus_0.Failed.rawValue(),
                    loadingTime = v75,
                    fetch = v15.OnlineFriends
                });
            end;
        end
    });
    local v76 = if not v68.data then nil else v68.data.allFriendsByUserId.nextCursor;
    local v77 = if not v68.data then nil else v68.data.allFriendsByUserId.friends;
    local v78 = not not v69.data and v69.data.onlineFriendsByUserId or {};
    local v80 = v2.useCallback(function()
        if not (not v76 or v76 == "") and not v68.loading then
            v68:fetchMore({
                variables = {
                    pageCursor = v76,
                    pageLimit = v23
                }
            }):andThen(function(v79)
                v67.current = v79 and v79.errors;
            end);
            v66.current = v76;
            return ;
        else
            return ;
        end;
    end, {
        v76,
        v68.loading
    });
    local function v81()
        v69:refetch();
        v68:refetch();
        v66.current = nil;
        v67.current = nil;
    end;
    v2.useEffect(function()
        l_FriendsCarouselPresenceUpdateSignal_0.Event:Connect(function(v82)
            v50(v64, v82);
            if v62(v64, v65, v82) > 0 then
                v69:refetch();
                if not (not l_FriendsCarouselFriendshipUpdateSignal_1 or not v63.fireAnalyticsEvent) then
                    v63.fireAnalyticsEvent(v14.OnlineFriendsRefetchOnPresenceUpdate);
                end;
            end;
        end);
        l_FriendsCarouselFriendshipUpdateSignal_0.Event:Connect(function(v83)
            if not v83.removedUserId then
                if v83.addedUserId then
                    v69:refetch();
                    v11.Cache.addFriendToFriendsByUserIdCache(v64, {
                        targetUserId = v63.userId,
                        userId = v83.addedUserId,
                        hasVerifiedBadge = nil
                    });
                    if not (not l_FriendsCarouselFriendshipUpdateSignal_1 or not v63.fireAnalyticsEvent) then
                        v63.fireAnalyticsEvent(v14.OnlineFriendsRefetchOnFriendshipUpdate);
                    end;
                end;
                return ;
            else
                v11.Cache.removeFriendFromCache(v64, {
                    targetUserId = v63.userId,
                    userId = v83.removedUserId
                });
                return ;
            end;
        end);
        return function()
            l_FriendsCarouselPresenceUpdateSignal_0:Destroy();
            l_FriendsCarouselFriendshipUpdateSignal_0:Destroy();
        end;
    end, {});
    local v84 = if not v19 then v68.loading or v69.loading else nil;
    return v2.useMemo(function()
        return (v45(v78, v77, if not v19 then v84 else {
            friends = v68.loading,
            onlineFriends = v69.loading
        }));
    end, {
        v78,
        v77,
        v84,
        if not v19 then nil else v68.loading,
        if not v19 then nil else v69.loading
    }), v80, v81;
end;


local v0 = require(script:FindFirstAncestor("FriendsCarousel").dependencies);
local l_Roact_0 = v0.Roact;
local l_React_0 = v0.React;
local l_Text_0 = v0.Text;
local l_llama_0 = v0.llama;
local l_memoize_0 = v0.memoize;
local l_useDesignTokens_0 = v0.Hooks.useDesignTokens;
local l_useUiModeInfo_0 = v0.Hooks.useUiModeInfo;
local l_UiMode_0 = v0.RobloxAppEnums.UiMode;
local l_UIBlox_0 = v0.UIBlox;
local l_useStyle_0 = l_UIBlox_0.Core.Style.useStyle;
local l_Images_0 = l_UIBlox_0.App.ImageSet.Images;
local l_StyledTextLabel_0 = l_UIBlox_0.App.Text.StyledTextLabel;
local l_ImageSetLabel_0 = l_UIBlox_0.Core.ImageSet.ImageSetLabel;
local l_ShimmerPanel_0 = l_UIBlox_0.App.Loading.ShimmerPanel;
local l_useCursor_0 = l_UIBlox_0.App.SelectionCursor.useCursor;
local l_getFFlagUpdateFriendCarousel10ft_0 = v0.getFFlagUpdateFriendCarousel10ft;
local l_FFlagLuaAppFixCursorHooks_0 = v0.FFlagLuaAppFixCursorHooks;
local v18 = game:DefineFastString("FriendCarouselVendorImagePath", "rbxasset://textures/ui/Shell/Icons/PlatformLogo.png");
local v19 = l_Images_0["component_assets/circle_25"];
local v20 = UDim.new(0.5, 0);
local v24 = l_memoize_0(function(v21, v22, v23)
    return l_Text_0.GetTextBounds(v21, v22.Font, if not v22.RelativeSize then v22.FontSize else v22.RelativeSize * v23, Vector2.new(10000, 10000));
end);
local v25 = {
    username = "",
    thumbnail = "",
    layoutOrder = 0,
    tileSize = 96,
    infoHeight = 24
};
return function(v26)
    local v27 = l_llama_0.Dictionary.join(v25, v26 or {});
    local v28 = l_Roact_0.createRef();
    local v29 = l_React_0.useCallback(function()
        if not (not v28 or not v27.onActivated) then
            v27.onActivated(v28);
        end;
    end, {
        v28
    });
    local v30 = l_useUiModeInfo_0();
    local v32 = l_useDesignTokens_0(function(v31)
        if v30.uiMode == l_UiMode_0.TenFoot then
            return {
                presenceIconSize = v31.Global.Size_150,
                presenceIconPadding = v31.Global.Space_50,
                tilePadding = v31.Global.Space_100,
                gameTitlePadding = v31.Global.Space_50,
                usernameTextFont = v31.Semantic.Typography.CaptionHeader,
                contextualTextFont = v31.Semantic.Typography.CaptionBody
            };
        else
            return {
                presenceIconSize = 12,
                presenceIconPadding = 4,
                tilePadding = 8,
                gameTitlePadding = 4
            };
        end;
    end);
    local v33 = if not l_FFlagLuaAppFixCursorHooks_0 then nil else l_useCursor_0(v20);
    local v34 = l_useStyle_0();
    local v35 = v32.contextualTextFont or v34.Font.CaptionSubHeader;
    local v36 = v32.usernameTextFont or v34.Font.CaptionHeader;
    local v37 = v24(v27.username, v36, v34.Font.BaseSize);
    local v38 = if not l_getFFlagUpdateFriendCarousel10ft_0() then math.min((v27.tileSize - 12) - 4, v37.X) else math.min((v27.tileSize - v32.presenceIconSize) - v32.presenceIconPadding, v37.X);
    if not l_getFFlagUpdateFriendCarousel10ft_0() then
        return l_Roact_0.createFragment({
            UserTileCircular = l_Roact_0.createElement("TextButton", {
                AutomaticSize = Enum.AutomaticSize.Y,
                Size = UDim2.fromOffset(v27.tileSize, 0),
                BackgroundTransparency = 1,
                Text = "",
                LayoutOrder = v27.layoutOrder,
                [l_Roact_0.Ref] = v28,
                [l_Roact_0.Event.Activated] = v29
            }, {
                Layout = l_Roact_0.createElement("UIListLayout", {
                    FillDirection = Enum.FillDirection.Vertical,
                    HorizontalAlignment = Enum.HorizontalAlignment.Center,
                    VerticalAlignment = Enum.VerticalAlignment.Top,
                    SortOrder = Enum.SortOrder.LayoutOrder,
                    Padding = if not l_getFFlagUpdateFriendCarousel10ft_0() then UDim.new(0, 8) else UDim.new(0, v32.tilePadding)
                }),
                PlayerAvatar = l_Roact_0.createElement(l_ImageSetLabel_0, {
                    Image = v27.thumbnail,
                    LayoutOrder = 1,
                    Size = UDim2.new(0, v27.tileSize, 0, v27.tileSize)
                }, {
                    UICorner = l_Roact_0.createElement("UICorner", {
                        CornerRadius = UDim.new(1, 0)
                    })
                }),
                UserInfo = l_Roact_0.createElement("Frame", {
                    Size = UDim2.new(1, 0, 0, v27.infoHeight),
                    BackgroundTransparency = 1,
                    LayoutOrder = 2
                }, {
                    Layout = l_Roact_0.createElement("UIListLayout", {
                        FillDirection = Enum.FillDirection.Vertical,
                        HorizontalAlignment = Enum.HorizontalAlignment.Center,
                        VerticalAlignment = Enum.VerticalAlignment.Top,
                        SortOrder = Enum.SortOrder.LayoutOrder,
                        Padding = if not l_getFFlagUpdateFriendCarousel10ft_0() then UDim.new(0, 4) else UDim.new(0, v32.gameTitlePadding)
                    }),
                    UsernameFrame = l_Roact_0.createElement("Frame", {
                        AutomaticSize = Enum.AutomaticSize.XY,
                        BackgroundTransparency = 1,
                        LayoutOrder = 1
                    }, {
                        Layout = l_Roact_0.createElement("UIListLayout", {
                            FillDirection = Enum.FillDirection.Horizontal,
                            HorizontalAlignment = Enum.HorizontalAlignment.Center,
                            VerticalAlignment = Enum.VerticalAlignment.Center,
                            SortOrder = Enum.SortOrder.LayoutOrder,
                            Padding = if not l_getFFlagUpdateFriendCarousel10ft_0() then UDim.new(0, 4) else UDim.new(0, v32.presenceIconPadding)
                        }),
                        PresenceIcon = not not v27.showOnlineIndicator and l_Roact_0.createElement(l_ImageSetLabel_0, {
                            AnchorPoint = Vector2.new(0.5, 0.5),
                            Image = v19,
                            ImageColor3 = v34.Theme.OnlineStatus.Color,
                            ImageTransparency = v34.Theme.OnlineStatus.Transparency,
                            LayoutOrder = 1,
                            Position = UDim2.fromScale(0.5, 0.5),
                            Size = if not l_getFFlagUpdateFriendCarousel10ft_0() then UDim2.new(0, 12, 0, 12) else UDim2.new(0, v32.presenceIconSize, 0, v32.presenceIconSize),
                            BackgroundTransparency = 1,
                            ScaleType = Enum.ScaleType.Slice
                        }) or nil,
                        PlayerName = if v27.shouldShimmerName then nil else l_Roact_0.createElement(l_StyledTextLabel_0, {
                            layoutOrder = 2,
                            text = v27.username,
                            fontStyle = v36,
                            size = UDim2.new(0, v38, 0, v37.Y),
                            colorStyle = v34.Theme.TextEmphasis,
                            textTruncate = Enum.TextTruncate.AtEnd,
                            textXAlignment = Enum.TextXAlignment.Left,
                            textYAlignment = Enum.TextYAlignment.Center,
                            fluidSizing = false,
                            richText = false
                        }),
                        ShimmerName = if not v27.shouldShimmerName then nil else l_Roact_0.createElement(l_ShimmerPanel_0, {
                            Size = UDim2.fromScale(0.8, 0.8),
                            LayoutOrder = 2
                        })
                    }),
                    ContextualInfo = if not v27.contextualText then nil else l_Roact_0.createElement(l_StyledTextLabel_0, {
                        layoutOrder = 2,
                        text = v27.contextualText,
                        fontStyle = v35,
                        size = UDim2.new(1, 0, 0, v24(v27.contextualText, v35, v34.Font.BaseSize).Y),
                        colorStyle = not not v27.isContextualTextMuted and v34.Theme.TextMuted or v34.Theme.TextEmphasis,
                        textTruncate = Enum.TextTruncate.AtEnd,
                        textXAlignment = Enum.TextXAlignment.Center,
                        textYAlignment = Enum.TextYAlignment.Top,
                        fluidSizing = false,
                        richText = false,
                        lineHeight = 1
                    })
                })
            })
        });
    else
        return l_Roact_0.createFragment({
            UserTileCircular = l_Roact_0.createElement("Frame", {
                AutomaticSize = Enum.AutomaticSize.Y,
                BackgroundTransparency = 1,
                LayoutOrder = v27.layoutOrder,
                Size = UDim2.fromOffset(v27.tileSize, 0),
                [l_Roact_0.Ref] = v28
            }, {
                Layout = l_Roact_0.createElement("UIListLayout", {
                    FillDirection = Enum.FillDirection.Vertical,
                    HorizontalAlignment = Enum.HorizontalAlignment.Center,
                    VerticalAlignment = Enum.VerticalAlignment.Top,
                    SortOrder = Enum.SortOrder.LayoutOrder,
                    Padding = UDim.new(0, v32.tilePadding)
                }),
                PlayerAvatar = l_Roact_0.createElement("TextButton", {
                    BackgroundTransparency = 1,
                    LayoutOrder = 1,
                    SelectionImageObject = if not l_FFlagLuaAppFixCursorHooks_0 then l_useCursor_0(v20) else v33,
                    Size = UDim2.fromOffset(v27.tileSize, v27.tileSize),
                    Text = "",
                    [l_Roact_0.Event.Activated] = v29
                }, {
                    AvatarImage = l_Roact_0.createElement(l_ImageSetLabel_0, {
                        Image = v27.thumbnail,
                        Size = UDim2.fromScale(1, 1)
                    }, {
                        UICorner = l_Roact_0.createElement("UICorner", {
                            CornerRadius = v20
                        })
                    })
                }),
                UserInfo = l_Roact_0.createElement("TextButton", {
                    BackgroundTransparency = 1,
                    LayoutOrder = 2,
                    Selectable = false,
                    Size = UDim2.new(1, 0, 0, v27.infoHeight),
                    Text = "",
                    [l_Roact_0.Event.Activated] = v29
                }, {
                    Layout = l_Roact_0.createElement("UIListLayout", {
                        FillDirection = Enum.FillDirection.Vertical,
                        HorizontalAlignment = Enum.HorizontalAlignment.Center,
                        VerticalAlignment = Enum.VerticalAlignment.Top,
                        SortOrder = Enum.SortOrder.LayoutOrder,
                        Padding = UDim.new(0, v32.gameTitlePadding)
                    }),
                    UsernameFrame = l_Roact_0.createElement("Frame", {
                        AutomaticSize = Enum.AutomaticSize.XY,
                        BackgroundTransparency = 1,
                        LayoutOrder = 1
                    }, {
                        Layout = l_Roact_0.createElement("UIListLayout", {
                            FillDirection = Enum.FillDirection.Horizontal,
                            HorizontalAlignment = Enum.HorizontalAlignment.Center,
                            VerticalAlignment = Enum.VerticalAlignment.Center,
                            SortOrder = Enum.SortOrder.LayoutOrder,
                            Padding = UDim.new(0, v32.presenceIconPadding)
                        }),
                        PresenceIcon = not not v27.showOnlineIndicator and l_Roact_0.createElement(l_ImageSetLabel_0, {
                            AnchorPoint = Vector2.new(0.5, 0.5),
                            Image = v19,
                            ImageColor3 = v34.Theme.OnlineStatus.Color,
                            ImageTransparency = v34.Theme.OnlineStatus.Transparency,
                            LayoutOrder = 1,
                            Position = UDim2.fromScale(0.5, 0.5),
                            Size = UDim2.new(0, v32.presenceIconSize, 0, v32.presenceIconSize),
                            BackgroundTransparency = 1,
                            ScaleType = Enum.ScaleType.Slice,
                            Visible = v27.showVendorIcon ~= true
                        }) or nil,
                        VendorIcon = not not v27.showVendorIcon and l_Roact_0.createElement(l_ImageSetLabel_0, {
                            AnchorPoint = Vector2.new(0.5, 0.5),
                            Image = {
                                Image = v18,
                                ImageRectOffset = Vector2.zero,
                                ImageRectSize = Vector2.zero
                            },
                            LayoutOrder = 1,
                            Position = UDim2.fromScale(0.5, 0.5),
                            Size = UDim2.new(0, v32.presenceIconSize, 0, v32.presenceIconSize),
                            BackgroundTransparency = 1
                        }) or nil,
                        PlayerName = if v27.shouldShimmerName then nil else l_Roact_0.createElement(l_StyledTextLabel_0, {
                            layoutOrder = 2,
                            text = v27.username,
                            fontStyle = v36,
                            size = UDim2.new(0, v38, 0, v37.Y),
                            colorStyle = v34.Theme.TextEmphasis,
                            textTruncate = Enum.TextTruncate.AtEnd,
                            textXAlignment = Enum.TextXAlignment.Left,
                            textYAlignment = Enum.TextYAlignment.Center,
                            fluidSizing = false,
                            richText = false
                        }),
                        ShimmerName = if not v27.shouldShimmerName then nil else l_Roact_0.createElement(l_ShimmerPanel_0, {
                            Size = UDim2.fromScale(0.8, 0.8),
                            LayoutOrder = 2
                        })
                    }),
                    ContextualInfo = if not v27.contextualText then nil else l_Roact_0.createElement(l_StyledTextLabel_0, {
                        layoutOrder = 2,
                        text = v27.contextualText,
                        fontStyle = v35,
                        size = UDim2.new(1, 0, 0, v24(v27.contextualText, v35, v34.Font.BaseSize).Y),
                        colorStyle = not not v27.isContextualTextMuted and v34.Theme.TextMuted or v34.Theme.TextEmphasis,
                        textTruncate = Enum.TextTruncate.AtEnd,
                        textXAlignment = Enum.TextXAlignment.Center,
                        textYAlignment = Enum.TextYAlignment.Top,
                        fluidSizing = false,
                        richText = false,
                        lineHeight = 1
                    })
                })
            })
        });
    end;
end;


local v0 = require(script.Parent.Parent.Parent.dependencies);
local l_Roact_0 = v0.Roact;
local l_Text_0 = v0.Text;
local l_memoize_0 = v0.memoize;
local l_UIBlox_0 = v0.UIBlox;
local l_StyledTextLabel_0 = l_UIBlox_0.App.Text.StyledTextLabel;
local l_withStyle_0 = l_UIBlox_0.Style.withStyle;
local v7 = l_Roact_0.PureComponent:extend("PlayerName");
v7.init = function(v8)
    v8.getTextHeight = l_memoize_0(function(v9, v10, v11)
        return l_Text_0.GetTextHeight(v9, v10, v11);
    end);
end;
v7.render = function(v12)
    local l_props_0 = v12.props;
    return l_withStyle_0(function(v14)
        local l_Theme_0 = v14.Theme;
        local l_Font_0 = v14.Font;
        return l_Roact_0.createElement(l_StyledTextLabel_0, {
            layoutOrder = l_props_0.layoutOrder,
            text = l_props_0.name,
            fontStyle = l_Font_0.CaptionHeader,
            colorStyle = l_Theme_0.TextEmphasis,
            size = UDim2.fromOffset(l_props_0.tileSize, v12.getTextHeight(l_props_0.name, l_Font_0.CaptionHeader.Font, l_Font_0.BaseSize * l_Font_0.CaptionHeader.RelativeSize)),
            textTruncate = Enum.TextTruncate.AtEnd,
            textXAlignment = Enum.TextXAlignment.Left,
            textYAlignment = Enum.TextYAlignment.Center,
            lineHeight = 1,
            fluidSizing = false,
            richText = false
        });
    end);
end;
return v7;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.dependencies);
local l_Roact_0 = v1.Roact;
local l_React_0 = v1.React;
local l_llama_0 = v1.llama;
local l_UIBlox_0 = v1.UIBlox;
local l_PlayerTile_0 = l_UIBlox_0.App.Tile.PlayerTile;
local l_Interactable_0 = l_UIBlox_0.Core.Control.Interactable;
local l_Images_0 = l_UIBlox_0.App.ImageSet.Images;
local l_StyledTextLabel_0 = l_UIBlox_0.App.Text.StyledTextLabel;
local l_ImageSetLabel_0 = l_UIBlox_0.Core.ImageSet.ImageSetLabel;
local l_useStyle_0 = l_UIBlox_0.Core.Style.useStyle;
local v12 = require(script.Parent.PlayerName);
local v13 = require(l_Parent_0.Utils.getTextHeight);
local v14 = l_Images_0["component_assets/circle_25"];
local v15 = {
    username = "",
    thumbnail = "",
    tileSize = 100,
    contextualInfoLines = 1
};
local function v16()
end;
return function(v17)
    local v18 = l_llama_0.Dictionary.join(v15, v17 or {});
    local l_tileSize_0 = v18.tileSize;
    local v20 = l_Roact_0.createRef();
    local v21 = l_React_0.useCallback(function()
        if not (not v20 or not v18.onActivated) then
            v18.onActivated(v20);
        end;
    end, {
        v20
    });
    local v22 = l_useStyle_0();
    local l_CaptionSubHeader_0 = v22.Font.CaptionSubHeader;
    return l_Roact_0.createFragment({
        UserTileSquare = l_Roact_0.createElement("Frame", {
            [l_Roact_0.Ref] = v20,
            LayoutOrder = v18.layoutOrder,
            Size = UDim2.fromOffset(l_tileSize_0, 0),
            BackgroundTransparency = 1
        }, {
            UIListLayout = l_Roact_0.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Vertical,
                SortOrder = Enum.SortOrder.LayoutOrder
            }),
            PlayerAvatarFrame = l_Roact_0.createElement("Frame", {
                LayoutOrder = 1,
                Size = UDim2.fromOffset(l_tileSize_0, l_tileSize_0),
                BackgroundTransparency = 1
            }, {
                PlayerAvatar = l_Roact_0.createElement(l_PlayerTile_0, {
                    tileSize = UDim2.fromOffset(l_tileSize_0, l_tileSize_0),
                    thumbnail = v18.thumbnail,
                    onActivated = v21,
                    buttons = v18.buttons
                })
            }),
            Padding1 = l_Roact_0.createElement("Frame", {
                LayoutOrder = 2,
                Size = UDim2.fromOffset(0, 8),
                BackgroundTransparency = 1
            }),
            UserInfo = l_Roact_0.createElement(l_Interactable_0, {
                LayoutOrder = 3,
                [l_Roact_0.Event.Activated] = v21,
                AutomaticSize = Enum.AutomaticSize.XY,
                onStateChanged = v16,
                BackgroundTransparency = 1
            }, {
                UIListLayout = l_Roact_0.createElement("UIListLayout", {
                    FillDirection = Enum.FillDirection.Vertical,
                    SortOrder = Enum.SortOrder.LayoutOrder
                }),
                PlayerName = l_Roact_0.createElement(v12, {
                    layoutOrder = 1,
                    name = v18.username,
                    tileSize = l_tileSize_0
                }),
                Padding2 = l_Roact_0.createElement("Frame", {
                    LayoutOrder = 2,
                    Size = UDim2.fromOffset(0, 2),
                    BackgroundTransparency = 1
                }),
                ContextualInfoFrame = l_Roact_0.createElement("Frame", {
                    AutomaticSize = Enum.AutomaticSize.XY,
                    BackgroundTransparency = 1,
                    LayoutOrder = 3
                }, {
                    Layout = l_Roact_0.createElement("UIListLayout", {
                        FillDirection = Enum.FillDirection.Horizontal,
                        HorizontalAlignment = Enum.HorizontalAlignment.Left,
                        VerticalAlignment = Enum.VerticalAlignment.Center,
                        SortOrder = Enum.SortOrder.LayoutOrder,
                        Padding = UDim.new(0, 4)
                    }),
                    PresenceIcon = not not v18.showOnlineIndicator and l_Roact_0.createElement(l_ImageSetLabel_0, {
                        AnchorPoint = Vector2.new(0.5, 0.5),
                        Image = v14,
                        ImageColor3 = v22.Theme.OnlineStatus.Color,
                        ImageTransparency = v22.Theme.OnlineStatus.Transparency,
                        LayoutOrder = 1,
                        Position = UDim2.fromScale(0.5, 0.5),
                        Size = UDim2.new(0, 12, 0, 12),
                        BackgroundTransparency = 1,
                        ScaleType = Enum.ScaleType.Slice
                    }) or nil,
                    ContextualInfo = not not v18.contextualText and l_Roact_0.createElement(l_StyledTextLabel_0, {
                        layoutOrder = 2,
                        text = v18.contextualText,
                        fontStyle = l_CaptionSubHeader_0,
                        size = UDim2.fromOffset(if not v18.showOnlineIndicator then v18.tileSize else v18.tileSize - 16, l_React_0.useMemo(function()
                            return v13(v18.contextualText, l_CaptionSubHeader_0.Font, v22.Font.BaseSize * v22.Font.CaptionSubHeader.RelativeSize);
                        end, {
                            v18.contextualText
                        }) * v18.contextualInfoLines),
                        colorStyle = not not v18.isContextualTextMuted and v22.Theme.TextMuted or v22.Theme.TextEmphasis,
                        textTruncate = Enum.TextTruncate.AtEnd,
                        textXAlignment = Enum.TextXAlignment.Left,
                        textYAlignment = Enum.TextYAlignment.Center,
                        fluidSizing = false,
                        richText = false,
                        lineHeight = 1
                    }) or nil
                })
            })
        })
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("FriendsCarousel");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.React);
local v3 = require(l_Parent_0.Cryo);
local _ = require(l_script_FirstAncestor_0.Common.LocalTypes);
local l_FIntFriendsCarouselSocialBtnFriendsLimit_0 = require(l_Parent_0.SharedFlags).FIntFriendsCarouselSocialBtnFriendsLimit;
local function _(v6)
    return v3.List.map(v6 or {}, function(v7, v8)
        return (v3.Dictionary.join({
            isCustomBtn = true,
            id = v7.id or ("%*%*"):format("CustomBtn", v8)
        }, v7));
    end);
end;
local function v13(v10)
    return v3.List.map(v10 or {}, function(v11, v12)
        return (v3.Dictionary.join({
            index = v12
        }, v11));
    end);
end;
return function(v14)
    return (v2.useMemo(function()
        return v13((v3.List.join({
            if not v14.includeAddFriendsBtn then nil else v3.Dictionary.join({
                isAddButton = true,
                id = "AddFriendsBtn"
            }, v14.addFriendsBtn or {})
        }, v14.users or {}, if not not v14.friendCount and v14.friendCount <= l_FIntFriendsCarouselSocialBtnFriendsLimit_0 then v3.List.map(v14.socialOnboardingBtns or {}, function(v15, v16)
            return (v3.Dictionary.join({
                isCustomBtn = true,
                id = v15.id or ("%*%*"):format("CustomBtn", v16)
            }, v15));
        end) else {} or {})));
    end, {
        v14.includeAddFriendsBtn,
        v14.friendCount,
        v14.users,
        v14.socialOnboardingBtns,
        v14.addFriendsBtn
    }));
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("FriendsCarousel");
local v1 = require(l_script_FirstAncestor_0.dependencies);
local l_beforeAll_0 = require(l_script_FirstAncestor_0.devDependencies).JestGlobals.beforeAll;
local _ = require(l_script_FirstAncestor_0.Flags.getFIntShowFriendRecommendationsLimit);
l_beforeAll_0(function(_)
    game:SetFastIntForTesting("ShowFriendRecommendationsLimit", 6);
    v1.RoduxNetworking.setNetworkImpl(function(v5)
        error(string.format("Should have replaced network implementation for url: %s", (tostring(v5))));
    end);
end);


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


game:DefineFastInt("FriendsCarouselLoadingTimeThresholdSec", 30);
return function()
    return game:GetFastInt("FriendsCarouselLoadingTimeThresholdSec");
end;


game:DefineFastInt("ShowFriendRecommendationsLimit", 6);
return function()
    return game:GetFastInt("ShowFriendRecommendationsLimit");
end;


return {
    installReducer = require(script.Parent.installReducer),
    FriendsCarousel = require(script.Parent.Components.Carousel),
    FetchFriendsCarousel = require(script.Parent.Networking.FetchFriendsAndRecommendations),
    setupFireEvent = require(script.Parent.Analytics.setupFireEvent),
    EventNames = require(script.Parent.Analytics.EventNames),
    CarouselWithLoadingTimer = require(script.Parent.Analytics.CarouselWithLoadingTimer),
    useCreateCarouselList = require(script.Parent.Components.useCreateCarouselList),
    Constants = require(script.Parent.Common.Constants),
    Signals = require(script.Parent.Signals),
    dependencies = require(script.Parent.dependencies),
    ["jest.config"] = script.Parent["jest.config"]
};


return {
    FriendsCarouselPresenceUpdateSignal = require(script.FriendsCarouselPresenceUpdateSignal)(),
    FriendsCarouselFriendshipUpdateSignal = require(script.FriendsCarouselFriendshipUpdateSignal)()
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("FriendsCarousel");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.UIBlox);
v2.init((require(l_Parent_0.Dev.RobloxAppUIBloxConfig)));
local l_llama_0 = require(l_Parent_0.LuaSocialLibrariesDeps).llama;
local v4 = require(l_Parent_0.Roact);
local l_mockLocale_0 = require(l_Parent_0.Dev.SocialTestHelpers).StoryHelpers.mockLocale;
local v6 = require(l_script_FirstAncestor_0.TestHelpers.mockAnalytics);
local v7 = require(l_script_FirstAncestor_0.Analytics);
local l_AppStyleProvider_0 = v2.App.Style.AppStyleProvider;
local v9 = require(l_Parent_0.RoactRodux);
local v10 = require(l_Parent_0.Rodux);
local l_DesignTokenProvider_0 = require(l_Parent_0.Style).DesignTokenProvider;
local v12 = require(l_Parent_0.ApolloClient);
local l_mockApolloClient_0 = require(l_Parent_0.GraphQLServer).ApolloClientTestUtils.mockApolloClient;
v4.setGlobalConfig({
    elementTracing = true
});
local v14 = {
    Default = {
        themeName = "Light",
        fontName = "Gotham"
    },
    Light = {
        themeName = "Light",
        fontName = "Gotham"
    },
    Dark = {
        themeName = "Dark",
        fontName = "Gotham"
    }
};
local v15 = {
    language = "en-us"
};
local v16 = v6({}, {
    fn = function()
    end
});
local v18 = v10.Store.new(function(v17)
    return v17;
end, {}, {});
return {
    name = "FriendsCarousel",
    storyRoot = l_script_FirstAncestor_0,
    roact = v4,
    mapDefinition = function(v19)
        return l_llama_0.Dictionary.join(v19, {
            controls = l_llama_0.Dictionary.join(v15, v19.controls or {})
        });
    end,
    mapStory = function(v20)
        return function(v21)
            return v4.createElement(l_AppStyleProvider_0, {
                style = not not v21 and v14[v21.theme] or v14.Default
            }, {
                v4.createElement(v7.Context.Provider, {
                    value = v16.value
                }, {
                    apolloClient = v4.createElement(v12.ApolloProvider, {
                        client = l_mockApolloClient_0({})
                    }, {
                        storeProvider = v4.createElement(v9.StoreProvider, {
                            store = v18
                        }, {
                            designTokenProvider = v4.createElement(l_DesignTokenProvider_0, {
                                tokenMappers = {}
                            }, {
                                Child = l_mockLocale_0(v20, v21)
                            })
                        })
                    })
                })
            });
        end;
    end
};


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.dependencies);
local l_getDeepValue_0 = v1.SocialLibraries.Dictionary.getDeepValue;
local l_RecommendationSourceEnum_0 = v1.SocialCommon.Enums.RecommendationSourceEnum;
local l_RODUX_KEY_0 = require(l_Parent_0.Common.Constants).RODUX_KEY;
local l_HomepageFriendsCarousel_0 = l_RecommendationSourceEnum_0.HomepageFriendsCarousel;
return function(v6)
    local v7 = l_getDeepValue_0(v6, string.format("%s.Friends.recommendations.byUserId.%s", l_RODUX_KEY_0, "test")) or {};
    local v8 = {};
    for v9, _ in pairs(v7) do
        v8[v9] = true;
    end;
    v6[l_RODUX_KEY_0].Friends.recommendations.bySource = {
        [l_HomepageFriendsCarousel_0] = v8
    };
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("FriendsCarousel");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_script_FirstAncestor_0.dependencies);
local v3 = require(l_script_FirstAncestor_0.devDependencies);
local l_Roact_0 = v2.Roact;
local l_RoactRodux_0 = v2.RoactRodux;
local l_Rodux_0 = v2.Rodux;
local l_UIBlox_0 = v2.UIBlox;
local l_LocalizationProvider_0 = v2.LocalizationProvider;
local l_Mock_0 = v3.Mock;
local l_jest_0 = v3.jest;
local l_DesignTokenProvider_0 = v2.Style.DesignTokenProvider;
local v12 = require(l_Parent_0.ApolloClient);
local l_mockApolloClient_0 = require(l_Parent_0.GraphQLServer).ApolloClientTestUtils.mockApolloClient;
local v14 = require(script.Parent.mockAnalytics);
local v15 = require(l_script_FirstAncestor_0.Analytics);
local v16 = l_Mock_0.MagicMock.new({
    name = "Localization"
});
v16.Format = function(_, v18, _)
    return v18;
end;
local v20 = l_Rodux_0.Store.new(function()
    return {};
end, {}, {
    l_Rodux_0.thunkMiddleware
});
return function(v21, v22)
    local v23 = v22.mockAnalytics or v14(l_jest_0);
    return l_Roact_0.createFragment({
        storeProvider = l_Roact_0.createElement(l_RoactRodux_0.StoreProvider, {
            store = v22.store or v20
        }, {
            l_Roact_0.createElement(v15.Context.Provider, {
                value = v23.value
            }, {
                styleProvider = l_Roact_0.createElement(l_UIBlox_0.App.Style.AppStyleProvider, {
                    style = {
                        themeName = "Dark",
                        fontName = "Gotham"
                    }
                }, {
                    localizationProvider = l_Roact_0.createElement(l_LocalizationProvider_0, {
                        localization = v16
                    }, {
                        apolloClient = l_Roact_0.createElement(v12.ApolloProvider, {
                            client = v22.apolloClient or l_mockApolloClient_0({})
                        }, {
                            designTokenProvider = l_Roact_0.createElement(l_DesignTokenProvider_0, {
                                tokenMappers = {}
                            }, {
                                myElement = l_Roact_0.createElement(v21, v22.props)
                            })
                        })
                    })
                })
            })
        })
    }), v23;
end;


local l_Parent_0 = script.Parent.Parent;
local l_TestingAnalytics_0 = require(l_Parent_0.dependencies).SocialLuaAnalytics.TestingAnalytics;
local l_mockAnalytics_0 = l_TestingAnalytics_0.mockAnalytics;
local l_mockLogger_0 = l_TestingAnalytics_0.mockLogger;
local l_setupFireEvent_0 = require(l_Parent_0.Analytics).setupFireEvent;
return function(v5, v6)
    local v7 = if not not v5 and v5.uid then v5.uid else "123";
    local v8 = l_mockAnalytics_0(v6 or {
        fn = function()
        end
    });
    return {
        uid = v7,
        value = {
            fireEvent = l_setupFireEvent_0({
                analytics = v8,
                loggerImpl = l_mockLogger_0,
                infoForAllEvents = {
                    uid = v7
                }
            })
        },
        mockLogger = l_mockLogger_0(v6 or {
            fn = function()
            end
        }),
        analyticsMock = v8
    };
end;


local l_Rodux_0 = require(script:FindFirstAncestor("FriendsCarousel").dependencies).Rodux;
return function(v1, v2)
    return l_Rodux_0.Store.new(v2 or function(v3)
        return v3;
    end, v1 or {}, {
        l_Rodux_0.thunkMiddleware
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("FriendsCarousel");
local v1 = require(l_script_FirstAncestor_0.dependencies);
local l_PresenceType_0 = v1.RoduxPresence.Enums.PresenceType;
local l_RecommendationContextType_0 = v1.RoduxFriends.Enums.RecommendationContextType;
local _ = require(l_script_FirstAncestor_0.Common.LocalTypes);
local l_FFlagContactRecs_0 = require(l_script_FirstAncestor_0.Parent.SharedFlags).FFlagContactRecs;
local v6 = {
    friendOnline = {
        id = "2326285850",
        username = "username",
        displayName = "name",
        userId = "friendOnline",
        userPresenceType = l_PresenceType_0.Online,
        isFriendWithUser = true,
        hasPendingFriendRequest = false,
        canSendFriendRequest = false
    },
    friendOffline = {
        id = "2326285850",
        username = "username",
        displayName = "friendOffline displayName",
        userId = "friendOffline",
        userPresenceType = l_PresenceType_0.Offline,
        isFriendWithUser = true,
        hasPendingFriendRequest = false,
        canSendFriendRequest = false
    },
    friendInGame = {
        id = "2326285850",
        username = "username",
        displayName = "friendInGame displayName",
        userId = "friendInGame",
        lastOnline = "lastOnline",
        lastLocation = "last Location very long name name name",
        universeId = "universeId",
        rootPlaceId = "rootPlaceId",
        placeId = "placeId",
        gameId = "gameId",
        userPresenceType = l_PresenceType_0.InGame,
        isFriendWithUser = true,
        hasPendingFriendRequest = false,
        canSendFriendRequest = false
    },
    friendInGameWithoutLocation = {
        id = "2326285850",
        username = "username",
        displayName = "friendInGameWithoutLocation displayName",
        userId = "friendInGameWithoutLocation",
        lastOnline = "lastOnline",
        lastLocation = nil,
        universeId = "universeId",
        rootPlaceId = "rootPlaceId",
        placeId = "placeId",
        gameId = "gameId",
        userPresenceType = l_PresenceType_0.InGame,
        isFriendWithUser = true,
        hasPendingFriendRequest = false,
        canSendFriendRequest = false
    },
    friendInStudio = {
        id = "2326285850",
        username = "username",
        displayName = "friendInStudio displayName",
        userId = "friendInStudio",
        userPresenceType = l_PresenceType_0.InStudio,
        isFriendWithUser = true,
        hasPendingFriendRequest = false,
        canSendFriendRequest = false,
        lastLocation = "In Studio location"
    },
    recommendationMutual = {
        id = "2326285850",
        username = "username",
        displayName = "recommendationMutual displayName",
        mutualFriendsList = {
            "1",
            "2",
            "3",
            "4"
        },
        contextType = l_RecommendationContextType_0.MutualFriends,
        rank = 1,
        isFriendWithUser = false,
        hasPendingFriendRequest = false,
        canSendFriendRequest = true
    },
    recommendationMutualSingle = {
        id = "2326285850",
        username = "username",
        displayName = "recommendationMutual displayName",
        mutualFriendsList = {
            "1"
        },
        contextType = l_RecommendationContextType_0.MutualFriends,
        rank = 1,
        isFriendWithUser = false,
        hasPendingFriendRequest = false,
        canSendFriendRequest = true
    },
    recommendationMutualNone = {
        id = "2326285850",
        username = "username",
        displayName = "recommendationMutualNone displayName",
        mutualFriendsList = {},
        contextType = l_RecommendationContextType_0.MutualFriends,
        rank = 1,
        isFriendWithUser = false,
        hasPendingFriendRequest = false,
        canSendFriendRequest = true
    },
    recommendationNone = {
        id = "2326285850",
        username = "username2",
        displayName = "recommendationNone displayName",
        mutualFriendsList = {},
        contextType = l_RecommendationContextType_0.None,
        rank = 1,
        isFriendWithUser = false,
        hasPendingFriendRequest = false,
        canSendFriendRequest = true
    },
    requestPending = {
        id = "2326285850",
        username = "username",
        displayName = "requestPending displayName",
        mutualFriendsList = {
            "1"
        },
        contextType = l_RecommendationContextType_0.MutualFriends,
        rank = 0,
        isFriendWithUser = false,
        hasPendingFriendRequest = true,
        canSendFriendRequest = false
    },
    recommendationFrequent = {
        id = "2326285850",
        username = "username",
        displayName = "recommendationFrequent displayName",
        mutualFriendsList = {},
        contextType = l_RecommendationContextType_0.Frequents,
        rank = 1,
        isFriendWithUser = false,
        hasPendingFriendRequest = false,
        canSendFriendRequest = true
    },
    recommendationIncomingFriendRequest = {
        id = "2326285850",
        username = "username",
        displayName = "recommendationIncomingFriendRequest displayName",
        mutualFriendsList = {
            "1"
        },
        contextType = l_RecommendationContextType_0.MutualFriends,
        rank = 1,
        isFriendWithUser = false,
        hasPendingFriendRequest = false,
        canSendFriendRequest = false,
        hasIncomingFriendRequest = true
    },
    recommendationPlatformName = {
        id = "123",
        username = "username",
        displayName = "recommendationPlatformName displayName",
        mutualFriendsList = {
            "1"
        },
        contextType = l_RecommendationContextType_0.MutualFriends,
        rank = 1,
        isFriendWithUser = false,
        hasPendingFriendRequest = false,
        canSendFriendRequest = false,
        hasIncomingFriendRequest = true
    }
};
if l_FFlagContactRecs_0 then
    v6.recommendationContactImporter = {
        id = "Entity Id",
        entityId = "Entity Id",
        contextType = not l_FFlagContactRecs_0 and "" or l_RecommendationContextType_0.Contacts,
        entityDisplayName = "Display Name",
        isFriendWithUser = false,
        rank = 1,
        thumbnailEntities = {
            avatarImageUrl = "avatarImageUrl",
            headshotImageUrl = "headshotImageUrl"
        }
    };
end;
return v6;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Analytics.DiagActionList);
local v2 = require(l_Parent_0.Analytics.EventNames);
return function(v3)
    assert(v2.isEnumValue(v3), "Invalid event name");
    local v4 = v1[v3];
    return v4.name, v4.count or 1;
end;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.dependencies);
local v2 = require(l_Parent_0.Analytics.EventStreamActionList);
local v3 = require(l_Parent_0.Analytics.EventNames);
local l_llama_0 = v1.llama;
return function(v5, v6)
    assert(v3.isEnumValue(v5), "Invalid event name");
    local v7 = v2[v5];
    return v7.context, v7.eventType, l_llama_0.Dictionary.join(v7.additionalInfo, {
        btn = if not not v7.additionalInfo and v7.additionalInfo.btn then v7.additionalInfo.btn.rawValue() else nil
    }, v6);
end;


return function(v0)
    if not v0.isFriendWithUser then
        if not v0.hasIncomingFriendRequest then
            if not v0.hasPendingFriendRequest then
                return Enum.FriendStatus.NotFriend;
            else
                return Enum.FriendStatus.FriendRequestSent;
            end;
        else
            return Enum.FriendStatus.FriendRequestReceived;
        end;
    else
        return Enum.FriendStatus.Friend;
    end;
end;


local l_Text_0 = require(script:FindFirstAncestor("FriendsCarousel").dependencies).Text;
return function(v1, v2, v3)
    return l_Text_0.GetTextHeight(v1 or "", v2, v3);
end;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.dependencies);
local v2 = require(l_Parent_0.Common.NotLocalizedStrings);
local v3 = require(l_Parent_0.Common.TextKeys);
local l_PresenceType_0 = v1.RoduxPresence.Enums.PresenceType;
local v5 = {
    [l_PresenceType_0.Offline] = v3.PresenceOffline,
    [l_PresenceType_0.Online] = v3.PresenceOnline
};
return function(v6)
    local v7 = {
        textKey = v5[v6.presence]
    };
    if v6.presence == l_PresenceType_0.InGame then
        v7.text = v6.lastLocation;
        v7.font = not not v6.font and v6.font.CaptionHeader or nil;
        v7.colorStyle = not not v6.theme and v6.theme.TextEmphasis or nil;
        return v7;
    else
        if v6.presence == l_PresenceType_0.InStudio then
            if v6.lastLocation and v6.lastLocation ~= "" then
                v7.text = v6.lastLocation;
                v7.font = not not v6.font and v6.font.CaptionHeader or nil;
                v7.colorStyle = not not v6.theme and v6.theme.TextEmphasis or nil;
                return v7;
            else
                v7.text = v2.StudioPresenceTextGlobal;
            end;
        end;
        return v7;
    end;
end;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.dependencies);
local _ = require(l_Parent_0.Common.ModelTypes);
local l_PresenceType_0 = v1.RoduxPresence.Enums.PresenceType;
return function(v4)
    if v4 then
        local v5;
        if not (not (v4.userPresenceType == l_PresenceType_0.InGame) or not v4.lastLocation) then
            v5 = true;
            if not (v4.lastLocation == "") then
                goto label0;
            end;
        end;
        v5 = false;
        ::label0::;
        return v5;
    else
        return false;
    end;
end;


local l_Parent_0 = script.Parent.Parent;
local l_isSubjectTo10ftPolicies_0 = require(l_Parent_0.dependencies).isSubjectTo10ftPolicies;
local v2 = require(l_Parent_0.Flags.getFIntShowFriendRecommendationsLimit);
return function(v3)
    if not l_isSubjectTo10ftPolicies_0() then
        return v3 <= v2();
    else
        return true;
    end;
end;


local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_Players_0 = game:GetService("Players");
local l_FFlagContactRecs_0 = require(l_Parent_1.SharedFlags).FFlagContactRecs;
local v4 = require(l_Parent_1.SocialLuaAnalytics);
local v5 = require(l_Parent_1.LuaSocialLibrariesDeps);
local v6 = if not l_FFlagContactRecs_0 then v5.RoduxFriends else require(l_Parent_1.RoduxFriends);
local l_httpRequest_0 = v5.httpRequest;
local v8 = require(l_Parent_1.Style);
local v9 = require(l_Parent_1.Loggers).Logger:new("FriendsCarousel");
local v10 = v9:new("FriendsCarousel Networking");
local v11 = game:DefineFastInt("FriendsCarouselHttpRetryCount", 3);
local l_getFFlagMigrateSocialNetworking_0 = require(l_Parent_1.SharedFlags).getFFlagMigrateSocialNetworking;
local v18 = l_httpRequest_0.config({
    requestFunction = function(v13, v14, v15)
        v10:info("Fetching: {}", string.format("[ requestMethod = %q, url = %q ]", v14, v13));
        if not l_getFFlagMigrateSocialNetworking_0() then
            return l_httpRequest_0.requestFunctions.HttpRbxApi(v13, v14, v15);
        else
            return l_httpRequest_0.requestFunctions.RequestInternal(v13, v14, v15);
        end;
    end,
    postRequestFunction = function(v16, v17)
        v10:debug("Returned: {}", string.format("[ requestMethod = %q, url = %q, statusCode = %s ]", v17.requestMethod, v17.url, v16.StatusCode));
    end,
    maxRetryCount = v11
});
local l_RODUX_KEY_0 = require(l_Parent_0.Common.Constants).RODUX_KEY;
local v20 = v5.RoduxNetworking.config({
    keyPath = l_RODUX_KEY_0 .. ".NetworkStatus",
    networkImpl = v18
});
return {
    logger = v9,
    SocialLuaAnalytics = v4,
    Promise = require(l_Parent_1.Promise),
    UIBlox = require(l_Parent_1.UIBlox),
    Roact = require(l_Parent_1.Roact),
    React = require(l_Parent_1.React),
    Rodux = require(l_Parent_1.Rodux),
    RoactRodux = require(l_Parent_1.RoactRodux),
    UserProfiles = require(l_Parent_1.UserProfiles),
    LocalizationProvider = require(l_Parent_1.Localization).LocalizationProvider,
    withLocalization = require(l_Parent_1.Localization).withLocalization,
    t = require(l_Parent_1.t),
    Dash = require(l_Parent_1.Dash),
    llama = v5.llama,
    memoize = require(l_Parent_1.AppCommonLib).memoize,
    Hooks = {
        useSelector = require(l_Parent_1.RoactUtils).Hooks.RoactRodux.useSelector,
        useDispatch = require(l_Parent_1.RoactUtils).Hooks.RoactRodux.useDispatch,
        useLocalization = require(l_Parent_1.Localization).Hooks.useLocalization,
        useEffectOnce = require(l_Parent_1.RoactUtils).Hooks.useEffectOnce,
        useUiModeInfo = require(l_Parent_1.RobloxAppHooks).useUiModeInfo,
        useDesignTokens = v8.useDesignTokens
    },
    SocialLibraries = v5.SocialLibraries.config({}),
    SocialModalsCommon = require(l_Parent_1.SocialModalsCommon),
    SocialCommon = require(l_Parent_1.SocialCommon),
    Style = v8,
    RoduxNetworking = v20,
    NetworkingFriendsEnums = v5.NetworkingFriends.Enums,
    NetworkingFriends = v5.NetworkingFriends.config({
        roduxNetworking = v20
    }),
    NetworkingUsers = v5.NetworkingUsers.config({
        roduxNetworking = v20
    }),
    NetworkingUserSettings = v5.NetworkingUserSettings.config({
        roduxNetworking = v20
    }),
    NetworkingAccountInformation = v5.NetworkingAccountInformation.config({
        roduxNetworking = v20
    }),
    NetworkingAliases = v5.NetworkingAliases.config({
        roduxNetworking = v20
    }),
    RoduxUsers = v5.RoduxUsers.config({
        keyPath = l_RODUX_KEY_0 .. ".Users"
    }),
    RoduxFriends = v6.config({
        keyPath = l_RODUX_KEY_0 .. ".Friends"
    }),
    RoduxPresence = v5.RoduxPresence.config({
        keyPath = l_RODUX_KEY_0 .. ".Presence"
    }),
    RoduxUserPermissions = v5.RoduxUserPermissions.config({
        keyPath = l_RODUX_KEY_0 .. ".UserPermissions"
    }),
    RoduxAnalytics = v4.Analytics.RoduxAnalytics.config({
        keyPath = l_RODUX_KEY_0 .. ".Analytics"
    }),
    Players = l_Players_0,
    convertActions = require(l_Parent_1.SocialReducerAdaptors).convertActions,
    usersActionAdaptor = require(l_Parent_1.SocialReducerAdaptors).usersActionAdaptor,
    friendsActionAdaptor = require(l_Parent_1.SocialReducerAdaptors).friendsActionAdaptor,
    presenceActionAdaptor = require(l_Parent_1.SocialReducerAdaptors).presenceActionAdaptor,
    Text = require(l_Parent_1.AppCommonLib).Text,
    enumerate = require(l_Parent_1.enumerate),
    IXPService = game:GetService("IXPService"),
    RetrievalStatus = require(l_Parent_1.Http).Enum.RetrievalStatus,
    AnalyticsService = require(l_Parent_1.Analytics).Analytics.new(game:GetService("RbxAnalyticsService")),
    PermissionsProtocol = require(l_Parent_1.PermissionsProtocol).PermissionsProtocol,
    AppStorageService = game:GetService("AppStorageService"),
    contactImporterModalInfo = require(l_Parent_1.ContactImporter).Utils.contactImporterModalInfo,
    ShowContactImporterParams = require(l_Parent_1.ContactImporter).ShowContactImporterParams,
    SetContactImporterDisplayLogic = require(l_Parent_1.ContactImporter).Actions.SetContactImporterDisplayLogic,
    AutoSyncContacts = require(l_Parent_1.ContactImporter).Networking.AutoSyncContacts,
    ContactsProtocol = require(l_Parent_1.ContactsProtocol).ContactsProtocol,
    FetchContactImporterParams = require(l_Parent_1.ContactImporter).Networking.FetchContactImporterParams,
    getFStringSocialFriendsLayer = require(l_Parent_1.SharedFlags).getFStringSocialFriendsLayer,
    isSubjectToDesktopPolicies = require(l_Parent_1.SharedFlags).isSubjectToDesktopPolicies,
    isSubjectTo10ftPolicies = require(l_Parent_0.isSubjectTo10ftPolicies),
    getStandardSizeAvatarHeadShotRbxthumb = require(l_Parent_1.UserLib).Utils.getStandardSizeAvatarHeadShotRbxthumb,
    RobloxAppEnums = require(l_Parent_1.RobloxAppEnums),
    getFFlagUpdateFriendCarousel10ft = require(l_Parent_1.SharedFlags).getFFlagUpdateFriendCarousel10ft,
    FFlagLuaAppFixCursorHooks = require(l_Parent_1.SharedFlags).FFlagLuaAppFixCursorHooks
};


local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v2 = require(l_Parent_1.LuaSocialLibrariesDeps);
local v3 = require(l_Parent_1.Dev.JestGlobals);
local l_expect_0 = v3.expect;
local l_getBaseTestStates_0 = require(l_Parent_1.Dev.FriendsLanding).TestHelpers().getBaseTestStates;
local l_RODUX_KEY_0 = require(l_Parent_0.Common.Constants).RODUX_KEY;
l_expect_0.extend(v2.CollisionMatchers.Jest);
return {
    Mock = v2.Mock,
    UnitTestHelpers = require(l_Parent_1.Dev.SocialTestHelpers).TestHelpers,
    CollisionMatchers = v2.CollisionMatchers,
    Rhodium = require(l_Parent_1.Dev.Rhodium),
    RhodiumHelpers = function()
        return require(l_Parent_1.Dev.RhodiumHelpers);
    end,
    JestGlobals = v3,
    jestExpect = l_expect_0,
    jest = v3.jest,
    UIBloxUniversalAppConfig = require(l_Parent_1.Dev.RobloxAppUIBloxConfig),
    baseTestStates = l_getBaseTestStates_0({
        roduxKey = l_RODUX_KEY_0
    }),
    mockLocale = function()
        return require(l_Parent_1.Dev.SocialTestHelpers).StoryHelpers.mockLocale;
    end,
    findImageSet = require(l_Parent_1.Dev.SocialTestHelpers).TestHelpers.findImageSet
};


local v0 = require(script:FindFirstAncestor("FriendsCarousel").dependencies);
local l_RoduxFriends_0 = v0.RoduxFriends;
return v0.convertActions(l_RoduxFriends_0.installReducer(), v0.friendsActionAdaptor(l_RoduxFriends_0), {
    countsByUserId = {},
    byUserId = {},
    requests = {
        receivedCount = 0
    },
    recommendations = {},
    friendshipStatus = {},
    friendsRankByUserId = {}
});


local v0 = require(script:FindFirstAncestor("FriendsCarousel").dependencies);
local l_RoduxPresence_0 = v0.RoduxPresence;
return v0.convertActions(l_RoduxPresence_0.installReducer(), v0.presenceActionAdaptor(l_RoduxPresence_0), {
    byUserId = {},
    byGameId = {},
    byGameInstanceId = {},
    byPlaceId = {}
});


local v0 = require(script:FindFirstAncestor("FriendsCarousel").dependencies);
local l_RoduxUsers_0 = v0.RoduxUsers;
return v0.convertActions(l_RoduxUsers_0.installReducer(), v0.usersActionAdaptor(l_RoduxUsers_0), {
    byUserId = {},
    byUsername = {}
});