local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local v1 = require(l_script_FirstAncestor_0.Packages.Cryo);
local v2 = require(l_script_FirstAncestor_0.Src.Utility.DebugFlags);
local l_HttpService_0 = game:GetService("HttpService");
local l_StudioService_0 = game:GetService("StudioService");
return function(v5)
    local function _(v6, v7)
        local v8 = v1.Dictionary.join({
            studioSid = v5:GetSessionId(),
            clientId = v5:GetClientId(),
            placeId = game.PlaceId,
            userId = l_StudioService_0:GetUserId()
        }, v7 or {});
        if v2.LogAnalytics() then
            print(("%s SendEvent eventName=%s args=%s"):format("AssetImporter", tostring(v6), l_HttpService_0:JSONEncode(v8)));
        end;
        v5:SendEventDeferred("studio", "AssetImporter", v6, v8);
    end;
    local function _(v10, v11)
        v11 = v11 or 1;
        if v2.LogAnalytics() then
            print(("%s ReportCounter counterName=%s count=%s"):format("AssetImporter", tostring(v10), (tostring(v11))));
        end;
        v5:ReportCounter(v10, v11);
    end;
    return {};
end;


return function(v0, ...)
    local v1 = {
        ...
    };
    local l_v0_0 = v0;
    for _, v4 in ipairs(v1) do
        if l_v0_0 == nil then
            return nil;
        else
            l_v0_0 = l_v0_0:FindFirstChild(v4);
        end;
    end;
    return l_v0_0;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v2 = require(l_script_FirstAncestor_0.Src.Testing.Mocks.EventMock);
local v3 = require(l_script_FirstAncestor_0.Src.Testing.Mocks.MakeMockStatus);
local v4 = {};
v4.__index = v4;
v4.new = function()
    local v5 = setmetatable({}, v4);
    v5.UploadProgress = v2.new();
    v5.UploadComplete = v2.new();
    v5._isAvatar = false;
    v5._isR15 = false;
    v5._isGltf = false;
    v5._didUpload = false;
    v5._didCancel = false;
    v5._statuses = {};
    v5._importTree = nil;
    v5._hasAnimation = false;
    v5._results = {};
    return v5;
end;
v4.SetFilename = function(v6, v7)
    v6._fileName = v7;
end;
v4.GetFilename = function(v8)
    return v8._fileName;
end;
v4.SetIsAvatar = function(v9, v10)
    v9._isAvatar = v10;
end;
v4.IsAvatar = function(v11)
    return v11._isAvatar;
end;
v4.SetIsGltf = function(v12, v13)
    v12._isGltf = v13;
end;
v4.IsGltf = function(v14)
    return v14._isGltf;
end;
v4.SetHasAnimation = function(v15, v16)
    v15._hasAnimation = v16;
end;
v4.HasAnimation = function(v17)
    return v17._hasAnimation;
end;
v4.IsR15 = function(v18)
    return v18._isR15;
end;
v4.SetResults = function(v19, v20)
    v19._results = v20;
end;
v4.Upload = function(v21)
    v21._didUpload = true;
    v21.UploadComplete:Fire(v21._results);
end;
v4.Cancel = function(v22)
    v22._didCancel = true;
end;
v4.AddMockStatus = function(v23, v24, v25, v26)
    v23._statuses[v25] = v3(v24, v25, {
        DebugMessage = v26
    });
end;
v4.GetStatuses = function(v27)
    return v27._statuses;
end;
v4.SetImportTree = function(v28, v29)
    v28._importTree = v29;
end;
v4.GetImportTree = function(v30)
    return v30._importTree;
end;
v4.CreatePresetFromData = function(_, v32)
    local v33 = {};
    local v34 = v32.ClassName or "";
    v33[v34] = {};
    for v35, v36 in v32, nil, nil do
        v33[v34][v35] = v36;
    end;
    return v33;
end;
v4.Reset = function(_)
end;
v4.ApplyPreset = function(_)
end;
v4.Destroy = function(v39)
    v39.UploadProgress:Destroy();
    v39.UploadComplete:Destroy();
end;
return v4;


local v0 = {};
v0.__index = v0;
v0.new = function(v1, v2)
    local v3 = setmetatable({}, v0);
    v3.lambda = v1;
    v3.removeConnection = v2;
    return v3;
end;
v0._fire = function(v4, ...)
    v4.lambda(...);
end;
v0.Disconnect = function(v5)
    v5:removeConnection();
    v5.lambda = nil;
    v5.removeConnection = nil;
end;
local v6 = {};
v6.__index = v6;
v6.new = function()
    local v7 = setmetatable({}, v6);
    v7.connections = {};
    return v7;
end;
v6.Connect = function(v8, v9)
    local v11 = v0.new(v9, function(v10)
        v8:_remove(v10);
    end);
    v8.connections[v11] = true;
    return v11;
end;
v6.Fire = function(v12, ...)
    for v13, _ in pairs(v12.connections) do
        v13:_fire(...);
    end;
end;
v6._remove = function(v15, v16)
    if v15.connections[v16] ~= nil then
        v15.connections[v16] = nil;
    end;
end;
v6.Destroy = function(v17)
    for v18, _ in pairs(v17.connections) do
        v18:Disconnect();
    end;
    v17.connections = {};
end;
return v6;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v2 = require(l_script_FirstAncestor_0.Src.Testing.Mocks.EventMock);
local v3 = require(l_script_FirstAncestor_0.Src.Testing.Mocks.MakeMockStatus);
local v4 = {};
v4.__index = v4;
v4.new = function(v5, v6)
    local v7 = setmetatable({}, v4);
    v7.Id = v5;
    v7.ImportName = "ImportMock";
    v7.ShouldImport = true;
    v7.ClassName = "BaseImportData";
    v7.Parent = nil;
    v7.Changed = v2.new();
    for v8, v9 in pairs(v6) do
        v7[v8] = v9;
    end;
    v7._propertyChangedSignal = v2.new();
    v7._statuses = {};
    v7._childLookup = {};
    v7._previewInstance = nil;
    return v7;
end;
v4.GetPropertyChangedSignal = function(v10)
    return v10._propertyChangedSignal;
end;
v4.SetClassName = function(v11, v12)
    v11.ClassName = v12;
end;
v4.AddMockStatus = function(v13, v14, v15, v16)
    v13._statuses[v15] = v3(v14, v15, {
        DebugMessage = v16
    });
end;
v4.GetStatuses = function(v17)
    return v17._statuses;
end;
v4.IsA = function(v18, v19)
    if not (v19 ~= "BaseImportData" and v19 ~= v18.ClassName) or v19 == "Instance" then
        return true;
    else
        return false;
    end;
end;
v4._addChild = function(v20, v21)
    v20._childLookup[v21] = true;
end;
v4._removeChild = function(v22, v23)
    v22._childLookup[v23] = nil;
end;
v4.GetChildren = function(v24)
    local v25 = {};
    for v26, _ in pairs(v24._childLookup) do
        table.insert(v25, v26);
    end;
    return v25;
end;
v4.SetParent = function(v28, v29)
    if v28.Parent ~= nil then
        v28.Parent:_removeChild(v28);
    end;
    v28.Parent = v29;
    if v29 ~= nil then
        v29:_addChild(v28);
    end;
end;
v4.Destroy = function(v30)
    v30._propertyChangedSignal:Destroy();
    if v30.Parent ~= nil then
        v30.Parent:_removeChild(v30);
    end;
    for v31, _ in pairs(v30._childLookup) do
        v31:SetParent(nil);
    end;
    v30._childLookup = {};
    v30.Parent = nil;
    if v30._previewInstance then
        v30._previewInstance:Destroy();
        v30._previewInstance = nil;
    end;
end;
v4.AddPreviewInstance = function(v33, v34)
    v33._previewInstance = v34;
end;
v4.GetPreview = function(v35)
    return v35._previewInstance;
end;
v4.GetDescendants = function(v36)
    local v37 = {};
    for v38, _ in pairs(v36._childLookup) do
        table.insert(v37, v38);
        if v38:IsA("BaseImportData") then
            for _, v41 in ipairs((v38:GetDescendants())) do
                table.insert(v37, v41);
            end;
        end;
    end;
    return v37;
end;
return v4;


local v0 = {};
v0.__index = v0;
v0.new = function(v1)
    local v2 = setmetatable({}, v0);
    v2.lambda = v1;
    return v2;
end;
v0.getText = function(v3, v4, v5, v6)
    return v3.lambda(v4, v5, v6);
end;
v0.Destroy = function(v7)
    v7.lambda = nil;
end;
return v0;


local _ = require(script:FindFirstAncestor("AssetImporter").Src.Types);
return function(v1, v2, v3)
    return {
        Level = v1,
        Type = v2,
        Context = v3
    };
end;


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


local v0 = require(script:FindFirstAncestor("AssetImporter").Src.Utility.DebugFlags);
local v1 = v0.RunningUnderCLI() or v0.RunTests();
local v2 = {};
if v1 then
    v2.PickFileWithPrompt = function()
        return "File/Picked/From/Prompt";
    end;
    return v2;
else
    local l_AssetImportService_0 = game:GetService("AssetImportService");
    v2.PickFileWithPrompt = function()
        return l_AssetImportService_0:PickFileWithPrompt();
    end;
    return v2;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local v1 = require(l_script_FirstAncestor_0.Src.Flags.getFFlagAssetImportUseServiceInterfaces2);
local v2 = require(l_script_FirstAncestor_0.Src.Utility.DebugFlags);
local v3 = v2.RunningUnderCLI() or v2.RunTests();
return function()
    return v1() or v3;
end;


local l_script_FirstAncestorWhichIsA_0 = script:FindFirstAncestorWhichIsA("Plugin");
local l_status_0, _ = pcall(function()
    return l_script_FirstAncestorWhichIsA_0:GetPluginComponent("FTFUtil");
end);
return function()
    return l_status_0;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local l_Actions_0 = l_script_FirstAncestor_0.Src.Actions;
local v2 = require(l_Actions_0.ResetState);
local v3 = require(l_Actions_0.SetShowPreview);
local v4 = require(l_script_FirstAncestor_0.Src.Thunks.UpdateSessionInfo);
return function()
    return function(v5)
        v5:dispatch(v4(v5:getState().Preview.activeQueueItem));
        v5:dispatch(v3(false));
        v5:dispatch(v2());
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local v1 = require(l_script_FirstAncestor_0.Src.Thunks.UpdateSessionInfo);
local v2 = require(l_script_FirstAncestor_0.Src.DataTypes.QueuedSession);
return function(v3, v4)
    return function(v5)
        local v6 = if v4 ~= nil then v4:GetImportTree() else nil;
        v5:dispatch(v1((v2.new({
            assetName = if not v6 then v3 else v6.ImportName,
            enabled = v6 ~= nil,
            filepath = v3,
            session = v4,
            timestamp = os.time(),
            validSession = v6 ~= nil
        }))));
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local l_InsertService_0 = game:GetService("InsertService");
local l_Selection_0 = game:GetService("Selection");
local l_ChangeHistoryService_0 = game:GetService("ChangeHistoryService");
local v4 = require(l_script_FirstAncestor_0.Src.Utility.getWorkspaceInsertPosition);
local v5 = require(l_script_FirstAncestor_0.Src.Flags.getFFlagZoomToExtentsApi);
local v6 = require(l_script_FirstAncestor_0.Src.Flags.getFFlagCinFixUploadResults);
local function _(v7, v8)
    local l_ViewportSize_0 = v8.ViewportSize;
    return (v7.Magnitude / 2) / math.sin((math.atan(math.tan((math.rad(v8.FieldOfView / 2))) * math.min(1, l_ViewportSize_0.X / l_ViewportSize_0.Y))));
end;
local function v17(v11, v12)
    local v13 = if not v12:IsA("Model") then v12.CFrame else v12:GetModelCFrame();
    local v14 = if not v12:IsA("Model") then v12.Size else v12:GetExtentsSize();
    if not v5() then
        v11.CameraType = Enum.CameraType.Fixed;
        local l_ViewportSize_1 = v11.ViewportSize;
        local v16 = (v14.Magnitude / 2) / math.sin((math.atan(math.tan((math.rad(v11.FieldOfView / 2))) * math.min(1, l_ViewportSize_1.X / l_ViewportSize_1.Y))));
        l_ViewportSize_1 = v11.CFrame;
        v11.CFrame = ((l_ViewportSize_1 - l_ViewportSize_1.p) + v13.p) - l_ViewportSize_1.LookVector * v16;
        v11.Focus = v13;
        return ;
    else
        v11:zoomToExtents(v13, v14);
        return ;
    end;
end;
local function v25(v18, v19)
    if v19.InsertInWorkspace then
        local l_Instance_0 = v18.Instance;
        if not ((not v19.AddModelToInventory or not v19.ShouldImport) or not v19.ImportAsPackage) then
            local v21 = "rbxassetid://%d";
            local l_status_0, l_result_0 = pcall(l_InsertService_0.LoadPackageAssetAsync, l_InsertService_0, if not v6() then v21:format(v18.AssetIds[v19.Id]) else v21:format(v18.AssetIds[tostring(v19.Id)]));
            if l_status_0 then
                l_Instance_0 = l_result_0[1];
            else
                error("Error trying to insert asset from import");
                return ;
            end;
        end;
        if l_Instance_0 == nil then
            return ;
        else
            l_InsertService_0:Insert(l_Instance_0);
            if not v19.InsertWithScenePosition then
                local v24 = v4();
                if not l_Instance_0:IsA("Model") then
                    if l_Instance_0:IsA("MeshPart") then
                        l_Instance_0.Position = v24;
                    end;
                else
                    l_Instance_0:MoveTo(v24);
                end;
            end;
            l_Selection_0:Set({
                l_Instance_0
            });
            l_ChangeHistoryService_0:SetWaypoint("Insert imported asset");
            v17(game.Workspace.CurrentCamera, l_Instance_0);
            return ;
        end;
    else
        return ;
    end;
end;
return function(v26, v27)
    return function()
        v25(v26, v27);
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local v1 = require(l_script_FirstAncestor_0.Src.Networking.Requests.ApiFetchGroupsHavePermission);
local v2 = require(l_script_FirstAncestor_0.Src.Actions.SetManagedGroups);
return function()
    return function(v3)
        v1():andThen(function(v4)
            v3:dispatch(v2(v4.groups));
        end, function(_)
            error("Failed to fetch groups with edit permission");
        end);
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local v1 = require(l_script_FirstAncestor_0.Src.Utility.GetErrorChecked);
local v2 = require(l_script_FirstAncestor_0.Src.Actions.SetErrorNodeChecked);
local v3 = require(l_script_FirstAncestor_0.Src.Actions.SetTreeChecked);
local v4 = require(l_script_FirstAncestor_0.Src.Thunks.UpdatePreviewInstance);
local v5 = require(l_script_FirstAncestor_0.Src.Testing.UseServiceInterfaces);
local v6 = nil;
local v7 = nil;
if not v5() then
    v7 = game:GetService("AssetImportService");
else
    v6 = require(l_script_FirstAncestor_0.Src.Testing.ServiceInterfaces);
end;
return function(v8, v9)
    return function(v10)
        local v11 = nil;
        v11 = if not v5() then v7:PickFileWithPrompt() else v6.PickFileWithPrompt();
        local v12 = v10:getState();
        if v11 and v11 ~= "" then
            v8[v9] = v11;
            v10:dispatch(v2((v1(v12.Preview.importTree))));
            v10:dispatch(v3({
                [v8] = v8.ShouldImport
            }));
            v10:dispatch(v4(v8:GetPreview()));
        end;
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local l_Actions_0 = l_script_FirstAncestor_0.Src.Actions;
local v2 = require(l_Actions_0.SetActiveQueueItem);
local v3 = require(l_Actions_0.SetAssetImportSession);
local v4 = require(l_Actions_0.SetImportTree);
local v5 = require(l_Actions_0.SetFilename);
local v6 = require(l_Actions_0.SetSelectedImportItem);
local v7 = require(l_Actions_0.SetShowPreview);
local v8 = require(l_script_FirstAncestor_0.Src.Thunks.UpdatePreviewInstance);
local v9 = require(l_script_FirstAncestor_0.Src.Thunks.UpdateChecked);
local v10 = require(l_script_FirstAncestor_0.Src.Flags.getFFlagAssetImportEnableMultipleFiles);
return function(v11, v12)
    return function(v13)
        local v14 = nil;
        local v15 = nil;
        if v10() then
            v13:dispatch(v2(v11));
        end;
        local v16 = if not v10() then v11 else v11.session;
        if v16 then
            v14 = v16:GetImportTree();
            v15 = v16:GetFilename();
        end;
        if not (not v14 or not v15) then
            local l_v14_Preview_0 = v14:GetPreview();
            local v18 = {};
            for _, v20 in v14:GetDescendants() do
                v18[v20] = v20.ShouldImport;
            end;
            v18[v14] = true;
            v13:dispatch(v8(l_v14_Preview_0));
            v13:dispatch(v4(v14));
            v13:dispatch(v5(v15));
            v13:dispatch(v6(v14));
            v13:dispatch(v9(v18));
        end;
        v13:dispatch(v3(v16));
        local v21 = false;
        if v14 ~= nil then
            v21 = v15 ~= nil;
        end;
        local v22 = v16 == nil;
        if v12 then
            v12(v21, v22);
        end;
        v13:dispatch(v7(v21 and not v22));
    end;
end;


local l_AssetImportService_0 = game:GetService("AssetImportService");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local l_Actions_0 = l_script_FirstAncestor_0.Src.Actions;
local v3 = require(l_Actions_0.ResetState);
local v4 = require(l_Actions_0.SetAssetImportSession);
local v5 = require(l_Actions_0.SetFilename);
local v6 = require(l_Actions_0.SetImportTree);
local v7 = require(l_Actions_0.SetSelectedImportItem);
local l_Thunks_0 = l_script_FirstAncestor_0.Src.Thunks;
local v9 = require(l_Thunks_0.CreateQueuedSession);
local v10 = require(l_Thunks_0.LoadManagedGroups);
local v11 = require(l_Thunks_0.UpdateChecked);
local v12 = require(l_Thunks_0.UpdatePreviewInstance);
local v13 = require(l_script_FirstAncestor_0.Src.Flags.getFFlagAssetImportEnableMultipleFiles);
local v14 = require(l_script_FirstAncestor_0.Src.Flags.getFFlagAssetImportUseUploadId);
return function(v15)
    return function(v16)
        if not v13() then
            local v17 = nil;
            local v18 = nil;
            local v19 = nil;
            v17 = l_AssetImportService_0:StartSessionWithPrompt();
            if v17 then
                v18 = v17:GetImportTree();
                v19 = v17:GetFilename();
            end;
            if not (not v18 or not v19) then
                local l_v18_Preview_0 = v18:GetPreview();
                local v21 = {};
                for _, v23 in v18:GetDescendants() do
                    v21[v23] = v23.ShouldImport;
                end;
                v21[v18] = true;
                v16:dispatch(v3());
                v16:dispatch(v12(l_v18_Preview_0));
                v16:dispatch(v6(v18));
                v16:dispatch(v5(v19));
                v16:dispatch(v7(v18));
                v16:dispatch(v11(v21));
                if v14() then
                    v16:dispatch(v10());
                end;
            end;
            v16:dispatch(v4(v17));
            if v15 then
                local v24 = false;
                if v18 ~= nil then
                    v24 = v19 ~= nil;
                end;
                v15(v24, v17 == nil);
            end;
        else
            local v25 = l_AssetImportService_0:PickMultipleFilesWithPrompt();
            for _, v27 in v25, nil, nil do
                v16:dispatch(v9(v27, (l_AssetImportService_0:StartSessionWithPath(v27))));
            end;
            if v15 then
                v15(v25);
                return ;
            end;
        end;
    end;
end;


local l_AssetImportService_0 = game:GetService("AssetImportService");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local l_Actions_0 = l_script_FirstAncestor_0.Src.Actions;
local v3 = require(l_Actions_0.UpdateQueueItem);
local v4 = require(l_Actions_0.RemoveQueueItem);
local v5 = require(l_script_FirstAncestor_0.Src.DataTypes.QueuedSession);
local v6 = require(l_script_FirstAncestor_0.Src.Thunks.CreateQueuedSession);
local function _(v7, v8)
    return v7:getState().Sessions.sessionQueue[v8];
end;
return function(v10, v11)
    return function(v12)
        local v13 = l_AssetImportService_0:PickMultipleFilesWithPrompt()[1];
        if not (v13 ~= nil and v13 ~= "") or v13 == v10 then
            return ;
        else
            local v14 = v12:getState().Sessions.sessionQueue[v10];
            v12:dispatch(v4(v10));
            v12:dispatch(v6(v13, (l_AssetImportService_0:StartSessionWithPath(v13))));
            v12:dispatch(v3((v5.update(v12:getState().Sessions.sessionQueue[v13], {
                timestamp = v14.timestamp
            }))));
            v11(v13, v14);
            return ;
        end;
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local v1 = require(l_script_FirstAncestor_0.Src.Utility.GetErrorChecked);
local v2 = require(l_script_FirstAncestor_0.Src.Utility.GetCheckedCount);
local v3 = require(l_script_FirstAncestor_0.Src.Actions.SetCheckedCount);
local v4 = require(l_script_FirstAncestor_0.Src.Actions.SetTreeChecked);
local v5 = require(l_script_FirstAncestor_0.Src.Actions.SetErrorNodeChecked);
return function(v6)
    return function(v7)
        v7:dispatch(v4(v6));
        local l_importTree_0 = v7:getState().Preview.importTree;
        local v9 = v2(l_importTree_0);
        v7:dispatch(v5((v1(l_importTree_0))));
        v7:dispatch(v3(v9));
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local v1 = require(l_script_FirstAncestor_0.Src.Actions.SetPreviewInstance);
local v2 = require(l_script_FirstAncestor_0.Src.Flags.getFFlagAssetImportCleanUpPreviewInstance);
local function v6(v3)
    for _, v5 in (v3:GetDescendants()), nil, nil do
        if v5:IsA("KeyframeSequence") then
            v5:Destroy();
        end;
    end;
end;
return function(v7)
    return function(v8)
        if not v7 then
            v8:dispatch(v1(nil));
            return ;
        else
            local v9 = v7:Clone();
            if v9:IsA("KeyframeSequence") then
                local l_Preview_0 = v8:getState().Preview.assetImportSession:GetImportTree():GetPreview();
                if v2() then
                    v6(l_Preview_0);
                end;
                local l_WorldModel_0 = Instance.new("WorldModel");
                v9.Parent = l_Preview_0;
                l_Preview_0.Parent = l_WorldModel_0;
                v9 = l_WorldModel_0;
            end;
            v8:dispatch(v1(v9));
            return ;
        end;
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local v1 = require(l_script_FirstAncestor_0.Src.Actions.UpdateQueueItem);
local v2 = require(l_script_FirstAncestor_0.Src.DataTypes.QueuedSession);
local v3 = require(l_script_FirstAncestor_0.Src.Utility.Status.countStatusLevelsForTree);
return function(v4)
    return function(v5)
        if v4 and v4.session then
            local l_ImportTree_0 = v4.session:GetImportTree();
            if l_ImportTree_0 == nil then
                v5:dispatch(v1((v2.update(v4, {
                    validSession = false
                }))));
                return ;
            else
                local v7 = nil;
                local v8 = nil;
                if l_ImportTree_0 then
                    local v9 = v3(l_ImportTree_0);
                    v7 = v9[l_ImportTree_0].errors + v9[l_ImportTree_0].descErrors;
                    v8 = v9[l_ImportTree_0].warnings + v9[l_ImportTree_0].descWarnings;
                end;
                v5:dispatch(v1((v2.update(v4, {
                    errors = v7,
                    warnings = v8
                }))));
                return ;
            end;
        else
            return ;
        end;
    end;
end;


return function()
    if not require(script.Parent.Parent.Parent.Src.Utility.DebugFlags).RunningUnderCLI() then
        return true;
    else
        return false;
    end;
end;


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


local l_assign_0 = require(script:FindFirstAncestor("AssetImporter").Packages.Framework).Dash.assign;
local function v2(v1)
    if not (v1 ~= Enum.NormalId.Top) or v1 == Enum.NormalId.Bottom then
        return {
            Top = true,
            Bottom = true
        };
    elseif not (v1 ~= Enum.NormalId.Right) or v1 == Enum.NormalId.Left then
        return {
            Right = true,
            Left = true
        };
    else
        return {
            Front = true,
            Back = true
        };
    end;
end;
local function v7(v3)
    local v4 = {};
    for _, v6 in pairs(v3) do
        l_assign_0(v4, (v2(v6)));
    end;
    return v4;
end;
local v10 = {
    WorldForward = v7,
    WorldUp = v7,
    RigType = function(_, v9)
        if v9:IsAvatar() then
            return {};
        else
            return {
                R15 = true
            };
        end;
    end
};
return function(v11, v12, v13)
    if not v10[v11] then
        return nil;
    else
        return v10[v11](v12, v13);
    end;
end;


return function(v0)
    local v1 = not v0.ShouldImport and 0 or 1;
    for _, v3 in pairs(v0:GetDescendants()) do
        if v3.ShouldImport then
            v1 = v1 + 1;
        end;
    end;
    return v1;
end;


local l_Types_0 = script:FindFirstAncestor("AssetImporter").Src.Components.Properties.Types;
local v1 = {
    boolean = require(l_Types_0.BooleanProperty),
    userdata = require(l_Types_0.EnumProperty),
    number = require(l_Types_0.NumberProperty),
    string = require(l_Types_0.StringProperty),
    vector = require(l_Types_0.VectorProperty)
};
return function(v2)
    local v3 = v1[type(v2)];
    assert(v3, table.concat({
        "Unsupported property type",
        (type(v2))
    }));
    return v3;
end;


local _ = function(v0)
    for _, v2 in (v0:GetStatuses()), nil, nil do
        if not (not (v2.Level == "Error") or not v0.ShouldImport) then
            return true;
        end;
    end;
    return false;
end;
return function(v4)
    local v5;
    for _, v7 in (v4:GetStatuses()), nil, nil do
        if not (not (v7.Level == "Error") or not v4.ShouldImport) then
            v5 = true;
            goto label0 --[[  true, false  ]];
        end;
    end;
    v5 = false;
    ::label0::;
    if not v5 then
        for _, v9 in pairs(v4:GetDescendants()) do
            local v10;
            for _, v12 in (v9:GetStatuses()), nil, nil do
                if not (not (v12.Level == "Error") or not v9.ShouldImport) then
                    v10 = true;
                    goto label1 --[[  true, false  ]];
                end;
            end;
            v10 = false;
            ::label1::;
            if v10 then
                return true;
            end;
        end;
        return false;
    else
        return true;
    end;
end;


return function(v0, v1, v2, v3)
    local v4 = v0:getText(v1, v2, v3);
    if v4:sub(-#v2) == v2 then
        return nil;
    else
        return v4;
    end;
end;


return {
    {
        Section = "ObjectGeneral",
        Properties = {
            {
                Name = "ImportName",
                Editable = true
            }
        }
    }
};


return {
    {
        Section = "ObjectGeneral",
        Properties = {
            {
                Name = "ImportName",
                Editable = true
            },
            {
                Name = "Anchored",
                Editable = true
            }
        }
    }
};


local v0 = require(script:FindFirstAncestor("AssetImporter").Src.Components.Properties.Types.PathProperty);
local function v2(v1)
    return not v1.IsPbr;
end;
return {
    {
        Section = "ObjectGeneral",
        Properties = {
            {
                Name = "ImportName",
                Editable = true
            },
            {
                Name = "DiffuseFilePath",
                Editable = false,
                AllowPickFile = true,
                ComponentFactory = v0
            },
            {
                Name = "NormalFilePath",
                Editable = false,
                AllowPickFile = true,
                ComponentFactory = v0,
                ShouldHide = v2
            },
            {
                Name = "MetalnessFilePath",
                Editable = false,
                AllowPickFile = true,
                ComponentFactory = v0,
                ShouldHide = v2
            },
            {
                Name = "RoughnessFilePath",
                Editable = false,
                AllowPickFile = true,
                ComponentFactory = v0,
                ShouldHide = v2
            }
        }
    }
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local v1 = require(l_script_FirstAncestor_0.Src.Utility.DebugFlags);
local v2 = require(l_script_FirstAncestor_0.Src.Components.Properties.Types.AssetIdProperty);
local v3 = require(l_script_FirstAncestor_0.Src.Components.Properties.Types.AnimationListProperty);
local v4 = require(l_script_FirstAncestor_0.Src.Components.Properties.Types.UploadDestinationProperty);
local v5 = require(l_script_FirstAncestor_0.Src.Flags.getFFlagShowOffCenterOriginImporter);
local v6 = require(l_script_FirstAncestor_0.Src.Flags.getFFlagChooseAnimationForRestPose);
local v7 = require(l_script_FirstAncestor_0.Src.Flags.getFFlagHideAnimationSettingForGltf);
local v8 = require(l_script_FirstAncestor_0.Src.Flags.getFFlagImporterOpensAvatarPreviewerBetaCheck);
local v9 = require(l_script_FirstAncestor_0.Src.Flags.getFFlagAssetImportUseUploadId);
local v10 = require(l_script_FirstAncestor_0.Src.Flags.getFFlagKeepZeroInfluenceBones);
local function v13(_, v12)
    if not v7() or not v12:IsGltf() then
        if v6() then
            return not v12:HasAnimation();
        else
            return true;
        end;
    else
        return true;
    end;
end;
local function v16(_, v15)
    if not v7() or not v15:IsGltf() then
        if v6() then
            return not v15:HasAnimation() or not v15:usesCustomRestPoseLua();
        else
            return true;
        end;
    else
        return true;
    end;
end;
local function v19(_, v18)
    return not v18:IsR15();
end;
local function v22(_, v21)
    return not v8() or not v21:IsR15();
end;
local function v24(v23)
    return not v23.InsertInWorkspace;
end;
local function v26(v25)
    return not (v25.AddModelToInventory and v25.ImportAsPackage);
end;
local function v28(v27)
    return not v27.AddModelToInventory;
end;
local function _()
    return v8() and not v1.RunningUnderCLI();
end;
local function v31(v30)
    return (v8() and not v1.RunningUnderCLI()) and v30:IsR15();
end;
return {
    {
        Section = "FileGeneral",
        Properties = {
            {
                Name = "ImportName",
                Editable = true
            },
            {
                Name = "ImportAsModelAsset",
                Editable = true
            },
            {
                Name = "AddModelToInventory",
                Editable = true
            },
            {
                Name = "ImportAsPackage",
                Editable = true,
                ShouldHide = v28
            },
            {
                Name = "ExistingPackageId",
                Editable = true,
                ComponentFactory = v2,
                ShouldHide = v26
            },
            {
                Name = "PreferredUploadId",
                Editable = true,
                ComponentFactory = v4,
                ShouldHide = function()
                    return not v9();
                end
            },
            {
                Name = "InsertInWorkspace",
                Editable = true
            },
            {
                Name = "InsertWithScenePosition",
                Editable = true,
                ShouldHide = v24
            },
            {
                Name = "UseSceneOriginAsCFrame",
                Editable = true,
                ShouldHide = function(_)
                    return not v5();
                end
            },
            {
                Name = "KeepZeroInfluenceBones",
                Editable = true,
                ShouldHide = function()
                    return not v10();
                end
            },
            {
                Name = "UseSceneOriginAsPivot",
                Editable = true
            },
            {
                Name = "Anchored",
                Editable = true
            },
            {
                Name = "UsesCages",
                Editable = true
            }
        }
    },
    {
        Section = "RigGeneral",
        Properties = {
            {
                Name = "RigType",
                Editable = true
            },
            {
                Name = "ValidateUgcBody",
                Editable = true,
                ShouldHide = v22,
                Callouts = {
                    {
                        Name = "OpenAvatarPreviewCallout",
                        ShouldShow = v31
                    }
                }
            },
            {
                Name = "RigScale",
                Editable = true,
                ShouldHide = v19
            }
        },
        Callouts = {
            {
                Name = "OpenAvatarPreviewCallout",
                ShouldShow = v31
            }
        }
    },
    {
        Section = "AnimationGeneral",
        Properties = {
            {
                Name = "RestPose",
                Editable = true,
                ShouldHide = v13
            },
            {
                Name = "AnimationIdForRestPose",
                Editable = true,
                ComponentFactory = v3,
                ShouldHide = v16
            }
        }
    },
    {
        Section = "FileTransform",
        Properties = {
            {
                Name = "WorldForward",
                Editable = true,
                Dependencies = {
                    "WorldUp"
                }
            },
            {
                Name = "WorldUp",
                Editable = true,
                Dependencies = {
                    "WorldForward"
                }
            }
        }
    },
    {
        Section = "FileGeometry",
        Properties = {
            {
                Name = "ScaleUnit",
                Editable = true
            },
            {
                Name = "FileDimensions",
                Editable = false,
                Dependencies = {
                    "ScaleUnit"
                }
            },
            {
                Name = "PolygonCount",
                Editable = false
            },
            {
                Name = "MergeMeshes",
                Editable = true,
                ShouldHide = function(v33)
                    return v33.AddModelToInventory and v33.ImportAsPackage;
                end
            },
            {
                Name = "InvertNegativeFaces",
                Editable = true
            }
        }
    }
};


return (require(script:FindFirstAncestor("AssetImporter").Packages.Framework).Util.strict({
    GroupProps = require(script.GroupProps),
    MeshProps = require(script.MeshProps),
    RootProps = require(script.RootProps),
    MaterialProps = require(script.MaterialProps),
    JointProps = require(script.JointProps),
    BaseProps = require(script.BaseProps)
}));


local _ = require(script:FindFirstAncestor("AssetImporter").Src.Types);
return function(v1)
    for _, v3 in v1, nil, nil do
        if v3.Level == "Error" then
            return v3;
        end;
    end;
    return v1[1];
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v2 = require(l_script_FirstAncestor_0.Src.Utility.GetLocalizedString);
local v3 = {
    FacsIncompletePosesWarning = "FacsIncompletePosesWarning1",
    FacsNearNeutralWarning = "FacsNearNeutralWarning1",
    FacsNoJointsError = "FacsNoJointsError1",
    FacsMultipleRootFaceJointsError = "FacsMultipleRootFaceJointsError1",
    FacsNoRootFaceJointError = "FacsNoRootFaceJointError1",
    FacsMissingKeyFrameError = "FacsMissingKeyFrameError2",
    FacsMissingBaseError = "FacsMissingBaseError2",
    FacsMissingSupportCorrectiveWarning = "FacsMissingSupportCorrectiveWarning2",
    FacsNoAttributesError = "FacsNoAttributesError1",
    FacsHasFramesNoRootFaceJointError = "FacsHasFramesNoRootFaceJointError1",
    FacsRootFaceJointExtraCharsError = "FacsRootFaceJointExtraCharsError1",
    FacsDupeControlError = "FacsDupeControlError3",
    FacsEmptyAttributeWarning = "FacsEmptyAttributeWarning1",
    FacsUnparseableFrameNumberError = "FacsUnparseableFrameNumberError1",
    FacsFrameAttrNotStringError = "FacsFrameAttrNotStringError1",
    FacsCorrectiveDupeError = "FacsCorrectiveDupeError3",
    FacsInvalidCorrectiveError = "FacsInvalidCorrectiveError2",
    FacsUnrecognizedFacsError = "FacsUnrecognizedFACSError2",
    FacsMax3CorrectivesError = "FacsMax3CorrectivesError3",
    FacsFrameExtraCharsWarning = "FacsFrameExtraCharsWarning1",
    NoRefMeshForCageWithSuggestionWarning = "NoRefMeshForCageWithSuggestionWarning1",
    CageNameHasTypoWarning = "CageNameHasTypoWarning1"
};
return function(v4, v5, v6, v7)
    return v2(v4, "Statuses", v3[v5] or v5, v7) or v4:getText("Statuses", string.format("Default%s1", v6), {
        type = v5
    });
end;


local v0 = require(script:FindFirstAncestor("AssetImporter").Src.Resources.StatusPropertyMap);
return function(v1, v2)
    if not v0[v2] then
        return false;
    else
        return v0[v2][v1] ~= nil;
    end;
end;


local v0 = require(script:FindFirstAncestor("AssetImporter").Src.Utility.Status.getStatusLevelCounts);
return function(v1)
    local v2 = {};
    local function v3(v4, v5)
        local v6 = 0;
        local v7 = 0;
        for _, v9 in v4:GetChildren() do
            v3(v9, v5);
            local v10 = v5[v9];
            v6 = v6 + (v10.errors + v10.descErrors);
            v7 = v7 + (v10.warnings + v10.descWarnings);
        end;
        local v11 = v0((v4:GetStatuses()));
        v5[v4] = {
            errors = v11.errors,
            warnings = v11.warnings,
            descErrors = v6,
            descWarnings = v7
        };
    end;
    v3(v1, v2);
    return v2;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v2 = require(l_script_FirstAncestor_0.Src.Utility.Status.StatusIsRelevant);
return function(v3, v4)
    local v5 = {};
    for v6, v7 in v4, nil, nil do
        if v2(v6, v3) then
            table.insert(v5, v7);
        end;
    end;
    return v5;
end;


local _ = require(script:FindFirstAncestor("AssetImporter").Src.Types);
return function(v1)
    local v2 = 0;
    local v3 = 0;
    for _, v5 in v1, nil, nil do
        if v5.Level == "Warning" then
            v3 = v3 + 1;
        elseif v5.Level == "Error" then
            v2 = v2 + 1;
        end;
    end;
    return {
        errors = v2,
        warnings = v3
    };
end;


local v0 = Vector3.new(2, 0.1, 0.1);
local v1 = Color3.new(1, 0, 0);
local v2 = Color3.new(0, 1, 0);
local v3 = Color3.new(0, 0, 1);
local function _(v4, v5)
    local l_Part_0 = Instance.new("Part");
    l_Part_0.Shape = Enum.PartType.Cylinder;
    l_Part_0.TopSurface = Enum.SurfaceType.Smooth;
    l_Part_0.BottomSurface = Enum.SurfaceType.Smooth;
    l_Part_0.Parent = v4;
    l_Part_0.Size = v0;
    l_Part_0.Color = v5;
    return l_Part_0;
end;
return function()
    local l_Model_0 = Instance.new("Model");
    local l_v1_0 = v1;
    local l_Part_1 = Instance.new("Part");
    l_Part_1.Shape = Enum.PartType.Cylinder;
    l_Part_1.TopSurface = Enum.SurfaceType.Smooth;
    l_Part_1.BottomSurface = Enum.SurfaceType.Smooth;
    l_Part_1.Parent = l_Model_0;
    l_Part_1.Size = v0;
    l_Part_1.Color = l_v1_0;
    l_Part_1.CFrame = CFrame.new(v0.X / 2, 0, 0);
    l_Part_1 = v2;
    local l_Part_2 = Instance.new("Part");
    l_Part_2.Shape = Enum.PartType.Cylinder;
    l_Part_2.TopSurface = Enum.SurfaceType.Smooth;
    l_Part_2.BottomSurface = Enum.SurfaceType.Smooth;
    l_Part_2.Parent = l_Model_0;
    l_Part_2.Size = v0;
    l_Part_2.Color = l_Part_1;
    l_Part_2.CFrame = CFrame.new(0, v0.X / 2, 0) * CFrame.Angles(0, 0, 1.5707963267948966);
    l_Part_2 = v3;
    local l_Part_3 = Instance.new("Part");
    l_Part_3.Shape = Enum.PartType.Cylinder;
    l_Part_3.TopSurface = Enum.SurfaceType.Smooth;
    l_Part_3.BottomSurface = Enum.SurfaceType.Smooth;
    l_Part_3.Parent = l_Model_0;
    l_Part_3.Size = v0;
    l_Part_3.Color = l_Part_2;
    l_Part_3.CFrame = CFrame.new(0, 0, v0.X / 2) * CFrame.Angles(0, 1.5707963267948966, 0);
    l_Part_2 = Instance.new("Part");
    l_Part_2.Size = Vector3.new(4, 4, 4);
    l_Part_2.Transparency = 1;
    l_Part_2.Parent = l_Model_0;
    return l_Model_0;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local v1 = require(l_script_FirstAncestor_0.Packages.Roact);
local v2 = require(l_script_FirstAncestor_0.Src.Components.Dialogs.TeachingCallout);
return function(v3, v4, v5)
    local v6 = {};
    for _, v8 in v3, nil, nil do
        if v8.ShouldShow(v5) then
            v6[v8.Name] = v1.createElement(v2, {
                DefinitionId = v8.Name,
                LocationId = v4
            });
        end;
    end;
    return v6;
end;


return function(v0)
    local v1 = {};
    for _, v3 in v0:GetDescendants() do
        if v3:IsA("AnimationImportData") then
            table.insert(v1, v3);
        end;
    end;
    return v1;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AssetImporter");
local v1 = require(l_script_FirstAncestor_0.Src.Utility.getInsertContext);
local v2 = require(l_script_FirstAncestor_0.Src.Utility.getAssetRenderModel);
return function(v3, v4, v5, v6)
    local v7 = {
        model = nil,
        initDist = 0,
        insertContextOffset = Vector3.new(),
        workspacePreview = nil,
        model = v2(v3)
    };
    v7.initDist = v7.model:GetExtentsSize().Magnitude;
    if not ((not v6 or not v4.InsertInWorkspace) or not v5) then
        local v8, v9 = v1(v4, v7.model);
        v7.workspacePreview = v8;
        v7.insertContextOffset = v9;
    end;
    return v7;
end;


return function(v0)
    if v0 == nil then
        return Instance.new("Model");
    elseif not v0:IsA("Model") then
        local l_Model_0 = Instance.new("Model");
        v0.Parent = l_Model_0;
        return l_Model_0;
    else
        return v0;
    end;
end;


local v0 = require(script:FindFirstAncestor("AssetImporter").Src.Utility.getWorkspaceInsertPosition);
local function v4(v1)
    for _, v3 in pairs(v1:GetChildren()) do
        if not (not v3:IsA("BasePart") and not v3:IsA("JointInstance")) then
            v3:Destroy();
        end;
    end;
end;
return function(v5, v6)
    local l_Position_0 = v6.WorldPivot.Position;
    local l_v6_ExtentsSize_0 = v6:GetExtentsSize();
    local v9 = math.max(l_v6_ExtentsSize_0.X, l_v6_ExtentsSize_0.Y, l_v6_ExtentsSize_0.Z);
    if not v5.InsertWithScenePosition then
        l_Position_0 = v0();
    end;
    local l_PartBoundsInRadius_0 = game.Workspace:GetPartBoundsInRadius(l_Position_0, (math.max(v9 * 3, 100)));
    local l_Model_0 = Instance.new("Model");
    for _, v13 in l_PartBoundsInRadius_0, nil, nil do
        local v14 = v13:Clone();
        v4(v14);
        v14.Parent = l_Model_0;
    end;
    local v15 = v6:Clone();
    v15.Parent = game.Workspace;
    if not v5.InsertWithScenePosition then
        v15:MoveTo(l_Position_0);
    end;
    local l_v15_BoundingBox_0 = v15:GetBoundingBox();
    v15.Parent = nil;
    l_Model_0.WorldPivot = CFrame.new();
    return l_Model_0, (CFrame.new(-l_v15_BoundingBox_0.Position));
end;


return function()
    local v0 = {};
    local v1 = {};
    for _, v3 in pairs((game:GetDescendants())) do
        if v3:IsA("Model") then
            local l_PackageLink_0 = v3:FindFirstChildWhichIsA("PackageLink");
            if l_PackageLink_0 then
                local v5 = string.sub(l_PackageLink_0.PackageId, 14);
                if not v1[v5] then
                    v1[v5] = true;
                    local v6 = {
                        AssetId = v5,
                        Name = v3.Name
                    };
                    v6.Image = string.format("rbxthumb://type=Asset&w=150&h=150&id=%s", v6.AssetId);
                    table.insert(v0, v6);
                end;
            end;
        end;
    end;
    return v0;
end;


local _ = require(script:FindFirstAncestor("AssetImporter").Src.Types);
local v1 = require(script.Parent.ImportDataProps);
local l_RootProps_0 = v1.RootProps;
local l_MeshProps_0 = v1.MeshProps;
local l_MaterialProps_0 = v1.MaterialProps;
local l_GroupProps_0 = v1.GroupProps;
local l_JointProps_0 = v1.JointProps;
local l_BaseProps_0 = v1.BaseProps;
local v8 = {
    RootImportData = l_RootProps_0,
    MeshImportData = l_MeshProps_0,
    MaterialImportData = l_MaterialProps_0,
    GroupImportData = l_GroupProps_0,
    JointImportData = l_JointProps_0,
    AnimationImportData = l_BaseProps_0,
    FacsImportData = l_BaseProps_0
};
return function(v9)
    if not v9:IsA("BaseImportData") then
        error("Unexpected instance type: ", v9.ClassName);
        return ;
    else
        local v10 = v8[v9.ClassName];
        if v10 then
            return v10;
        else
            warn("Unexpected instance type deriving from BaseImportData: ", v9.ClassName);
            return l_BaseProps_0;
        end;
    end;
end;


return function()
    local l_CurrentCamera_0 = game.Workspace.CurrentCamera;
    local l_Position_0 = l_CurrentCamera_0.CFrame.Position;
    local l_LookVector_0 = l_CurrentCamera_0.CFrame.LookVector;
    local v3 = game.Workspace:Raycast(l_Position_0, l_LookVector_0 * 2048);
    if v3 == nil then
        return l_LookVector_0 * 2048;
    else
        return v3.Position;
    end;
end;


return function(v0)
    if string.sub(v0, 1, 13) == "rbxassetid://" then
        v0 = string.sub(v0, 14);
    end;
    local v1 = tonumber(v0);
    local v2 = true;
    if v0 ~= "" then
        v2 = false;
        if v1 ~= nil then
            v2 = v1 <= 9223372036854775807;
        end;
    end;
    return v2;
end;


return function(v0, v1)
    local v2 = nil;
    local l_v0_FirstChildWhichIsA_0 = v0:FindFirstChildWhichIsA("Humanoid", true);
    if not l_v0_FirstChildWhichIsA_0 then
        local l_v0_FirstChildWhichIsA_1 = v0:FindFirstChildWhichIsA("AnimationController", true);
        if not l_v0_FirstChildWhichIsA_1 then
            l_v0_FirstChildWhichIsA_1 = Instance.new("AnimationController");
            l_v0_FirstChildWhichIsA_1.Parent = v0;
        end;
        v2 = l_v0_FirstChildWhichIsA_1;
    else
        v2 = l_v0_FirstChildWhichIsA_0;
    end;
    local l_v2_FirstChildWhichIsA_0 = v2:FindFirstChildWhichIsA("Animator", true);
    if not l_v2_FirstChildWhichIsA_0 then
        l_v2_FirstChildWhichIsA_0 = Instance.new("Animator");
        l_v2_FirstChildWhichIsA_0.Parent = v2;
    end;
    local l_v0_FirstChildWhichIsA_2 = v0:FindFirstChildWhichIsA("Animation", true);
    if not l_v0_FirstChildWhichIsA_2 then
        local v7 = game:GetService("KeyframeSequenceProvider"):RegisterKeyframeSequence(v1);
        l_v0_FirstChildWhichIsA_2 = Instance.new("Animation");
        l_v0_FirstChildWhichIsA_2.Name = v1.Name;
        l_v0_FirstChildWhichIsA_2.AnimationId = v7;
        l_v0_FirstChildWhichIsA_2.Parent = v2;
    end;
    local v8 = l_v2_FirstChildWhichIsA_0:LoadAnimation(l_v0_FirstChildWhichIsA_2);
    v8.Looped = true;
    v8:Play();
    local v10 = game:GetService("RunService").Heartbeat:Connect(function(v9)
        l_v2_FirstChildWhichIsA_0:StepAnimations(v9);
    end);
    v0.Destroying:Connect(function()
        v10:Disconnect();
    end);
end;


local l_MemStorageService_0 = game:GetService("MemStorageService");
local l_Selection_0 = game:GetService("Selection");
return function(v2, v3, v4)
    if v4:IsR15() and v3.ValidateUgcBody then
        local v5 = l_Selection_0:Get();
        if #v5 ~= 1 then
            return ;
        else
            local v6 = ("rbxassetid://%*"):format(v2.AssetIds[v3.id]);
            if v5[1] ~= v2.Instance and v5[1]:FindFirstChildWhichIsA("PackageLink").PackageId ~= v6 then
                return ;
            else
                l_MemStorageService_0:Fire("ValidateUgcBody");
                return ;
            end;
        end;
    else
        return ;
    end;
end;


require(script.Parent.defineLuaFlags);
if game:GetFastFlag("EnableAttachmentToolLuaPlugin") then
    local l_script_FirstAncestor_0 = script:FindFirstAncestor("AttachmentTool");
    local v1 = require(l_script_FirstAncestor_0.Packages.TestLoader);
    v1.launch("AttachmentTool", l_script_FirstAncestor_0.Src);
    if not v1.isCli() then
        plugin.Name = l_script_FirstAncestor_0.Name;
        local v2 = 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 v11 = {
            getName = function(v5, v6, v7)
                return v5(v6, v7, "Plugin", "Button");
            end,
            getDescription = function(v8, v9, v10)
                return v8(v9, v10, "Plugin", "Description");
            end,
            icon = "rbxlocaltheme://GameSettings",
            enabled = false
        };
        local v15 = {
            plugin = plugin,
            pluginName = "AttachmentTool",
            translationResourceTable = l_LocalizedStrings_0,
            fallbackResourceTable = l_SourceStrings_0,
            getToolbarName = function(v12, v13, v14)
                return v12(v13, v14, "Plugin", "Toolbar");
            end,
            buttonInfo = v11
        };
        v11.enabled = true;
        local v16 = v2.build(v15);
        if v16.pluginLoader:waitForUserInteraction() then
            require(script.Parent.main)(plugin, v16);
            return ;
        else
            return ;
        end;
    else
        return ;
    end;
else
    return ;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AttachmentTool");
local v1 = require(l_script_FirstAncestor_0.Packages.DraggerFramework.Flags.getFFlagDraggerImprovements);
return function(v2, v3)
    local v4 = require(l_script_FirstAncestor_0.Packages.Roact);
    local l_DraggerFramework_0 = l_script_FirstAncestor_0.Packages.DraggerFramework;
    local v6 = require(l_script_FirstAncestor_0.Packages.DraggerSchemaCore.DraggerSchema);
    local v7 = require(l_DraggerFramework_0.Implementation.DraggerContext_PluginImpl);
    local v8 = require(l_script_FirstAncestor_0.Src.Components.AttachmentToolComponent);
    local v9 = nil;
    local v10 = false;
    local v11 = nil;
    local function v12()
        v10 = false;
        v3.mainButton:SetActive(false);
        if v11 then
            v4.unmount(v11);
            v11 = nil;
        end;
    end;
    local function v13()
        if not v11 then
            v10 = true;
            v2:Activate(true);
            v3.mainButton:SetActive(true);
            v11 = v4.mount(v4.createElement(v8, {
                Mouse = v2:GetMouse(),
                ClosePluginCallback = v12,
                DraggerContext = v9,
                DraggerSchema = v6,
                DraggerSettings = {
                    AnalyticsName = "AttachmentTool",
                    AllowDragSelect = true,
                    ShowLocalSpaceIndicator = true,
                    ShowPivotIndicator = true
                }
            }));
            return ;
        else
            warn("Plugin handle already exists");
            return ;
        end;
    end;
    (function()
        v9 = v7.new(v2, game, settings(), v6.Selection.new());
        v2.Deactivation:Connect(function()
            if v10 then
                v10 = false;
                v3.mainButton:SetActive(false);
                if v11 then
                    v4.unmount(v11);
                    v11 = nil;
                end;
            end;
        end);
        v3.mainButtonClickedSignal:Connect(function()
            if not v10 then
                if v1() then
                    v13();
                end;
            else
                v10 = false;
                v3.mainButton:SetActive(false);
                if v11 then
                    v4.unmount(v11);
                    v11 = nil;
                    return ;
                end;
            end;
        end);
    end)();
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AttachmentTool");
local l_ChangeHistoryService_0 = game:GetService("ChangeHistoryService");
local l_DraggerFramework_0 = l_script_FirstAncestor_0.Packages.DraggerFramework;
local v3 = require(l_script_FirstAncestor_0.Packages.Roact);
local v4 = require(l_DraggerFramework_0.Utility.SelectionWrapper);
local v5 = require(l_script_FirstAncestor_0.Src.Util.AttachmentMover);
local v6 = require(l_DraggerFramework_0.Utility.DragHelper);
local v7 = require(l_script_FirstAncestor_0.Src.Util.AttachmentToolRenderer);
local v8 = require(l_script_FirstAncestor_0.Src.Util.AttachmentToolAnimator);
local v9 = require(l_DraggerFramework_0.Flags.getFFlagDraggerSnapToPartsLua);
local v10 = {};
v10.__index = v10;
local v11 = Vector3.new();
local v12 = {
    AllowDragSelect = true,
    ShowLocalSpaceIndicator = false,
    WasAutoSelected = false,
    ShowPivotIndicator = false,
    ShowDragSelect = true
};
local v13 = {
    AnalyticsName = true
};
v10.new = function(v14, v15, v16, v17, v18, v19, v20)
    for v21, _ in pairs(v16) do
        if v12[v21] == nil and v13[v21] == nil then
            error("Unexpected AttachmentToolModel prop `" .. v21 .. "`");
        end;
    end;
    local v23 = {};
    for v24, _ in pairs(v13) do
        local v26 = v16[v24];
        if v26 == nil then
            error("Required prop `" .. v24 .. "` missing from AttachmentToolModel props");
        else
            v23[v24] = v26;
        end;
    end;
    for v27, v28 in pairs(v12) do
        if v16[v27] ~= nil then
            v23[v27] = v16[v27];
        else
            v23[v27] = v28;
        end;
    end;
    local v29 = setmetatable({
        _draggerContext = v14,
        _draggerSchema = v15,
        _modelProps = v23,
        _closePluginCallback = v17,
        _requestRenderCallback = v18,
        _markViewDirtyCallback = v19,
        _markSelectionDirtyCallback = v20,
        _selectionWrapper = nil,
        _attachmentMover = v5.new(),
        _attachment = nil,
        _tiltRotate = CFrame.new(),
        _recordingIdentifier = nil,
        _attachmentStack = {},
        _redoAttachmentStack = {}
    }, v10);
    v29._attachmentToolRenderer = v7.new(v29._draggerContext, v29._draggerSchema, v29);
    v29._attachmentToolAnimator = v8.new(v29);
    v29._undoConnection = l_ChangeHistoryService_0.OnUndo:Connect(function(v30)
        if v30 == "AttachmenToolDragging" then
            v29:_onUndo();
            return ;
        else
            if not (v29._attachment and v29._attachment.Parent) then
                v29._attachment = nil;
                v29:_updateAttachment();
                v29:_updateSelectionInfo();
            end;
            return ;
        end;
    end);
    v29._redoConnection = l_ChangeHistoryService_0.OnRedo:Connect(function(v31)
        if v31 == "AttachmenToolDragging" then
            v29:_onRedo();
            return ;
        else
            if not (v29._attachment and v29._attachment.Parent) then
                v29._attachment = nil;
                v29:_updateAttachment();
                v29:_updateSelectionInfo();
            end;
            return ;
        end;
    end);
    return v29;
end;
v10.render = function(v32)
    return v3.createElement(v3.Portal, {
        target = v32._draggerContext:getGuiParent()
    }, {
        DraggerUI = v3.createElement("Folder", {}, v32._attachmentToolRenderer:render())
    });
end;
v10.update = function(v33)
    if v33._draggerContext:isSimulating() then
        v33._markViewDirtyCallback();
    end;
end;
v10.getSelectionWrapper = function(v34)
    return v34._selectionWrapper;
end;
v10.getSchema = function(v35)
    return v35._draggerSchema;
end;
v10.doesAllowDragSelect = function(v36)
    return v36._modelProps.AllowDragSelect;
end;
v10.shouldShowDragSelect = function(v37)
    return v37._modelProps.ShowDragSelect;
end;
v10.shouldShowLocalSpaceIndicator = function(v38)
    return v38._modelProps.ShowLocalSpaceIndicator;
end;
v10.shouldShowSelectionDot = function(v39)
    return v39._modelProps.ShowSelectionDot;
end;
v10.shouldUseCollisionTransparency = function(v40)
    return v40._modelProps.UseCollisionsTransparency;
end;
v10.shouldAlignDraggedObjects = function(v41)
    return v41._draggerContext:shouldAlignDraggedObjects();
end;
v10._isDraggingAttachment = function(v42)
    return v42._attachment and v42._attachmentMover:isMovingThisAttachment(v42._attachment);
end;
v10._updateAttachment = function(v43)
    local v44 = v43._draggerContext:getMouseRay();
    local v45 = nil;
    if v43._lastDragTarget then
        v45 = v43._lastDragTarget.targetMatrix;
    end;
    local v46 = v6.getDragTarget(if not v43._attachment then {} else {
        v43._attachment
    }, CFrame.new(), v11, v11, v11, v44, if not v43._draggerContext:shouldGridSnap() then nil else v43._draggerContext:getGridSize(), v43._tiltRotate, v45, v43:shouldAlignDraggedObjects() and not v43._draggerContext:isAltKeyDown(), false, v43._draggerContext:getSoftSnapMarginFactor(), if not v9 then nil else v43._draggerContext:shouldPartSnap());
    if not (not v46 or not v46.targetPart) then
        v43._lastDragTarget = v46;
        if not v43._attachmentToolAnimator:inProgress() then
            if not v43:_isDraggingAttachment() then
                local v47 = if not v43._selectionWrapper then {} else v43._selectionWrapper:get();
                if not (v43._recordingIdentifier and l_ChangeHistoryService_0:IsRecordingInProgress(v43._recordingIdentifier)) then
                    v43._recordingIdentifier = l_ChangeHistoryService_0:TryBeginRecording("AttachmenToolDragging", "Placing Attachment");
                end;
                v43._attachment = Instance.new("Attachment", v46.targetPart);
                table.insert(v47, v43._attachment);
                if not v43._selectionWrapper then
                    local v48 = v43._draggerSchema.Selection.new();
                    v48:Set(v47);
                    v43._selectionWrapper = v4.new(v48);
                else
                    v43._selectionWrapper:set(v47);
                end;
                v43._attachment.WorldCFrame = v46.mainCFrame;
                v43._tiltRotate = CFrame.new();
                v43:_updateSelectionInfo();
                v43._attachmentMover:setDragged(v43._attachment);
            else
                v43._attachmentMover:moveTo(v46.mainCFrame, v46.targetPart);
                return ;
            end;
        end;
    end;
end;
v10._rotateAttachment = function(v49, v50)
    local v51 = nil;
    if v49._lastDragTarget then
        v51 = v49._lastDragTarget.targetMatrix;
    end;
    local v52 = v6.updateTiltRotate(v49._draggerContext:getCameraCFrame(), v49._draggerContext:getMouseRay(), if not v49._attachment then {} else {
        v49._attachment
    }, CFrame.new(), v51, v49._tiltRotate, v50, v49:shouldAlignDraggedObjects() and not v49._draggerContext:isAltKeyDown(), if not v49._draggerContext:shouldGridSnap() then nil else v49._draggerContext:getGridSize());
    if not v49._lastDragTarget then
        v49._tiltRotate = v52;
    else
        v49._attachmentToolAnimator:beginAnimation(v52);
    end;
    v49:_updateAttachment();
    v49:_scheduleRender();
end;
v10._isAttachmentInSelection = function(v53)
    if v53._attachment and v53._selectionWrapper then
        return table.find(v53._selectionWrapper:get(), v53._attachment) ~= nil;
    else
        return true;
    end;
end;
v10._closeTool = function(v54)
    v54._closePluginCallback();
end;
v10._processSelected = function(v55)
    if v55._modelProps.ShowPivotIndicator then
        v55._oldShowPivot = v55._draggerContext:setPivotIndicator(true);
    end;
    v55._draggerContext:setMouseIcon("");
    v55._boundsChangedTracker = v55._draggerSchema.BoundsChangedTracker.new(v55._draggerContext, function(_)
        v55._markSelectionDirtyCallback();
    end);
    v55._boundsChangedTracker:install();
    v55._draggerContext:getSelection():Set({});
    v55._selectionWrapper = v4.new(v55._draggerContext:getSelection());
    v55._selectionChangedConnection = v55._selectionWrapper.onSelectionExternallyChanged:Connect(function()
        v55:_processSelectionChanged();
    end);
    v55:_updateSelectionInfo();
end;
v10._onUndo = function(v57)
    v57._attachmentToolAnimator:forceFinish();
    if v57._attachmentMover:isMovingThisAttachment(v57._attachment) then
        v57._attachmentMover:commit();
    end;
    table.insert(v57._redoAttachmentStack, v57._attachment);
    local v58 = v57._selectionWrapper:get();
    v57._attachment = table.remove(v57._attachmentStack);
    if not v57._attachment then
        if not ((not (#v58 == 1) or not v58[1]:IsA("Attachment")) or not v58[1].Parent) then
            v57._attachment = v58[1];
            v57._attachmentMover:setDragged(v57._attachment);
        end;
    elseif not v57._attachment.Parent then
        v57._attachment = nil;
    else
        v57._attachmentMover:setDragged(v57._attachment);
    end;
    if #v57._attachmentStack > 0 then
        table.insert(v58, v57._attachmentStack[#v57._attachmentStack]);
        v57._selectionWrapper:set(v58);
    end;
    v57:_updateAttachment();
    v57:_updateSelectionInfo();
end;
v10._onRedo = function(v59)
    v59._attachmentToolAnimator:forceFinish();
    if v59._attachmentMover:isMovingThisAttachment(v59._attachment) then
        v59._attachmentMover:commit();
    end;
    if #v59._redoAttachmentStack == 0 then
        return ;
    else
        local v60 = v59._selectionWrapper:get();
        local v61 = table.find(v60, v59._attachmentStack[#v59._attachmentStack]);
        if v61 then
            table.remove(v60, v61);
        end;
        table.insert(v59._attachmentStack, v59._attachment);
        v59._attachment = table.remove(v59._redoAttachmentStack);
        if v59._attachment then
            if not v59._attachment.Parent then
                v59._attachment = nil;
            else
                v59._attachmentMover:setDragged(v59._attachment);
            end;
        end;
        v59:_updateAttachment();
        v59:_updateSelectionInfo();
        return ;
    end;
end;
v10._processDeselected = function(v62)
    if v62._isMouseDown then
        v62:_processMouseUp();
    end;
    if v62._modelProps.ShowPivotIndicator then
        v62._draggerContext:setPivotIndicator(v62._oldShowPivot);
    end;
    v62._selectionWrapper:destroy();
    v62._selectionWrapper = nil;
    v62._boundsChangedTracker:uninstall();
    v62._selectionChangedConnection:Disconnect();
    v62._selectionChangedConnection = nil;
    if not (not v62._attachment or not v62._attachment.Parent) then
        v62._attachment:Destroy();
    end;
    v62._attachment = nil;
    v62._redoAttachmentStack = {};
    v62._attachmentStack = {};
    v62._undoConnection:Disconnect();
    v62._undoConnection = nil;
    v62._redoConnection:Disconnect();
    v62._redoConnection = nil;
    if not (not v62._recordingIdentifier or not l_ChangeHistoryService_0:IsRecordingInProgress(v62._recordingIdentifier)) then
        l_ChangeHistoryService_0:FinishRecording(v62._recordingIdentifier, Enum.FinishRecordingOperation.Commit);
    end;
    v62._recordingIdentifier = nil;
end;
v10._processSelectionChanged = function(v63)
    v63:_updateSelectionInfo();
    if not ((not v63._selectionWrapper or v63:_isAttachmentInSelection()) or v63._isMouseDown) then
        if v63._attachment.Parent then
            local v64 = v63._selectionWrapper:get();
            table.insert(v64, v63._attachment);
            v63._selectionWrapper:set(v64);
        else
            v63:_scheduleRender();
            return ;
        end;
    end;
    v63:_scheduleRender();
end;
local v65 = table.freeze({
    [Enum.KeyCode.RightShift] = true,
    [Enum.KeyCode.LeftShift] = true,
    [Enum.KeyCode.RightControl] = true,
    [Enum.KeyCode.LeftControl] = true,
    [Enum.KeyCode.RightAlt] = true,
    [Enum.KeyCode.LeftAlt] = true
});
v10._processKeyDown = function(v66, v67)
    if v67 == Enum.KeyCode.R then
        v66:_rotateAttachment((Vector3.new(0, 1, 0)));
        return ;
    elseif v67 == Enum.KeyCode.T then
        v66:_rotateAttachment((Vector3.new(1, 0, 0)));
        return ;
    elseif v67 == Enum.KeyCode.H then
        v66._draggerContext:setSetting("HotkeyUsageHidden", not v66._draggerContext:getSetting("HotkeyUsageHidden"));
        v66:_scheduleRender();
        return ;
    else
        if v65[v67] then
            v66:_updateAttachment();
            v66:_scheduleRender();
        end;
        return ;
    end;
end;
v10._processKeyUp = function(v68, v69)
    if v69 == Enum.KeyCode.Escape then
        v68:_closeTool();
        return ;
    else
        if v65[v69] then
            v68:_updateAttachment();
            v68:_scheduleRender();
        end;
        return ;
    end;
end;
v10._processMouseDown = function(v70)
    if not v70._isMouseDown then
        v70._isMouseDown = true;
        v70._attachmentMover:commit();
        v70._selectionWrapper:set({
            v70._attachment
        });
        table.insert(v70._attachmentStack, v70._attachment);
        v70._attachment = nil;
        v70:_updateSelectionInfo();
        v70:_updateAttachment();
        v70:_updateSelectionInfo();
        return ;
    else
        return ;
    end;
end;
v10._processMouseUp = function(v71)
    v71._isMouseDown = false;
    if not (not v71._recordingIdentifier or not l_ChangeHistoryService_0:IsRecordingInProgress(v71._recordingIdentifier)) then
        l_ChangeHistoryService_0:FinishRecording(v71._recordingIdentifier, Enum.FinishRecordingOperation.Commit);
        v71._redoAttachmentStack = {};
        v71._recordingIdentifier = nil;
    end;
end;
v10._processViewChanged = function(v72)
    v72:_updateAttachment();
    v72:_scheduleRender();
end;
v10._updateSelectionInfo = function(v73, v74)
    if not v74 then
        v73._selectionInfo = v73._draggerSchema.SelectionInfo.new(v73._draggerContext, v73._selectionWrapper:get());
    else
        v73._selectionInfo = v74;
    end;
    v73._boundsChangedTracker:setSelection(v73._selectionInfo);
end;
v10._processMouseEnter = function(_)
end;
v10._processMouseLeave = function(_)
end;
v10._scheduleRender = function(v77)
    v77._requestRenderCallback();
end;
return v10;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AttachmentTool");
local l_MouseService_0 = game:GetService("MouseService");
local l_RunService_0 = game:GetService("RunService");
local l_UserInputService_0 = game:GetService("UserInputService");
local l_HttpService_0 = game:GetService("HttpService");
local l_DraggerFramework_0 = l_script_FirstAncestor_0.Packages.DraggerFramework;
local v6 = require(l_script_FirstAncestor_0.Packages.Roact);
local v7 = require(l_script_FirstAncestor_0.Src.AttachmentToolModel);
local v8 = require(l_DraggerFramework_0.Utility.ViewChangeDetector);
local v9 = v6.PureComponent:extend("AttachmentToolComponent");
v9.init = function(v10)
    v10:setup(v10.props);
end;
v9.didMount = function(_)
end;
v9.willUnmount = function(v12)
    v12:teardown();
end;
v9.willUpdate = function(v13, v14, _)
    if not (v14.DraggerContext == v13.props.DraggerContext and v14.DraggerSchema == v13.props.DraggerSchema) or v14.DraggerSettings ~= v13.props.DraggerSettings then
        v13:teardown();
        v13:setup(v14);
    end;
end;
v9.render = function(v16)
    return v16._attachmentToolModel:render();
end;
v9.setup = function(v17, v18)
    assert(v18.DraggerContext);
    assert(v18.DraggerSchema);
    assert(v18.DraggerSettings);
    assert(v18.ClosePluginCallback);
    v17._selectionBoundsAreDirty = false;
    v17._viewBoundsAreDirty = false;
    v17._bindName = "AttachmentToolViewUpdate";
    v17._bindName = v17._bindName .. l_HttpService_0:GenerateGUID(false);
    v17._attachmentToolModel = v7.new(v18.DraggerContext, v18.DraggerSchema, v18.DraggerSettings, v18.ClosePluginCallback, function()
        if v17._isMounted then
            if not v17.forceUpdate then
                v17:setState({});
            else
                v17:forceUpdate();
                return ;
            end;
        end;
    end, function()
        v17._viewBoundsAreDirty = true;
    end, function()
        v17._selectionBoundsAreDirty = true;
    end);
    v17._attachmentToolModel:_processSelected();
    local l_Mouse_0 = v18.Mouse;
    v17._inputBeganConnection = l_UserInputService_0.InputBegan:Connect(function(v20, v21)
        if not v21 then
            local l_UserInputType_0 = v20.UserInputType;
            if l_UserInputType_0 == Enum.UserInputType.Keyboard then
                v17._attachmentToolModel:_processKeyDown(v20.KeyCode);
                return ;
            else
                if not (l_UserInputType_0 ~= Enum.UserInputType.MouseButton1) or l_UserInputType_0 == Enum.UserInputType.Touch then
                    v17._attachmentToolModel:_processMouseDown();
                end;
                return ;
            end;
        else
            return ;
        end;
    end);
    v17._inputEndedConnection = l_UserInputService_0.InputEnded:Connect(function(v23, v24)
        if not v24 then
            local l_UserInputType_1 = v23.UserInputType;
            if l_UserInputType_1 == Enum.UserInputType.Keyboard then
                v17._attachmentToolModel:_processKeyUp(v23.KeyCode);
                return ;
            else
                if not (l_UserInputType_1 ~= Enum.UserInputType.MouseButton1) or l_UserInputType_1 == Enum.UserInputType.Touch then
                    v17._attachmentToolModel:_processMouseUp();
                end;
                return ;
            end;
        else
            return ;
        end;
    end);
    v17._mouseEnterConnection = l_MouseService_0.MouseEnterStudioViewport:Connect(function()
        v17._attachmentToolModel:_processMouseEnter();
    end);
    v17._mouseLeaveConnection = l_MouseService_0.MouseLeaveStudioViewport:Connect(function()
        v17._attachmentToolModel:_processMouseLeave();
    end);
    local v26 = v8.new(l_Mouse_0);
    local v27 = v18.DraggerContext:shouldUseLocalSpace();
    l_RunService_0:BindToRenderStep(v17._bindName, Enum.RenderPriority.First.Value, function()
        if v17._isMounted then
            v17._attachmentToolModel:update();
            local v28 = false;
            local v29 = false;
            if v26:poll() then
                v28 = true;
            end;
            if v17._selectionBoundsAreDirty then
                v17._selectionBoundsAreDirty = false;
                v29 = true;
            end;
            if v17._viewBoundsAreDirty then
                v17._viewBoundsAreDirty = false;
                v28 = true;
            end;
            local v30 = v18.DraggerContext:shouldUseLocalSpace();
            if v30 ~= v27 then
                v29 = true;
            end;
            if v29 then
                v17._attachmentToolModel:_processSelectionChanged();
            end;
            if v28 then
                v17._attachmentToolModel:_processViewChanged();
            end;
            v27 = v30;
            return ;
        else
            return ;
        end;
    end);
    v17._isMounted = true;
end;
v9.teardown = function(v31)
    v31._isMounted = false;
    v31._inputBeganConnection:Disconnect();
    v31._inputBeganConnection = nil;
    v31._inputEndedConnection:Disconnect();
    v31._inputEndedConnection = nil;
    v31._mouseEnterConnection:Disconnect();
    v31._mouseEnterConnection = nil;
    v31._mouseLeaveConnection:Disconnect();
    v31._mouseLeaveConnection = nil;
    l_RunService_0:UnbindFromRenderStep(v31._bindName);
    v31._attachmentToolModel:_processDeselected();
end;
return v9;


local l_RunService_0 = game:GetService("RunService");
local v1 = {};
v1.__index = v1;
v1.new = function()
    return (setmetatable({}, v1));
end;
v1._anchorIfNeedBe = function(v2, v3)
    v2._cachedAnchoredState = v3.Anchored;
    if not (not v3 or v3:IsGrounded()) then
        v3.Anchored = true;
    end;
end;
v1.setDragged = function(v4, v5)
    local v6 = l_RunService_0:IsRunning();
    v4._attachmentsAndParents = {};
    v4._attachment = v5;
    v4._parent = v5:FindFirstAncestorWhichIsA("BasePart");
    if v6 then
        v4:_anchorIfNeedBe(v4._parent);
    end;
end;
v1.moveTo = function(v7, v8, v9)
    if v7._attachment then
        if v9 ~= v7._parent then
            if l_RunService_0:IsRunning() then
                if not (not v7._parent or not v7._parent.Anchored) then
                    v7._parent.Anchored = v7._cachedAnchoredState;
                end;
                v7:_anchorIfNeedBe(v9);
            end;
            v7._attachment.Parent = v9;
            v7._parent = v9;
        end;
        v7._attachment.WorldCFrame = v8;
    end;
end;
v1.commit = function(v10)
    if not ((not l_RunService_0:IsRunning() or not v10._parent) or not v10._parent.Anchored) then
        v10._parent.Anchored = v10._cachedAnchoredState;
    end;
    v10._attachment = nil;
    v10._parent = nil;
    v10._cachedAnchoredState = false;
end;
v1.isMovingThisAttachment = function(v11, v12)
    return v11._attachment == v12;
end;
return v1;


local v0 = require(script:FindFirstAncestor("AttachmentTool").Packages.DraggerFramework.Utility.AnimationTask);
local v1 = {};
v1.__index = v1;
v1.new = function(v2)
    local v3 = setmetatable({
        _attachmentToolModel = v2
    }, v1);
    v3._animationTask = v0.new(function(v4, v5)
        v3:_animationCallback(v4, v5);
    end);
    return v3;
end;
local function _(v6)
    if v6 < 0.5 then
        return 0.5 * (v6 / 0.5) ^ 4;
    else
        return 1 - 0.5 * ((1 - v6) / 0.5) ^ 4;
    end;
end;
v1._animationCallback = function(v8, v9, v10)
    local l__lastDragTarget_0 = v8._attachmentToolModel._lastDragTarget;
    if not v10 then
        local v12 = if v9 < 0.5 then 0.5 * (v9 / 0.5) ^ 4 else 1 - 0.5 * ((1 - v9) / 0.5) ^ 4;
        local l__animateFrom_0 = v8._animateFrom;
        v8._attachmentToolModel._attachmentMover:moveTo((l__animateFrom_0.baseCFrame:Lerp(l__lastDragTarget_0.baseCFrame, v12) * l__animateFrom_0.tiltRotate:Lerp(v8._attachmentToolModel._tiltRotate, v12)) * l__animateFrom_0.offsetCFrame:Lerp(l__lastDragTarget_0.offsetCFrame, v12), l__lastDragTarget_0.targetPart);
        return ;
    else
        v8._attachmentToolModel._attachmentMover:moveTo(l__lastDragTarget_0.mainCFrame, l__lastDragTarget_0.targetPart);
        return ;
    end;
end;
v1.beginAnimation = function(v14, v15)
    local l__lastDragTarget_1 = v14._attachmentToolModel._lastDragTarget;
    v14._animateFrom = table.freeze({
        tiltRotate = v14._attachmentToolModel._tiltRotate,
        baseCFrame = l__lastDragTarget_1.baseCFrame,
        offsetCFrame = l__lastDragTarget_1.offsetCFrame
    });
    v14._attachmentToolModel._tiltRotate = v15;
    v14._animationTask:animate(0.13);
end;
v1.inProgress = function(v17)
    return v17._animationTask:inProgress();
end;
v1.forceFinish = function(v18)
    v18._animationTask:commit();
end;
return v1;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AttachmentTool");
local l_DraggerFramework_0 = l_script_FirstAncestor_0.Packages.DraggerFramework;
local v2 = require(l_script_FirstAncestor_0.Packages.Roact);
local v3 = require(l_DraggerFramework_0.Components.TargetGridView);
local v4 = require(l_DraggerFramework_0.Components.TargetSoftSnapView);
local v5 = require(l_DraggerFramework_0.Components.HotkeyUsageInfo);
local v6 = require(l_DraggerFramework_0.Utility.HotkeyHelpBuilder);
local v7 = {};
v7.__index = v7;
v7.new = function(v8, v9, v10)
    return (setmetatable({
        _draggerContext = v8,
        _draggerSchema = v9,
        _attachmentToolModel = v10,
        _mouseCursor = ""
    }, v7));
end;
v7._renderSnapTarget = function(v11, v12)
    local l__draggerContext_0 = v11._draggerContext;
    if not l__draggerContext_0:shouldShowTargetGrids() then
        return nil;
    elseif not (#v12.softSnaps > 0) then
        local v14 = if not l__draggerContext_0:shouldGridSnap() then nil else l__draggerContext_0:getGridSize();
        local _, _, v17 = v11._attachmentToolModel._selectionInfo:getLocalBoundingBox();
        return v2.createElement(v3, {
            DragTarget = v12,
            SourceSize = v17,
            Scale = l__draggerContext_0:getHandleScale(v12.targetMatrix.Position),
            GridSize = v14,
            Color = l__draggerContext_0:getGridColor(),
            PrimaryColor = l__draggerContext_0:getChosenColor()
        });
    else
        return v2.createElement(v4, {
            DragTarget = v12,
            DraggerContext = l__draggerContext_0
        });
    end;
end;
v7._renderSnap = function(v18)
    local l__lastDragTarget_0 = v18._attachmentToolModel._lastDragTarget;
    if v18._draggerContext:areConstraintsEnabled() or not l__lastDragTarget_0 then
        return nil;
    else
        return v2.createFragment({
            SnapTarget = v18:_renderSnapTarget(l__lastDragTarget_0)
        });
    end;
end;
local v20 = table.freeze({
    Hotkey = "T",
    LabelLocEntry = "DragTilt"
});
local v21 = table.freeze({
    Hotkey = "R",
    LabelLocEntry = "DragRotate"
});
local v22 = table.freeze({
    Hotkey = "\226\172\135Alt",
    LabelLocEntry = "HoldOrientation"
});
local v23 = table.freeze({
    Hotkey = "\226\172\134Alt",
    LabelLocEntry = "UnholdOrientation"
});
v7._getHotkeyList = function(v24)
    local l__draggerContext_1 = v24._draggerContext;
    local v26 = {
        v20,
        v21
    };
    if not l__draggerContext_1:isAltKeyDown() then
        table.insert(v26, v22);
    else
        table.insert(v26, v23);
    end;
    v6.addGridSnap(v26, l__draggerContext_1);
    v6.addHelp(v26);
    return v26;
end;
v7.setMouseCursor = function(v27, v28)
    if v27._mouseCursor ~= v28 then
        v27._mouseCursor = v28;
        v27._draggerContext:setMouseIcon(v28);
    end;
end;
v7.render = function(v29)
    v29:setMouseCursor("rbxasset://textures/ConstraintCursor.png");
    local v30 = v29:_renderSnap();
    local v31 = nil;
    if not v29._draggerContext:getSetting("HotkeyUsageHidden") then
        v31 = v2.createElement(v5, {
            DraggerContext = v29._draggerContext,
            HotkeyList = v29:_getHotkeyList()
        });
    end;
    return v2.createFragment({
        DraggerElements = v30,
        HotkeyUsageInfo = v31
    });
end;
return v7;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AttachmentTool");
local v1 = require(l_script_FirstAncestor_0.Packages.Rodux);
local v2 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_TestHelpers_0 = v2.TestHelpers;
local l_ContextServices_0 = v2.ContextServices;
local v5 = {
    l_ContextServices_0.Analytics.mock(),
    l_ContextServices_0.Localization.mock(),
    l_ContextServices_0.Store.new(v1.Store.new(require(l_script_FirstAncestor_0.Src.Reducers.MainReducer), nil, nil, nil)),
    v2.Style.Themes.StudioTheme.mock()
};
return function(v6)
    assert(type(v6) == "table", "Expected story to be a table");
    return l_TestHelpers_0.provideMockContext(v5, v6);
end;


if plugin then
    require(script.Parent.defineLuaFlags);
    if not game:GetFastFlag("AudioDiscoveryLoader") then
        if not game:GetFastFlag("RetireAudioDiscoveryPlugin") then
            local l_Parent_0 = script.Parent.Parent;
            local v1 = require(l_Parent_0.Packages.Framework);
            local _, l_result_0 = pcall(function()
                return game:GetService("StudioService"):HasInternalPermission();
            end);
            if not require(l_Parent_0.Src.Util.DebugFlags).RunningUnderCLI() then
                if not game:GetFastFlag("RetireAudioDiscoveryPlugin") then
                    local l_status_1, l_result_1 = pcall(function()
                        return game:GetService("RunService"):IsEdit();
                    end);
                    if l_status_1 and l_result_1 then
                        require(script.Parent.commonInit)();
                        local v6 = require(l_Parent_0.Packages.Roact);
                        local l_Networking_0 = v1.Http.Networking;
                        local v8 = require(l_Parent_0.Src.MainPlugin);
                        local v9 = require(l_Parent_0.Src.Util.SoundAssetChecker);
                        local v10 = nil;
                        local v11 = nil;
                        local v12 = nil;
                        if l_result_0 then
                            v12 = v1.DeveloperTools.forPlugin(l_Parent_0.Name, plugin);
                        end;
                        local function v13()
                            plugin.Name = l_Parent_0.Name;
                            v11 = v9.new((l_Networking_0.new({
                                isInternal = true
                            })));
                            v11:start();
                            v10 = v6.mount((v6.createElement(v8, {
                                Plugin = plugin,
                                SoundAssetChecker = v11
                            })));
                            if v12 then
                                v12:addRoactTree("Roact tree", v10);
                            end;
                        end;
                        plugin.Unloading:Connect(function()
                            if v11 then
                                v11:destroy();
                                v11 = nil;
                            end;
                            if v12 then
                                v12:destroy();
                            end;
                            if v10 then
                                v6.unmount(v10);
                                v10 = nil;
                            end;
                        end);
                        v13();
                        return ;
                    else
                        plugin:CreateToolbar("Audio Discovery"):CreateButton("ViewSounds", "View Sounds", "rbxlocaltheme://ViewSounds").Enabled = false;
                        return ;
                    end;
                else
                    return ;
                end;
            else
                return ;
            end;
        else
            return ;
        end;
    else
        return ;
    end;
else
    return ;
end;


local v0 = false;
return function()
    if not v0 then
        v0 = true;
        local l_Parent_0 = script.Parent.Parent;
        if require(l_Parent_0.Src.Util.DebugFlags).EnableRoactConfigs() then
            require(l_Parent_0.Packages.Roact).setGlobalConfig({
                elementTracing = true,
                propValidation = true,
                typeChecks = true
            });
        end;
        return ;
    else
        return ;
    end;
end;


game:DefineFastFlag("AudioDiscoveryLoader", false);
game:DefineFastFlag("RetireAudioDiscoveryPlugin", false);
game:DefineFastInt("StudioAudioDiscoveryMaxAssetIdsPerRequest", 30);
game:DefineFastFlag("AudioDiscoveryMigrateToRoact17", false);
game:DefineFastInt("StudioAudioDiscoveryPerRequestCooldown", 60);
game:DefineFastInt("StudioAudioDiscoveryCooldownAfterHttp429", 120);
game:DefineFastInt("StudioAudioDiscoveryMaxRecentRequests", 20);
game:DefineFastInt("SoundEffectMaxDuration", 6);
game:DefineFastInt("StudioAudioDiscoveryOpenAnalyticThrottle", 10000);
game:DefineFastInt("StudioAudioDiscoverySelectAnalyticsThrottle", 10000);
game:DefineFastInt("StudioAudioDiscoveryBreakdownAnalyticsThrottle", 10000);
game:DefineFastInt("StudioAudioDiscoveryPermissionCheckAnalyticsThrottle", 1000);
game:DefineFastFlag("DEBUG_StudioAudioDiscoveryPermissionCheckErrors", false);
game:DefineFastFlag("AddNonPermCase", false);
return nil;


require(script.Parent.defineLuaFlags);
if game:GetFastFlag("AudioDiscoveryLoader") then
    if not game:GetFastFlag("RetireAudioDiscoveryPlugin") then
        local l_Parent_0 = script.Parent.Parent;
        if not require(l_Parent_0.Src.Util.DebugFlags).RunningUnderCLI() then
            local v1 = require(l_Parent_0.PluginLoader.PluginLoaderBuilder);
            local l_SourceStrings_0 = l_Parent_0.Src.Resources.Localization.SourceStrings;
            local l_LocalizedStrings_0 = l_Parent_0.Src.Resources.Localization.LocalizedStrings;
            local v10 = {
                getName = function(v4, v5, v6)
                    return v4(v5, v6, "Plugin", "Button");
                end,
                getDescription = function(v7, v8, v9)
                    return v7(v8, v9, "Plugin", "Description");
                end,
                icon = "rbxlocaltheme://ViewSounds",
                enabled = false
            };
            local v14 = {
                plugin = plugin,
                pluginName = "AudioDiscovery",
                translationResourceTable = l_LocalizedStrings_0,
                fallbackResourceTable = l_SourceStrings_0,
                getToolbarName = function(v11, v12, v13)
                    return v11(v12, v13, "Plugin", "Toolbar");
                end,
                buttonInfo = v10
            };
            if not game:GetService("RunService"):IsEdit() then
                v1.build(v14);
                return ;
            else
                v10.enabled = true;
                v14.dockWidgetInfo = {
                    id = "AudioDiscovery",
                    dockWidgetPluginGuiInfo = DockWidgetPluginGuiInfo.new(Enum.InitialDockState.Bottom, false, false, 640, 480, 250, 200),
                    getDockTitle = function(v15, v16, v17)
                        return v15(v16, v17, "Plugin", "Name");
                    end,
                    zIndexBehavior = Enum.ZIndexBehavior.Sibling
                };
                local v18 = v1.build(v14);
                if v18.pluginLoader:waitForUserInteraction() then
                    require(script.Parent.main)(plugin, v18);
                    return ;
                else
                    return ;
                end;
            end;
        else
            return ;
        end;
    else
        return ;
    end;
else
    return ;
end;


return function(v0, v1)
    local l_Parent_0 = script.Parent.Parent;
    local v3 = require(l_Parent_0.Packages.Framework);
    local _, l_result_0 = pcall(function()
        return game:GetService("StudioService"):HasInternalPermission();
    end);
    local _, _ = pcall(function()
        return game:GetService("RunService"):IsEdit();
    end);
    local v8 = require(l_Parent_0.Packages.Roact);
    local l_Networking_0 = v3.Http.Networking;
    local v10 = require(l_Parent_0.Src.MainPlugin);
    local v11 = require(l_Parent_0.Src.Util.SoundAssetChecker);
    local v12 = nil;
    local v13 = nil;
    local v14 = nil;
    if l_result_0 then
        v14 = v3.DeveloperTools.forPlugin(l_Parent_0.Name, v0);
    end;
    local function v15()
        v0.Name = l_Parent_0.Name;
        v13 = v11.new((l_Networking_0.new({
            isInternal = true
        })));
        v13:start();
        v12 = v8.mount((v8.createElement(v10, {
            Plugin = v0,
            pluginLoaderContext = v1,
            SoundAssetChecker = v13
        })));
        if v14 then
            v14:addRoactTree("Roact tree", v12);
        end;
    end;
    v0.Unloading:Connect(function()
        if v13 then
            v13:destroy();
            v13 = nil;
        end;
        if v14 then
            v14:destroy();
        end;
        if v12 then
            v8.unmount(v12);
            v12 = nil;
        end;
    end);
    v15();
end;


local l_Parent_0 = script.Parent.Parent;
require(script.Parent.defineLuaFlags);
require(script.Parent.commonInit)();
local v1 = require(l_Parent_0.Src.Util.DebugFlags);
local v2 = require(l_Parent_0.Packages.Framework);
if not (not v1.RunningUnderCLI() and not v1.RunTests() or game:GetFastFlag("RetireAudioDiscoveryPlugin")) then
    local v3 = require(l_Parent_0.Packages.Dev.TestEZ);
    local l_TestBootstrap_0 = v3.TestBootstrap;
    local v5 = not not _G.TEAMCITY and v3.Reporters.TeamCityReporter or v3.Reporters.TextReporter;
    local l_Src_0 = l_Parent_0.Src;
    local v7 = {
        showTimingInfo = false,
        testNamePattern = nil,
        extraEnvironment = {}
    };
    print("----- All " .. l_Parent_0.Name .. " Tests ------");
    l_TestBootstrap_0:run({
        l_Src_0
    }, v5, v7);
    print("----------------------------------");
    if v1.RunDeveloperFrameworkTests() then
        print("");
        print("----- All DeveloperFramework Tests ------");
        v2.TestHelpers.runFrameworkTests(v3, v5);
        print("----------------------------------");
    end;
end;
if v1.RunningUnderCLI() then
    pcall(function()
        game:GetService("ProcessService"):ExitAsync(0);
    end);
end;


local l_AudioDiscoveryMigrateToRoact17_0 = game:GetFastFlag("AudioDiscoveryMigrateToRoact17");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("Packages");
if not l_AudioDiscoveryMigrateToRoact17_0 then
    return require(l_script_FirstAncestor_0._Index.Roact.Roact);
else
    return require(l_script_FirstAncestor_0.RoactCompat);
end;


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


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


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0, v1, v2)
    return {
        TableName = v0,
        SortIndex = v1,
        SortOrder = v2
    };
end);


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


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


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


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Framework);
local l_assign_0 = v2.Dash.assign;
local l_UI_0 = v2.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_Image_0 = l_UI_0.Image;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_Tooltip_0 = l_UI_0.Tooltip;
local l_withControl_0 = v2.Wrappers.withControl;
local v10 = v1.PureComponent:extend("TableHeaderCell");
v10.render = function(v11)
    local l_props_0 = v11.props;
    local l_Name_0 = l_props_0.Name;
    local l_Order_0 = l_props_0.Order;
    local l_Width_0 = l_props_0.Width;
    local l_ColumnIndex_0 = l_props_0.ColumnIndex;
    local l_Style_0 = l_props_0.Style;
    return v1.createElement(l_Pane_0, l_assign_0({
        LayoutOrder = l_ColumnIndex_0,
        BorderColor3 = l_Style_0.Border,
        BorderSizePixel = 1,
        Padding = l_Style_0.HeaderCellPadding,
        Style = "SubtleBox",
        StyleModifier = not not (l_props_0.OnPress ~= nil) and l_props_0.StyleModifier or nil,
        Size = UDim2.new(l_Width_0.Scale, l_Width_0.Offset, 1, 0)
    }, l_props_0.WrapperProps), {
        Text = v1.createElement(l_TextLabel_0, {
            Text = l_Name_0,
            Size = UDim2.fromScale(1, 1),
            TextXAlignment = Enum.TextXAlignment.Left,
            TextTruncate = Enum.TextTruncate.AtEnd
        }),
        Icon = l_Order_0 and v1.createElement(l_Image_0, {
            ImageColor3 = l_Style_0.IconColor,
            Image = "rbxasset://textures/DeveloperFramework/Table/sort_arrow.png",
            Size = UDim2.fromOffset(6, 8),
            Position = UDim2.new(1, -10, 0, 8),
            Rotation = l_Order_0 == Enum.SortDirection.Descending and -90 or 90,
            AnchorPoint = Vector2.new(1, 0)
        }),
        Tooltip = v1.createElement(l_Tooltip_0, {
            Text = l_Name_0
        })
    });
end;
return l_withControl_0(v10);