local l_Workspace_0 = game.Workspace;
local l_PublishService_0 = game:GetService("PublishService");
local l_Parent_0 = script.Parent.Parent.Parent;
local l_AccessoryAndBodyToolShared_0 = require(l_Parent_0.Packages.AvatarToolsShared).Util.AccessoryAndBodyToolShared;
local l_AccessoryUtil_0 = l_AccessoryAndBodyToolShared_0.AccessoryUtil;
local l_AvatarUtil_0 = l_AccessoryAndBodyToolShared_0.AvatarUtil;
local l_WrapUtil_0 = l_AccessoryAndBodyToolShared_0.WrapUtil;
local l_getDeformerToPartMap_0 = l_AccessoryAndBodyToolShared_0.getDeformerToPartMap;
local l_ItemCharacteristics_0 = l_AccessoryAndBodyToolShared_0.ItemCharacteristics;
local v9 = require(l_Parent_0.Src.Util.Constants);
local v10 = require(l_Parent_0.Src.Util.AnalyticsGlobals);
local function _(v11)
    if v11 then
        v11.TopSurface = Enum.SurfaceType.Smooth;
        v11.BottomSurface = Enum.SurfaceType.Smooth;
        v11.LeftSurface = Enum.SurfaceType.Smooth;
        v11.RightSurface = Enum.SurfaceType.Smooth;
        v11.FrontSurface = Enum.SurfaceType.Smooth;
        v11.BackSurface = Enum.SurfaceType.Smooth;
        return ;
    else
        return ;
    end;
end;
local function _(v13)
    local v14 = Instance.new("Accessory", l_Workspace_0);
    v13:GetChildren()[1].Parent = v14;
    v14.Name = v13.Name;
    v13:Destroy();
end;
local function _(v16)
    local v17 = Instance.new("Accessory", l_Workspace_0);
    v16.Parent = v17;
    v17.Name = v16.Name;
    v16.Name = "Handle";
    return v17;
end;
local function v32(v19, v20)
    local l_Handle_0 = v19:FindFirstChild("Handle");
    if not (not l_Handle_0 or not l_Handle_0:IsA("MeshPart")) then
        local l_MeshId_0 = l_Handle_0.MeshId;
        local l_TextureID_0 = l_Handle_0.TextureID;
        local l_Part_0 = Instance.new("Part");
        l_Part_0.Size = l_Handle_0.Size;
        l_Part_0.CFrame = l_Handle_0.CFrame;
        l_Part_0.Name = "Handle";
        for _, v26 in l_Handle_0:GetChildren() do
            if not v26:IsA("SurfaceAppearance") then
                if not (not (not v26:IsA("Vector3Value") or v26.Name ~= "OriginalSize") or v26:IsA("TouchTransmitter")) then
                    v26:Clone().Parent = l_Part_0;
                end;
            else
                l_TextureID_0 = v26.ColorMap;
            end;
        end;
        local l_SpecialMesh_0 = Instance.new("SpecialMesh");
        l_SpecialMesh_0.MeshId = l_MeshId_0;
        l_SpecialMesh_0.TextureId = l_TextureID_0;
        l_SpecialMesh_0.Parent = l_Part_0;
        local l_MeshPartAsync_0 = game:GetService("InsertService"):CreateMeshPartAsync(l_MeshId_0, Enum.CollisionFidelity.Default, Enum.RenderFidelity.Automatic);
        if l_MeshPartAsync_0 then
            l_SpecialMesh_0.Scale = v20 / l_MeshPartAsync_0.Size;
            l_MeshPartAsync_0:Destroy();
        end;
        l_Handle_0:Destroy();
        l_Part_0.Parent = v19;
        local l_v19_FirstChild_0 = v19:FindFirstChild("ThumbnailConfiguration", true);
        if not (not l_v19_FirstChild_0 or not l_v19_FirstChild_0:IsA("Configuration")) then
            local l_ThumbnailCameraTarget_0 = l_v19_FirstChild_0:FindFirstChild("ThumbnailCameraTarget");
            if not (not l_ThumbnailCameraTarget_0 or not l_ThumbnailCameraTarget_0:IsA("ObjectValue")) then
                l_ThumbnailCameraTarget_0.Value = l_Part_0;
            end;
        end;
    end;
    l_Handle_0 = v19:FindFirstChild("Handle");
    if l_Handle_0 then
        local l_SpecialMesh_1 = l_Handle_0:FindFirstChildWhichIsA("SpecialMesh");
        if l_SpecialMesh_1 then
            l_SpecialMesh_1.Scale = l_SpecialMesh_1.Scale * (l_Handle_0.Size / v20);
        end;
        return ;
    else
        return ;
    end;
end;
local function _(v33)
    local v34 = Instance.new("Model", l_Workspace_0);
    v34.Name = v33.Name;
    v33.Parent = v34;
    v33.Name = "Handle";
    return v34;
end;
local function _(v36, v37)
    local l_v36_0 = v36;
    if l_ItemCharacteristics_0.isAvatar(v36) then
        l_v36_0 = l_AvatarUtil_0:getRootPart(v36);
    end;
    l_v36_0.CFrame = v37;
end;
local function v48(v40, v41)
    local v42 = v40:clone();
    v42.Anchored = false;
    if not l_ItemCharacteristics_0.isAvatar(v41) then
        local l_CFrame_0 = v41.CFrame;
        local l_v42_0 = v42;
        if l_ItemCharacteristics_0.isAvatar(v42) then
            l_v42_0 = l_AvatarUtil_0:getRootPart(v42);
        end;
        l_v42_0.CFrame = l_CFrame_0;
    else
        local v45 = l_AvatarUtil_0:getRootCFrame(v41);
        local l_v42_1 = v42;
        if l_ItemCharacteristics_0.isAvatar(v42) then
            l_v42_1 = l_AvatarUtil_0:getRootPart(v42);
        end;
        l_v42_1.CFrame = v45;
    end;
    local l_AvatarPartScaleType_0 = v42:FindFirstChild("AvatarPartScaleType");
    if l_AvatarPartScaleType_0 then
        l_AvatarPartScaleType_0:Destroy();
        l_AvatarPartScaleType_0 = nil;
    end;
    l_AvatarPartScaleType_0 = v41:FindFirstChild("AvatarPartScaleType");
    if l_AvatarPartScaleType_0 then
        l_AvatarPartScaleType_0:Clone().Parent = v42;
    end;
    return v42;
end;
local function v60(v49, v50)
    local v51 = {};
    local v52 = {};
    local v53 = l_getDeformerToPartMap_0(v49, not v50);
    if v50 then
        for _, v55 in pairs(v53) do
            v51[v55] = l_PublishService_0:PublishCageMeshAsync(v55, Enum.CageType.Inner);
        end;
    end;
    for _, v57 in pairs(v53) do
        v52[v57] = l_PublishService_0:PublishCageMeshAsync(v57, Enum.CageType.Outer);
    end;
    for _, v59 in ipairs(v49:GetDescendants()) do
        if v51[v59] then
            v59.ReferenceMeshId = v51[v59];
        end;
        if v52[v59] then
            v59.CageMeshId = v52[v59];
        end;
    end;
end;
local function v75(v61, v62, v63, v64)
    local v65 = v61:getState();
    local l_accessoryTypeInfo_0 = v65.selectItem.accessoryTypeInfo;
    local l_attachmentPoint_0 = v65.selectItem.attachmentPoint;
    local l_size_0 = v65.selectItem.size;
    local l_Name_0 = l_accessoryTypeInfo_0.Name;
    local l_AttachmentCFrame_0 = l_attachmentPoint_0.AttachmentCFrame;
    local l_ItemCFrame_0 = l_attachmentPoint_0.ItemCFrame;
    local v72 = v48(v63, v62);
    l_AccessoryUtil_0:createOrReuseAttachmentInstance(v72, v62.Parent, l_Name_0, l_AttachmentCFrame_0, l_ItemCFrame_0);
    v72.Size = l_size_0;
    local v73 = Instance.new("Accessory", l_Workspace_0);
    v72.Parent = v73;
    v73.Name = v72.Name;
    v72.Name = "Handle";
    local l_v73_0 = v73;
    if v64 then
        v32(l_v73_0, v63.Size);
    end;
    v73 = l_v73_0:FindFirstChild("Handle");
    if v73 then
        v73.TopSurface = Enum.SurfaceType.Smooth;
        v73.BottomSurface = Enum.SurfaceType.Smooth;
        v73.LeftSurface = Enum.SurfaceType.Smooth;
        v73.RightSurface = Enum.SurfaceType.Smooth;
        v73.FrontSurface = Enum.SurfaceType.Smooth;
        v73.BackSurface = Enum.SurfaceType.Smooth;
        return ;
    else
        return ;
    end;
end;
local function v91(v76, v77, v78, v79)
    local v80 = v76:getState();
    local v81 = v77:getOuterCageContext():getVertexData();
    local v82 = v77:getInnerCageContext():getVertexData();
    local l_accessoryTypeInfo_1 = v80.selectItem.accessoryTypeInfo;
    local l_attachmentPoint_1 = v80.selectItem.attachmentPoint;
    local l_Name_1 = l_accessoryTypeInfo_1.Name;
    local l_AttachmentCFrame_1 = l_attachmentPoint_1.AttachmentCFrame;
    local l_ItemCFrame_1 = l_attachmentPoint_1.ItemCFrame;
    local v88 = v48(v79, v78);
    l_AccessoryUtil_0:clearWelds(v88);
    l_AccessoryUtil_0:createOrReuseAttachmentInstance(v88, v78.Parent, l_Name_1, l_AttachmentCFrame_1, l_ItemCFrame_1);
    local v89 = Instance.new("Model", l_Workspace_0);
    v89.Name = v88.Name;
    v88.Parent = v89;
    v88.Name = "Handle";
    local l_v89_0 = v89;
    l_WrapUtil_0:deformClothing(v88, v82, Enum.CageType.Inner);
    l_WrapUtil_0:deformClothing(v88, v81, Enum.CageType.Outer);
    v60(v88, true);
    l_WrapUtil_0:renameDeformers(l_v89_0, v79);
    v89 = Instance.new("Accessory", l_Workspace_0);
    l_v89_0:GetChildren()[1].Parent = v89;
    v89.Name = l_v89_0.Name;
    l_v89_0:Destroy();
    if v88 then
        v88.TopSurface = Enum.SurfaceType.Smooth;
        v88.BottomSurface = Enum.SurfaceType.Smooth;
        v88.LeftSurface = Enum.SurfaceType.Smooth;
        v88.RightSurface = Enum.SurfaceType.Smooth;
        v88.FrontSurface = Enum.SurfaceType.Smooth;
        v88.BackSurface = Enum.SurfaceType.Smooth;
        return ;
    else
        return ;
    end;
end;
local function v94(v92)
    if not v92:IsA("MeshPart") then
        if v92:IsA("BasePart") then
            local l_SpecialMesh_2 = v92:FindFirstChildOfClass("SpecialMesh");
            if l_SpecialMesh_2 then
                return l_SpecialMesh_2.MeshId;
            end;
        end;
        return ;
    else
        return v92.MeshId;
    end;
end;
return function(v95, v96, v97, v98, v99)
    return function(v100)
        if v96 and v97 then
            if l_ItemCharacteristics_0.isClothes(v96) then
                if not l_ItemCharacteristics_0.hasAnyCage(v96) then
                    v75(v100, v96, v97, v99);
                    v98:getHandler("RigidAccessoryPublished")(v94(v96));
                    v10.HasPublished = true;
                else
                    v91(v100, v95, v96, v97);
                    v98:getHandler("LayeredAccessoryPublished")(v94(v96));
                    v10.HasPublished = true;
                end;
            end;
            if not (not v10.HasPublished or v10.FirstAction) then
                v10.FirstAction = v9.ACTIONS.Generate;
                v98:getHandler("FirstAction")(v10.FirstAction);
            end;
            return ;
        else
            return ;
        end;
    end;
end;


local v0 = require(script.Parent.Parent.Parent.Src.Actions.SetControlsPanelBlockerActivity);
return function(_)
    return function(v2)
        v2:dispatch(v0(false));
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Cryo);
local l_PreviewConstants_0 = require(l_Parent_0.Packages.AvatarToolsShared).Util.AccessoryAndBodyToolShared.PreviewConstants;
local v3 = require(l_Parent_0.Src.Actions.SetAccessoryTypeInfo);
local v4 = require(l_Parent_0.Src.Actions.SetAttachmentPoint);
local v5 = require(l_Parent_0.Src.Actions.SelectPreviewTab);
local v6 = require(l_Parent_0.Src.Actions.SetToolMode);
local v7 = require(l_Parent_0.Src.Actions.SetEditingCage);
local v8 = require(l_Parent_0.Src.Util.Constants);
local l_Selection_0 = game:GetService("Selection");
local l_ChangeHistoryService_0 = game:GetService("ChangeHistoryService");
return function()
    return function(v11)
        v11:dispatch(v3(v1.None));
        v11:dispatch(v4({
            ItemCFrame = CFrame.new(),
            AttachmentCFrame = CFrame.new()
        }));
        l_Selection_0:Set({});
        v11:dispatch(v7(v1.None));
        v11:dispatch(v5(l_PreviewConstants_0.TABS_KEYS.None));
        v11:dispatch(v6(v8.TOOL_MODE.None));
        l_ChangeHistoryService_0:SetEnabled(true);
    end;
end;


local v0 = require(script.Parent.Parent.Parent.Src.Actions.SetEditingCage);
return function(v1)
    return function(v2)
        if v2:getState().selectItem.editingCage ~= v1 then
            v2:dispatch(v0(v1));
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Cryo);
local l_LuaMeshEditingModule_0 = l_Parent_0.Packages.LuaMeshEditingModule;
local l_AccessoryAndBodyToolShared_0 = require(l_Parent_0.Packages.AvatarToolsShared).Util.AccessoryAndBodyToolShared;
local l_AccessoryUtil_0 = l_AccessoryAndBodyToolShared_0.AccessoryUtil;
local l_ItemCharacteristics_0 = l_AccessoryAndBodyToolShared_0.ItemCharacteristics;
local l_PreviewConstants_0 = l_AccessoryAndBodyToolShared_0.PreviewConstants;
local l_PreviewConstantsInterface_0 = l_AccessoryAndBodyToolShared_0.PreviewConstantsInterface;
local l_getActivePreviewTabs_0 = l_AccessoryAndBodyToolShared_0.getActivePreviewTabs;
local v9 = require(l_LuaMeshEditingModule_0.MeshEditingContexts.CageEditingContext);
local v10 = require(l_Parent_0.Src.Actions.SetPreviewAssetsSelected);
local v11 = require(l_Parent_0.Src.Util.Constants);
local v12 = require(l_Parent_0.Src.Actions.SetEditingCage);
local v13 = require(l_Parent_0.Src.Actions.SetItemSize);
local v14 = require(l_Parent_0.Src.Actions.SetMeshScale);
local v15 = require(l_Parent_0.Src.Actions.SetAccessoryTypeInfo);
local v16 = require(l_Parent_0.Src.Actions.SetAttachmentPoint);
local v17 = require(l_Parent_0.Src.Actions.SelectPreviewTab);
local v18 = require(l_Parent_0.Src.Actions.SetCagesTransparency);
local v19 = require(l_Parent_0.Src.Actions.SetToolMode);
local v20 = require(l_Parent_0.Src.Util.AnalyticsGlobals);
local function v24(v21, v22)
    if not l_ItemCharacteristics_0.isItemEmpty(v22) and l_ItemCharacteristics_0.hasAnyCage(v22) then
        local l_Outer_0 = Enum.CageType.Outer;
        if not (l_ItemCharacteristics_0.hasOuterCage(v22) or not l_ItemCharacteristics_0.hasInnerCage(v22)) then
            l_Outer_0 = Enum.CageType.Inner;
        end;
        v21:dispatch(v12(l_Outer_0));
        return l_Outer_0;
    elseif not l_ItemCharacteristics_0.isClothes(v22) then
        v21:dispatch(v12(v1.None));
        return nil;
    else
        v21:dispatch(v12(v11.EDIT_MODE.Mesh));
        return v11.EDIT_MODE.Mesh;
    end;
end;
local function v30(v25)
    local v26 = nil;
    local v27 = nil;
    for v28, v29 in pairs(v25) do
        if not (v26 ~= nil) or v29.LayoutOrder < v27 then
            v26 = v28;
            v27 = v29.LayoutOrder;
        end;
    end;
    if v26 then
        return v26;
    else
        return l_PreviewConstants_0.TABS_KEYS.None;
    end;
end;
local function v35(v31, v32)
    local l_selectedTab_0 = v32.previewStatus.selectedTab;
    local v34 = l_getActivePreviewTabs_0(v31);
    if l_PreviewConstantsInterface_0.IsValidTabKey(l_selectedTab_0) then
        if not (v1.List.find(v1.Dictionary.keys(v34), l_selectedTab_0) ~= nil) then
            return (v30(v34));
        else
            return l_selectedTab_0;
        end;
    else
        return (v30(v34));
    end;
end;
return function(v36, v37, v38)
    return function(v39)
        local v40 = v39:getState();
        v39:dispatch(v19(v11.TOOL_MODE.None));
        v39:dispatch(v17((v35(v37, v40))));
        v39:dispatch(v15(v1.None));
        v39:dispatch(v16({
            ItemCFrame = CFrame.new(),
            AttachmentCFrame = CFrame.new()
        }));
        v39:dispatch(v10({}));
        if l_ItemCharacteristics_0.isClothes(v37) then
            v39:dispatch(v13(v37.Size));
            if l_ItemCharacteristics_0.isLegacyAccessory(v37) then
                v39:dispatch(v14(l_AccessoryUtil_0:getSpecialMeshScale(v37)));
            end;
        end;
        local v41 = v24(v39, v37);
        v39:dispatch(v18({
            [Enum.CageType.Inner] = v11.DEFAULT_CAGE_TRANSPARENCY,
            [Enum.CageType.Outer] = v11.DEFAULT_CAGE_TRANSPARENCY
        }));
        if v41 ~= nil and v41 ~= v11.EDIT_MODE.Mesh then
            local v42 = v9.new();
            local v43 = v9.new();
            v42:initFromCageMesh(Enum.CageType.Inner, v37);
            v43:initFromCageMesh(Enum.CageType.Outer, v37);
            v36:setInnerCageContext(v42);
            v36:setOuterCageContext(v43);
            v20.RigidFlow = false;
            v38:getHandler("LayeredAccessorySelected")();
            return ;
        else
            v36:setInnerCageContext();
            v36:setOuterCageContext();
            v20.RigidFlow = true;
            v38:getHandler("RigidAccessorySelected")();
            return ;
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Src.Actions.SetControlsPanelBlockerActivity);
local v2 = require(l_Parent_0.Src.Actions.SetControlsPanelBlockerMessage);
return function(_, v4)
    return function(v5)
        game:GetService("Selection"):Set({
            nil
        });
        v5:dispatch(v1(true));
        v5:dispatch(v2(v4));
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Cryo);
local v2 = require(l_Parent_0.Packages.Framework);
local l_AccessoryAndBodyToolShared_0 = require(l_Parent_0.Packages.AvatarToolsShared).Util.AccessoryAndBodyToolShared;
local l_PreviewConstants_0 = l_AccessoryAndBodyToolShared_0.PreviewConstants;
local l_PreviewConstantsInterface_0 = l_AccessoryAndBodyToolShared_0.PreviewConstantsInterface;
local v6 = require(l_Parent_0.Src.Actions.SetPreviewAssetsSelected);
local v7 = require(l_Parent_0.Src.Util.AnalyticsGlobals);
local l_deepCopy_0 = v2.Util.deepCopy;
local function v13(v9, v10, v11, v12)
    if not v10 then
        if not v12 then
            return nil;
        else
            return v1.List.removeValue(v12, v9);
        end;
    elseif not v11 then
        return {
            v9
        };
    else
        v12 = v12 or {};
        table.insert(v12, v9);
        return v12;
    end;
end;
local function _(v14)
    local v15 = v14[l_PreviewConstants_0.TABS_KEYS.Avatars];
    if v15 then
        if not next(v15) then
            return false;
        else
            return true;
        end;
    else
        return false;
    end;
end;
return function(v17, v18)
    return function(v19)
        local v20 = v19:getState();
        local l_selectedTab_0 = v20.previewStatus.selectedTab;
        local v22 = l_deepCopy_0(v20.previewStatus.selectedAssets);
        if v17 then
            v22[l_selectedTab_0] = v13(v17, v18, l_PreviewConstantsInterface_0.isTabMultiSelect(l_selectedTab_0), v22[l_selectedTab_0]);
            if v18 then
                if l_selectedTab_0 == l_PreviewConstants_0.TABS_KEYS.Avatars then
                    local l_v7_0 = v7;
                    l_v7_0.TotalAvatars = l_v7_0.TotalAvatars + 1;
                elseif l_selectedTab_0 == l_PreviewConstants_0.TABS_KEYS.Clothing then
                    local l_v7_1 = v7;
                    l_v7_1.TotalLayers = l_v7_1.TotalLayers + 1;
                end;
            end;
        end;
        local v25 = v22[l_PreviewConstants_0.TABS_KEYS.Avatars];
        if not if v25 then next(v25) and true or false else false then
            local l_Avatars_0 = l_PreviewConstants_0.TABS_KEYS.Avatars;
            v25 = l_PreviewConstantsInterface_0.getTabInfo(l_Avatars_0);
            if not v22[l_Avatars_0] then
                v22[l_Avatars_0] = {};
            end;
            local _, v28 = next(v25.BundleIds);
            v22[l_Avatars_0] = {
                v28
            };
        end;
        v19:dispatch(v6(v22));
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_AccessoryAndBodyToolShared_0 = require(l_Parent_0.Packages.AvatarToolsShared).Util.AccessoryAndBodyToolShared;
local l_AccessoryUtil_0 = l_AccessoryAndBodyToolShared_0.AccessoryUtil;
local l_ItemCharacteristics_0 = l_AccessoryAndBodyToolShared_0.ItemCharacteristics;
local v4 = require(l_Parent_0.Src.Actions.SetInBounds);
return function(v5, v6)
    return function(v7)
        if v5 then
            if not l_ItemCharacteristics_0.isAvatar(v5) then
                local l_accessoryTypeInfo_0 = v7:getState().selectItem.accessoryTypeInfo;
                if l_accessoryTypeInfo_0 then
                    if not v6 then
                        v6 = v5:FindFirstChild(l_accessoryTypeInfo_0.Name);
                        if not v6 then
                            return nil;
                        end;
                    end;
                    v7:dispatch(v4((l_AccessoryUtil_0:checkAccessoryBounds(v6.WorldPosition + l_accessoryTypeInfo_0.Offset, l_accessoryTypeInfo_0.Bounds, v5.CFrame, v5.Size))));
                    return ;
                else
                    return ;
                end;
            else
                v7:dispatch(v4(true));
                return ;
            end;
        else
            return ;
        end;
    end;
end;


local v3 = {
    init = function(v0)
        v0.HasPublished = false;
        v0:resetSession();
    end,
    resetSession = function(v1)
        v1.FirstAction = nil;
        v1.CurrentScreen = nil;
        v1.RigidFlow = false;
        v1.TotalLayers = 0;
        v1.TotalAvatars = 1;
        v1.CageEdits = 0;
    end,
    reset = function(v2)
        v2:init();
    end
};
v3:init();
return v3;


local v0 = {
    USE_MOCK_RBF_DATA = false,
    CLUSTER_THRESHOLD = 0.12,
    DEFAULT_FALLOFF = 0.5,
    MAX_FALLOFF = 20,
    MAX_TRANSPARENCY = 100,
    DEFAULT_LATTICE_SUBDIVISIONS = Vector3.new(1, 3, 1),
    DEFAULT_CAGE_TRANSPARENCY = 100,
    MANNEQUIN_PATH = "rbxasset://models/LayeredClothingEditor/mannequin.rbxm",
    HEAD_TEMPLATE_PATH = "rbxasset://models/LayeredClothingEditor/PartHeadTemplate.rbxm",
    PREVIEW_FOLDER_NAME = "LayeredClothingEditorPreview",
    PREVIEW_REMOTE_EVENT_NAME = "PreviewChanged",
    GENERATE_LEGACY_KEY = "GenerateLegacyAcc",
    GENERATE_MESH_PART_KEY = "GenerateMeshPartAcc",
    MOCK_HIP_OFFSET = Vector3.new(0, 4.1, 0),
    MAX_WAYPOINTS = 20,
    CAGE_SAVE_DATA_FOLDER = "CageSaveData",
    LCE_POINT_TAG = "LCE_Point_Tag",
    LCE_CONTROL_TAG = "LCE_Control_Tag",
    DRAGGER_STATES = {
        Ready = "Ready",
        DragSelecting = "DragSelecting"
    },
    TOOL_MODE = {
        None = "None",
        Point = "PointTool",
        Lattice = "LatticeTool",
        Reset = "Reset",
        Finish = "Finish"
    },
    EDIT_MODE = {
        Outer = Enum.CageType.Outer,
        Inner = Enum.CageType.Inner,
        Mesh = Enum.MeshType.FileMesh
    },
    SELECTOR_MODE = {
        None = "None",
        EditingItem = "EditingItem",
        Preview = "Preview"
    },
    KEY_SHORTCUTS = {
        LockControl = Enum.KeyCode.R
    },
    SIGNAL_KEYS = {
        SelectionChanged = "SelectionChanged",
        ToolChanged = "ToolChanged",
        PluginWindowFocused = "PluginWindowFocused"
    },
    SCREENS = {
        Select = "Select",
        AssetType = "AssetType",
        Edit = "Edit",
        Generate = "Generate"
    }
};
local v1 = {
    "AdjustAccessory",
    "EditCage",
    "Preview",
    "Generate"
};
local v2 = {
    "Rigid",
    "Layered"
};
local v3 = {
    "Thumbnail",
    "Workspace"
};
local v4 = {
    "Unedited",
    "Edited"
};
local v5 = {
    "Unpublished",
    "Published"
};
local function _(v6)
    local v7 = {};
    for v8, v9 in ipairs(v6) do
        v7[v9] = v8;
    end;
    return v7;
end;
local v11 = {};
for v12, v13 in ipairs(v1) do
    v11[v13] = v12;
end;
v0.ACTIONS = v11;
v0.ANALYTICS_CONSTANTS = {};
local l_ANALYTICS_CONSTANTS_0 = v0.ANALYTICS_CONSTANTS;
local v15 = {};
for v16, v17 in ipairs(v2) do
    v15[v17] = v16;
end;
l_ANALYTICS_CONSTANTS_0.FLOW = v15;
l_ANALYTICS_CONSTANTS_0 = v0.ANALYTICS_CONSTANTS;
v15 = {};
for v18, v19 in ipairs(v3) do
    v15[v19] = v18;
end;
l_ANALYTICS_CONSTANTS_0.PREVIEW_SELECT_METHOD = v15;
l_ANALYTICS_CONSTANTS_0 = v0.ANALYTICS_CONSTANTS;
v15 = {};
for v20, v21 in ipairs(v4) do
    v15[v21] = v20;
end;
l_ANALYTICS_CONSTANTS_0.CAGE_EDITING = v15;
l_ANALYTICS_CONSTANTS_0 = v0.ANALYTICS_CONSTANTS;
v15 = {};
for v22, v23 in ipairs(v5) do
    v15[v23] = v22;
end;
l_ANALYTICS_CONSTANTS_0.PUBLISHING = v15;
v0.EDIT_MODE_KEY_TO_STRING = {
    [v0.EDIT_MODE.Inner] = "Inner",
    [v0.EDIT_MODE.Outer] = "Outer",
    [v0.EDIT_MODE.Mesh] = "Mesh"
};
return v0;


local l_Workspace_0 = game:GetService("Workspace");
local v1 = {};
local function _(v2)
    local l_LayeredClothingEditorFlags_0 = l_Workspace_0:FindFirstChild("LayeredClothingEditorFlags");
    if not l_LayeredClothingEditorFlags_0 then
        return false;
    else
        return l_LayeredClothingEditorFlags_0:FindFirstChild(v2) and l_LayeredClothingEditorFlags_0[v2].Value;
    end;
end;
v1.RunTests = function()
    local l_LayeredClothingEditorFlags_1 = l_Workspace_0:FindFirstChild("LayeredClothingEditorFlags");
    if not l_LayeredClothingEditorFlags_1 then
        return false;
    else
        local l_RunTests_0 = l_LayeredClothingEditorFlags_1:FindFirstChild("RunTests");
        if not l_RunTests_0 then
            return l_RunTests_0;
        else
            return l_LayeredClothingEditorFlags_1.RunTests.Value;
        end;
    end;
end;
v1.RunRhodiumTests = function()
    local l_LayeredClothingEditorFlags_2 = l_Workspace_0:FindFirstChild("LayeredClothingEditorFlags");
    if not l_LayeredClothingEditorFlags_2 then
        return false;
    else
        local l_RunRhodiumTests_0 = l_LayeredClothingEditorFlags_2:FindFirstChild("RunRhodiumTests");
        if not l_RunRhodiumTests_0 then
            return l_RunRhodiumTests_0;
        else
            return l_LayeredClothingEditorFlags_2.RunRhodiumTests.Value;
        end;
    end;
end;
v1.LogRoduxEvents = function()
    local l_LayeredClothingEditorFlags_3 = l_Workspace_0:FindFirstChild("LayeredClothingEditorFlags");
    if not l_LayeredClothingEditorFlags_3 then
        return false;
    else
        local l_LogRoduxEvents_0 = l_LayeredClothingEditorFlags_3:FindFirstChild("LogRoduxEvents");
        if not l_LogRoduxEvents_0 then
            return l_LogRoduxEvents_0;
        else
            return l_LayeredClothingEditorFlags_3.LogRoduxEvents.Value;
        end;
    end;
end;
v1.LogAnalytics = function()
    local l_LayeredClothingEditorFlags_4 = l_Workspace_0:FindFirstChild("LayeredClothingEditorFlags");
    if not l_LayeredClothingEditorFlags_4 then
        return false;
    else
        local l_LogAnalytics_0 = l_LayeredClothingEditorFlags_4:FindFirstChild("LogAnalytics");
        if not l_LogAnalytics_0 then
            return l_LogAnalytics_0;
        else
            return l_LayeredClothingEditorFlags_4.LogAnalytics.Value;
        end;
    end;
end;
v1.MockItemHasFullCage = function()
    local l_LayeredClothingEditorFlags_5 = l_Workspace_0:FindFirstChild("LayeredClothingEditorFlags");
    if not l_LayeredClothingEditorFlags_5 then
        return false;
    else
        local l_MockItemHasFullCage_0 = l_LayeredClothingEditorFlags_5:FindFirstChild("MockItemHasFullCage");
        if not l_MockItemHasFullCage_0 then
            return l_MockItemHasFullCage_0;
        else
            return l_LayeredClothingEditorFlags_5.MockItemHasFullCage.Value;
        end;
    end;
end;
v1.UseMockCages = function()
    local l_LayeredClothingEditorFlags_6 = l_Workspace_0:FindFirstChild("LayeredClothingEditorFlags");
    if not l_LayeredClothingEditorFlags_6 then
        return false;
    else
        local l_UseMockCages_0 = l_LayeredClothingEditorFlags_6:FindFirstChild("UseMockCages");
        if not l_UseMockCages_0 then
            return l_UseMockCages_0;
        else
            return l_LayeredClothingEditorFlags_6.UseMockCages.Value;
        end;
    end;
end;
return v1;


local v3 = {
    fuzzyEq = function(_, v1, v2)
        return math.abs(v1 - v2) < 0.001;
    end
};
v3.fuzzyEq_CFrame = function(_, v5, v6)
    local v7, v8, v9 = v5:ToEulerAnglesXYZ();
    local v10, v11, v12 = v6:ToEulerAnglesXYZ();
    return ((v5.p:FuzzyEq(v6.p) and v3:fuzzyEq(v7, v10)) and v3:fuzzyEq(v8, v11)) and v3:fuzzyEq(v9, v12);
end;
v3.adornLocalSpace = function(_, v14, v15)
    return v14.CFrame:inverse() * CFrame.new(v15);
end;
v3.pointInRect = function(_, v17, v18, v19, v20, v21)
    if ((v18.X <= v17.X and v17.X <= v18.X + v20) and v19.Y <= v17.Y) and v17.Y <= v19.Y + v21 then
        return true;
    else
        return false;
    end;
end;
return v3;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Framework);
local _ = require(l_Parent_0.Packages.AvatarToolsShared);
local l_Mouse_0 = v2.ContextServices.Mouse;
local v5 = require(l_Parent_0.Src.Resources.PluginTheme);
local v6 = require(l_Parent_0.Src.Util.DebugFlags);
local _ = require(l_Parent_0.Src.Util.TestHelper);
local v8 = require(l_Parent_0.Packages.Cryo);
local l_ContextServices_0 = v2.ContextServices;
return function(v10, v11, v12, v13)
    local v14 = nil;
    local function v16(v15)
        if v14 then
            v1.unmount(v14);
        end;
        if v15.OnClose then
            v15.OnClose();
        end;
    end;
    local v17 = v6.RunTests() or v6.RunRhodiumTests();
    local _ = nil;
    local v20 = l_ContextServices_0.provide({
        v11,
        if not v17 then v5.makePluginTheme() else v5.mock(),
        v10,
        l_Mouse_0.new(v10:get():getMouse())
    }, {
        v1.createElement(v12, v8.Dictionary.join(v13, {
            OnClose = function()
                local l_v13_0 = v13;
                if v14 then
                    v1.unmount(v14);
                end;
                if l_v13_0.OnClose then
                    l_v13_0.OnClose();
                end;
            end
        }))
    });
    if v17 then
    end;
    v14 = v1.mount(v20, nil);
    return v16;
end;


local l_TextService_0 = game:GetService("TextService");
local v1 = {};
local v2 = Vector2.new(1000000, 50);
v1.getTextWidth = function(v3, v4, v5)
    return l_TextService_0:GetTextSize(v3, v4, v5, v2).X;
end;
return v1;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Rodux);
local l_ItemCharacteristics_0 = require(l_Parent_0.Packages.AvatarToolsShared).Util.AccessoryAndBodyToolShared.ItemCharacteristics;
local v4 = require(l_Parent_0.Packages.Dev.Rhodium);
local l_Element_0 = v4.Element;
local l_XPath_0 = v4.XPath;
local l_Localization_0 = v1.ContextServices.Localization;
local v8 = require(l_Parent_0.Src.Reducers.MainReducer);
local v9 = {
    DefaultClothesName = "clothes",
    DefaultAvatarName = "dummy",
    AttachmentCFrame = CFrame.new(10, 20, 10),
    DefaultAttachmentName = "WaistFrontAttachment",
    DefaultMeshId = "https://assetdelivery.roblox.com/v1/asset/?id=6799863967"
};
local function _()
    wait(0.1);
end;
v9.delay = function()
    wait(0.1);
end;
v9.createTestStore = function()
    return v2.Store.new(v8, nil, {
        v2.thunkMiddleware
    });
end;
v9.clickElement = function(v11, v12)
    v11:click(v12);
    wait(0.1);
end;
v9.sendInputToXPath = function(v13, v14)
    local v15 = v9.clickXPath(v13, 2);
    wait(0.1);
    v15:sendKey(Enum.KeyCode.Backspace);
    wait(0.1);
    v15:sendText(v14);
    wait(0.1);
    v15:sendKey(Enum.KeyCode.Return);
    wait(0.1);
end;
v9.confirmDialog = function()
    local v16 = l_XPath_0.new(game.CoreGui[l_Localization_0.mock():getText("Dialog", "DefaultTitle")]):cat(l_XPath_0.new("SolidBackground.ButtonContainer.1.Contents.TextButton"));
    v9.waitForXPathInstance(v16);
    v9.clickXPath(v16);
end;
v9.goToAssetTypeScreenFromStart = function(v17, v18)
    local v19 = v9.getScreenFlow():cat(l_XPath_0.new("SelectFrame.Content")):cat(l_XPath_0.new("NextAndBackButtonContainer.NextButton.Contents.TextButton"));
    v9.waitForXPathInstance(v19);
    if not v17 then
        if not v18 then
            v9.addLCItemWithoutCageFromExplorer();
        else
            v9.addLCItemWithAttachmentFromExplorer();
        end;
    else
        v9.addLCItemWithFullCageFromExplorer();
    end;
    v9.clickXPath(v19);
    wait(0.1);
end;
v9.goToEditScreenFromStart = function(v20, v21)
    v9.goToAssetTypeScreenFromStart(v20, v21);
    local v22 = v9.getScreenFlow(true):cat(l_XPath_0.new("ExpandablePane.Content"));
    local v23 = v22:cat(l_XPath_0.new("Content.ClothingTypeList.List.Shirt"));
    local v24 = v22:cat(l_XPath_0.new("Content.AccessoryTypeList.List.Waist"));
    local v25 = v22:cat(l_XPath_0.new("Content.List.Front"));
    local v26 = v22:cat(l_XPath_0.new("NextAndBackButtonContainer.NextButton.Contents.TextButton"));
    if not v20 then
        v9.waitForXPathInstance(v24);
        v9.clickXPath(v24);
        v9.waitForXPathInstance(v26);
        v9.clickXPath(v26);
        v9.waitForXPathInstance(v25);
        v9.clickXPath(v25);
    else
        v9.waitForXPathInstance(v23);
        v9.clickXPath(v23);
    end;
    v9.waitForXPathInstance(v26);
    v9.clickXPath(v26);
    wait(0.1);
end;
v9.clickEquippableGridTile = function(v27)
    local v28 = v9.getEquippableGridTilePath(v27);
    v9.waitForXPathInstance(v28);
    local v29 = v28:cat(l_XPath_0.new("Contents.TextButton"));
    v9.waitForXPathInstance(v29);
    v9.clickXPath(v29);
end;
v9.getEquippableGridTilePath = function(v30)
    return v9.getEditScreenContainer():cat(l_XPath_0.new("PreviewSwizzle.Content.PreviewFrame.Grid")):cat(l_XPath_0.new("ScrollingFrame.Scroller")):cat(l_XPath_0.new((tostring(v30 + 1))));
end;
v9.getEquippableGridTileInstance = function(v31)
    return v9.waitForXPathInstance((v9.getEquippableGridTilePath(v31)));
end;
v9.clickXPath = function(v32, v33)
    local v34 = l_Element_0.new(v32);
    v9.clickElement(v34, v33);
    return v34;
end;
local function v37(v35)
    local v36 = os.time();
    while true do
        if v35() then
            return true;
        elseif os.time() - v36 > 5 then
            return false;
        else
            wait(0.1);
        end;
    end;
end;
v9.waitForValid = function(v38)
    return (v37(v38));
end;
v9.waitForXPathInstance = function(v39)
    if not v37(function()
        return v39:getFirstInstance();
    end) then
        return nil;
    else
        return v39:getFirstInstance();
    end;
end;
local function _(v40, v41)
    local l_status_0, l_result_0 = pcall(function()
        return v40[v41];
    end);
    return l_status_0 == true and l_result_0 or nil;
end;
v9.waitForPropertyEqualTo = function(v45, v46, v47)
    return (v37(function()
        local l_v45_0 = v45;
        local l_v46_0 = v46;
        local l_status_1, l_result_1 = pcall(function()
            return l_v45_0[l_v46_0];
        end);
        return (l_status_1 == true and l_result_1 or nil) == v47;
    end));
end;
v9.waitForChildrenCountEqualTo = function(v52, v53)
    return (v37(function()
        return #v52:GetChildren() == v53;
    end));
end;
v9.getScreenFlow = function(v54)
    if not v54 then
        return l_XPath_0.new("game.CoreGui.PluginMockGui.ScreenFlow");
    else
        return l_XPath_0.new("game.CoreGui.PluginMockGui.ScreenFlow.Screen.MainFrame.Scroller");
    end;
end;
v9.getEditScreenContainer = function()
    return l_XPath_0.new("game.CoreGui.PluginMockGui.Container.MainFrame");
end;
v9.cleanTempInstances = function()
    local v55 = v9.getTempInstancesFolder();
    if v55 then
        v55:Destroy();
    end;
    local v56 = v9.getTempScreenGui();
    if v56 then
        v56:Destroy();
    end;
end;
v9.getTempInstancesFolder = function()
    local l_TempInstancesFolder_0 = workspace:FindFirstChild("TempInstancesFolder");
    if not l_TempInstancesFolder_0 then
        l_TempInstancesFolder_0 = Instance.new("Folder");
        l_TempInstancesFolder_0.Name = "TempInstancesFolder";
        l_TempInstancesFolder_0.Parent = workspace;
        return l_TempInstancesFolder_0;
    else
        return l_TempInstancesFolder_0;
    end;
end;
v9.getTempScreenGui = function()
    local l_TempScreenGui_0 = game.CoreGui:FindFirstChild("TempScreenGui");
    if not l_TempScreenGui_0 then
        l_TempScreenGui_0 = Instance.new("ScreenGui", game.CoreGui);
        l_TempScreenGui_0.Name = "TempScreenGui";
        l_TempScreenGui_0.ZIndexBehavior = Enum.ZIndexBehavior.Sibling;
        return l_TempScreenGui_0;
    else
        return l_TempScreenGui_0;
    end;
end;
v9.createNonAvatar = function(v59)
    local l_Model_0 = Instance.new("Model");
    l_Model_0.Name = v59 or v9.DefaultAvatarName;
    l_Model_0.Parent = v9.getTempInstancesFolder();
    return l_Model_0;
end;
v9.createClothesWithoutCage = function(v61)
    local l_Model_1 = Instance.new("Model");
    local v63 = Instance.new("MeshPart", l_Model_1);
    v63.Name = v61 or v9.DefaultClothesName;
    l_Model_1.Parent = v9.getTempInstancesFolder();
    return v63;
end;
v9.createClothesWithFullCages = function(v64)
    local l_Model_2 = Instance.new("Model");
    local v66 = Instance.new("MeshPart", l_Model_2);
    v66.Name = v64 or v9.DefaultClothesName;
    l_Model_2.Parent = v9.getTempInstancesFolder();
    Instance.new("MeshPart", v66).Name = v66.Name;
    local v67 = Instance.new("WrapLayer", v66);
    v67.CageMeshId = v9.DefaultMeshId;
    v67.ReferenceMeshId = v9.DefaultMeshId;
    return v66;
end;
v9.createClothesWithOuterCage = function(v68)
    local l_Model_3 = Instance.new("Model");
    local v70 = Instance.new("MeshPart", l_Model_3);
    v70.Name = v68 or v9.DefaultClothesName;
    l_Model_3.Parent = v9.getTempInstancesFolder();
    Instance.new("MeshPart", v70).Name = v70.Name;
    Instance.new("WrapTarget", v70).CageMeshId = v9.DefaultMeshId;
    return v70;
end;
local function v74(v71)
    local l_Model_4 = Instance.new("Model");
    l_Model_4.Parent = v9.getTempInstancesFolder();
    Instance.new("Humanoid").Parent = l_Model_4;
    Instance.new("Part", l_Model_4).Name = "HumanoidRootPart";
    local v73 = Instance.new("MeshPart", l_Model_4);
    v73.Name = "UpperTorso";
    Instance.new("MeshPart", l_Model_4).Name = "LowerTorso";
    Instance.new("MeshPart", l_Model_4).Name = "Head";
    Instance.new("MeshPart", l_Model_4).Name = "LeftFoot";
    Instance.new("MeshPart", l_Model_4).Name = "RightFoot";
    Instance.new("MeshPart", l_Model_4).Name = "LeftHand";
    Instance.new("MeshPart", l_Model_4).Name = "RightHand";
    Instance.new("MeshPart", l_Model_4).Name = "RightUpperArm";
    Instance.new("MeshPart", l_Model_4).Name = "RightLowerArm";
    Instance.new("MeshPart", l_Model_4).Name = "LeftUpperArm";
    Instance.new("MeshPart", l_Model_4).Name = "LeftLowerArm";
    Instance.new("MeshPart", l_Model_4).Name = "LeftUpperLeg";
    Instance.new("MeshPart", l_Model_4).Name = "LeftLowerLeg";
    Instance.new("MeshPart", l_Model_4).Name = "RightUpperLeg";
    Instance.new("MeshPart", l_Model_4).Name = "RightLowerLeg";
    l_Model_4.Name = v71 or v9.DefaultAvatarName;
    Instance.new("WrapTarget", v73);
    return l_Model_4;
end;
v9.createAvatarWithoutCages = function(v75)
    return (v74(v75));
end;
v9.createAvatarWithFullCages = function(v76)
    local v77 = v74(v76);
    Instance.new("Humanoid").Parent = v77;
    local l_MeshPart_0 = Instance.new("MeshPart");
    l_MeshPart_0.Parent = v77;
    Instance.new("Attachment", l_MeshPart_0).Name = v9.DefaultAttachmentName;
    Instance.new("MeshPart", v77).Name = "Inner";
    Instance.new("MeshPart", v77).Name = "Outer";
    v77.PrimaryPart = l_MeshPart_0;
    return v77;
end;
local function _(v79)
    game:GetService("Selection"):Set({
        v79
    });
    wait(0.1);
end;
local function _(v81, v82)
    if v82 then
        v9.clickXPath(v82);
        game:GetService("Selection"):Set({
            v81
        });
        wait(0.1);
        v9.confirmDialog();
        return ;
    else
        return ;
    end;
end;
v9.addRegularPartFromExplorer = function()
    local l_Part_0 = Instance.new("Part");
    l_Part_0.Parent = v9.getTempInstancesFolder();
    game:GetService("Selection"):Set({
        l_Part_0
    });
    wait(0.1);
    return l_Part_0;
end;
v9.addLCItemWithAttachmentFromExplorer = function()
    local v85 = v9.createClothesWithoutCage();
    local v86 = Instance.new("Attachment", v85);
    v86.Name = v9.DefaultAttachmentName;
    v86.CFrame = v9.AttachmentCFrame;
    game:GetService("Selection"):Set({
        v85
    });
    wait(0.1);
    return v85;
end;
v9.addLCItemWithoutCageFromExplorer = function(v87)
    local v88 = v87 or v9.createClothesWithoutCage();
    assert(not l_ItemCharacteristics_0.hasFullCages(v88));
    game:GetService("Selection"):Set({
        v88
    });
    wait(0.1);
    return v88;
end;
v9.addLCItemWithFullCageFromExplorer = function(v89)
    local v90 = v89 or v9.createClothesWithFullCages();
    assert(l_ItemCharacteristics_0.hasFullCages(v90));
    game:GetService("Selection"):Set({
        v90
    });
    wait(0.1);
    return v90;
end;
v9.addLCItemWithOuterCageFromExplorer = function(v91)
    local v92 = v91 or v9.createClothesWithOuterCage();
    assert(l_ItemCharacteristics_0.hasOuterCage(v92));
    game:GetService("Selection"):Set({
        v92
    });
    wait(0.1);
    return v92;
end;
v9.addAvatarWithFullCagesFromExplorer = function()
    local v93 = v9.createAvatarWithFullCages();
    assert(l_ItemCharacteristics_0.hasFullCages(v93));
    game:GetService("Selection"):Set({
        v93
    });
    wait(0.1);
    return v93;
end;
v9.addLCItemWithInvalidCageFromExplorer = function()
    local v94 = v9.createClothesWithFullCages();
    local l_WrapLayer_0 = v94:FindFirstChild("WrapLayer");
    l_WrapLayer_0.CageMeshId = "";
    l_WrapLayer_0.ReferenceMeshId = "";
    assert(l_ItemCharacteristics_0.hasInvalidCage(v94));
    game:GetService("Selection"):Set({
        v94
    });
    wait(0.1);
    return v94;
end;
local function v99(v96)
    local v97 = v9.getEditScreenContainer():cat(l_XPath_0.new("PreviewSwizzle.Content.PreviewFrame.Grid")):cat(l_XPath_0.new("ScrollingFrame.Scroller")):cat(l_XPath_0.new("AddNewTile"));
    v9.waitForXPathInstance(v97);
    local v98 = v97:cat(l_XPath_0.new("Contents.TextButton"));
    v9.waitForXPathInstance(v98);
    if v98 then
        v9.clickXPath(v98);
        game:GetService("Selection"):Set({
            v96
        });
        wait(0.1);
        v9.confirmDialog();
        return ;
    else
        return ;
    end;
end;
v9.addAvatarToGrid = function()
    v99(v9.createAvatarWithFullCages());
end;
v9.addClothesItemToGrid = function()
    v99(v9.createClothesWithFullCages());
end;
return v9;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Rodux);
local v3 = require(l_Parent_0.Packages.AvatarToolsShared);
local v4 = require(l_Parent_0.Packages.LuaMeshEditingModule.Tools.PointTool);
local l_LuaMeshEditingModuleContext_0 = v3.Contexts.LuaMeshEditingModuleContext;
local l_Signals_0 = v3.Contexts.Signals;
local l_PreviewContext_0 = v3.Contexts.PreviewContext;
local l_EditingItemContext_0 = v3.Contexts.EditingItemContext;
local l_AssetServiceWrapper_0 = v3.Contexts.AssetServiceWrapper;
local l_StudioServiceWrapper_0 = v3.Contexts.StudioServiceWrapper;
local l_MannequinContext_0 = v3.Contexts.MannequinContext;
local v12 = require(l_Parent_0.Src.Resources.PluginTheme);
local v13 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v13.ContextServices;
local l_TestHelpers_0 = v13.TestHelpers;
local l_Http_0 = v13.Http;
local l_provideMockContext_0 = l_TestHelpers_0.provideMockContext;
local v18 = require(l_Parent_0.Src.Util.Constants);
local v19 = require(l_Parent_0.Src.Util.TestHelper);
local v20 = require(l_Parent_0.Src.Util.makeMockNetworkLayer);
local v21 = require(l_Parent_0.Src.Reducers.MainReducer);
local v22 = require(l_Parent_0.Src.Components.LayeredClothingEditor);
local v23 = {};
local function v39(v24, v25, v26)
    local v27 = v2.Store.new(v21, nil, {
        v2.thunkMiddleware
    });
    local v28 = l_Signals_0.new(v18.SIGNAL_KEYS);
    local v29 = l_EditingItemContext_0.new();
    local v30 = l_AssetServiceWrapper_0.mock();
    local v31 = l_StudioServiceWrapper_0.mock();
    local v32 = l_MannequinContext_0.mock();
    local v33 = v12.mock();
    local v34 = l_ContextServices_0.Localization.mock({
        libraries = {
            [v3.Resources.LOCALIZATION_PROJECT_NAME] = {
                stringResourceTable = v3.Resources.SourceStrings,
                translationResourceTable = v3.Resources.LocalizedStrings
            }
        }
    });
    local v35 = v4.new();
    v35:setFalloff(v18.DEFAULT_FALLOFF);
    local v36 = v1.mount(l_provideMockContext_0({
        v33,
        l_ContextServices_0.Analytics.mock(),
        v34,
        l_ContextServices_0.Store.new(v27),
        l_ContextServices_0.API.new({
            networking = l_Http_0.Networking.mock({
                onRequest = v20
            })
        }),
        l_ContextServices_0.Focus.new(v25),
        v28,
        v29,
        l_PreviewContext_0.new(),
        l_LuaMeshEditingModuleContext_0.new({
            [v18.TOOL_MODE.Point] = v35
        }),
        v30,
        v31,
        v32
    }, v24), v25);
    local l_status_0, l_result_0 = pcall(function()
        if v26 then
            v26(v25, v27, v29);
        end;
    end);
    v1.unmount(v36);
    v25:Destroy();
    v27:destruct();
    v19.cleanTempInstances();
    if not l_status_0 then
        error(l_result_0);
    end;
end;
v23.runTestMinimal = function(v40)
    local l_status_1, l_result_1 = pcall(function()
        if v40 then
            v40();
        end;
    end);
    v19.cleanTempInstances();
    if not l_status_1 then
        error(l_result_1);
    end;
end;
v23.runComponentTest = function(v43, v44)
    v39({
        test = v43
    }, Instance.new("ScreenGui"), v44);
end;
local function _()
    local v45 = Instance.new("ScreenGui", game.CoreGui);
    v45.Name = "PluginMockGui";
    v45.ZIndexBehavior = Enum.ZIndexBehavior.Sibling;
    return v45;
end;
v23.runRhodiumTest = function(v47)
    local l_v39_0 = v39;
    local v49 = {
        LayeredClothingEditor = v1.createElement(v22)
    };
    local v50 = Instance.new("ScreenGui", game.CoreGui);
    v50.Name = "PluginMockGui";
    v50.ZIndexBehavior = Enum.ZIndexBehavior.Sibling;
    l_v39_0(v49, v50, v47);
end;
return v23;


return function(v0, v1, v2, v3)
    for v4, _ in pairs(v3) do
        if v0:getText(v1, v4) == v2 then
            return v4;
        end;
    end;
end;


return function(v0, v1, v2)
    local v3 = {};
    for v4 in pairs(v2) do
        table.insert(v3, v0:getText(v1, v4));
    end;
    table.sort(v3);
    return v3;
end;


local l_HttpService_0 = game:GetService("HttpService");
local function _(v1)
    return v1 and string.find(tostring(v1), "?");
end;
local function _(v3)
    local v4 = v3 and string.find(tostring(v3), "?");
    return (not not v4 and v4 > 1) and v3:sub(1, v4 - 1) or nil;
end;
local function _(v6)
    local v7 = v6 and string.find(tostring(v6), "?");
    return (not not v7 and v7 < string.len(v6)) and v6:sub(v7 + 1) or nil;
end;
return function(v9)
    local v19 = {
        ["https://develop.roblox.com/v1/assets"] = function(v10)
            local v15 = (function(v11)
                local v12 = {};
                for v13 in (string.gsub(v11, "^assetIds=", "") .. ","):gmatch("(.-),") do
                    local v14 = tonumber(v13);
                    if v14 then
                        table.insert(v12, v14);
                    end;
                end;
                return v12;
            end)(v10);
            local v16 = {
                data = {}
            };
            for v17, v18 in ipairs(v15) do
                v16.data[v17] = {
                    canHaveThumbnail = false,
                    isArchivable = false,
                    id = v18,
                    isPublicDomainEnabled = false,
                    typeId = 19,
                    isModerated = false,
                    isVersioningEnabled = false,
                    name = "Merely's ROBLOX Tablet",
                    description = "Winner: Merely. ROBLOX will be in touch to redeem this prize.",
                    enableComments = false,
                    isCopyingAllowed = false
                };
            end;
            return l_HttpService_0:JSONEncode(v16);
        end
    };
    local l_Url_0 = v9.Url;
    local v21 = l_Url_0 and string.find(tostring(l_Url_0), "?");
    local v22 = (not not v21 and v21 > 1) and l_Url_0:sub(1, v21 - 1) or nil;
    v21 = v9.Url;
    local v23 = v21 and string.find(tostring(v21), "?");
    return {
        Body = (v19[v22] or function()
            return l_HttpService_0:JSONEncode({
                data = {}
            });
        end)((not not v23 and v23 < string.len(v21)) and v21:sub(v23 + 1) or nil),
        Success = true,
        StatusMessage = "OK",
        StatusCode = 200
    };
end;


local v0 = {
    LockControl = "R",
    Undo = "Ctrl+Z",
    Redo = "Ctrl+Y"
};
local _ = function(_, v2, v3, v4)
    return {
        id = v3,
        text = v2:getText("Actions", v3),
        defaultShortcut = v4 ~= "" and v4 or nil,
        allowBinding = false
    };
end;
return function(_, v7)
    local v8 = {};
    for v9, v10 in pairs(v0) do
        local l_v10_0 = v10;
        v8[v9] = {
            id = v9,
            text = v7:getText("Actions", v9),
            defaultShortcut = l_v10_0 ~= "" and l_v10_0 or nil,
            allowBinding = false
        };
    end;
    return v8;
end;


return function(v0, v1, v2)
    local v3 = {};
    for v4 in pairs(v2) do
        table.insert(v3, {
            Key = v4,
            Text = v0:getText(v1, v4),
            Disabled = false
        });
    end;
    return v3;
end;


if plugin then
    local l_Parent_0 = script.Parent.Parent;
    local v1 = require(l_Parent_0.Src.MainPlugin);
    local v2 = nil;
    local v3 = nil;
    local function _()
        plugin.Name = l_Parent_0.Name;
        v2 = v1.new();
        v2:renderSelection();
    end;
    local function _()
        if v2 then
            v2:destroy();
            v2 = nil;
        end;
    end;
    local function _()
        if not settings().Studio["Show Light Guides"] then
            if v2 then
                v2:destroy();
                v2 = nil;
            end;
            return ;
        else
            plugin.Name = l_Parent_0.Name;
            v2 = v1.new();
            v2:renderSelection();
            return ;
        end;
    end;
    plugin.Unloading:Connect(function()
        if not (not v2 or not v2) then
            v2:destroy();
            v2 = nil;
        end;
        if v3 then
            v3:Disconnect();
            v3 = nil;
        end;
    end);
    v3 = settings().Studio:GetPropertyChangedSignal("Show Light Guides"):Connect(function()
        if not settings().Studio["Show Light Guides"] then
            if v2 then
                v2:destroy();
                v2 = nil;
            end;
            return ;
        else
            plugin.Name = l_Parent_0.Name;
            v2 = v1.new();
            v2:renderSelection();
            return ;
        end;
    end);
    if not settings().Studio["Show Light Guides"] then
        if v2 then
            v2:destroy();
            v2 = nil;
        end;
    else
        plugin.Name = l_Parent_0.Name;
        v2 = v1.new();
        v2:renderSelection();
    end;
    return ;
else
    return ;
end;


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


return {
    MAX_POOL_SIZE = 2048,
    THICKNESS = 0.1,
    TRANSPARENCY = 0.5
};


local v0 = setmetatable({}, {
    __mode = "k"
});
local function v1()
end;
local function v3(v2)
    return v2.Name;
end;
return function(v4)
    local v5 = v0[v4];
    if v5 == nil then
        v5 = not xpcall(v3, v1, v4);
        v0[v4] = v5;
    end;
    return v5;
end;


if plugin then
    local l_script_FirstAncestor_0 = script:FindFirstAncestor("LightingCompatibilityMigration");
    local v1 = require(l_script_FirstAncestor_0.Packages.TestLoader);
    v1.launch("LightingCompatibilityMigration", l_script_FirstAncestor_0.Src);
    if not v1.isCli() then
        if require(l_script_FirstAncestor_0.Bin.Common.defineLuaFlags).getFFlagEnableLightingCompatibilityMigration() then
            local v2 = require(l_script_FirstAncestor_0.Bin.Common.pluginType);
            if v2.get() ~= v2.Asset then
                return ;
            else
                require(l_script_FirstAncestor_0.Bin.Common.setup)(plugin, (require(l_script_FirstAncestor_0.Bin.Common.setupMain)));
                return ;
            end;
        else
            return ;
        end;
    else
        return ;
    end;
else
    return ;
end;


game:DefineFastFlag("EnableLightingCompatibilityMigration", false);
return {
    getFFlagEnableLightingCompatibilityMigration = function()
        return game:GetFastFlag("EnableLightingCompatibilityMigration");
    end
};


return {
    Asset = "Asset",
    Standalone = "Standalone",
    get = function()
        return "Asset";
    end
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("LightingCompatibilityMigration");
local v1 = require(l_script_FirstAncestor_0.Packages.PluginLoader.PluginLoaderBuilder);
local l_SourceStrings_0 = l_script_FirstAncestor_0.Src.Resources.Localization.SourceStrings;
local l_LocalizedStrings_0 = l_script_FirstAncestor_0.Src.Resources.Localization.LocalizedStrings;
local v4 = require(l_script_FirstAncestor_0.Bin.Common.pluginType);
return function(v5, v6)
    v5.Name = l_script_FirstAncestor_0.Name;
    local v13 = {
        getName = function(v7, v8, v9)
            return v7(v8, v9, "Plugin", "Button");
        end,
        getDescription = function(v10, v11, v12)
            return v10(v11, v12, "Plugin", "Description");
        end,
        icon = "rbxlocaltheme://GameSettings",
        enabled = false
    };
    local v17 = {
        plugin = v5,
        pluginName = "LightingCompatibilityMigration",
        translationResourceTable = l_LocalizedStrings_0,
        fallbackResourceTable = l_SourceStrings_0,
        getToolbarName = function(v14, v15, v16)
            return v14(v15, v16, "Plugin", "Toolbar");
        end,
        buttonInfo = v13
    };
    local l_RunService_0 = game:GetService("RunService");
    local v19 = v4.get() == v4.Standalone;
    local v20 = l_RunService_0:IsEdit();
    if not v19 and not v20 then
        v1.build(v17);
        return ;
    else
        v13.enabled = true;
        v17.dockWidgetInfo = {
            id = "LightingCompatibilityMigration",
            dockWidgetPluginGuiInfo = DockWidgetPluginGuiInfo.new(Enum.InitialDockState.Bottom, false, false, 640, 480, 250, 200),
            getDockTitle = function(v21, v22, v23)
                return v21(v22, v23, "Plugin", "Name");
            end,
            zIndexBehavior = Enum.ZIndexBehavior.Sibling
        };
        local v24 = v1.build(v17);
        if v24.pluginLoader:waitForUserInteraction() then
            v6(v5, v24);
            return ;
        else
            return ;
        end;
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("LightingCompatibilityMigration");
return function(v1, v2)
    local v3 = require(l_script_FirstAncestor_0.Packages.React);
    local v4 = require(l_script_FirstAncestor_0.Packages.ReactRoblox);
    local v5 = v3.createElement(require(l_script_FirstAncestor_0.Src.MainPlugin), {
        Plugin = v1,
        PluginLoaderContext = v2
    });
    local v6 = v4.createRoot((Instance.new("Frame")));
    assert(v6);
    v6:render(v5);
    v1.Unloading:Connect(function()
        if v6 then
            v6:render(nil);
            v6 = nil;
        end;
    end);
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("LightingCompatibilityMigration");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local l_Localization_0 = require(l_script_FirstAncestor_0.Packages.Framework).ContextServices.Localization;
return function(v3)
    return v1.createElement("Frame", {
        [v1.Tag] = "Component-BasicExample X-Fit"
    }, {
        OptionalContent = if not v3.showContent then nil else v1.createElement("TextLabel", {
            Text = l_Localization_0:use():getText("BasicExample", "Text")
        })
    });
end;


local l_createStyleRule_0 = require(script:FindFirstAncestor("LightingCompatibilityMigration").Packages.Framework).Styling.createStyleRule;
return l_createStyleRule_0(".Component-BasicExample", {
    BackgroundColor3 = "$BackgroundPaper",
    BorderSizePixel = 0
}, {
    l_createStyleRule_0("::UICorner", {
        CornerRadius = UDim.new(0, 10)
    }),
    l_createStyleRule_0(":hover", {
        BackgroundColor3 = "$BackgroundHover"
    }),
    l_createStyleRule_0("> #OptionalContent", {
        TextSize = 24,
        Font = Enum.Font.Gotham,
        TextColor3 = "$TextPrimary",
        Size = UDim2.new(1, 0, 0, 50),
        BackgroundTransparency = 1,
        TextXAlignment = Enum.TextXAlignment.Center,
        TextYAlignment = Enum.TextYAlignment.Center
    })
});


local l_script_FirstAncestor_0 = script:FindFirstAncestor("LightingCompatibilityMigration");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local l_Localization_0 = require(l_script_FirstAncestor_0.Packages.Framework).ContextServices.Localization;
return function(_)
    local v4 = l_Localization_0:use();
    local v5, v6 = v1.useState(0);
    return v1.createElement("Frame", {
        [v1.Tag] = "Component-CounterExample X-Fit X-Column"
    }, {
        Label = v1.createElement("TextLabel", {
            Text = v4:getText("CounterExample", "CounterLabel", {
                counter = v5
            })
        }),
        Button = v1.createElement("TextButton", {
            Text = v4:getText("CounterExample", "Button"),
            [v1.Event.Activated] = function()
                v6(v5 + 1);
            end
        })
    });
end;


local l_createStyleRule_0 = require(script:FindFirstAncestor("LightingCompatibilityMigration").Packages.Framework).Styling.createStyleRule;
return l_createStyleRule_0(".Component-CounterExample", {
    BackgroundColor3 = "$BackgroundPaper",
    BorderSizePixel = 0
}, {
    l_createStyleRule_0("::UICorner", {
        CornerRadius = UDim.new(0, 10)
    }),
    l_createStyleRule_0(":hover", {
        BackgroundColor3 = "$BackgroundHover"
    }),
    l_createStyleRule_0("> TextLabel", {
        TextSize = 24,
        Font = Enum.Font.Gotham,
        TextColor3 = "$TextPrimary",
        Size = UDim2.new(1, 0, 0, 50),
        BackgroundTransparency = 1,
        TextXAlignment = Enum.TextXAlignment.Center,
        TextYAlignment = Enum.TextYAlignment.Center
    }),
    l_createStyleRule_0("> TextButton", {
        TextSize = 50,
        Font = Enum.Font.Gotham,
        TextColor3 = "$TextPrimary",
        Size = UDim2.new(1, 0, 0, 100),
        BackgroundTransparency = 1,
        TextXAlignment = Enum.TextXAlignment.Center,
        TextYAlignment = Enum.TextYAlignment.Center
    })
});


local l_script_FirstAncestor_0 = script:FindFirstAncestor("LightingCompatibilityMigration");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_DockWidget_0 = v2.UI.DockWidget;
local l_ContextServices_0 = v2.ContextServices;
local l_Plugin_0 = l_ContextServices_0.Plugin;
local l_Mouse_0 = l_ContextServices_0.Mouse;
local l_StudioTheme_0 = v2.Style.Themes.StudioTheme;
local l_registerPluginStyles_0 = v2.Styling.registerPluginStyles;
local l_SourceStrings_0 = l_script_FirstAncestor_0.Src.Resources.Localization.SourceStrings;
local l_LocalizedStrings_0 = l_script_FirstAncestor_0.Src.Resources.Localization.LocalizedStrings;
local v11 = require(l_script_FirstAncestor_0.Src.Components.BasicExample);
local v12 = v1.PureComponent:extend("MainPlugin");
v12.init = function(v13, v14)
    v13.state = {
        enabled = false
    };
    v13.toggleEnabled = function()
        v13:setState(function(v15)
            return {
                enabled = not v15.enabled
            };
        end);
    end;
    v13.onClose = function()
        v13:setState({
            enabled = false
        });
    end;
    v13.onRestore = function(v16)
        v13:setState({
            enabled = v16
        });
    end;
    v13.onWidgetEnabledChanged = function(v17)
        v13:setState({
            enabled = v17.Enabled
        });
    end;
    v13.onDockWidgetCreated = function()
        v13.props.PluginLoaderContext.mainButtonClickedSignal:Connect(v13.toggleEnabled);
    end;
    v13.localization = l_ContextServices_0.Localization.new({
        stringResourceTable = l_SourceStrings_0,
        translationResourceTable = l_LocalizedStrings_0,
        pluginName = "LightingCompatibilityMigration"
    });
    v13.analytics = l_ContextServices_0.Analytics.new(function()
        return {};
    end, {});
    v13.DEPRECATED_stylizer = l_StudioTheme_0.new();
    v13.design = l_registerPluginStyles_0(v14.Plugin);
end;
v12.didUpdate = function(v18)
    v18.props.PluginLoaderContext.mainButton:SetActive(v18.state.enabled);
end;
v12.render = function(v19)
    local l_props_0 = v19.props;
    local l_state_0 = v19.state;
    local l_Plugin_1 = l_props_0.Plugin;
    return l_ContextServices_0.provide({
        l_Plugin_0.new(l_Plugin_1),
        l_Mouse_0.new(l_Plugin_1:getMouse()),
        v19.localization,
        v19.analytics
    }, {
        MainWidget = v1.createElement(l_DockWidget_0, {
            Id = "LightingCompatibilityMigration",
            Enabled = l_state_0.enabled,
            Title = v19.localization:getText("Plugin", "Name"),
            ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
            InitialDockState = Enum.InitialDockState.Bottom,
            Size = Vector2.new(640, 480),
            MinSize = Vector2.new(250, 200),
            OnClose = v19.onClose,
            Widget = l_props_0.PluginLoaderContext.mainDockWidget,
            OnWidgetCreated = v19.onDockWidgetCreated,
            [v1.Change.Enabled] = v19.onWidgetEnabledChanged
        }, {
            Wrapper = v1.createElement("Frame", {
                [v1.Tag] = "X-Fill X-Column"
            }, {
                BasicExample = v1.createElement(v11, {
                    showContent = true
                })
            }),
            StyleLink = v1.createElement("StyleLink", {
                StyleSheet = v19.design
            })
        })
    });
end;
return v12;


local v0 = require(script:FindFirstAncestor("LightingCompatibilityMigration").Packages.Framework);
local l_TestHelpers_0 = v0.TestHelpers;
local l_ContextServices_0 = v0.ContextServices;
local v3 = {
    l_ContextServices_0.Analytics.mock(),
    l_ContextServices_0.Localization.mock()
};
return function(v4)
    assert(type(v4) == "table", "Expected children to be a table");
    return l_TestHelpers_0.provideMockContext(v3, v4);
end;


game:DefineFastFlag("LocalizationToolsFixLabel", false);
game:DefineFastFlag("ImageLocalizationFeatureEnabled", false);
game:DefineFastInt("LocalizationToolsCloudTableContextLength", 500);
game:DefineFastInt("LocalizationToolsCloudTableKeyLength", 300);
game:DefineFastInt("LocalizationToolsCloudTableSourceLength", 300);
game:DefineFastInt("LocalizationToolsCloudTableExampleLength", 300);
game:DefineFastInt("LocalizationToolsCloudTableTranslationLength", 300);
game:DefineFastInt("LocalizationToolsCloudTableLocaleLength", 100);
return nil;


return function(v0, v1)
    local l_Parent_0 = script.Parent.Parent;
    local v3 = require(l_Parent_0.Packages.Roact);
    local v4 = require(l_Parent_0.Src.MainPlugin);
    local v5 = nil;
    local function _()
        v0.Name = "LocalizationTools";
        v5 = v3.mount((v3.createElement(v4, {
            Plugin = v0,
            pluginLoaderContext = v1 or nil
        })));
    end;
    v0.Unloading:Connect(function()
        if v5 then
            v3.unmount(v5);
            v5 = nil;
        end;
    end);
    v0.Name = "LocalizationTools";
    v5 = v3.mount((v3.createElement(v4, {
        Plugin = v0,
        pluginLoaderContext = v1 or nil
    })));
end;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Src.Util.DebugFlags);
if not (not v1.RunningUnderCLI() and not v1.RunTests()) then
    local v2 = require(l_Parent_0.Packages._Index.TestEZ.TestEZ);
    local l_TestBootstrap_0 = v2.TestBootstrap;
    local l_TeamCityReporter_0 = v2.Reporters.TeamCityReporter;
    local l_TextReporter_0 = v2.Reporters.TextReporter;
    if v1.LogTestsQuiet() then
        l_TextReporter_0 = v2.Reporters.TextReporterQuiet;
    end;
    l_TextReporter_0 = not not _G.TEAMCITY and l_TeamCityReporter_0 or l_TextReporter_0;
    print("----- All " .. script.Parent.Parent.Name .. " Tests ------");
    require(script.Parent.defineLuaFlags);
    l_TestBootstrap_0:run({
        l_Parent_0.Src
    }, l_TextReporter_0);
    print("----------------------------------");
    if v1.RunDeveloperFrameworkTests() then
        print("");
        print("----- All Developer Framework Tests ------");
        l_TestBootstrap_0:run({
            l_Parent_0.Packages._Index.DeveloperFramework.DeveloperFramework
        }, l_TextReporter_0);
        print("----------------------------------");
    end;
end;
if v1.RunningUnderCLI() then
    pcall(function()
        game:GetService("ProcessService"):ExitAsync(0);
    end);
end;


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0, v1)
    assert(type(v0) == "table", "Expected allLanguages to be a table");
    assert(type(v1) == "table", "Expected localesToLanguages to be a table");
    return {
        allLanguages = v0,
        localesToLanguages = v1
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    assert(type(v0) == "boolean", "Expected canManage to be a boolean");
    return {
        canManageTranslation = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    assert(type(v0) == "string", "Expected cloudTableId to be a string");
    return {
        cloudTableId = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    assert(type(v0) == "boolean", "Expected isBusy to be a boolean");
    return {
        isBusy = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    assert(type(v0) == "string", "Expected message to be a string");
    return {
        message = v0
    };
end);


local v0 = game:DefineFastFlag("LocalizationToolsFixCloudLabel", false);
local l_GuiService_0 = game:GetService("GuiService");
local l_Parent_0 = script.Parent.Parent.Parent;
local v3 = require(l_Parent_0.Packages.Roact);
local v4 = require(l_Parent_0.Packages.RoactRodux);
local v5 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v5.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_UI_0 = v5.UI;
local l_LinkText_0 = l_UI_0.LinkText;
local l_Pane_0 = l_UI_0.Pane;
local l_TextLabel_0 = l_UI_0.TextLabel;
local v12 = require(l_Parent_0.Src.ContextServices.AnalyticsContext);
local v13 = require(l_Parent_0.Src.Components.LabeledTextButton);
local v14 = require(l_Parent_0.Src.Components.Collapsible);
local v15 = require(l_Parent_0.Src.Util.isEmpty);
local v16 = require(l_Parent_0.Src.Util.ShowDialog);
local v17 = require(l_Parent_0.Src.Thunks.DownloadCloudTable);
local v18 = require(l_Parent_0.Src.Thunks.UploadCloudTable);
local v19 = v3.PureComponent:extend("CloudTableSection");
v19.init = function(v20)
    v20.downloadCloudTable = function()
        local l_props_0 = v20.props;
        l_props_0.DownloadAndSaveCloudTable(l_props_0.API:get(), l_props_0.Localization, l_props_0.Analytics:get(), l_props_0.CloudTableId);
    end;
    v20.updateCloudTable = function(v22)
        local l_props_1 = v20.props;
        local v24 = l_props_1.Plugin:get();
        local v25 = l_props_1.API:get();
        local l_Localization_0 = l_props_1.Localization;
        l_props_1.UpdateCloudTable(v25, l_Localization_0, l_props_1.Analytics:get(), v16(v24, l_Localization_0, l_props_1.Stylizer, l_props_1.Mouse), v22);
    end;
    v20.openLocalizationSettings = function()
        local l_props_2 = v20.props;
        if not l_props_2.IsBusy then
            l_GuiService_0:OpenBrowserWindow((l_props_2.API:get().WWW.Localization.games(game.GameId):getUrl()));
            return ;
        else
            return ;
        end;
    end;
end;
v19.render = function(v28)
    local l_props_3 = v28.props;
    local l_Stylizer_0 = l_props_3.Stylizer;
    local l_Localization_1 = l_props_3.Localization;
    local l_LayoutOrder_0 = l_props_3.LayoutOrder;
    local v33 = not l_props_3.IsBusy;
    local v34 = ((not v15(l_props_3.AllLanguages) and not v15(l_props_3.LocalesToLanguages)) and l_props_3.CanManageTranslation) and l_props_3.CloudTableId ~= "";
    local _ = nil;
    return v3.createElement(l_Pane_0, {
        AutomaticSize = Enum.AutomaticSize.Y,
        HorizontalAlignment = Enum.HorizontalAlignment.Left,
        Layout = Enum.FillDirection.Vertical,
        LayoutOrder = l_LayoutOrder_0
    }, {
        Padding = v3.createElement("UIPadding", {
            PaddingTop = UDim.new(0, l_Stylizer_0.PaddingTop)
        }),
        SectionLabel = v3.createElement(l_TextLabel_0, {
            AutomaticSize = Enum.AutomaticSize.XY,
            LayoutOrder = 1,
            Style = "Subtitle",
            Text = l_Localization_1:getText("CloudTableSection", "SectionLabel")
        }),
        Content = if not v34 then v3.createElement(not v0 and "Frame" or l_Pane_0, {
            Size = UDim2.new(1, 0, 0, l_Stylizer_0.PublishMessageHeight),
            BackgroundColor3 = l_Stylizer_0.MessageFrameBackground,
            BackgroundTransparency = 0,
            BorderSizePixel = 1,
            BorderColor3 = l_Stylizer_0.MessageFrameBorder,
            LayoutOrder = 2,
            Layout = if not v0 then nil else Enum.FillDirection.Vertical
        }, {
            PublishPlaceMessage = v3.createElement(l_TextLabel_0, {
                AnchorPoint = if not v0 then Vector2.new(0.5, 0.5) else nil,
                AutomaticSize = if not v0 then Enum.AutomaticSize.XY else Enum.AutomaticSize.Y,
                Position = if not v0 then UDim2.new(0.5, 0, 0.5, 0) else nil,
                Size = if not v0 then nil else UDim2.fromScale(1, 0),
                Text = l_Localization_1:getText("CloudTableSection", "PublishPlaceMessage"),
                TextWrapped = not not v0 or nil
            })
        }) else v3.createElement(l_Pane_0, {
            AutomaticSize = Enum.AutomaticSize.Y,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            Layout = Enum.FillDirection.Vertical,
            LayoutOrder = 2
        }, {
            Padding = v3.createElement("UIPadding", {
                PaddingTop = UDim.new(0, l_Stylizer_0.PaddingTop),
                PaddingLeft = UDim.new(0, l_Stylizer_0.LeftIndent)
            }),
            Download = v3.createElement(v13, {
                Active = v33,
                ButtonText = l_Localization_1:getText("CloudTableSection", "DownloadButton"),
                LabelText = l_Localization_1:getText("CloudTableSection", "DownloadTableLabel"),
                LayoutOrder = 1,
                OnButtonClick = v28.downloadCloudTable
            }),
            Update = v3.createElement(v13, {
                Active = v33,
                ButtonText = l_Localization_1:getText("CloudTableSection", "UpdateButton"),
                LabelText = l_Localization_1:getText("CloudTableSection", "UpdateTableLabel"),
                LayoutOrder = 2,
                OnButtonClick = function()
                    v28.updateCloudTable(false);
                end
            }),
            Collapsible = v3.createElement(v14, {
                Active = v33,
                LayoutOrder = 3,
                RenderContent = function()
                    return v3.createElement(v13, {
                        Active = v33,
                        ButtonText = l_Localization_1:getText("CloudTableSection", "ReplaceButton"),
                        LabelText = l_Localization_1:getText("CloudTableSection", "ReplaceTableLabel"),
                        LayoutOrder = 2,
                        OnButtonClick = function()
                            v28.updateCloudTable(true);
                        end
                    });
                end,
                Title = l_Localization_1:getText("CloudTableSection", "AdvancedButton")
            }),
            LinkTextFrame = v3.createElement("Frame", {
                BackgroundTransparency = 1,
                LayoutOrder = 4,
                Size = UDim2.new(1, 0, 0, l_Stylizer_0.LinkTextHeight)
            }, {
                LinkText = v3.createElement(l_LinkText_0, {
                    AnchorPoint = Vector2.new(0, 0.5),
                    Position = UDim2.new(0, 0, 0.5, 0),
                    OnClick = v28.openLocalizationSettings,
                    Text = l_Localization_1:getText("CloudTableSection", "CloudTablePageLinkText")
                })
            })
        })
    });
end;
return v4.connect(function(v36, _)
    return {
        AllLanguages = v36.PluginMetadata.AllLanguages,
        LocalesToLanguages = v36.PluginMetadata.LocalesToLanguages,
        CanManageTranslation = v36.PluginMetadata.CanManageTranslation,
        CloudTableId = v36.PluginMetadata.CloudTableId,
        IsBusy = v36.CloudTable.IsBusy
    };
end, function(v38)
    return {
        DownloadAndSaveCloudTable = function(v39, v40, v41, v42)
            v38(v17.DownloadAndSave(v39, v40, v41, v42));
        end,
        UpdateCloudTable = function(v43, v44, v45, v46, v47)
            v38(v18(v43, v44, v45, v46, v47));
        end
    };
end)((l_withContext_0({
    Plugin = l_ContextServices_0.Plugin,
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization,
    API = l_ContextServices_0.API,
    Mouse = l_ContextServices_0.Mouse,
    Analytics = v12
})(v19)));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v2.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_UI_0 = v2.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_StyleModifier_0 = v2.Util.StyleModifier;
local v9 = v1.PureComponent:extend("Collapsible");
v9.init = function(v10)
    v10.state = {
        open = false
    };
    v10.onActivated = function()
        if v10.props.Active then
            v10:setState(function(v11)
                return {
                    open = not v11.open
                };
            end);
            return ;
        else
            return ;
        end;
    end;
end;
v9.render = function(v12)
    local l_props_0 = v12.props;
    local l_open_0 = v12.state.open;
    local l_Stylizer_0 = l_props_0.Stylizer;
    return v1.createElement(l_Pane_0, {
        AutomaticSize = Enum.AutomaticSize.Y,
        HorizontalAlignment = Enum.HorizontalAlignment.Left,
        Layout = Enum.FillDirection.Vertical,
        LayoutOrder = l_props_0.LayoutOrder
    }, {
        TopBar = v1.createElement("TextButton", {
            BackgroundTransparency = 1,
            Size = UDim2.new(1, 0, 0, l_Stylizer_0.TopBarHeight),
            Text = "",
            [v1.Event.Activated] = v12.onActivated
        }, {
            Layout = v1.createElement("UIListLayout", {
                SortOrder = Enum.SortOrder.LayoutOrder,
                FillDirection = Enum.FillDirection.Horizontal
            }),
            IconFrame = v1.createElement("Frame", {
                BackgroundTransparency = 1,
                LayoutOrder = 1,
                Size = UDim2.new(0, l_Stylizer_0.TopBarHeight, 1, 0)
            }, {
                Icon = v1.createElement("ImageLabel", {
                    AnchorPoint = Vector2.new(0.5, 0.5),
                    BackgroundTransparency = 1,
                    ImageColor3 = l_Stylizer_0.IconColor,
                    Image = not not l_open_0 and l_Stylizer_0.IconImageOpen or l_Stylizer_0.IconImageClosed,
                    Position = UDim2.new(0.5, 0, 0.5, 0),
                    Size = UDim2.new(0, l_Stylizer_0.IconSize, 0, l_Stylizer_0.IconSize)
                })
            }),
            Title = v1.createElement(l_TextLabel_0, {
                AutomaticSize = Enum.AutomaticSize.XY,
                LayoutOrder = 2,
                Text = l_props_0.Title,
                StyleModifier = if not l_props_0.Active then l_StyleModifier_0.Disabled else nil
            })
        }),
        Content = not not l_open_0 and l_props_0.RenderContent() or nil
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v9));


local l_LocalizationService_0 = game:GetService("LocalizationService");
local l_Parent_0 = script.Parent.Parent.Parent;
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_UI_0 = v4.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_TextLabel_0 = l_UI_0.TextLabel;
local v10 = require(l_Parent_0.Src.ContextServices.AnalyticsContext);
local v11 = require(l_Parent_0.Src.Components.LabeledImageButton);
local v12 = require(l_Parent_0.Src.Util.EmbeddedTableUtil);
local l_game_EngineFeature_0 = game:GetEngineFeature("EnableLocalizedLocalizationToolsErrorsApi");
local v14 = v2.PureComponent:extend("EmbeddedTableSection");
v14.init = function(v15)
    v15.toggleTextScraperEnabled = function()
        v12.toggleTextScraperEnabled((v15.props.Analytics:get()));
        v15:setState({});
    end;
end;
v14.render = function(v16)
    local l_props_0 = v16.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_Localization_0 = l_props_0.Localization;
    local v20 = l_props_0.Analytics:get();
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local v22 = not l_props_0.IsBusy;
    local l_IsTextScraperRunning_0 = l_LocalizationService_0.IsTextScraperRunning;
    return v2.createElement(l_Pane_0, {
        AutomaticSize = Enum.AutomaticSize.Y,
        HorizontalAlignment = Enum.HorizontalAlignment.Left,
        Layout = Enum.FillDirection.Vertical,
        LayoutOrder = l_LayoutOrder_0
    }, {
        Padding = v2.createElement("UIPadding", {
            PaddingTop = UDim.new(0, l_Stylizer_0.PaddingTop * 2)
        }),
        SectionLabel = v2.createElement(l_TextLabel_0, {
            AutomaticSize = Enum.AutomaticSize.XY,
            LayoutOrder = 1,
            Text = l_Localization_0:getText("EmbeddedTableSection", "SectionLabel"),
            Style = "Subtitle"
        }),
        Container = v2.createElement(l_Pane_0, {
            AutomaticSize = Enum.AutomaticSize.Y,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            Layout = Enum.FillDirection.Vertical,
            LayoutOrder = 2
        }, {
            Padding = v2.createElement("UIPadding", {
                PaddingTop = UDim.new(0, l_Stylizer_0.PaddingTop),
                PaddingLeft = UDim.new(0, l_Stylizer_0.LeftIndent)
            }),
            TextCapture = v2.createElement(v11, {
                Active = v22,
                ButtonText = l_Localization_0:getText("EmbeddedTableSection", "TextCaptureButton"),
                ButtonImage = not not l_IsTextScraperRunning_0 and l_Stylizer_0.TextCaptureButtonImage.On or l_Stylizer_0.TextCaptureButtonImage.Off,
                LabelText = not not l_IsTextScraperRunning_0 and l_Localization_0:getText("EmbeddedTableSection", "TextCaptureStopText") or l_Localization_0:getText("EmbeddedTableSection", "TextCaptureStartText"),
                LayoutOrder = 1,
                OnButtonClick = v16.toggleTextScraperEnabled
            }),
            Export = v2.createElement(v11, {
                Active = v22,
                ButtonText = l_Localization_0:getText("EmbeddedTableSection", "ExportButton"),
                ButtonImage = l_Stylizer_0.ExportButtonImage,
                LabelText = l_Localization_0:getText("EmbeddedTableSection", "ExportTextLabel"),
                LayoutOrder = 2,
                OnButtonClick = function()
                    v12.promptExportToCSVs(v20);
                end
            }),
            Import = v2.createElement(v11, {
                Active = v22,
                ButtonText = l_Localization_0:getText("EmbeddedTableSection", "ImportButton"),
                ButtonImage = l_Stylizer_0.ImportButtonImage,
                LabelText = l_Localization_0:getText("EmbeddedTableSection", "ImportTextLabel"),
                LayoutOrder = 3,
                OnButtonClick = function()
                    if not l_game_EngineFeature_0 then
                        v12.promptImportFromCSVs_deprecated(v20);
                        return ;
                    else
                        v12.promptImportFromCSVs(v20, l_Localization_0);
                        return ;
                    end;
                end
            })
        })
    });
end;
return v3.connect(function(v24, _)
    return {
        IsBusy = v24.CloudTable.IsBusy
    };
end)((l_withContext_0({
    Plugin = l_ContextServices_0.Plugin,
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization,
    Analytics = v10
})(v14)));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v2.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_UI_0 = v2.UI;
local l_Button_0 = l_UI_0.Button;
local l_HoverArea_0 = l_UI_0.HoverArea;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_Pane_0 = l_UI_0.Pane;
local v10 = v1.PureComponent:extend("ErrorDialog");
v10.render = function(v11)
    local l_props_0 = v11.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    return v1.createElement(l_Pane_0, {
        AutomaticSize = Enum.AutomaticSize.Y,
        Layout = Enum.FillDirection.Vertical,
        HorizontalAlignment = Enum.HorizontalAlignment.Center,
        BackgroundTransparency = 0,
        BackgroundColor3 = l_Stylizer_0.MainBackground,
        Size = UDim2.new(1, 0, 1, 0),
        Spacing = 15
    }, {
        Message = v1.createElement(l_TextLabel_0, {
            TextXAlignment = Enum.TextXAlignment.Left,
            BackgroundTransparency = 1,
            Text = l_props_0.Text,
            Size = UDim2.new(0, 400, 0, 0),
            AutomaticSize = Enum.AutomaticSize.Y,
            TextWrapped = true,
            TextColor3 = l_Stylizer_0.ErrorText,
            LayoutOrder = 1
        }),
        Confirm = v1.createElement(l_Button_0, {
            LayoutOrder = 2,
            OnClick = l_props_0.OkCallback,
            Position = UDim2.new(0.5, 0.5, 0, 0),
            Size = UDim2.new(0, l_Stylizer_0.ButtonWidth, 0, l_Stylizer_0.ButtonHeight),
            Style = "PrimeTextButton",
            Text = l_props_0.Localization:getText("UploadDialogContent", "ConfirmButton")
        }, {
            v1.createElement(l_HoverArea_0, {
                Cursor = "PointingHand"
            })
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization
})(v10));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.RoactRodux);
local v3 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_UI_0 = v3.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_Button_0 = l_UI_0.Button;
local l_HoverArea_0 = l_UI_0.HoverArea;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_TitledFrame_0 = l_UI_0.TitledFrame;
local v12 = require(l_Parent_0.Src.ContextServices.AnalyticsContext);
local v13 = v1.PureComponent:extend("ImageLocalizationSection");
local l_HttpService_0 = game:GetService("HttpService");
local function v18(v15)
    l_HttpService_0:RequestInternal({
        Url = "https://apis.sitetest1.robloxlabs.com/image-localization-api/v1/image-localization/ingest",
        Method = "POST",
        Headers = {
            ["Content-Type"] = "application/json"
        },
        Body = v15
    }):Start(function(v16, v17)
        if v16 then
            if v17.Success then
                return ;
            else
                warn("Error returned: " .. v17.StatusCode .. " " .. v17.StatusMessage .. " " .. v17.Body);
                return ;
            end;
        else
            warn("Error on request: " .. v17);
            return ;
        end;
    end);
end;
local function _(v19)
    v18((l_HttpService_0:JSONEncode({
        assetIds = v19,
        universeId = game.GameId
    })));
end;
local function v24()
    local v21 = {};
    for _, v23 in pairs(workspace:GetDescendants()) do
        if not (not v23:IsA("ImageLabel") and not v23:IsA("ImageButton")) then
            table.insert(v21, v23.Image);
        end;
    end;
    if #v21 > 0 then
        v18((l_HttpService_0:JSONEncode({
            assetIds = v21,
            universeId = game.GameId
        })));
    end;
end;
v13.init = function(v25)
    v25.uploadImageAssetIds = function()
        v24();
    end;
end;
v13.render = function(v26)
    if game:GetFastFlag("ImageLocalizationFeatureEnabled") then
        local l_props_0 = v26.props;
        local l_Stylizer_0 = l_props_0.Stylizer;
        local l_Localization_0 = l_props_0.Localization;
        return v1.createElement(l_Pane_0, {
            LayoutOrder = l_props_0.LayoutOrder,
            AutomaticSize = Enum.AutomaticSize.XY,
            Padding = {
                Top = l_Stylizer_0.PaddingTop
            },
            Spacing = l_Stylizer_0.Spacing
        }, {
            SectionLabel = v1.createElement(l_TextLabel_0, {
                AutomaticSize = Enum.AutomaticSize.XY,
                LayoutOrder = 1,
                Style = "Label",
                Text = l_Localization_0:getText("ImageLocalizationSection", "SectionLabel")
            }),
            Content = v1.createElement(l_Pane_0, {
                LayoutOrder = 2,
                AutomaticSize = Enum.AutomaticSize.XY,
                Padding = {
                    Top = l_Stylizer_0.PaddingTop,
                    Left = l_Stylizer_0.LeftIndent
                }
            }, {
                Upload = v1.createElement(l_TitledFrame_0, {
                    Title = l_Localization_0:getText("ImageLocalizationSection", "UploadButtonLabel"),
                    TitleWidth = l_Stylizer_0.LabelWidth
                }, {
                    ButtonContainer = v1.createElement("Frame", {
                        BackgroundTransparency = 1,
                        Size = UDim2.new(0, l_Stylizer_0.ButtonWidth, 1, 0)
                    }, {
                        Button = v1.createElement(l_Button_0, {
                            AnchorPoint = Vector2.new(0.5, 0.5),
                            OnClick = v26.uploadImageAssetIds,
                            Position = UDim2.new(0.5, 0, 0.5, 0),
                            Size = UDim2.new(1, 0, 0, l_Stylizer_0.ButtonHeight),
                            Style = "TextButton",
                            Text = l_Localization_0:getText("ImageLocalizationSection", "UploadButton")
                        }, {
                            v1.createElement(l_HoverArea_0, {
                                Cursor = "PointingHand"
                            })
                        })
                    })
                })
            })
        });
    else
        return ;
    end;
end;
return v2.connect(function(v30, _)
    return {
        IsBusy = v30.CloudTable.IsBusy
    };
end)((l_withContext_0({
    Plugin = l_ContextServices_0.Plugin,
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization,
    Analytics = v12
})(v13)));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Framework);
local v3 = game:DefineFastFlag("LocalizationToolsFixLabeledImageButton", false);
local l_ContextServices_0 = v2.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_UI_0 = v2.UI;
local l_HoverArea_0 = l_UI_0.HoverArea;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_StyleModifier_0 = v2.Util.StyleModifier;
local v10 = v1.PureComponent:extend("LabeledImageButton");
v10.init = function(v11)
    v11.state = {
        hovered = false
    };
    v11.onMouseEnter = function()
        if v11.props.Active then
            v11:setState({
                hovered = true
            });
            return ;
        else
            return ;
        end;
    end;
    v11.onMouseLeave = function()
        if v11.props.Active then
            v11:setState({
                hovered = false
            });
            return ;
        else
            return ;
        end;
    end;
end;
v10.render = function(v12)
    local l_props_0 = v12.props;
    local l_state_0 = v12.state;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_LabelText_0 = l_props_0.LabelText;
    local l_ButtonText_0 = l_props_0.ButtonText;
    local l_ButtonImage_0 = l_props_0.ButtonImage;
    local l_Active_0 = l_props_0.Active;
    return v1.createElement("Frame", {
        AutomaticSize = if not v3 then nil else Enum.AutomaticSize.XY,
        Size = UDim2.new(1, 0, 0, l_Stylizer_0.Height),
        BackgroundTransparency = 1,
        LayoutOrder = l_LayoutOrder_0
    }, {
        Layout = v1.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            FillDirection = Enum.FillDirection.Horizontal
        }),
        Label = v1.createElement(l_TextLabel_0, {
            AutomaticSize = if not v3 then nil else Enum.AutomaticSize.Y,
            LayoutOrder = 1,
            Size = if not v3 then UDim2.new(0, l_Stylizer_0.LabelWidth, 1, 0) else UDim2.new(0, l_Stylizer_0.LabelWidth, 0, 0),
            Text = l_LabelText_0,
            StyleModifier = if not l_Active_0 then l_StyleModifier_0.Disabled else nil,
            TextWrapped = true,
            TextXAlignment = Enum.TextXAlignment.Left
        }),
        Button = v1.createElement("ImageButton", {
            AutoButtonColor = false,
            AutomaticSize = if not v3 then nil else Enum.AutomaticSize.XY,
            BackgroundColor3 = not not l_state_0.hovered and l_Stylizer_0.BackgroundColorHovered or l_Stylizer_0.BackgroundColor,
            BorderSizePixel = 0,
            LayoutOrder = 2,
            Size = if not v3 then UDim2.new(0, l_Stylizer_0.ImageButtonSize, 0, l_Stylizer_0.ImageButtonSize) else UDim2.new(0, l_Stylizer_0.ImageButtonSize, 0, 0),
            [v1.Event.Activated] = not not l_Active_0 and l_props_0.OnButtonClick or function()
            end,
            [v1.Event.MouseEnter] = v12.onMouseEnter,
            [v1.Event.MouseLeave] = v12.onMouseLeave
        }, {
            Layout = if not v3 then nil else v1.createElement("UIListLayout", {
                SortOrder = Enum.SortOrder.LayoutOrder,
                FillDirection = Enum.FillDirection.Vertical,
                HorizontalAlignment = Enum.HorizontalAlignment.Center
            }),
            ImageLabel = v1.createElement("ImageLabel", {
                Position = if not v3 then UDim2.new(0.5, 0, 0, l_Stylizer_0.ImageLabelSize / 2) else nil,
                AnchorPoint = if not v3 then Vector2.new(0.5, 0.5) else nil,
                Size = UDim2.new(0, l_Stylizer_0.ImageLabelSize, 0, l_Stylizer_0.ImageLabelSize),
                Image = l_ButtonImage_0,
                BackgroundTransparency = 1
            }),
            TextLabel = v1.createElement(l_TextLabel_0, {
                AutomaticSize = if not v3 then nil else Enum.AutomaticSize.Y,
                Position = if not v3 then UDim2.new(0.5, 0, 1, -l_Stylizer_0.TextLabelSize / 2) else nil,
                AnchorPoint = if not v3 then Vector2.new(0.5, 0.5) else nil,
                Size = if not v3 then UDim2.new(1, 0, 0, l_Stylizer_0.TextLabelSize) else UDim2.new(0, l_Stylizer_0.ImageButtonSize, 0, 0),
                LayoutOrder = if not v3 then nil else 2,
                Text = l_ButtonText_0,
                StyleModifier = if not l_Active_0 then l_StyleModifier_0.Disabled else nil,
                Style = "Label",
                TextWrapped = true
            });
            if not v3 then v1.createElement(l_HoverArea_0, {
                Cursor = "PointingHand"
            }) else nil
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v10));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v2.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_UI_0 = v2.UI;
local l_Button_0 = l_UI_0.Button;
local l_HoverArea_0 = l_UI_0.HoverArea;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_StyleModifier_0 = v2.Util.StyleModifier;
local v10 = v1.PureComponent:extend("LabeledTextButton");
v10.render = function(v11)
    local l_props_0 = v11.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_LabelText_0 = l_props_0.LabelText;
    local l_ButtonText_0 = l_props_0.ButtonText;
    local l_Active_0 = l_props_0.Active;
    return v1.createElement("Frame", {
        BackgroundTransparency = 1,
        LayoutOrder = l_LayoutOrder_0,
        Size = UDim2.new(1, 0, 0, l_Stylizer_0.Height)
    }, {
        Layout = v1.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            FillDirection = Enum.FillDirection.Horizontal
        }),
        Label = v1.createElement(l_TextLabel_0, {
            LayoutOrder = 1,
            Size = UDim2.new(0, l_Stylizer_0.LabelWidth, 1, 0),
            Text = l_LabelText_0,
            StyleModifier = if not l_Active_0 then l_StyleModifier_0.Disabled else nil,
            TextXAlignment = Enum.TextXAlignment.Left
        }),
        ButtonContainer = v1.createElement("Frame", {
            BackgroundTransparency = 1,
            LayoutOrder = 2,
            Size = UDim2.new(0, l_Stylizer_0.ButtonWidth, 1, 0)
        }, {
            Button = v1.createElement(l_Button_0, {
                AnchorPoint = Vector2.new(0.5, 0.5),
                OnClick = not not l_Active_0 and l_props_0.OnButtonClick or function()
                end,
                Position = UDim2.new(0.5, 0, 0.5, 0),
                Size = UDim2.new(1, 0, 0, l_Stylizer_0.ButtonHeight),
                Style = not l_Active_0 and "DisabledTextButton" or "TextButton",
                Text = l_ButtonText_0
            }, {
                v1.createElement(l_HoverArea_0, {
                    Cursor = "PointingHand"
                })
            })
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v10));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v2.ContextServices;
local l_LayoutOrderIterator_0 = v2.Util.LayoutOrderIterator;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Pane_0 = v2.UI.Pane;
local v7 = require(l_Parent_0.Src.Components.ProgressSpinner);
local v8 = require(l_Parent_0.Src.Components.MessageFrame);
local v9 = require(l_Parent_0.Src.Components.CloudTableSection);
local v10 = require(l_Parent_0.Src.Components.EmbeddedTableSection);
local v11 = require(l_Parent_0.Src.Components.ImageLocalizationSection);
local v12 = v1.PureComponent:extend("MainView");
v12.render = function(v13)
    local l_Stylizer_0 = v13.props.Stylizer;
    local v15 = l_LayoutOrderIterator_0.new();
    return v1.createElement("Frame", {
        Size = UDim2.new(1, 0, 1, 0),
        BackgroundTransparency = 1,
        Position = UDim2.new(0, 0, 0, 0)
    }, {
        MessageFrame = v1.createElement(v8),
        ScrollingFrame = v1.createElement("ScrollingFrame", {
            BackgroundColor3 = l_Stylizer_0.ScrollingFrameackground,
            BackgroundTransparency = 0,
            BorderColor3 = l_Stylizer_0.ScrollBarBorderColor,
            BorderSizePixel = 1,
            CanvasSize = UDim2.new(1, 0, 0, l_Stylizer_0.ScrollingFrameCanvasHeight),
            ClipsDescendants = true,
            ScrollBarImageTransparency = 0,
            ScrollBarImageColor3 = l_Stylizer_0.ScrollBarColor,
            ScrollingDirection = Enum.ScrollingDirection.XY,
            Size = UDim2.new(1, 0, 1, l_Stylizer_0.ScrollingFrameHeight - 1)
        }, {
            Container = v1.createElement(l_Pane_0, {
                Style = "Box",
                AutomaticSize = Enum.AutomaticSize.Y,
                HorizontalAlignment = Enum.HorizontalAlignment.Left,
                Layout = Enum.FillDirection.Vertical
            }, {
                Padding = v1.createElement("UIPadding", {
                    PaddingTop = UDim.new(0, l_Stylizer_0.PaddingTop),
                    PaddingBottom = UDim.new(0, l_Stylizer_0.Padding),
                    PaddingLeft = UDim.new(0, l_Stylizer_0.Padding),
                    PaddingRight = UDim.new(0, l_Stylizer_0.PaddingRight)
                }),
                CloudTableSection = v1.createElement(v9, {
                    LayoutOrder = v15:getNextOrder()
                }),
                EmbeddedTableSection = v1.createElement(v10, {
                    LayoutOrder = v15:getNextOrder()
                }),
                ImageLocalizationSection = v1.createElement(v11, {
                    LayoutOrder = v15:getNextOrder()
                }),
                ExtendedBackground = v1.createElement("Frame", {
                    BackgroundColor3 = l_Stylizer_0.MainBackground,
                    BorderSizePixel = 0,
                    LayoutOrder = v15:getNextOrder(),
                    Size = UDim2.new(1, 0, 0, l_Stylizer_0.EmptyFrameHeight)
                })
            })
        }),
        ProgressSpinner = v1.createElement(v7)
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v12));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.RoactRodux);
local v3 = require(l_Parent_0.Packages.Framework);
local l_LocalizationToolsFixLabel_0 = game:GetFastFlag("LocalizationToolsFixLabel");
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_TextLabel_0 = v3.UI.TextLabel;
local v8 = v1.PureComponent:extend("MessageFrame");
v8.render = function(v9)
    local l_props_0 = v9.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    return v1.createElement("Frame", {
        Size = UDim2.new(1, 0, 0, l_Stylizer_0.Height),
        AnchorPoint = Vector2.new(0, 1),
        Position = UDim2.new(0, 0, 1, 0),
        BackgroundTransparency = 0,
        BackgroundColor3 = l_Stylizer_0.BackgroundColor,
        BorderColor3 = l_Stylizer_0.BorderColor
    }, {
        Padding = v1.createElement("UIPadding", {
            PaddingLeft = UDim.new(0, l_Stylizer_0.Padding)
        }),
        MessageTextLabel = v1.createElement(l_TextLabel_0, {
            AutomaticSize = if not l_LocalizationToolsFixLabel_0 then Enum.AutomaticSize.Y else Enum.AutomaticSize.XY,
            Text = l_props_0.Message,
            TextWrapped = true
        })
    });
end;
return v2.connect(function(v12, _)
    return {
        Message = v12.Message
    };
end)((l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v8)));