local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Parent_1 = script.Parent;
local v6 = require(l_Parent_1.BiomeSelector);
local v7 = require(l_Parent_1.LabeledSlider);
local v8 = require(l_Parent_1.LabeledToggle);
local v9 = require(l_Parent_0.Src.Util.Constants);
local v10 = v2.PureComponent:extend("BiomeSettingsFragment");
v10.render = function(v11)
    local l_Localization_0 = v11.props.Localization;
    local v13 = v11.props.LayoutOrder or 1;
    return v2.createFragment({
        BiomeSelect = v2.createElement(v6, {
            LayoutOrder = v13,
            biomeSelection = v11.props.biomeSelection,
            selectBiome = v11.props.selectBiome
        }),
        BiomeSize = v2.createElement(v7, {
            LayoutOrder = v13 + 1,
            Text = l_Localization_0:getText("Generate", "BiomeSize"),
            Min = v9.MIN_BIOME_SIZE,
            Max = v9.MAX_BIOME_SIZE,
            SnapIncrement = v9.BIOME_SNAP_INCREMENT,
            Value = v11.props.biomeSize,
            SetValue = v11.props.setBiomeSize
        }),
        CavesToggle = v2.createElement(v8, {
            LayoutOrder = v13 + 3,
            Text = l_Localization_0:getText("Generate", "Caves"),
            IsOn = v11.props.haveCaves,
            SetIsOn = v11.props.setHaveCaves
        })
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization
})(v10));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v5 = require(l_Parent_0.Src.Util.Constants);
local l_Parent_1 = script.Parent.Parent;
local v7 = require(l_Parent_1.LabeledSlider);
local v8 = require(l_Parent_1.PropertyLock);
local l_TerrainEditorOverhaul_0 = game:GetFastFlag("TerrainEditorOverhaul");
local v10 = v2.PureComponent:extend("BrushBaseSizeSlider");
v10.render = function(v11)
    local l_Localization_0 = v11.props.Localization;
    return v2.createElement(v7, {
        LayoutOrder = v11.props.LayoutOrder,
        Text = l_Localization_0:getText("BrushSettings", "BaseSize"),
        Min = v5.MIN_BRUSH_SIZE,
        Max = v5.MAX_BRUSH_SIZE,
        SnapIncrement = 1,
        Value = v11.props.baseSize,
        SetValue = v11.props.setBaseSize,
        Tooltip = if not l_TerrainEditorOverhaul_0 then nil else l_Localization_0:getText("BrushSettings", "BaseSizeTooltip")
    }, {
        SizeHeightLock = v11.props.ShowLock and v2.createElement(v8, {
            Locked = v11.props.IsLocked,
            Clicked = v11.props.ToggleLock
        })
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization
})(v10));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_BrushMode_0 = require(l_Parent_0.Src.Util.TerrainEnums).BrushMode;
local l_Parent_1 = script.Parent.Parent;
local v7 = require(l_Parent_1.LabeledElementPair);
local v8 = require(l_Parent_1.SingleSelectButtonGroup);
local l_UserInputService_0 = game:GetService("UserInputService");
local v10 = v2.PureComponent:extend("BrushModeSelector");
v10.didMount = function(v11)
    v11.inputBegan = l_UserInputService_0.InputBegan:Connect(function(v12)
        if not (v12.KeyCode ~= Enum.KeyCode.LeftControl and v12.KeyCode ~= Enum.KeyCode.RightControl) or v12.KeyCode == Enum.KeyCode.B then
            v11:setState({});
        end;
    end);
    v11.inputEnded = l_UserInputService_0.InputEnded:Connect(function(v13)
        if not (v13.KeyCode ~= Enum.KeyCode.LeftControl and v13.KeyCode ~= Enum.KeyCode.RightControl) or v13.KeyCode == Enum.KeyCode.B then
            v11:setState({});
        end;
    end);
end;
v10.willUnmount = function(v14)
    if v14.inputBegan then
        v14.inputBegan:Disconnect();
    end;
    if v14.inputEnded then
        v14.inputEnded:Disconnect();
    end;
end;
v10.render = function(v15)
    local l_Localization_0 = v15.props.Localization;
    local l_LayoutOrder_0 = v15.props.LayoutOrder;
    local l_brushMode_0 = v15.props.brushMode;
    local l_setBrushMode_0 = v15.props.setBrushMode;
    local _ = v15.props.currentTool;
    if not (not l_UserInputService_0:IsKeyDown(Enum.KeyCode.LeftControl) and not l_UserInputService_0:IsKeyDown(Enum.KeyCode.RightControl) or l_UserInputService_0:IsKeyDown(Enum.KeyCode.B)) then
        if l_brushMode_0 == l_BrushMode_0.Add then
            l_brushMode_0 = l_BrushMode_0.Subtract;
        elseif l_brushMode_0 == l_BrushMode_0.Subtract then
            l_brushMode_0 = l_BrushMode_0.Add;
        end;
    end;
    return v2.createElement(v7, {
        Size = UDim2.new(1, 0, 0, 22),
        Text = l_Localization_0:getText("BrushSettings", "BrushMode"),
        LayoutOrder = l_LayoutOrder_0,
        Tooltip = l_Localization_0:getText("BrushSettings", "BrushModeTooltip")
    }, {
        v2.createElement(v8, {
            Size = UDim2.new(0, 141, 0, 22),
            Selected = l_brushMode_0,
            Select = l_setBrushMode_0,
            Options = {
                {
                    Text = l_Localization_0:getText("BrushSettings", "Add"),
                    Data = l_BrushMode_0.Add
                },
                {
                    Text = l_Localization_0:getText("BrushSettings", "Subtract"),
                    Data = l_BrushMode_0.Subtract
                }
            }
        })
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization
})(v10));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local l_withContext_0 = v1.ContextServices.withContext;
local v4 = require(l_Parent_0.Src.ContextItems);
local l_BrushShape_0 = require(l_Parent_0.Src.Util.TerrainEnums).BrushShape;
local v6 = require(script.Parent.Parent.SelectableImageButton);
local v7 = v2.PureComponent:extend("BrushShapeSelector");
v7.render = function(v8)
    local v9 = v8.props.Theme:get();
    local l_LayoutOrder_0 = v8.props.LayoutOrder;
    local l_brushShape_0 = v8.props.brushShape;
    local l_setBrushShape_0 = v8.props.setBrushShape;
    local v13 = {
        {
            l_BrushShape_0.Sphere,
            v9.brushSettingsTheme.sphereBrushImage
        },
        {
            l_BrushShape_0.Cube,
            v9.brushSettingsTheme.cubeBrushImage
        },
        {
            l_BrushShape_0.Cylinder,
            v9.brushSettingsTheme.cylinderBrushImage
        }
    };
    local v14 = {
        Padding = v2.createElement("UIPadding", {
            PaddingRight = UDim.new(0, 5),
            PaddingLeft = UDim.new(0, 5)
        }),
        Layout = v2.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Horizontal,
            VerticalAlignment = Enum.VerticalAlignment.Center,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            SortOrder = Enum.SortOrder.LayoutOrder,
            Padding = UDim.new(0.05, 0)
        })
    };
    for v15, v16 in ipairs(v13) do
        v14[v16[1]] = v2.createElement(v6, {
            LayoutOrder = v15,
            Item = v16[1],
            Image = v16[2],
            IsSelected = l_brushShape_0 == v16[1],
            SelectItem = l_setBrushShape_0
        });
    end;
    return v2.createElement("Frame", {
        Size = UDim2.new(0, 270, 0, 42),
        BackgroundTransparency = 1,
        LayoutOrder = l_LayoutOrder_0
    }, {
        v2.createElement("Frame", {
            Size = UDim2.new(0, 230, 1, 0),
            Position = UDim2.new(0, 20, 0, 0),
            BackgroundColor3 = v9.backgroundColor,
            BorderColor3 = v9.borderColor
        }, v14)
    });
end;
return (l_withContext_0({
    Theme = v4.DEPRECATED_Theme
})(v7));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v5 = require(l_Parent_0.Src.ContextItems);
local l_FlattenMode_0 = require(l_Parent_0.Src.Util.TerrainEnums).FlattenMode;
local l_Parent_1 = script.Parent.Parent;
local v8 = require(l_Parent_1.LabeledElementPair);
local v9 = require(l_Parent_1.SelectableImageButton);
local v10 = Color3.fromRGB(228, 238, 254);
local v11 = Color3.fromRGB(227, 227, 227);
local v12 = v2.PureComponent:extend("FlattenModeSelector");
v12.render = function(v13)
    local v14 = v13.props.Theme:get();
    local l_Localization_0 = v13.props.Localization;
    local l_LayoutOrder_0 = v13.props.LayoutOrder;
    local l_flattenMode_0 = v13.props.flattenMode;
    local l_setFlattenMode_0 = v13.props.setFlattenMode;
    local v19 = {
        {
            l_FlattenMode_0.Erode,
            v14.brushSettingsTheme.flattenErodeImage
        },
        {
            l_FlattenMode_0.Grow,
            v14.brushSettingsTheme.flattenGrowImage
        },
        {
            l_FlattenMode_0.Both,
            v14.brushSettingsTheme.flattenBothImage
        }
    };
    local v20 = {
        UIListLayout = v2.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            FillDirection = Enum.FillDirection.Horizontal,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            VerticalAlignment = Enum.VerticalAlignment.Center
        })
    };
    for v21, v22 in ipairs(v19) do
        v20[v22[1]] = v2.createElement(v9, {
            LayoutOrder = v21,
            Item = v22[1],
            Image = v22[2],
            IsSelected = l_flattenMode_0 == v22[1],
            SelectItem = l_setFlattenMode_0,
            Size = UDim2.new(0, 40, 0, 40),
            BackgroundColor3 = v10,
            SelectedTransparency = 0
        });
    end;
    return v2.createElement(v8, {
        LayoutOrder = l_LayoutOrder_0,
        Size = UDim2.new(1, 0, 0, 48),
        BackgroundTransparency = 1,
        Text = l_Localization_0:getText("BrushSettings", "FlattenMode")
    }, {
        FlattenModes = v2.createElement("ImageLabel", {
            Size = UDim2.new(0, 120, 0, 40),
            Image = v14.roundedBorderImage,
            ImageTransparency = 0,
            ImageColor3 = v11,
            ScaleType = Enum.ScaleType.Slice,
            SliceCenter = v14.roundedBorderSlice,
            BackgroundTransparency = 1
        }, v20)
    });
end;
return (l_withContext_0({
    Theme = v5.DEPRECATED_Theme,
    Localization = l_ContextServices_0.Localization
})(v12));


local v0 = require(script.Parent.Parent.Parent.Parent.Parent.Parent.Packages.Roact);
local l_Parent_0 = script.Parent.Parent;
local v2 = require(l_Parent_0.LabeledElementPair);
local v3 = require(l_Parent_0.NumberTextInput);
local l_PickerButton_0 = require(l_Parent_0.ToggleButtons).PickerButton;
local v5 = v0.PureComponent:extend("HeightSelectionToggle");
v5.init = function(v6, _)
    v6.onFocused = function()
        if v6.props.setHeightPicker then
            v6.props.setHeightPicker(false);
        end;
    end;
    v6.onFocusLost = function(_, _, v10, v11)
        if v6.props.setHeightPicker then
            v6.props.setHeightPicker(false);
        end;
        local l_setPlanePositionY_0 = v6.props.setPlanePositionY;
        if not (not v11 or not l_setPlanePositionY_0) then
            spawn(function()
                l_setPlanePositionY_0(v10);
            end);
        end;
    end;
    v6.onValueChanged = function(_, v14, v15)
        if not (not v15 or not v6.props.setPlanePositionY) then
            v6.props.setPlanePositionY(v14);
        end;
    end;
end;
v5.render = function(v16)
    local l_props_0 = v16.props;
    return v0.createElement(v2, {
        LayoutOrder = l_props_0.LayoutOrder,
        Size = UDim2.new(1, 0, 0, 22),
        Text = l_props_0.Label,
        Padding = UDim.new(0, 4),
        SizeToContent = true,
        ContentDirection = Enum.FillDirection.Horizontal
    }, {
        Input = v0.createElement(v3, {
            LayoutOrder = 1,
            Width = UDim.new(0, 116),
            Key = "Y",
            Label = "Y",
            Value = l_props_0.planePositionY,
            Precision = 3,
            OnFocused = v16.onFocused,
            OnFocusLost = v16.onFocusLost,
            OnValueChanged = v16.onValueChanged
        }),
        HeightPickerContainer = v0.createElement("Frame", {
            LayoutOrder = 2,
            BackgroundTransparency = 1,
            Size = UDim2.new(0, 18, 0, 21)
        }, {
            HeightPicker = v0.createElement(l_PickerButton_0, {
                Position = UDim2.new(0, 0, 0, 3),
                IsOn = l_props_0.heightPicker,
                SetIsOn = l_props_0.setHeightPicker
            })
        })
    });
end;
return v5;


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_PivotType_0 = require(l_Parent_0.Src.Util.TerrainEnums).PivotType;
local l_Parent_1 = script.Parent.Parent;
local v7 = require(l_Parent_1.LabeledElementPair);
local v8 = require(l_Parent_1.SingleSelectButtonGroup);
local v9 = v2.PureComponent:extend("PivotSelector");
v9.render = function(v10)
    local l_Localization_0 = v10.props.Localization;
    return v2.createElement(v7, {
        Size = UDim2.new(1, 0, 0, 22),
        Text = l_Localization_0:getText("BrushSettings", "PivotPosition"),
        LayoutOrder = v10.props.LayoutOrder
    }, {
        v2.createElement(v8, {
            Size = UDim2.new(0, 141, 0, 22),
            Selected = v10.props.pivot,
            Select = v10.props.setPivot,
            Options = {
                {
                    Text = l_Localization_0:getText("BrushSettings", "BottomPivot"),
                    Data = l_PivotType_0.Bottom
                },
                {
                    Text = l_Localization_0:getText("BrushSettings", "CenterPivot"),
                    Data = l_PivotType_0.Center
                },
                {
                    Text = l_Localization_0:getText("BrushSettings", "TopPivot"),
                    Data = l_PivotType_0.Top
                }
            }
        })
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization
})(v9));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v5 = require(l_Parent_0.Src.ContextItems);
local l_UI_0 = v1.UI;
local l_Button_0 = l_UI_0.Button;
local l_IconButton_0 = l_UI_0.IconButton;
local l_Pane_0 = l_UI_0.Pane;
local l_Tooltip_0 = l_UI_0.Tooltip;
local v11 = require(l_Parent_0.Src.Components.Tools.ToolParts.LabeledElementPair);
local v12 = v2.PureComponent:extend(script.Name);
v12.render = function(v13)
    local l_props_0 = v13.props;
    local l_Localization_0 = l_props_0.Localization;
    local v16 = l_props_0.Theme:get();
    local l_EditPlaneMode_0 = l_props_0.EditPlaneMode;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local v19 = l_Localization_0:getText("BrushSettings", "EditPlane");
    local v20 = l_Localization_0:getText("BrushSettings", "EditPlaneTooltip");
    local _ = nil;
    return v2.createElement(v11, {
        Size = UDim2.new(1, 0, 0, 18),
        Text = v19,
        LayoutOrder = l_LayoutOrder_0
    }, {
        ToggleButton = v2.createElement(l_Pane_0, {
            Size = UDim2.new(1, 0, 1, 0),
            Layout = Enum.FillDirection.Horizontal,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            Spacing = 4
        }, {
            Action = v2.createElement(l_Button_0, {
                LayoutOrder = 1,
                Size = UDim2.new(0, 114, 0, 22),
                Style = "RoundPrimary",
                Text = if not l_EditPlaneMode_0 then l_Localization_0:getText("BrushSettings", "Edit") else l_Localization_0:getText("BrushSettings", "Apply"),
                OnClick = function()
                    v13.props.SetEditPlaneMode(not v13.props.EditPlaneMode);
                end
            }, {
                Tooltip = v2.createElement(l_Tooltip_0, {
                    Text = v20
                })
            }),
            Reset = v2.createElement(l_IconButton_0, {
                LayoutOrder = 2,
                Size = UDim2.new(0, 22, 0, 22),
                IconColor = v16.iconButton.buttonIconColor,
                LeftIcon = v16.iconButton.resetIcon,
                OnClick = v13.props.Reset
            })
        })
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Theme = v5.DEPRECATED_Theme
})(v12));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_PlaneLockType_0 = require(l_Parent_0.Src.Util.TerrainEnums).PlaneLockType;
local l_Parent_1 = script.Parent.Parent;
local v7 = require(l_Parent_1.LabeledElementPair);
local v8 = require(l_Parent_1.SingleSelectButtonGroup);
local v9 = v2.PureComponent:extend("PlaneLockSelector");
local v10 = game:DefineFastFlag("TerrainEditorFixDETruncations", false);
v9.render = function(v11)
    local l_Localization_0 = v11.props.Localization;
    return v2.createElement(v7, {
        Size = UDim2.new(1, 0, 0, 22),
        Text = l_Localization_0:getText("BrushSettings", "PlaneLock"),
        LayoutOrder = v11.props.LayoutOrder
    }, {
        v2.createElement(v8, {
            Size = if not v10 then UDim2.new(0, 141, 0, 22) else UDim2.new(0, 150, 0, 22),
            Selected = v11.props.planeLock,
            Select = v11.props.setPlaneLock,
            Options = {
                {
                    Text = l_Localization_0:getText("BrushSettings", "Off"),
                    Data = l_PlaneLockType_0.Off
                },
                {
                    Text = l_Localization_0:getText("BrushSettings", "Auto"),
                    Data = l_PlaneLockType_0.Auto
                },
                {
                    Text = l_Localization_0:getText("BrushSettings", "Manual"),
                    Data = l_PlaneLockType_0.Manual
                }
            }
        })
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization
})(v9));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local l_withContext_0 = v1.ContextServices.withContext;
local v4 = require(l_Parent_0.Src.ContextItems);
local l_StyleModifier_0 = v1.Util.StyleModifier;
local l_Button_0 = v1.UI.Button;
local v7 = v2.PureComponent:extend("ButtonGroup");
v7.render = function(v8)
    local l_props_0 = v8.props;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local v11 = l_props_0.Buttons or {};
    local v12 = {
        UIListLayout = v2.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            Padding = UDim.new(0, 4),
            FillDirection = Enum.FillDirection.Horizontal,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            VerticalAlignment = Enum.VerticalAlignment.Center
        })
    };
    local v13 = math.max(200 / #v11, 64);
    for v14, v15 in ipairs(v11) do
        v12[v15.Key] = v2.createElement(l_Button_0, {
            OnClick = v15.OnClicked,
            LayoutOrder = v14,
            Size = UDim2.new(0, v13, 0, 28),
            Style = not l_props_0.Style and "Round" or l_props_0.Style,
            StyleModifier = if not v15.Active then l_StyleModifier_0.Disabled else nil,
            Text = v15.Name
        });
    end;
    return v2.createElement("Frame", {
        LayoutOrder = l_LayoutOrder_0,
        Size = UDim2.new(1, 0, 0, 52),
        BackgroundTransparency = 1
    }, v12);
end;
return (l_withContext_0({
    Theme = v4.DEPRECATED_Theme
})(v7));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Parent_1 = script.Parent;
local v6 = require(l_Parent_1.LabeledToggle);
local v7 = require(l_Parent_1.Panel);
local v8 = v2.PureComponent:extend(script.Name);
v8.render = function(v9)
    local l_Localization_0 = v9.props.Localization;
    return v2.createElement(v7, {
        Title = l_Localization_0:getText("EditSettings", "EditSettings"),
        Padding = UDim.new(0, 12),
        LayoutOrder = v9.props.LayoutOrder
    }, {
        MergeEmptyToggle = v2.createElement(v6, {
            LayoutOrder = 1,
            Text = l_Localization_0:getText("EditSettings", "MergeEmpty"),
            IsOn = v9.props.mergeEmpty,
            SetIsOn = v9.props.setMergeEmpty
        })
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization
})(v8));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local l_withContext_0 = v1.ContextServices.withContext;
local v4 = require(l_Parent_0.Src.ContextItems);
local v5 = require(l_Parent_0.Src.Util.Constants);
local v6 = require(l_Parent_0.Src.Components.StatusIcon);
local v7 = require(l_Parent_0.Src.Components.TeachingCallout);
local l_Tooltip_0 = v1.UI.Tooltip;
local l_TextService_0 = game:GetService("TextService");
local v10 = v2.PureComponent:extend(script.Name);
local v11 = game:DefineFastFlag("TerrainEditorFixDETruncations", false);
v10.init = function(v12)
    v12.mainFrameRef = v2.createRef();
    v12.DEPRECATED_contentFrameRef = v2.createRef();
    v12.labelLayoutRef = v2.createRef();
    v12.contentLayoutRef = v2.createRef();
    v12.resizeToContent = function()
        local l_current_0 = v12.mainFrameRef.current;
        if l_current_0 then
            local l_current_1 = v12.labelLayoutRef.current;
            local l_current_2 = v12.contentLayoutRef.current;
            local v16 = nil;
            if l_current_1 then
                v16 = l_current_1.AbsoluteContentSize.Y;
            end;
            if l_current_2 then
                v16 = math.max(v16 or 0, l_current_2.AbsoluteContentSize.Y);
            end;
            if v16 then
                l_current_0.Size = UDim2.new(l_current_0.Size.X.Scale, l_current_0.Size.X.Offset, 0, v16);
            end;
        end;
    end;
end;
v10.didMount = function(v17)
    if v17.props.SizeToContent then
        v17.resizeToContent();
    end;
end;
v10.render = function(v18)
    local v19 = v18.props.Theme:get();
    local v20 = v18.props.Padding or UDim.new(0, 0);
    local v21 = v18.props.Text or "";
    local l_Size_0 = v18.props.Size;
    local l_LayoutOrder_0 = v18.props.LayoutOrder;
    local v24 = v18.props.ContentDirection or Enum.FillDirection.Vertical;
    local l_TeachingCallout_0 = v18.props.TeachingCallout;
    local l_Tooltip_1 = v18.props.Tooltip;
    local l_SizeToContent_0 = v18.props.SizeToContent;
    local v28 = true;
    if v18.props.Visible ~= nil then
        v28 = v18.props.Visible;
    end;
    local v29 = v18.props[v2.Children];
    if not (not l_SizeToContent_0 or not v29) then
        v29.UIListLayout = v2.createElement("UIListLayout", {
            Padding = v20,
            FillDirection = v24,
            SortOrder = Enum.SortOrder.LayoutOrder,
            [v2.Change.AbsoluteContentSize] = v18.resizeToContent,
            [v2.Ref] = v18.contentLayoutRef
        });
    end;
    local v30 = (v18.props.ErrorMessage or v18.props.WarningMessage) or v18.props.InfoMessage;
    local l_textSize_0 = v19.textSize;
    local l_font_0 = v19.font;
    local v33 = {};
    local v34 = UDim2.new(1, 0, 1, 0);
    local v35 = nil;
    if v11 then
        v35 = if v5.OVERFLOW_THRESHOLD < l_TextService_0:GetTextSize(v21, l_textSize_0, l_font_0, Vector2.new(0, 0)).X then v5.OVERFLOW_PADDING else 0;
    end;
    if v30 then
        local l_l_TextService_0_TextSize_0 = l_TextService_0:GetTextSize(v21, l_textSize_0, l_font_0, Vector2.new(v5.FIRST_COLUMN_WIDTH, math.huge));
        local v37 = nil;
        v37 = if not v11 then math.min(math.ceil(l_l_TextService_0_TextSize_0.x) + 2, v5.FIRST_COLUMN_WIDTH) else math.min(math.ceil(l_l_TextService_0_TextSize_0.x) + 2, v5.FIRST_COLUMN_WIDTH) + v35;
        v34 = UDim2.new(0, v37, 0, math.ceil(l_l_TextService_0_TextSize_0.y) + 2);
        local v38 = (v37 + 4) + 18 <= v5.FIRST_COLUMN_WIDTH;
        local v39 = not v38 and 0 or 2;
        v33.UIListLayout = v2.createElement("UIListLayout", {
            Padding = UDim.new(0, 4),
            SortOrder = Enum.SortOrder.LayoutOrder,
            FillDirection = not not v38 and Enum.FillDirection.Horizontal or Enum.FillDirection.Vertical,
            [v2.Change.AbsoluteContentSize] = v18.resizeToContent,
            [v2.Ref] = v18.labelLayoutRef
        });
        v33.StatusIconContainer = v2.createElement("Frame", {
            LayoutOrder = 2,
            Size = UDim2.new(0, 18, 0, 18 + v39),
            BackgroundTransparency = 1
        }, {
            StatusIcon = v2.createElement(v6, {
                AnchorPoint = Vector2.new(0, 1),
                Position = UDim2.new(0, 0, 1, 0),
                ErrorMessage = v18.props.ErrorMessage,
                WarningMessage = v18.props.WarningMessage,
                InfoMessage = v18.props.InfoMessage
            })
        });
    end;
    v33.LabelContainer = v2.createElement("Frame", {
        LayoutOrder = 1,
        Size = v34,
        BackgroundTransparency = 1
    }, {
        Label = v2.createElement("TextLabel", {
            Position = UDim2.new(0, 0, 0, 2),
            Size = UDim2.new(1, 0, 1, -2),
            BackgroundTransparency = 1,
            Text = v21,
            TextSize = l_textSize_0,
            Font = l_font_0,
            TextWrapped = true,
            TextColor3 = v19.textColor,
            TextXAlignment = Enum.TextXAlignment.Left,
            TextYAlignment = Enum.TextYAlignment.Top
        }),
        Tooltip = if not l_Tooltip_1 then nil else v2.createElement(l_Tooltip_0, {
            Text = l_Tooltip_1
        })
    });
    return v2.createElement("Frame", {
        BackgroundTransparency = 1,
        Size = l_Size_0,
        Visible = v28,
        LayoutOrder = l_LayoutOrder_0,
        [v2.Ref] = v18.mainFrameRef
    }, {
        LabelColumn = v2.createElement("Frame", {
            BackgroundTransparency = 1,
            Position = UDim2.new(0, v5.SIDE_PADDING, 0, 0),
            Size = if not v11 then UDim2.new(0, v5.FIRST_COLUMN_WIDTH, 1, 0) else UDim2.new(0, v5.FIRST_COLUMN_WIDTH + v35, 1, 0)
        }, v33),
        ContentColumn = v2.createElement("Frame", {
            Position = if not v11 then UDim2.new(0, v5.SECOND_COLUMN_START, 0, 0) else UDim2.new(0, v5.SECOND_COLUMN_START + v35, 0, 0),
            Size = UDim2.new(1, -(v5.SECOND_COLUMN_START + v5.SIDE_PADDING), 1, 0),
            BackgroundTransparency = 1
        }, v29),
        TeachingCallout = if not l_TeachingCallout_0 then nil else v2.createElement(v7, {
            DefinitionId = l_TeachingCallout_0.DefinitionId,
            LocationId = l_TeachingCallout_0.LocationId
        })
    });
end;
return (l_withContext_0({
    Theme = v4.DEPRECATED_Theme
})(v10));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Cryo);
local l_Parent_1 = script.Parent;
local v4 = require(l_Parent_1.LabeledElementPair);
local v5 = require(l_Parent_1.Slider);
return function(v6)
    return v1.createElement(v4, {
        Size = UDim2.new(1, 0, 0, 15),
        Text = v6.Text,
        LayoutOrder = v6.LayoutOrder,
        Tooltip = v6.Tooltip
    }, (v2.Dictionary.join(v6[v1.Children] or {}, {
        Slider = v1.createElement(v5, (v2.Dictionary.join(v6, {
            [v1.Children] = v2.None,
            LayoutOrder = v2.None,
            Text = v2.None
        })))
    })));
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local l_withContext_0 = v1.ContextServices.withContext;
local v4 = require(l_Parent_0.Src.ContextItems);
local v5 = require(l_Parent_0.Src.Util.Constants);
local l_TextService_0 = game:GetService("TextService");
local v7 = Rect.new(3, 3, 13, 13);
local v8 = v2.PureComponent:extend(script.Name);
v8.defaultProps = {
    Width = UDim.new(0, v5.SECOND_COLUMN_WIDTH)
};
v8.init = function(v9)
    v9.state = {
        warningMessage = ""
    };
    v9.textClipperFrameRef = v2.createRef();
    v9.textBoxRef = v2.createRef();
    v9.updateTextBoxOffset = function()
        local l_current_0 = v9.textBoxRef.current;
        local l_current_1 = v9.textClipperFrameRef.current;
        if l_current_0 and l_current_1 then
            local l_font_0 = l_current_0.font;
            local l_textSize_0 = l_current_0.textSize;
            local l_X_0 = l_current_1.AbsoluteSize.X;
            local l_x_0 = l_TextService_0:GetTextSize(string.sub(l_current_0.Text, 1, l_current_0.CursorPosition - 1), l_textSize_0, l_font_0, Vector2.new(0, 0)).x;
            local l_x_1 = l_TextService_0:GetTextSize(l_current_0.Text, l_textSize_0, l_font_0, Vector2.new(0, 0)).x;
            local l_Offset_0 = l_current_0.Position.X.Offset;
            if l_x_0 <= 4 - l_Offset_0 then
                l_Offset_0 = 4 - l_x_0;
            elseif l_X_0 - l_Offset_0 <= l_x_0 + 4 then
                l_Offset_0 = -((l_x_0 + 4) - l_X_0);
            end;
            l_current_0.Position = UDim2.new(0, l_Offset_0, 0, 0);
            l_current_0.Size = UDim2.new(0, math.max(l_x_1, l_X_0), 0, l_current_0.AbsoluteSize.Y);
            return ;
        else
            return ;
        end;
    end;
    v9.textBoxCheckFunc = function()
        local l_current_2 = v9.textBoxRef.current;
        if l_current_2 then
            if string.find(l_current_2.Text, "\t") then
                l_current_2.Text = l_current_2.Text:gsub("\t", "");
                l_current_2:ReleaseFocus(true);
            end;
            if v9.props.ValidateText then
                local l_Text_0 = l_current_2.Text;
                local v20 = nil;
                local v21 = "";
                local v22, v23 = v9.props.ValidateText(l_Text_0);
                v20 = v22;
                v21 = v23;
                if l_current_2.Text ~= v20 then
                    l_current_2.CursorPosition = l_current_2.CursorPosition - 1;
                    l_current_2.Text = v20;
                end;
                if v21 == nil then
                    v21 = "";
                end;
                if v9.state.warningMessage ~= v21 then
                    v9:setState({
                        warningMessage = v21
                    });
                end;
            end;
            if v9.props.MaxGraphemes and v9.props.MaxGraphemes < utf8.len(l_current_2.Text) then
                l_current_2.Text = string.sub(l_current_2.Text, 1, utf8.offset(l_current_2.Text, 1, v9.props.MaxGraphemes + 1) - 1);
            end;
            v9.updateTextBoxOffset();
            return ;
        else
            return ;
        end;
    end;
    v9.onFocus = function()
        if utf8.len(v9.state.warningMessage) == 0 then
            v9:setState({
                focused = true
            });
        end;
        if v9.props.OnFocused then
            v9.props.OnFocused();
        end;
    end;
    v9.onFocusLost = function(_, v25)
        local l_current_3 = v9.textBoxRef.current;
        if l_current_3 then
            l_current_3.Position = UDim2.new(0, 4, 0, 0);
        end;
        if utf8.len(v9.state.warningMessage) == 0 then
            v9:setState({
                focused = false
            });
        end;
        local l_current_4 = v9.textBoxRef.current;
        if not (not v9.props.OnFocusLost or not l_current_4) then
            local v28 = v9.props.OnFocusLost(v25, l_current_4.Text);
            if v28 then
                l_current_4.Text = v28;
            end;
        end;
    end;
end;
v8.render = function(v29)
    local v30 = v29.props.Theme:get();
    local l_Position_0 = v29.props.Position;
    local v32 = v29.props.Width or UDim.new(1, 0);
    local v33 = v29.props.Label or "";
    local v34 = v29.props.Text or "";
    local v35 = nil;
    v35 = v29.props.TextSize or v30.textSize;
    local l_EditingDisabled_0 = v29.props.EditingDisabled;
    local v37 = v29.props.PlaceholderText or v34;
    local v38 = v29.props.ClearTextOnFocus or false;
    local l_LayoutOrder_0 = v29.props.LayoutOrder;
    local v40 = 0;
    if utf8.len(v33) > 0 then
        v40 = l_TextService_0:GetTextSize(v33, v30.textSize, v30.font, Vector2.new()).X + 8;
    end;
    local l_warningMessage_0 = v29.state.warningMessage;
    if v29.props.WarningOverride then
        l_warningMessage_0 = v29.props.WarningOverride;
    end;
    local v42 = l_warningMessage_0 and utf8.len(l_warningMessage_0) > 0;
    local v43 = nil;
    local v44 = nil;
    local v45 = UDim2.new(1, 0, 0, 24);
    if v42 then
        v43 = UDim2.new(v32.Scale, v32.Offset, 0, 48);
        v44 = v30.errorColor;
    else
        v43 = UDim2.new(v32.Scale, v32.Offset, 0, 24);
        v44 = if not v29.state.focused then v30.borderColor else v30.hoveredItemColor;
    end;
    local l_createElement_0 = v2.createElement;
    local v47 = "Frame";
    local v48 = {
        Position = l_Position_0,
        Size = v43,
        LayoutOrder = l_LayoutOrder_0,
        BackgroundTransparency = 1
    };
    local v49 = {};
    local l_createElement_1 = v2.createElement;
    local v51 = "ImageLabel";
    local v52 = {
        Size = v45,
        Image = "rbxasset://textures/StudioToolbox/RoundedBorder.png",
        ImageTransparency = 0,
        ImageColor3 = v44,
        ScaleType = Enum.ScaleType.Slice,
        SliceCenter = v7,
        BackgroundTransparency = 1,
        [v2.Ref] = v29.textInputBorderRef
    };
    local v53 = {};
    local v54 = false;
    if v40 > 0 then
        v54 = v2.createElement("TextLabel", {
            Position = UDim2.new(0, 1, 0, 1),
            Size = UDim2.new(0, v40, 0, 22),
            BackgroundColor3 = v30.shadowColor,
            BorderSizePixel = 0,
            Text = v33,
            Font = v30.font,
            TextSize = v30.textSize,
            TextColor3 = v30.textColor,
            TextXAlignment = Enum.TextXAlignment.Center
        });
    end;
    v53.Label = v54;
    v53.TextBoxFrame = v2.createElement("Frame", {
        Position = UDim2.new(0, v40 > 0 and v40 + 1 or 2, 0, 1),
        Size = UDim2.new(1, -v40 - 4, 0, 22),
        ClipsDescendants = true,
        BorderSizePixel = 0,
        BackgroundColor3 = v30.roundTextButtonTheme.textBoxColor,
        [v2.Ref] = v29.textClipperFrameRef
    }, {
        TextBox = v2.createElement("TextBox", {
            Size = UDim2.new(1, -4, 1, 0),
            Position = UDim2.new(0, 4, 0, 0),
            BackgroundTransparency = 1,
            Text = v34,
            Font = v30.font,
            TextSize = v35,
            TextColor3 = v30.textColor,
            TextXAlignment = Enum.TextXAlignment.Left,
            ClearTextOnFocus = v38,
            PlaceholderText = v37,
            TextEditable = not l_EditingDisabled_0,
            [v2.Ref] = v29.textBoxRef,
            [v2.Change.Text] = v29.textBoxCheckFunc,
            [v2.Change.CursorPosition] = v29.updateTextBoxOffset,
            [v2.Event.Focused] = v29.onFocus,
            [v2.Event.FocusLost] = v29.onFocusLost
        })
    });
    v49.TextBox = l_createElement_1(v51, v52, v53);
    v49.Warning = v42 and v2.createElement("TextLabel", {
        Size = UDim2.new(1, 0, 0, 22),
        Position = UDim2.new(0, 0, 0, 22),
        Text = l_warningMessage_0,
        Font = v30.font,
        TextSize = v30.textSize,
        TextColor3 = v30.errorColor,
        TextXAlignment = Enum.TextXAlignment.Left,
        BackgroundTransparency = 1
    });
    return l_createElement_0(v47, v48, v49);
end;
return (l_withContext_0({
    Theme = v4.DEPRECATED_Theme
})(v8));


local v0 = require(script.Parent.Parent.Parent.Parent.Parent.Packages.Roact);
local l_Parent_0 = script.Parent;
local v2 = require(l_Parent_0.LabeledElementPair);
local l_ToggleButton_0 = require(l_Parent_0.ToggleButtons).ToggleButton;
return function(v4)
    return v0.createElement(v2, {
        Size = UDim2.new(1, 0, 0, 18),
        InfoMessage = v4.InfoMessage,
        TeachingCallout = v4.TeachingCallout,
        Text = v4.Text,
        Tooltip = v4.Tooltip,
        LayoutOrder = v4.LayoutOrder
    }, {
        ToggleButton = v0.createElement(l_ToggleButton_0, {
            IsOn = v4.IsOn,
            SetIsOn = v4.SetIsOn,
            Disabled = v4.Disabled,
            Position = UDim2.new(0, 0, 0, 3)
        })
    });
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.Cryo);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v6 = require(l_Parent_0.Src.Components.LoadingImage);
local v7 = require(script.Parent.PromptSelectorWithPreview);
local l_StudioService_0 = game:GetService("StudioService");
local v9 = v2.PureComponent:extend(script.Name);
v9.init = function(v10)
    v10.promptSelection = function()
        local v11 = {
            "png",
            "jpg",
            "jpeg"
        };
        local v12 = nil;
        local l_status_0, l_result_0 = pcall(function()
            v12 = l_StudioService_0:PromptImportFile(v11);
        end);
        if not l_status_0 then
            v10.props.SelectFile(nil, l_result_0);
        elseif v12 then
            v10.props.SelectFile(v12);
        end;
    end;
    v10.renderPreview = function()
        local l_CurrentFile_0 = v10.props.CurrentFile;
        if l_CurrentFile_0 and l_CurrentFile_0.file then
            return v2.createElement(v6, {
                BackgroundTransparency = 1,
                Size = UDim2.new(1, 0, 1, 0),
                Image = v10.props.CurrentFile.preview,
                ScaleType = Enum.ScaleType.Fit
            });
        else
            return nil;
        end;
    end;
    v10.getMetadata = function()
        local l_CurrentFile_1 = v10.props.CurrentFile;
        if l_CurrentFile_1 and l_CurrentFile_1.file then
            return {
                ("%ix%ipx"):format(l_CurrentFile_1.width, l_CurrentFile_1.height)
            };
        else
            return {};
        end;
    end;
end;
v9.render = function(v17)
    local v18 = false;
    local v19 = nil;
    if not v17.props.CurrentFile or not v17.props.CurrentFile.file then
        v19 = v17.props.Localization:getText("LocalImageSelector", "NoImageSelected");
    else
        v18 = true;
        v19 = v17.props.CurrentFile.file.Name;
    end;
    return v2.createElement(v7, (v3.Dictionary.join(v17.props, {
        CurrentFile = v3.None,
        SelectFile = v3.None,
        SelectionName = v19,
        HasSelection = v18,
        PreviewTitle = v17.props.PreviewTitle,
        RenderPreview = v17.renderPreview,
        GetMetadata = v17.getMetadata,
        PromptSelection = v17.promptSelection,
        ClearSelection = v17.props.ClearSelection
    })));
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization
})(v9));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Cryo);
local v3 = require(l_Parent_0.Packages.Roact);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v6 = require(script.Parent.VectorTextInput);
local v7 = require(l_Parent_0.Src.Util.Constants);
local _ = function(v8, v9)
    if v9 then
        local v10 = 1;
        for _, v12 in pairs(v8) do
            local v13 = tonumber(v12);
            if v13 then
                v10 = v10 * v13;
            end;
        end;
        return v10 <= v9;
    else
        return true;
    end;
end;
local function v28(_, v16, v17, v18)
    for _, v20 in pairs(v18) do
        for _, v22 in pairs(v20) do
            if not v22 then
                return false;
            end;
        end;
    end;
    local v23;
    if v17 then
        local v24 = 1;
        for _, v26 in pairs(v16) do
            local v27 = tonumber(v26);
            if v27 then
                v24 = v24 * v27;
            end;
        end;
        v23 = v24 <= v17;
    else
        v23 = true;
    end;
    if v23 then
        return true;
    else
        return false;
    end;
end;
local v29 = v3.PureComponent:extend(script.Name);
v29.init = function(v30, _)
    v30.validFieldState = {
        Position = {
            X = true,
            Y = true,
            Z = true
        },
        Size = {
            X = true,
            Y = true,
            Z = true
        }
    };
    local function v38(v32, v33, v34)
        local l_Position_0 = v30.props.Position;
        local l_Size_0 = v30.props.Size;
        if v32 == "Position" then
            l_Position_0 = v2.Dictionary.join(l_Position_0, {
                [v33] = v34
            });
        elseif v32 == "Size" then
            l_Size_0 = v2.Dictionary.join(l_Size_0, {
                [v33] = v34
            });
        end;
        local v37 = v28(l_Position_0, l_Size_0, v30.props.MaxVolume, v30.validFieldState);
        if v30.props.SetMapSettingsValid then
            v30.props.SetMapSettingsValid(v37);
        end;
        return v37;
    end;
    local function v43(v39, v40, v41, v42)
        if v39 == "Position" then
            if v30.props.OnPositionChanged then
                v30.props.OnPositionChanged(v39, v40, v41, v42);
                return ;
            end;
        elseif v39 == "Size" then
            if v30.props.OnSizeChanged then
                v30.props.OnSizeChanged(v39, v40, v41, v42);
                return ;
            end;
        else
            warn("MapSettings dispatchVectorChanged unknown vector", v39);
        end;
    end;
    v30.onVectorFocusLost = function(v44, v45, _, v47, v48)
        if not (not (utf8.len(v47) > 0) or not v38(v44, v45, v47)) then
            v43(v44, v45, v47, v48);
        end;
    end;
    v30.onVectorValueChanged = function(v49, v50, v51, v52)
        v30.validFieldState[v49][v50] = v52;
        v38(v49, v50, v51);
        v43(v49, v50, v51, v52);
    end;
end;
v29.render = function(v53)
    local l_Localization_0 = v53.props.Localization;
    local l_Position_1 = v53.props.Position;
    local l_Size_1 = v53.props.Size;
    local v57 = v53.props.InitialLayoutOrder or 1;
    local v58 = l_Position_1 ~= nil;
    local v59 = l_Size_1 ~= nil;
    local v60 = v57 + (not v58 and 0 or 1);
    local l_MaxVolume_0 = v53.props.MaxVolume;
    local v62;
    if l_MaxVolume_0 then
        local v63 = 1;
        for _, v65 in pairs(l_Size_1) do
            local v66 = tonumber(v65);
            if v66 then
                v63 = v63 * v66;
            end;
        end;
        v62 = v63 <= l_MaxVolume_0;
    else
        v62 = true;
    end;
    return v3.createFragment({
        PositionInput = v58 and v3.createElement(v6, {
            LayoutOrder = v57,
            Text = l_Localization_0:getText("MapSettings", "Position"),
            Key = "Position",
            Vector = l_Position_1,
            Precisions = {
                X = 0,
                Y = 0,
                Z = 0
            },
            OnFocusLost = v53.onVectorFocusLost,
            OnValueChanged = v53.onVectorValueChanged
        }),
        SizeInput = v59 and v3.createElement(v6, {
            LayoutOrder = v60,
            Text = l_Localization_0:getText("MapSettings", "Size"),
            Key = "Size",
            Vector = l_Size_1,
            MinValues = {
                X = v7.REGION_MIN_SIZE,
                Y = v7.REGION_MIN_SIZE,
                Z = v7.REGION_MIN_SIZE
            },
            MaxValues = {
                X = v7.REGION_MAX_SIZE,
                Y = v7.REGION_MAX_SIZE,
                Z = v7.REGION_MAX_SIZE
            },
            Precisions = {
                X = 0,
                Y = 0,
                Z = 0
            },
            OnFocusLost = v53.onVectorFocusLost,
            OnValueChanged = v53.onVectorValueChanged,
            ErrorMessage = not v62 and l_Localization_0:getText("Warning", "VolumeTooLarge")
        })
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization
})(v29));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Cryo);
local v3 = require(l_Parent_0.Packages.Roact);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Parent_1 = script.Parent;
local v7 = require(l_Parent_1.MapSettingsWithPreviewFragment);
local v8 = require(l_Parent_1.Panel);
local v9 = v3.PureComponent:extend(script.Name);
v9.render = function(v10)
    return v3.createElement(v8, {
        LayoutOrder = v10.props.LayoutOrder,
        isSubsection = v10.props.isSubsection,
        Title = v10.props.Localization:getText("MapSettings", "MapSettings"),
        Padding = UDim.new(0, 12)
    }, {
        MapSettingsWithPreviewFragment = v3.createElement(v7, (v2.Dictionary.join(v10.props, {
            LayoutOrder = v2.None,
            isSubsection = v2.None,
            InitialLayoutOrder = 1
        })))
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization
})(v9));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Cryo);
local v3 = require(l_Parent_0.Packages.Roact);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v6 = require(l_Parent_0.Src.ContextItems);
local v7 = require(l_Parent_0.Src.TerrainWorldUI.LargeVoxelRegionPreview);
local v8 = require(script.Parent.MapSettingsFragment);
local v9 = v3.PureComponent:extend(script.Name);
v9.init = function(v10)
    v10.preview = nil;
    v10.warnings = {};
    local function v14(v11, v12, v13)
        v10.warnings = v2.Dictionary.join(v10.warnings, {
            [v11 .. v12] = v13
        });
        if v10.props.SetWarnings then
            v10.props.SetWarnings(v10.warnings);
        end;
    end;
    local function _(v15, v16)
        return function(v17, v18, v19, v20)
            if v20 then
                v14(v17, v18, false);
                v16(v2.Dictionary.join(v15(), {
                    [v18] = v19
                }));
                return ;
            else
                v14(v17, v18, true);
                return ;
            end;
        end;
    end;
    local function v22()
        return v10.props.Position;
    end;
    local l_OnPositionChanged_0 = v10.props.OnPositionChanged;
    local l_l_OnPositionChanged_0_0 = l_OnPositionChanged_0 --[[ copy: 5 -> 6 ]];
    local l_v22_0 = v22 --[[ copy: 4 -> 7 ]];
    v10.onPositionChanged = function(v26, v27, v28, v29)
        if v29 then
            v14(v26, v27, false);
            l_l_OnPositionChanged_0_0(v2.Dictionary.join(l_v22_0(), {
                [v27] = v28
            }));
            return ;
        else
            v14(v26, v27, true);
            return ;
        end;
    end;
    v22 = function()
        return v10.props.Size;
    end;
    l_OnPositionChanged_0 = v10.props.OnSizeChanged;
    v10.onSizeChanged = function(v30, v31, v32, v33)
        if v33 then
            v14(v30, v31, false);
            l_OnPositionChanged_0(v2.Dictionary.join(v22(), {
                [v31] = v32
            }));
            return ;
        else
            v14(v30, v31, true);
            return ;
        end;
    end;
end;
v9.updatePreview = function(v34)
    assert(v34.preview, "MapSettingsWithPreviewFragment preview is nil");
    local v35 = Vector3.new(v34.props.Position.X, v34.props.Position.Y, v34.props.Position.Z);
    local v36 = Vector3.new(v34.props.Size.X, v34.props.Size.Y, v34.props.Size.Z);
    if v34.props.PreviewOffset then
        v35 = v35 + v36 * v34.props.PreviewOffset;
    end;
    v34.preview:setSizeAndPosition(v36, v35);
end;
v9.didMount = function(v37)
    local v38 = v37.props.Mouse:get();
    assert(not v37.preview, "MapSettingsWithPreviewFragment preview already exists");
    v37.preview = v7.new(v38, game.Workspace.CurrentCamera);
    v37:updatePreview();
    v37.preview:updateVisibility(true);
    v37.onPreviewSizeChangeConnect = v37.preview:getOnSizeChanged():Connect(function(v39, v40)
        local l_v40_0 = v40;
        if v37.props.PreviewOffset then
            l_v40_0 = l_v40_0 - v39 * v37.props.PreviewOffset;
        end;
        v37.props.OnPositionChanged({
            X = l_v40_0.x,
            Y = l_v40_0.y,
            Z = l_v40_0.z
        });
        v37.props.OnSizeChanged({
            X = v39.x,
            Y = v39.y,
            Z = v39.z
        });
    end);
    local l_PluginActivationController_0 = v37.props.PluginActivationController;
    v37.onToolActivatedConnection = l_PluginActivationController_0:subscribeToToolActivated(function()
        if l_PluginActivationController_0:getActiveTool() == v37.props.toolName then
            v37:updatePreview();
            v37.preview:updateVisibility(true);
        end;
    end);
    v37.onToolDeactivatedConnection = l_PluginActivationController_0:subscribeToToolDeactivated(function(v43)
        if v43 == v37.props.toolName then
            v37.preview:updateVisibility(false);
        end;
    end);
end;
v9.didUpdate = function(v44)
    v44:updatePreview();
end;
v9.willUnmount = function(v45)
    if v45.onPreviewSizeChangeConnect then
        v45.onPreviewSizeChangeConnect:Disconnect();
        v45.onPreviewSizeChangeConnect = nil;
    end;
    if v45.onToolActivatedConnection then
        v45.onToolActivatedConnection:Disconnect();
        v45.onToolActivatedConnection = nil;
    end;
    if v45.onToolDeactivatedConnection then
        v45.onToolDeactivatedConnection:Disconnect();
        v45.onToolDeactivatedConnection = nil;
    end;
    if v45.preview then
        v45.preview:destroy();
        v45.preview = nil;
    end;
end;
v9.render = function(v46)
    return v3.createElement(v8, (v2.Dictionary.join(v46.props, {
        OnPositionChanged = v46.onPositionChanged,
        OnSizeChanged = v46.onSizeChanged,
        SetWarnings = v2.None,
        toolName = v2.None
    })));
end;
return (l_withContext_0({
    Mouse = l_ContextServices_0.Mouse,
    PluginActivationController = v6.PluginActivationController
})(v9));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v5 = require(l_Parent_0.Src.ContextItems);
local l_Tooltip_0 = v1.UI.Tooltip;
local l_MaterialService_0 = game:GetService("MaterialService");
local l_TextService_0 = game:GetService("TextService");
local v9 = require(l_Parent_0.Src.Util.MaterialDetails);
local v10 = nil;
v10 = {
    Enum.Material.Asphalt,
    Enum.Material.Basalt,
    Enum.Material.Brick,
    Enum.Material.Cobblestone,
    Enum.Material.Concrete,
    Enum.Material.CrackedLava,
    Enum.Material.Glacier,
    Enum.Material.Grass,
    Enum.Material.Ground,
    Enum.Material.Ice,
    Enum.Material.LeafyGrass,
    Enum.Material.Limestone,
    Enum.Material.Mud,
    Enum.Material.Pavement,
    Enum.Material.Rock,
    Enum.Material.Salt,
    Enum.Material.Sand,
    Enum.Material.Sandstone,
    Enum.Material.Slate,
    Enum.Material.Snow,
    Enum.Material.Water,
    Enum.Material.WoodPlanks
};
local v11 = v2.PureComponent:extend(script.Name);
local v12 = v2.PureComponent:extend("MaterialTooltip");
local v13 = v2.PureComponent:extend("MaterialButton");
v12.init = function(v14)
    v14.ref = v2.createRef();
end;
v12.didMount = function(v15)
    if v15.ref.current then
        local l_current_0 = v15.ref.current;
        local l_AbsolutePosition_0 = l_current_0.AbsolutePosition;
        local l_AbsoluteSize_0 = l_current_0.AbsoluteSize;
        local l_AbsolutePosition_1 = l_current_0.Parent.Parent.AbsolutePosition;
        local l_AbsoluteSize_1 = l_current_0.Parent.Parent.AbsoluteSize;
        local v21 = nil;
        if l_AbsolutePosition_0.x < l_AbsolutePosition_1.x then
            v21 = l_AbsolutePosition_1.x - l_AbsolutePosition_0.x;
        elseif l_AbsolutePosition_1.x + l_AbsoluteSize_1.x < l_AbsolutePosition_0.x + l_AbsoluteSize_0.x then
            v21 = ((l_AbsolutePosition_1.x + l_AbsoluteSize_1.x) - (l_AbsolutePosition_0.x + l_AbsoluteSize_0.x)) - 1;
        end;
        if v21 then
            local l_Position_0 = l_current_0.Position;
            l_current_0.Position = UDim2.new(l_Position_0.X.Scale, v21, l_Position_0.Y.Scale, l_Position_0.Y.Offset);
        end;
    end;
end;
v12.render = function(v23)
    local v24 = v23.props.Theme:get();
    local l_MaterialName_0 = v23.props.MaterialName;
    return v2.createElement("TextLabel", {
        BackgroundTransparency = 0,
        BackgroundColor3 = v24.backgroundColor,
        Size = UDim2.new(0, l_TextService_0:GetTextSize(l_MaterialName_0, v24.textSize, 0, Vector2.new()).x + v24.padding * 1.5, 0, v24.textSize * 1.3),
        AnchorPoint = Vector2.new(0.5, 0),
        Position = UDim2.new(0.5, 0, 0, -v24.textSize + 3.5),
        Text = l_MaterialName_0,
        TextSize = v24.textSize,
        TextColor3 = v24.textColor,
        Font = v24.font,
        [v2.Ref] = v23.ref
    });
end;
v12 = l_withContext_0({
    Theme = v5.DEPRECATED_Theme
})(v12);
v13.init = function(v26, _)
    v26.onMouseEnter = function()
        v26.props.OnMouseEnter(v26.props.Material);
    end;
    v26.onMouseLeave = function()
        v26.props.OnMouseLeave(v26.props.Material);
    end;
    v26.selectMaterial = function()
        v26.props.SelectMaterial(v26.props.Material);
    end;
end;
v13.render = function(v28)
    local l_props_0 = v28.props;
    local v30 = l_props_0.Theme:get();
    local l_Localization_0 = l_props_0.Localization;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_Material_0 = l_props_0.Material;
    local l_IsSelected_0 = l_props_0.IsSelected;
    local l_IsHovered_0 = l_props_0.IsHovered;
    local v36 = nil;
    v36 = if not l_props_0.Use2022Materials then v9[l_Material_0].image else v9[l_Material_0].image_2022;
    local v37 = nil;
    if l_IsHovered_0 then
        v37 = l_Localization_0:getText("Materials", l_Material_0.Name);
    end;
    return v2.createElement("ImageButton", {
        LayoutOrder = l_LayoutOrder_0,
        Image = "rbxasset://textures/TerrainTools/" .. v36,
        BackgroundColor3 = v30.backgroundColor,
        BorderSizePixel = not l_IsSelected_0 and 0 or 2,
        BorderColor3 = not not l_IsSelected_0 and v30.selectionBorderColor or v30.borderColor,
        ZIndex = not l_IsHovered_0 and 1 or 2,
        [v2.Event.MouseEnter] = v28.onMouseEnter,
        [v2.Event.MouseLeave] = v28.onMouseLeave,
        [v2.Event.Activated] = v28.selectMaterial
    }, {
        Tooltip = l_IsHovered_0 and v2.createElement(v12, {
            MaterialName = v37
        })
    });
end;
v13 = l_withContext_0({
    Theme = v5.DEPRECATED_Theme,
    Localization = l_ContextServices_0.Localization
})(v13);
v11.init = function(v38, _)
    v38.state = {
        hoverMaterial = nil
    };
    v38.onMouseEnterMaterial = function(v40)
        v38:setState({
            hoverMaterial = v40
        });
    end;
    v38.onMouseLeaveMaterial = function(_)
        v38:setState({
            hoverMaterial = v2.None
        });
    end;
    v38.selectMaterial = function(v42)
        v38.props.setMaterial(v42);
    end;
end;
v11.didMount = function(v43)
    v43.connection = l_MaterialService_0:GetPropertyChangedSignal("Use2022Materials"):Connect(function()
        v43:setState({});
    end);
end;
v11.willUnmount = function(v44)
    v44.connection:Disconnect();
end;
v11.render = function(v45)
    local v46 = v45.props.Theme:get();
    local l_Localization_1 = v45.props.Localization;
    local v48 = v45.props.LayoutOrder or 1;
    local l_material_0 = v45.props.material;
    local l_Tooltip_1 = v45.props.Tooltip;
    local l_AllowAir_0 = v45.props.AllowAir;
    local v52 = {
        UIGridLayout = v2.createElement("UIGridLayout", {
            CellSize = UDim2.new(0, 32, 0, 32),
            CellPadding = UDim2.new(0, 9, 0, 9),
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            SortOrder = Enum.SortOrder.LayoutOrder
        }),
        LayoutPadding = v2.createElement("UIPadding", {
            PaddingTop = UDim.new(0, 9),
            PaddingBottom = UDim.new(0, 9),
            PaddingLeft = UDim.new(0, 9),
            PaddingRight = UDim.new(0, 9)
        })
    };
    local function v55(v53, v54)
        v52[v54.Name] = v2.createElement(v13, {
            LayoutOrder = v53,
            Material = v54,
            IsHovered = v54 == v45.state.hoverMaterial,
            IsSelected = l_material_0 == v54,
            OnMouseEnter = v45.onMouseEnterMaterial,
            OnMouseLeave = v45.onMouseLeaveMaterial,
            SelectMaterial = v45.selectMaterial,
            Use2022Materials = l_MaterialService_0.Use2022Materials
        });
    end;
    for v56, v57 in ipairs(v10) do
        v55(v56, v57);
    end;
    if l_AllowAir_0 then
        v55(#v10 + 1, Enum.Material.Air);
    end;
    return v2.createElement("Frame", {
        LayoutOrder = v48,
        Size = UDim2.new(0, 230, 0, 235),
        Position = UDim2.new(0, 20, 0, 0),
        BackgroundTransparency = 1
    }, {
        Label = v2.createElement("TextLabel", {
            Text = v45.props.Label or l_Localization_1:getText("MaterialSettings", "ChooseMaterial"),
            TextSize = v46.textSize,
            Font = v46.font,
            TextColor3 = v46.textColor,
            Size = UDim2.new(1, 0, 0, 16),
            TextXAlignment = Enum.TextXAlignment.Left,
            Position = UDim2.new(0, 20, 0, 0),
            BackgroundTransparency = 1
        }, {
            Tooltip = if not l_Tooltip_1 then nil else v2.createElement(l_Tooltip_0, {
                Text = l_Tooltip_1
            })
        }),
        Container = v2.createElement("Frame", {
            BackgroundColor3 = v46.backgroundColor,
            Size = UDim2.new(0, 230, 0, 214),
            Position = UDim2.new(0, 20, 0, 20),
            BorderColor3 = v46.borderColor
        }, v52)
    });
end;
return (l_withContext_0({
    Theme = v5.DEPRECATED_Theme,
    Localization = l_ContextServices_0.Localization
})(v11));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Parent_1 = script.Parent;
local v6 = require(l_Parent_1.MaterialSettingsFragment);
local v7 = require(l_Parent_1.Panel);
local l_TerrainEditorOverhaul_0 = game:GetFastFlag("TerrainEditorOverhaul");
local v9 = v2.PureComponent:extend("MaterialSettings");
v9.render = function(v10)
    local l_props_0 = v10.props;
    return v2.createElement(v7, {
        Title = l_props_0.Localization:getText("MaterialSettings", "MaterialSettings"),
        LayoutOrder = v10.props.LayoutOrder
    }, {
        MaterialSettingsFragment = v2.createElement(v6, {
            LayoutOrder = 1,
            autoMaterial = l_props_0.autoMaterial,
            setAutoMaterial = l_props_0.setAutoMaterial,
            material = l_props_0.material,
            setMaterial = l_props_0.setMaterial,
            replaceMaterial = if not l_TerrainEditorOverhaul_0 then nil else l_props_0.replaceMaterial,
            setReplaceMaterial = if not l_TerrainEditorOverhaul_0 then nil else l_props_0.setReplaceMaterial,
            source = if not l_TerrainEditorOverhaul_0 then nil else l_props_0.source,
            setSource = if not l_TerrainEditorOverhaul_0 then nil else l_props_0.setSource,
            target = if not l_TerrainEditorOverhaul_0 then nil else l_props_0.target,
            setTarget = if not l_TerrainEditorOverhaul_0 then nil else l_props_0.setTarget,
            AllowAir = l_props_0.AllowAir,
            Tool = l_props_0.currentTool
        })
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization
})(v9));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Parent_1 = script.Parent;
local v6 = require(l_Parent_1.LabeledToggle);
local v7 = require(l_Parent_1.MaterialSelector);
local v8 = require(l_Parent_1.ReplaceModeSelector);
local l_ToolId_0 = require(l_Parent_0.Src.Util.TerrainEnums).ToolId;
local l_TerrainEditorOverhaul_0 = game:GetFastFlag("TerrainEditorOverhaul");
local v11 = v2.PureComponent:extend("MaterialSettingsFragment");
v11.render = function(v12)
    local l_props_0 = v12.props;
    local l_Localization_0 = l_props_0.Localization;
    local v15 = l_props_0.LayoutOrder or 1;
    local l_autoMaterial_0 = l_props_0.autoMaterial;
    local l_replaceMaterial_0 = l_props_0.replaceMaterial;
    local l_createFragment_0 = v2.createFragment;
    local v19 = {
        AutoMaterial = if l_autoMaterial_0 ~= nil then v2.createElement(v6, {
            LayoutOrder = v15,
            Text = l_Localization_0:getText("MaterialSettings", "AutoMaterial"),
            IsOn = l_autoMaterial_0,
            SetIsOn = v12.props.setAutoMaterial
        }) else nil,
        ReplaceMaterial = if not not l_TerrainEditorOverhaul_0 and l_replaceMaterial_0 ~= nil then v2.createElement(v8, {
            LayoutOrder = v15 + 1,
            ReplaceMode = l_replaceMaterial_0,
            SetReplaceMode = v12.props.setReplaceMaterial,
            Tool = l_props_0.Tool
        }) else nil
    };
    local v20;
    if l_TerrainEditorOverhaul_0 and l_replaceMaterial_0 then
        v20 = nil;
    else
        v20 = v2.createElement;
        local l_v7_0 = v7;
        local v22 = {
            Label = if not l_TerrainEditorOverhaul_0 then nil else l_Localization_0:getText("MaterialSettings", "Material"),
            LayoutOrder = v15 + 2,
            material = v12.props.material,
            setMaterial = v12.props.setMaterial
        };
        local v23 = false;
        if v12.props.Tool ~= l_ToolId_0.Paint then
            v23 = v12.props.AllowAir;
        end;
        v22.AllowAir = v23;
        v22.Tooltip = if not l_TerrainEditorOverhaul_0 then nil else l_Localization_0:getText("MaterialSettings", "MaterialTooltip");
        v20 = v20(l_v7_0, v22);
    end;
    v19.MaterialSelector = v20;
    if not l_TerrainEditorOverhaul_0 or not l_replaceMaterial_0 then
        v20 = nil;
    else
        v20 = v2.createElement;
        local l_v7_1 = v7;
        local v25 = {
            Label = l_Localization_0:getText("MaterialSettings", "SourceMaterial"),
            LayoutOrder = v15 + 3,
            material = v12.props.source,
            setMaterial = v12.props.setSource
        };
        local v26 = false;
        if v12.props.Tool ~= l_ToolId_0.Paint then
            v26 = v12.props.AllowAir;
        end;
        v25.AllowAir = v26;
        v25.Tooltip = l_Localization_0:getText("MaterialSettings", "SourceMaterialTooltip");
        v20 = v20(l_v7_1, v25);
    end;
    v19.SourceMaterialSelector = v20;
    v19.TargetMaterialSelector = if not not l_TerrainEditorOverhaul_0 and l_replaceMaterial_0 then v2.createElement(v7, {
        Label = l_Localization_0:getText("MaterialSettings", "TargetMaterial"),
        LayoutOrder = v15 + 4,
        material = v12.props.target,
        setMaterial = v12.props.setTarget,
        AllowAir = v12.props.AllowAir,
        Tooltip = l_Localization_0:getText("MaterialSettings", "TargetMaterialTooltip")
    }) else nil;
    return l_createFragment_0(v19);
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization
})(v11));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(script.Parent.SingleSelectButtonGroup);
local v3 = require(l_Parent_0.Src.Util.Constants);
return function(v4)
    return v1.createElement("Frame", {
        LayoutOrder = v4.LayoutOrder,
        Size = UDim2.new(1, 0, 0, 22),
        BackgroundTransparency = 1
    }, {
        UIPadding = v1.createElement("UIPadding", {
            PaddingLeft = UDim.new(0, (v3.MIN_WIDGET_SIZE.X - 208) / 2)
        }),
        Toggle = v1.createElement(v2, {
            LayoutOrder = 1,
            Size = UDim2.new(0, 208, 0, 22),
            Selected = v4.Selected,
            Select = v4.Select,
            Options = v4.Options
        })
    });
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v5 = require(l_Parent_0.Src.ContextItems);
local l_UserInputService_0 = game:GetService("UserInputService");
local l_Workspace_0 = game:GetService("Workspace");
local v8 = v2.PureComponent:extend("MouseListener");
local function _()
    return l_UserInputService_0:IsKeyDown(Enum.KeyCode.LeftAlt) or l_UserInputService_0:IsKeyDown(Enum.KeyCode.RightAlt);
end;
local function _()
    return l_UserInputService_0:IsKeyDown(Enum.KeyCode.LeftShift) or l_UserInputService_0:IsKeyDown(Enum.KeyCode.RightShift);
end;
v8.pickMaterial = function(v11)
    v11._mouse = v11.props.Mouse:get();
    local l_Direction_0 = v11._mouse.UnitRay.Direction;
    local l_p_0 = v11._mouse.Origin.p;
    local v14 = nil;
    local v15 = nil;
    local v16 = l_Workspace_0:Raycast(l_p_0, l_Direction_0 * 10000, v11._raycastParams);
    if v16 then
        v14 = v16.Instance;
        v15 = v16.Material;
    end;
    if not (not v14 or not v14:IsA("Terrain")) then
        if l_UserInputService_0:IsKeyDown(Enum.KeyCode.LeftShift) or l_UserInputService_0:IsKeyDown(Enum.KeyCode.RightShift) then
            if v11.props.dispatchSetTargetMaterial then
                v11.props.dispatchSetTargetMaterial(v15);
            end;
        else
            if v11.props.dispatchSetMaterial then
                v11.props.dispatchSetMaterial(v15);
            end;
            if v11.props.dispatchSetSourceMaterial then
                v11.props.dispatchSetSourceMaterial(v15);
                return ;
            end;
        end;
    end;
end;
v8.init = function(v17)
    v17.onInputBegan = function(v18, v19)
        if not ((not (v18.UserInputType == Enum.UserInputType.MouseButton1) or v19) or not (l_UserInputService_0:IsKeyDown(Enum.KeyCode.LeftAlt) or l_UserInputService_0:IsKeyDown(Enum.KeyCode.RightAlt))) then
            v17:pickMaterial();
        end;
    end;
end;
v8.didMount = function(v20)
    v20._raycastParams = RaycastParams.new();
    v20._raycastParams.FilterType = Enum.RaycastFilterType.Whitelist;
    v20._raycastParams.BruteForceAllSlow = true;
    v20._raycastParams.FilterDescendantsInstances = {
        v20.props.Terrain:get()
    };
    v20._onInputBeganConnection = l_UserInputService_0.InputBegan:Connect(v20.onInputBegan);
end;
v8.willUnmount = function(v21)
    if v21._onInputBeganConnection then
        v21._onInputBeganConnection:Disconnect();
        v21._onInputBeganConnection = nil;
    end;
end;
v8.render = function(_)
    return nil;
end;
return (l_withContext_0({
    Mouse = l_ContextServices_0.Mouse,
    Terrain = v5.Terrain
})(v8));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Cryo);
local v3 = require(l_Parent_0.Packages.Roact);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v6 = require(script.Parent.LabeledTextInput);
local function _(v7, v8)
    local v9 = 10 ^ (v8 or 3);
    return math.floor(v7 * v9 + 0.5) / v9;
end;
local v11 = v3.PureComponent:extend("NumberTextInput");
v11.defaultProps = {
    MaxGraphemes = 12
};
v11.init = function(v12, _)
    v12.isValid = true;
    v12.handlePrecision = function(v14)
        if not v12.props.Precision or not tonumber(v14) then
            return v14;
        else
            local v15 = tonumber(v14);
            local v16 = 10 ^ (v12.props.Precision or 3);
            return math.floor(v15 * v16 + 0.5) / v16;
        end;
    end;
    v12.onFocusLost = function(v17, v18)
        if utf8.len(v18) == 0 then
            v18 = v12.props.Value;
        end;
        local v19 = v12.handlePrecision(v18);
        if v12.props.OnFocusLost then
            v12.props.OnFocusLost(v12.props.Key, v17, v19, v12.isValid);
        end;
        return v19;
    end;
    v12.getLocalization = function()
        return v12.props.Localization;
    end;
    v12.isTextValid = function(v20)
        if utf8.len(v20) == 0 then
            return true, nil;
        else
            local v21 = tonumber(v20);
            local v22 = nil;
            local v23 = nil;
            if not v21 then
                v22 = false;
                v23 = v12.getLocalization():getText("Warning", "InvalidNumber");
            elseif v12.props.Min and v21 < v12.props.Min then
                v22 = false;
                v23 = v12.getLocalization():getText("Warning", "MinimumSize", {
                    v12.props.Min
                });
            elseif v12.props.Max and v12.props.Max < v21 then
                v22 = false;
                v23 = v12.getLocalization():getText("Warning", "MaximumSize", {
                    v12.props.Max
                });
            else
                v22 = true;
            end;
            if not v22 then
                return false, v23;
            else
                return true, nil;
            end;
        end;
    end;
    v12.validateText = function(v24)
        local v25, v26 = v12.isTextValid(v24);
        v12.isValid = v25;
        if v12.props.OnValueChanged then
            if utf8.len(v24) == 0 then
                v12.props.OnValueChanged(v12.props.Key, v12.props.Value, v12.isValid);
            else
                v12.props.OnValueChanged(v12.props.Key, v24, v12.isValid);
            end;
        end;
        if not v12.isValid then
            return v24, v26;
        else
            return v24, nil;
        end;
    end;
    v12.isValid = v12.isTextValid(v12.props.Value);
end;
v11.render = function(v27)
    return v3.createElement(v6, (v2.Dictionary.join(v27.props, {
        Value = v2.None,
        Text = v27.handlePrecision(v27.props.Value),
        OnFocusLost = v27.onFocusLost,
        ValidateText = v27.validateText,
        Key = v2.None,
        Min = v2.None,
        Max = v2.None,
        Precision = v2.None,
        OnValueChanged = v2.None
    })));
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization
})(v11));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local l_ContextServices_0 = v1.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Parent_1 = script.Parent;
local v6 = require(l_Parent_1.LabeledElementPair);
local v7 = require(l_Parent_1.LabeledTextInput);
local v8 = require(l_Parent_1.Panel);
local v9 = v2.PureComponent:extend(script.Name);
v9.init = function(v10)
    v10.onSeedFocusLost = function(_, v12)
        if utf8.len(v12) == 0 then
            v10.props.setSeed(v10.props.seed);
            return v10.props.seed;
        else
            v10.props.setSeed(v12);
            return ;
        end;
    end;
end;
v9.render = function(v13)
    local l_Localization_0 = v13.props.Localization;
    return v2.createElement(v8, {
        Title = l_Localization_0:getText("Generate", "OtherSettings"),
        LayoutOrder = v13.props.LayoutOrder
    }, {
        Seed = v2.createElement(v6, {
            Size = UDim2.new(1, 0, 0, 60),
            Text = l_Localization_0:getText("Generate", "Seed"),
            SizeToContent = true
        }, {
            SeedTextBox = v2.createElement(v7, {
                MaxGraphemes = 12,
                IgnoreNumFormatting = true,
                Text = v13.props.seed,
                OnFocusLost = v13.onSeedFocusLost
            })
        })
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization
})(v9));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local l_withContext_0 = v1.ContextServices.withContext;
local v4 = require(l_Parent_0.Src.ContextItems);
local v5 = UDim.new(0, 12);
local v6 = v2.PureComponent:extend(script.Name);
v6.init = function(v7, v8)
    local v9 = v8.Padding or v5;
    v7.mainFrameRef = v2.createRef();
    v7.mainLayoutRef = v2.createRef();
    v7.contentFrameRef = v2.createRef();
    v7.contentLayoutRef = v2.createRef();
    v7.state = {
        padding = v9,
        isExpanded = true
    };
    v7.onExpandedStateChanged = function()
        v7:setState({
            isExpanded = not v7.state.isExpanded
        });
    end;
    v7.updateMainSize = function()
        local l_current_0 = v7.mainFrameRef.current;
        local l_current_1 = v7.mainLayoutRef.current;
        if not (not l_current_1 or not l_current_0) then
            l_current_0.Size = UDim2.new(1, 0, 0, l_current_1.AbsoluteContentSize.Y);
        end;
    end;
    v7.updateContentSize = function()
        local l_current_2 = v7.contentFrameRef.current;
        local l_current_3 = v7.contentLayoutRef.current;
        if not (not l_current_3 or not l_current_2) then
            l_current_2.Size = UDim2.new(1, 0, 0, l_current_3.AbsoluteContentSize.Y + v5.Offset);
        end;
    end;
end;
v6.render = function(v14)
    local v15 = v14.props.Theme:get();
    local l_panelTheme_0 = v15.panelTheme;
    local v17 = v14.props.Title or "Title";
    local l_LayoutOrder_0 = v14.props.LayoutOrder;
    local l_isSubsection_0 = v14.props.isSubsection;
    local l_isExpanded_0 = v14.state.isExpanded;
    local l_padding_0 = v14.state.padding;
    local v22 = not not l_isExpanded_0 and l_panelTheme_0.openIcon or l_panelTheme_0.closeIcon;
    local v23 = v14.props[v2.Children];
    if v23 then
        v23.UIListLayout = v2.createElement("UIListLayout", {
            Padding = l_padding_0,
            SortOrder = Enum.SortOrder.LayoutOrder,
            [v2.Ref] = v14.contentLayoutRef,
            [v2.Change.AbsoluteContentSize] = v14.updateContentSize
        });
    end;
    return v2.createElement("Frame", {
        Size = UDim2.new(1, 0, 0, 40),
        LayoutOrder = l_LayoutOrder_0,
        BackgroundTransparency = 1,
        [v2.Ref] = v14.mainFrameRef
    }, {
        Layout = v2.createElement("UIListLayout", {
            Padding = v5,
            SortOrder = Enum.SortOrder.LayoutOrder,
            [v2.Ref] = v14.mainLayoutRef,
            [v2.Change.AbsoluteContentSize] = v14.updateMainSize
        }),
        ToggleButton = v2.createElement("ImageButton", {
            Size = UDim2.new(1, 0, 0, 28),
            BackgroundColor3 = l_panelTheme_0.panelColor,
            BorderSizePixel = 0,
            BackgroundTransparency = not l_isSubsection_0 and 0 or 1,
            LayoutOrder = 1,
            [v2.Event.Activated] = v14.onExpandedStateChanged
        }, {
            v2.createElement("ImageLabel", {
                Size = UDim2.new(0, 20, 0, 28),
                BackgroundTransparency = 1
            }, {
                v2.createElement("ImageLabel", {
                    Image = v22,
                    Size = UDim2.new(0, 10, 0, 10),
                    AnchorPoint = Vector2.new(0.5, 0.5),
                    Position = UDim2.new(0.5, 0, 0.5, 0),
                    BackgroundTransparency = 1,
                    ScaleType = Enum.ScaleType.Fit
                })
            }),
            v2.createElement("TextLabel", {
                Text = v17 or "Title",
                Size = UDim2.new(1, 0, 1, 0),
                Position = UDim2.new(0, 20, 0, 0),
                BackgroundTransparency = 1,
                TextXAlignment = Enum.TextXAlignment.Left,
                TextYAlignment = Enum.TextYAlignment.Center,
                TextColor3 = v15.textColor,
                Font = v15.panelTheme.font,
                TextSize = v15.panelTheme.textSize
            })
        }),
        Content = l_isExpanded_0 and v2.createElement("Frame", {
            BackgroundTransparency = 1,
            LayoutOrder = 2,
            [v2.Ref] = v14.contentFrameRef
        }, v23)
    });
end;
return (l_withContext_0({
    Theme = v4.DEPRECATED_Theme
})(v6));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.Cryo);
local l_withContext_0 = v1.ContextServices.withContext;
local v5 = require(l_Parent_0.Src.ContextItems);
local l_UI_0 = v1.UI;
local l_Container_0 = l_UI_0.Container;
local l_Tooltip_0 = l_UI_0.Tooltip;
local l_Dialog_0 = l_UI_0.Dialog;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_LayoutOrderIterator_0 = v1.Util.LayoutOrderIterator;
local l_ellipsizeMiddle_0 = v1.Util.ellipsizeMiddle;
local v13 = require(l_Parent_0.Src.Components.StatusIcon);
local v14 = require(l_Parent_0.Src.Util.Constants);
local v15 = Vector2.new(400, 400);
local v16 = Vector2.new(100, 100);
local v17 = UDim.new(0, 16);
local l_TextService_0 = game:GetService("TextService");
local v19 = v2.PureComponent:extend("PreviewToolbarButton");
v19.init = function(v20)
    v20.state = {
        isHovered = false
    };
    v20.onHovered = function()
        v20:setState({
            isHovered = true
        });
    end;
    v20.onHoverEnded = function()
        v20:setState({
            isHovered = false
        });
    end;
end;
v19.render = function(v21)
    local l_promptSelectorWithPreviewTheme_0 = v21.props.Theme:get().promptSelectorWithPreviewTheme;
    return v2.createElement("ImageButton", v3.Dictionary.join(v21.props, {
        Size = UDim2.new(1, 0, 1, 0),
        SizeConstraint = Enum.SizeConstraint.RelativeYY,
        ZIndex = 5,
        BackgroundTransparency = 1,
        BorderSizePixel = 0,
        [v2.Event.MouseEnter] = v21.onHovered,
        [v2.Event.MouseLeave] = v21.onHoverEnded,
        Image = "",
        Icon = v3.None,
        Theme = v3.None
    }), {
        Background = v2.createElement("Frame", {
            AnchorPoint = Vector2.new(0.5, 0.5),
            Position = UDim2.new(0.5, 0, 0.5, 0),
            Size = UDim2.new(0, 28, 0, 28),
            BackgroundTransparency = not v21.state.isHovered and 1 or 0,
            BorderSizePixel = 0,
            BackgroundColor3 = l_promptSelectorWithPreviewTheme_0.toolbarButtonBackgroundColor
        }, {
            Icon = v2.createElement("ImageLabel", {
                AnchorPoint = Vector2.new(0.5, 0.5),
                Position = UDim2.new(0.5, 0, 0.5, 0),
                Size = UDim2.new(0, 18, 0, 18),
                ZIndex = 6,
                BackgroundTransparency = 1,
                BorderSizePixel = 0,
                Image = v21.props.Icon,
                ImageColor3 = not not v21.state.isHovered and l_promptSelectorWithPreviewTheme_0.buttonIconHoveredColor or l_promptSelectorWithPreviewTheme_0.buttonIconColor
            })
        })
    });
end;
v19 = l_withContext_0({
    Theme = v5.DEPRECATED_Theme
})(v19);
local v23 = v2.PureComponent:extend("PreviewDialog");
v23.render = function(v24)
    local v25 = v24.props.Theme:get();
    local l_promptSelectorWithPreviewTheme_1 = v25.promptSelectorWithPreviewTheme;
    local v27 = v24.props.PreviewTitle or "";
    local v28 = nil;
    if v24.props.RenderPreview then
        v28 = v24.props.RenderPreview();
    end;
    local v29 = v24.props.Metadata or {};
    local v30 = #v29 > 0 and 4 + 20 * #v29 or 0;
    local v31 = l_LayoutOrderIterator_0.new();
    local v32 = {
        UIListLayout = v2.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            Padding = UDim.new(0, 4)
        }),
        PreviewContentContainer = v2.createElement("Frame", {
            LayoutOrder = v31:getNextOrder(),
            Size = UDim2.new(1, 0, 1, -v30),
            BackgroundColor3 = l_promptSelectorWithPreviewTheme_1.previewBackgroundColor,
            BorderColor3 = l_promptSelectorWithPreviewTheme_1.previewBorderColor
        }, {
            PreviewContent = v28
        }),
        EmptyRow = v2.createElement(l_Container_0, {
            LayoutOrder = v31:getNextOrder(),
            Size = UDim2.new(1, 0, 0, 0)
        })
    };
    for v33, v34 in ipairs(v29) do
        v32["Metadata_" .. tostring(v33)] = v2.createElement(l_TextLabel_0, {
            LayoutOrder = v31:getNextOrder(),
            Size = UDim2.new(1, 0, 0, 16),
            Text = v34,
            TextSize = 16,
            TextXAlignment = Enum.TextXAlignment.Left
        });
    end;
    return v2.createElement(l_Dialog_0, {
        Title = v27,
        Size = v15,
        MinSize = v16,
        Resizable = true,
        Enabled = true,
        Modal = false,
        ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
        OnClose = v24.props.OnClose
    }, {
        Background = v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundColor3 = v25.backgroundColor
        }, {
            UIPadding = v2.createElement("UIPadding", {
                PaddingTop = v17,
                PaddingBottom = v17,
                PaddingLeft = v17,
                PaddingRight = v17
            }),
            Container = v2.createElement(l_Container_0, {}, v32)
        })
    });
end;
v23 = l_withContext_0({
    Theme = v5.DEPRECATED_Theme
})(v23);
local v35 = v2.PureComponent:extend(script.Name);
v35.init = function(v36)
    v36.state = {
        promptSelectionHovered = false,
        showingExpandedPreview = false
    };
    v36.onPromptSelectionHover = function()
        v36:setState({
            promptSelectionHovered = true
        });
    end;
    v36.onPromptSelectionHoverEnd = function()
        v36:setState({
            promptSelectionHovered = false
        });
    end;
    v36.openExpandedPreview = function()
        v36:setState({
            showingExpandedPreview = true
        });
    end;
    v36.closeExpandedPreview = function()
        v36:setState({
            showingExpandedPreview = false
        });
    end;
    v36.selectionNameRef = v2.createRef();
    v36.getSelectionNameWidth = function(v37)
        local l_current_0 = v36.selectionNameRef.current;
        if l_current_0 then
            return l_TextService_0:GetTextSize(v37, l_current_0.TextSize, l_current_0.Font, Vector2.new(math.huge, math.huge)).x;
        else
            return 0;
        end;
    end;
    v36.lastSelectionName = "";
    v36.lastSelectionNameWidth = 0;
    v36.updateSelectionNameText = function()
        local l_current_1 = v36.selectionNameRef.current;
        if l_current_1 then
            local l_x_0 = l_current_1.AbsoluteSize.x;
            local v41 = v36.props.SelectionName or "";
            if not (v41 == v36.lastSelectionName) or l_x_0 ~= v36.lastSelectionNameWidth then
                l_current_1.Text = l_ellipsizeMiddle_0(v41, l_x_0, v36.getSelectionNameWidth, v14.FILENAME_ELLIPSIZE_MIDDLE_SUFFIX_LENGTH);
                v36.lastSelectionName = v41;
                v36.lastSelectionNameWidth = l_x_0;
            end;
            return ;
        else
            return ;
        end;
    end;
end;
v35.didMount = function(v42)
    v42.updateSelectionNameText();
end;
v35.didUpdate = function(v43)
    v43.updateSelectionNameText();
end;
v35.render = function(v44)
    local v45 = v44.props.Theme:get();
    local l_promptSelectorWithPreviewTheme_2 = v45.promptSelectorWithPreviewTheme;
    local v47 = v44.props.SelectionName or "";
    local v48 = v44.props.PreviewTitle or "";
    local l_HasSelection_0 = v44.props.HasSelection;
    local l_promptSelectionHovered_0 = v44.state.promptSelectionHovered;
    local l_showingExpandedPreview_0 = v44.state.showingExpandedPreview;
    local v52 = nil;
    if not (not l_HasSelection_0 or not v44.props.RenderPreview) then
        v52 = v44.props.RenderPreview();
    end;
    local v53 = not not l_HasSelection_0 and (l_promptSelectionHovered_0 and true or false);
    local v54 = nil;
    if l_showingExpandedPreview_0 then
        v54 = if not v44.props.GetMetadata then {
            v47
        } else v3.List.join({
            v47
        }, v44.props.GetMetadata());
    end;
    return v2.createElement("Frame", {
        BackgroundTransparency = 1,
        Size = UDim2.new(0, v14.SECOND_COLUMN_WIDTH, 0, 108)
    }, {
        UIListLayout = v2.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            Padding = UDim.new(0, 4)
        }),
        PreviewRow = v2.createElement("Frame", {
            LayoutOrder = 1,
            Size = UDim2.new(0, 88, 0, 88),
            BackgroundTransparency = 1,
            BorderSizePixel = 0
        }, {
            ImportButton = v2.createElement("ImageButton", {
                ZIndex = 1,
                Size = UDim2.new(1, 0, 1, 0),
                BackgroundTransparency = 0,
                BorderSizePixel = 1,
                BackgroundColor3 = not not l_promptSelectionHovered_0 and l_promptSelectorWithPreviewTheme_2.previewHoveredBackgroundColor or l_promptSelectorWithPreviewTheme_2.previewBackgroundColor,
                BorderColor3 = l_promptSelectorWithPreviewTheme_2.previewBorderColor,
                Image = "",
                AutoButtonColor = false,
                [v2.Event.Activated] = v44.props.PromptSelection,
                [v2.Event.MouseEnter] = v44.onPromptSelectionHover,
                [v2.Event.MouseLeave] = v44.onPromptSelectionHoverEnd
            }, {
                Icon = v2.createElement("ImageLabel", {
                    AnchorPoint = Vector2.new(0.5, 0.5),
                    Position = UDim2.new(0.5, 0, 0.5, 0),
                    Size = UDim2.new(0, 24, 0, 24),
                    BackgroundTransparency = 1,
                    Image = l_promptSelectorWithPreviewTheme_2.importIcon,
                    ImageColor3 = not not l_promptSelectionHovered_0 and l_promptSelectorWithPreviewTheme_2.buttonIconHoveredColor or l_promptSelectorWithPreviewTheme_2.buttonIconColor
                })
            }),
            ClickBlocker = l_HasSelection_0 and v2.createElement("ImageButton", {
                ZIndex = 2,
                Size = UDim2.new(1, 0, 1, 0),
                Image = "",
                AutoButtonColor = false,
                BackgroundTransparency = 1,
                BorderSizePixel = 0
            }, {
                PreviewContentContainer = v2.createElement("Frame", {
                    ZIndex = 3,
                    Size = UDim2.new(1, 0, 1, 0),
                    BackgroundColor3 = v45.backgroundColor,
                    BorderSizePixel = 0
                }, {
                    PreviewContent = v52
                }),
                Toolbar = v2.createElement("Frame", {
                    ZIndex = 4,
                    AnchorPoint = Vector2.new(0, 1),
                    Position = UDim2.new(0, 0, 1, 0),
                    Size = UDim2.new(1, 0, 0, 32),
                    Visible = v53,
                    BackgroundTransparency = l_promptSelectorWithPreviewTheme_2.toolbarTransparency,
                    BorderSizePixel = 0,
                    BackgroundColor3 = l_promptSelectorWithPreviewTheme_2.toolbarBackgroundColor
                }, {
                    ExpandPreview = v2.createElement(v19, {
                        Icon = l_promptSelectorWithPreviewTheme_2.expandIcon,
                        [v2.Event.Activated] = v44.openExpandedPreview
                    }),
                    ClearButton = v2.createElement(v19, {
                        AnchorPoint = Vector2.new(1, 0),
                        Position = UDim2.new(1, 0, 0, 0),
                        Icon = l_promptSelectorWithPreviewTheme_2.clearIcon,
                        [v2.Event.Activated] = v44.props.ClearSelection
                    })
                })
            }),
            StatusIcon = v2.createElement(v13, {
                Position = UDim2.new(0, 96, 0, 0),
                ErrorMessage = v44.props.ErrorMessage,
                WarningMessage = v44.props.WarningMessage,
                InfoMessage = v44.props.InfoMessage
            })
        }),
        SelectionName = v2.createElement("TextLabel", {
            LayoutOrder = 2,
            BackgroundTransparency = 1,
            Size = UDim2.new(1, 0, 0, 16),
            TextXAlignment = Enum.TextXAlignment.Left,
            TextColor3 = v45.textColor,
            Font = v45.font,
            TextSize = v45.textSize,
            [v2.Ref] = v44.selectionNameRef,
            [v2.Change.AbsoluteSize] = v44.updateSelectionNameText
        }, {
            Tooltip = v2.createElement(l_Tooltip_0, {
                Text = v47,
                Enabled = l_HasSelection_0
            })
        }),
        ExpandedPreview = l_showingExpandedPreview_0 and v2.createElement(v23, {
            PreviewTitle = v48,
            RenderPreview = v44.props.RenderPreview,
            Metadata = v54,
            OnClose = v44.closeExpandedPreview
        })
    });
end;
return (l_withContext_0({
    Theme = v5.DEPRECATED_Theme
})(v35));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Roact);
local l_withContext_0 = v1.ContextServices.withContext;
local v4 = require(l_Parent_0.Src.ContextItems);
local v5 = v2.PureComponent:extend(script.Name);
v5.init = function(v6)
    v6.state = {
        isHovered = false
    };
    v6.onMouseEnter = function()
        v6:setState({
            isHovered = true
        });
    end;
    v6.onMouseLeave = function()
        v6:setState({
            isHovered = false
        });
    end;
end;
v5.render = function(v7)
    local v8 = v7.props.Theme:get();
    local v9 = v7.props.Locked or false;
    local l_isHovered_0 = v7.state.isHovered;
    return v2.createElement("ImageButton", {
        AnchorPoint = Vector2.new(1, 0),
        Position = UDim2.new(0, -11, 0, 5),
        Size = UDim2.new(0, 18, 0, 34),
        BackgroundColor3 = v8.backgroundColor,
        BorderSizePixel = 0,
        AutoButtonColor = false,
        [v2.Event.MouseEnter] = v7.onMouseEnter,
        [v2.Event.MouseLeave] = v7.onMouseLeave,
        [v2.Event.Activated] = v7.props.Clicked
    }, {
        Paperclip = v2.createElement("Frame", {
            Size = UDim2.new(0, 11, 1, 0),
            BackgroundColor3 = v8.propertyLockTheme.paperclipColor,
            BorderSizePixel = 0,
            ZIndex = 10
        }),
        PaperclipCover = v2.createElement("Frame", {
            Position = UDim2.new(0, 0, 0, 2),
            Size = UDim2.new(0, 10, 0, 30),
            BackgroundColor3 = v8.backgroundColor,
            BorderSizePixel = 0,
            ZIndex = 11
        }),
        IconBackgroundPaperclipCover = v2.createElement("Frame", {
            Position = UDim2.new(0, 5, 0, 9),
            Size = UDim2.new(0, 12, 0, 16),
            BackgroundColor3 = v8.backgroundColor,
            BorderSizePixel = 0,
            ZIndex = 12
        }, {
            IconBackground = v2.createElement("Frame", {
                Position = UDim2.new(0, 0, 0, 2),
                Size = UDim2.new(0, 12, 0, 12),
                BackgroundColor3 = not not l_isHovered_0 and v8.propertyLockTheme.iconBackgroundHover or v8.backgroundColor,
                BorderColor3 = v8.propertyLockTheme.iconBorderHover,
                BorderSizePixel = not l_isHovered_0 and 0 or 1,
                BackgroundTransparency = not not l_isHovered_0 and v8.propertyLockTheme.iconBackgroundHoverTransparency or 0,
                ZIndex = 13
            }, {
                Icon = v2.createElement("ImageLabel", {
                    Position = UDim2.new(0, 2, 0, 1),
                    Size = UDim2.new(0, not v9 and 10 or 8, 0, 9),
                    BackgroundTransparency = 1,
                    BorderSizePixel = 0,
                    Image = not not v9 and v8.propertyLockTheme.lockedIcon or v8.propertyLockTheme.unlockedIcon,
                    ZIndex = 14
                })
            })
        })
    });
end;
return (l_withContext_0({
    Theme = v4.DEPRECATED_Theme
})(v5));