local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local v5 = require(l_Parent_0.Packages.Dash);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Stylizer_0 = v4.Style.Stylizer;
local l_UI_0 = v4.UI;
local l_Checkbox_0 = l_UI_0.Checkbox;
local l_DropdownMenu_0 = l_UI_0.DropdownMenu;
local l_IconButton_0 = l_UI_0.IconButton;
local l_Pane_0 = l_UI_0.Pane;
local l_ScrollingFrame_0 = l_UI_0.ScrollingFrame;
local l_LayoutOrderIterator_0 = v4.Util.LayoutOrderIterator;
local v18 = require(l_Parent_0.Src.Actions);
local v19 = require(l_Parent_0.Src.Util.GetUniqueGroupName);
local v20 = require(script.Parent.Icon);
local v21 = require(l_Parent_0.Src.TagManager);
local v22 = require(script.Parent.TagSettingRow);
local l_TagEditorShowTextSeparately_0 = game:GetFastFlag("TagEditorShowTextSeparately");
local v24 = v2.PureComponent:extend("TagSettingsListView");
v24.init = function(v25)
    if l_TagEditorShowTextSeparately_0 then
        v25.onShowTextRowClicked = function()
            local l_tag_0 = v25.props.tag;
            v21.Get():SetShowText(l_tag_0.Name, not l_tag_0.ShowText);
        end;
    end;
    v25.onAlwaysOntopRowClicked = function()
        local l_tag_1 = v25.props.tag;
        v21.Get():SetAlwaysOnTop(l_tag_1.Name, not l_tag_1.AlwaysOnTop);
    end;
    v25.onColorRowClicked = function()
        local l_props_0 = v25.props;
        l_props_0.openColorPicker(l_props_0.tag.Name);
    end;
    v25.onIconRowClicked = function()
        local l_props_1 = v25.props;
        l_props_1.openIconPicker(l_props_1.tag.Name);
    end;
    v25.onTaggedInstancesRowClicked = function()
        v21.Get():SelectAll(v25.props.tag.Name);
    end;
    v25.onVisualizeRowClicked = function()
        v25:setState({
            VisualizeAsDropdownHidden = false
        });
    end;
    v25.onGroupRowClicked = function()
        v25:setState({
            GroupDropdownHidden = false
        });
    end;
    v25.onVisualizeDropdownItemCloseMenu = function()
        v25:setState(function(_)
            return {
                VisualizeAsDropdownHidden = true
            };
        end);
    end;
    v25.onGroupDropdownItemCloseMenu = function()
        v25:setState(function(_)
            return {
                GroupDropdownHidden = true
            };
        end);
    end;
    v25:setState({
        VisualizeAsDropdownHidden = true,
        GroupDropdownHidden = true
    });
end;
v24.render = function(v32)
    local l_props_2 = v32.props;
    local l_Localization_1 = l_props_2.Localization;
    local l_TagSettingsListView_0 = l_props_2.Stylizer.TagSettingsListView;
    local v36 = l_LayoutOrderIterator_0.new();
    local l_tag_2 = l_props_2.tag;
    local v38 = l_tag_2 ~= nil;
    local v39 = l_Localization_1:getText("Groups", "None");
    local v40 = l_Localization_1:getText("Groups", "NewGroup");
    local function v41()
        return v2.createElement(l_IconButton_0, {
            RightIcon = l_TagSettingsListView_0.TaggedInstancesRow.Icon,
            OnClick = v32.onTaggedInstancesRowClicked
        });
    end;
    local function v42()
        return v2.createElement(v20, {
            Name = l_tag_2.Icon,
            OnClick = v32.onIconRowClicked
        });
    end;
    local function v45()
        return v2.createElement(l_Pane_0, {
            Size = l_TagSettingsListView_0.GroupRow.Size
        }, {
            Button = v2.createElement(l_IconButton_0, {
                RightIcon = l_TagSettingsListView_0.GroupRow.Icon,
                OnClick = v32.onGroupRowClicked
            }),
            DropdownMenu = v2.createElement(l_DropdownMenu_0, {
                Hide = v32.state.GroupDropdownHidden,
                OnItemActivated = function(v43, v44)
                    if v44 == 1 then
                        if not l_tag_2.Group then
                            v21.Get():SetGroup(l_tag_2.Name, (v19(l_Localization_1:getText("Info", "NewGroup"))));
                        else
                            v21.Get():SetGroup(l_tag_2.Name, "");
                        end;
                    else
                        v21.Get():SetGroup(l_tag_2.Name, v43);
                    end;
                    v32.onGroupDropdownItemCloseMenu();
                end,
                OnFocusLost = v32.onGroupDropdownItemCloseMenu,
                PlaceholderText = l_tag_2.Group,
                Width = l_TagSettingsListView_0.GroupRow.DropDownWidth,
                ItemHeight = l_TagSettingsListView_0.GroupRow.ItemHeight,
                MaxHeight = l_TagSettingsListView_0.GroupRow.MaxHeight,
                Icons = {
                    if not l_tag_2.Group then l_TagSettingsListView_0.GroupRow.NewGroupIcon else l_TagSettingsListView_0.GroupRow.UnassignIcon
                },
                Items = v5.append({
                    if not l_tag_2.Group then v40 else v39
                }, l_props_2.groups),
                Priority = 2
            })
        });
    end;
    local function v46()
        return v2.createElement(l_IconButton_0, {
            RightIcon = l_TagSettingsListView_0.ColorRow.Icon,
            IconColor = l_tag_2.Color,
            OnClick = v32.onColorRowClicked
        });
    end;
    local v47 = if not l_TagEditorShowTextSeparately_0 then nil else function()
        return v2.createElement(l_Checkbox_0, {
            Checked = l_tag_2.ShowText,
            OnClick = v32.onShowTextRowClicked
        });
    end;
    local function v48()
        return v2.createElement(l_Checkbox_0, {
            Checked = l_tag_2.AlwaysOnTop,
            OnClick = v32.onAlwaysOntopRowClicked
        });
    end;
    local function v56()
        local v49 = nil;
        v49 = if not l_TagEditorShowTextSeparately_0 then {
            "Box",
            "Sphere",
            "Outline",
            "Text",
            "Icon"
        } else {
            "Box",
            "Sphere",
            "Outline",
            "Icon",
            "None"
        };
        local v50 = nil;
        v50 = if not l_TagEditorShowTextSeparately_0 then {
            l_Localization_1:getText("VisualizeOptions", "Box"),
            l_Localization_1:getText("VisualizeOptions", "Sphere"),
            l_Localization_1:getText("VisualizeOptions", "Outline"),
            l_Localization_1:getText("VisualizeOptions", "Text"),
            l_Localization_1:getText("VisualizeOptions", "Icon")
        } else {
            l_Localization_1:getText("VisualizeOptions", "Box"),
            l_Localization_1:getText("VisualizeOptions", "Sphere"),
            l_Localization_1:getText("VisualizeOptions", "Outline"),
            l_Localization_1:getText("VisualizeOptions", "Icon"),
            l_Localization_1:getText("VisualizeOptions", "None")
        };
        local v52 = v5.findIndex(v49, function(v51)
            return v51 == l_tag_2.DrawType;
        end);
        local v53 = not v52 and "" or v50[v52];
        return v2.createElement(l_Pane_0, {
            Size = l_TagSettingsListView_0.VisualizeAsRow.Size,
            Style = "BorderBox"
        }, {
            Button = v2.createElement(l_IconButton_0, {
                Text = v53,
                RightIcon = l_TagSettingsListView_0.VisualizeAsRow.Icon,
                OnClick = v32.onVisualizeRowClicked,
                Size = l_TagSettingsListView_0.VisualizeAsRow.Size
            }),
            DropdownMenu = v2.createElement(l_DropdownMenu_0, {
                Hide = v32.state.VisualizeAsDropdownHidden,
                OnItemActivated = function(_, v55)
                    v21.Get():SetDrawType(l_tag_2.Name, v49[v55]);
                    v32.onVisualizeDropdownItemCloseMenu();
                end,
                OnFocusLost = v32.onVisualizeDropdownItemCloseMenu,
                PlaceholderText = v53,
                Width = l_TagSettingsListView_0.VisualizeAsRow.DropDownWidth,
                ItemHeight = l_TagSettingsListView_0.VisualizeAsRow.ItemHeight,
                MaxHeight = l_TagSettingsListView_0.VisualizeAsRow.MaxHeight,
                Priority = 2,
                Items = v50
            })
        });
    end;
    if not v38 then
        return nil;
    else
        return (v2.createElement(l_ScrollingFrame_0, {
            CanvasSize = l_TagSettingsListView_0.CanvasSize,
            Size = l_TagSettingsListView_0.Size,
            LayoutOrder = l_props_2.LayoutOrder,
            Layout = Enum.FillDirection.Vertical,
            AutomaticCanvasSize = Enum.AutomaticSize.None,
            Padding = l_TagSettingsListView_0.Padding,
            Spacing = l_TagSettingsListView_0.Spacing
        }, {
            TaggedInstancesRow = v2.createElement(v22, {
                LayoutOrder = v36:getNextOrder(),
                ControlSize = l_TagSettingsListView_0.TaggedInstancesRow.Size,
                Text = l_Localization_1:getText("Info", "SelectInExplorer"),
                TooltipText = l_Localization_1:getText("Tooltip", "SelectInExplorer"),
                OnClick = v32.onTaggedInstancesRowClicked,
                Control = v41
            }),
            IconRow = v2.createElement(v22, {
                LayoutOrder = v36:getNextOrder(),
                ControlSize = l_TagSettingsListView_0.IconRow.Size,
                Text = l_Localization_1:getText("Info", "Icon"),
                TooltipText = l_Localization_1:getText("Tooltip", "IconPicker"),
                OnClick = v32.onIconRowClicked,
                Control = v42
            }),
            GroupRow = v2.createElement(v22, {
                LayoutOrder = v36:getNextOrder(),
                ControlSize = l_TagSettingsListView_0.GroupRow.Size,
                Text = l_Localization_1:getText("Info", "Group") .. ": " .. if not l_tag_2.Group then v39 else l_tag_2.Group,
                TooltipText = l_Localization_1:getText("Tooltip", "GroupPicker"),
                OnClick = v32.onGroupRowClicked,
                Control = v45
            }),
            ColorRow = v2.createElement(v22, {
                LayoutOrder = v36:getNextOrder(),
                ControlSize = l_TagSettingsListView_0.ColorRow.Size,
                Text = l_Localization_1:getText("Info", "Color"),
                TooltipText = l_Localization_1:getText("Tooltip", "ColorPicker"),
                OnClick = v32.onColorRowClicked,
                Control = v46
            }),
            AlwaysOnTopRow = v2.createElement(v22, {
                LayoutOrder = v36:getNextOrder(),
                ControlSize = l_TagSettingsListView_0.AlwaysOnTopRow.Size,
                Text = l_Localization_1:getText("Info", "AlwaysOnTop"),
                TooltipText = l_Localization_1:getText("Tooltip", "AlwaysOnTop"),
                OnClick = v32.onAlwaysOntopRowClicked,
                Control = v48
            }),
            ShowTextRow = if not l_TagEditorShowTextSeparately_0 then nil else v2.createElement(v22, {
                LayoutOrder = v36:getNextOrder(),
                ControlSize = l_TagSettingsListView_0.ShowTextRow.Size,
                Text = l_Localization_1:getText("Info", "ShowText"),
                TooltipText = l_Localization_1:getText("Tooltip", "ShowText"),
                OnClick = v32.onShowTextRowClicked,
                Control = v47
            }),
            VisualizeAsRow = v2.createElement(v22, {
                LayoutOrder = v36:getNextOrder(),
                ControlSize = l_TagSettingsListView_0.VisualizeAsRow.Size,
                Text = l_Localization_1:getText("Info", "VisualizeAs"),
                TooltipText = l_Localization_1:getText("Tooltip", "VisualizeAs"),
                OnClick = v32.onVisualizeRowClicked,
                Control = v56
            })
        }));
    end;
end;
return v3.connect(function(v57, _)
    local v59 = nil;
    for _, v61 in pairs(v57.TagData) do
        if v61.Name == v57.TagMenu then
            v59 = v61;
            break;
        end;
    end;
    for _, v63 in pairs(v57.UnknownTags) do
        if v63.Name == v57.TagMenu then
            v59 = v63;
            break;
        end;
    end;
    return {
        groups = v57.GroupData,
        tag = v59
    };
end, function(v64)
    return {
        openColorPicker = function(v65)
            v64(v18.ToggleColorPicker(v65));
        end,
        openIconPicker = function(v66)
            v64(v18.ToggleIconPicker(v66));
        end
    };
end)((l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v24)));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local l_Pane_0 = require(l_Parent_0.Packages.Framework).UI.Pane;
local v3 = require(script.Parent.TagSettingsListView);
local v4 = require(script.Parent.TagSettingsToggleButton);
local v5 = v1.PureComponent:extend("TagSettingsPane");
v5.render = function(_)
    return v1.createElement(l_Pane_0, {
        Layout = Enum.FillDirection.Vertical,
        VerticalAlignment = Enum.VerticalAlignment.Top
    }, {
        TagSettingsToggleButton = v1.createElement(v4, {
            LayoutOrder = 1
        }),
        TagSettingsList = v1.createElement(v3, {
            LayoutOrder = 2
        })
    });
end;
return v5;


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Stylizer_0 = v4.Style.Stylizer;
local l_UI_0 = v4.UI;
local l_IconButton_0 = l_UI_0.IconButton;
local l_Pane_0 = l_UI_0.Pane;
local v13 = require(l_Parent_0.Src.Actions);
local v14 = v2.PureComponent:extend("TagSettingsToggleButton");
v14.init = function(v15)
    v15.onExpandCollapseClicked = function()
        local l_props_0 = v15.props;
        l_props_0.setMinimizedSettingsPane(not l_props_0.minimizedSettingsPane);
    end;
end;
v14.render = function(v17)
    local l_props_1 = v17.props;
    local l_Localization_1 = l_props_1.Localization;
    local l_TagSettingsToggleButton_0 = l_props_1.Stylizer.TagSettingsToggleButton;
    local v21 = l_Localization_1:getText("Info", "SettingsFor");
    local v22 = l_Localization_1:getText("Info", "TagSettings");
    local l_tagMenu_0 = l_props_1.tagMenu;
    return v2.createElement(l_Pane_0, {
        Style = "SubtleBox",
        Size = l_TagSettingsToggleButton_0.Size,
        LayoutOrder = l_props_1.LayoutOrder,
        Layout = Enum.FillDirection.Horizontal,
        HorizontalAlignment = Enum.HorizontalAlignment.Left,
        Spacing = l_TagSettingsToggleButton_0.Spacing
    }, {
        ExpandCollapseButton = v2.createElement(l_IconButton_0, {
            Text = if l_tagMenu_0 ~= nil then v21 .. " " .. l_tagMenu_0 else v22,
            LeftIcon = if not l_props_1.minimizedSettingsPane then l_TagSettingsToggleButton_0.OpenArrowImage else l_TagSettingsToggleButton_0.ClosedArrowImage,
            OnClick = v17.onExpandCollapseClicked,
            Size = l_TagSettingsToggleButton_0.Size,
            AutomaticSize = Enum.AutomaticSize.X,
            BackgroundStyle = "SubtleBox"
        })
    });
end;
return v3.connect(function(v24, _)
    return {
        tagMenu = v24.TagMenu,
        minimizedSettingsPane = v24.MinimizedSettingsPane
    };
end, function(v26)
    return {
        setMinimizedSettingsPane = function(v27)
            v26(v13.SetMinimizedSettingsPane(v27));
        end
    };
end)((l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v14)));


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Stylizer_0 = v4.Style.Stylizer;
local l_UI_0 = v4.UI;
local l_IconButton_0 = l_UI_0.IconButton;
local l_Pane_0 = l_UI_0.Pane;
local l_SearchBar_0 = l_UI_0.SearchBar;
local l_LayoutOrderIterator_0 = v4.Util.LayoutOrderIterator;
local v15 = require(l_Parent_0.Src.Actions);
local v16 = require(l_Parent_0.Src.Util.GetUniqueGroupName);
local v17 = require(l_Parent_0.Src.TagManager);
local v18 = require(script.Parent.NewTagTextInput);
local v19 = require(script.Parent.TagListView);
local v20 = game:DefineFastFlag("TagEditorSearchClear", false);
local v21 = v2.PureComponent:extend("TagTopPane");
v21.init = function(v22)
    v22.onSearchRequested = function(v23)
        v22.props.setSearch(v23);
    end;
    v22.onTextChanged = function(v24)
        if v24 == "" then
            v22.props.setSearch("");
        end;
    end;
    v22.onDeleteClicked = function()
        local l_props_0 = v22.props;
        if not l_props_0.tagMenu then
            if l_props_0.groupMenu then
                v17.Get():DeleteGroup(l_props_0.groupMenu);
                l_props_0.openGroupMenu(nil);
            end;
            return ;
        else
            v17.Get():DelTag(l_props_0.tagMenu);
            l_props_0.openTagMenu(nil);
            return ;
        end;
    end;
    v22.onNewGroupClicked = function(v26)
        local l_props_1 = v22.props;
        if l_props_1.tagMenu ~= nil then
            v17.Get():SetGroup(l_props_1.tagMenu, (v16(v26:getText("Info", "NewGroup"))));
        end;
    end;
    v22.onWorldViewButtonClicked = function()
        local l_props_2 = v22.props;
        l_props_2.setWorldView(not l_props_2.worldView);
        if not l_props_2.worldView then
            l_props_2.Analytics:report("worldVisualization");
        end;
    end;
    v22.state = {
        worldViewButtonWidth = 0
    };
    v22.worldViewButtonRef = v2.createRef();
end;
v21.updateExtents = function(v29, v30)
    task.defer(function()
        local v31 = not not v29.worldViewButtonRef.current and v29.worldViewButtonRef.current.AbsoluteSize.X or 0;
        if not v30 or v30.worldViewButtonWidth ~= v31 then
            v29:setState({
                worldViewButtonWidth = v31
            });
        end;
    end);
end;
v21.didUpdate = function(v32, _, v34)
    v32:updateExtents(v34);
end;
v21.didMount = function(v35)
    v35:updateExtents();
end;
v21.render = function(v36)
    local l_props_3 = v36.props;
    local l_Localization_1 = l_props_3.Localization;
    local l_TagTopPane_0 = l_props_3.Stylizer.TagTopPane;
    local v40 = l_LayoutOrderIterator_0.new();
    local v41 = l_LayoutOrderIterator_0.new();
    local v42 = l_LayoutOrderIterator_0.new();
    local l_VisibleIcon_0 = l_props_3.Stylizer.VisibleIcon;
    local l_VisibleOffIcon_0 = l_props_3.Stylizer.VisibleOffIcon;
    local v45 = l_props_3.groupMenu or not l_props_3.tagMenu;
    local v46 = not l_props_3.tagMenu and not l_props_3.groupMenu;
    return v2.createElement(l_Pane_0, {
        Layout = Enum.FillDirection.Vertical,
        VerticalAlignment = Enum.VerticalAlignment.Top,
        LayoutOrder = 1,
        Padding = l_TagTopPane_0.Padding
    }, {
        SearchRowPane = v2.createElement(l_Pane_0, {
            Size = l_TagTopPane_0.SearchBarPaneSize,
            LayoutOrder = v40:getNextOrder(),
            Layout = Enum.FillDirection.Horizontal,
            Spacing = l_TagTopPane_0.RowSpacing
        }, {
            SearchBar = v2.createElement(l_SearchBar_0, {
                Size = l_TagTopPane_0.SearchBarSize,
                ShowSearchButton = false,
                ShowSearchIcon = true,
                LayoutOrder = v41:getNextOrder(),
                OnSearchRequested = v36.onSearchRequested,
                OnTextChanged = if not v20 then nil else v36.onTextChanged,
                Style = "Compact",
                PlaceholderText = l_Localization_1:getText("General", "Search")
            }),
            NewGroupButton = v2.createElement(l_IconButton_0, {
                BackgroundStyle = "RoundBox",
                LeftIcon = l_TagTopPane_0.NewGroupIcon,
                OnClick = function()
                    v36.onNewGroupClicked(l_Localization_1);
                end,
                LayoutOrder = v41:getNextOrder(),
                Style = v45 and "Disabled",
                Disabled = v45,
                TooltipText = if not v45 then l_Localization_1:getText("Tooltip", "NewGroupEnabled") else l_Localization_1:getText("Tooltip", "NewGroupDisabled")
            }),
            DeleteButton = v2.createElement(l_IconButton_0, {
                BackgroundStyle = "RoundBox",
                LeftIcon = l_TagTopPane_0.DeleteIcon,
                OnClick = v36.onDeleteClicked,
                LayoutOrder = v41:getNextOrder(),
                Style = v46 and "Disabled",
                Disabled = v46,
                TooltipText = if not v46 then l_Localization_1:getText("Tooltip", "DeleteEnabled") else l_Localization_1:getText("Tooltip", "DeleteDisabled")
            })
        }),
        NewTagRowPane = v2.createElement(l_Pane_0, {
            Size = l_TagTopPane_0.NewTagRowSize,
            LayoutOrder = v40:getNextOrder(),
            Layout = Enum.FillDirection.Horizontal,
            HorizontalAlignment = Enum.HorizontalAlignment.Left
        }, {
            NewTagTextInput = v2.createElement(v18, {
                WidthOffset = v36.state.worldViewButtonWidth,
                LayoutOrder = v42:getNextOrder()
            }),
            ToggleWorldViewButton = v2.createElement(l_IconButton_0, {
                BackgroundStyle = "RoundBox",
                LeftIcon = if not l_props_3.worldView then l_VisibleOffIcon_0 else l_VisibleIcon_0,
                Padding = 5,
                Spacing = 4,
                AutomaticSize = Enum.AutomaticSize.X,
                Text = l_Localization_1:getText("Info", "WorldView"),
                OnClick = v36.onWorldViewButtonClicked,
                LayoutOrder = v42:getNextOrder(),
                Size = l_TagTopPane_0.WorldViewButtonSize,
                TooltipText = l_Localization_1:getText("Tooltip", "WorldView"),
                [v2.Ref] = v36.worldViewButtonRef
            })
        }),
        TagListView = v2.createElement(v19, {
            LayoutOrder = v40:getNextOrder()
        })
    });
end;
return v3.connect(function(v47, _)
    return {
        tagMenu = v47.TagMenu,
        groupMenu = v47.GroupMenu,
        worldView = v47.WorldView,
        groupData = v47.GroupData
    };
end, function(v49)
    return {
        setSearch = function(v50)
            v49(v15.SetSearch(v50));
        end,
        openTagMenu = function(v51)
            v49(v15.OpenTagMenu(v51));
        end,
        openGroupMenu = function(v52)
            v49(v15.OpenGroupMenu(v52));
        end,
        setWorldView = function(v53)
            v49(v15.ToggleWorldView(v53));
        end
    };
end)((l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v21)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Src.Constants);
return function(v3)
    if v3.Adornee.ClassName == "Attachment" then
        return v1.createElement("BoxHandleAdornment", {
            Adornee = v3.Adornee.Parent,
            CFrame = v3.Adornee.CFrame,
            Size = v2.WorldView.BoxAdorn.Size,
            Transparency = v2.WorldView.BoxAdorn.Transparency,
            Color3 = v3.Color
        });
    else
        return v1.createElement("SelectionBox", {
            LineThickness = v2.WorldView.BoxAdorn.LineThickness,
            SurfaceTransparency = v2.WorldView.BoxAdorn.SurfaceTransparency,
            SurfaceColor3 = v3.Color,
            Adornee = v3.Adornee,
            Color3 = v3.Color,
            StudioSelectionBox = true
        });
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Src.Components.Icon);
return function(v3)
    local v4 = {};
    if #v3.Icon > 1 then
        v4.UIListLayout = v1.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Horizontal,
            Padding = UDim.new(0.125, 0)
        });
    end;
    for v5 = 1, #v3.Icon do
        v4[v5] = v1.createElement(v2, {
            Name = v3.Icon[v5],
            Size = UDim2.new(1 / #v3.Icon, 0, 1, 0),
            Style = "WorldView",
            TextScaled = true
        });
    end;
    return v1.createElement("BillboardGui", {
        Adornee = v3.Adornee,
        Size = UDim2.new(#v3.Icon, 0, 1, 0),
        SizeOffset = Vector2.new(0.5, 0.5),
        ExtentsOffsetWorldSpace = Vector3.new(1, 1, 1),
        AlwaysOnTop = v3.AlwaysOnTop
    }, v4);
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Src.Constants);
return function(v3)
    if v3.Adornee.ClassName == "Attachment" then
        return v1.createElement("BoxHandleAdornment", {
            Adornee = v3.Adornee.Parent,
            CFrame = v3.Adornee.CFrame,
            Size = v2.WorldView.OutlineAdorn.Size,
            Transparency = v2.WorldView.OutlineAdorn.Transparency,
            Color3 = v3.Color
        });
    else
        return v1.createElement("SelectionBox", {
            LineThickness = v2.WorldView.OutlineAdorn.LineThickness,
            Adornee = v3.Adornee,
            Color3 = v3.Color,
            StudioSelectionBox = true
        });
    end;
end;


local v0 = require(script.Parent.Parent.Parent.Parent.Packages.Roact);
return function(v1)
    local v2 = nil;
    local v3 = nil;
    if v1.Adornee.ClassName == "Attachment" then
        v2 = v1.Adornee.Parent;
        v3 = v1.Adornee.CFrame;
    else
        v2 = v1.Adornee;
    end;
    return v0.createElement("SphereHandleAdornment", {
        Adornee = v2,
        CFrame = v3,
        Color3 = v1.Color,
        AlwaysOnTop = v1.AlwaysOnTop,
        Transparency = 0.3,
        ZIndex = if not v1.AlwaysOnTop then nil else 1
    });
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Src.Constants);
return function(v3)
    local v4 = {};
    if #v3.TagName > 1 then
        v4.UIListLayout = v1.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder
        });
    end;
    for v5 = 1, #v3.TagName do
        local v6 = v3.TagName[v5];
        v4[v6] = v1.createElement("TextLabel", {
            LayoutOrder = v5,
            Size = UDim2.new(1, 0, 1 / #v3.TagName, 0),
            Text = v6,
            TextScaled = true,
            TextSize = 20,
            Font = Enum.Font.SourceSansBold,
            TextColor3 = v2.White,
            BackgroundTransparency = 1,
            TextXAlignment = Enum.TextXAlignment.Left,
            TextYAlignment = Enum.TextYAlignment.Bottom,
            TextStrokeTransparency = 0
        });
    end;
    return v1.createElement("BillboardGui", {
        Adornee = v3.Adornee,
        Size = UDim2.new(10, 0, #v3.TagName, 0),
        SizeOffset = Vector2.new(0.5, 0.5),
        ExtentsOffsetWorldSpace = Vector3.new(1, 1, 1),
        AlwaysOnTop = v3.AlwaysOnTop
    }, v4);
end;


local l_CollectionService_0 = game:GetService("CollectionService");
local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Src.Constants);
local v4 = require(l_Parent_0.Src.TagManager);
local v5 = require(l_Parent_0.Src.Maid);
local l_TagEditorShowTextSeparately_0 = game:GetFastFlag("TagEditorShowTextSeparately");
local v7 = v2.PureComponent:extend("WorldProvider");
local l_TagEditorExternalUpdate_0 = game:GetFastFlag("TagEditorExternalUpdate");
local function _(v9)
    local v10 = true;
    if v9.Visible ~= false then
        v10 = false;
        if v9.DrawType == "None" then
            v10 = not v9.ShowText;
        end;
    end;
    return v10;
end;
v7.init = function(v12)
    v12.state = {
        partsList = {}
    };
    v12.nextId = 0;
    v12.partIds = {};
    v12.trackedParts = {};
    v12.trackedTags = {};
    v12.instanceAddedConns = v5.new();
    v12.instanceRemovedConns = v5.new();
    v12.instanceAncestryChangedConns = v5.new();
    v12.maid = v5.new();
    v12.maid.cameraChangedConn = workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function(v13)
        v12.maid.cameraMovedConn = nil;
        if v13 then
            local l_Position_0 = v13.CFrame.Position;
            do
                local l_l_Position_0_0 = l_Position_0;
                v12.maid.cameraMovedConn = v13:GetPropertyChangedSignal("CFrame"):Connect(function()
                    local l_Position_1 = v13.CFrame.Position;
                    if v3.WorldProvider.CameraMinMovementStepForPartUpdate < (l_l_Position_0_0 - l_Position_1).Magnitude then
                        l_l_Position_0_0 = l_Position_1;
                        v12:updateParts();
                    end;
                end);
            end;
        end;
    end);
    local l_CurrentCamera_0 = workspace.CurrentCamera;
    v12.maid.cameraMovedConn = nil;
    if l_CurrentCamera_0 then
        local l_Position_2 = l_CurrentCamera_0.CFrame.Position;
        do
            local l_l_Position_2_0 = l_Position_2;
            v12.maid.cameraMovedConn = l_CurrentCamera_0:GetPropertyChangedSignal("CFrame"):Connect(function()
                local l_Position_3 = l_CurrentCamera_0.CFrame.Position;
                if v3.WorldProvider.CameraMinMovementStepForPartUpdate < (l_l_Position_2_0 - l_Position_3).Magnitude then
                    l_l_Position_2_0 = l_Position_3;
                    v12:updateParts();
                end;
            end);
        end;
    end;
end;
v7.didMount = function(v21)
    local v22 = v4.Get();
    for _, v24 in pairs(v22:GetTags()) do
        local v25 = true;
        if v24.Visible ~= false then
            v25 = false;
            if v24.DrawType == "None" then
                v25 = not v24.ShowText;
            end;
        end;
        if not v25 then
            v21:tagAdded(v24.Name);
        end;
    end;
    v21.onTagsUpdatedConn = v22:OnTagsUpdated(function(v26, v27)
        local v28 = {};
        local v29 = {};
        for _, v31 in pairs(v26) do
            local v32 = true;
            if v31.Visible ~= false then
                v32 = false;
                if v31.DrawType == "None" then
                    v32 = not v31.ShowText;
                end;
            end;
            if not v32 then
                v28[v31.Name] = v31;
            end;
        end;
        for _, v34 in pairs(v27) do
            local v35 = true;
            if v34.Visible ~= false then
                v35 = false;
                if v34.DrawType == "None" then
                    v35 = not v34.ShowText;
                end;
            end;
            if not v35 then
                if not v28[v34.Name] then
                    v29[v34.Name] = v34;
                else
                    v28[v34.Name] = nil;
                end;
            end;
        end;
        for v36 in pairs(v28) do
            v21:tagAdded(v36);
        end;
        for v37 in pairs(v29) do
            v21:tagRemoved(v37);
        end;
        v21:updateParts();
    end);
    v21:updateParts();
end;
local function v45(v38, v39, v40, v41)
    local v42 = 1;
    local v43 = #v38;
    while v43 - v42 > 1 do
        local v44 = math.floor(v42 + (v43 - v42) / 2);
        if not v40(v39, v38[v44]) then
            v42 = v44 + 1;
        else
            v43 = v44;
        end;
    end;
    if v42 < v41 then
        table.insert(v38, v42, v39);
        if v41 <= v43 then
            table.remove(v38, v43);
        end;
    end;
end;
isInFrontOf = function(v46, v47, v48)
    return (v47 - v46):Dot(v48) > 0;
end;
v7.collectParts = function(v49)
    local v50 = {};
    local l_CurrentCamera_1 = workspace.CurrentCamera;
    if l_CurrentCamera_1 then
        local l_Position_4 = l_CurrentCamera_1.CFrame.Position;
        local function v55(v53, v54)
            return v54.AngularSize < v53.AngularSize;
        end;
        local function _(v56, v57)
            return v57.Magnitude / (v56 - l_Position_4).Magnitude;
        end;
        for v59, _ in pairs(v49.trackedParts) do
            local l_ClassName_0 = v59.ClassName;
            local v62 = nil;
            if l_ClassName_0 == "Model" then
                v62 = v59:GetPivot().Position;
                if isInFrontOf(l_CurrentCamera_1.CFrame.Position, v62, l_CurrentCamera_1.CFrame.LookVector) then
                    v45(v50, {
                        AngularSize = v59:GetExtentsSize().Magnitude / (v62 - l_Position_4).Magnitude,
                        Instance = v59
                    }, v55, v3.WorldProvider.AdornedPartLimit);
                end;
            elseif l_ClassName_0 == "Attachment" then
                v62 = v59.WorldPosition;
                if isInFrontOf(l_CurrentCamera_1.CFrame.Position, v62, l_CurrentCamera_1.CFrame.LookVector) then
                    v45(v50, {
                        AngularSize = Vector3.new().Magnitude / (v62 - l_Position_4).Magnitude,
                        Instance = v59
                    }, v55, v3.WorldProvider.AdornedPartLimit);
                end;
            elseif l_ClassName_0 == "Part" then
                v62 = v59.Position;
                if isInFrontOf(l_CurrentCamera_1.CFrame.Position, v62, l_CurrentCamera_1.CFrame.LookVector) then
                    v45(v50, {
                        AngularSize = v59.Size.Magnitude / (v62 - l_Position_4).Magnitude,
                        Instance = v59
                    }, v55, v3.WorldProvider.AdornedPartLimit);
                end;
            end;
        end;
        return v50;
    else
        return ;
    end;
end;
v7.prepareAdornmentMap = function(v63, v64)
    local v65 = {};
    for _, v67 in pairs(v4.Get():GetTags()) do
        v65[v67.Name] = v67;
    end;
    local v68 = {};
    for v69 = 1, #v64 do
        local l_l_CollectionService_0_Tags_0 = l_CollectionService_0:GetTags(v64[v69].Instance);
        local v71 = {};
        local v72 = {};
        local v73 = {};
        local v74 = {};
        local v75 = {};
        local v76 = false;
        for v77 = 1, #l_l_CollectionService_0_Tags_0 do
            local v78 = l_l_CollectionService_0_Tags_0[v77];
            local v79 = v65[v78];
            if not (not v63.trackedTags[v78] or not v79) then
                if v79.DrawType == "Outline" then
                    v71[#v71 + 1] = v79.Color;
                elseif v79.DrawType == "Box" then
                    v72[#v72 + 1] = v79.Color;
                elseif v79.DrawType == "Icon" then
                    v73[#v73 + 1] = v79.Icon;
                elseif not l_TagEditorShowTextSeparately_0 and v79.DrawType == "Text" then
                    v74[#v74 + 1] = v78;
                elseif v79.DrawType == "Sphere" then
                    v75[#v75 + 1] = v79.Color;
                end;
                if not (not l_TagEditorShowTextSeparately_0 or not v79.ShowText) then
                    v74[#v74 + 1] = v78;
                end;
                if v79.AlwaysOnTop then
                    v76 = true;
                end;
            end;
        end;
        local v80 = v63.partIds[v64[v69].Instance];
        if #v71 > 0 then
            local v81 = 0;
            local v82 = 0;
            local v83 = 0;
            for v84 = 1, #v71 do
                v81 = v81 + v71[v84].r;
                v82 = v82 + v71[v84].g;
                v83 = v83 + v71[v84].b;
            end;
            v68["Outline:" .. v80] = {
                Id = v80,
                Part = v64[v69].Instance,
                DrawType = "Outline",
                Color = Color3.new(v81 / #v71, v82 / #v71, v83 / #v71),
                AlwaysOnTop = v76
            };
        end;
        if #v72 > 0 then
            local v85 = 0;
            local v86 = 0;
            local v87 = 0;
            for v88 = 1, #v72 do
                v85 = v85 + v72[v88].r;
                v86 = v86 + v72[v88].g;
                v87 = v87 + v72[v88].b;
            end;
            v68["Box:" .. v80] = {
                Id = v80,
                Part = v64[v69].Instance,
                DrawType = "Box",
                Color = Color3.new(v85 / #v72, v86 / #v72, v87 / #v72),
                AlwaysOnTop = v76
            };
        end;
        if #v73 > 0 then
            v68["Icon:" .. v80] = {
                Id = v80,
                Part = v64[v69].Instance,
                DrawType = "Icon",
                Icon = v73,
                AlwaysOnTop = v76
            };
        end;
        if #v74 > 0 then
            table.sort(v74);
            if #v73 > 0 then
                v74[#v74 + 1] = "";
            end;
            v68["Text:" .. v80] = {
                Id = v80,
                Part = v64[v69].Instance,
                DrawType = "Text",
                TagName = v74,
                AlwaysOnTop = v76
            };
        end;
        if #v75 > 0 then
            local v89 = 0;
            local v90 = 0;
            local v91 = 0;
            for v92 = 1, #v75 do
                v89 = v89 + v75[v92].r;
                v90 = v90 + v75[v92].g;
                v91 = v91 + v75[v92].b;
            end;
            v68["Sphere:" .. v80] = {
                Id = v80,
                Part = v64[v69].Instance,
                DrawType = "Sphere",
                Color = Color3.new(v89 / #v75, v90 / #v75, v91 / #v75),
                AlwaysOnTop = v76
            };
        end;
    end;
    return v68;
end;
v7.updateParts = function(v93)
    debug.profilebegin("[Tag Editor] Update WorldProvider");
    v93:setState({
        partsList = v93:prepareAdornmentMap((v93:collectParts()))
    });
    debug.profileend();
end;
v7.instanceAdded = function(v94, v95)
    if not v94.trackedParts[v95] then
        v94.trackedParts[v95] = 1;
        v94.nextId = v94.nextId + 1;
        v94.partIds[v95] = v94.nextId;
        return ;
    else
        v94.trackedParts[v95] = v94.trackedParts[v95] + 1;
        return ;
    end;
end;
v7.instanceRemoved = function(v96, v97)
    if v96.trackedParts[v97] then
        if v96.trackedParts[v97] <= 1 then
            v96:removeInstance(v97);
            return ;
        else
            v96.trackedParts[v97] = v96.trackedParts[v97] - 1;
            return ;
        end;
    else
        return ;
    end;
end;
v7.removeInstance = function(v98, v99)
    v98.trackedParts[v99] = nil;
    v98.partIds[v99] = nil;
end;
local function _(v100)
    if v100.ClassName == "Model" then
        return true;
    elseif v100.ClassName == "Attachment" then
        return true;
    elseif not v100:IsA("BasePart") then
        return false;
    else
        return true;
    end;
end;
v7.tagAdded = function(v102, v103)
    assert(not v102.trackedTags[v103], "Newly added tag must not already be tracked");
    v102.trackedTags[v103] = true;
    for _, v105 in pairs(l_CollectionService_0:GetTagged(v103)) do
        if (v105.ClassName == "Model" or v105.ClassName == "Attachment") or (v105:IsA("BasePart") and true or false) then
            if v105:IsDescendantOf(workspace) then
                v102:instanceAdded(v105);
            end;
            if not v102.instanceAncestryChangedConns[v105] then
                v102.instanceAncestryChangedConns[v105] = v105.AncestryChanged:Connect(function()
                    if v102.trackedParts[v105] or not v105:IsDescendantOf(workspace) then
                        if not (not v102.trackedParts[v105] or v105:IsDescendantOf(workspace)) then
                            v102:removeInstance(v105);
                            v102:updateParts();
                        end;
                        return ;
                    else
                        v102:instanceAdded(v105);
                        v102:updateParts();
                        return ;
                    end;
                end);
            end;
        end;
    end;
    if not l_TagEditorExternalUpdate_0 then
        v102.instanceAddedConns[v103] = l_CollectionService_0:GetInstanceAddedSignal(v103):Connect(function(v106)
            if (v106.ClassName == "Model" or v106.ClassName == "Attachment") or (v106:IsA("BasePart") and true or false) then
                if v106:IsDescendantOf(workspace) then
                    v102:instanceAdded(v106);
                    v102:updateParts();
                end;
                if not v102.instanceAncestryChangedConns[v106] then
                    v102.instanceAncestryChangedConns[v106] = v106.AncestryChanged:Connect(function()
                        if v102.trackedParts[v106] or not v106:IsDescendantOf(workspace) then
                            if not (not v102.trackedParts[v106] or v106:IsDescendantOf(workspace)) then
                                v102:removeInstance(v106);
                                v102:updateParts();
                            end;
                            return ;
                        else
                            v102:instanceAdded(v106);
                            v102:updateParts();
                            return ;
                        end;
                    end);
                end;
                return ;
            else
                return ;
            end;
        end);
        v102.instanceRemovedConns[v103] = l_CollectionService_0:GetInstanceRemovedSignal(v103):Connect(function(v107)
            if (v107.ClassName == "Model" or v107.ClassName == "Attachment") or (v107:IsA("BasePart") and true or false) then
                v102:instanceRemoved(v107);
                v102:updateParts();
                return ;
            else
                return ;
            end;
        end);
    end;
end;
v7.tagRemoved = function(v108, v109)
    assert(v108.trackedTags[v109], "Attempted to remove a tag that isn't tracked");
    v108.trackedTags[v109] = nil;
    for _, v111 in pairs(l_CollectionService_0:GetTagged(v109)) do
        if v111:IsDescendantOf(workspace) then
            v108:instanceRemoved(v111);
        end;
    end;
    v108.instanceAddedConns[v109] = nil;
    v108.instanceRemovedConns[v109] = nil;
end;
v7.willUnmount = function(v112)
    v112.onTagsUpdatedConn:Disconnect();
    v112.instanceAddedConns:clean();
    v112.instanceRemovedConns:clean();
    v112.instanceAncestryChangedConns:clean();
    v112.maid:clean();
end;
v7.render = function(v113)
    return v2.oneChild(v113.props[v2.Children])(v113.state.partsList);
end;
return v7;


local l_CoreGui_0 = game:GetService("CoreGui");
local v1 = require(script.Parent.Parent.Parent.Parent.Packages.Roact);
local v2 = require(script.Parent.BoxAdorn);
local v3 = require(script.Parent.SphereAdorn);
local v4 = require(script.Parent.OutlineAdorn);
local v5 = require(script.Parent.IconAdorn);
local v6 = require(script.Parent.TextAdorn);
return function(v7)
    local l_partsList_0 = v7.partsList;
    local v9 = {};
    for v10, v11 in pairs(l_partsList_0) do
        local v12 = nil;
        if v11.DrawType == "Outline" then
            v12 = v4;
        elseif v11.DrawType == "Box" then
            v12 = v2;
        elseif v11.DrawType == "Sphere" then
            v12 = v3;
        elseif v11.DrawType == "Icon" then
            v12 = v5;
        elseif v11.DrawType == "Text" then
            v12 = v6;
        else
            error("Unknown DrawType: " .. tostring(v11.DrawType));
        end;
        v9[v10] = v1.createElement(v12, {
            Adornee = v11.Part,
            Icon = v11.Icon,
            Color = v11.Color,
            TagName = v11.TagName,
            AlwaysOnTop = v11.AlwaysOnTop
        });
    end;
    return v1.createElement(v1.Portal, {
        target = l_CoreGui_0
    }, {
        TagEditorWorldView = v1.createElement("Folder", {}, v9)
    });
end;


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(script.WorldVisual);
local v4 = require(script.WorldProvider);
return (v2.connect(function(v5)
    return {
        enabled = v5.WorldView,
        tags = v5.TagData
    };
end)(function(v6)
    if not v6.enabled then
        return nil;
    else
        return v1.createElement(v4, {}, {
            render = function(v7)
                return v1.createElement(v3, {
                    partsList = v7,
                    tags = v6.tags
                });
            end
        });
    end;
end));


return {
    White = Color3.fromRGB(255, 255, 255),
    WorldProvider = {
        AdornedPartLimit = 200,
        CameraMinMovementStepForPartUpdate = 50
    },
    WorldView = {
        BoxAdorn = {
            Size = Vector3.new(1.5, 1.5, 1.5),
            Transparency = 0.3,
            LineThickness = 0.03,
            SurfaceTransparency = 0.7
        },
        OutlineAdorn = {
            Size = Vector3.new(1.5, 1.5, 1.5),
            Transparency = 0.3,
            LineThickness = 0.05
        }
    }
};


local v0 = {
    Asset = "rbxasset://textures/TagEditor/famfamfam.png",
    Table = require(script.SpritesheetData)
};
v0.Lookup = function(v1)
    local v2 = v0.Table[v1] or v0.Table.computer_error;
    return {
        Image = v0.Asset,
        ImageRectOffset = Vector2.new(v2[1], v2[2]),
        ImageRectSize = Vector2.new(16, 16)
    };
end;
return v0;


return {
    AssigningGroup = "",
    ColorPicker = "",
    IconPicker = "",
    IconSearch = "",
    MinimizedSettingsPane = true,
    UIGroupCollapseState = {}
};


local v0 = {};
v0.new = function()
    local v1 = {
        _tasks = {}
    };
    setmetatable(v1, v0);
    return v1;
end;
v0.__index = function(v2, v3)
    return v0[v3] or v2._tasks[v3];
end;
v0.__newindex = function(v4, v5, v6)
    if rawget(v4, v5) then
        error(string.format("Cannot use %q as a Maid key", (tostring(v5))));
    end;
    local l__tasks_0 = v4._tasks;
    local v8 = l__tasks_0[v5];
    if v8 == v6 then
        return ;
    else
        l__tasks_0[v5] = v6;
        if v8 then
            v0.cleanupTask(v8);
        end;
        return ;
    end;
end;
v0.give = function(v9, v10)
    local l__tasks_1 = v9._tasks;
    l__tasks_1[#l__tasks_1 + 1] = v10;
end;
v0.cleanupTask = function(v12)
    local v13 = typeof(v12);
    if v13 == "function" then
        v12();
        return ;
    elseif v13 == "RBXScriptConnection" then
        v12:Disconnect();
        return ;
    elseif not v12.Destroy then
        if not v12.destroy then
            error("Unable to cleanup unknown task");
            return ;
        else
            v12:destroy();
            return ;
        end;
    else
        v12:Destroy();
        return ;
    end;
end;
v0.clean = function(v14)
    local l__tasks_2 = v14._tasks;
    for v16, v17 in pairs(l__tasks_2) do
        if typeof(v17) == "RBXScriptConnection" then
            l__tasks_2[v16] = nil;
            v17:Disconnect();
        end;
    end;
    local v18, v19 = next(l__tasks_2);
    while v19 ~= nil do
        l__tasks_2[v18] = nil;
        v0.cleanupTask(v19);
        local v20, v21 = next(l__tasks_2);
        v18 = v20;
        v19 = v21;
    end;
end;
v0.destroy = v0.clean;
return v0;


local l_StudioFixPluginWidgetLocalizedIds_0 = game:GetFastFlag("StudioFixPluginWidgetLocalizedIds");
local l_Parent_0 = script.Parent.Parent;
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.Rodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_UI_0 = v4.UI;
local l_DockWidget_0 = l_UI_0.DockWidget;
local l_PluginButton_0 = l_UI_0.PluginButton;
local l_PluginToolbar_0 = l_UI_0.PluginToolbar;
local l_ContextServices_0 = v4.ContextServices;
local l_Plugin_0 = l_ContextServices_0.Plugin;
local l_Mouse_0 = l_ContextServices_0.Mouse;
local l_Store_0 = l_ContextServices_0.Store;
local v13 = require(l_Parent_0.Src.Reducers);
local v14 = require(l_Parent_0.Src.Resources.MakeTheme);
local v15 = require(l_Parent_0.Src.InitialStoreState);
local l_SourceStrings_0 = l_Parent_0.Src.Resources.Localization.SourceStrings;
local l_LocalizedStrings_0 = l_Parent_0.Src.Resources.Localization.LocalizedStrings;
local v18 = require(script.Parent.TagManager);
local v19 = require(l_Parent_0.Src.Util.createAnalyticsHandlers);
local l_Components_0 = l_Parent_0.Src.Components;
local v21 = require(l_Components_0.MainGui);
local v22 = require(l_Components_0.WorldView);
local l_ImprovePluginSpeed_TagEditor_0 = game:GetFastFlag("ImprovePluginSpeed_TagEditor");
local v24 = v2.PureComponent:extend("MainPlugin");
v24.init = function(v25, _)
    v25.state = {
        enabled = false
    };
    v25.store = v3.Store.new(v13, v15, {
        v3.thunkMiddleware
    }, nil);
    v25.toggleEnabled = function()
        v25:setState(function(v27)
            v25:setEnabled(not v27.enabled, true);
        end);
    end;
    v25.onClose = function()
        v25:setEnabled(false, true);
    end;
    v25.onRestore = function(v28)
        v25:setEnabled(v28, false);
    end;
    v25.onDockWidgetCreated = function()
        if l_ImprovePluginSpeed_TagEditor_0 then
            v25.props.pluginLoaderContext.mainButtonClickedSignal:Connect(v25.toggleEnabled);
        end;
    end;
    v25.onWidgetEnabledChanged = function(v29)
        v25:setEnabled(v29.Enabled, true);
    end;
    v25.localization = l_ContextServices_0.Localization.new({
        stringResourceTable = l_SourceStrings_0,
        translationResourceTable = l_LocalizedStrings_0,
        pluginName = "TagEditor"
    });
    v25.analytics = l_ContextServices_0.Analytics.new(v19);
    v25.manager = v18.new(v25.store, v25.analytics);
end;
v24.sendWindowEnabledAnalytics = function(v30, v31)
    if v30.analytics then
        v30.analytics:report("toggleWidget");
        v30.analytics:report(not v31 and "closeWidget" or "openWidget");
        return ;
    else
        return ;
    end;
end;
v24.setEnabled = function(v32, v33, v34)
    v32:setState(function(v35)
        if v35.enabled == v33 then
            return nil;
        else
            v32.analytics:report("opened");
            if v34 then
                v32:sendWindowEnabledAnalytics(v33);
            end;
            v32.manager:SetEnabled(v33);
            return {
                enabled = v33
            };
        end;
    end);
end;
if not l_ImprovePluginSpeed_TagEditor_0 then
    v24.renderButtons = function(v36, v37)
        return {
            ToggleEditor = v2.createElement(l_PluginButton_0, {
                Toolbar = v37,
                Active = v36.state.enabled,
                Title = "TagEditor",
                Tooltip = "",
                Icon = "",
                OnClick = v36.toggleEnabled,
                ClickableWhenViewportHidden = true
            })
        };
    end;
end;
v24.render = function(v38)
    local l_props_0 = v38.props;
    local l_state_0 = v38.state;
    local l_Plugin_1 = l_props_0.Plugin;
    return l_ContextServices_0.provide({
        l_Plugin_0.new(l_Plugin_1),
        l_Store_0.new(v38.store),
        l_Mouse_0.new(l_Plugin_1:getMouse()),
        v14(),
        v38.localization,
        v38.analytics
    }, {
        Toolbar = if l_ImprovePluginSpeed_TagEditor_0 then nil else v2.createElement(l_PluginToolbar_0, {
            Title = "tagEditorToolbar",
            RenderButtons = function(v42)
                return v38:renderButtons(v42);
            end
        }),
        MainWidget = v2.createElement(l_DockWidget_0, {
            Id = if not l_StudioFixPluginWidgetLocalizedIds_0 then nil else "TagEditor",
            Enabled = l_state_0.enabled,
            Widget = if not l_ImprovePluginSpeed_TagEditor_0 then nil else l_props_0.pluginLoaderContext.mainDockWidget,
            Title = v38.localization:getText("Plugin", "Name"),
            ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
            InitialDockState = Enum.InitialDockState.Right,
            Size = Vector2.new(300, 200),
            MinSize = Vector2.new(200, 250),
            OnClose = v38.onClose,
            ShouldRestore = true,
            OnWidgetRestored = v38.onRestore,
            OnWidgetCreated = if not l_ImprovePluginSpeed_TagEditor_0 then nil else v38.onDockWidgetCreated,
            [v2.Change.Enabled] = v38.onWidgetEnabledChanged
        }, {
            MainGui = v2.createElement(v21)
        }),
        WorldView = v2.createElement(v22)
    });
end;
return v24;


return function(v0, v1)
    if v1.type == "SetAssigningGroup" then
        return v1.group;
    elseif v1.type ~= "SetTagData" and v1.type ~= "SetGroupData" then
        return nil;
    else
        return v0;
    end;
end;


return function(v0, v1)
    if v1.type == "ToggleColorPicker" then
        return v1.tag;
    else
        return v0;
    end;
end;


return function(v0, v1)
    v0 = v0 or {};
    if v1.type == "SetGroupData" then
        return v1.data;
    else
        return v0;
    end;
end;


return function(v0, v1)
    if v1.type == "OpenGroupMenu" then
        return v1.group;
    elseif v1.type == "OpenTagMenu" then
        return nil;
    elseif v1.type == "MoveTagSelectionUpOrDown" then
        return nil;
    else
        return v0;
    end;
end;


return function(v0, v1)
    if v1.type == "SetHoveredIcon" then
        return v1.icon;
    else
        return v0;
    end;
end;


return function(v0, v1)
    if v1.type == "ToggleIconPicker" then
        return v1.tag;
    else
        return v0;
    end;
end;


local v0 = require(script.Parent.Parent.Parent.Src.Util.sanitizeIconSearchInput);
return function(v1, v2)
    v1 = v1 or "";
    if not game:GetFastFlag("TagEditorIconPickerSearchReset") then
        if not (v2.type == "ToggleIconPicker") or v2.tag then
            if v2.type == "SetIconSearch" then
                assert(typeof(v2.text) == "string");
                return v2.text;
            end;
        else
            return "";
        end;
    elseif v2.type == "ToggleIconPicker" then
        return "";
    elseif v2.type == "SetIconSearch" then
        assert(typeof(v2.text) == "string");
        return v0(v2.text);
    end;
    return v1;
end;


return function(v0, v1)
    if v1.type == "SetMinimizedSettingsPane" then
        return v1.minimized;
    elseif v1.type == "SetAssigningGroup" and v1.group ~= nil then
        return true;
    else
        return v0;
    end;
end;


return function(v0, v1)
    if v1.type == "SetRenamingGroup" then
        if not v1.renaming then
            return nil;
        else
            return v1.group;
        end;
    elseif v1.type == "SetRenaming" then
        return nil;
    else
        return v0;
    end;
end;


return function(v0, v1)
    if v1.type == "SetRenaming" then
        if not v1.renaming then
            return nil;
        else
            return v1.tag;
        end;
    elseif v1.type == "SetRenamingGroup" then
        return nil;
    else
        return v0;
    end;
end;


return function(v0, v1)
    v0 = v0 or "";
    if v1.type == "SetSearch" then
        assert(typeof(v1.text) == "string");
        return v1.text;
    else
        return v0;
    end;
end;


local _ = require(script.Parent.Parent.Parent.Src.Types);
return function(v1, v2)
    v1 = v1 or {};
    if v2.type == "SetTagData" then
        table.sort(v2.data, function(v3, v4)
            local v5 = v3.Group or "";
            local v6 = v4.Group or "";
            if v5 < v6 then
                return true;
            elseif v6 < v5 then
                return false;
            else
                return (v3.Name or "") < (v4.Name or "");
            end;
        end);
        return v2.data;
    else
        return v1;
    end;
end;


local v0 = require(script.Parent.Parent.Parent.Packages.Dash);
return function(v1, v2)
    v1 = v1 or nil;
    local v3 = if v1 ~= nil then v1.TagMenu else nil;
    if v2.type == "OpenTagMenu" then
        return v2.tag;
    elseif v2.type == "OpenGroupMenu" then
        return nil;
    elseif v2.type == "MoveTagSelectionUpOrDown" and #v1.TagData > 0 then
        if v3 ~= nil then
            local v5 = v0.findIndex(v1.TagData, function(v4)
                return v4.Name == v3;
            end);
            if v5 == nil then
                return v3;
            else
                return v1.TagData[if not v2.isDown then v5 + (v5 > 1 and -1 or 0) else v5 + (v5 < #v1.TagData and 1 or 0)].Name;
            end;
        else
            return v1.TagData[1].Name;
        end;
    else
        return v3;
    end;
end;


local _ = require(script.Parent.Parent.Parent.Src.Types);
return function(v1, v2)
    v1 = v1 or {};
    if v2.type == "SetUIGroupCollapseState" then
        return v2.data;
    else
        return v1;
    end;
end;


return function(v0, v1)
    v0 = v0 or {};
    if v1.type == "SetUnknownTags" then
        return v1.data;
    else
        return v0;
    end;
end;


return function(v0, v1)
    v0 = v0 or false;
    if v1.type == "ToggleWorldView" then
        return v1.enabled;
    else
        return v0;
    end;
end;


local v0 = require(script.AssigningGroup);
local v1 = require(script.ColorPicker);
local v2 = require(script.GroupData);
local v3 = require(script.GroupMenu);
local v4 = require(script.HoveredIcon);
local v5 = require(script.IconPicker);
local v6 = require(script.IconSearch);
local v7 = require(script.MinimizedSettingsPane);
local v8 = require(script.RenamingGroup);
local v9 = require(script.RenamingTag);
local v10 = require(script.Search);
local v11 = require(script.TagData);
local v12 = require(script.TagMenu);
local v13 = require(script.UIGroupCollapseState);
local v14 = require(script.UnknownTags);
local v15 = require(script.WorldView);
return function(v16, v17)
    v16 = v16 or {};
    return {
        AssigningGroup = v0(v16.AssigningGroup, v17),
        ColorPicker = v1(v16.ColorPicker, v17),
        GroupData = v2(v16.GroupData, v17),
        GroupMenu = v3(v16.GroupMenu, v17),
        HoveredIcon = v4(v16.HoveredIcon, v17),
        IconPicker = v5(v16.IconPicker, v17),
        IconSearch = v6(v16.IconSearch, v17),
        MinimizedSettingsPane = v7(v16.MinimizedSettingsPane, v17),
        RenamingGroup = v8(v16.RenamingGroup, v17),
        RenamingTag = v9(v16.RenamingTag, v17),
        Search = v10(v16.Search, v17),
        TagData = v11(v16.TagData, v17),
        TagMenu = v12(v16, v17),
        UIGroupCollapseState = v13(v16.UIGroupCollapseState, v17),
        UnknownTags = v14(v16.UnknownTags, v17),
        WorldView = v15(v16.WorldView, v17)
    };
end;


local l_CollectionService_0 = game:GetService("CollectionService");
local l_Selection_0 = game:GetService("Selection");
local l_ChangeHistoryService_0 = game:GetService("ChangeHistoryService");
local v3 = require(script.Parent.Actions);
local v4 = require(script.Parent.Maid);
local _ = require(script.Parent.Types);
local l_ServerStorage_0 = game:GetService("ServerStorage");
local l_TagEditorShowTextSeparately_0 = game:GetFastFlag("TagEditorShowTextSeparately");
local l_TagEditorExternalUpdate_0 = game:GetFastFlag("TagEditorExternalUpdate");
local v9 = {};
v9.__index = v9;
local v10 = {
    Icon = "rbxasset://textures/TagEditor/Tag.png",
    Visible = true,
    DrawType = "Box",
    ShowText = if not l_TagEditorShowTextSeparately_0 then nil else false,
    AlwaysOnTop = false,
    Group = ""
};
v9._global = nil;
local function _(v11, v12, v13)
    return (v12 - v11) * v13 + v11;
end;
local function v18(v15)
    local v16 = 2166136261;
    for v17 = 1, #v15 do
        v16 = ((v16 * 16777619) % 4294967296 + v15:byte(v17)) % 4294967296;
    end;
    return Color3.fromHSV(((v16 / 65536) % 256) / 255, 0.5 * (((v16 / 256) % 256) / 255) + 0.5, 0.7 * (((v16 / 1) % 256) / 255) + 0.3);
end;
local _ = function(v19)
    if v19 then
        for _, v21 in v19:GetChildren() do
            if v21:IsA("Folder") then
                return true;
            end;
        end;
        return false;
    else
        return false;
    end;
end;
v9.new = function(v23, v24)
    local v25 = setmetatable({
        store = v23,
        analytics = v24,
        updateTriggered = false,
        enabled = false,
        tags = {},
        onUpdate = {},
        _tagFolderSet = {},
        _defaultTagsFolder = l_ServerStorage_0:FindFirstChild("TagList"),
        _maid = v4.new(),
        _gaveDuplicateWarningsFor = {}
    }, v9);
    v9._global = v25;
    local l__defaultTagsFolder_0 = v25._defaultTagsFolder;
    local v27;
    if l__defaultTagsFolder_0 then
        for _, v29 in l__defaultTagsFolder_0:GetChildren() do
            if v29:IsA("Folder") then
                v27 = true;
                goto label0 --[[  true, false  ]];
            end;
        end;
        v27 = false;
    else
        v27 = false;
    end;
    ::label0::;
    if v27 then
        l_ChangeHistoryService_0:SetWaypoint("Migrating tags folder");
        v27 = 0;
        for _, v31 in pairs(v25._defaultTagsFolder:GetChildren()) do
            if v31:IsA("Folder") then
                local l_Configuration_0 = Instance.new("Configuration");
                l_Configuration_0.Name = v31.Name;
                local v33 = {};
                for _, v35 in pairs(v31:GetChildren()) do
                    if v35:IsA("ValueBase") then
                        l_Configuration_0:SetAttribute(v35.Name, v35.Value);
                        v33[v35.Name] = true;
                    end;
                end;
                for v36, v37 in pairs(v10) do
                    if not v33[v36] then
                        l_Configuration_0:SetAttribute(v36, v37);
                    end;
                end;
                l_Configuration_0.Parent = v25._defaultTagsFolder;
                v31.Parent = nil;
                v27 = v27 + 1;
            end;
        end;
        if v27 > 0 then
            print(string.format("TagEditor: Converted %d tags to attribute-based format.", v27));
        end;
        l_CollectionService_0:AddTag(v25._defaultTagsFolder, "TagEditorTagContainer");
        l_ChangeHistoryService_0:SetWaypoint("Migrated tags folder");
    end;
    v25:_updateStore();
    v25._maid:give(l_Selection_0.SelectionChanged:Connect(function()
        if v25.enabled then
            v25:_updateStore();
            v25:_updateUnknownTags();
            return ;
        else
            return ;
        end;
    end));
    if v25._defaultTagsFolder then
        v25:_watchFolder(v25._defaultTagsFolder);
    end;
    v25._maid:give(l_CollectionService_0:GetInstanceAddedSignal("TagEditorTagContainer"):Connect(function(v38)
        v25:_watchFolder(v38);
    end));
    v25._maid:give(l_CollectionService_0:GetInstanceRemovedSignal("TagEditorTagContainer"):Connect(function(v39)
        if v39 ~= v25._defaultTagsFolder then
            v25:_stopWatchingFolder(v39);
        end;
    end));
    for _, v41 in pairs(l_CollectionService_0:GetTagged("TagEditorTagContainer")) do
        v25:_watchFolder(v41);
    end;
    return v25;
end;
v9.Destroy = function(v42)
    v42._maid:destroy();
end;
v9.Get = function()
    return v9._global;
end;
v9.GetTags = function(v43)
    return v43.tags;
end;
v9.OnTagsUpdated = function(v44, v45)
    local v47 = {
        Disconnect = function(v46)
            v44.onUpdate[v46] = nil;
        end
    };
    v44.onUpdate[v47] = v45;
    return v47;
end;
v9._stopWatchingFolder = function(v48, v49)
    if v48._maid[v49] then
        v48._maid[v49] = nil;
        v48:_updateStore(true);
    end;
end;
v9._watchFolder = function(v50, v51)
    if not v50._maid[v51] then
        local v52 = v4.new();
        v50._tagFolderSet[v51] = true;
        v52:give(function()
            v50._tagFolderSet[v51] = nil;
        end);
        for _, v54 in pairs(v51:GetChildren()) do
            if v54:IsA("Configuration") then
                v52[v54] = v50:_watchChild(v54);
            end;
        end;
        v52:give(v51.ChildAdded:Connect(function(v55)
            if v55:IsA("Configuration") then
                v52[v55] = v50:_watchChild(v55);
            end;
        end));
        v52:give(v51.ChildRemoved:Connect(function(v56)
            if v56:IsA("Configuration") then
                v52[v56] = nil;
                v50:_updateStore();
            end;
        end));
        v50._maid[v51] = v52;
        return ;
    else
        return ;
    end;
end;
v9._watchChild = function(v57, v58)
    local v59 = v4.new();
    v57:_updateStore(true);
    local function v63()
        local v60 = v4.new();
        v60:give(l_CollectionService_0:GetInstanceAddedSignal(v58.Name):Connect(function(_)
            v57:_updateStore();
        end));
        v60:give(l_CollectionService_0:GetInstanceRemovedSignal(v58.Name):Connect(function(_)
            v57:_updateStore();
        end));
        return v60;
    end;
    v59:give(v58.AttributeChanged:Connect(function(_)
        v57:_updateStore();
    end));
    local v65 = nil;
    if l_TagEditorExternalUpdate_0 then
        v65 = v63();
    end;
    v59:give(v58:GetPropertyChangedSignal("Name"):Connect(function(_)
        v57:_updateStore(true);
        if l_TagEditorExternalUpdate_0 then
            v65:destroy();
            v65 = v63();
        end;
    end));
    if l_TagEditorExternalUpdate_0 then
        v59:give(function()
            v65:destroy();
        end);
    end;
    return v59;
end;
v9._ensureDefaultFolder = function(v67)
    if not v67._defaultTagsFolder then
        v67._defaultTagsFolder = Instance.new("Folder");
        v67._defaultTagsFolder.Name = "TagList";
        v67._defaultTagsFolder.Parent = l_ServerStorage_0;
        l_CollectionService_0:AddTag(v67._defaultTagsFolder, "TagEditorTagContainer");
        v67:_watchFolder(v67._defaultTagsFolder);
    end;
    return v67._defaultTagsFolder;
end;
v9._updateStore = function(v68, v69)
    if not v68.updateTriggered then
        v68.updateTriggered = true;
        task.spawn(function()
            v68:_doUpdateStore();
            if v69 then
                v68:_updateUnknownTags();
            end;
        end);
    end;
end;
v9._doUpdateStore = function(v70)
    v70.updateTriggered = false;
    local v71 = {};
    local v72 = {};
    local v73 = l_Selection_0:Get();
    local function v82(v74)
        local v75 = {};
        for _, v77 in pairs(v74:GetChildren()) do
            if v77:IsA("Configuration") then
                if not v75[v77.Name] then
                    v75[v77.Name] = true;
                    local v78 = false;
                    local v79 = false;
                    local v80 = {
                        Name = v77.Name,
                        Icon = v77:GetAttribute("Icon") or v10.Icon,
                        Visible = v77:GetAttribute("Visible") or false,
                        DrawType = v77:GetAttribute("DrawType") or v10.DrawType,
                        ShowText = if not l_TagEditorShowTextSeparately_0 then nil else v77:GetAttribute("ShowText") or v10.ShowText,
                        AlwaysOnTop = v77:GetAttribute("AlwaysOnTop") or v10.AlwaysOnTop,
                        Group = v77:GetAttribute("Group") or v10.Group,
                        Color = v77:GetAttribute("Color") or v18(v77.Name),
                        HasAll = false,
                        HasSome = false
                    };
                    if v80.Group == "" then
                        v80.Group = nil;
                    end;
                    if v80.Icon == "" then
                        v80.Icon = v10.Icon;
                    end;
                    for v81 = 1, #v73 do
                        if not l_CollectionService_0:HasTag(v73[v81], v80.Name) then
                            v79 = true;
                        else
                            v78 = true;
                        end;
                    end;
                    v80.HasAll = v78 and not v79;
                    v80.HasSome = v78 and v79;
                    v71[#v71 + 1] = v80;
                    if v80.Group then
                        v72[v80.Group] = true;
                    end;
                elseif not v70._gaveDuplicateWarningsFor[v77.Name] then
                    warn(string.format("Multiple tags in %s are named %q, consider removing the duplicates.", v74:GetFullName(), v77.Name));
                    v70._gaveDuplicateWarningsFor[v77.Name] = true;
                end;
            end;
        end;
    end;
    if v70._defaultTagsFolder then
        v82(v70._defaultTagsFolder);
    end;
    for v83, _ in pairs(v70._tagFolderSet) do
        if v83 ~= v70._defaultTagsFolder then
            v82(v83);
        end;
    end;
    table.sort(v71, function(v85, v86)
        return v85.Name < v86.Name;
    end);
    local l_tags_0 = v70.tags;
    v70.tags = v71;
    v70.store:dispatch(v3.SetTagData(v71));
    local v88 = {};
    for v89, _ in pairs(v72) do
        table.insert(v88, v89);
    end;
    table.sort(v88);
    v70.groups = v72;
    v70.store:dispatch(v3.SetGroupData(v88));
    for _, v92 in pairs(v70.onUpdate) do
        v92(v71, l_tags_0);
    end;
end;
v9._updateUnknownTags = function(v93)
    local v94 = l_Selection_0:Get();
    if #v94 ~= 0 then
        local v95 = {};
        for _, v97 in pairs(v93.tags) do
            v95[v97.Name] = true;
        end;
        local v98 = {};
        for _, v100 in pairs(v94) do
            for _, v102 in pairs((l_CollectionService_0:GetTags(v100))) do
                if not v95[v102] and v102:sub(1, 1) ~= "." then
                    v98[v102] = true;
                end;
            end;
        end;
        local v103 = {};
        for v104, _ in pairs(v98) do
            table.insert(v103, v104);
        end;
        table.sort(v103);
        v93.store:dispatch(v3.SetUnknownTags(v103));
    end;
end;
v9._setProp = function(v106, v107, v108, v109)
    local v110 = v106:_findTagInst(v107);
    if v110 then
        if v110:GetAttribute(v108) == v109 then
            return false;
        else
            l_ChangeHistoryService_0:SetWaypoint(string.format("Setting property %q of tag %q", v108, v107));
            v110:SetAttribute(v108, v109);
            l_ChangeHistoryService_0:SetWaypoint(string.format("Set property %q of tag %q", v108, v107));
            return true;
        end;
    else
        warn("Setting property of non-existent tag `" .. tostring(v107) .. "`");
        return false;
    end;
end;
v9._getProp = function(v111, v112, v113)
    local v114 = v111:_findTagInst(v112);
    if v114 then
        return v114:GetAttribute(v113);
    else
        return nil;
    end;
end;
v9._findTagInst = function(v115, v116)
    if v115._defaultTagsFolder then
        local l_FirstChild_0 = v115._defaultTagsFolder:FindFirstChild(v116);
        if l_FirstChild_0 then
            return l_FirstChild_0;
        end;
    end;
    for v118, _ in pairs(v115._tagFolderSet) do
        local l_v118_FirstChild_0 = v118:FindFirstChild(v116);
        if l_v118_FirstChild_0 then
            return l_v118_FirstChild_0;
        end;
    end;
    return nil;
end;
v9.AddTag = function(v121, v122)
    if not v121:_findTagInst(v122) then
        l_ChangeHistoryService_0:SetWaypoint(string.format("Creating tag %q", v122));
        local v123 = v121:_ensureDefaultFolder();
        local l_Configuration_1 = Instance.new("Configuration");
        l_Configuration_1.Name = v122;
        l_Configuration_1:SetAttribute("Icon", v10.Icon);
        l_Configuration_1:SetAttribute("Visible", v10.Visible);
        l_Configuration_1:SetAttribute("DrawType", v10.DrawType);
        if l_TagEditorShowTextSeparately_0 then
            l_Configuration_1:SetAttribute("ShowText", v10.ShowText);
        end;
        l_Configuration_1:SetAttribute("AlwaysOnTop", v10.AlwaysOnTop);
        l_Configuration_1:SetAttribute("Group", v10.Group);
        l_Configuration_1:SetAttribute("Color", v18(v122));
        l_Configuration_1.Parent = v123;
        v121.analytics:report("tagCreated");
        l_ChangeHistoryService_0:SetWaypoint(string.format("Created tag %q", v122));
        return ;
    else
        return ;
    end;
end;
v9.Rename = function(v125, v126, v127)
    local v128 = v125:_findTagInst(v126);
    if v128 then
        l_ChangeHistoryService_0:SetWaypoint(string.format("Renaming tag %q to %q", v126, v127));
        v128.Name = v127;
        for _, v130 in pairs(l_CollectionService_0:GetTagged(v126)) do
            l_CollectionService_0:RemoveTag(v130, v126);
            l_CollectionService_0:AddTag(v130, v127);
        end;
        v125:_updateStore();
        v125:_updateUnknownTags();
        l_ChangeHistoryService_0:SetWaypoint(string.format("Renamed tag %q to %q", v126, v127));
        return ;
    else
        return ;
    end;
end;
v9.ToggleGroupVisibility = function(v131, v132)
    local v133 = {};
    local v134 = false;
    for _, v136 in pairs(v131.tags) do
        if v136.Group == v132 then
            if v134 then
                v131:_setProp(v136.Name, "Visible", true);
            else
                table.insert(v133, v136);
                if not v136.Visible then
                    v134 = true;
                    v131:_setProp(v136.Name, "Visible", true);
                end;
            end;
        end;
    end;
    if not v134 then
        for _, v138 in pairs(v133) do
            v131:_setProp(v138.Name, "Visible", false);
        end;
    end;
end;
v9.GetGroups = function(v139)
    return v139.groups;
end;
v9.RenameGroup = function(v140, v141, v142)
    l_ChangeHistoryService_0:SetWaypoint(string.format("Renaming Group %q to %q", v141, v142));
    for _, v144 in pairs(v140.tags) do
        if v144.Group == v141 then
            v140:_setProp(v144.Name, "Group", v142 or "");
        end;
    end;
    l_ChangeHistoryService_0:SetWaypoint(string.format("Renamed Group %q to %q", v141, v142));
end;
v9.DeleteGroup = function(v145, v146)
    l_ChangeHistoryService_0:SetWaypoint(string.format("Deleteing Group %q", v146));
    for _, v148 in pairs(v145.tags) do
        if v148.Group == v146 then
            v145:_setProp(v148.Name, "Group", "");
        end;
    end;
    l_ChangeHistoryService_0:SetWaypoint(string.format("Deleted Group %q", v146));
end;
v9.SelectAll = function(_, v150)
    l_Selection_0:Set(l_CollectionService_0:GetTagged(v150));
end;
v9.GetIcon = function(v151, v152)
    return v151:_getProp(v152, "Icon") or v10.Icon;
end;
v9.GetVisible = function(v153, v154)
    return v153:_getProp(v154, "Visible") or v10.Visible;
end;
v9.GetDrawType = function(v155, v156)
    return v155:_getProp(v156, "DrawType") or v10.DrawType;
end;
v9.GetColor = function(v157, v158)
    return v157:_getProp(v158, "Color") or v10.Color;
end;
if l_TagEditorShowTextSeparately_0 then
    v9.GetShowText = function(v159, v160)
        return v159:_getProp(v160, "ShowText") or v10.ShowText;
    end;
end;
v9.GetAlwaysOnTop = function(v161, v162)
    return v161:_getProp(v162, "AlwaysOnTop") or v10.AlwaysOnTop;
end;
v9.GetGroup = function(v163, v164)
    return v163:_getProp(v164, "Group") or v10.Group;
end;
v9.SetIcon = function(v165, v166, v167)
    v165:_setProp(v166, "Icon", v167 or "");
    v165.analytics:report("iconChanged");
end;
v9.SetVisible = function(v168, v169, v170)
    v168:_setProp(v169, "Visible", v170);
end;
v9.SetDrawType = function(v171, v172, v173)
    v171:_setProp(v172, "DrawType", v173);
end;
v9.SetColor = function(v174, v175, v176)
    v174:_setProp(v175, "Color", v176);
    v174.analytics:report("colorChanged");
end;
if l_TagEditorShowTextSeparately_0 then
    v9.SetShowText = function(v177, v178, v179)
        v177:_setProp(v178, "ShowText", v179);
    end;
end;
v9.SetAlwaysOnTop = function(v180, v181, v182)
    v180:_setProp(v181, "AlwaysOnTop", v182);
end;
v9.SetGroup = function(v183, v184, v185)
    v183:_setProp(v184, "Group", v185 or "");
end;
v9.DelTag = function(v186, v187)
    local v188 = v186:_findTagInst(v187);
    if v188 then
        l_ChangeHistoryService_0:SetWaypoint(string.format("Deleting tag %q", v187));
        v188.Parent = nil;
        for _, v190 in pairs(l_CollectionService_0:GetTagged(v187)) do
            l_CollectionService_0:RemoveTag(v190, v187);
        end;
        l_ChangeHistoryService_0:SetWaypoint(string.format("Deleted tag %q", v187));
        return ;
    else
        return ;
    end;
end;
v9.SetTag = function(v191, v192, v193)
    if not v193 then
        l_ChangeHistoryService_0:SetWaypoint(string.format("Removing tag %q from selection", v192));
    else
        l_ChangeHistoryService_0:SetWaypoint(string.format("Applying tag %q to selection", v192));
    end;
    for _, v195 in pairs((l_Selection_0:Get())) do
        if not v193 then
            l_CollectionService_0:RemoveTag(v195, v192);
        else
            l_CollectionService_0:AddTag(v195, v192);
        end;
    end;
    v191:_updateStore();
    if not v193 then
        l_ChangeHistoryService_0:SetWaypoint(string.format("Removed tag %q from selection", v192));
        return ;
    else
        l_ChangeHistoryService_0:SetWaypoint(string.format("Applied tag %q to selection", v192));
        v191.analytics:report("objectTagged");
        return ;
    end;
end;
v9.SetEnabled = function(v196, v197)
    if v196.enabled == v197 then
        return ;
    else
        v196.enabled = v197;
        if v197 then
            v196:_updateStore();
            v196:_updateUnknownTags();
        end;
        return ;
    end;
end;
return v9;


local l_Workspace_0 = game:GetService("Workspace");
local v1 = require(script.Parent.hasInternalPermission)();
local v2 = pcall(function()
    return game:GetService("ProcessService");
end);
local function _(v3, v4)
    v4 = v4 or false;
    return function()
        local l_TagEditorFlags_0 = l_Workspace_0:FindFirstChild("TagEditorFlags");
        if l_TagEditorFlags_0 and l_TagEditorFlags_0:FindFirstChild(v3) then
            return l_TagEditorFlags_0[v3].Value;
        else
            return v4;
        end;
    end;
end;
local v7 = {};
local v8 = v2 or false;
local v9 = "RunningUnderCLI";
local l_v9_0 = v9 --[[ copy: 7 -> 8 ]];
local v11;
do
    local l_v8_0 = v8;
    v11 = function()
        local l_TagEditorFlags_1 = l_Workspace_0:FindFirstChild("TagEditorFlags");
        if l_TagEditorFlags_1 and l_TagEditorFlags_1:FindFirstChild(l_v9_0) then
            return l_TagEditorFlags_1[l_v9_0].Value;
        else
            return l_v8_0;
        end;
    end;
end;
v7.RunningUnderCLI = v11;
v8 = nil or false;
v9 = "RunTests";
local l_v9_1 = v9 --[[ copy: 7 -> 9 ]];
do
    local l_v8_1 = v8;
    v11 = function()
        local l_TagEditorFlags_2 = l_Workspace_0:FindFirstChild("TagEditorFlags");
        if l_TagEditorFlags_2 and l_TagEditorFlags_2:FindFirstChild(l_v9_1) then
            return l_TagEditorFlags_2[l_v9_1].Value;
        else
            return l_v8_1;
        end;
    end;
end;
v7.RunTests = v11;
v8 = nil or false;
v9 = "LogTestsQuiet";
local l_v9_2 = v9 --[[ copy: 7 -> 10 ]];
do
    local l_v8_2 = v8;
    v11 = function()
        local l_TagEditorFlags_3 = l_Workspace_0:FindFirstChild("TagEditorFlags");
        if l_TagEditorFlags_3 and l_TagEditorFlags_3:FindFirstChild(l_v9_2) then
            return l_TagEditorFlags_3[l_v9_2].Value;
        else
            return l_v8_2;
        end;
    end;
end;
v7.LogTestsQuiet = v11;
v8 = nil or false;
v9 = "LogAnalytics";
local l_v9_3 = v9 --[[ copy: 7 -> 11 ]];
do
    local l_v8_3 = v8;
    v11 = function()
        local l_TagEditorFlags_4 = l_Workspace_0:FindFirstChild("TagEditorFlags");
        if l_TagEditorFlags_4 and l_TagEditorFlags_4:FindFirstChild(l_v9_3) then
            return l_TagEditorFlags_4[l_v9_3].Value;
        else
            return l_v8_3;
        end;
    end;
end;
v7.LogAnalytics = v11;
v8 = nil or false;
v9 = "RunDeveloperFrameworkTests";
local l_v9_4 = v9 --[[ copy: 7 -> 12 ]];
do
    local l_v8_4 = v8;
    v11 = function()
        local l_TagEditorFlags_5 = l_Workspace_0:FindFirstChild("TagEditorFlags");
        if l_TagEditorFlags_5 and l_TagEditorFlags_5:FindFirstChild(l_v9_4) then
            return l_TagEditorFlags_5[l_v9_4].Value;
        else
            return l_v8_4;
        end;
    end;
end;
v7.RunDeveloperFrameworkTests = v11;
v8 = (v7.RunTests() or v1) or false;
v9 = "EnableRoactConfigs";
do
    local l_v8_5 = v8;
    v11 = function()
        local l_TagEditorFlags_6 = l_Workspace_0:FindFirstChild("TagEditorFlags");
        if l_TagEditorFlags_6 and l_TagEditorFlags_6:FindFirstChild(v9) then
            return l_TagEditorFlags_6[v9].Value;
        else
            return l_v8_5;
        end;
    end;
end;
v7.EnableRoactConfigs = v11;
return v7;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Src.TagManager);
local _ = require(l_Parent_0.Src.Types);
return function(v3)
    local v4 = 1;
    while v1.Get():GetGroups()[v3 .. " " .. tostring(v4)] do
        v4 = v4 + 1;
    end;
    return v3 .. " " .. tostring(v4);
end;


local v0 = require(script.Parent.Parent.Parent.Src.Util.DebugFlags);
return {
    getAreCustomIconsAndEmojiAllowed = function()
        if not v0.RunningUnderCLI() then
            return game:GetService("PluginPolicyService"):getPluginPolicy("TagEditor").AreCustomIconsAndEmojiAllowed;
        else
            return true;
        end;
    end
};


local v0 = require(script.Parent.Parent.Parent.Packages.Cryo);
return function(v1)
    local function v4(v2, v3)
        v1:ReportInfluxSeries("TagEditorUsage", v0.Dictionary.join({
            placeId = game.PlaceId,
            calledFrom = v2
        }, v3 or {}), game:GetFastInt("ReportTagEditorEventsThrottleHundrethsPercent2"));
    end;
    local function _(v5)
        v1:ReportCounter(v5);
    end;
    return {
        opened = function()
            v4("Opened");
        end,
        worldVisualization = function()
            v4("WorldVisualization");
        end,
        colorChanged = function()
            v4("ColorChanged");
        end,
        iconChanged = function()
            v4("IconChanged");
        end,
        tagCreated = function()
            v4("TagCreated");
        end,
        objectTagged = function()
            v4("ObjectTagged");
        end,
        toggleWidget = function()
            v1:ReportCounter("TagEditorToggleWidget");
        end,
        openWidget = function()
            v1:ReportCounter("TagEditorOpenWidget");
        end,
        closeWidget = function()
            v1:ReportCounter("TagEditorCloseWidget");
        end
    };
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Rodux);
local v2 = require(l_Parent_0.Packages.Framework);
local l_TestHelpers_0 = v2.TestHelpers;
local l_ContextServices_0 = v2.ContextServices;
local v5 = {
    l_ContextServices_0.Analytics.mock(),
    l_ContextServices_0.Localization.mock(),
    require(l_Parent_0.Src.Resources.MakeTheme)(true),
    (l_ContextServices_0.Store.new(v1.Store.new(require(l_Parent_0.Src.Reducers), require(l_Parent_0.Src.InitialStoreState), {
        v1.thunkMiddleware
    }, nil)))
};
return function(v6)
    assert(type(v6) == "table", "Expected story to be a table");
    return l_TestHelpers_0.provideMockContext(v5, v6);
end;


sanitizeIconSearchInput = function(v0)
    return (string.lower((string.gsub(string.gsub(string.gsub(string.gsub(string.gsub(string.gsub(v0, "\226\128\147", "-"), "\226\128\148", "-"), "\226\128\144", "-"), "\226\128\145", "-"), "\226\136\146", "-"), "%-", "%%-"))));
end;
return sanitizeIconSearchInput;


return function()
    if not require(script.Parent.DebugFlags).RunningUnderCLI() then
        if game:GetFastFlag("EnableTagEditorPlugin7") then
            return true;
        else
            return false;
        end;
    else
        return false;
    end;
end;


return function(v0, v1)
    if v0 then
        require(script.Parent.commonInit)();
        local l_Parent_0 = script.Parent.Parent;
        if game:GetFastFlag("EnableTerrainEditor2") then
            local v3 = require(l_Parent_0.Packages.React);
            local v4 = require(l_Parent_0.Packages.ReactRoblox);
            local v5 = require(l_Parent_0.Packages.Dev.DeveloperTools);
            local v6 = require(l_Parent_0.Packages.TestLoader);
            local v7 = require(l_Parent_0.Src.MainPlugin);
            local v8 = nil;
            local v9 = nil;
            if v6.hasInternalPermission() then
                v9 = v5.forPlugin(l_Parent_0.Name, v0);
            end;
            local function v11()
                v0.Name = l_Parent_0.Name;
                local v10 = v3.createElement(v7, {
                    Plugin = v0,
                    PluginLoaderContext = v1
                });
                v8 = v4.createRoot(Instance.new("Frame"));
                v8:render(v10);
                if v9 then
                    v9:addRoactTree("Roact tree", v8);
                end;
            end;
            v0.Unloading:Connect(function()
                if v9 then
                    v9:destroy();
                end;
                if v8 then
                    v8:render(nil);
                end;
            end);
            v11();
            return ;
        else
            return ;
        end;
    else
        return ;
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("TerrainEditor");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_LayoutOrderIterator_0 = v2.Util.LayoutOrderIterator;
local l_useCallback_0 = v1.useCallback;
local l_useEffect_0 = v1.useEffect;
local l_useRef_0 = v1.useRef;
local l_useState_0 = v1.useState;
local l_Pane_0 = v2.UI.Pane;
local v9 = require(l_script_FirstAncestor_0.Src.Components.Toolbar);
local v10 = require(l_script_FirstAncestor_0.Src.Components.ToolGizmos);
local v11 = require(l_script_FirstAncestor_0.Src.Components.ToolSettings);
local v12 = require(l_script_FirstAncestor_0.Src.Controllers.PluginController);
local v13 = require(l_script_FirstAncestor_0.Src.Flags.getFFlagTerrainEditorCompactMode);
return function()
    local v14 = v12:use();
    local v15, v16 = l_useState_0(Vector2.new(0, 0));
    local v17 = l_useRef_0();
    l_useEffect_0(function()
        if v17.current then
            v14:setRoot(v17.current.Parent);
            if v13() then
                v14:setPluginWidth(v17.current.AbsoluteSize.X);
            end;
        end;
    end, {});
    local v18 = l_useCallback_0(function()
        if v17.current then
            v14:setPluginWidth(v17.current.AbsoluteSize.X);
        end;
    end, {
        v14
    });
    local v19 = l_LayoutOrderIterator_0.new();
    return v1.createElement(l_Pane_0, {
        ForwardRef = v17,
        Size = UDim2.fromScale(1, 1),
        Layout = Enum.FillDirection.Vertical,
        VerticalAlignment = Enum.VerticalAlignment.Top,
        [v1.Change.AbsoluteSize] = if not v13() then nil else v18
    }, {
        Toolbar = v1.createElement(v9, {
            LayoutOrder = v19:getNextOrder(),
            OnAbsoluteSizeChanged = v16
        }),
        ToolSettings = v1.createElement(v11, {
            LayoutOrder = v19:getNextOrder(),
            Size = UDim2.new(1, 0, 1, -v15.Y)
        }),
        ToolGizmos = v1.createElement(v10, {
            LayoutOrder = v19:getNextOrder(),
            Size = UDim2.new()
        })
    });
end;


local v0 = require(script:FindFirstAncestor("TerrainEditor").Packages.React);
return function(v1)
    local l_Adornee_0 = v1.Adornee;
    local l_AlwaysOnTop_0 = v1.AlwaysOnTop;
    return v0.createElement("BoxHandleAdornment", {
        Adornee = l_Adornee_0,
        AlwaysOnTop = l_AlwaysOnTop_0,
        Color3 = v1.Color,
        CFrame = v1.Transform,
        Size = v1.Size,
        Transparency = if not l_AlwaysOnTop_0 then nil else v1.Transparency,
        ZIndex = 0
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("TerrainEditor");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Packages.Roact);
local l_useEffect_0 = v1.useEffect;
local l_useRef_0 = v1.useRef;
local v5 = require(script.Parent.Border);
local v6 = require(l_script_FirstAncestor_0.Src.Util.getBoxBorderDimensions);
return function(v7)
    local v8 = l_useRef_0(false);
    l_useEffect_0(function()
        local l_current_0 = v8.current;
        if not (not l_current_0 or not l_current_0:IsA("WireframeHandleAdornment")) then
            l_current_0:clear();
            if v7.Lines then
                l_current_0:addLines(v7.Lines);
            end;
        end;
    end, {
        v7.Lines
    });
    local l_Adornee_0 = v7.Adornee;
    local l_AlwaysOnTop_0 = v7.AlwaysOnTop;
    local l_Color_0 = v7.Color;
    local l_LineThickness_0 = v7.LineThickness;
    local l_Lines_0 = v7.Lines;
    local l_Scale_0 = v7.Scale;
    local l_Size_0 = v7.Size;
    local l_Transform_0 = v7.Transform;
    local l_Transparency_0 = v7.Transparency;
    local v19 = v6(l_Transform_0, l_Size_0, l_LineThickness_0);
    local v20 = {};
    for v21, v22 in v19, nil, nil do
        v20[v21] = v1.createElement(v5, {
            Adornee = l_Adornee_0,
            AlwaysOnTop = l_AlwaysOnTop_0,
            Transform = v22.Transform,
            Color = l_Color_0,
            Size = v22.Size,
            Transparency = l_Transparency_0
        });
    end;
    return v1.createElement("Folder", {}, {
        Borders = v1.createElement("Folder", {}, v20),
        Main = v1.createElement("BoxHandleAdornment", {
            AlwaysOnTop = l_AlwaysOnTop_0,
            Adornee = l_Adornee_0,
            CFrame = l_Transform_0,
            Color3 = l_Color_0,
            Transparency = l_Transparency_0,
            Size = l_Size_0,
            ZIndex = 0
        }),
        Lines = if not l_Lines_0 then nil else v1.createElement("WireframeHandleAdornment", {
            AlwaysOnTop = l_AlwaysOnTop_0,
            Adornee = l_Adornee_0,
            CFrame = l_Transform_0,
            Color3 = l_Color_0,
            Transparency = l_Transparency_0 * 0.8,
            Scale = l_Scale_0,
            ZIndex = 0,
            [v2.Ref] = v8
        })
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("TerrainEditor");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Packages.ReactRoblox);
local v3 = require(script.Fill);
return function(v4)
    local l_Adornee_0 = v4.Adornee;
    local l_Color_0 = v4.Color;
    local l_LineThickness_0 = v4.LineThickness;
    local l_Lines_0 = v4.Lines;
    local l_Scale_0 = v4.Scale;
    local l_Size_0 = v4.Size;
    local l_Transform_0 = v4.Transform;
    local l_Transparency_0 = v4.Transparency;
    return v2.createPortal({
        RegionVisual = v1.createElement("Folder", {}, {
            OnTopBox = v1.createElement(v3, {
                Adornee = l_Adornee_0,
                AlwaysOnTop = true,
                Color = l_Color_0,
                LineThickness = l_LineThickness_0,
                Lines = l_Lines_0,
                Scale = l_Scale_0,
                Size = l_Size_0,
                Transform = l_Transform_0,
                Transparency = l_Transparency_0
            }),
            InTopBox = v1.createElement(v3, {
                Adornee = l_Adornee_0,
                AlwaysOnTop = false,
                Color = l_Color_0,
                LineThickness = l_LineThickness_0,
                Lines = l_Lines_0,
                Scale = l_Scale_0,
                Size = l_Size_0,
                Transform = l_Transform_0,
                Transparency = l_Transparency_0
            })
        })
    }, game:GetService("CoreGui"));
end;


local v0 = require(script:FindFirstAncestor("TerrainEditor").Packages.React);
return function(v1)
    local l_Adornee_0 = v1.Adornee;
    local l_CFrame_0 = v1.CFrame;
    local l_Color_0 = v1.Color;
    local l_Size_0 = v1.Size;
    local l_Transparency_0 = v1.Transparency;
    return v0.createElement(v0.Fragment, {}, {
        OnTop = v0.createElement("BoxHandleAdornment", {
            Adornee = l_Adornee_0,
            AlwaysOnTop = true,
            CFrame = l_CFrame_0,
            Color = l_Color_0,
            Size = l_Size_0,
            Transparency = l_Transparency_0,
            ZIndex = 0
        }),
        Outline = v0.createElement("BoxHandleAdornment", {
            Adornee = l_Adornee_0,
            CFrame = l_CFrame_0,
            Color = l_Color_0,
            Size = l_Size_0,
            Transparency = l_Transparency_0
        })
    });
end;


local v0 = require(script:FindFirstAncestor("TerrainEditor").Packages.React);
return function(v1)
    local l_Adornee_0 = v1.Adornee;
    local l_CFrame_0 = v1.CFrame;
    local l_Color_0 = v1.Color;
    local l_Height_0 = v1.Height;
    local l_Radius_0 = v1.Radius;
    local l_Transparency_0 = v1.Transparency;
    return v0.createElement(v0.Fragment, {}, {
        OnTop = v0.createElement("CylinderHandleAdornment", {
            Adornee = l_Adornee_0,
            AlwaysOnTop = true,
            CFrame = l_CFrame_0,
            Color = l_Color_0,
            Height = l_Height_0,
            Radius = l_Radius_0,
            Transparency = l_Transparency_0,
            ZIndex = 0
        }),
        Outline = v0.createElement("CylinderHandleAdornment", {
            Adornee = l_Adornee_0,
            CFrame = l_CFrame_0,
            Color = l_Color_0,
            Height = l_Height_0,
            Radius = l_Radius_0,
            Transparency = l_Transparency_0
        })
    });
end;


local v0 = require(script:FindFirstAncestor("TerrainEditor").Packages.React);
return function(v1)
    local l_Adornee_0 = v1.Adornee;
    local l_CFrame_0 = v1.CFrame;
    local l_Color_0 = v1.Color;
    local l_Radius_0 = v1.Radius;
    local l_Transparency_0 = v1.Transparency;
    return v0.createElement(v0.Fragment, {}, {
        OnTop = v0.createElement("SphereHandleAdornment", {
            Adornee = l_Adornee_0,
            AlwaysOnTop = true,
            CFrame = l_CFrame_0,
            Color = l_Color_0,
            Radius = l_Radius_0,
            Transparency = l_Transparency_0,
            ZIndex = 0
        }),
        Outline = v0.createElement("SphereHandleAdornment", {
            Adornee = l_Adornee_0,
            CFrame = l_CFrame_0,
            Color = l_Color_0,
            Radius = l_Radius_0,
            Transparency = l_Transparency_0
        })
    });
end;