local v0 = require(script.Parent.Parent.Parent.Parent.Src.Actions.AddChange);
local v1 = require(script.Parent.AddDevSubKeyError);
return function(v2)
    return function(v3, v4)
        local l_Key_0 = v2.Key;
        local l_devSubsController_0 = v4.devSubsController;
        v3:dispatch(v0("DevSubModeration", {
            [l_Key_0] = {
                isAcceptable = true,
                filteredName = nil
            }
        }));
        local v7, v8 = l_devSubsController_0:getFilteredDevSub(v2);
        v3:dispatch(v0("DevSubModeration", {
            [l_Key_0] = {
                isAcceptable = v7,
                filteredName = v8
            }
        }));
        if not v7 then
            v3:dispatch(v1(l_Key_0, "Name", {
                Moderated = "Name has been moderated"
            }));
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Cryo);
local v2 = require(l_Parent_0.Src.Actions.SetCurrentSettings);
return function(v3)
    return function(v4, v5)
        local v6 = v4:getState();
        local l_gameId_0 = v6.Metadata.gameId;
        local v8 = nil;
        if not v3 then
            v8 = v6.Settings.Current.badgesCursor;
            if v8 == nil then
                return ;
            end;
        end;
        local v9, v10 = v5.monetizationController:getBadges(l_gameId_0, v8);
        local l_Current_0 = v6.Settings.Current;
        if not v3 then
            v9 = v1.Dictionary.join(not not v6.Settings.Current.badges and v6.Settings.Current.badges or {}, v9);
        else
            v10 = nil;
        end;
        v4:dispatch(v2((v1.Dictionary.join(l_Current_0, {
            badgesCursor = v10,
            badges = v9
        }))));
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Cryo);
local v2 = require(l_Parent_0.Src.Actions.SetCurrentSettings);
return function()
    return function(v3, v4)
        local v5 = v3:getState();
        local l_gameId_0 = v5.Metadata.gameId;
        local l_devProductsCursor_0 = v5.Settings.Current.devProductsCursor;
        if l_devProductsCursor_0 == nil then
            return ;
        else
            local v8, v9 = v4.monetizationController:getDeveloperProducts(l_gameId_0, l_devProductsCursor_0);
            v3:dispatch(v2((v1.Dictionary.join(v5.Settings.Current, {
                devProductsCursor = v9,
                developerProducts = v1.Dictionary.join(not not v5.Settings.Current.developerProducts and v5.Settings.Current.developerProducts or {}, v8)
            }))));
            return ;
        end;
    end;
end;


local function v6(v0, v1)
    local v2 = string.format("%%1%s%%2", v1);
    local _ = nil;
    while true do
        local v4, v5 = string.gsub(v0, "^(-?%d+)(%d%d%d)", v2);
        v0 = v4;
        if not (v5 ~= 0) then
            break;
        end;
    end;
    return v0;
end;
return function(v7)
    return (v6(v7, ","));
end;


return function()
    return function(v0, v1)
        v1.gameOptionsController:shutdownAllServers(v0:getState().Metadata.gameId);
    end;
end;


local l_Action_0 = require(script.Parent.Parent.Parent.Parent.Packages.Framework).Util.Action;
return {
    LoadingLocalUserFriends = l_Action_0("LoadingLocalUserFriends", function()
        return {};
    end),
    LoadingLocalUserGroups = l_Action_0("LoadingLocalUserGroups", function()
        return {};
    end),
    LoadingWebResults = l_Action_0("LoadingWebResults", function(v1)
        return {
            searchTerm = v1
        };
    end),
    LoadedLocalUserFriends = l_Action_0("LoadedLocalUserFriends", function(v2, v3)
        return {
            success = v2,
            friends = v3
        };
    end),
    LoadedLocalUserGroups = l_Action_0("LoadedLocalUserGroups", function(v4, v5)
        return {
            success = v4,
            groups = v5
        };
    end),
    LoadedWebResults = l_Action_0("LoadedWebResults", function(v6, v7, v8)
        return {
            success = v6,
            key = v7,
            results = v8
        };
    end),
    SearchTextChanged = l_Action_0("SearchTextChanged", function(v9)
        return {
            text = v9
        };
    end),
    CollaboratorAdded = l_Action_0("CollaboratorAdded", function(v10, v11, v12)
        return {
            collaboratorType = v10,
            collaboratorId = v11,
            action = v12
        };
    end)
};


return require(script.Parent.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    assert(typeof(v0) == "number", script.Name .. " expected groupOwnerId to be a number, not " .. typeof(v0));
    return {
        groupOwnerId = v0
    };
end);


return require(script.Parent.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    assert(typeof(v0) == "string", script.Name .. " expected groupOwnerName to be a string, not " .. typeof(v0));
    return {
        groupOwnerName = v0
    };
end);


local v0 = newproxy(true);
getmetatable(v0).__tostring = function()
    return "Symbol(LoadingInProgress)";
end;
return v0;


local l_StudioService_0 = game:GetService("StudioService");
local l_Parent_0 = script.Parent;
local l_Parent_1 = script.Parent.Parent.Parent;
local v3 = require(l_Parent_1.Packages.Roact);
local v4 = require(l_Parent_1.Packages.Framework);
local v5 = require(l_Parent_1.Packages.RoactRodux);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_UI_0 = v4.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_RadioButtonList_0 = l_UI_0.RadioButtonList;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_TitledFrame_0 = l_UI_0.TitledFrame;
local v13 = require(l_Parent_1.Src.Components.SettingsPages.SettingsPage);
local v14 = require(l_Parent_1.Src.Actions.AddChange);
local v15 = require(l_Parent_1.Src.Actions.AddWarning);
local v16 = require(l_Parent_1.Src.Actions.DiscardWarning);
local v17 = require(l_Parent_1.Src.Actions.SetCreatorId);
local v18 = require(l_Parent_1.Src.Actions.SetCreatorName);
local v19 = require(l_Parent_1.Src.Actions.SetCreatorType);
local v20 = require(l_Parent_0.Actions.SetGroupOwnerId);
local v21 = require(l_Parent_0.Actions.SetGroupOwnerName);
local v22 = require(l_Parent_1.Src.Actions.SetCreatorFriends);
local v23 = require(l_Parent_1.Src.Util.KeyProvider);
local l_getIsFriendOnlyKeyName_0 = v23.getIsFriendOnlyKeyName;
local l_getIsActiveKeyName_0 = v23.getIsActiveKeyName;
local l_getIsForSaleKeyName_0 = v23.getIsForSaleKeyName;
local l_getVipServersIsEnabledKeyName_0 = v23.getVipServersIsEnabledKeyName;
local l_Name_0 = script.Name;
local function v52(v29, v30)
    local v31 = v29:getState();
    local l_gameId_0 = v31.Metadata.gameId;
    local l_gameMetadataController_0 = v30.gameMetadataController;
    local l_groupMetadataController_0 = v30.groupMetadataController;
    local l_gamePermissionsController_0 = v30.gamePermissionsController;
    local l_socialController_0 = v30.socialController;
    local l_monetizationController_0 = v30.monetizationController;
    return {
        function(v38)
            v38[l_getIsActiveKeyName_0()] = l_gamePermissionsController_0:isActive(l_gameId_0);
        end,
        function(v39)
            v39[l_getIsFriendOnlyKeyName_0()] = l_gamePermissionsController_0:isFriendsOnly(l_gameId_0);
        end,
        function(_)
            v29:dispatch(v18((l_gameMetadataController_0:getCreatorName(l_gameId_0))));
        end,
        function(_)
            v29:dispatch(v17((l_gameMetadataController_0:getCreatorId(l_gameId_0))));
        end,
        function(_)
            local v43 = l_gameMetadataController_0:getCreatorType(l_gameId_0);
            v29:dispatch(v19(v43));
            if v43 == Enum.CreatorType.Group then
                local v44 = l_gameMetadataController_0:getCreatorId(l_gameId_0);
                local v45 = l_groupMetadataController_0:getOwnerId(v44);
                local v46 = l_groupMetadataController_0:getOwnerName(v44);
                v29:dispatch(v20(v45));
                v29:dispatch(v21(v46));
                return ;
            else
                if v43 == Enum.CreatorType.User then
                    v29:dispatch(v22((l_socialController_0:getUserFriends((l_gameMetadataController_0:getCreatorId(l_gameId_0))))));
                end;
                return ;
            end;
        end,
        function(v47)
            local v48, v49 = l_gamePermissionsController_0:getPermissions(l_gameId_0, l_gameMetadataController_0:getCreatorName(l_gameId_0), l_gameMetadataController_0:getCreatorId(l_gameId_0), (l_gameMetadataController_0:getCreatorType(l_gameId_0)));
            v47.permissions = v48;
            v47.groupMetadata = v49;
        end,
        function(v50)
            if v31.Settings.Current[l_getIsForSaleKeyName_0()] == nil then
                v50[l_getIsForSaleKeyName_0()] = l_monetizationController_0:getPaidAccessEnabled(l_gameId_0);
            end;
        end,
        function(v51)
            if v31.Settings.Current[l_getVipServersIsEnabledKeyName_0()] == nil then
                v51[l_getVipServersIsEnabledKeyName_0()] = l_monetizationController_0:getVIPServersEnabled(l_gameId_0);
            end;
        end
    };
end;
local function v62(v53, v54)
    local v55 = v53:getState();
    local l_gameId_1 = v55.Metadata.gameId;
    local l_gamePermissionsController_1 = v54.gamePermissionsController;
    return {
        function()
            local l_isActive_0 = v55.Settings.Changed.isActive;
            if l_isActive_0 ~= nil then
                l_gamePermissionsController_1:setActive(l_gameId_1, l_isActive_0);
            end;
        end,
        function()
            local l_isFriendsOnly_0 = v55.Settings.Changed.isFriendsOnly;
            if l_isFriendsOnly_0 ~= nil then
                l_gamePermissionsController_1:setFriendsOnly(l_gameId_1, l_isFriendsOnly_0);
            end;
        end,
        function()
            local l_permissions_0 = v55.Settings.Current.permissions;
            local l_permissions_1 = v55.Settings.Changed.permissions;
            if l_permissions_1 ~= nil then
                l_gamePermissionsController_1:setPermissions(l_gameId_1, l_permissions_0, l_permissions_1);
            end;
        end
    };
end;
local function v65(v63, v64)
    return {
        IsActive = v63(l_getIsActiveKeyName_0()),
        IsFriendsOnly = v63(l_getIsFriendOnlyKeyName_0()),
        IsCurrentlyActive = v64.Settings.Current.isActive,
        IsMonetized = v63(l_getIsForSaleKeyName_0()) or v63(l_getVipServersIsEnabledKeyName_0()),
        IsInitiallyEnabled = (not v64.Settings.Current[l_getIsActiveKeyName_0()] or v64.Settings.Current[l_getIsFriendOnlyKeyName_0()]) and (v64.Settings.Current[l_getIsForSaleKeyName_0()] or v64.Settings.Current[l_getVipServersIsEnabledKeyName_0()]),
        OwnerId = v64.GameOwnerMetadata.creatorId,
        OwnerType = v64.GameOwnerMetadata.creatorType,
        GroupOwnerUserId = v64.GameOwnerMetadata.groupOwnerId
    };
end;
local function v70(v66, v67)
    return {
        IsFriendsOnlyChanged = v66(l_getIsFriendOnlyKeyName_0()),
        IsActiveChanged = function(v68, v69)
            if not v69 then
                v67(v16(l_getIsActiveKeyName_0()));
            else
                v67(v15(l_getIsActiveKeyName_0()));
            end;
            v67(v14(l_getIsActiveKeyName_0(), v68));
        end
    };
end;
local v71 = v3.PureComponent:extend(script.Name);
v71.isGroupGame = function(v72)
    return v72.props.OwnerType == Enum.CreatorType.Group;
end;
v71.isLoggedInUserGameOwner = function(v73)
    local l_l_StudioService_0_UserId_0 = l_StudioService_0:GetUserId();
    local l_props_0 = v73.props;
    local l_OwnerId_0 = l_props_0.OwnerId;
    local l_GroupOwnerUserId_0 = l_props_0.GroupOwnerUserId;
    if not v73:isGroupGame() then
        return l_l_StudioService_0_UserId_0 == l_OwnerId_0;
    else
        return l_l_StudioService_0_UserId_0 == l_GroupOwnerUserId_0;
    end;
end;
v71.render = function(v78)
    local l_Localization_0 = v78.props.Localization;
    return v3.createElement(v13, {
        SettingsLoadJobs = v52,
        SettingsSaveJobs = v62,
        Title = l_Localization_0:getText("General", "Category" .. l_Name_0),
        PageId = l_Name_0,
        CreateChildren = function()
            local l_props_1 = v78.props;
            local l_IsFriendsOnly_0 = l_props_1.IsFriendsOnly;
            local l_IsActive_0 = l_props_1.IsActive;
            local l_IsCurrentlyActive_0 = l_props_1.IsCurrentlyActive;
            local l_IsActiveChanged_0 = l_props_1.IsActiveChanged;
            local l_IsFriendsOnlyChanged_0 = l_props_1.IsFriendsOnlyChanged;
            local v86 = l_IsActive_0 and not l_IsFriendsOnly_0;
            local l_IsMonetized_0 = l_props_1.IsMonetized;
            local l_IsInitiallyEnabled_0 = l_props_1.IsInitiallyEnabled;
            local l_Stylizer_0 = l_props_1.Stylizer;
            local v90 = (v78:isLoggedInUserGameOwner() or v78:isGroupGame()) and (not v86 and l_IsInitiallyEnabled_0 or not l_IsMonetized_0);
            local v91 = {
                {
                    Description = l_Localization_0:getText("General", "PlayabilityPublicDesc"),
                    Disabled = not v90,
                    Key = true,
                    Text = l_Localization_0:getText("General", "PlayabilityPublic")
                },
                {
                    Description = l_Localization_0:getText("General", "PlayabilityPrivateDesc"),
                    Disabled = not v90,
                    Key = false,
                    Text = l_Localization_0:getText("General", "PlayabilityPrivate")
                }
            };
            if not v78:isGroupGame() then
                table.insert(v91, 1, {
                    Description = l_Localization_0:getText("General", "PlayabilityFriendsDesc"),
                    Disabled = not v90,
                    Key = "Friends",
                    Text = l_Localization_0:getText("General", "PlayabilityFriends")
                });
            end;
            return {
                PlayabilityWidget = v3.createElement(l_Pane_0, {
                    AutomaticSize = Enum.AutomaticSize.Y,
                    HorizontalAlignment = Enum.HorizontalAlignment.Left,
                    Layout = Enum.FillDirection.Vertical,
                    Spacing = l_Stylizer_0.playabilityWidget.spacing
                }, {
                    TitlePane = v3.createElement(l_TitledFrame_0, {
                        LayoutOrder = 1,
                        Title = l_Localization_0:getText("General", "TitlePlayability")
                    }, {
                        v3.createElement(l_TitledFrame_0, {
                            Title = l_Localization_0:getText("General", "PlayabilityHeader"),
                            Style = "Subtitle"
                        }, {
                            List = v3.createElement(l_RadioButtonList_0, {
                                Buttons = v91,
                                OnClick = function(v92)
                                    if v92 == "Friends" then
                                        l_IsFriendsOnlyChanged_0(true);
                                        l_IsActiveChanged_0(true, false);
                                        return ;
                                    else
                                        l_IsFriendsOnlyChanged_0(false);
                                        l_IsActiveChanged_0(v92, l_IsCurrentlyActive_0 and not v92);
                                        return ;
                                    end;
                                end,
                                SelectedKey = nil,
                                CurrentSelectedKey = if not l_IsFriendsOnly_0 then l_IsActive_0 else "Friends",
                                TextSize = {
                                    Description = l_Stylizer_0.fontStyle.Subtext.TextSize,
                                    MainText = l_Stylizer_0.fontStyle.Normal.TextSize
                                }
                            })
                        })
                    }),
                    PlayabilityWarning = not v90 and v3.createElement(l_TextLabel_0, {
                        AutomaticSize = Enum.AutomaticSize.XY,
                        LayoutOrder = 15,
                        Style = "SubText",
                        Text = l_Localization_0:getText("AccessPermissions", "PlayabilityWarning"),
                        TextColor = l_Stylizer_0.warningColor,
                        TextSize = l_Stylizer_0.fontStyle.Subtitle.TextSize,
                        TextXAlignment = Enum.TextXAlignment.Left
                    })
                })
            };
        end
    });
end;
v71 = l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v71);
local v93 = require(l_Parent_1.Src.Networking.settingFromState);
v71 = v5.connect(function(v94, _)
    if v94 then
        return (v65(function(v96)
            return v93(v94.Settings, v96);
        end, v94));
    else
        return ;
    end;
end, function(v97)
    return (v70(function(v98)
        return function(v99)
            v97(v14(v98, v99));
        end;
    end, v97));
end)(v71);
v71.LocalizationId = l_Name_0;
return v71;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local v2 = require(l_Parent_1.Packages.Cryo);
local v3 = require(l_Parent_1.Packages.Rodux);
local v4 = require(l_Parent_0.Keys.loadingInProgress);
local v5 = {
    CachedSearchResults = {},
    SearchText = ""
};
return v3.createReducer(v5, {
    ResetStore = function(_, _)
        return v5;
    end,
    LoadedWebResults = function(v8, v9)
        return v2.Dictionary.join(v8, {
            CachedSearchResults = v2.Dictionary.join(v8.CachedSearchResults, {
                [v9.key] = not not v9.success and v9.results or nil
            })
        });
    end,
    LoadingWebResults = function(v10, v11)
        return v2.Dictionary.join(v10, {
            CachedSearchResults = v2.Dictionary.join(v10.CachedSearchResults, {
                [v11.searchTerm] = v4
            })
        });
    end,
    SearchTextChanged = function(v12, v13)
        return v2.Dictionary.join(v12, {
            SearchText = v13.text
        });
    end
});


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local l_deepJoin_0 = require(l_Parent_1.Packages.Framework).Util.deepJoin;
local v3 = require(l_Parent_1.Src.Actions.AddChange);
local v4 = require(l_Parent_0.Util.PermissionsConstants);
return function(v5, v6)
    return function(v7, v8)
        local v9 = v7:getState();
        local l_groupMetadataController_0 = v8.groupMetadataController;
        local v11 = l_deepJoin_0(v9.Settings.Changed.groupMetadata or v9.Settings.Current.groupMetadata, {
            [v5] = {
                Name = l_groupMetadataController_0:getGroupMetadata(v5).name
            }
        });
        local v12 = v9.Settings.Changed.permissions or v9.Settings.Current.permissions;
        for v13, v14 in pairs((l_groupMetadataController_0:getRolesets(v5))) do
            v12 = l_deepJoin_0(v12, {
                [v4.RoleSubjectKey] = {
                    [v13] = {
                        [v4.GroupIdKey] = v5,
                        [v4.SubjectNameKey] = v14.name,
                        [v4.SubjectRankKey] = v14.rank,
                        [v4.ActionKey] = v6
                    }
                }
            });
        end;
        v7:dispatch(v3("permissions", v12));
        v7:dispatch(v3("groupMetadata", v11));
    end;
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local l_deepJoin_0 = require(l_Parent_1.Packages.Framework).Util.deepJoin;
local v3 = require(l_Parent_1.Src.Actions.AddChange);
local v4 = require(l_Parent_0.Util.PermissionsConstants);
return function(v5, v6, v7)
    return function(v8, _)
        local v10 = v8:getState();
        v8:dispatch(v3("permissions", (l_deepJoin_0(v10.Settings.Changed.permissions or v10.Settings.Current.permissions, {
            [v4.UserSubjectKey] = {
                [v5] = {
                    [v4.SubjectNameKey] = v6,
                    [v4.SubjectIdKey] = v5,
                    [v4.ActionKey] = v7
                }
            }
        }))));
    end;
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local v2 = require(l_Parent_1.Packages.Cryo);
local v3 = require(l_Parent_1.Src.Actions.AddChange);
local v4 = require(l_Parent_0.Util.PermissionsConstants);
return function(v5)
    return function(v6, _)
        local v8 = v6:getState();
        local v9 = v2.Dictionary.join(v8.Settings.Changed.groupMetadata or v8.Settings.Current.groupMetadata, {
            [v5] = v2.None
        });
        local v10 = v8.Settings.Changed.permissions or v8.Settings.Current.permissions;
        for v11, v12 in pairs(v10[v4.RoleSubjectKey]) do
            if v12[v4.GroupIdKey] == v5 then
                v10 = v2.Dictionary.join(v10, {
                    [v4.RoleSubjectKey] = v2.Dictionary.join(v10[v4.RoleSubjectKey], {
                        [v11] = v2.None
                    })
                });
            end;
        end;
        v6:dispatch(v3("permissions", v10));
        v6:dispatch(v3("groupMetadata", v9));
    end;
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local v2 = require(l_Parent_1.Packages.Cryo);
local v3 = require(l_Parent_1.Src.Actions.AddChange);
local v4 = require(l_Parent_0.Util.PermissionsConstants);
return function(v5, _)
    return function(v7, _)
        local v9 = v7:getState();
        local v10 = v9.Settings.Changed.permissions or v9.Settings.Current.permissions;
        v7:dispatch(v3("permissions", (v2.Dictionary.join(v10, {
            [v4.UserSubjectKey] = v2.Dictionary.join(v10[v4.UserSubjectKey], {
                [v5] = v2.None
            })
        }))));
    end;
end;


local v0 = require(script.Parent.Parent.Actions.CollaboratorSearchActions);
return function(v1, v2)
    return function(v3, v4)
        local v5 = v3:getState();
        local l_gamePermissionsController_0 = v4.gamePermissionsController;
        v3:dispatch(v0.SearchTextChanged(v1));
        if v1 ~= "" and v2 then
            if not v5.CollaboratorSearch.CachedSearchResults[v1] then
                v3:dispatch(v0.LoadingWebResults(v1));
                spawn(function()
                    local l_status_0, l_result_0 = pcall(function()
                        return l_gamePermissionsController_0:search(v1);
                    end);
                    v3:dispatch(v0.LoadedWebResults(l_status_0, v1, l_result_0));
                end);
            end;
            return ;
        else
            return ;
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local v2 = require(l_Parent_0.Util.PermissionsConstants);
local v3 = require(l_Parent_1.Src.Actions.AddChange);
local l_deepJoin_0 = require(l_Parent_1.Packages.Framework).Util.deepJoin;
return function(v5, v6)
    return function(v7, _)
        local v9 = v7:getState();
        local v10 = v9.Settings.Changed.permissions or v9.Settings.Current.permissions;
        local l_v10_0 = v10;
        for v12, v13 in pairs(v10[v2.RoleSubjectKey]) do
            if v13[v2.GroupIdKey] == v5 then
                l_v10_0 = l_deepJoin_0(l_v10_0, {
                    [v2.RoleSubjectKey] = {
                        [v12] = {
                            [v2.ActionKey] = v6
                        }
                    }
                });
            end;
        end;
        v7:dispatch(v3("permissions", l_v10_0));
    end;
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local l_deepJoin_0 = require(l_Parent_1.Packages.Framework).Util.deepJoin;
local v3 = require(l_Parent_1.Src.Actions.AddChange);
local v4 = require(l_Parent_0.Util.PermissionsConstants);
return function(v5, v6)
    return function(v7, _)
        local v9 = v7:getState();
        v7:dispatch(v3("permissions", (l_deepJoin_0(v9.Settings.Changed.permissions or v9.Settings.Current.permissions, {
            [v4.RoleSubjectKey] = {
                [v5] = {
                    [v4.ActionKey] = v6
                }
            }
        }))));
    end;
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local l_deepJoin_0 = require(l_Parent_1.Packages.Framework).Util.deepJoin;
local v3 = require(l_Parent_1.Src.Actions.AddChange);
local v4 = require(l_Parent_0.Util.PermissionsConstants);
return function(v5, v6)
    return function(v7, _)
        local v9 = v7:getState();
        v7:dispatch(v3("permissions", (l_deepJoin_0(v9.Settings.Changed.permissions or v9.Settings.Current.permissions, {
            [v4.UserSubjectKey] = {
                [v5] = {
                    [v4.ActionKey] = v6
                }
            }
        }))));
    end;
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local l_Promise_0 = require(l_Parent_1.Packages.Framework).Util.Promise;
local v3 = require(l_Parent_1.Packages.Cryo);
local v4 = require(l_Parent_1.Src.Networking.Requests.Permissions.GroupRoles);
local v5 = require(l_Parent_0.Util.PermissionsConstants);
local v6 = require(l_Parent_0.Util.WebKeyConstants);
local function _(v7)
    if not v7[v6.UserId] then
        if not v7[v6.RoleId] then
            if not v7[v6.GroupId] then
                error("Could not determine subject type");
                return ;
            else
                return v5.GroupSubjectKey;
            end;
        else
            return v5.RoleSubjectKey;
        end;
    else
        return v5.UserSubjectKey;
    end;
end;
local function _(v9)
    if v9 == v6.PlayAction then
        return v5.PlayKey;
    elseif v9 == v6.EditAction then
        return v5.EditKey;
    elseif v9 == v6.AdminAction then
        return v5.EditKey;
    elseif v9 == nil then
        return v5.NoAccessKey;
    else
        error("Unsupported Action: " .. tostring(v9));
        return ;
    end;
end;
local v22 = {
    _DEPRECATEDFixEndpointKeyTypes = function(v11)
        for _, v13 in pairs(v11) do
            for v14, v15 in pairs(v13) do
                if not ((v14 ~= v6.GroupId and v14 ~= v6.UserId) and v14 ~= v6.RoleId) or v14 == v6.RoleRank then
                    v13[v14] = tonumber(v15);
                end;
            end;
        end;
    end,
    _deserializeOne = function(v16, v17)
        local v18 = {};
        local l_ActionKey_0 = v5.ActionKey;
        local v20 = v16[v6.Action];
        local v21;
        if v20 == v6.PlayAction then
            v21 = v5.PlayKey;
        elseif v20 == v6.EditAction then
            v21 = v5.EditKey;
        elseif v20 == v6.AdminAction then
            v21 = v5.EditKey;
        elseif v20 == nil then
            v21 = v5.NoAccessKey;
        else
            error("Unsupported Action: " .. tostring(v20));
            v21 = nil;
        end;
        v18[l_ActionKey_0] = v21;
        l_ActionKey_0 = nil;
        v21 = nil;
        if v17 == v5.UserSubjectKey then
            l_ActionKey_0 = v16[v6.UserName];
            v21 = v16[v6.UserId];
        elseif v17 == v5.GroupSubjectKey then
            l_ActionKey_0 = v16[v6.GroupName];
            v21 = v16[v6.GroupId];
        elseif v17 == v5.RoleSubjectKey then
            l_ActionKey_0 = v16[v6.RoleName];
            v21 = v16[v6.RoleId];
        end;
        v18[v5.SubjectNameKey] = l_ActionKey_0;
        v18[v5.SubjectIdKey] = v21;
        v20 = v16[v6.AllowedPermissions];
        if v17 == v5.UserSubjectKey then
            if not (v20 and v20 ~= "") or v20 == "Play" then
                v18[v5.IsFriendKey] = false;
            else
                v18[v5.IsFriendKey] = true;
            end;
        end;
        if v17 == v5.RoleSubjectKey then
            v18[v5.SubjectRankKey] = v16[v6.RoleRank];
            v18[v5.GroupIdKey] = v16[v6.GroupId];
        end;
        return v18;
    end
};
v22._deserializeAll = function(v23)
    local v24 = {};
    local v25 = {
        [v5.UserSubjectKey] = {},
        [v5.RoleSubjectKey] = {}
    };
    for _, v27 in pairs(v23) do
        local v28;
        if not v27[v6.UserId] then
            if not v27[v6.RoleId] then
                if not v27[v6.GroupId] then
                    error("Could not determine subject type");
                    v28 = nil;
                else
                    v28 = v5.GroupSubjectKey;
                end;
            else
                v28 = v5.RoleSubjectKey;
            end;
        else
            v28 = v5.UserSubjectKey;
        end;
        if v28 == v5.GroupSubjectKey then
            local v29 = v22._deserializeOne(v27, v28);
            local v30 = v29[v5.SubjectIdKey];
            local v31 = v29[v5.SubjectNameKey];
            local _ = v29[v5.ActionKey];
            v24[v30] = {
                Name = v31
            };
        end;
    end;
    for _, v34 in pairs(v23) do
        local v35;
        if not v34[v6.UserId] then
            if not v34[v6.RoleId] then
                if not v34[v6.GroupId] then
                    error("Could not determine subject type");
                    v35 = nil;
                else
                    v35 = v5.GroupSubjectKey;
                end;
            else
                v35 = v5.RoleSubjectKey;
            end;
        else
            v35 = v5.UserSubjectKey;
        end;
        local v36 = v22._deserializeOne(v34, v35);
        local v37 = v36[v5.SubjectIdKey];
        if v35 ~= v5.GroupSubjectKey and (not (v36[v5.SubjectRankKey] == 0) or v36[v5.ActionKey] ~= v5.NoAccessKey) then
            v25[v35][v37] = v36;
        end;
    end;
    return v25, v24;
end;
v22._addOwnerIfMissing = function(v38, v39, v40, v41)
    local v42 = v41 == Enum.CreatorType.User and v6.UserId or v6.GroupId;
    local v43 = false;
    for _, v45 in pairs(v38) do
        if v45[v42] == v40 then
            v43 = true;
            break;
        end;
    end;
    if not v43 then
        if v41 == Enum.CreatorType.User then
            table.insert(v38, {
                [v6.UserId] = v40,
                [v6.UserName] = v39,
                [v6.Action] = v6.EditAction
            });
            return l_Promise_0.new(function(v46)
                v46();
            end);
        else
            table.insert(v38, {
                [v6.GroupId] = v40,
                [v6.GroupName] = v39,
                [v6.Action] = nil
            });
            return v4.Get(v40):andThen(function(v47)
                for _, v49 in pairs(v47) do
                    if v49[v6.RoleId] == 255 then
                        table.insert(v38, v3.Dictionary.join(v49, {
                            [v6.GroupId] = v40,
                            [v6.GroupName] = v39,
                            [v6.Action] = v6.EditAction
                        }));
                    else
                        table.insert(v38, v3.Dictionary.join(v49, {
                            [v6.GroupId] = v40,
                            [v6.GroupName] = v39,
                            [v6.Action] = nil
                        }));
                    end;
                end;
            end);
        end;
    else
        return l_Promise_0.new(function(v50)
            v50();
        end);
    end;
end;
v22.DeserializePermissions = function(v51, v52, v53, v54)
    v22._DEPRECATEDFixEndpointKeyTypes(v51);
    v22._addOwnerIfMissing(v51, v52, v53, v54):await();
    local v55, v56 = v22._deserializeAll(v51);
    return v55, v56;
end;
return v22;


local v0 = require(script.Parent.Parent.Parent.Parent.Packages.Cryo);
local function _(v1)
    local v2 = newproxy(true);
    getmetatable(v2).__tostring = function()
        return "Symbol(" .. v1 .. ")";
    end;
    return v2;
end;
local v4 = {};
local v5 = newproxy(true);
local v6 = getmetatable(v5);
local v7 = "NoAccessPermission";
local l_v7_0 = v7 --[[ copy: 8 -> 9 ]];
v6.__tostring = function()
    return "Symbol(" .. l_v7_0 .. ")";
end;
v4.NoAccessKey = v5;
v5 = newproxy(true);
v6 = getmetatable(v5);
v7 = "PlayPermission";
local l_v7_1 = v7 --[[ copy: 8 -> 10 ]];
v6.__tostring = function()
    return "Symbol(" .. l_v7_1 .. ")";
end;
v4.PlayKey = v5;
v5 = newproxy(true);
v6 = getmetatable(v5);
v7 = "EditPermission";
local l_v7_2 = v7 --[[ copy: 8 -> 11 ]];
v6.__tostring = function()
    return "Symbol(" .. l_v7_2 .. ")";
end;
v4.EditKey = v5;
v5 = newproxy(true);
v6 = getmetatable(v5);
v7 = "NoEditMustBeFriendPermission";
local l_v7_3 = v7 --[[ copy: 8 -> 12 ]];
v6.__tostring = function()
    return "Symbol(" .. l_v7_3 .. ")";
end;
v4.NoEditMustBeFriendKey = v5;
v5 = newproxy(true);
v6 = getmetatable(v5);
v7 = "NoUserEditGroupGamePermission";
local l_v7_4 = v7 --[[ copy: 8 -> 13 ]];
v6.__tostring = function()
    return "Symbol(" .. l_v7_4 .. ")";
end;
v4.NoUserEditGroupGameKey = v5;
v5 = newproxy(true);
v6 = getmetatable(v5);
v7 = "AdminPermission";
local l_v7_5 = v7 --[[ copy: 8 -> 14 ]];
v6.__tostring = function()
    return "Symbol(" .. l_v7_5 .. ")";
end;
v4.AdminKey = v5;
v5 = newproxy(true);
v6 = getmetatable(v5);
v7 = "OwnerPermission";
local l_v7_6 = v7 --[[ copy: 8 -> 15 ]];
v6.__tostring = function()
    return "Symbol(" .. l_v7_6 .. ")";
end;
v4.OwnerKey = v5;
v5 = newproxy(true);
v6 = getmetatable(v5);
v7 = "MultiplePermission";
local l_v7_7 = v7 --[[ copy: 8 -> 16 ]];
v6.__tostring = function()
    return "Symbol(" .. l_v7_7 .. ")";
end;
v4.MultipleKey = v5;
v5 = newproxy(true);
v6 = getmetatable(v5);
v7 = "UserSubjectType";
local l_v7_8 = v7 --[[ copy: 8 -> 17 ]];
v6.__tostring = function()
    return "Symbol(" .. l_v7_8 .. ")";
end;
v4.UserSubjectKey = v5;
v5 = newproxy(true);
v6 = getmetatable(v5);
v7 = "GroupSubjectType";
local l_v7_9 = v7 --[[ copy: 8 -> 18 ]];
v6.__tostring = function()
    return "Symbol(" .. l_v7_9 .. ")";
end;
v4.GroupSubjectKey = v5;
v5 = newproxy(true);
v6 = getmetatable(v5);
v7 = "RoleSubjectType";
local l_v7_10 = v7 --[[ copy: 8 -> 19 ]];
v6.__tostring = function()
    return "Symbol(" .. l_v7_10 .. ")";
end;
v4.RoleSubjectKey = v5;
v5 = newproxy(true);
v6 = getmetatable(v5);
v7 = "Action";
local l_v7_11 = v7 --[[ copy: 8 -> 20 ]];
v6.__tostring = function()
    return "Symbol(" .. l_v7_11 .. ")";
end;
v4.ActionKey = v5;
v5 = newproxy(true);
v6 = getmetatable(v5);
v7 = "SubjectId";
local l_v7_12 = v7 --[[ copy: 8 -> 21 ]];
v6.__tostring = function()
    return "Symbol(" .. l_v7_12 .. ")";
end;
v4.SubjectIdKey = v5;
v5 = newproxy(true);
v6 = getmetatable(v5);
v7 = "SubjectName";
local l_v7_13 = v7 --[[ copy: 8 -> 22 ]];
v6.__tostring = function()
    return "Symbol(" .. l_v7_13 .. ")";
end;
v4.SubjectNameKey = v5;
v5 = newproxy(true);
v6 = getmetatable(v5);
v7 = "SubjectType";
local l_v7_14 = v7 --[[ copy: 8 -> 23 ]];
v6.__tostring = function()
    return "Symbol(" .. l_v7_14 .. ")";
end;
v4.SubjectTypeKey = v5;
v5 = newproxy(true);
v6 = getmetatable(v5);
v7 = "SubjectRank";
local l_v7_15 = v7 --[[ copy: 8 -> 24 ]];
v6.__tostring = function()
    return "Symbol(" .. l_v7_15 .. ")";
end;
v4.SubjectRankKey = v5;
v5 = newproxy(true);
v6 = getmetatable(v5);
v7 = "GroupId";
local l_v7_16 = v7 --[[ copy: 8 -> 25 ]];
v6.__tostring = function()
    return "Symbol(" .. l_v7_16 .. ")";
end;
v4.GroupIdKey = v5;
v5 = newproxy(true);
v6 = getmetatable(v5);
v7 = "GroupName";
local l_v7_17 = v7 --[[ copy: 8 -> 26 ]];
v6.__tostring = function()
    return "Symbol(" .. l_v7_17 .. ")";
end;
v4.GroupNameKey = v5;
v5 = newproxy(true);
v6 = getmetatable(v5);
v7 = "GroupMemberCountKey";
local l_v7_18 = v7 --[[ copy: 8 -> 27 ]];
v6.__tostring = function()
    return "Symbol(" .. l_v7_18 .. ")";
end;
v4.GroupMemberCountKey = v5;
v5 = newproxy(true);
v6 = getmetatable(v5);
v7 = "IsFriend";
v6.__tostring = function()
    return "Symbol(" .. v7 .. ")";
end;
v4.IsFriendKey = v5;
return v0.Dictionary.join(v4, {
    DEPRECATED_MaxSearchResultsPerSubjectType = 3,
    MaxSearchResultsPerSubjectTypeUsers = 3,
    MaxSearchResultsPerSubjectTypeGroups = 2
});


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Util.PermissionsConstants);
local v2 = require(l_Parent_0.Util.WebKeyConstants);
local v3 = {
    v1.NoAccessKey,
    v1.PlayKey,
    v1.EditKey
};
local v4 = {};
for v5, v6 in pairs(v3) do
    v4[v6] = v5;
end;
local function _(v7)
    if v7 == v1.UserSubjectKey then
        return v2.UserSubject;
    elseif v7 == v1.GroupSubjectKey then
        return v2.GroupSubject;
    elseif v7 == v1.RoleSubjectKey then
        return v2.RoleSubject;
    else
        error("Invalid SubjectType: " .. tostring(v7));
        return ;
    end;
end;
local function _(v9)
    if v9 == v1.PlayKey then
        return v2.PlayAction;
    elseif v9 == v1.EditKey then
        return v2.EditAction;
    elseif v9 == v1.AdminKey then
        return v2.EditAction;
    elseif v9 == v1.NoAccessKey then
        return nil;
    else
        error("Invalid Action: " .. tostring(v9));
        return ;
    end;
end;
local v53 = {
    _getGroupsForRoles = function(v11, v12)
        local v13 = {};
        for v14, v15 in pairs(v11[v1.RoleSubjectKey]) do
            v13[v14] = v15[v1.GroupIdKey];
        end;
        for v16, v17 in pairs(v12[v1.RoleSubjectKey]) do
            v13[v16] = v17[v1.GroupIdKey];
        end;
        return v13;
    end,
    diffPermissionChanges = function(v18, v19)
        local v20 = {
            [v1.GroupSubjectKey] = {}
        };
        for v21, _ in pairs(v18) do
            v20[v21] = {};
        end;
        for v23, _ in pairs(v19) do
            v20[v23] = {};
        end;
        for v25, v26 in pairs(v18) do
            for v27, v28 in pairs(v26) do
                v20[v25][v27] = {
                    Current = v28[v1.ActionKey]
                };
            end;
        end;
        for v29, v30 in pairs(v19) do
            for v31, v32 in pairs(v30) do
                v20[v29][v31] = v20[v29][v31] or {};
                v20[v29][v31].Changed = v32[v1.ActionKey];
            end;
        end;
        return v20;
    end,
    _resolvePermissionChanges = function(v33, _)
        local v35 = {};
        local v36 = {};
        for v37, v38 in pairs(v33) do
            for v39, v40 in pairs(v38) do
                local v41 = v4[v40.Current] or v4[v1.NoAccessKey];
                local v42 = v4[v40.Changed] or v4[v1.NoAccessKey];
                if v41 < v42 then
                    for v43 = v41 + 1, v42 do
                        local v44 = {};
                        local l_SubjectType_0 = v2.SubjectType;
                        local v46;
                        if v37 == v1.UserSubjectKey then
                            v46 = v2.UserSubject;
                        elseif v37 == v1.GroupSubjectKey then
                            v46 = v2.GroupSubject;
                        elseif v37 == v1.RoleSubjectKey then
                            v46 = v2.RoleSubject;
                        else
                            error("Invalid SubjectType: " .. tostring(v37));
                            v46 = nil;
                        end;
                        v44[l_SubjectType_0] = v46;
                        v44[v2.SubjectId] = v39;
                        l_SubjectType_0 = v2.Action;
                        local v47 = v3[v43];
                        if v47 == v1.PlayKey then
                            v46 = v2.PlayAction;
                        elseif v47 == v1.EditKey then
                            v46 = v2.EditAction;
                        elseif v47 == v1.AdminKey then
                            v46 = v2.EditAction;
                        elseif v47 == v1.NoAccessKey then
                            v46 = nil;
                        else
                            error("Invalid Action: " .. tostring(v47));
                            v46 = nil;
                        end;
                        v44[l_SubjectType_0] = v46;
                        table.insert(v35, v44);
                    end;
                elseif v42 < v41 then
                    for v48 = v41, v42 + 1, -1 do
                        local v49 = {};
                        local l_SubjectType_1 = v2.SubjectType;
                        local v51;
                        if v37 == v1.UserSubjectKey then
                            v51 = v2.UserSubject;
                        elseif v37 == v1.GroupSubjectKey then
                            v51 = v2.GroupSubject;
                        elseif v37 == v1.RoleSubjectKey then
                            v51 = v2.RoleSubject;
                        else
                            error("Invalid SubjectType: " .. tostring(v37));
                            v51 = nil;
                        end;
                        v49[l_SubjectType_1] = v51;
                        v49[v2.SubjectId] = v39;
                        l_SubjectType_1 = v2.Action;
                        local v52 = v3[v48];
                        if v52 == v1.PlayKey then
                            v51 = v2.PlayAction;
                        elseif v52 == v1.EditKey then
                            v51 = v2.EditAction;
                        elseif v52 == v1.AdminKey then
                            v51 = v2.EditAction;
                        elseif v52 == v1.NoAccessKey then
                            v51 = nil;
                        else
                            error("Invalid Action: " .. tostring(v52));
                            v51 = nil;
                        end;
                        v49[l_SubjectType_1] = v51;
                        table.insert(v36, v49);
                    end;
                end;
            end;
        end;
        return v35, v36;
    end
};
v53.SerializePermissions = function(v54, v55)
    local v56, v57 = v53._resolvePermissionChanges(v53.diffPermissionChanges(v54, v55), (v53._getGroupsForRoles(v54, v55)));
    return v56, v57;
end;
return v53;


return {
    UserId = "userId",
    UserName = "userName",
    GroupId = "groupId",
    GroupName = "groupName",
    RoleId = "rolesetId",
    RoleName = "rolesetName",
    RoleRank = "rank",
    Action = "action",
    AllowedPermissions = "allowedPermissions",
    PlayAction = "Play",
    EditAction = "Edit",
    AdminAction = "Admin",
    SubjectType = "subjectType",
    SubjectId = "subjectId",
    UserSubject = "User",
    GroupSubject = "Group",
    RoleSubject = "Roleset"
};


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local _ = require(l_Parent_0.Packages.Cryo);
local v3 = require(l_Parent_0.Packages.Framework);
local l_FitFrameOnAxis_0 = v3.Util.FitFrame.FitFrameOnAxis;
local l_TextInput_0 = v3.UI.TextInput;
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v8 = require(l_Parent_0.Src.Components.RadioButtonSet);
local v9 = require(l_Parent_0.Src.Components.RadioButton);
local v10 = v1.PureComponent:extend("ServerFill");
v10.render = function(v11)
    local l_props_0 = v11.props;
    local l_Localization_0 = l_props_0.Localization;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local v15 = l_Localization_0:getText("Places", "ServerFill");
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_Enabled_0 = l_props_0.Enabled;
    local l_Selected_0 = l_props_0.Selected;
    local l_CustomSocialSlotsCount_0 = l_props_0.CustomSocialSlotsCount;
    local l_ErrorMessage_0 = l_props_0.ErrorMessage;
    local l_OnSocialSlotTypeChanged_0 = l_props_0.OnSocialSlotTypeChanged;
    local l_OnCustomSocialSlotsCountChanged_0 = l_props_0.OnCustomSocialSlotsCountChanged;
    local v23 = l_Selected_0 == "Custom";
    return v1.createElement(l_FitFrameOnAxis_0, {
        axis = l_FitFrameOnAxis_0.Axis.Vertical,
        minimumSize = UDim2.new(1, 0, 0, 0),
        BackgroundTransparency = 1,
        LayoutOrder = l_LayoutOrder_0
    }, {
        ServerFillToggle = v1.createElement(v8, {
            Title = v15,
            Buttons = {
                {
                    Id = "Automatic",
                    Title = l_Localization_0:getText("Places", "OptimizedTitle"),
                    Description = l_Localization_0:getText("Places", "OptimizedDescription")
                },
                {
                    Id = "Empty",
                    Title = l_Localization_0:getText("Places", "MaximumTitle"),
                    Description = l_Localization_0:getText("Places", "MaximumWarning")
                },
                {
                    Id = "Custom",
                    Title = l_Localization_0:getText("Places", "CustomizeSlotsTitle"),
                    Description = l_Localization_0:getText("Places", "CustomizeSlotsDescription")
                }
            },
            Enabled = l_Enabled_0,
            Selected = l_Selected_0,
            RenderItem = function(v24, v25)
                if v25.Id == "Custom" then
                    local l_createElement_0 = v1.createElement;
                    local l_l_FitFrameOnAxis_0_0 = l_FitFrameOnAxis_0;
                    local v28 = {
                        axis = l_FitFrameOnAxis_0.Axis.Vertical,
                        minimumSize = UDim2.new(1, 0, 0, 0),
                        contentPadding = UDim.new(0, l_Stylizer_0.radioButton.padding),
                        BackgroundTransparency = 1,
                        FillDirection = Enum.FillDirection.Horizontal,
                        LayoutOrder = v24
                    };
                    local v29 = {};
                    local l_createElement_1 = v1.createElement;
                    local l_v9_0 = v9;
                    local v32 = {
                        LayoutOrder = 1,
                        Title = v25.Title,
                        Id = v25.Id,
                        Description = v25.Description
                    };
                    local v33 = true;
                    if v25.Id ~= l_Selected_0 then
                        v33 = v24 == l_Selected_0;
                    end;
                    v32.Selected = v33;
                    v32.Index = v24;
                    v32.Enabled = l_props_0.Enabled;
                    v32.Children = v25.Children;
                    v32.OnClicked = function()
                        l_OnSocialSlotTypeChanged_0(v25);
                    end;
                    v29.RadioButton = l_createElement_1(l_v9_0, v32);
                    v29.InputField = v23 and v1.createElement(l_TextInput_0, {
                        ErrorText = l_ErrorMessage_0,
                        LayoutOrder = 2,
                        OnTextChanged = l_OnCustomSocialSlotsCountChanged_0,
                        Width = l_Stylizer_0.placePage.textBox.length,
                        Text = l_CustomSocialSlotsCount_0
                    });
                    return l_createElement_0(l_l_FitFrameOnAxis_0_0, v28, v29);
                else
                    local l_createElement_2 = v1.createElement;
                    local l_v9_1 = v9;
                    local v36 = {
                        Title = v25.Title,
                        Id = v25.Id,
                        Description = v25.Description
                    };
                    local v37 = true;
                    if v25.Id ~= l_Selected_0 then
                        v37 = v24 == l_Selected_0;
                    end;
                    v36.Selected = v37;
                    v36.Index = v24;
                    v36.Enabled = l_props_0.Enabled;
                    v36.LayoutOrder = v24;
                    v36.OnClicked = function()
                        l_OnSocialSlotTypeChanged_0(v25);
                    end;
                    return l_createElement_2(l_v9_1, v36);
                end;
            end
        })
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v10));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local _ = require(l_Parent_0.Packages.Cryo);
local v3 = require(l_Parent_0.Packages.Framework);
local l_UI_0 = v3.UI;
local l_TextInput_0 = l_UI_0.TextInput;
local l_TitledFrame_0 = l_UI_0.TitledFrame;
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v9 = v1.PureComponent:extend("Secrets");
v9.render = function(v10)
    local l_props_0 = v10.props;
    return v1.createElement(l_TitledFrame_0, {
        LayoutOrder = l_props_0.LayoutOrder,
        Title = l_props_0.Localization:getText("General", "TitleSecrets")
    }, {
        TextBox = v1.createElement(l_TextInput_0, {
            Height = 130,
            MultiLine = true,
            OnTextChanged = l_props_0.OnChanged,
            Text = l_props_0.Secrets
        })
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization
})(v9));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.RoactRodux);
local v3 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_TextLabel_0 = v3.UI.TextLabel;
local l_LayoutOrderIterator_0 = v3.Util.LayoutOrderIterator;
local v8 = require(l_Parent_0.Src.Components.ToggleButtonWithTitle);
local v9 = require(l_Parent_0.Src.Actions.AddChange);
local v10 = require(l_Parent_0.Src.Components.SettingsPages.SettingsPage);
local v11 = require(l_Parent_0.Src.Util.Analytics);
local v12 = require(script.Parent.Components.Secrets);
local l_Name_0 = script.Name;
local function v25(v14, v15)
    local v16 = v14:getState();
    local l_game_0 = v16.Metadata.game;
    local l_gameId_0 = v16.Metadata.gameId;
    local l_universePermissionsController_0 = v15.universePermissionsController;
    return {
        function(v20)
            v20.HttpEnabled = l_universePermissionsController_0:GetHttpEnabled(l_game_0);
        end,
        function(v21)
            v21.StudioAccessToApisAllowed = l_universePermissionsController_0:GetStudioAccessToApisAllowed(l_gameId_0);
        end,
        function(v22)
            v22.ThirdPartyPurchaseAllowed = l_universePermissionsController_0:GetThirdPartyPurchasesAllowed(l_gameId_0);
        end,
        function(v23)
            v23.ThirdPartyTeleportAllowed = l_universePermissionsController_0:GetThirdPartyTeleportsAllowed(l_gameId_0);
        end,
        function(v24)
            v24.Secrets = l_universePermissionsController_0:GetSecrets();
        end or nil
    };
end;
local function _(v26, v27, v28)
    return function()
        local v29 = v26.Settings.Changed[v27];
        if v29 ~= nil then
            v11.onSecuritySettingChange(v27, v29);
            v28(v29);
        end;
    end;
end;
local function v62(v31, v32)
    local v33 = v31:getState();
    local l_gameId_1 = v33.Metadata.gameId;
    local l_universePermissionsController_1 = v32.universePermissionsController;
    local v36 = {};
    local function v38(v37)
        l_universePermissionsController_1:SetHttpEnabled(game, v37);
    end;
    local v39 = "HttpEnabled";
    local l_v39_0 = v39 --[[ copy: 8 -> 13 ]];
    local l_v38_0 = v38 --[[ copy: 7 -> 14 ]];
    local function v43()
        local v42 = v33.Settings.Changed[l_v39_0];
        if v42 ~= nil then
            v11.onSecuritySettingChange(l_v39_0, v42);
            l_v38_0(v42);
        end;
    end;
    local function v45(v44)
        l_universePermissionsController_1:SetSecrets(v44);
    end;
    local v46 = "Secrets";
    local l_v46_0 = v46 --[[ copy: 10 -> 15 ]];
    local l_v45_0 = v45 --[[ copy: 9 -> 16 ]];
    v38 = function()
        local v49 = v33.Settings.Changed[l_v46_0];
        if v49 ~= nil then
            v11.onSecuritySettingChange(l_v46_0, v49);
            l_v45_0(v49);
        end;
    end or nil;
    v45 = function(v50)
        l_universePermissionsController_1:SetStudioAccessToApisAllowed(l_gameId_1, v50);
    end;
    v46 = "StudioAccessToApisAllowed";
    local l_v46_1 = v46 --[[ copy: 10 -> 17 ]];
    local l_v45_1 = v45 --[[ copy: 9 -> 18 ]];
    v39 = function()
        local v53 = v33.Settings.Changed[l_v46_1];
        if v53 ~= nil then
            v11.onSecuritySettingChange(l_v46_1, v53);
            l_v45_1(v53);
        end;
    end;
    v46 = function(v54)
        l_universePermissionsController_1:SetThirdPartyPurchasesAllowed(l_gameId_1, v54);
    end;
    local v55 = "ThirdPartyPurchaseAllowed";
    local l_v55_0 = v55 --[[ copy: 11 -> 19 ]];
    local l_v46_2 = v46 --[[ copy: 10 -> 20 ]];
    v45 = function()
        local v58 = v33.Settings.Changed[l_v55_0];
        if v58 ~= nil then
            v11.onSecuritySettingChange(l_v55_0, v58);
            l_v46_2(v58);
        end;
    end;
    v55 = function(v59)
        l_universePermissionsController_1:SetThirdPartyTeleportsAllowed(l_gameId_1, v59);
    end;
    local v60 = "ThirdPartyTeleportAllowed";
    v46 = function()
        local v61 = v33.Settings.Changed[v60];
        if v61 ~= nil then
            v11.onSecuritySettingChange(v60, v61);
            v55(v61);
        end;
    end;
    setlist { ['R005[1 to 5]'] = 'R006 to R010' };
    return v36;
end;
local function v65(v63, v64)
    return {
        HttpEnabled = v63("HttpEnabled"),
        Secrets = v63("Secrets"),
        StudioAccessToApisAllowed = v63("StudioAccessToApisAllowed"),
        ThirdPartyPurchaseAllowed = v63("ThirdPartyPurchaseAllowed"),
        ThirdPartyTeleportAllowed = v63("ThirdPartyTeleportAllowed"),
        HttpEnabledValueChanged = v64("HttpEnabled"),
        ThirdPartyPurchaseAllowedValueChanged = v64("ThirdPartyPurchaseAllowed"),
        ThirdPartyTeleportAllowedValueChanged = v64("ThirdPartyTeleportAllowed")
    };
end;
local function v68(v66, _)
    return {
        HttpEnabledChanged = v66("HttpEnabled"),
        SecretsChanged = v66("Secrets"),
        StudioApiServicesChanged = v66("StudioAccessToApisAllowed"),
        ThirdPartyPurchaseChanged = v66("ThirdPartyPurchaseAllowed"),
        ThirdPartyTeleportAllowedChanged = v66("ThirdPartyTeleportAllowed")
    };
end;
local v69 = v1.PureComponent:extend(script.Name);
v69.render = function(v70)
    return v1.createElement(v10, {
        SettingsLoadJobs = v25,
        SettingsSaveJobs = v62,
        Title = v70.props.Localization:getText("General", "Category" .. l_Name_0),
        PageId = l_Name_0,
        CreateChildren = function()
            local l_props_0 = v70.props;
            local l_Localization_0 = l_props_0.Localization;
            local v73 = (not not l_props_0.HttpEnabledValueChanged and l_props_0.HttpEnabled or l_props_0.ThirdPartyPurchaseAllowedValueChanged and l_props_0.ThirdPartyPurchaseAllowed) or l_props_0.ThirdPartyTeleportAllowedValueChanged and l_props_0.ThirdPartyTeleportAllowed;
            local l_Stylizer_0 = l_props_0.Stylizer;
            local v75 = l_LayoutOrderIterator_0.new(1);
            return {
                InsecureWarning = v73 and v1.createElement("Frame", {
                    AutomaticSize = Enum.AutomaticSize.XY,
                    BackgroundTransparency = 1,
                    BorderSizePixel = 0,
                    LayoutOrder = v75:getNextOrder()
                }, {
                    UILayout = v1.createElement("UIListLayout", {
                        FillDirection = Enum.FillDirection.Horizontal,
                        Padding = UDim.new(0, l_Stylizer_0.dialog.spacing),
                        SortOrder = Enum.SortOrder.LayoutOrder,
                        VerticalAlignment = Enum.VerticalAlignment.Center
                    }),
                    Warning = v1.createElement("ImageLabel", {
                        Image = l_Stylizer_0.warningIcon,
                        LayoutOrder = v75:getNextOrder(),
                        BackgroundTransparency = 1,
                        Size = UDim2.new(0, l_Stylizer_0.warningDialog.icon.size, 0, l_Stylizer_0.warningDialog.icon.size)
                    }),
                    Description = v1.createElement(l_TextLabel_0, {
                        AutomaticSize = Enum.AutomaticSize.XY,
                        LayoutOrder = v75:getNextOrder(),
                        Style = "SubText",
                        Text = l_Localization_0:getText("Security", "InsecureWarning"),
                        TextXAlignment = Enum.TextXAlignment.Left,
                        TextColor = l_Stylizer_0.warningColor,
                        TextSize = l_Stylizer_0.fontStyle.Subtitle.TextSize
                    })
                }),
                HttpEnabled = v1.createElement(v8, {
                    Description = l_Localization_0:getText("General", "HttpDesc"),
                    Disabled = l_props_0.HttpEnabled == nil,
                    LayoutOrder = v75:getNextOrder(),
                    OnClick = function()
                        l_props_0.HttpEnabledChanged(not l_props_0.HttpEnabled);
                    end,
                    Selected = l_props_0.HttpEnabled,
                    Title = l_Localization_0:getText("General", "TitleHttp")
                }),
                Secrets = l_props_0.HttpEnabled and v1.createElement(v12, {
                    LayoutOrder = v75:getNextOrder(),
                    Secrets = l_props_0.Secrets,
                    OnChanged = function(v76)
                        l_props_0.SecretsChanged(v76);
                    end
                }),
                StudioApiServicesEnabled = v1.createElement(v8, {
                    Description = l_Localization_0:getText("General", "StudioApiServicesDesc"),
                    Disabled = l_props_0.StudioAccessToApisAllowed == nil,
                    LayoutOrder = v75:getNextOrder(),
                    OnClick = function()
                        l_props_0.StudioApiServicesChanged(not l_props_0.StudioAccessToApisAllowed);
                    end,
                    Selected = l_props_0.StudioAccessToApisAllowed,
                    Title = l_Localization_0:getText("General", "TitleStudioApiServices")
                }),
                ThirdPartyPurchasesEnabled = v1.createElement(v8, {
                    Description = l_Localization_0:getText("Security", "EnableThirdPartyPurchasesDescription"),
                    Disabled = l_props_0.ThirdPartyPurchaseAllowed == nil,
                    LayoutOrder = v75:getNextOrder(),
                    OnClick = function()
                        l_props_0.ThirdPartyPurchaseChanged(not l_props_0.ThirdPartyPurchaseAllowed);
                    end,
                    Selected = l_props_0.ThirdPartyPurchaseAllowed,
                    Title = l_Localization_0:getText("Security", "EnableThirdPartyPurchases")
                }),
                ThirdPartyTeleportsEnabled = v1.createElement(v8, {
                    Description = l_Localization_0:getText("Security", "EnableThirdPartyTeleportsDescription"),
                    Disabled = l_props_0.ThirdPartyTeleportAllowed == nil,
                    LayoutOrder = v75:getNextOrder(),
                    OnClick = function()
                        l_props_0.ThirdPartyTeleportAllowedChanged(not l_props_0.ThirdPartyTeleportAllowed);
                    end,
                    Selected = l_props_0.ThirdPartyTeleportAllowed,
                    Title = l_Localization_0:getText("Security", "EnableThirdPartyTeleports")
                })
            };
        end
    });
end;
v69 = l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v69);
local v77 = require(l_Parent_0.Src.Networking.settingFromState);
v69 = v2.connect(function(v78, _)
    if v78 then
        return (v65(function(v80)
            return v77(v78.Settings, v80);
        end, function(v81)
            return v78.Settings.Changed[v81] ~= nil;
        end));
    else
        return ;
    end;
end, function(v82)
    return (v68(function(v83)
        return function(v84)
            v82(v9(v83, v84));
        end;
    end, v82));
end)(v69);
v69.LocalizationId = l_Name_0;
return v69;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local v2 = require(l_Parent_1.Packages.Roact);
local v3 = require(l_Parent_1.Packages.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_TextInput_0 = v3.UI.TextInput;
local v7 = require(l_Parent_0.ContextServices.WorldRootPhysics);
local v8 = require(l_Parent_0.Util.formatNumberForDisplay);
local v9 = require(l_Parent_0.Util.formatNumberForEngine);
local l_RoactStudioWidgets_0 = l_Parent_1.Packages.RoactStudioWidgets;
local v11 = require(l_RoactStudioWidgets_0.RadioButtonSet);
local v12 = require(l_RoactStudioWidgets_0.Text);
local l_StudioGameSettingsWorldPageFormatNumbersForGerman_0 = game:GetFastFlag("StudioGameSettingsWorldPageFormatNumbersForGerman");
local v14 = v2.PureComponent:extend("JumpSelect");
v14.render = function(v15)
    local l_props_0 = v15.props;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_UseJumpPower_0 = l_props_0.UseJumpPower;
    local l_JumpPower_0 = l_props_0.JumpPower;
    local l_JumpHeight_0 = l_props_0.JumpHeight;
    local l_SetUseJumpPower_0 = l_props_0.SetUseJumpPower;
    local l_SetJumpPower_0 = l_props_0.SetJumpPower;
    local l_SetJumpHeight_0 = l_props_0.SetJumpHeight;
    local l_Localization_0 = l_props_0.Localization;
    local v25 = l_props_0.Mouse:get();
    local v26 = l_props_0.WorldRootPhysics:get();
    local v27 = UDim.new(0, 10);
    return v2.createElement("Frame", {
        LayoutOrder = l_LayoutOrder_0,
        Size = UDim2.new(1, 0, 0, 50),
        BackgroundTransparency = 1
    }, {
        JumpSelect = v2.createElement(v11, {
            Title = l_Localization_0:getText("General", "TitleJump"),
            Buttons = {
                {
                    Id = false,
                    Title = l_Localization_0:getText("General", "JumpHeight")
                },
                {
                    Id = true,
                    Title = l_Localization_0:getText("General", "JumpPower")
                }
            },
            Enabled = true,
            Selected = l_UseJumpPower_0,
            Mouse = v25,
            SelectionChanged = function(v28)
                l_SetUseJumpPower_0(v28.Id);
            end
        }),
        JumpInput = v2.createElement("Frame", {
            Position = UDim2.new(0, 340, 0, 0),
            BackgroundTransparency = 1
        }, {
            Layout = v2.createElement("UIListLayout", {
                Padding = v27,
                SortOrder = Enum.SortOrder.LayoutOrder
            }),
            JumpHeightInputBox = v2.createElement(l_TextInput_0, {
                Disabled = l_UseJumpPower_0,
                LayoutOrder = 1,
                OnFocusLost = function()
                    l_SetJumpHeight_0((math.clamp(l_JumpHeight_0, 0, math.huge)));
                end,
                OnTextChanged = function(v29)
                    if l_StudioGameSettingsWorldPageFormatNumbersForGerman_0 then
                        v29 = v9(v29);
                    end;
                    l_SetJumpHeight_0(tonumber(v29) or 0);
                end,
                Size = UDim2.fromOffset(150, 20),
                Text = v8(l_JumpHeight_0)
            }),
            JumpPowerInputBox = v2.createElement(l_TextInput_0, {
                Disabled = not l_UseJumpPower_0,
                LayoutOrder = 2,
                OnFocusLost = function()
                    l_SetJumpPower_0((math.clamp(l_JumpPower_0, 0, 1000)));
                end,
                OnTextChanged = function(v30)
                    if l_StudioGameSettingsWorldPageFormatNumbersForGerman_0 then
                        v30 = v9(v30);
                    end;
                    l_SetJumpPower_0(tonumber(v30) or 0);
                end,
                Size = UDim2.new(0, 150, 0, 20),
                Text = v8(l_JumpPower_0)
            })
        }),
        MetricLabels = v2.createElement("Frame", {
            Position = UDim2.new(0, 510, 0, 0),
            BackgroundTransparency = 1
        }, {
            Layout = v2.createElement("UIListLayout", {
                Padding = v27,
                SortOrder = Enum.SortOrder.LayoutOrder
            }),
            JumpHeightMetricLabel = v2.createElement(v12, {
                Enabled = not l_UseJumpPower_0,
                Size = UDim2.new(1, 0, 0, 20),
                Text = l_Localization_0:getText("General", "UnitsMeters1", {
                    v8(v26.convertStudsToMeters(l_JumpHeight_0))
                })
            })
        })
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Mouse = l_ContextServices_0.Mouse,
    WorldRootPhysics = v7
})(v14));


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local v2 = require(l_Parent_1.Packages.Roact);
local l_GameSettingsFixNumberInputRow_0 = game:GetFastFlag("GameSettingsFixNumberInputRow");
local l_StudioGameSettingsWorldPageFormatNumbersForGerman_0 = game:GetFastFlag("StudioGameSettingsWorldPageFormatNumbersForGerman");
local v5 = require(l_Parent_1.Packages.Framework);
local l_ContextServices_0 = v5.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_UI_0 = v5.UI;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_TextInput_0 = l_UI_0.TextInput;
local l_TitledFrame_0 = l_UI_0.TitledFrame;
local v12 = require(l_Parent_0.ContextServices.WorldRootPhysics);
local v13 = require(l_Parent_0.Util.formatNumberForDisplay);
local v14 = require(l_Parent_0.Util.formatNumberForEngine);
local v15 = v2.PureComponent:extend("NumberInputRow");
v15.init = function(v16)
    v16.onFocusLost = function()
        v16:onTextChanged(v16.props.Value);
    end;
    v16.onTextChanged = function(v17)
        local l_props_0 = v16.props;
        local v19 = l_props_0.MinValue or -math.huge;
        local v20 = l_props_0.MaxValue or math.huge;
        if not l_GameSettingsFixNumberInputRow_0 then
            v16.props.OnUpdate((math.clamp(l_props_0.Value, v19, v20)));
        elseif not l_StudioGameSettingsWorldPageFormatNumbersForGerman_0 then
            local v21 = tonumber(v17);
            if v21 then
                v16.props.OnUpdate((math.clamp(v21, v19, v20)));
                return ;
            end;
        else
            local v22 = nil;
            if typeof(v17) == "string" then
                v22 = tonumber((v14(v17)));
            end;
            if v22 then
                v16.props.OnUpdate((math.clamp(v22, v19, v20)));
                return ;
            end;
        end;
    end;
    v16.onValidateText = function(v23)
        if not l_StudioGameSettingsWorldPageFormatNumbersForGerman_0 then
            local v24 = true;
            if v23 ~= "" then
                v24 = tonumber(v23) ~= nil;
            end;
            local v25 = nil;
            if not v24 then
                v25 = v16.props.Localization:getText("General", "NumberError");
            end;
            return v24, v25;
        else
            local v26 = v14(v23);
            local v27 = true;
            if v26 ~= "" then
                v27 = tonumber(v26) ~= nil;
            end;
            local v28 = nil;
            if not v27 then
                v28 = v16.props.Localization:getText("General", "NumberError");
            end;
            return v27, v28;
        end;
    end;
end;
v15.render = function(v29)
    local l_props_1 = v29.props;
    local l_LayoutOrder_0 = l_props_1.LayoutOrder;
    local l_Title_0 = l_props_1.Title;
    local l_Label_0 = l_props_1.Label;
    local l_Value_0 = l_props_1.Value;
    local l_UnitsFormatFunction_0 = l_props_1.UnitsFormatFunction;
    return v2.createElement(l_TitledFrame_0, {
        LayoutOrder = l_LayoutOrder_0,
        Title = l_Title_0
    }, {
        Label = v2.createElement(l_TextLabel_0, {
            AutomaticSize = Enum.AutomaticSize.XY,
            LayoutOrder = 1,
            Style = "Normal",
            Text = l_Label_0
        }),
        InputBox = v2.createElement(l_TextInput_0, {
            OnFocusLost = v29.onFocusLost,
            OnTextChanged = v29.onTextChanged,
            OnValidateText = v29.onValidateText,
            LayoutOrder = 2,
            Position = UDim2.new(0, 160, 0, 0),
            Width = 150,
            Text = v13(l_Value_0)
        }),
        MetricLabel = l_UnitsFormatFunction_0 and v2.createElement(l_TextLabel_0, {
            AutomaticSize = Enum.AutomaticSize.XY,
            LayoutOrder = 3,
            Style = "SubText",
            Text = l_UnitsFormatFunction_0(l_props_1.WorldRootPhysics:get().convertStudsToMeters(l_Value_0))
        })
    });
end;
return (l_withContext_0({
    Mouse = l_ContextServices_0.Mouse,
    Localization = l_ContextServices_0.Localization,
    WorldRootPhysics = v12
})(v15));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local l_ContextServices_0 = require(l_Parent_0.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v4 = require(l_Parent_0.Packages.RoactStudioWidgets.ButtonBar);
local v5 = v1.PureComponent:extend(script.Name);
v5.render = function(v6)
    local l_props_0 = v6.props;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_ApplyPreset_0 = l_props_0.ApplyPreset;
    local v10 = l_props_0.Mouse:get();
    local l_Localization_0 = l_props_0.Localization;
    return v1.createElement(v4, {
        LayoutOrder = l_LayoutOrder_0,
        Title = l_Localization_0:getText("General", "TitlePresets"),
        ButtonClicked = function(v12)
            l_ApplyPreset_0(v12.Preset);
        end,
        Buttons = {
            {
                Name = l_Localization_0:getText("General", "WorldPresetsClassic"),
                Enabled = true,
                ShowPressed = true,
                Mouse = v10,
                Value = {
                    ToolTip = l_Localization_0:getText("General", "WorldPresetsClassicToolTip"),
                    Preset = {
                        Gravity = 196.2,
                        JumpPower = 50,
                        Walkspeed = 16,
                        MaxSlopeAngle = 89
                    }
                }
            },
            {
                Name = l_Localization_0:getText("General", "WorldPresetsRealistic"),
                Enabled = true,
                ShowPressed = true,
                Mouse = v10,
                Value = {
                    ToolTip = l_Localization_0:getText("General", "WorldPresetsRealisticToolTip"),
                    Preset = {
                        Gravity = 35,
                        JumpPower = 13,
                        Walkspeed = 16
                    }
                }
            },
            {
                Name = l_Localization_0:getText("General", "WorldPresetsAction"),
                Enabled = true,
                ShowPressed = true,
                Mouse = v10,
                Value = {
                    ToolTip = l_Localization_0:getText("General", "WorldPresetsActionToolTip"),
                    Preset = {
                        Gravity = 75,
                        JumpPower = 31,
                        Walkspeed = 18
                    }
                }
            }
        }
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Mouse = l_ContextServices_0.Mouse
})(v5));


local l_Parent_0 = script.Parent.Parent;
local l_ContextItem_0 = require(script.Parent.Parent.Parent.Parent.Packages.Framework).ContextServices.ContextItem;
local v2 = require(l_Parent_0.Controllers.WorldRootPhysicsController);
local v3 = l_ContextItem_0:extend(script.Name);
v3.new = function(...)
    local v4 = {
        impl = v2.new(...)
    };
    setmetatable(v4, v3);
    return v4;
end;
v3.get = function(v5)
    return v5.impl;
end;
return v3;


local v0 = {};
v0.__index = v0;
v0.new = function()
    return (setmetatable({}, v0));
end;
v0.convertStudsToMeters = function(v1)
    return v1 * 0.28;
end;
v0.calculateJumpDistance = function(v2, v3, v4)
    return workspace:CalculateJumpDistance(v2, v3, v4);
end;
v0.calculateJumpHeight = function(v5, v6)
    return workspace:CalculateJumpHeight(v5, v6);
end;
v0.calculateJumpPower = function(v7, v8)
    return workspace:CalculateJumpPower(v7, v8);
end;
v0.getGravity = function(_, v10)
    return v10:GetService("Workspace").Gravity;
end;
v0.setGravity = function(_, v12, v13)
    v12:GetService("Workspace").Gravity = v13;
end;
v0.getUseJumpPower = function(_, v15)
    return v15:GetService("StarterPlayer").CharacterUseJumpPower;
end;
v0.setUseJumpPower = function(_, v17, v18)
    v17:GetService("StarterPlayer").CharacterUseJumpPower = v18;
end;
v0.getJumpHeight = function(v19, v20)
    local l_StarterPlayer_0 = v20:GetService("StarterPlayer");
    local l_Workspace_0 = v20:GetService("Workspace");
    if not v19:getUseJumpPower(v20) then
        return l_StarterPlayer_0.CharacterJumpHeight;
    else
        return l_Workspace_0:CalculateJumpHeight(v19:getGravity(v20), v19:getJumpPower(v20));
    end;
end;
v0.setJumpHeight = function(v23, v24, v25)
    local l_StarterPlayer_1 = v24:GetService("StarterPlayer");
    local l_Workspace_1 = v24:GetService("Workspace");
    local v28 = v23:getGravity(v24);
    l_StarterPlayer_1.CharacterJumpHeight = v25;
    l_StarterPlayer_1.CharacterJumpPower = l_Workspace_1:CalculateJumpPower(v28, v25);
end;
v0.getJumpPower = function(v29, v30)
    local l_StarterPlayer_2 = v30:GetService("StarterPlayer");
    local v32 = v29:getGravity(v30);
    if not v29:getUseJumpPower(v30) then
        return workspace:CalculateJumpPower(v32, v29:getJumpHeight(v30));
    else
        return l_StarterPlayer_2.CharacterJumpPower;
    end;
end;
v0.setJumpPower = function(v33, v34, v35)
    local l_StarterPlayer_3 = v34:GetService("StarterPlayer");
    l_StarterPlayer_3.CharacterJumpPower = v35;
    l_StarterPlayer_3.CharacterJumpHeight = workspace:CalculateJumpHeight(v33:getGravity(v34), v35);
end;
v0.getWalkspeed = function(_, v38)
    return v38:GetService("StarterPlayer").CharacterWalkSpeed;
end;
v0.setWalkspeed = function(_, v40, v41)
    v40:GetService("StarterPlayer").CharacterWalkSpeed = v41;
end;
v0.getMaxSlopeAngle = function(_, v43)
    return v43:GetService("StarterPlayer").CharacterMaxSlopeAngle;
end;
v0.setMaxSlopeAngle = function(_, v45, v46)
    v45:GetService("StarterPlayer").CharacterMaxSlopeAngle = v46;
end;
return v0;


return {
    decimalDelimiterByLocale = {
        de_DE = ",",
        en_US = "."
    },
    groupDelimiterByLocale = {
        de_DE = ".",
        en_US = ","
    }
};


local l_Math_0 = require(script.Parent.Parent.Parent.Parent.Packages.Framework).Util.Math;
local l_decimalDelimiterByLocale_0 = require(script.Parent.delimitersByLocaleId).decimalDelimiterByLocale;
local l_StudioService_0 = game:GetService("StudioService");
local l_StudioGameSettingsWorldPageFormatNumbersForGerman_0 = game:GetFastFlag("StudioGameSettingsWorldPageFormatNumbersForGerman");
local function v6(v4, v5)
    assert(l_StudioGameSettingsWorldPageFormatNumbersForGerman_0);
    return string.gsub(v4, "%.", v5);
end;
local function v8(v7)
    assert(l_StudioGameSettingsWorldPageFormatNumbersForGerman_0);
    return v6(v7, l_decimalDelimiterByLocale_0[l_StudioService_0.StudioLocaleId] or ".");
end;
return function(v9)
    if not l_StudioGameSettingsWorldPageFormatNumbersForGerman_0 then
        return (tostring(l_Math_0.round(v9, 3)));
    else
        return v8((tostring(l_Math_0.round(v9, 3))));
    end;
end;


local l_decimalDelimiterByLocale_0 = require(script.Parent.delimitersByLocaleId).decimalDelimiterByLocale;
local l_StudioService_0 = game:GetService("StudioService");
local function v5(v2, v3, v4)
    if v3 == "." then
        v3 = "%.";
    end;
    return v2:gsub("(.*)" .. v3 .. "(.*)", "%1" .. v4 .. "%2");
end;
local function v7(v6)
    return v5(v6, l_decimalDelimiterByLocale_0[l_StudioService_0.StudioLocaleId] or ".", ".");
end;
return function(v8)
    return v7(v8);
end;


local l_Parent_0 = script.Parent;
local l_Parent_1 = script.Parent.Parent.Parent;
local v2 = require(l_Parent_1.Packages.Roact);
local v3 = require(l_Parent_1.Packages.RoactRodux);
local v4 = require(l_Parent_1.Packages.Framework);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v7 = require(l_Parent_0.ContextServices.WorldRootPhysics);
local v8 = require(l_Parent_1.Src.Actions.AddChange);
local v9 = require(l_Parent_0.Util.formatNumberForDisplay);
local v10 = require(l_Parent_1.Src.Components.SettingsPages.SettingsPage);
local v11 = require(l_Parent_0.Components.PresetsBar);
local v12 = require(l_Parent_0.Components.JumpSelect);
local v13 = require(l_Parent_0.Components.NumberInputRow);
local l_UI_0 = v4.UI;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_TitledFrame_0 = l_UI_0.TitledFrame;
local l_Separator_0 = l_UI_0.Separator;
local l_Name_0 = script.Name;
local function v29(v19, v20)
    local l_game_0 = v19:getState().Metadata.game;
    local l_worldRootPhysicsController_0 = v20.worldRootPhysicsController;
    return {
        function(v23)
            v23.workspaceGravity = l_worldRootPhysicsController_0:getGravity(l_game_0);
        end,
        function(v24)
            v24.workspaceUseJumpPower = l_worldRootPhysicsController_0:getUseJumpPower(l_game_0);
        end,
        function(v25)
            v25.workspaceJumpPower = l_worldRootPhysicsController_0:getJumpPower(l_game_0);
        end,
        function(v26)
            v26.workspaceJumpHeight = l_worldRootPhysicsController_0:getJumpHeight(l_game_0);
        end,
        function(v27)
            v27.workspaceWalkSpeed = l_worldRootPhysicsController_0:getWalkspeed(l_game_0);
        end,
        function(v28)
            v28.workspaceMaxSlopeAngle = l_worldRootPhysicsController_0:getMaxSlopeAngle(l_game_0);
        end
    };
end;
local function v41(v30, v31)
    local v32 = v30:getState();
    local l_game_1 = v32.Metadata.game;
    local l_worldRootPhysicsController_1 = v31.worldRootPhysicsController;
    return {
        function()
            local l_workspaceUseJumpPower_0 = v32.Settings.Changed.workspaceUseJumpPower;
            if l_workspaceUseJumpPower_0 ~= nil then
                l_worldRootPhysicsController_1:setUseJumpPower(l_game_1, l_workspaceUseJumpPower_0);
            end;
            if not l_worldRootPhysicsController_1:getUseJumpPower(l_game_1) then
                local l_workspaceJumpHeight_0 = v32.Settings.Changed.workspaceJumpHeight;
                if l_workspaceJumpHeight_0 ~= nil then
                    l_worldRootPhysicsController_1:setJumpHeight(l_game_1, l_workspaceJumpHeight_0);
                end;
            else
                local l_workspaceJumpPower_0 = v32.Settings.Changed.workspaceJumpPower;
                if l_workspaceJumpPower_0 ~= nil then
                    l_worldRootPhysicsController_1:setJumpPower(l_game_1, l_workspaceJumpPower_0);
                    return ;
                end;
            end;
        end,
        function()
            local l_workspaceGravity_0 = v32.Settings.Changed.workspaceGravity;
            if l_workspaceGravity_0 ~= nil then
                l_worldRootPhysicsController_1:setGravity(l_game_1, l_workspaceGravity_0);
            end;
        end,
        function()
            local l_workspaceWalkSpeed_0 = v32.Settings.Changed.workspaceWalkSpeed;
            if l_workspaceWalkSpeed_0 ~= nil then
                l_worldRootPhysicsController_1:setWalkspeed(l_game_1, l_workspaceWalkSpeed_0);
            end;
        end,
        function()
            local l_workspaceMaxSlopeAngle_0 = v32.Settings.Changed.workspaceMaxSlopeAngle;
            if l_workspaceMaxSlopeAngle_0 ~= nil then
                l_worldRootPhysicsController_1:setMaxSlopeAngle(l_game_1, l_workspaceMaxSlopeAngle_0);
            end;
        end
    };
end;
local function v44(v42, _)
    return {
        WorkspaceUseJumpPower = v42("workspaceUseJumpPower"),
        WorkspaceJumpPower = v42("workspaceJumpPower"),
        WorkspaceJumpHeight = v42("workspaceJumpHeight"),
        WorkspaceGravity = v42("workspaceGravity"),
        WorkspaceWalkSpeed = v42("workspaceWalkSpeed"),
        WorkspaceMaxSlopeAngle = v42("workspaceMaxSlopeAngle")
    };
end;
local function v46(v45)
    return {
        WorkspaceUseJumpPowerChanged = v45("workspaceUseJumpPower"),
        WorkspaceJumpPowerChanged = v45("workspaceJumpPower"),
        WorkspaceJumpHeightChanged = v45("workspaceJumpHeight"),
        WorkspaceGravityChanged = v45("workspaceGravity"),
        WorkspaceWalkSpeedChanged = v45("workspaceWalkSpeed"),
        WorkspaceMaxSlopeAngleChanged = v45("workspaceMaxSlopeAngle")
    };
end;
local v47 = v2.PureComponent:extend("World");
v47.render = function(v48)
    return v2.createElement(v10, {
        SettingsLoadJobs = v29,
        SettingsSaveJobs = v41,
        Title = v48.props.Localization:getText("General", "Category" .. l_Name_0),
        PageId = l_Name_0,
        CreateChildren = function()
            local l_props_0 = v48.props;
            local l_Localization_0 = l_props_0.Localization;
            local v51 = l_props_0.WorldRootPhysics:get();
            local v52 = l_props_0.WorkspaceGravity or 0;
            local l_WorkspaceGravityChanged_0 = l_props_0.WorkspaceGravityChanged;
            local l_WorkspaceUseJumpPower_0 = l_props_0.WorkspaceUseJumpPower;
            local l_WorkspaceUseJumpPowerChanged_0 = l_props_0.WorkspaceUseJumpPowerChanged;
            local v56 = l_props_0.WorkspaceWalkSpeed or 0;
            local l_WorkspaceWalkSpeedChanged_0 = l_props_0.WorkspaceWalkSpeedChanged;
            local v58 = l_props_0.WorkspaceMaxSlopeAngle or 0;
            local l_WorkspaceMaxSlopeAngleChanged_0 = l_props_0.WorkspaceMaxSlopeAngleChanged;
            local v60 = nil;
            local v61 = nil;
            local l_WorkspaceJumpPowerChanged_0 = l_props_0.WorkspaceJumpPowerChanged;
            local l_WorkspaceJumpHeightChanged_0 = l_props_0.WorkspaceJumpHeightChanged;
            if not l_WorkspaceUseJumpPower_0 then
                v60 = l_props_0.WorkspaceJumpHeight or 0;
                v61 = v51.calculateJumpPower(v52, v60);
            else
                v61 = l_props_0.WorkspaceJumpPower or 0;
                v60 = v51.calculateJumpHeight(v52, v61);
            end;
            return {
                Presets = v2.createElement(v11, {
                    LayoutOrder = 1,
                    ApplyPreset = function(v64)
                        local v65 = v64.Gravity or v52;
                        local v66 = v64.JumpPower or v61;
                        local v67 = v64.Walkspeed or v56;
                        local v68 = v64.MaxSlopeAngle or v58;
                        l_WorkspaceGravityChanged_0(v65);
                        l_WorkspaceUseJumpPowerChanged_0(true);
                        l_WorkspaceJumpPowerChanged_0(v66);
                        l_WorkspaceJumpHeightChanged_0(v51.calculateJumpHeight(v65, v66));
                        l_WorkspaceWalkSpeedChanged_0(v67);
                        l_WorkspaceMaxSlopeAngleChanged_0(v68);
                    end
                }),
                Separator1 = v2.createElement(l_Separator_0, {
                    LayoutOrder = 2
                }),
                Gravity = v2.createElement(v13, {
                    LayoutOrder = 3,
                    Title = l_Localization_0:getText("General", "TitleGravity"),
                    Label = l_Localization_0:getText("General", "GravityWorkspaceGravity"),
                    Value = v52,
                    MinValue = 0,
                    MaxValue = 1000,
                    OnUpdate = function(v69)
                        l_WorkspaceGravityChanged_0(v69);
                        if not l_WorkspaceUseJumpPower_0 then
                            l_WorkspaceJumpPowerChanged_0(v51.calculateJumpPower(v69, v60));
                            return ;
                        else
                            l_WorkspaceJumpHeightChanged_0(v51.calculateJumpHeight(v69, v61));
                            return ;
                        end;
                    end,
                    UnitsFormatFunction = function(v70)
                        return l_Localization_0:getText("General", "UnitsMetersPerSecondSquared1", {
                            v9(v70)
                        });
                    end
                }),
                Separator2 = v2.createElement(l_Separator_0, {
                    LayoutOrder = 4
                }),
                JumpSelect = v2.createElement(v12, {
                    LayoutOrder = 5,
                    UseJumpPower = l_WorkspaceUseJumpPower_0,
                    JumpPower = v61,
                    JumpHeight = v60,
                    SetUseJumpPower = l_WorkspaceUseJumpPowerChanged_0,
                    SetJumpPower = function(v71)
                        l_WorkspaceJumpPowerChanged_0(v71);
                        l_WorkspaceJumpHeightChanged_0(v51.calculateJumpHeight(v52, v71));
                    end,
                    SetJumpHeight = function(v72)
                        l_WorkspaceJumpHeightChanged_0(v72);
                        l_WorkspaceJumpPowerChanged_0(v51.calculateJumpPower(v52, v72));
                    end
                }),
                WalkSpeed = v2.createElement(v13, {
                    LayoutOrder = 6,
                    Title = l_Localization_0:getText("General", "TitleWalk"),
                    Label = l_Localization_0:getText("General", "WalkSpeed"),
                    Value = v56,
                    MinValue = 0,
                    MaxValue = math.huge,
                    OnUpdate = l_WorkspaceWalkSpeedChanged_0,
                    UnitsFormatFunction = function(v73)
                        return l_Localization_0:getText("General", "UnitsMetersPerSecond1", {
                            v9(v73)
                        });
                    end
                }),
                JumpDistance = v2.createElement(l_TitledFrame_0, {
                    LayoutOrder = 7,
                    Title = ""
                }, {
                    JumpDistanceLabel = v2.createElement(l_TextLabel_0, {
                        AutomaticSize = Enum.AutomaticSize.XY,
                        LayoutOrder = 1,
                        Style = "Normal",
                        Text = l_Localization_0:getText("General", "JumpDistance")
                    }),
                    JumpDistanceValue = v2.createElement(l_TextLabel_0, {
                        AutomaticSize = Enum.AutomaticSize.XY,
                        LayoutOrder = 2,
                        Style = "SubText",
                        Text = v9(v51.calculateJumpDistance(v52, v61, v56))
                    }),
                    JumpDistanceMetricValue = v2.createElement(l_TextLabel_0, {
                        AutomaticSize = Enum.AutomaticSize.XY,
                        LayoutOrder = 3,
                        Style = "SubText",
                        Text = l_Localization_0:getText("General", "UnitsMeters1", {
                            v9(v51.convertStudsToMeters(v51.calculateJumpDistance(v52, v61, v56)))
                        })
                    })
                }),
                MaxSlopeAngle = v2.createElement(v13, {
                    LayoutOrder = 8,
                    Title = l_Localization_0:getText("General", "TitleSlope"),
                    Label = l_Localization_0:getText("General", "SlopeAngle"),
                    Value = v58,
                    MinValue = 0,
                    MaxValue = 89,
                    OnUpdate = l_WorkspaceMaxSlopeAngleChanged_0,
                    UnitsFormatFunction = nil
                })
            };
        end
    });
end;
v47 = l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    WorldRootPhysics = v7
})(v47);
local v74 = require(l_Parent_1.Src.Networking.settingFromState);
v47 = v3.connect(function(v75, _)
    if v75 then
        return (v44(function(v77)
            return v74(v75.Settings, v77);
        end, v75));
    else
        return ;
    end;
end, function(v78)
    return (v46(function(v79)
        return function(v80)
            v78(v8(v79, v80));
        end;
    end));
end)(v47);
v47.LocalizationId = l_Name_0;
return v47;


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0, v1)
    return {
        setting = v0,
        value = v1
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        errors = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        key = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        settings = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        error = v0
    };
end);


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Action_0 = require(l_Parent_0.Packages.Framework).Util.Action;
local v2 = require(l_Parent_0.Src.Util.LoadState);
local v3 = 0;
local v4 = 0;
for _, v6 in pairs(v2) do
    v3 = math.min(v3, v6);
    v4 = math.max(v4, v6);
end;
return l_Action_0(script.Name, function(v7, v8)
    assert(typeof(v7) == "string", string.format(script.Name .. " requires componentName to be a string, not %s", (typeof(v7))));
    local v9 = false;
    if typeof(v8) == "number" then
        v9 = false;
        if v3 <= v8 then
            v9 = v8 <= v4;
        end;
    end;
    assert(v9, string.format(script.Name .. " requires loadState to be a LoadState, not %s", (typeof(v8))));
    return {
        componentName = v7,
        loadState = v8
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    assert(typeof(v0) == "table", script.Name .. " requires friends to be a table, not " .. typeof(v0));
    for _, v2 in ipairs(v0) do
        assert(typeof(v2) == "number", script.Name .. " requires a table of numbers for friends, not " .. typeof(v2));
    end;
    return {
        creatorFriends = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    assert(typeof(v0) == "number", script.Name .. " requires creatorId to be a number, not " .. typeof(v0));
    return {
        creatorId = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    assert(typeof(v0) == "string", script.Name .. " requires creatorName to be a string, not " .. typeof(v0));
    return {
        creatorName = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    local v1 = false;
    if typeof(v0) == "EnumItem" then
        v1 = v0.EnumType == Enum.CreatorType;
    end;
    assert(v1, script.Name .. " requires creatorType to be an Enum.CreatorType, not " .. typeof(v0));
    return {
        creatorType = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        currentStatus = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    local v1 = true;
    if type(v0) ~= "number" then
        v1 = type(v0) == "nil";
    end;
    assert(v1, string.format("SetEditDevProductId requires a number or nil, not %s", (type(v0))));
    return {
        editDevProductId = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    assert(type(v0) == "number", string.format("SetAssets requires a number, not %s", (type(v0))));
    return {
        editPlaceId = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    local v1 = false;
    if typeof(v0) == "Instance" then
        v1 = v0:IsA("DataModel");
    end;
    assert(v1, string.format(script.Name .. " requires game to be a DataModel, not %s", (typeof(v0))));
    return {
        game = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    assert(typeof(v0) == "number", string.format(script.Name .. " requires gameId to be a number, not %s", (typeof(v0))));
    return {
        gameId = v0
    };
end);


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Action_0 = require(l_Parent_0.Packages.Framework).Util.Action;
local v2 = require(l_Parent_0.Src.Util.LoadState);
local v3 = 0;
local v4 = 0;
for _, v6 in pairs(v2) do
    v3 = math.min(v3, v6);
    v4 = math.max(v4, v6);
end;
return l_Action_0(script.Name, function(v7, v8)
    assert(typeof(v7) == "string", string.format(script.Name .. " requires pageId to be a string, not %s", (typeof(v7))));
    local v9 = false;
    if typeof(v8) == "number" then
        v9 = false;
        if v3 <= v8 then
            v9 = v8 <= v4;
        end;
    end;
    assert(v9, string.format(script.Name .. " requires loadState to be a LoadState, not %s", (typeof(v8))));
    return {
        pageId = v7,
        loadState = v8
    };
end);


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Action_0 = require(l_Parent_0.Packages.Framework).Util.Action;
local v2 = require(l_Parent_0.Src.Util.SaveState);
local v3 = 0;
local v4 = 0;
for _, v6 in pairs(v2) do
    v3 = math.min(v3, v6);
    v4 = math.max(v4, v6);
end;
return l_Action_0(script.Name, function(v7, v8)
    assert(typeof(v7) == "string", string.format(script.Name .. " requires pageId to be a string, not %s", (typeof(v7))));
    local v9 = false;
    if typeof(v8) == "number" then
        v9 = false;
        if v3 <= v8 then
            v9 = v8 <= v4;
        end;
    end;
    assert(v9, string.format(script.Name .. " requires loadState to be a LoadState, not %s", (typeof(v8))));
    return {
        pageId = v7,
        saveState = v8
    };
end);


local v0 = require(script.Parent.Parent.Parent.Parent.Packages.Roact);
local l_ContentProvider_0 = game:GetService("ContentProvider");
local v2 = {
    GroupIcon = {
        Vector2.new(150, 150),
        Vector2.new(420, 420)
    },
    AvatarHeadShot = {
        Vector2.new(48, 48),
        Vector2.new(60, 60),
        Vector2.new(150, 150)
    },
    Avatar = {
        Vector2.new(100, 100),
        Vector2.new(352, 352),
        Vector2.new(720, 720)
    },
    GameIcon = {
        Vector2.new(50, 50),
        Vector2.new(128, 128),
        Vector2.new(150, 150),
        Vector2.new(256, 256),
        Vector2.new(512, 512)
    },
    BadgeIcon = {
        Vector2.new(150, 150)
    },
    GamePass = {
        Vector2.new(150, 150)
    },
    Asset = {
        Vector2.new(150, 150),
        Vector2.new(420, 420)
    },
    BundleThumbnail = {
        Vector2.new(150, 150),
        Vector2.new(420, 420)
    },
    Outfit = {
        Vector2.new(150, 150),
        Vector2.new(420, 420)
    }
};
local function v9(v3, v4)
    local v5 = v2[v3];
    local v6 = v5[1];
    for v7 = 2, #v5 do
        local v8 = v5[v7];
        if math.abs(v4.Magnitude - v8.Magnitude) < math.abs(v4.Magnitude - v6.Magnitude) then
            v6 = v8;
        end;
    end;
    return v6;
end;
local function _(v10, v11, v12)
    return "rbxthumb://type=" .. v10 .. "&id=" .. v11 .. "&w=" .. v12.X .. "&h=" .. v12.Y;
end;
local function _(v14, v15)
    return "https://www.roblox.com/asset-thumbnail/image?width=" .. v15.X .. "&height=" .. v15.Y .. "&format=png&assetId=" .. v14;
end;
local v17 = v0.Component:extend(script.Name);
v17.init = function(v18)
    v18.state = {
        fetchStatus = nil,
        contentId = nil
    };
    v18.ref = v0.createRef();
    v18.fetchingContentId = nil;
    v18.currentId = nil;
    v18.currentThumbnailType = nil;
    v18.updateThumbnail = function()
        local l_props_0 = v18.props;
        local l_ThumbnailType_0 = l_props_0.ThumbnailType;
        local l_Id_0 = l_props_0.Id;
        local l_UseAssetThumbnailUrl_0 = l_props_0.UseAssetThumbnailUrl;
        local l_ref_0 = v18.ref;
        if l_ref_0:getValue() then
            local v24 = v9(l_ThumbnailType_0, l_ref_0:getValue().AbsoluteSize);
            local v25 = nil;
            v25 = if not l_UseAssetThumbnailUrl_0 then "rbxthumb://type=" .. l_ThumbnailType_0 .. "&id=" .. l_Id_0 .. "&w=" .. v24.X .. "&h=" .. v24.Y else "https://www.roblox.com/asset-thumbnail/image?width=" .. v24.X .. "&height=" .. v24.Y .. "&format=png&assetId=" .. l_Id_0;
            if not (l_Id_0 == v18.currentId) or l_ThumbnailType_0 ~= v18.currentThumbnailType then
                v18.currentId = l_Id_0;
                v18.currentThumbnailType = l_ThumbnailType_0;
                v18:setState({
                    fetchStatus = v0.None,
                    contentId = v25
                });
            end;
            if v25 ~= v18.state.contentId then
                v18.loadThumbnail(v25);
            end;
            return ;
        else
            return ;
        end;
    end;
    v18.loadThumbnail = function(v26)
        if v26 == v18.fetchingContentId then
            return ;
        else
            v18.fetchingContentId = v26;
            coroutine.wrap(function()
                l_ContentProvider_0:PreloadAsync({
                    v26
                }, function(v27, v28)
                    local v29 = v18.ref:getValue() ~= nil;
                    if not (not (v18.fetchingContentId == v27) or not v29) then
                        v18.fetchingContentId = nil;
                        v18:setState({
                            fetchStatus = v28,
                            contentId = v27
                        });
                    end;
                end);
            end)();
            return ;
        end;
    end;
end;
v17.didUpdate = function(v30, v31, _)
    local l_props_1 = v30.props;
    local l_Id_1 = v31.Id;
    local l_Id_2 = l_props_1.Id;
    local l_ThumbnailType_1 = v31.ThumbnailType;
    local l_ThumbnailType_2 = l_props_1.ThumbnailType;
    if not (l_Id_1 == l_Id_2) or l_ThumbnailType_1 ~= l_ThumbnailType_2 then
        v30.updateThumbnail();
    end;
end;
v17.didMount = function(v38)
    v38.updateThumbnail();
end;
v17.render = function(v39)
    local l_props_2 = v39.props;
    local l_state_0 = v39.state;
    return v0.createElement("Frame", {
        BackgroundTransparency = 1,
        Size = UDim2.fromScale(1, 1),
        [v0.Ref] = v39.ref,
        [v0.Change.AbsoluteSize] = v39.updateThumbnail
    }, {
        Thumbnail = l_props_2.RenderContents(l_state_0.contentId, l_state_0.fetchStatus)
    });
end;
return v17;