local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.RoactRodux);
local _ = require(l_Parent_0.Packages.Cryo);
local v4 = require(l_Parent_0.Packages.AvatarToolsShared);
local l_Components_0 = v4.Components;
local l_ConfirmCancelDialog_0 = l_Components_0.ConfirmCancelDialog;
local l_ConfirmDialog_0 = l_Components_0.ConfirmDialog;
local l_PreviewTopBar_0 = l_Components_0.PreviewTopBar;
local l_AccessoryAndBodyToolShared_0 = v4.Util.AccessoryAndBodyToolShared;
local _ = l_AccessoryAndBodyToolShared_0.Constants;
local _ = l_AccessoryAndBodyToolShared_0.PreviewConstants;
local l_PreviewConstantsInterface_0 = l_AccessoryAndBodyToolShared_0.PreviewConstantsInterface;
local l_PreviewFolderManager_0 = l_AccessoryAndBodyToolShared_0.PreviewFolderManager;
local v14 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v14.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Util_0 = v14.Util;
local _ = l_Util_0.LayoutOrderIterator;
local l_Typecheck_0 = l_Util_0.Typecheck;
local v20 = require(l_Parent_0.Src.Actions.SetSearchFilter);
local v21 = require(l_Parent_0.Src.Thunks.StartSelectingFromExplorer);
local v22 = require(l_Parent_0.Src.Thunks.FinishSelectingFromExplorer);
local v23 = require(l_Parent_0.Src.Thunks.DeleteUserAddedAssetForPreview);
local v24 = require(l_Parent_0.Src.Thunks.AddUserAddedAssetForPreview);
local l_EditingItemContext_0 = v4.Contexts.EditingItemContext;
local v26 = require(l_Parent_0.Src.Util.Constants);
local v27 = require(l_Parent_0.Src.Util.ShowDialog);
local v28 = v1.PureComponent:extend("PreviewTopBarWrapper");
l_Typecheck_0.wrap(v28, script);
v28.init = function(v29)
    v29.previewFolder = l_PreviewFolderManager_0.new();
    v29.onSearchRequested = function(v30)
        v29.props.SetSearchFilter(v30);
    end;
    v29.onClickAddNewInstance = function()
        local l_props_0 = v29.props;
        l_props_0.StartSelectingFromExplorer(v26.SELECTOR_MODE.Preview, (l_props_0.Localization:getText("Preview", "PanelBlockerAddItemWithEscape")));
    end;
    v29.getTabForInstance = function(v32)
        for v33, _ in pairs(l_PreviewConstantsInterface_0.getTabs()) do
            if v29.isInstanceValidForTab(v33, v32) then
                return v33;
            end;
        end;
    end;
    v29.isInstanceValidForTab = function(v35, v36)
        local v37 = v29.props.EditingItemContext:getItem();
        local v38 = l_PreviewConstantsInterface_0.getTabInfo(v35);
        if v38 and v38.IsSelectedInstanceValid(v36) then
            return not ((v36:FindFirstAncestor("LayeredClothingEditorPreview") ~= nil or v36 == v37) or v36 == v37.Parent);
        else
            return false;
        end;
    end;
    v29.isSelectedInstanceValid = function(v39)
        if not v29.getTabForInstance(v39) then
            if not v39:IsA("Folder") then
                return false;
            else
                return true;
            end;
        else
            return true;
        end;
    end;
    v29.onInstanceSelectorValidSelection = function(v40)
        local l_props_1 = v29.props;
        local l_FinishSelectingFromExplorer_0 = l_props_1.FinishSelectingFromExplorer;
        v27(l_props_1.Plugin, l_props_1.Localization, l_ConfirmCancelDialog_0, {
            Text = if not v40:IsA("Folder") then v29.props.Localization:getText("Preview", "ConfirmAddTile", {
                itemName = v40.Name
            }) else v29.props.Localization:getText("Preview", "ConfirmAddTiles", {
                itemName = v40.Name
            }),
            OnClose = l_FinishSelectingFromExplorer_0,
            OnConfirm = function()
                l_FinishSelectingFromExplorer_0(v40);
                local v43 = v29.getTabForInstance(v40);
                if not v43 then
                    if v40:IsA("Folder") then
                        v29.previewFolder:addFolderPath(v40);
                        v29.previewFolder:addDirtyFolders(v29.props.UserAddedAssets, v29.isInstanceValidForTab, v29.props.AddUserAddedAssetForPreview);
                    end;
                    return ;
                else
                    l_props_1.AddUserAddedAssetForPreview(v43, v40:Clone());
                    return ;
                end;
            end
        });
    end;
    v29.onInstanceSelectorInvalidSelection = function(_)
        local l_props_2 = v29.props;
        v27(l_props_2.Plugin, l_props_2.Localization, l_ConfirmDialog_0, {
            Text = l_props_2.Localization:getText("Preview", "InvalidAdd"),
            OnClose = l_props_2.FinishSelectingFromExplorer
        });
    end;
end;
v28.render = function(v46)
    return v1.createElement(l_PreviewTopBar_0, {
        LayoutOrder = v46.props.layoutOrder,
        OnSearchRequested = v46.onSearchRequested,
        IsSelectedInstanceValid = v46.isSelectedInstanceValid,
        OnClickAddNewInstance = v46.onClickAddNewInstance,
        OnInstanceSelectorValidSelection = v46.onInstanceSelectorValidSelection,
        OnInstanceSelectorInvalidSelection = v46.onInstanceSelectorInvalidSelection
    });
end;
v28.didMount = function(v47)
    local _ = v47.props;
    if not next(v47.props.UserAddedAssets) then
        v47.previewFolder:resetAllFoldersAttributes();
    end;
    v47.previewFolder:cleanDirtyFolders(v47.props.UserAddedAssets, v47.props.DeleteUserAddedAssetForPreview);
    v47.previewFolder:addDirtyFolders(v47.props.UserAddedAssets, v47.isInstanceValidForTab, v47.props.AddUserAddedAssetForPreview);
end;
return v2.connect(function(v49, _)
    return {
        UserAddedAssets = v49.previewStatus.userAddedAssets
    };
end, function(v51)
    return {
        SetSearchFilter = function(v52)
            v51(v20(v52));
        end,
        StartSelectingFromExplorer = function(v53, v54)
            v51(v21(v53, v54));
        end,
        FinishSelectingFromExplorer = function(_)
            v51(v22());
        end,
        DeleteUserAddedAssetForPreview = function(v56, v57)
            v51(v23(v56, v57));
        end,
        AddUserAddedAssetForPreview = function(v58, v59)
            v51(v24(v58, v59));
        end
    };
end)((l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization,
    Plugin = l_ContextServices_0.Plugin,
    EditingItemContext = l_EditingItemContext_0
})(v28)));


local l_Parent_0 = script.Parent.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.AvatarToolsShared);
local v4 = require(l_Parent_0.Src.Actions.SetDocked);
local v5 = require(l_Parent_0.Src.Thunks.UpdatePreviewAssetsSelected);
local v6 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v6.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Util_0 = v6.Util;
local _ = l_Util_0.LayoutOrderIterator;
local l_Typecheck_0 = l_Util_0.Typecheck;
local l_Pane_0 = v6.UI.Pane;
local l_Components_0 = v3.Components;
local l_PreviewDockWidget_0 = l_Components_0.PreviewDockWidget;
local l_PreviewViewportFrame_0 = l_Components_0.PreviewViewportFrame;
local _ = v3.Util.AccessoryAndBodyToolShared.PreviewingInfo;
local v17 = v1.PureComponent:extend("PreviewViewportFrameContainer");
l_Typecheck_0.wrap(v17, script);
v17.init = function(v18)
    v18.onPoppedOut = function()
        v18.props.SetDocked(false);
    end;
    v18.onWidgetClosed = function()
        v18.props.SetDocked(true);
    end;
end;
v17.render = function(v19)
    local l_props_0 = v19.props;
    local l_Docked_0 = l_props_0.Docked;
    local _ = l_props_0.SetDocked;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local v25 = {
        OnCapacityReached = v19.props.UpdatePreviewAssetsSelected
    };
    if not l_Docked_0 then
        v25.OnClose = v19.onWidgetClosed;
        return v1.createElement(l_PreviewDockWidget_0, v25);
    else
        v25.ShowPopoutButton = l_Docked_0;
        v25.OnPopoutClicked = v19.onPoppedOut;
        return v1.createElement(l_Pane_0, {
            Size = UDim2.new(1, 0, 0, l_Stylizer_0.PreviewViewportFrameHeight),
            LayoutOrder = l_LayoutOrder_0
        }, {
            PreviewViewportFrame = v1.createElement(l_PreviewViewportFrame_0, v25)
        });
    end;
end;
return v2.connect(function(v26, _)
    local l_previewStatus_0 = v26.previewStatus;
    local _ = v26.animation;
    return {
        Docked = l_previewStatus_0.docked
    };
end, function(v30)
    return {
        SetDocked = function(v31)
            v30(v4(v31));
        end,
        UpdatePreviewAssetsSelected = function(v32)
            v30(v5(v32, false));
        end
    };
end)((l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v17)));


local _ = game:GetService("InsertService");
local _ = game:GetService("HttpService");
local l_ChangeHistoryService_0 = game:GetService("ChangeHistoryService");
local l_Workspace_0 = game.Workspace;
local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v5 = require(l_Parent_0.Packages.Cryo);
local v6 = require(l_Parent_0.Packages.Roact);
local v7 = require(l_Parent_0.Packages.RoactRodux);
local v8 = require(l_Parent_0.Packages.AvatarToolsShared);
local l_AccessoryAndBodyToolShared_0 = v8.Util.AccessoryAndBodyToolShared;
local l_Mannequin_0 = l_AccessoryAndBodyToolShared_0.Mannequin;
local _ = l_AccessoryAndBodyToolShared_0.PreviewUtil;
local l_AvatarUtil_0 = l_AccessoryAndBodyToolShared_0.AvatarUtil;
local l_ItemCharacteristics_0 = l_AccessoryAndBodyToolShared_0.ItemCharacteristics;
local l_AccessoryUtil_0 = l_AccessoryAndBodyToolShared_0.AccessoryUtil;
local l_EditingItemContext_0 = v8.Contexts.EditingItemContext;
local l_LuaMeshEditingModuleContext_0 = v8.Contexts.LuaMeshEditingModuleContext;
local l_MannequinContext_0 = v8.Contexts.MannequinContext;
local v18 = require(l_Parent_0.Src.Actions.SetAccessoryTypeInfo);
local v19 = require(l_Parent_0.Src.Thunks.VerifyBounds);
local v20 = require(l_Parent_0.Src.Thunks.SelectEditingItem);
local v21 = require(l_Parent_0.Src.Util.Constants);
local v22 = require(l_Parent_0.Src.Util.AnalyticsGlobals);
local v23 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v23.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Typecheck_0 = v23.Util.Typecheck;
local l_GetFFlagUseModelCageForAccessoryFittingTool_0 = v8.Flags.GetFFlagUseModelCageForAccessoryFittingTool;
local v28 = v6.PureComponent:extend("SelectedEditingItem");
l_Typecheck_0.wrap(v28, script);
local function v32(v29)
    local l_Analytics_0 = v29.props.Analytics;
    local l_v22_0 = v22;
    l_v22_0.CageEdits = l_v22_0.CageEdits + 1;
    if not v22.FirstAction then
        v22.FirstAction = v21.ACTIONS.EditCage;
        l_Analytics_0:getHandler("FirstAction")(v22.FirstAction);
    end;
    v29:setState({
        temp = {}
    });
end;
local function v37(v33)
    local l_LuaMeshEditingModuleContext_1 = v33.props.LuaMeshEditingModuleContext;
    local v35 = l_LuaMeshEditingModuleContext_1:getOuterCageContext();
    local v36 = l_LuaMeshEditingModuleContext_1:getInnerCageContext();
    if v35 then
        if v33.outerCageDataChanged then
            v33.outerCageDataChanged:Disconnect();
        end;
        v33.outerCageDataChanged = v35:getMeshDataChangedSignal():Connect(function()
            v32(v33);
        end);
    end;
    if v36 then
        if v33.innerCageDataChanged then
            v33.innerCageDataChanged:Disconnect();
        end;
        v33.innerCageDataChanged = v36:getMeshDataChangedSignal():Connect(function()
            v32(v33);
        end);
    end;
end;
local function v60(v38, v39)
    local l_props_0 = v38.props;
    local l_ItemSize_0 = l_props_0.ItemSize;
    local l_MeshScale_0 = l_props_0.MeshScale;
    local l_AttachmentPoint_0 = l_props_0.AttachmentPoint;
    local l_AccessoryTypeInfo_0 = l_props_0.AccessoryTypeInfo;
    local l_VerifyBounds_0 = l_props_0.VerifyBounds;
    local _ = l_props_0.EditingCage;
    local _ = l_props_0.EditingItemContext;
    local l_LuaMeshEditingModuleContext_2 = l_props_0.LuaMeshEditingModuleContext;
    local v49 = l_LuaMeshEditingModuleContext_2:getOuterCageContext();
    local v50 = l_LuaMeshEditingModuleContext_2:getInnerCageContext();
    local l_Analytics_1 = l_props_0.Analytics;
    local l_model_0 = v38.mannequin.model;
    local l_sourceDisplayItem_0 = v38.mannequin.sourceDisplayItem;
    local l_displayItem_0 = v38.mannequin.displayItem;
    if not l_ItemCharacteristics_0.hasAnyCage(l_displayItem_0) then
        l_model_0.Archivable = true;
        l_displayItem_0.Archivable = true;
    end;
    l_AvatarUtil_0:positionAvatarNextTo(l_model_0, l_sourceDisplayItem_0, true, function()
        local v55 = if not v39 then l_displayItem_0.Size else l_ItemSize_0;
        local v56 = nil;
        v56 = if not v39 then l_AccessoryUtil_0:getSpecialMeshScale(l_displayItem_0) else l_MeshScale_0;
        local v57 = not l_AccessoryTypeInfo_0 and "" or l_AccessoryTypeInfo_0.Name;
        local l_AttachmentCFrame_0 = l_AttachmentPoint_0.AttachmentCFrame;
        local l_ItemCFrame_0 = l_AttachmentPoint_0.ItemCFrame;
        if v38.itemCFrameLocalToAttachmentPoint then
            l_AttachmentCFrame_0 = v38.itemCFrameLocalToAttachmentPoint:inverse();
            l_ItemCFrame_0 = v38.itemCFrameLocalToAttachmentPoint;
            v38.itemCFrameLocalToAttachmentPoint = nil;
        end;
        v38.mannequin:transformLayer(1, v55, l_AttachmentCFrame_0, l_ItemCFrame_0, v57, v56);
        if v49 then
            v38.mannequin:deformLayer(1, v49:getVertexData(), Enum.CageType.Outer);
        end;
        if v50 then
            v38.mannequin:deformLayer(1, v50:getVertexData(), Enum.CageType.Inner);
        end;
        v38.props.EditingItemContext:setEditingItem(l_displayItem_0);
        l_VerifyBounds_0(l_displayItem_0);
        if not v39 then
            v38.props.SelectEditingItem(l_LuaMeshEditingModuleContext_2, l_displayItem_0, l_Analytics_1);
            l_AvatarUtil_0:focusCameraOnAvatar(l_model_0);
            v37(v38);
        end;
        l_LuaMeshEditingModuleContext_2:updateCageLocationsFromInstance(l_displayItem_0);
        l_ChangeHistoryService_0:ResetWaypoints();
    end);
end;
v28.init = function(v61)
    v61.mannequin = nil;
    v61.editingItem = nil;
    v61.sourceItemWithUniqueDeformerNames = nil;
    v61.onSourceItemChanged = function(v62)
        if v62 ~= v61.sourceItem then
            if v61.mannequin then
                v61.mannequin:destroy();
                v61.mannequin = nil;
            end;
            v61.props.EditingItemContext:setSourceItemWithUniqueDeformerNames(nil);
            if v62 then
                local _ = nil;
                v61.mannequin = l_Mannequin_0.new(v62, if not l_GetFFlagUseModelCageForAccessoryFittingTool_0() then v61.props.MannequinContext:createMannequinModel() else v61.props.MannequinContext:createMannequinForClothing(v62), l_Workspace_0, function()
                    v60(v61, true);
                end);
                v61.props.EditingItemContext:setSourceItemWithUniqueDeformerNames(v61.mannequin.sourceDisplayItem);
                v61.props.SetAccessoryTypeInfo(v5.None);
                v60(v61, false);
            end;
        end;
        v61.sourceItem = v62;
    end;
end;
v28.render = function(v64)
    local l_props_1 = v64.props;
    local l_EditingCage_1 = l_props_1.EditingCage;
    if l_EditingCage_1 == v21.EDIT_MODE.Mesh then
        return nil;
    else
        local l_LuaMeshEditingModuleContext_3 = l_props_1.LuaMeshEditingModuleContext;
        local v68 = if l_EditingCage_1 == Enum.CageType.Outer then l_LuaMeshEditingModuleContext_3:getOuterCageContext() else l_LuaMeshEditingModuleContext_3:getInnerCageContext();
        if not (not v68 or not v64.mannequin) then
            v64.mannequin:deformLayer(1, v68:getVertexData(), l_EditingCage_1);
        end;
        return nil;
    end;
end;
v28.didMount = function(v69)
    v69.SourceItemChangedHandle = v69.props.EditingItemContext:getSourceItemChangedSignal():Connect(v69.onSourceItemChanged);
end;
v28.didUpdate = function(v70, v71)
    local l_AccessoryTypeInfo_1 = v70.props.AccessoryTypeInfo;
    if not (not (l_AccessoryTypeInfo_1 and v71.AccessoryTypeInfo ~= l_AccessoryTypeInfo_1) or not v70.mannequin) then
        if l_AccessoryTypeInfo_1 then
            local v73 = v70.sourceItem and v70.sourceItem.Parent;
            if not (not v73 or not l_ItemCharacteristics_0.isAvatar(v73)) then
                v70.itemCFrameLocalToAttachmentPoint = l_AccessoryUtil_0:getItemCFrameRelativeToAttachmentPoint(l_AccessoryTypeInfo_1.Name, v73, v70.sourceItem);
            end;
        end;
        v70.mannequin:reset();
    end;
end;
v28.willUnmount = function(v74)
    if v74.mannequin then
        v74.mannequin:destroy();
        v74.mannequin = nil;
    end;
    v74.sourceItem = nil;
    if v74.SourceItemChangedHandle then
        v74.SourceItemChangedHandle:Disconnect();
        v74.SourceItemChangedHandle = nil;
    end;
    if v74.outerCageDataChanged then
        v74.outerCageDataChanged:Disconnect();
        v74.outerCageDataChanged = nil;
    end;
    if v74.innerCageDataChanged then
        v74.innerCageDataChanged:Disconnect();
        v74.innerCageDataChanged = nil;
    end;
end;
return v7.connect(function(v75, _)
    local l_selectItem_0 = v75.selectItem;
    return {
        AccessoryTypeInfo = l_selectItem_0.accessoryTypeInfo,
        AttachmentPoint = l_selectItem_0.attachmentPoint,
        ItemSize = l_selectItem_0.size,
        MeshScale = l_selectItem_0.meshScale,
        EditingCage = l_selectItem_0.editingCage
    };
end, function(v78)
    return {
        SetAccessoryTypeInfo = function(v79)
            v78(v18(v79));
        end,
        SelectEditingItem = function(v80, v81, v82)
            v78(v20(v80, v81, v82));
        end,
        VerifyBounds = function(v83)
            v78(v19(v83));
        end
    };
end)((l_withContext_0({
    Analytics = l_ContextServices_0.Analytics,
    EditingItemContext = l_EditingItemContext_0,
    LuaMeshEditingModuleContext = l_LuaMeshEditingModuleContext_0,
    MannequinContext = l_MannequinContext_0
})(v28)));


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 _ = require(l_Parent_0.Packages.Cryo);
local v4 = require(l_Parent_0.Packages.AvatarToolsShared);
local l_AccessoryAndBodyToolShared_0 = v4.Util.AccessoryAndBodyToolShared;
local l_PreviewConstantsInterface_0 = l_AccessoryAndBodyToolShared_0.PreviewConstantsInterface;
local l_Components_0 = v4.Components;
local l_AnimationPlaybackSlider_0 = l_Components_0.AnimationPlaybackSlider;
local _ = l_Components_0.PreviewDockWidget;
local l_PreviewCategoryList_0 = l_Components_0.PreviewCategoryList;
local v11 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v11.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Util_0 = v11.Util;
local l_LayoutOrderIterator_0 = l_Util_0.LayoutOrderIterator;
local l_Typecheck_0 = l_Util_0.Typecheck;
local l_Pane_0 = v11.UI.Pane;
local _ = require(l_Parent_0.Src.Components.Preview.PreviewTabsRibbon);
local v19 = require(l_Parent_0.Src.Components.Preview.Grid);
local v20 = require(l_Parent_0.Src.Components.Preview.PreviewTopBarWrapper);
local v21 = require(l_Parent_0.Src.Actions.SelectPreviewTab);
local v22 = require(l_Parent_0.Src.Actions.SetCategoryFilter);
local v23 = require(l_Parent_0.Src.Actions.SetSliderPlayhead);
local v24 = require(l_Parent_0.Src.Actions.SetIsPlaying);
local v25 = require(l_Parent_0.Src.Actions.SetPlayhead);
local v26 = require(l_Parent_0.Src.Actions.SetTrackLength);
local l_PreviewingInfo_0 = l_AccessoryAndBodyToolShared_0.PreviewingInfo;
local v28 = v1.PureComponent:extend("PreviewFrame");
l_Typecheck_0.wrap(v28, script);
v28.init = function(v29)
    v29.state = {
        gridHeightOffset = 0,
        gridWidthOffset = 0
    };
    v29.previewFrameRef = v1.createRef();
    v29.onCategoryChanged = function(v30, v31)
        v31 = v31 or "";
        v29.props.SetSelectedTab(v30 or "");
        v29.props.SetCategoryFilter(v31);
    end;
    v29.onAbsoluteSizeChanged = function(v32)
        local l_props_0 = v29.props;
        local l_Stylizer_0 = l_props_0.Stylizer;
        local l_SelectedTab_0 = l_props_0.SelectedTab;
        local l_Y_0 = v32.PreviewTopBar.AbsoluteSize.Y;
        local l_X_0 = v32.GridContainer.CategoryList.AbsoluteSize.X;
        local v38 = 0;
        local v39 = 1;
        if l_PreviewConstantsInterface_0.shouldTabShowPlaybackSlider(l_SelectedTab_0) then
            v38 = l_Stylizer_0.SliderHeight;
            v39 = v39 + 1;
        end;
        v29:setState({
            gridHeightOffset = (l_Y_0 + v39 * 6) + v38,
            gridWidthOffset = l_X_0 + 6
        });
    end;
end;
v28.render = function(v40)
    local l_props_1 = v40.props;
    local l_state_0 = v40.state;
    local l_Size_0 = l_props_1.Size;
    local l_LayoutOrder_0 = l_props_1.LayoutOrder;
    local l_Stylizer_1 = l_props_1.Stylizer;
    local l_UserAddedAssets_0 = l_props_1.UserAddedAssets;
    local l_SelectedTab_1 = l_props_1.SelectedTab;
    local l_IsPlaying_0 = l_props_1.IsPlaying;
    local l_Playhead_0 = l_props_1.Playhead;
    local l_TrackLength_0 = l_props_1.TrackLength;
    local l_SetIsPlaying_0 = l_props_1.SetIsPlaying;
    local l_SetSliderPlayhead_0 = l_props_1.SetSliderPlayhead;
    local l_gridHeightOffset_0 = l_state_0.gridHeightOffset;
    local l_gridWidthOffset_0 = l_state_0.gridWidthOffset;
    local v55 = l_LayoutOrderIterator_0.new();
    local v56 = 1;
    if v40.previewFrameRef.current then
        v56 = v40.previewFrameRef.current.GridContainer.Grid.ZIndex + 1;
    end;
    return v1.createElement("Frame", {
        BackgroundColor3 = l_Stylizer_1.BackgroundColor,
        BorderSizePixel = 0,
        Size = l_Size_0,
        LayoutOrder = l_LayoutOrder_0,
        [v1.Ref] = v40.previewFrameRef,
        [v1.Change.AbsoluteSize] = v40.onAbsoluteSizeChanged
    }, {
        UIListLayout = v1.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Vertical,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            VerticalAlignment = Enum.VerticalAlignment.Top,
            SortOrder = Enum.SortOrder.LayoutOrder,
            Padding = UDim.new(0, l_Stylizer_1.Padding)
        }),
        UIPadding = v1.createElement("UIPadding", {
            PaddingTop = UDim.new(0, l_Stylizer_1.Padding)
        }),
        PreviewTopBar = v1.createElement(v20, {
            LayoutOrder = v55:getNextOrder()
        }),
        GridContainer = v1.createElement(l_Pane_0, {
            Size = UDim2.new(1, 0, 1, -l_gridHeightOffset_0),
            Layout = Enum.FillDirection.Horizontal,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            LayoutOrder = v55:getNextOrder(),
            BackgroundColor = l_Stylizer_1.GridContainerBackgroundColor,
            Spacing = l_Stylizer_1.GridContainerSpacing,
            Padding = {
                Top = l_Stylizer_1.GridContainerPadding,
                Bottom = l_Stylizer_1.GridContainerPadding
            }
        }, {
            CategoryList = v1.createElement(l_PreviewCategoryList_0, {
                LayoutOrder = v55:getNextOrder(),
                OnCategoryChanged = v40.onCategoryChanged,
                OnArrowClick = function()
                    v40.onAbsoluteSizeChanged(v40.previewFrameRef.current);
                end
            }),
            Grid = v1.createElement(v19, {
                Size = UDim2.new(1, -l_gridWidthOffset_0, 1, 0),
                layoutOrder = v55:getNextOrder(),
                UpdateUserAddedAssets = l_props_1.UpdateUserAddedAssets,
                UserAddedAssets = l_UserAddedAssets_0
            })
        }),
        AnimPlaybackSliderContainer = l_PreviewConstantsInterface_0.shouldTabShowPlaybackSlider(l_SelectedTab_1) and v1.createElement(l_Pane_0, {
            Size = UDim2.new(1, -l_Stylizer_1.MainPadding, 0, l_Stylizer_1.SliderHeight),
            LayoutOrder = v55:getNextOrder()
        }, {
            AnimPlaybackSlider = v1.createElement(l_AnimationPlaybackSlider_0, {
                IsPlaying = l_IsPlaying_0,
                Playhead = l_Playhead_0,
                OnSliderPlayheadChanged = l_SetSliderPlayhead_0,
                OnPlayPauseClicked = l_SetIsPlaying_0,
                Size = UDim2.new(1, 0, 0, l_Stylizer_1.SliderHeight),
                TrackLength = l_TrackLength_0
            })
        })
    });
end;
v28.didUpdate = function(v57, v58)
    if v57.props.SelectedTab ~= v58.SelectedTab then
        v57.onAbsoluteSizeChanged(v57.previewFrameRef.current);
    end;
end;
return v2.connect(function(v59, _)
    local l_previewStatus_0 = v59.previewStatus;
    local l_animation_0 = v59.animation;
    return {
        SelectedTab = l_previewStatus_0.selectedTab,
        AnimationId = l_PreviewingInfo_0.getPreviewingAnimationId(v59),
        IsPlaying = l_animation_0.IsPlaying,
        Playhead = l_animation_0.Playhead,
        TrackLength = l_animation_0.TrackLength,
        SliderPlayhead = l_animation_0.SliderPlayhead
    };
end, function(v63)
    return {
        SetSelectedTab = function(v64)
            v63(v21(v64));
        end,
        SetCategoryFilter = function(v65)
            v63(v22(v65));
        end,
        SetIsPlaying = function(v66)
            v63(v24(v66));
        end,
        SetSliderPlayhead = function(v67)
            v63(v23(v67));
        end,
        SetPlayhead = function(v68)
            v63(v25(v68));
        end,
        SetTrackLength = function(v69)
            v63(v26(v69));
        end
    };
end)((l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v28)));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Cryo);
local v3 = require(l_Parent_0.Packages.AvatarToolsShared);
local v4 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_AccessoryAndBodyToolShared_0 = v3.Util.AccessoryAndBodyToolShared;
local l_AccessoryUtil_0 = l_AccessoryAndBodyToolShared_0.AccessoryUtil;
local l_Constants_0 = l_AccessoryAndBodyToolShared_0.Constants;
local l_UI_0 = v4.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_SelectInput_0 = l_UI_0.SelectInput;
local l_TextLabel_0 = l_UI_0.TextLabel;
local v14 = require(l_Parent_0.Src.Util.findLocalizedStringKey);
local v15 = require(l_Parent_0.Src.Util.makeDropdownList);
local l_EditingItemContext_0 = v3.Contexts.EditingItemContext;
local l_Util_0 = v4.Util;
local l_Typecheck_0 = l_Util_0.Typecheck;
local l_LayoutOrderIterator_0 = l_Util_0.LayoutOrderIterator;
local v20 = v1.PureComponent:extend("ScaleTypeDropdown");
l_Typecheck_0.wrap(v20, script);
v20.initWithPreviousScaleTypeInfo = function(v21)
    local l_props_0 = v21.props;
    local v23 = l_AccessoryUtil_0:getScaleType((v21.props.EditingItemContext:getItem()));
    local v24 = nil;
    v24 = if not v23 then l_props_0.Localization:getText("ScaleType", l_Constants_0.SCALE_TYPES.Classic) else l_props_0.Localization:getText("ScaleType", v23);
    v21.onClickScaleType(v24, v2.List.find(v21.scaleTypeList, v24));
end;
v20.didMount = function(v25)
    local l_props_1 = v25.props;
    v25.scaleTypeList = v15(l_props_1.Localization, "ScaleType", l_Constants_0.SCALE_TYPES);
    v25:initWithPreviousScaleTypeInfo();
    v25.editingItemChangedHandle = v25.props.EditingItemContext:getEditingItemChangedSignal():Connect(function(v27)
        l_AccessoryUtil_0:setScaleType(v27, (v14(l_props_1.Localization, "ScaleType", v25.scaleTypeList[v25.state.selectedScaleTypeIndex], l_Constants_0.SCALE_TYPES)));
    end);
end;
v20.init = function(v28)
    v28.state = {
        selectedScaleTypeIndex = nil
    };
    v28.onClickScaleType = function(v29, v30)
        local l_props_2 = v28.props;
        l_AccessoryUtil_0:setScaleType(l_props_2.EditingItemContext:getItem(), (v14(l_props_2.Localization, "ScaleType", v29, l_Constants_0.SCALE_TYPES)));
        v28:setState({
            selectedScaleTypeIndex = v30
        });
    end;
end;
v20.render = function(v32)
    local l_props_3 = v32.props;
    local l_state_0 = v32.state;
    local l_LayoutOrder_0 = l_props_3.LayoutOrder;
    local l_Stylizer_0 = l_props_3.Stylizer;
    local l_Localization_0 = l_props_3.Localization;
    local l_selectedScaleTypeIndex_0 = l_state_0.selectedScaleTypeIndex;
    local v39 = l_LayoutOrderIterator_0.new();
    return v1.createElement(l_Pane_0, {
        Size = UDim2.new(1, 0, 0, l_Stylizer_0.DropdownHeight),
        LayoutOrder = l_LayoutOrder_0,
        Layout = Enum.FillDirection.Horizontal,
        HorizontalAlignment = Enum.HorizontalAlignment.Left,
        VerticalAlignment = Enum.VerticalAlignment.Center,
        Spacing = l_Stylizer_0.Spacing
    }, {
        SelectPartScalePrompt = v1.createElement(l_TextLabel_0, {
            Text = l_Localization_0:getText("ScaleType", "Select") .. ":",
            AutomaticSize = Enum.AutomaticSize.XY,
            LayoutOrder = v39:getNextOrder()
        }),
        AvatarPartScaleTypeDropdown = v1.createElement(l_SelectInput_0, {
            Size = UDim2.new(0, l_Stylizer_0.DropdownWidth, 1, 0),
            Items = v32.scaleTypeList,
            OnItemActivated = v32.onClickScaleType,
            SelectedIndex = l_selectedScaleTypeIndex_0,
            LayoutOrder = v39:getNextOrder()
        })
    });
end;
v20.willUnmount = function(v40)
    if v40.editingItemChangedHandle then
        v40.editingItemChangedHandle:Disconnect();
        v40.editingItemChangedHandle = nil;
    end;
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization,
    EditingItemContext = l_EditingItemContext_0
})(v20));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.RoactRodux);
local _ = require(l_Parent_0.Packages.Cryo);
local v4 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v7 = require(l_Parent_0.Packages.AvatarToolsShared);
local l_FlowScreenLayout_0 = v7.Components.FlowScreenLayout;
local l_ItemCharacteristics_0 = v7.Util.AccessoryAndBodyToolShared.ItemCharacteristics;
local l_EditingItemContext_0 = v7.Contexts.EditingItemContext;
local v11 = require(l_Parent_0.Src.Components.AssetTypeSelector);
local v12 = require(l_Parent_0.Src.Components.ScaleTypeDropdown);
local l_Pane_0 = v4.UI.Pane;
local l_Util_0 = v4.Util;
local l_Typecheck_0 = l_Util_0.Typecheck;
local l_LayoutOrderIterator_0 = l_Util_0.LayoutOrderIterator;
local v17 = v1.PureComponent:extend("AssetTypeScreen");
l_Typecheck_0.wrap(v17, script);
v17.init = function(v18)
    v18.state = {
        shouldShowScaleDropdown = true
    };
    v18.onEditingItemChanged = function(v19)
        if v19 then
            v18:setState({
                shouldShowScaleDropdown = not l_ItemCharacteristics_0.hasAnyCage(v19)
            });
            return ;
        else
            return ;
        end;
    end;
    v18.renderContent = function(v20)
        local l_props_0 = v18.props;
        local l_state_0 = v18.state;
        local l_Stylizer_0 = l_props_0.Stylizer;
        local l_shouldShowScaleDropdown_0 = l_state_0.shouldShowScaleDropdown;
        local v25 = l_LayoutOrderIterator_0.new();
        return v1.createElement(l_Pane_0, {
            Size = UDim2.new(1, 0, 0, l_Stylizer_0.ContentHeight),
            LayoutOrder = v20,
            Layout = Enum.FillDirection.Vertical,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            VerticalAlignment = Enum.VerticalAlignment.Top,
            Spacing = l_Stylizer_0.ContentSpacing
        }, {
            AssetTypeSelector = v1.createElement(v11, {
                LayoutOrder = v20 + v25:getNextOrder()
            }),
            ScaleTypeDropdown = if not l_shouldShowScaleDropdown_0 then nil else v1.createElement(v12, {
                LayoutOrder = v20 + v25:getNextOrder()
            })
        });
    end;
end;
v17.didMount = function(v26)
    local _ = v26.props;
    local v28 = v26.props.EditingItemContext:getItem();
    v26.editingItemChangedHandle = v26.props.EditingItemContext:getEditingItemChangedSignal():Connect(v26.onEditingItemChanged);
    v26.onEditingItemChanged(v28);
end;
v17.render = function(v29)
    local l_props_2 = v29.props;
    local _ = v29.state;
    local l_GoToNext_0 = l_props_2.GoToNext;
    local l_GoToPrevious_0 = l_props_2.GoToPrevious;
    local l_AccessoryTypeInfo_0 = l_props_2.AccessoryTypeInfo;
    local l_Localization_0 = l_props_2.Localization;
    return v1.createElement(l_Pane_0, {
        Style = "Box"
    }, {
        Screen = v1.createElement(l_FlowScreenLayout_0, {
            Title = l_Localization_0:getText("AssetType", "AssetType"),
            PromptText = l_Localization_0:getText("AssetType", "Prompt"),
            NextButtonText = l_Localization_0:getText("Flow", "Next"),
            BackButtonText = l_Localization_0:getText("Flow", "Back"),
            NextButtonEnabled = l_AccessoryTypeInfo_0 ~= nil,
            BackButtonEnabled = true,
            Scrollable = true,
            HasBackButton = true,
            GoToNext = l_GoToNext_0,
            GoToPrevious = l_GoToPrevious_0,
            RenderContent = v29.renderContent
        })
    });
end;
v17.willUnmount = function(v36)
    if v36.editingItemChangedHandle then
        v36.editingItemChangedHandle:Disconnect();
        v36.editingItemChangedHandle = nil;
    end;
end;
return v2.connect(function(v37, _)
    return {
        AccessoryTypeInfo = v37.selectItem.accessoryTypeInfo
    };
end, nil)((l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization,
    EditingItemContext = l_EditingItemContext_0
})(v17)));


local l_Parent_0 = script.Parent.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.AvatarToolsShared);
local l_LuaMeshEditingModuleContext_0 = v3.Contexts.LuaMeshEditingModuleContext;
local l_PreviewContext_0 = v3.Contexts.PreviewContext;
local l_EditingItemContext_0 = v3.Contexts.EditingItemContext;
local l_InputBlocker_0 = v3.Components.InputBlocker;
local v8 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v8.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Util_0 = v8.Util;
local l_LayoutOrderIterator_0 = l_Util_0.LayoutOrderIterator;
local l_UI_0 = v8.UI;
local l_Pane_0 = l_UI_0.Pane;
local _ = l_UI_0.ScrollingFrame;
local l_ScrollingFrame_1 = l_UI_0.ScrollingFrame;
local v17 = require(l_Parent_0.Src.Components.Screens.GenerateScreen);
local v18 = require(l_Parent_0.Src.Components.EditorToolsManager);
local v19 = require(l_Parent_0.Src.Components.PreviewFrame);
local v20 = require(l_Parent_0.Src.Components.Preview.PreviewViewportFrameContainer);
local v21 = require(l_Parent_0.Src.Components.Preview.ExplorerPreviewInstances);
local v22 = require(l_Parent_0.Src.Components.AnimationPlayback.AnimationPlaybackWrapper);
local v23 = require(l_Parent_0.Src.Actions.SetToolMode);
local v24 = require(l_Parent_0.Src.Thunks.FinishSelectingFromExplorer);
local v25 = require(l_Parent_0.Src.Thunks.AddUserAddedAssetForPreview);
local v26 = require(l_Parent_0.Src.Util.Constants);
local v27 = require(l_Parent_0.Src.Actions.SetPreviewAssetsSelected);
local v28 = v1.PureComponent:extend("EditorScreen");
l_Util_0.Typecheck.wrap(v28, script);
v28.init = function(v29)
    v29.finishSelectingFromExplorer = function()
        local _ = v29.props;
        local l_LuaMeshEditingModuleContext_1 = v29.props.LuaMeshEditingModuleContext;
        local v32 = v29.props.EditingItemContext:getItem();
        if not (not l_LuaMeshEditingModuleContext_1 or not v32) then
            l_LuaMeshEditingModuleContext_1:enableEditing();
            l_LuaMeshEditingModuleContext_1:updateCageLocationsFromInstance(v32);
        end;
        v29.props.FinishSelectingFromExplorer();
    end;
    v29.onNext = function()
        v29.props.SetToolMode(v26.TOOL_MODE.None);
        v29.props.GoToNext();
    end;
    v29.onPrevious = function()
        v29.props.SetToolMode(v26.TOOL_MODE.None);
        v29.props.GoToPrevious();
    end;
end;
v28.render = function(v33)
    local l_props_1 = v33.props;
    local l_Docked_0 = l_props_1.Docked;
    local l_UserAddedAssets_0 = l_props_1.UserAddedAssets;
    local l_Stylizer_0 = l_props_1.Stylizer;
    local l_AddUserAddedAssetForPreview_0 = l_props_1.AddUserAddedAssetForPreview;
    local v39 = l_LayoutOrderIterator_0.new();
    return l_ContextServices_0.provide({
        l_PreviewContext_0.new()
    }, {
        Container = v1.createElement(l_Pane_0, {
            BackgroundColor3 = l_Stylizer_0.BackgroundColor,
            Layout = Enum.FillDirection.Vertical,
            VerticalAlignment = Enum.VerticalAlignment.Top,
            HorizontalAlignment = Enum.HorizontalAlignment.Center
        }, {
            EditorToolsManager = v1.createElement(v18),
            PreviewViewportFrameContainer = v1.createElement(v20, {
                LayoutOrder = v39:getNextOrder()
            }),
            MainFrame = v1.createElement(l_ScrollingFrame_1, {
                Size = UDim2.new(1, 0, 1, -(not l_Docked_0 and 0 or l_Stylizer_0.PreviewViewportFrameHeight)),
                AutomaticCanvasSize = Enum.AutomaticSize.XY,
                Layout = Enum.FillDirection.Vertical,
                LayoutOrder = v39:getNextOrder()
            }, {
                PreviewFrame = v1.createElement(v19, {
                    Size = UDim2.new(1, 0, 1, -l_Stylizer_0.GenerateHeight),
                    UserAddedAssets = l_UserAddedAssets_0,
                    UpdateUserAddedAssets = l_AddUserAddedAssetForPreview_0,
                    LayoutOrder = v39:getNextOrder()
                }),
                GenerateContainer = v1.createElement(l_Pane_0, {
                    Size = UDim2.new(1, 0, 0, l_Stylizer_0.GenerateHeight),
                    LayoutOrder = v39:getNextOrder()
                }, {
                    GenerateScreen = v1.createElement(v17, {
                        GoToNext = v33.onNext,
                        GoToPrevious = v33.onPrevious
                    })
                })
            }),
            ControlsPanelBlocker = l_props_1.IsControlsPanelBlockerActive and v1.createElement(l_InputBlocker_0, {
                OnFocused = v33.finishSelectingFromExplorer,
                Text = l_props_1.ControlsPanelBlockerMessage
            }),
            AnimationPlaybackWrapper = v1.createElement(v22),
            ExplorerPreviewInstances = v1.createElement(v21, {
                UserAddedAssets = l_UserAddedAssets_0
            })
        })
    });
end;
v28.willUnmount = function(v40)
    v40.props.ClearPreviewAssetsSelected();
end;
return v2.connect(function(v41, _)
    local l_controlsPanelBlocker_0 = v41.controlsPanelBlocker;
    local l_previewStatus_0 = v41.previewStatus;
    local _ = v41.selectItem;
    return {
        IsControlsPanelBlockerActive = l_controlsPanelBlocker_0.isActive,
        ControlsPanelBlockerMessage = l_controlsPanelBlocker_0.message,
        UserAddedAssets = l_previewStatus_0.userAddedAssets,
        Docked = l_previewStatus_0.docked
    };
end, function(v46)
    return {
        SetToolMode = function(v47)
            v46(v23(v47));
        end,
        FinishSelectingFromExplorer = function()
            v46(v24());
        end,
        ClearPreviewAssetsSelected = function()
            v46(v27({}));
        end,
        AddUserAddedAssetForPreview = function(v48, v49)
            v46(v25(v48, v49));
        end
    };
end)((l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer,
    EditingItemContext = l_EditingItemContext_0,
    LuaMeshEditingModuleContext = l_LuaMeshEditingModuleContext_0
})(v28)));


local l_Parent_0 = script.Parent.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.AvatarToolsShared);
local l_Components_0 = v3.Components;
local _ = l_Components_0.InputBlocker;
local _ = l_Components_0.FlowScreenLayout;
local l_ButtonWithDropdown_0 = l_Components_0.ButtonWithDropdown;
local l_ConfirmDialog_0 = l_Components_0.ConfirmDialog;
local l_ConfirmCancelDialog_0 = l_Components_0.ConfirmCancelDialog;
local l_ItemCharacteristics_0 = v3.Util.AccessoryAndBodyToolShared.ItemCharacteristics;
local v11 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v11.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_UI_0 = v11.UI;
local l_Button_0 = l_UI_0.Button;
local l_Pane_0 = l_UI_0.Pane;
local _ = require(l_Parent_0.Src.Util.ShowDialog);
local l_EditingItemContext_0 = v3.Contexts.EditingItemContext;
local l_LuaMeshEditingModuleContext_0 = v3.Contexts.LuaMeshEditingModuleContext;
local v20 = require(l_Parent_0.Src.Actions.SetControlsPanelBlockerActivity);
local v21 = require(l_Parent_0.Src.Actions.SetControlsPanelBlockerMessage);
local v22 = require(l_Parent_0.Src.Thunks.ReleaseEditor);
local v23 = require(l_Parent_0.Src.Thunks.FinishEditing);
local v24 = require(l_Parent_0.Src.Util.Constants);
local v25 = require(l_Parent_0.Src.Util.ShowDialog);
local v26 = v1.PureComponent:extend("GenerateScreen");
local l_Util_0 = v11.Util;
local l_Typecheck_0 = l_Util_0.Typecheck;
local _ = l_Util_0.StyleModifier;
local l_LayoutOrderIterator_0 = l_Util_0.LayoutOrderIterator;
l_Typecheck_0.wrap(v26, script);
local v31 = game:DefineFastString("GenerateLegacyHelpLink", "https://create.roblox.com/docs/art/avatar");
v26.init = function(v32)
    v32.state = {
        items = {},
        generateText = nil,
        generateKey = nil
    };
    v32.startGeneration = function()
        local l_props_0 = v32.props;
        local l_Localization_0 = l_props_0.Localization;
        v32.generateClicked = true;
        l_props_0.SetControlsPanelBlockerMessage(l_Localization_0:getText("Generate", "Wait"));
        l_props_0.SetControlsPanelBlockerActivity(true);
    end;
    v32.onGenerateClicked = function()
        local l_props_1 = v32.props;
        local l_state_0 = v32.state;
        local l_Localization_1 = l_props_1.Localization;
        local v38 = l_props_1.EditingItemContext:getItem();
        local l_generateKey_0 = l_state_0.generateKey;
        if l_ItemCharacteristics_0.isMeshPartWithSurfaceAppearance(v38) and l_generateKey_0 == v24.GENERATE_LEGACY_KEY then
            v25(l_props_1.Plugin, l_Localization_1, l_ConfirmCancelDialog_0, {
                Text = l_Localization_1:getText("Generate", "LegacyConversionDialog"),
                OnConfirm = v32.startGeneration,
                Title = l_Localization_1:getText("Dialog", "DefaultTitle"),
                ConfirmText = l_Localization_1:getText("Dialog", "Continue"),
                Link = {
                    Text = l_Localization_1:getText("Generate", "LearnMoreLegacy"),
                    Url = v31
                }
            });
            return ;
        else
            v32.startGeneration();
            return ;
        end;
    end;
    v32.onSelectGenerateDropdownItem = function(_, _)
        v32.setupDropdownMenu();
    end;
    v32.setupDropdownMenu = function()
        local l_props_2 = v32.props;
        local v43 = l_props_2.EditingItemContext:getItem();
        local l_Localization_2 = l_props_2.Localization;
        local v45 = l_ItemCharacteristics_0.hasAnyCage(v43);
        local v46 = l_ItemCharacteristics_0.isLegacyAccessory(v43);
        local l_generateKey_1 = v32.state.generateKey;
        local v48 = {};
        local v49 = nil;
        if not v45 then
            if not v46 then
                if not l_generateKey_1 or l_generateKey_1 == v24.GENERATE_LEGACY_KEY then
                    v49 = v24.GENERATE_MESH_PART_KEY;
                    table.insert(v48, l_Localization_2:getText("Flow", v24.GENERATE_LEGACY_KEY));
                else
                    v49 = v24.GENERATE_LEGACY_KEY;
                    table.insert(v48, l_Localization_2:getText("Flow", v24.GENERATE_MESH_PART_KEY));
                end;
            else
                v49 = v24.GENERATE_LEGACY_KEY;
            end;
        else
            v49 = v24.GENERATE_MESH_PART_KEY;
        end;
        v32:setState({
            items = v48,
            generateText = l_Localization_2:getText("Flow", v49),
            generateKey = v49
        });
    end;
end;
v26.didMount = function(v50)
    v50.setupDropdownMenu();
end;
v26.render = function(v51)
    local l_props_3 = v51.props;
    local l_state_1 = v51.state;
    local l_items_0 = l_state_1.items;
    local l_generateText_0 = l_state_1.generateText;
    local l_InBounds_0 = l_props_3.InBounds;
    local l_GoToPrevious_0 = l_props_3.GoToPrevious;
    local l_Localization_3 = l_props_3.Localization;
    local l_Stylizer_0 = l_props_3.Stylizer;
    local v60 = if l_InBounds_0 then nil else l_Localization_3:getText("Generate", "InvalidBoundsUGC");
    if l_InBounds_0 then
        v60 = l_Localization_3:getText("Generate", "Tooltip");
    end;
    local v61 = l_LayoutOrderIterator_0.new();
    return v1.createElement(l_Pane_0, {
        Size = UDim2.new(1, 0, 1, 0),
        Layout = Enum.FillDirection.Horizontal,
        HorizontalAlignment = Enum.HorizontalAlignment.Center,
        VerticalAlignment = Enum.VerticalAlignment.Center,
        Spacing = 10
    }, {
        BackButton = v1.createElement(l_Button_0, {
            Text = l_Localization_3:getText("Flow", "Back"),
            Style = "Round",
            Size = UDim2.new(0, l_Stylizer_0.BackButtonWidth, 0, l_Stylizer_0.GenerateDropdownButtonHeight),
            OnClick = l_GoToPrevious_0,
            LayoutOrder = v61:getNextOrder()
        }),
        GenerateDropdownButton = v1.createElement(l_ButtonWithDropdown_0, {
            AutomaticSize = Enum.AutomaticSize.XY,
            Height = l_Stylizer_0.GenerateDropdownButtonHeight,
            ButtonWidth = l_Stylizer_0.GenerateDropdownButtonWidth,
            ArrowWidth = l_Stylizer_0.ArrowWidth,
            LayoutOrder = v61:getNextOrder(),
            TooltipText = v60,
            ButtonIcon = if l_InBounds_0 then nil else l_Stylizer_0.WarningIcon,
            IconSize = l_Stylizer_0.IconSize,
            ButtonText = l_generateText_0,
            Items = l_items_0,
            ItemHeight = l_Stylizer_0.DropdownItemHeight,
            OnSelectItem = v51.onSelectGenerateDropdownItem,
            OnClick = v51.onGenerateClicked
        })
    });
end;
v26.didUpdate = function(v62, v63)
    if not ((not (v62.props.IsControlsPanelBlockerActive ~= v63.IsControlsPanelBlockerActive) or not v62.props.IsControlsPanelBlockerActive) or not v62.generateClicked) then
        task.delay(0, function()
            local v64 = v62.props.EditingItemContext:getItem();
            local v65 = v62.props.EditingItemContext:getSourceItemWithUniqueDeformerNames();
            local l_Analytics_0 = v62.props.Analytics;
            v62.props.FinishEditing(v62.props.LuaMeshEditingModuleContext, v64, v65, l_Analytics_0, v62.state.generateKey == v24.GENERATE_LEGACY_KEY);
            l_Analytics_0:getHandler("SessionEnded")();
            v62.props.SetControlsPanelBlockerActivity(false);
            v62.props.EditingItemContext:clear();
            v62.props.GoToNext();
            v62.props.ReleaseEditor();
            v62.props.EditingItemContext:setSourceItem(nil);
            v62.generateClicked = false;
            v25(v62.props.Plugin, v62.props.Localization, l_ConfirmDialog_0, {
                Text = v62.props.Localization:getText("Generate", "Success", {
                    name = v65.Name
                }),
                OnClose = function()
                end
            });
        end);
    end;
end;
return v2.connect(function(v67, _)
    return {
        IsControlsPanelBlockerActive = v67.controlsPanelBlocker.isActive,
        InBounds = v67.selectItem.inBounds
    };
end, function(v69)
    return {
        SetControlsPanelBlockerActivity = function(v70)
            v69(v20(v70));
        end,
        SetControlsPanelBlockerMessage = function(v71)
            v69(v21(v71));
        end,
        FinishEditing = function(v72, v73, v74, v75, v76)
            v69(v23(v72, v73, v74, v75, v76));
        end,
        ReleaseEditor = function()
            v69(v22());
        end
    };
end)((l_withContext_0({
    Plugin = l_ContextServices_0.Plugin,
    Analytics = l_ContextServices_0.Analytics,
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization,
    EditingItemContext = l_EditingItemContext_0,
    LuaMeshEditingModuleContext = l_LuaMeshEditingModuleContext_0
})(v26)));


local l_Parent_0 = script.Parent.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.AvatarToolsShared);
local l_AccessoryAndBodyToolShared_0 = v3.Util.AccessoryAndBodyToolShared;
local l_ItemCharacteristics_0 = l_AccessoryAndBodyToolShared_0.ItemCharacteristics;
local l_PreviewConstants_0 = l_AccessoryAndBodyToolShared_0.PreviewConstants;
local l_Components_0 = v3.Components;
local l_ConfirmDialog_0 = l_Components_0.ConfirmDialog;
local l_ConfirmCancelDialog_0 = l_Components_0.ConfirmCancelDialog;
local l_InstanceSelector_0 = l_Components_0.InstanceSelector;
local v11 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v11.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_EditingItemContext_0 = v3.Contexts.EditingItemContext;
local v15 = require(l_Parent_0.Src.Actions.SetToolMode);
local v16 = require(l_Parent_0.Src.Thunks.AddUserAddedAssetForPreview);
local v17 = require(l_Parent_0.Src.Components.SelectFrame);
local v18 = require(l_Parent_0.Src.Util.ShowDialog);
local v19 = require(l_Parent_0.Src.Util.Constants);
local v20 = v1.PureComponent:extend("SelectItemScreen");
v11.Util.Typecheck.wrap(v20, script);
v20.init = function(v21)
    v21.state = {
        selectedPart = nil,
        invalidSelected = false
    };
    v21.checkForPreviewAvatar = function(v22)
        local l_props_0 = v21.props;
        if l_ItemCharacteristics_0.isClothes(v22) then
            local l_Parent_1 = v22.Parent;
            if l_Parent_1 then
                if l_ItemCharacteristics_0.isAvatar(l_Parent_1) then
                    local v25 = l_Parent_1:Clone();
                    for _, v27 in ipairs(v25:GetChildren()) do
                        if v27.Name == v22.Name then
                            v27:Destroy();
                        end;
                    end;
                    l_props_0.AddUserAddedAssetForPreview(l_PreviewConstants_0.TABS_KEYS.Avatars, v25);
                    return ;
                else
                    return ;
                end;
            else
                return ;
            end;
        else
            return ;
        end;
    end;
    v21.setSourceItem = function(v28)
        v21.props.EditingItemContext:setSourceItem(v28);
        v21.checkForPreviewAvatar(v28);
        v21.props.SetToolMode(v19.TOOL_MODE.None);
        v21.props.GoToNext();
    end;
    v21.onSelectNewItem = function(v29)
        local l_props_1 = v21.props;
        v18(l_props_1.Plugin, l_props_1.Localization, l_ConfirmCancelDialog_0, {
            Text = v21.props.Localization:getText("Select", "LoseChanges"),
            OnConfirm = function()
                v21.setSourceItem(v29);
            end
        });
    end;
    v21.onConfirmSelection = function()
        local l_state_0 = v21.state;
        local l_props_2 = v21.props;
        local l_selectedPart_0 = l_state_0.selectedPart;
        if v21.isSelectedInstanceValid(l_selectedPart_0) then
            if l_selectedPart_0 then
                local v34 = l_props_2.EditingItemContext:getSourceItem();
                if not v34 or v34 == l_selectedPart_0 then
                    v21.setSourceItem(l_selectedPart_0);
                    return ;
                else
                    v21.onSelectNewItem(l_selectedPart_0);
                end;
            end;
            return ;
        else
            v21:setState({
                invalidSelected = true,
                selectedPart = v1.None
            });
            v18(l_props_2.Plugin, l_props_2.Localization, l_ConfirmDialog_0, {
                Text = v21.props.Localization:getText("Select", "Invalid"),
                OnClose = function()
                end
            });
            return ;
        end;
    end;
    v21.isSelectedInstanceValid = function(v35)
        local v36 = v21.props.EditingItemContext:getItem();
        if l_ItemCharacteristics_0.isPotentialLayeredClothingItem(v35) then
            if not l_ItemCharacteristics_0.hasInvalidCage(v35) then
                local v37 = l_ItemCharacteristics_0.isAvatar(v35);
                local v38 = v35:IsA("MeshPart") and v35:FindFirstChildWhichIsA("WrapTarget");
                if not v37 and not v38 then
                    return not ((((v35:FindFirstAncestor("LayeredClothingEditorPreview") ~= nil or v35 == v36) or v36 and v35 == v36.Parent) or (v35 and v36) and v35.Parent == v36.Parent) or v36 and v35:FindFirstAncestor(v36.Name));
                else
                    return false;
                end;
            else
                return false;
            end;
        else
            return false;
        end;
    end;
    v21.onSelectValidInstance = function(v39)
        v21:setState({
            selectedPart = l_ItemCharacteristics_0.getHandle(v39),
            invalidSelected = false
        });
        if v21.ancestryChangedHandle then
            v21.ancestryChangedHandle:Disconnect();
        end;
        v21.ancestryChangedHandle = v39.AncestryChanged:Connect(function()
            v21:setState({
                selectedPart = v1.None,
                invalidSelected = false
            });
            v21.ancestryChangedHandle:Disconnect();
            v21.ancestryChangedHandle = nil;
        end);
    end;
    v21.onInvalidSelectionInstance = function()
        v21:setState({
            invalidSelected = true,
            selectedPart = v1.None
        });
    end;
end;
v20.didMount = function(v40)
    local v41 = v40.props.EditingItemContext:getSourceItem();
    if v41 then
        v40:setState({
            selectedPart = v41
        });
    end;
end;
v20.render = function(v42)
    local l_props_3 = v42.props;
    local l_state_1 = v42.state;
    local v45 = not not l_state_1.selectedPart and l_state_1.selectedPart.Name or "";
    return v1.createElement("Frame", {
        Size = UDim2.new(1, 0, 1, 0),
        BackgroundColor3 = l_props_3.Stylizer.BackgroundColor,
        BorderSizePixel = 0
    }, {
        SelectFrame = v1.createElement(v17, {
            PartName = not not l_state_1.invalidSelected and l_props_3.Localization:getText("Select", "Invalid") or v45,
            ButtonEnabled = v45 ~= "",
            OnConfirmSelection = v42.onConfirmSelection
        }),
        InstanceSelector = v1.createElement(l_InstanceSelector_0, {
            IsSelectedInstanceValid = v42.isSelectedInstanceValid,
            OnValidSelection = v42.onSelectValidInstance,
            OnInvalidSelection = v42.onInvalidSelectionInstance
        })
    });
end;
v20.willUnmount = function(v46)
    if v46.ancestryChangedHandle then
        v46.ancestryChangedHandle:Disconnect();
        v46.ancestryChangedHandle = nil;
    end;
end;
return v2.connect(nil, function(v47)
    return {
        SetToolMode = function(v48)
            v47(v15(v48));
        end,
        AddUserAddedAssetForPreview = function(v49, v50)
            v47(v16(v49, v50));
        end
    };
end)((l_withContext_0({
    Plugin = l_ContextServices_0.Plugin,
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization,
    EditingItemContext = l_EditingItemContext_0
})(v20)));


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_FlowScreenLayout_0 = require(l_Parent_0.Packages.AvatarToolsShared).Components.FlowScreenLayout;
local l_UI_0 = v2.UI;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_DEPRECATED_TextInput_0 = l_UI_0.DEPRECATED_TextInput;
local l_Pane_0 = l_UI_0.Pane;
local v10 = v1.PureComponent:extend("SelectFrame");
v2.Util.Typecheck.wrap(v10, script);
v10.init = function(v11)
    v11.renderContent = function(v12)
        local l_props_0 = v11.props;
        local l_PartName_0 = l_props_0.PartName;
        local l_Stylizer_0 = l_props_0.Stylizer;
        return v1.createElement(l_Pane_0, {
            Size = UDim2.new(1, 0, 0, l_Stylizer_0.TextBoxHeight),
            LayoutOrder = v12,
            Layout = Enum.FillDirection.Horizontal,
            HorizontalAlignment = Enum.HorizontalAlignment.Left
        }, {
            TextBoxLabel = v1.createElement(l_TextLabel_0, {
                TextXAlignment = Enum.TextXAlignment.Left,
                TextYAlignment = Enum.TextYAlignment.Center,
                Size = UDim2.new(0, l_Stylizer_0.LabelWidth, 1, 0),
                Text = l_props_0.Localization:getText("Select", "Part"),
                LayoutOrder = v12 + 1
            }),
            SelectedPartBox = v1.createElement(l_DEPRECATED_TextInput_0, {
                Enabled = false,
                ShouldFocus = false,
                Text = l_PartName_0,
                Size = UDim2.new(0.5, 0, 1, 0),
                LayoutOrder = v12 + 2,
                Style = "FilledRoundedBorder"
            })
        });
    end;
end;
v10.render = function(v16)
    local l_props_1 = v16.props;
    local l_ButtonEnabled_0 = l_props_1.ButtonEnabled;
    local l_OnConfirmSelection_0 = l_props_1.OnConfirmSelection;
    local l_Localization_0 = l_props_1.Localization;
    return v1.createElement(l_FlowScreenLayout_0, {
        Title = l_Localization_0:getText("Editor", "Select"),
        PromptText = l_Localization_0:getText("Select", "Prompt"),
        NextButtonText = l_Localization_0:getText("Flow", "Next"),
        BackButtonText = "",
        NextButtonEnabled = l_ButtonEnabled_0,
        HasBackButton = false,
        GoToNext = l_OnConfirmSelection_0,
        RenderContent = v16.renderContent
    });
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.Framework);
local v3 = require(l_Parent_0.Packages.AvatarToolsShared);
local l_ContextServices_0 = v2.ContextServices;
local l_AssetServiceWrapper_0 = v3.Contexts.AssetServiceWrapper;
local l_StudioServiceWrapper_0 = v3.Contexts.StudioServiceWrapper;
local l_MannequinContext_0 = v3.Contexts.MannequinContext;
local v8 = v1.PureComponent:extend("ServiceWrapper");
v8.init = function(v9)
    assert(v9.props.analytics ~= nil, "Expected a Analytics object");
    assert(v9.props[v1.Children] ~= nil, "Expected child elements to wrap");
    assert(v9.props.localization ~= nil, "Expected a Localization object");
    assert(v9.props.plugin ~= nil, "Expected a plugin object");
    assert(v9.props.store ~= nil, "Expected a Rodux Store object");
    assert(v9.props.theme ~= nil, "Expected a PluginTheme object");
    assert(v9.props.mouse ~= nil, "Expected a PluginMouse object");
    assert(v9.props.pluginActions ~= nil, "Expect a PluginActions object");
    assert(v9.props.signals ~= nil, "Expect a Signals object");
    assert(v9.props.editingItemContext ~= nil, "Expect a EditingItemContext");
    assert(v9.props.meshEditingContext ~= nil, "Expect a LuaMeshEditingModuleContext");
end;
v8.render = function(v10)
    return l_ContextServices_0.provide({
        v10.props.plugin,
        v10.props.analytics,
        v10.props.localization,
        v10.props.theme,
        l_ContextServices_0.Store.new(v10.props.store),
        l_ContextServices_0.API.new(),
        v10.props.pluginActions,
        v10.props.signals,
        l_ContextServices_0.Mouse.new(v10.props.mouse),
        v10.props.editingItemContext,
        v10.props.meshEditingContext,
        l_AssetServiceWrapper_0.new(),
        l_StudioServiceWrapper_0.new(),
        l_MannequinContext_0.new()
    }, v10.props[v1.Children]);
end;
return v8;


return function()
    return game:GetEngineFeature("AccessoryToolEngineFeature");
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Rodux);
local v2 = require(l_Parent_0.Packages.Cryo);
return v1.createReducer({
    Playhead = 0,
    SliderPlayhead = -1,
    IsPlaying = false,
    TrackLengh = 0
}, {
    SetPlayhead = function(v3, v4)
        return v2.Dictionary.join(v3, {
            Playhead = v4.playhead
        });
    end,
    SetSliderPlayhead = function(v5, v6)
        return v2.Dictionary.join(v5, {
            SliderPlayhead = v6.sliderPlayhead
        });
    end,
    SetIsPlaying = function(v7, v8)
        return v2.Dictionary.join(v7, {
            IsPlaying = v8.isPlaying
        });
    end,
    SetTrackLength = function(v9, v10)
        return v2.Dictionary.join(v9, {
            TrackLength = v10.trackLength
        });
    end
});


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Rodux);
local v2 = require(l_Parent_0.Packages.Cryo);
return v1.createReducer({
    isActive = false,
    message = ""
}, {
    SetControlsPanelBlockerActivity = function(v3, v4)
        return v2.Dictionary.join(v3, {
            isActive = v4.isActive
        });
    end,
    SetControlsPanelBlockerMessage = function(v5, v6)
        return v2.Dictionary.join(v5, {
            message = v6.message
        });
    end
});


local l_Parent_0 = script.Parent.Parent.Parent;
return (require(l_Parent_0.Packages.Rodux).combineReducers({
    status = require(l_Parent_0.Src.Reducers.Status),
    previewStatus = require(l_Parent_0.Src.Reducers.PreviewStatus),
    selectItem = require(l_Parent_0.Src.Reducers.SelectItem),
    controlsPanelBlocker = require(l_Parent_0.Src.Reducers.ControlsPanelBlocker),
    previewAssets = require(l_Parent_0.Src.Reducers.PreviewAssets),
    animation = require(l_Parent_0.Src.Reducers.Animation)
}));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Rodux);
local v2 = require(l_Parent_0.Packages.Cryo);
return v1.createReducer({
    prebuiltAssetsInfo = {}
}, {
    SetPrebuiltAssetsInfo = function(v3, v4)
        return v2.Dictionary.join(v3, {
            prebuiltAssetsInfo = v4.prebuiltAssetsInfo
        });
    end
});


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Rodux);
local v2 = require(l_Parent_0.Packages.Cryo);
local v3 = require(l_Parent_0.Packages.AvatarToolsShared);
return v1.createReducer({
    categoryFilter = "",
    searchFilter = "",
    docked = true,
    selectedTab = v3.Util.AccessoryAndBodyToolShared.PreviewConstants.TABS_KEYS.None,
    selectedAssets = {},
    userAddedAssets = {},
    workspacePreviewSelectionEnabled = true
}, {
    SetCategoryFilter = function(v4, v5)
        return v2.Dictionary.join(v4, {
            categoryFilter = v5.categoryFilter
        });
    end,
    SetSearchFilter = function(v6, v7)
        return v2.Dictionary.join(v6, {
            searchFilter = v7.searchFilter
        });
    end,
    SetDocked = function(v8, v9)
        return v2.Dictionary.join(v8, {
            docked = v9.docked
        });
    end,
    SetUserAddedAssets = function(v10, v11)
        return v2.Dictionary.join(v10, {
            userAddedAssets = v11.userAddedAssets
        });
    end,
    SelectPreviewTab = function(v12, v13)
        return v2.Dictionary.join(v12, {
            selectedTab = v13.selectedTab
        });
    end,
    SetPreviewAssetsSelected = function(v14, v15)
        return v2.Dictionary.join(v14, {
            selectedAssets = v15.selectedAssets
        });
    end,
    SetWorkspacePreviewSelectionEnabled = if not v3.Flags.GetFFlagAFTSelectHandleOnly() then nil else function(v16, v17)
        return v2.Dictionary.join(v16, {
            workspacePreviewSelectionEnabled = v17.workspacePreviewSelectionEnabled
        });
    end
});


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Rodux);
local v2 = require(l_Parent_0.Packages.Cryo);
return v1.createReducer({
    editingItem = nil,
    layeredClothingItemsInList = {},
    manuallyHiddenLayeredClothingItems = {},
    editingCage = nil,
    cagesTransparency = {},
    acessoryTypeInfo = nil,
    size = Vector3.new(1, 1, 1),
    meshScale = Vector3.new(1, 1, 1),
    inBounds = false,
    attachmentPoint = {
        ItemCFrame = CFrame.new(),
        AttachmentCFrame = CFrame.new()
    }
}, {
    SetManuallyHiddenLayeredClothingItems = function(v3, v4)
        return v2.Dictionary.join(v3, {
            manuallyHiddenLayeredClothingItems = v4.manuallyHiddenLayeredClothingItems
        });
    end,
    SetEditingCage = function(v5, v6)
        return v2.Dictionary.join(v5, {
            editingCage = v6.editingCage
        });
    end,
    SetCagesTransparency = function(v7, v8)
        return v2.Dictionary.join(v7, {
            cagesTransparency = v8.cagesTransparency
        });
    end,
    SetAccessoryTypeInfo = function(v9, v10)
        return v2.Dictionary.join(v9, {
            accessoryTypeInfo = v10.accessoryTypeInfo
        });
    end,
    SetAttachmentPoint = function(v11, v12)
        return v2.Dictionary.join(v11, {
            attachmentPoint = v12.attachmentPoint
        });
    end,
    SetItemSize = function(v13, v14)
        return v2.Dictionary.join(v13, {
            size = v14.size
        });
    end,
    SetMeshScale = function(v15, v16)
        return v2.Dictionary.join(v15, {
            meshScale = v16.meshScale
        });
    end,
    SetInBounds = function(v17, v18)
        return v2.Dictionary.join(v17, {
            inBounds = v18.inBounds
        });
    end
});


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Rodux);
local v2 = require(l_Parent_0.Packages.Cryo);
return v1.createReducer({
    toolMode = require(l_Parent_0.Src.Util.Constants).TOOL_MODE.None,
    draggerType = Enum.RibbonTool.Select
}, {
    SetToolMode = function(v3, v4)
        return v2.Dictionary.join(v3, {
            toolMode = v4.toolMode
        });
    end,
    SetDraggerType = function(v5, v6)
        return v2.Dictionary.join(v5, {
            draggerType = v6.draggerType
        });
    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.Util.Constants);
local v4 = require(l_Parent_0.Src.Util.AnalyticsGlobals);
local l_StudioService_0 = game:GetService("StudioService");
local function v14(v6)
    if v6 then
        for _, v8 in {
            "id://",
            "[Ii][Dd]="
        }, nil, nil do
            local v9, v10 = string.find(v6, v8);
            if v9 then
                local v11, v12 = string.find(v6, "%d+", v10 + 1);
                v9 = v11;
                v10 = v12;
                if not (not v9 or not v10) then
                    v11 = v6:sub(v9, v10);
                    local v13;
                    v12, v13 = pcall(function()
                        return (tonumber(v11));
                    end);
                    if v12 then
                        return v13;
                    end;
                end;
            end;
        end;
        return ;
    else
        return ;
    end;
end;
return function(v15)
    local l_ANALYTICS_CONSTANTS_0 = v3.ANALYTICS_CONSTANTS;
    local function v19(v17, v18)
        v15:SendEventDeferred("studio", "accessoryFittingTool", v17, (v1.Dictionary.join({
            studioSid = v15:GetSessionId(),
            clientId = v15:GetClientId(),
            placeId = game.PlaceId,
            userId = l_StudioService_0:GetUserId()
        }, v18 or {})));
    end;
    local v20 = {
        [v3.SCREENS.Select] = "exitSelect",
        [v3.SCREENS.AssetType] = "exitAssetType",
        [v3.SCREENS.Edit] = "exitEdit"
    };
    local v21 = {
        Default = {
            [l_PreviewConstants_0.TABS_KEYS.Animations] = "defaultPreviewAnimSelected",
            [l_PreviewConstants_0.TABS_KEYS.Avatars] = "defaultPreviewAvatarSelected",
            [l_PreviewConstants_0.TABS_KEYS.Clothing] = "defaultPreviewClothingSelected"
        },
        Custom = {
            [l_PreviewConstants_0.TABS_KEYS.Animations] = "customPreviewAnimSelected",
            [l_PreviewConstants_0.TABS_KEYS.Avatars] = "customPreviewAvatarSelected",
            [l_PreviewConstants_0.TABS_KEYS.Clothing] = "customPreviewClothingSelected"
        }
    };
    local function _()
        if not (v4.TotalLayers <= 0) or v4.TotalAvatars > 1 then
            v19("previewUsed", {
                layerCount = v4.TotalLayers,
                avatarCount = v4.TotalAvatars
            });
        end;
    end;
    local function _()
        if v4.CageEdits > 0 then
            v19("cageEdited", {
                count = v4.CageEdits
            });
            v15:ReportCounter("AccessoryFittingToolCageEdited", v4.CageEdits);
        end;
    end;
    return {
        FirstAction = function(v24)
            if v4.FirstAction then
                v19("firstAction", {
                    actionId = v24
                });
            end;
        end,
        CreateAccessory = function(v25)
            v19("createAccessory", {
                count = v25
            });
            v15:ReportCounter("CreateAccessory", v25);
        end,
        PluginOpened = function()
            v19("opened");
            v15:ReportCounter("AccessoryFittingToolOpened", 1);
        end,
        LayeredAccessoryPublished = function(v26)
            v19("publishedLC", {
                cageEdited = if v4.CageEdits > 0 then l_ANALYTICS_CONSTANTS_0.CAGE_EDITING.Edited else l_ANALYTICS_CONSTANTS_0.CAGE_EDITING.Unedited,
                meshId = v14(v26)
            });
            v15:ReportCounter("AccessoryFittingToolPublishedLC", 1);
        end,
        RigidAccessoryPublished = function(v27)
            v19("publishedAcc", {
                meshId = v14(v27)
            });
            v15:ReportCounter("AccessoryFittingToolPublishedAcc", 1);
        end,
        LayeredAccessorySelected = function()
            v19("selectedLC");
            v15:ReportCounter("AccessoryFittingToolSelectedLC", 1);
        end,
        RigidAccessorySelected = function()
            v19("selectedAcc");
            v15:ReportCounter("AccessoryFittingToolSelectedAcc", 1);
        end,
        CenterAvatarToCamera = function()
            v19("centerAvatarToCamera");
            v15:ReportCounter("AccessoryFittingToolCenterAvatarToCamera", 1);
        end,
        ZoomToAvatar = function()
            v19("zoomToAvatar");
            v15:ReportCounter("AccessoryFittingToolZoomToAvatar", 1);
        end,
        AutoSkinningToggled = function(v28)
            v19("autoSkinningToggled", {
                enabled = v28
            });
            v15:ReportCounter("AccessoryFittingToolAutoSkinningToggled", 1);
        end,
        FalloffSliderAdjusted = function(_)
            v19("falloffAdjusted");
            v15:ReportCounter("AccessoryFittingToolFalloffAdjusted", 1);
        end,
        PreviewAssetSelected = function(v30, v31, v32, v33)
            local v34 = (if not v30 then v21.Default else v21.Custom)[v31];
            if v34 then
                v19(v34, {
                    method = if not v33 then l_ANALYTICS_CONSTANTS_0.PREVIEW_SELECT_METHOD.Workspace else l_ANALYTICS_CONSTANTS_0.PREVIEW_SELECT_METHOD.Thumbnail,
                    assetId = if v30 then nil else v32
                });
            end;
        end,
        ExitScreen = function()
            local l_HasPublished_0 = v4.HasPublished;
            local l_CurrentScreen_0 = v4.CurrentScreen;
            local l_RigidFlow_0 = v4.RigidFlow;
            local v38 = math.abs(os.time() - v4.StartTime);
            local v39 = v20[l_CurrentScreen_0];
            if v39 then
                v19(v39, {
                    flow = if not l_RigidFlow_0 then l_ANALYTICS_CONSTANTS_0.FLOW.Layered else l_ANALYTICS_CONSTANTS_0.FLOW.Rigid,
                    didGenerate = if not l_HasPublished_0 then l_ANALYTICS_CONSTANTS_0.PUBLISHING.Unpublished else l_ANALYTICS_CONSTANTS_0.PUBLISHING.Published,
                    timeInSeconds = v38
                });
            end;
        end,
        SessionEnded = function(v40)
            if not (v4.TotalLayers <= 0) or v4.TotalAvatars > 1 then
                v19("previewUsed", {
                    layerCount = v4.TotalLayers,
                    avatarCount = v4.TotalAvatars
                });
            end;
            if v4.CageEdits > 0 then
                v19("cageEdited", {
                    count = v4.CageEdits
                });
                v15:ReportCounter("AccessoryFittingToolCageEdited", v4.CageEdits);
            end;
            if not v40 then
                v4:resetSession();
                return ;
            else
                v4:reset();
                return ;
            end;
        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.AvatarToolsShared);
local l_PreviewConstants_0 = v2.Util.AccessoryAndBodyToolShared.PreviewConstants;
local v4 = require(l_Parent_0.Packages.Framework);
local l_Util_0 = v4.Util;
local l_StyleModifier_0 = l_Util_0.StyleModifier;
local l_deepCopy_0 = l_Util_0.deepCopy;
local l_UI_0 = v4.UI;
local l_Spritesheet_0 = v4.Util.Spritesheet;
local l_Style_0 = v4.Style;
local l_makeTheme_0 = l_Style_0.makeTheme;
local l_StudioTheme_0 = l_Style_0.Themes.StudioTheme;
local l_StyleKey_0 = l_Style_0.StyleKey;
local l_ComponentSymbols_0 = l_Style_0.ComponentSymbols;
local l_getRawComponentStyle_0 = l_Style_0.getRawComponentStyle;
local l_Box_0 = l_UI_0.Box;
local l_RoundBox_0 = l_UI_0.RoundBox;
local v18 = l_deepCopy_0((l_getRawComponentStyle_0("RoundBox")));
local l_DarkTheme_0 = l_Style_0.Themes.DarkTheme;
local l_LightTheme_0 = l_Style_0.Themes.LightTheme;
local v21 = v1.Dictionary.join(l_DarkTheme_0, {
    [l_StyleKey_0.PlayImage] = "rbxasset://textures/LayeredClothingEditor/Icon_Play_Light.png",
    [l_StyleKey_0.AddMoreImage] = "rbxasset://textures/LayeredClothingEditor/Icon_AddMore_Light.png",
    [l_StyleKey_0.MoreActionsImage] = "rbxasset://textures/LayeredClothingEditor/Icon_MoreAction_Light.png",
    [l_StyleKey_0.AddMoreBigImage] = "rbxasset://textures/LayeredClothingEditor/AddMore_Big_50X50_Light.png"
});
local v22 = v1.Dictionary.join(l_LightTheme_0, {
    [l_StyleKey_0.PlayImage] = "rbxasset://textures/LayeredClothingEditor/Icon_Play_Dark.png",
    [l_StyleKey_0.AddMoreImage] = "rbxasset://textures/LayeredClothingEditor/Icon_AddMore_Dark.png",
    [l_StyleKey_0.MoreActionsImage] = "rbxasset://textures/LayeredClothingEditor/Icon_MoreAction_Dark.png",
    [l_StyleKey_0.AddMoreBigImage] = "rbxasset://textures/LayeredClothingEditor/AddMore_Big_50X50_Dark.png"
});
local function _()
    l_StyleKey_0.PlayImage = "rbxasset://textures/LayeredClothingEditor/Icon_Play_Dark.png";
    l_StyleKey_0.AddMoreImage = "rbxasset://textures/LayeredClothingEditor/Icon_AddMore_Dark.png";
    l_StyleKey_0.MoreActionsImage = "rbxasset://textures/LayeredClothingEditor/Icon_MoreAction_Dark.png";
    l_StyleKey_0.AddMoreBigImage = "rbxasset://textures/LayeredClothingEditor/AddMore_Big_50X50_Dark.png";
end;
local function v25(v24)
    if v24 then
        l_StyleKey_0.PlayImage = "rbxasset://textures/LayeredClothingEditor/Icon_Play_Dark.png";
        l_StyleKey_0.AddMoreImage = "rbxasset://textures/LayeredClothingEditor/Icon_AddMore_Dark.png";
        l_StyleKey_0.MoreActionsImage = "rbxasset://textures/LayeredClothingEditor/Icon_MoreAction_Dark.png";
        l_StyleKey_0.AddMoreBigImage = "rbxasset://textures/LayeredClothingEditor/AddMore_Big_50X50_Dark.png";
    end;
    return {
        BackgroundColor = l_StyleKey_0.MainBackground,
        ButtonColor = l_StyleKey_0.Button,
        RibbonTab = l_StyleKey_0.RibbonTab,
        ProgressBarColor = l_StyleKey_0.DialogMainButtonSelected,
        ScrollBarColor = l_StyleKey_0.ScrollBar,
        HoverColor = l_StyleKey_0.ButtonHover,
        BorderColor = l_StyleKey_0.Border,
        SubTextColor = l_StyleKey_0.SubText,
        InfoTextColor = l_StyleKey_0.DimmedText,
        TitleTextColor = l_StyleKey_0.TitlebarText,
        TextColor = l_StyleKey_0.MainText,
        TextDisabledColor = Color3.fromRGB(148, 148, 148),
        ErrorColor = l_StyleKey_0.ErrorText,
        LinkColor = l_StyleKey_0.LinkText,
        Green = Color3.fromRGB(64, 166, 81),
        White = Color3.fromRGB(255, 255, 255),
        DisabledColor = l_StyleKey_0.MainTextDisabled,
        ScrollbarTransparency = 0.7,
        ScrollbarSize = 7,
        TextSize = 18,
        RowHeight = 32,
        Font = Enum.Font.SourceSans,
        FontBold = Enum.Font.SourceSansSemibold,
        PopupMessageSize = Vector2.new(200, 100),
        MainPadding = 20,
        HeaderPadding = 8,
        SliderHeight = 32,
        ScrollBarThickness = 8,
        TabHeight = 32,
        BorderSize = 1,
        PreviewViewportFrameHeight = 250
    }, {
        AssetTypeScreen = {
            ContentHeight = 120,
            ContentSpacing = 16
        },
        CageControls = {
            Padding = 6,
            ButtonSize = 32,
            CageModeIcon = "rbxasset://textures/LayeredClothingEditor/WorkspaceIcons/Cage Mode.png",
            InnerCageIcon = "rbxasset://textures/LayeredClothingEditor/WorkspaceIcons/Inner Cage.png",
            OuterCageIcon = "rbxasset://textures/LayeredClothingEditor/WorkspaceIcons/Outer Cage.png",
            AutoWeightIcon = "rbxasset://textures/LayeredClothingEditor/WorkspaceIcons/Auto-Weight.png",
            OptionsIcon = "rbxasset://textures/LayeredClothingEditor/WorkspaceIcons/Option Dots.png",
            ButtonStyle = {
                Padding = 0,
                Background = l_RoundBox_0,
                BackgroundStyle = v1.Dictionary.join(v18, {
                    Color = l_StyleKey_0.Button
                }),
                [l_StyleModifier_0.Hover] = {
                    BackgroundStyle = v1.Dictionary.join(v18, {
                        Color = l_StyleKey_0.ButtonHover
                    })
                },
                [l_StyleModifier_0.Disabled] = {
                    BackgroundStyle = v1.Dictionary.join(v18, {
                        Color = l_StyleKey_0.ButtonDisabled
                    }),
                    TextColor = l_StyleKey_0.ButtonTextDisabled
                },
                [l_StyleModifier_0.Pressed] = {
                    BackgroundStyle = v1.Dictionary.join(v18, {
                        Color = l_StyleKey_0.DialogMainButton
                    })
                }
            }
        },
        VisibilityControls = {
            Padding = 6,
            PaddingSmall = 2,
            ButtonSize = 32,
            CageVisibilityIcon = "rbxasset://textures/LayeredClothingEditor/WorkspaceIcons/Cage Visibility.png",
            MeshPartVisibilityIcon = "rbxasset://textures/LayeredClothingEditor/WorkspaceIcons/Mesh Visibility Icon.png",
            OptionsIcon = "rbxasset://textures/LayeredClothingEditor/WorkspaceIcons/Option Dots.png",
            FocusMannequinIcon = "rbxasset://textures/LayeredClothingEditor/WorkspaceIcons/Center Camera to Mannequin.png"
        },
        WorkspaceEditorControls = {
            ButtonSize = 32,
            VisibilityControlsOffset = 128,
            PaneOffsetY = 20
        },
        EditorScreen = {
            PreviewHeight = 350,
            GenerateHeight = 56
        },
        GenerateScreen = {
            GenerateDropdownButtonWidth = 228,
            GenerateButtonWidth = 150,
            BackButtonWidth = 96,
            GenerateDropdownButtonHeight = 36,
            ButtonHeight = 48,
            ArrowWidth = 24,
            WarningIcon = "rbxasset://textures/StudioSharedUI/statusWarning.png",
            IconSize = 16,
            DropdownItemHeight = 22
        },
        PreviewFrame = {
            Padding = 6,
            GridContainerSpacing = 4,
            GridContainerPadding = 8,
            Height = 350,
            GridContainerBackgroundColor = l_StyleKey_0.SubBackground2
        },
        DeformerDropdownMenu = v1.Dictionary.join(l_Spritesheet_0("rbxasset://textures/StudioSharedUI/arrowSpritesheet.png", {
            SpriteSize = 12,
            NumSprites = 4
        })[3], {
            Size = UDim2.new(0, 10, 0, 10),
            Color = l_StyleKey_0.MainText,
            AnchorPoint = Vector2.new(1, 0.5),
            Position = UDim2.new(1, -6, 0.5, 0),
            Padding = 96,
            DropdownFramePadding = 12,
            ArrowSize = 24,
            DropdownFrameWidth = 216,
            Font = Enum.Font.SourceSans,
            TextSize = 18
        }),
        LatticeToolSettings = {
            UIPadding = 24,
            Height = 24,
            ButtonWidth = 64,
            LayoutPadding = 6
        },
        AddItemFromExplorerButton = {
            AddFromExploreButtonFrameHeight = 25,
            AddFromExploreButtonImage = l_StyleKey_0.AddMoreImage,
            AddFromExploreButtonSize = UDim2.new(0, 20, 0, 20)
        },
        EditingModeFrame = {
            CageRowTextLabelSize = 0.3
        },
        EditingModeRadioButtonList = {
            Padding = 8
        },
        InExperiencePreviewerFrame = {
            Size = UDim2.fromOffset(240, 80)
        },
        SelectItemFrame = {
            AddFromExploreButtonFrameHeight = 25
        },
        SelectItemList = {
            SelectItemListScrollingFrameStyle = {
                BackgroundColor3 = l_StyleKey_0.CategoryItem,
                ScrollBarThickness = 7,
                BorderSizePixel = 0,
                AutoSizeCanvas = true,
                AutoSizeLayoutElement = "UIListLayout",
                ScrollingDirection = Enum.ScrollingDirection.Y
            }
        },
        SelectItemListRow = {
            MoreButtonSize = 20,
            SelectableRowStyle = {
                Background = l_Box_0,
                BackgroundStyle = {
                    BorderSize = 0,
                    Transparency = 1
                },
                [l_StyleModifier_0.Hover] = {
                    BackgroundStyle = {
                        Color = l_StyleKey_0.ButtonHover,
                        Transparency = 0
                    }
                },
                [l_StyleModifier_0.Selected] = {
                    BackgroundStyle = {
                        Color = l_StyleKey_0.DialogMainButtonSelected,
                        Transparency = 0
                    }
                }
            }
        },
        SelectItemMoreButton = {
            MoreButtonImage = l_StyleKey_0.MoreActionsImage,
            MoreButtonSize = 20
        },
        PreviewGrid = {
            TileSize = UDim2.new(0, 120, 0, 120),
            TilePadding = UDim2.new(0, 6, 0, 6),
            TileInnerBorder = Vector2.new(10, 10),
            ImageFrameSize = UDim2.new(0, 120, 0, 118),
            ImageSize = UDim2.new(0, 100, 0, 98),
            TextLabelSize = UDim2.new(0, 120, 0, 22),
            ButtonBackgroundColor = l_StyleKey_0.ButtonPressed,
            TextSize = 18,
            DefaultTileImages = {
                [l_PreviewConstants_0.TABS_KEYS.Avatars] = "rbxasset://textures/LayeredClothingEditor/Default_Preview_Avatars.png",
                [l_PreviewConstants_0.TABS_KEYS.Clothing] = "rbxasset://textures/LayeredClothingEditor/Default_Preview_Clothing.png",
                [l_PreviewConstants_0.TABS_KEYS.Animations] = "rbxasset://textures/LayeredClothingEditor/Default_Preview_Animation.png"
            },
            AddNewImage = l_StyleKey_0.AddMoreBigImage,
            SmallImageSize = UDim2.new(0, 46, 0, 42),
            ImageBackgroundColor = l_StyleKey_0.CategoryItem
        },
        EditTransparencyView = {
            TitleHeight = 32
        },
        AnimPlaybackSlider = {
            PlayImage = l_StyleKey_0.PlayImage,
            PauseImage = "rbxasset://textures/LayeredClothingEditor/Icon_Pause.png",
            PlayButtonWidth = 20,
            PlayTimeLabelWidth = 60,
            Padding = 24
        },
        ScaleTypeDropdown = {
            DropdownHeight = 24,
            DropdownWidth = 160,
            Spacing = 6
        },
        Tile = {
            TileSize = UDim2.new(0, 140, 0, 160),
            TileInnerBorder = Vector2.new(10, 10),
            ImageFrameSize = UDim2.new(0, 120, 0, 118),
            ImageSize = UDim2.new(0, 100, 0, 98),
            TextLabelSize = UDim2.new(0, 120, 0, 22),
            ButtonBackgroundColor = l_StyleKey_0.ButtonPressed,
            TextSize = 18,
            ImageBackgroundColor = l_StyleKey_0.CategoryItem
        },
        SelectFrame = {
            TextBoxHeight = 24,
            LabelWidth = 64
        },
        PointTool = {
            DefaultPointSize = 0.015
        },
        Point = {
            DefaultPointSize = 0.015,
            DefaultColor = Color3.new(0, 1, 1),
            HoveredColor = Color3.new(1, 1, 0),
            SelectedColor = Color3.new(1, 1, 0),
            SelectedColorNoWeight = Color3.new(1, 0, 0)
        },
        ControlPoint = {
            Transparency = 0.7,
            PointSize = 0.1,
            DefaultColor = Color3.new(0, 0, 1),
            HoveredColor = Color3.new(1, 1, 0),
            SelectedColor = Color3.new(1, 0, 0)
        },
        Lattice = {
            LinkColor = Color3.new(0, 0, 0)
        },
        Wireframe = {
            WireColorInner = Color3.fromRGB(68, 103, 128),
            WireColorOuter = Color3.fromRGB(140, 65, 168)
        },
        ResetSettings = {
            ButtonHeight = 36
        },
        PreviewToStarterCharacterButton = {
            ButtonHeight = 36
        },
        TextInput = v1.Dictionary.join(l_getRawComponentStyle_0("TextInput"), {
            PlaceholderTextColor = l_StyleKey_0.DimmedText,
            TextColor = l_StyleKey_0.MainText,
            ["&RoundedBorder"] = {
                Padding = {
                    Left = 10,
                    Top = 5,
                    Right = 10,
                    Bottom = 5
                },
                BackgroundStyle = {
                    Color = l_StyleKey_0.RibbonTab,
                    BorderColor = l_StyleKey_0.RibbonTab,
                    Transparency = 0,
                    BorderTransparency = 0,
                    BackgroundImage = "rbxasset://textures/StudioToolbox/RoundedBackground.png",
                    BorderImage = "rbxasset://textures/StudioToolbox/RoundedBorder.png",
                    SliceCenter = Rect.new(3, 3, 13, 13)
                }
            }
        }),
        InstanceSelector = {
            HoverLineThickness = 0.02
        },
        MeshPartTool = {
            Transparency = 0.8,
            InBoundsColor = Color3.new(0, 0, 1),
            OutBoundsColor = Color3.new(1, 0, 0),
            LineThickness = 5,
            LineColor = Color3.new(0, 0, 0)
        }
    };
end;
local function v27(v26)
    v26[l_ComponentSymbols_0.SimpleTab] = v1.Dictionary.join(l_getRawComponentStyle_0("SimpleTab"), {
        Color = l_StyleKey_0.ButtonText,
        BackgroundColor = l_StyleKey_0.MainBackground,
        BorderColor = l_StyleKey_0.MainBackground,
        TopLineColor = l_StyleKey_0.DialogMainButton,
        BottomLineColor = l_StyleKey_0.Border,
        [l_StyleModifier_0.Hover] = {
            Color = l_StyleKey_0.DialogMainButton
        },
        [l_StyleModifier_0.Selected] = {
            BottomLineColor = l_StyleKey_0.MainBackground,
            BackgroundColor = l_StyleKey_0.MainBackground,
            BorderColor = l_StyleKey_0.Border
        },
        [l_StyleModifier_0.Disabled] = {
            Color = l_StyleKey_0.ButtonTextDisabled
        }
    });
end;
local function v34(v28)
    local v29, v30 = v25(v28);
    local v31 = {};
    for v32, v33 in pairs(v30) do
        v31[l_ComponentSymbols_0:add(v32)] = v33;
    end;
    v27(v31);
    return v1.Dictionary.join(v29, v31);
end;
local v35 = {
    makePluginTheme = function()
        return l_makeTheme_0(v2.StyleRoot, v34(), (l_StudioTheme_0.new(v21, v22)))();
    end,
    mock = function()
        return l_makeTheme_0(v2.StyleRoot, v34(true), (l_StudioTheme_0.mock(v21, v22)))();
    end
};
v35.getMockTheme = function(_)
    return v35.mock();
end;
return v35;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_PreviewUtil_0 = require(l_Parent_0.Packages.AvatarToolsShared).Util.AccessoryAndBodyToolShared.PreviewUtil;
local v2 = require(l_Parent_0.Src.Actions.SetUserAddedAssets);
local l_deepJoin_0 = require(l_Parent_0.Packages.Framework).Util.deepJoin;
return function(v4, v5, v6)
    return function(v7)
        local l_userAddedAssets_0 = v7:getState().previewStatus.userAddedAssets;
        local v9 = 1;
        if l_userAddedAssets_0[v4] then
            v9 = #l_userAddedAssets_0[v4] + 1;
        end;
        local v10 = l_PreviewUtil_0.createUserAddedAsset(v5);
        v7:dispatch(v2((l_deepJoin_0(l_userAddedAssets_0, {
            [v4] = {
                [v9] = v10
            }
        }))));
        if v6 then
            v6(v10);
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Src.Actions.SetCagesTransparency);
local l_deepCopy_0 = require(l_Parent_0.Packages.Framework).Util.deepCopy;
return function(v3, v4)
    return function(v5)
        local v6 = l_deepCopy_0(v5:getState().selectItem.cagesTransparency);
        v6[v3] = v4;
        v5:dispatch(v1(v6));
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Src.Thunks.ReleaseEditor);
local _ = require(l_Parent_0.Src.Util.AnalyticsGlobals);
return function(v3, v4, v5)
    return function(v6)
        v3:Deactivate();
        v6:dispatch(v1());
        v5:cleanup();
        v4:getHandler("ExitScreen")();
        v4:getHandler("SessionEnded")(true);
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Src.Actions.SetUserAddedAssets);
local l_deepCopy_0 = require(l_Parent_0.Packages.Framework).Util.deepCopy;
return function(v3, v4)
    return function(v5)
        local v6 = l_deepCopy_0(v5:getState().previewStatus.userAddedAssets);
        if not (not v6[v3] or not v6[v3][v4]) then
            v6[v3][v4] = nil;
            v5:dispatch(v1(v6));
        end;
    end;
end;