local l_Parent_0 = script.Parent.Parent.Parent;
local l_StudioService_0 = game:GetService("StudioService");
local v2 = require(l_Parent_0.Packages.Dash);
local _ = require(l_Parent_0.Src.Types);
local v4 = game:DefineFastInt("AvatarPreviewerInfluxSeriesThrottlingPercentage", 0);
local v5 = require(l_Parent_0.Src.Flags.getFFlagAvatarPreviewerAutoSetup);
local v6 = require(l_Parent_0.Src.Flags.getFFlagAvatarPreviewerAutoSetupTelemetry);
local function v8(v7)
    return {
        paletteKey = v7.palette.Key,
        source = v7.item.source,
        serializedValue = if v7.item.source == "builtin" then if v7.palette.Serializer then tostring(v7.palette.Serializer.serialize(v7.item.builtinItem)) else tostring(v7.item.builtinItem) else nil
    };
end;
return function(v9)
    local function v12(v10, v11)
        v9:SendEventDeferred("studio", "AvatarCompatibilityPreviewer", v10, (v2.join({
            studioSid = v9:GetSessionId(),
            clientId = v9:GetClientId(),
            placeId = game.PlaceId
        }, v11)));
    end;
    local function _(v13, v14)
        v9:ReportCounter(v13, v14);
    end;
    local function _(v16, v17)
        v9:ReportStats(v16, v17);
    end;
    local function _(v19, v20)
        v9:ReportInfluxSeries(v19, v20, v4);
    end;
    return {
        addUserItems = function(_, v23, v24)
            v12("AddUserItems", {
                itemsSelected = v23,
                itemsSucceeded = v24
            });
        end,
        autoSetupFailure = function(_, v26, v27)
            v12("AutoSetupFailure", {
                assetUrl = v27,
                timeToComplete = v26
            });
        end,
        autoSetupFinish = function(_, v29, v30)
            v12("AutoSetupFinish", {
                assetUrl = v30,
                timeToComplete = v29
            });
        end,
        autoSetupAssetsGenerated = if not v6() then nil else function(_, v32, v33)
            v12("AutoSetupAssetsGenerated", {
                inputAssetId = v32,
                outputAssetIds = table.concat(v33, ",")
            });
        end,
        bundlesMetadataError = function(_, v35)
            v12("BundlesMetadataError", {
                problem = v35
            });
        end,
        changedLayers = function()
            v12("ChangedLayers");
        end,
        equipItem = function(_, v37)
            v12("EquipItem", (v8(v37)));
        end,
        openPalette = function(_, v39)
            v12("PaletteOpen", {
                paletteKey = v39
            });
        end,
        openPlugin = function()
            v12("PluginOpen");
        end,
        openTab = function(_, v41)
            v12("TabOpen", {
                tabKey = v41
            });
        end,
        publish = function(_, v43)
            if not v5() then
                v12("Publish");
                return ;
            else
                v12("Publish", {
                    isAutoSetupped = v43
                });
                return ;
            end;
        end,
        selectScreenChoice = function(_, v45)
            v12("SelectScreenChoice", {
                choice = v45
            });
        end,
        sendAutoSetupSurvey = function(_, v47, v48, v49)
            v12("AutoSetupSurvey", {
                userId = l_StudioService_0:GetUserId(),
                rating = v47.rating,
                message = v47.message,
                problems = table.concat(v2.keys(v47.problems), ","),
                inputAssetId = v49,
                outputAssetIds = if not v6() then nil else table.concat(v48, ",")
            });
        end,
        setStage = function(_, v51)
            v12("SetStage", {
                stageKey = v51
            });
        end,
        testInExperience = function()
            v12("TestInExperience");
        end,
        unequipItem = function(_, v53)
            v12("UnequipItem", (v8(v53)));
        end,
        autoSetupPassedValidation = function()
            v9:ReportCounter("AutoSetupPassedValidation", nil);
        end,
        autoSetupFailedValidation = function()
            v9:ReportCounter("AutoSetupFailedValidation", nil);
        end,
        autoSetupValidationDuration = function(_, v55)
            v9:ReportStats("AutoSetupValidationDuration", v55);
        end,
        autoSetupValidationErrorCount = function(_, v57)
            v9:ReportStats("AutoSetupValidationErrorCount", v57);
        end,
        autoSetupValidationError = function(_, v59, v60)
            v9:ReportInfluxSeries("AutoSetupValidationError", {
                inputAssetId = v59,
                errorText = v60
            }, v4);
        end
    };
end;


local _ = require(script:FindFirstAncestor("AvatarCompatibilityPreviewer").Packages.React);
return {};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AvatarCompatibilityPreviewer");
local v1 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v3 = {};
local function _(v4)
    return v4;
end;
v3.types = {
    Classic = {
        BodyTypeScale = 0,
        BodyProportionScale = 0,
        GuessMaxHeight = 5.25
    },
    ProportionsSlender = {
        BodyTypeScale = 1,
        BodyProportionScale = 1,
        GuessMaxHeight = 5.625
    },
    ProportionsNormal = {
        BodyTypeScale = 1,
        BodyProportionScale = 0,
        GuessMaxHeight = math.huge
    }
};
v3.allAvatarPartScaleTypeValueObjects = function(v6)
    local v7 = {};
    for _, v9 in v1.LIMBS, nil, nil do
        local l_v6_FirstChild_0 = v6:FindFirstChild(v9);
        assert(l_v6_FirstChild_0 ~= nil, "Avatar must have all limbs");
        local l_AvatarPartScaleType_0 = l_v6_FirstChild_0:FindFirstChild("AvatarPartScaleType");
        if not (not (l_AvatarPartScaleType_0 ~= nil) or not l_AvatarPartScaleType_0:IsA("StringValue")) then
            local v12 = false;
            if l_AvatarPartScaleType_0 ~= nil then
                v12 = l_AvatarPartScaleType_0:IsA("StringValue");
            end;
            assert(v12, v1.LUAU_ANALYZE_ERROR);
            table.insert(v7, l_AvatarPartScaleType_0);
        end;
    end;
    return v7;
end;
v3.setAvatarPartScaleTypeValueObjects = function(v13, v14)
    for _, v16 in v1.LIMBS, nil, nil do
        local l_v13_FirstChild_0 = v13:FindFirstChild(v16);
        assert(l_v13_FirstChild_0 ~= nil, "Avatar must have all limbs");
        local l_AvatarPartScaleType_1 = l_v13_FirstChild_0:FindFirstChild("AvatarPartScaleType");
        if l_AvatarPartScaleType_1 == nil then
            local l_StringValue_0 = Instance.new("StringValue");
            l_StringValue_0.Name = "AvatarPartScaleType";
            l_StringValue_0.Value = v14;
            l_StringValue_0.Parent = l_v13_FirstChild_0;
        elseif l_AvatarPartScaleType_1:IsA("StringValue") then
            local v20 = false;
            if l_AvatarPartScaleType_1 ~= nil then
                v20 = l_AvatarPartScaleType_1:IsA("StringValue");
            end;
            assert(v20, v1.LUAU_ANALYZE_ERROR);
            l_AvatarPartScaleType_1.Value = v14;
        end;
    end;
end;
return v3;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AvatarCompatibilityPreviewer");
local v1 = require(l_script_FirstAncestor_0.Packages.Cryo);
local v2 = require(l_script_FirstAncestor_0.Src.Flags.getFFlagAvatarPreviewerAutoSetupDisablePublish);
local v3 = require(l_script_FirstAncestor_0.Src.Flags.getFFlagAvatarPreviewerAutoSetupTelemetryV2);
local v4 = {
    "Head",
    "UpperTorso",
    "LowerTorso",
    "LeftUpperLeg",
    "LeftLowerLeg",
    "LeftFoot",
    "RightUpperLeg",
    "RightLowerLeg",
    "RightFoot",
    "LeftUpperArm",
    "LeftLowerArm",
    "LeftHand",
    "RightUpperArm",
    "RightLowerArm",
    "RightHand"
};
return {
    SOURCE_BUILTIN = "builtin",
    SOURCE_INSTANCE = "instance",
    LUAU_ANALYZE_ERROR = "Assertion for Luau typechecking",
    BODY_PREVIEW_PATH = "rbxasset://models/AvatarCompatibilityPreviewer/bodyPreview.rbxm",
    HEAD_PREVIEW_PATH = "rbxasset://models/AvatarCompatibilityPreviewer/headPreview.rbxm",
    PEDESTAL_PATH = "rbxasset://models/AvatarCompatibilityPreviewer/pedestal.rbxm",
    ATTRIBUTE_PREFIX = "RBX_AvatarPreviewer_",
    ATTRIBUTE_CREATED_BY_AUTO_SETUP = (v2() or v3()) and "RBX_AutoSetupped" or "AutoSetupped",
    ATTRIBUTE_AUTO_SETUP_INPUT_ASSET = "RBX_AutoSetupInputAsset",
    REFERENCE_VALUE_NAME = "AvatarPreviewer_OriginalObjectReference_",
    ASSET_TYPE_TO_ACCESSORY_TYPE = {
        [Enum.AssetType.BackAccessory] = Enum.AccessoryType.Back,
        [Enum.AssetType.DressSkirtAccessory] = Enum.AccessoryType.DressSkirt,
        [Enum.AssetType.EyebrowAccessory] = Enum.AccessoryType.Eyebrow,
        [Enum.AssetType.EyelashAccessory] = Enum.AccessoryType.Eyelash,
        [Enum.AssetType.FaceAccessory] = Enum.AccessoryType.Face,
        [Enum.AssetType.FrontAccessory] = Enum.AccessoryType.Front,
        [Enum.AssetType.HairAccessory] = Enum.AccessoryType.Hair,
        [Enum.AssetType.Hat] = Enum.AccessoryType.Hat,
        [Enum.AssetType.JacketAccessory] = Enum.AccessoryType.Jacket,
        [Enum.AssetType.LeftShoeAccessory] = Enum.AccessoryType.LeftShoe,
        [Enum.AssetType.NeckAccessory] = Enum.AccessoryType.Neck,
        [Enum.AssetType.PantsAccessory] = Enum.AccessoryType.Pants,
        [Enum.AssetType.RightShoeAccessory] = Enum.AccessoryType.RightShoe,
        [Enum.AssetType.ShirtAccessory] = Enum.AccessoryType.Shirt,
        [Enum.AssetType.ShoulderAccessory] = Enum.AccessoryType.Shoulder,
        [Enum.AssetType.ShortsAccessory] = Enum.AccessoryType.Shorts,
        [Enum.AssetType.SweaterAccessory] = Enum.AccessoryType.Sweater,
        [Enum.AssetType.TShirtAccessory] = Enum.AccessoryType.TShirt,
        [Enum.AssetType.WaistAccessory] = Enum.AccessoryType.Waist
    },
    FACE_CONTROLS_PROPERTIES = {
        "ChinRaiser",
        "ChinRaiserUpperLip",
        "Corrugator",
        "EyesLookDown",
        "EyesLookLeft",
        "EyesLookRight",
        "EyesLookUp",
        "FlatPucker",
        "Funneler",
        "JawDrop",
        "JawLeft",
        "JawRight",
        "LeftBrowLowerer",
        "LeftCheekPuff",
        "LeftCheekRaiser",
        "LeftDimpler",
        "LeftEyeClosed",
        "LeftEyeUpperLidRaiser",
        "LeftInnerBrowRaiser",
        "LeftLipCornerDown",
        "LeftLipCornerPuller",
        "LeftLipStretcher",
        "LeftLowerLipDepressor",
        "LeftNoseWrinkler",
        "LeftOuterBrowRaiser",
        "LeftUpperLipRaiser",
        "LipPresser",
        "LipsTogether",
        "LowerLipSuck",
        "MouthLeft",
        "MouthRight",
        "Pucker",
        "RightBrowLowerer",
        "RightCheekPuff",
        "RightCheekRaiser",
        "RightDimpler",
        "RightEyeClosed",
        "RightEyeUpperLidRaiser",
        "RightInnerBrowRaiser",
        "RightLipCornerDown",
        "RightLipCornerPuller",
        "RightLipStretcher",
        "RightLowerLipDepressor",
        "RightNoseWrinkler",
        "RightOuterBrowRaiser",
        "RightUpperLipRaiser",
        "TongueDown",
        "TongueOut",
        "TongueUp",
        "UpperLipSuck"
    },
    LIMBS = v4,
    ALL_ALLOWED_PART_NAMES = v1.List.join(v4, {
        "Handle",
        "HumanoidRootPart"
    }),
    EDITING_TOOLS_GUI_NAMES = {
        BodyPoints = "AvatarPreviewerEditingBodyPoints",
        EditingToolbar = "AvatarPreviewerEditingToolbar",
        BodyPointsToolToolbar = "AvatarPreviewerBodyPointsToolToolbar",
        CageEditingToolToolbar = "AvatarPreviewerCageEditingToolToolbar",
        MeshEditingModuleControlPointsAdornments = "MeshEditingModuleControlPointsAdornments"
    },
    CLONED_DUMMY_NAME = "AvatarPreviewerClonedDummy",
    ORIGINAL_POSITION_VALUE = "OriginalPosition",
    PHONY_NO_SELECTION = "NoSelection",
    DEFAULT_CAMERA_ANGLE = CFrame.lookAt(Vector3.new(-5.2, 1, -9.2), (Vector3.new(0.5, -1.2, 0.85))),
    PREFERRED_LAYERS = {
        Eyelashes = 1,
        Eyebrows = 2,
        Face = 3,
        Hair = 4,
        Shoes = 5,
        Bottoms = 6,
        Tops = 7,
        Outerwear = 8
    },
    FOCUS_CALLBACK_PRIORITIES = {
        Positions = 1,
        Dummy = 2
    },
    BODY_MESH_SUFFIX = "_geo",
    BODY_PART_TO_LIMB_NAME = {
        Head = "Head",
        UpperTorso = "Torso",
        LowerTorso = "Torso",
        LeftUpperArm = "LeftArm",
        LeftLowerArm = "LeftArm",
        LeftHand = "LeftArm",
        RightUpperArm = "RightArm",
        RightLowerArm = "RightArm",
        RightHand = "RightArm",
        LeftUpperLeg = "LeftLeg",
        LeftLowerLeg = "LeftLeg",
        LeftFoot = "LeftLeg",
        RightUpperLeg = "RightLeg",
        RightLowerLeg = "RightLeg",
        RightFoot = "RightLeg"
    },
    FALLOFF_CURSOR_ADJUSTMENT = 0.7
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AvatarCompatibilityPreviewer");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local _ = require(l_script_FirstAncestor_0.Src.Components.Screens.AvatarScreen.Stages.StageType);
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v4 = require(l_script_FirstAncestor_0.Src.Util.createUnimplemented);
return (v1.createContext({
    openPalette = v4("openPalette"),
    focusedAttachments = {},
    setFocusedAttachments = v4("setFocusedAttachments"),
    dummyPreviewLocked = false,
    incrementDummyPreviewLock = v4("incrementDummyPreviewLock"),
    decrementDummyPreviewLock = v4("decrementDummyPreviewLock"),
    resetCamera = function()
    end,
    stage = {}
}));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AvatarCompatibilityPreviewer");
local v1 = require(l_script_FirstAncestor_0.Src.Resources.CatalogItems);
local v2 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local _ = require(l_script_FirstAncestor_0.Src.Types);
return function(v4)
    if table.find(v1.clothing, v4.palette) ~= nil then
        return true;
    elseif v4.item.source ~= v2.SOURCE_INSTANCE then
        return false;
    else
        assert(v4.item.source == v2.SOURCE_INSTANCE, v2.LUAU_ANALYZE_ERROR);
        return v4.item.instance:FindFirstChildWhichIsA("WrapLayer", true) ~= nil;
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AvatarCompatibilityPreviewer");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v3 = require(l_script_FirstAncestor_0.Src.Util.createUnimplemented);
return v1.createContext({
    equippedItems = {},
    addEquippedItem = v3("addEquippedItem"),
    removeEquippedItem = v3("removeEquippedItem"),
    removeAllEquippedItems = v3("removeAllEquippedItems"),
    moveEquippedItemsToIndex = v3("moveEquippedItemsToIndex"),
    hideEquippedItem = v3("hideEquippedItem"),
    showEquippedItem = v3("showEquippedItem"),
    setHideAllEquippedItems = v3("setHideAllEquippedItems"),
    startIgnoringChildren = function()
        return function()
        end;
    end,
    isIgnoringChildren = false,
    avatarAssets = {
        accessories = {},
        animation = nil,
        clothing = {},
        emotion = nil,
        patches = {}
    }
});


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AvatarCompatibilityPreviewer");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Src.Util.createUnimplemented);
return (v1.createContext({
    isLimbOriginal = v2("isLimbOriginal"),
    markLimbAsOriginal = v2("markLimbAsOriginal")
}));


local l_HttpService_0 = game:GetService("HttpService");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("AvatarCompatibilityPreviewer");
local v2 = require(l_script_FirstAncestor_0.Packages.Dash);
local v3 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v5 = require(l_script_FirstAncestor_0.Src.Util.getPaletteFromKey);
return {
    createEquippedItemsSerializer = function(v6)
        return {
            serialize = function(v7)
                return l_HttpService_0:JSONEncode(v2.map(v7, function(v8)
                    local v9 = nil;
                    if v8.item.source == v3.SOURCE_BUILTIN then
                        v9 = {
                            source = v3.SOURCE_BUILTIN,
                            builtinItem = if not v8.palette.Serializer then v8.item.builtinItem else v8.palette.Serializer.serialize(v8.item.builtinItem)
                        };
                    elseif v8.item.source == v3.SOURCE_INSTANCE then
                        v9 = {
                            source = v3.SOURCE_INSTANCE,
                            key = v8.item.instance.Name
                        };
                    else
                        error((("Unknown item source in serialization: %*"):format(v8.item.source)));
                    end;
                    return {
                        palette = v8.palette.Key,
                        item = v9,
                        isHidden = v8.isHidden
                    };
                end));
            end,
            deserialize = function(v10)
                return v2.collectArray(l_HttpService_0:JSONDecode(v10), function(_, v12)
                    local v13 = v5(v12.palette);
                    if v13 == nil then
                        return nil;
                    else
                        assert(v13 ~= nil, v3.LUAU_ANALYZE_ERROR);
                        local v14 = nil;
                        if v12.item.source == v3.SOURCE_BUILTIN then
                            v14 = {
                                source = v3.SOURCE_BUILTIN,
                                builtinItem = if not v13.Serializer then v12.item.builtinItem else v13.Serializer.deserialize(v12.item.builtinItem)
                            };
                        elseif v12.item.source == v3.SOURCE_INSTANCE then
                            local l_v6_FirstChild_0 = v6:FindFirstChild(v12.item.key);
                            if l_v6_FirstChild_0 == nil then
                                return nil;
                            else
                                v14 = {
                                    source = v3.SOURCE_INSTANCE,
                                    instance = l_v6_FirstChild_0
                                };
                            end;
                        else
                            error((("Unknown item source in deserialization: %*"):format(v12.item.source)));
                        end;
                        return {
                            palette = v13,
                            item = v14,
                            isHidden = v12.isHidden
                        };
                    end;
                end);
            end
        };
    end
};


local v0 = nil;
local function v3(v1, ...)
    local l_v0_0 = v0;
    v0 = nil;
    v1(...);
    v0 = l_v0_0;
end;
local function v4()
    while true do
        v3(coroutine.yield());
    end;
end;
local v5 = {};
v5.__index = v5;
v5.new = function(v6, v7)
    return (setmetatable({
        _connected = true,
        _signal = v6,
        _fn = v7,
        _next = false
    }, v5));
end;
v5.Disconnect = function(v8)
    v8._connected = false;
    if v8._signal._handlerListHead == v8 then
        v8._signal._handlerListHead = v8._next;
        return ;
    else
        local l__handlerListHead_0 = v8._signal._handlerListHead;
        while l__handlerListHead_0 and l__handlerListHead_0._next ~= v8 do
            l__handlerListHead_0 = l__handlerListHead_0._next;
        end;
        if l__handlerListHead_0 then
            l__handlerListHead_0._next = v8._next;
        end;
        return ;
    end;
end;
setmetatable(v5, {
    __index = function(_, v11)
        error(("Attempt to get Connection::%s (not a valid member)"):format((tostring(v11))), 2);
    end,
    __newindex = function(_, v13, _)
        error(("Attempt to set Connection::%s (not a valid member)"):format((tostring(v13))), 2);
    end
});
local v15 = {};
v15.__index = v15;
v15.new = function()
    return (setmetatable({
        _handlerListHead = false
    }, v15));
end;
v15.Connect = function(v16, v17)
    local v18 = v5.new(v16, v17);
    if not v16._handlerListHead then
        v16._handlerListHead = v18;
        return v18;
    else
        v18._next = v16._handlerListHead;
        v16._handlerListHead = v18;
        return v18;
    end;
end;
v15.DisconnectAll = function(v19)
    v19._handlerListHead = false;
end;
v15.Fire = function(v20, ...)
    local l__handlerListHead_1 = v20._handlerListHead;
    while l__handlerListHead_1 do
        if l__handlerListHead_1._connected then
            if not v0 then
                v0 = coroutine.create(v4);
                coroutine.resume(v0);
            end;
            task.spawn(v0, l__handlerListHead_1._fn, ...);
        end;
        l__handlerListHead_1 = l__handlerListHead_1._next;
    end;
end;
v15.Wait = function(v22)
    local v23 = coroutine.running();
    local v24 = nil;
    v24 = v22:Connect(function(...)
        v24:Disconnect();
        task.spawn(v23, ...);
    end);
    return coroutine.yield();
end;
v15.Once = function(v25, v26)
    local v27 = nil;
    v27 = v25:Connect(function(...)
        if v27._connected then
            v27:Disconnect();
        end;
        v26(...);
    end);
    return v27;
end;
setmetatable(v15, {
    __index = function(_, v29)
        error(("Attempt to get Signal::%s (not a valid member)"):format((tostring(v29))), 2);
    end,
    __newindex = function(_, v31, _)
        error(("Attempt to set Signal::%s (not a valid member)"):format((tostring(v31))), 2);
    end
});
return v15;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AvatarCompatibilityPreviewer");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v3 = require(l_script_FirstAncestor_0.Src.Util.createUnimplemented);
return v1.createContext({
    setStage = v3("setStage"),
    stage = "CheckBody",
    setIsTextured = v3("setIsTextured"),
    isTextured = true
});


local l_StarterPlayer_0 = game:GetService("StarterPlayer");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("AvatarCompatibilityPreviewer");
local _ = require(l_script_FirstAncestor_0.Src.Types);
local _ = require(l_script_FirstAncestor_0.Src.Components.PlacesServiceContext);
local v6 = {
    clearTestingAvatars = function()
        for _, v5 in l_StarterPlayer_0:GetChildren() do
            if v5:GetAttribute("RBX_AvatarPreviewer_TestingAvatar") then
                v5:Destroy();
            end;
        end;
    end
};
v6.reset = function()
    v6.clearTestingAvatars();
    local l_StarterCharacter_Backup_0 = l_StarterPlayer_0:FindFirstChild("StarterCharacter_Backup");
    if not (not (l_StarterCharacter_Backup_0 ~= nil) or not l_StarterCharacter_Backup_0:GetAttribute("RBX_AvatarPreview_TestingBackup")) then
        l_StarterCharacter_Backup_0.Name = "StarterCharacter";
        l_StarterCharacter_Backup_0:SetAttribute("RBX_AvatarPreview_TestingBackup", false);
    end;
end;
v6.test = function(v8, v9)
    v6.clearTestingAvatars();
    local l_StarterCharacter_0 = l_StarterPlayer_0:FindFirstChild("StarterCharacter");
    if l_StarterCharacter_0 ~= nil then
        l_StarterCharacter_0.Name = "StarterCharacter_Backup";
        l_StarterCharacter_0:SetAttribute("RBX_AvatarPreview_TestingBackup", true);
    end;
    local v11 = v9:Clone();
    v11:SetAttribute("RBX_AvatarPreviewer_TestingAvatar", true);
    v11.Name = "StarterCharacter";
    v11.Parent = l_StarterPlayer_0;
    v8.startPlaySolo();
end;
v6.DEPRECATED_test = function(v12, v13)
    v6.clearTestingAvatars();
    local l_StarterCharacter_1 = l_StarterPlayer_0:FindFirstChild("StarterCharacter");
    if l_StarterCharacter_1 ~= nil then
        l_StarterCharacter_1.Name = "StarterCharacter_Backup";
        l_StarterCharacter_1:SetAttribute("RBX_AvatarPreview_TestingBackup", true);
    end;
    local v15 = v13.WorldModel:Clone();
    v15:SetAttribute("RBX_AvatarPreviewer_TestingAvatar", true);
    v15.Name = "StarterCharacter";
    v15.Parent = l_StarterPlayer_0;
    v12.startPlaySolo();
end;
return v6;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AvatarCompatibilityPreviewer");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local _ = require(l_script_FirstAncestor_0.Src.Types);
return (v1.createContext({
    equippableItems = {},
    addNewItem = function(_, _)
        error("Calling default addNewItem");
    end,
    removeItem = function()
        error("Calling default removeItem");
    end
}));


local l_InsertService_0 = game:GetService("InsertService");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("AvatarCompatibilityPreviewer");
local v2 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v4 = require(l_script_FirstAncestor_0.Src.Flags.getFFlagAvatarPreviewerAutoSetup);
return function(v5, v6, v7, v8)
    local v9 = l_InsertService_0:LoadLocalAsset(v2.PEDESTAL_PATH);
    local function v14()
        local l_v6_Pivot_0 = v6:GetPivot();
        local v11 = CFrame.new(l_v6_Pivot_0.Position - v6.PrimaryPart.Position) * l_v6_Pivot_0.Rotation;
        if not l_v6_Pivot_0.Position:FuzzyEq(v11.Position) then
            v6:PivotTo(v11);
        end;
        if not v4() then
            v9.CFrame = CFrame.new(v6.PrimaryPart.Position.X, (0 - (v6.Humanoid.HipHeight + v6.PrimaryPart.Size.Y * 0.5)) - v7 * 0.5, v6.PrimaryPart.Position.Z);
            return ;
        else
            local l_Humanoid_0 = v6:FindFirstChildWhichIsA("Humanoid");
            local v13 = 0;
            if l_Humanoid_0 ~= nil then
                assert(l_Humanoid_0:IsA("Humanoid"), v2.LUAU_ANALYZE_ERROR);
                v13 = v13 - l_Humanoid_0.HipHeight;
            end;
            v9.CFrame = CFrame.new(v6.PrimaryPart.Position.X, (v13 - v6.PrimaryPart.Size.Y * 0.5) - v7 * 0.5, v6.PrimaryPart.Position.Z);
            return ;
        end;
    end;
    v9.Size = Vector3.new(v8, v7, v8);
    v14();
    v9.Parent = v5;
    local v15 = task.spawn(function()
        while true do
            v14();
            task.wait();
        end;
    end);
    local v16 = nil;
    local function v17()
        v16:Disconnect();
        task.cancel(v15);
    end;
    v16 = v6.Destroying:Connect(v17);
    return v17;
end;


return function(v0)
    return (tonumber(string.match(v0, "(%d+)$")));
end;


return function(v0, v1)
    local function _(v2, v3)
        local l_v1_FirstChild_0 = v1:FindFirstChild(v2);
        if l_v1_FirstChild_0 ~= nil and l_v1_FirstChild_0:IsA("NumberValue") then
            v0[v3] = l_v1_FirstChild_0.Value;
            return ;
        else
            return ;
        end;
    end;
    local l_BodyDepthScale_0 = v1:FindFirstChild("BodyDepthScale");
    if l_BodyDepthScale_0 ~= nil and l_BodyDepthScale_0:IsA("NumberValue") then
        v0.DepthScale = l_BodyDepthScale_0.Value;
    end;
    l_BodyDepthScale_0 = v1:FindFirstChild("BodyHeightScale");
    if l_BodyDepthScale_0 ~= nil and l_BodyDepthScale_0:IsA("NumberValue") then
        v0.HeightScale = l_BodyDepthScale_0.Value;
    end;
    l_BodyDepthScale_0 = v1:FindFirstChild("BodyProportionScale");
    if l_BodyDepthScale_0 ~= nil and l_BodyDepthScale_0:IsA("NumberValue") then
        v0.ProportionScale = l_BodyDepthScale_0.Value;
    end;
    l_BodyDepthScale_0 = v1:FindFirstChild("BodyWidthScale");
    if l_BodyDepthScale_0 ~= nil and l_BodyDepthScale_0:IsA("NumberValue") then
        v0.WidthScale = l_BodyDepthScale_0.Value;
    end;
    l_BodyDepthScale_0 = v1:FindFirstChild("BodyTypeScale");
    if l_BodyDepthScale_0 ~= nil and l_BodyDepthScale_0:IsA("NumberValue") then
        v0.BodyTypeScale = l_BodyDepthScale_0.Value;
    end;
    l_BodyDepthScale_0 = v1:FindFirstChild("HeadScale");
    if l_BodyDepthScale_0 ~= nil then
        if l_BodyDepthScale_0:IsA("NumberValue") then
            v0.HeadScale = l_BodyDepthScale_0.Value;
        else
            return ;
        end;
    end;
end;


return function(v0)
    return function()
        error((("Calling unimplemented function %*"):format(v0)));
    end;
end;


return function()
    local v0 = {};
    return function(v1)
        if v0[v1] == nil then
            v0[v1] = 1;
            return v1;
        else
            local v2;
            while true do
                v2 = v0;
                v2[v1] = v2[v1] + 1;
                v2 = ("%*_%*"):format(v1, v0[v1]);
                if v0[v2] == nil then
                    break;
                end;
            end;
            return v2;
        end;
    end;
end;


return function(v0, v1)
    local v2 = {};
    local v3 = {};
    local v4 = {};
    local v5 = {};
    for _, v7 in v0, nil, nil do
        v5[v7] = (v5[v7] or 0) + 1;
    end;
    for _, v9 in v1, nil, nil do
        local v10 = v5[v9];
        if not (v10 ~= nil) or v10 == 0 then
            table.insert(v3, v9);
        else
            v5[v9] = v5[v9] - 1;
            table.insert(v4, v9);
        end;
    end;
    for v11, v12 in v5, nil, nil do
        for _ = 1, v12 do
            table.insert(v2, v11);
        end;
    end;
    return v2, v3, v4;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AvatarCompatibilityPreviewer");
local v1 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local _ = require(l_script_FirstAncestor_0.Src.Types);
return function(v3, v4)
    if v3.palette ~= v4.palette then
        return false;
    elseif v3.item.source ~= v4.item.source then
        return false;
    elseif v3.item.source == v1.SOURCE_BUILTIN and v4.item.source == v1.SOURCE_BUILTIN then
        return v3.item.builtinItem == v4.item.builtinItem;
    elseif v3.item.source == v1.SOURCE_INSTANCE and v4.item.source == v1.SOURCE_INSTANCE then
        return v3.item.instance == v4.item.instance;
    else
        error((("Unknown item source: %*"):format(v3.item.source)));
        return ;
    end;
end;


return function(v0)
    error((("Unknown value in exhaustive match: %*"):format(v0)));
end;


local v0 = {
    "Attachment",
    "BasePart",
    "BaseWrap",
    "DataModelMesh",
    "FaceControls",
    "Humanoid",
    "SurfaceAppearance",
    "ValueBase"
};
local function v1(v2, v3)
    for _, v5 in v2:GetChildren() do
        local v6 = false;
        if not v5:IsA("BasePart") then
            for _, v8 in v0, nil, nil do
                if v5:IsA(v8) then
                    v6 = true;
                    break;
                end;
            end;
        elseif v3 ~= nil and table.find(v3, v5.Name) ~= nil then
            v6 = true;
        else
            v5:Destroy();
            continue;
        end;
        if not v6 then
            v5:Destroy();
        else
            v1(v5, v3);
        end;
    end;
end;
return v1;


return function(v0, v1)
    for v2, v3 in v0, nil, nil do
        if v1(v3) then
            return v3, v2;
        end;
    end;
    return nil, nil;
end;


local v0 = require(script:FindFirstAncestor("AvatarCompatibilityPreviewer").Src.Util.assetUriToId);
local function _(v1, v2)
    if v2 ~= nil then
        v1[v2] = true;
    end;
end;
return function(v4)
    local v5 = {};
    local l_v4_Descendants_0 = v4:GetDescendants();
    table.insert(l_v4_Descendants_0, v4);
    for _, v8 in l_v4_Descendants_0, nil, nil do
        if not v8:IsA("MeshPart") then
            if v8:IsA("WrapTarget") then
                local v9 = v0(v8.CageMeshId);
                if v9 ~= nil then
                    v5[v9] = true;
                end;
            end;
        else
            local v10 = v0(v8.MeshId);
            if v10 ~= nil then
                v5[v10] = true;
            end;
        end;
    end;
    local v11 = {};
    for v12 in v5, nil, nil do
        table.insert(v11, v12);
    end;
    return v11;
end;


return function(...)
    local v0 = {};
    for _, v2 in {
        ...
    }, nil, nil do
        table.move(v2, 1, #v2, #v0 + 1, v0);
    end;
    return v0;
end;


return function(v0, v1, v2)
    if not (v1 ~= nil) or v2 == nil then
        local v3 = false;
        if v1 == nil then
            v3 = v2 == nil;
        end;
        assert(v3, "Neither width nor height can be empty on their own");
        v1 = 150;
        v2 = 150;
    end;
    return (("rbxthumb://type=Asset&id=%*&w=%*&h=%*"):format(v0, v1, v2));
end;


local _ = require(script:FindFirstAncestor("AvatarCompatibilityPreviewer").Src.Types);
return function(v1)
    if v1.item.source == "builtin" then
        local v2 = v1.palette.GetBuiltinItemData(v1.item.builtinItem);
        return v2 and v2.accessoryType;
    elseif v1.item.instance:FindFirstChildWhichIsA("WrapLayer", true) == nil then
        return "rigid";
    else
        return "layered";
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AvatarCompatibilityPreviewer");
local v1 = require(l_script_FirstAncestor_0.Src.Resources.CatalogItems);
local _ = require(l_script_FirstAncestor_0.Src.Types);
return function(v3)
    for v4, v5 in v1, nil, nil do
        for _, v7 in v5, nil, nil do
            if v7.Key == v3 then
                return v7, v4;
            end;
        end;
    end;
    return nil, nil;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AvatarCompatibilityPreviewer");
local v1 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local v2 = require(l_script_FirstAncestor_0.Src.Flags.getFFlagAvatarPreviewerHandleAvatarDeletion);
local function _(v3, v4, v5)
    local l_v3_FirstChild_0 = v3:FindFirstChild(v4);
    if l_v3_FirstChild_0 == nil then
        return nil;
    elseif l_v3_FirstChild_0:IsA(v5) then
        if l_v3_FirstChild_0.Archivable then
            return l_v3_FirstChild_0;
        else
            return nil;
        end;
    else
        return nil;
    end;
end;
return function(v8)
    if v8.Archivable then
        if v8:IsA("Model") then
            if not v2() or v8:IsDescendantOf(game) then
                if v8.PrimaryPart ~= nil and v8.PrimaryPart.Archivable then
                    for _, v10 in v1.LIMBS, nil, nil do
                        local l_v8_FirstChild_0 = v8:FindFirstChild(v10);
                        if not if l_v8_FirstChild_0 == nil then nil else if l_v8_FirstChild_0:IsA("BasePart") then if l_v8_FirstChild_0.Archivable then l_v8_FirstChild_0 else nil else nil then
                            return false;
                        end;
                    end;
                    local l_Humanoid_0 = v8:FindFirstChild("Humanoid");
                    if if l_Humanoid_0 == nil then nil else if l_Humanoid_0:IsA("Humanoid") then if l_Humanoid_0.Archivable then l_Humanoid_0 else nil else nil == nil then
                        return false;
                    else
                        return true;
                    end;
                else
                    return false;
                end;
            else
                return false;
            end;
        else
            return false;
        end;
    else
        return false;
    end;
end;


local v0 = require(script:FindFirstAncestor("AvatarCompatibilityPreviewer").Packages.Dash);
return function(v1, v2, v3, v4, v5)
    return v1:getText(v2, if v4 == 1 then ("%*_Singular"):format(v3) else ("%*_Plural"):format(v3), v0.join({
        amount = if v4 == 1 then nil else v4
    }, v5));
end;


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


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AvatarCompatibilityPreviewer");
local v1 = require(l_script_FirstAncestor_0.Packages.React);
local v2 = require(l_script_FirstAncestor_0.Packages.Dev.ReactTestingLibrary);
return function(v3)
    local v4 = v1.createRef();
    v2.render(v1.createElement(function()
        v4.current = table.pack(v3());
    end));
    return function()
        return table.unpack(v4.current);
    end;
end;


return function(v0, v1)
    if v0 == v1 then
        return true;
    elseif typeof(v0) ~= typeof(v1) then
        return false;
    else
        if typeof(v0) == "table" then
            assert(typeof(v1) == "table", "Luau");
            if #v0 ~= #v1 then
                return false;
            else
                for v2 in v0, nil, nil do
                    if v0[v2] ~= v1[v2] then
                        return false;
                    end;
                end;
                for v3 in v1, nil, nil do
                    if v0[v3] ~= v1[v3] then
                        return false;
                    end;
                end;
            end;
        end;
        return true;
    end;
end;


local l_AssetService_0 = game:GetService("AssetService");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("AvatarCompatibilityPreviewer");
local v2 = require(l_script_FirstAncestor_0.Src.Util.Constants);
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v4 = require(l_script_FirstAncestor_0.Src.Flags.getFFlagAvatarPreviewerSkinToneAlphaDetection);
local function _(v5)
    if v5.TextureID ~= "" then
        return v5.TextureID;
    else
        local l_SurfaceAppearance_0 = v5:FindFirstChildWhichIsA("SurfaceAppearance");
        if l_SurfaceAppearance_0 ~= nil and l_SurfaceAppearance_0.ColorMap ~= "" then
            return l_SurfaceAppearance_0.ColorMap;
        else
            return nil;
        end;
    end;
end;
return function(v8)
    assert(v4(), "FFlagAvatarPreviewerSkinToneAlphaDetection not available");
    local v9 = {};
    for _, v11 in v2.LIMBS, nil, nil do
        local l_v8_FirstChild_0 = v8:FindFirstChild(v11);
        local v13 = false;
        if l_v8_FirstChild_0 ~= nil then
            v13 = l_v8_FirstChild_0:IsA("MeshPart");
        end;
        assert(v13, "Couldn't find limb part");
        local v14;
        if l_v8_FirstChild_0.TextureID ~= "" then
            v14 = l_v8_FirstChild_0.TextureID;
        else
            v13 = l_v8_FirstChild_0:FindFirstChildWhichIsA("SurfaceAppearance");
            v14 = if v13 ~= nil and v13.ColorMap ~= "" then v13.ColorMap else nil;
        end;
        if v14 == nil then
            return true;
        else
            assert(v14 ~= nil, v2.LUAU_ANALYZE_ERROR);
            if not v9[v14] then
                v9[v14] = true;
                v13 = l_AssetService_0:CreateEditableImageAsync(v14);
                local v15 = v13:ReadPixels(Vector2.new(), v13.Size);
                for v16 = 4, #v15, 4 do
                    if v15[v16] ~= 1 then
                        return true;
                    end;
                end;
            end;
        end;
    end;
    return false;
end;


return {
    testMatch = {
        "**/*.spec"
    },
    testTimeout = 120000
};


local l_Parent_0 = script.Parent.Parent;
if not require(l_Parent_0.src.flags.getFFlagDeprecateAvatarImport)() then
    require(l_Parent_0.Bin.defineLuaFlags);
    local v1 = require(l_Parent_0.src.Constants);
    local v2 = require(l_Parent_0.src.Globals);
    v2.plugin = plugin;
    v2.toolbar = v2.plugin:CreateToolbar(v1.TOOLBAR_NAME);
    local v3 = require(l_Parent_0.Packages.Roact);
    local v4 = require(l_Parent_0.Packages.Rodux);
    local v5 = require(l_Parent_0.Packages.RoactRodux);
    local v6 = require(l_Parent_0.src.components.AvatarImporter);
    local v7 = require(l_Parent_0.src.reducers);
    local v8 = require(l_Parent_0.src.actions.ClosePlugin);
    local v9 = require(l_Parent_0.src.actions.TogglePlugin);
    local v10 = v4.Store.new(v7, nil, {
        v4.thunkMiddleware
    });
    local l_QWidgetPluginGui_0 = v2.plugin:CreateQWidgetPluginGui(v1.NAME, {
        Enabled = false,
        Title = v1.TITLE,
        Name = v1.NAME,
        Modal = true,
        Size = Vector2.new(v1.BACKGROUND_WIDTH, v1.BACKGROUND_HEIGHT)
    });
    l_QWidgetPluginGui_0.Name = v1.NAME;
    l_QWidgetPluginGui_0:BindToClose(function()
        v10:dispatch(v8());
    end);
    local function v12()
        return v3.createElement(v5.StoreProvider, {
            store = v10
        }, {
            AvatarImporter = v3.createElement(v6, {
                pluginGui = l_QWidgetPluginGui_0
            })
        });
    end;
    local v13 = v3.mount(v12(), l_QWidgetPluginGui_0);
    local l_Button_0 = v2.toolbar:CreateButton(v1.BUTTON_NAME, v1.BUTTON_TOOLTIP, "rbxlocaltheme://AvatarImporter");
    l_Button_0.Click:Connect(function()
        v10:dispatch(v9());
    end);
    v10.changed:connect(function(v15)
        local l_enabled_0 = v15.plugin.enabled;
        l_Button_0:SetActive(l_enabled_0);
        l_QWidgetPluginGui_0.Enabled = l_enabled_0;
    end);
    settings().Studio.ThemeChanged:Connect(function()
        v3.update(v13, v12());
    end);
    return nil;
else
    return ;
end;


local v0 = {
    BUTTON_AVATAR_TYPE = "button_avatarType.png",
    BUTTON_AVATAR_TYPE_BORDER = "button_avatarType_border.png",
    PLUGIN_ICON = "icon_AvatarImporter.png",
    ERROR_ICON = "icon_error.png",
    BACKGROUND_IMAGE = "img_window_BG.png",
    HEADER_IMAGE = "img_window_header.png",
    DEPRECATED_BUTTON_ICON = "icon_AvatarImporter.png",
    BUTTON_CLOSE = "button_close.png",
    RTHRO = {
        Light = "img_light_Rthro.png",
        Dark = "img_dark_Rthro.png"
    },
    RTHRO_NARROW = {
        Light = "img_light_RthroNarrow.png",
        Dark = "img_dark_RthroNarrow.png"
    },
    R15 = {
        Light = "img_light_R15.png",
        Dark = "img_dark_R15.png"
    },
    CUSTOM = {
        Light = "img_light_custom.png",
        Dark = "img_dark_custom.png"
    }
};
local function v1(v2, v3)
    for v4, v5 in pairs(v2) do
        if typeof(v5) == "table" then
            v1(v5, v3);
        else
            v2[v4] = v3(v5);
        end;
    end;
end;
v1(v0, function(v6)
    return "rbxasset://textures/AvatarImporter/" .. v6;
end);
return v0;


local v0 = {
    FlagExists = {},
    FlagValue = {}
};
local function v4(v1)
    if v0.FlagExists[v1] == nil then
        local l_status_0, l_result_0 = pcall(function()
            return settings():GetFFlag(v1);
        end);
        v0.FlagExists[v1] = l_status_0;
        if l_status_0 then
            v0.FlagValue[v1] = l_result_0;
        end;
    end;
    return v0.FlagExists[v1] and v0.FlagValue[v1];
end;
v0.isBundleConfigurationEnabled = function(_)
    return (v4("DebugAvatarImporterBundleConfiguration"));
end;
return v0;


local l_Studio_0 = settings().Studio;
return {
    setImageColor = function(v1, v2, v3)
        v1:_set(v2, "ImageColor3", v3, Enum.StudioStyleGuideModifier.Default);
    end,
    setTextColor = function(v4, v5, v6)
        v4:_set(v5, "TextColor3", v6, Enum.StudioStyleGuideModifier.Default);
    end,
    setBackgroundColor = function(v7, v8, v9)
        v7:_set(v8, "BackgroundColor3", v9, Enum.StudioStyleGuideModifier.Default);
    end,
    setBorderColor = function(v10, v11, v12)
        v10:_set(v11, "BorderColor3", v12, Enum.StudioStyleGuideModifier.Default);
    end,
    setCustom = function(v13, v14, v15, v16)
        v13:_hook(function()
            v14[v15] = v16[l_Studio_0.Theme.Name];
        end);
    end,
    _set = function(v17, v18, v19, v20, v21)
        v17:_hook(function()
            v18[v19] = l_Studio_0.Theme:GetColor(v20, v21);
        end);
    end,
    _hook = function(_, v23)
        v23();
        l_Studio_0.ThemeChanged:Connect(v23);
    end
};


return require(script.Parent.Parent.Parent.src.actions.Action)(script.Name, function(v0)
    return {
        force = v0 == true
    };
end);


return require(script.Parent.Parent.Parent.src.actions.Action)(script.Name, function(v0, v1)
    return {
        name = v0,
        message = v1
    };
end);


return require(script.Parent.Parent.Parent.src.actions.Action)(script.Name, function(v0)
    return {
        avatarType = v0
    };
end);


return require(script.Parent.Parent.Parent.src.actions.Action)(script.Name, function(v0)
    return {
        screen = v0
    };
end);


return require(script.Parent.Parent.Parent.src.actions.Action)(script.Name, function()
    return {};
end);


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.RoactRodux);
local v3 = require(l_Parent_0.src.Assets);
local v4 = require(l_Parent_0.src.utils.themeConfig);
local v5 = require(l_Parent_0.src.utils.getTextWidth);
local v6 = require(l_Parent_0.src.components.Tooltip);
local v7 = require(l_Parent_0.src.thunks.Import);
local v8 = require(l_Parent_0.src.thunks.DetectType);
local v9 = require(l_Parent_0.src.thunks.DetectTypeWithOrigAvatarType);
local v10 = require(l_Parent_0.src.Constants);
local l_Studio_0 = settings().Studio;
local function v17(v12, v13, v14)
    v12 = v12 or "";
    v13 = v13 or "";
    v14 = v14 or "";
    local v15 = math.max(v5(v12, v10.FONT_SIZE_SMALL, v10.FONT_BOLD), v5(v13, v10.FONT_SIZE_SMALL, v10.FONT), v5(v14, v10.FONT_SIZE_SMALL, v10.FONT));
    local v16 = 0;
    if v12 ~= "" then
        v16 = v16 + 1;
    end;
    if v13 ~= "" then
        v16 = v16 + 1;
    end;
    if v14 ~= "" then
        v16 = v16 + 1;
    end;
    return UDim2.new(0, v15 + 10, 0, (5 + 14 * v16) + 5);
end;
local v18 = v1.Component:extend("AvatarButton");
v18.init = function(v19)
    v19.state = {
        hover = false,
        down = false
    };
end;
v18.getColor = function(v20)
    if not v20.state.down then
        if not v20.state.hover then
            return l_Studio_0.Theme:GetColor(Enum.StudioStyleGuideColor.Button, Enum.StudioStyleGuideModifier.Default);
        else
            return l_Studio_0.Theme:GetColor(Enum.StudioStyleGuideColor.Button, Enum.StudioStyleGuideModifier.Hover);
        end;
    else
        return l_Studio_0.Theme:GetColor(Enum.StudioStyleGuideColor.Button, Enum.StudioStyleGuideModifier.Pressed);
    end;
end;
v18.getTooltipFields = function(v21)
    local v22 = {};
    if v21.props.contextInfo.title then
        v22[#v22 + 1] = v21.props.contextInfo.title;
    end;
    if v21.props.contextInfo.height then
        v22[#v22 + 1] = string.format("Ideal height: %s studs", (tostring(v21.props.contextInfo.height)));
    end;
    if v21.props.contextInfo.description then
        v22[#v22 + 1] = v21.props.contextInfo.description;
    end;
    return v22;
end;
v18.render = function(v23)
    local v24 = v23:getTooltipFields();
    local v25 = v24[1];
    local v26 = v24[2];
    local v27 = v24[3];
    local function _(v28)
        if not (v28 ~= v10.AVATAR_TYPE.CUSTOM) then
            v23.props.detectTypeWithOrigAvatarType(v28);
            return ;
        else
            v23.props.doImport(v23.props.avatarType);
            return ;
        end;
    end;
    return v1.createElement("ImageButton", {
        BackgroundTransparency = 1,
        Image = v3.BUTTON_AVATAR_TYPE,
        LayoutOrder = v23.props.layoutOrder,
        ScaleType = Enum.ScaleType.Slice,
        Size = UDim2.new(0, v10.BUTTON_WIDTH, 0, v10.BUTTON_HEIGHT),
        SliceCenter = Rect.new(4, 4, 5, 5),
        ImageColor3 = v23:getColor(),
        [v1.Event.InputBegan] = function(_, v31)
            if not (not (v31.UserInputType == Enum.UserInputType.MouseMovement) or v23.state.hover) then
                v23:setState({
                    hover = true
                });
            end;
        end,
        [v1.Event.InputChanged] = function(_, v33)
            if not (not (v33.UserInputType == Enum.UserInputType.MouseMovement) or v23.state.hover) then
                v23:setState({
                    hover = true
                });
            end;
        end,
        [v1.Event.InputEnded] = function(_, v35)
            if not (not (v35.UserInputType == Enum.UserInputType.MouseMovement) or not v23.state.hover and not v23.state.down) then
                v23:setState({
                    hover = false,
                    down = false
                });
            end;
        end,
        [v1.Event.MouseButton1Down] = function()
            v23:setState({
                down = true
            });
        end,
        [v1.Event.MouseButton1Up] = function()
            v23:setState({
                down = false
            });
        end,
        [v1.Event.Activated] = function()
            if v23.props.avatarType == v10.AVATAR_TYPE.CUSTOM then
                local l_avatarType_0 = v23.props.avatarType;
                if not (l_avatarType_0 ~= v10.AVATAR_TYPE.CUSTOM) then
                    v23.props.detectTypeWithOrigAvatarType(l_avatarType_0);
                    return ;
                else
                    v23.props.doImport(v23.props.avatarType);
                    return ;
                end;
            elseif v23.props.avatarType ~= v10.AVATAR_TYPE.CUSTOM then
                v23.props.detectTypeWithOrigAvatarType(v23.props.avatarType);
                return ;
            else
                v23.props.doImport(v23.props.avatarType);
                return ;
            end;
        end
    }, {
        tooltip = v1.createElement(v6, {
            Size = v17(v25, v26, v27)
        }, {
            UIListLayout = v1.createElement("UIListLayout", {
                SortOrder = Enum.SortOrder.LayoutOrder
            }),
            UIPadding = v1.createElement("UIPadding", {
                PaddingLeft = UDim.new(0, 5),
                PaddingTop = UDim.new(0, 5)
            }),
            Title = v25 and v1.createElement("TextLabel", {
                ZIndex = 10,
                LayoutOrder = 0,
                BackgroundTransparency = 1,
                Font = v10.FONT_BOLD,
                Size = UDim2.new(1, 0, 0, v10.FONT_SIZE_SMALL),
                TextSize = v10.FONT_SIZE_SMALL,
                TextXAlignment = Enum.TextXAlignment.Left,
                TextYAlignment = Enum.TextYAlignment.Top,
                TextColor3 = l_Studio_0.Theme:GetColor(Enum.StudioStyleGuideColor.MainText, Enum.StudioStyleGuideModifier.Default),
                Text = v25
            }),
            Top = v26 and v1.createElement("TextLabel", {
                ZIndex = 10,
                LayoutOrder = 1,
                BackgroundTransparency = 1,
                Font = v10.FONT,
                Size = UDim2.new(1, 0, 0, v10.FONT_SIZE_SMALL),
                TextSize = v10.FONT_SIZE_SMALL,
                TextXAlignment = Enum.TextXAlignment.Left,
                TextYAlignment = Enum.TextYAlignment.Top,
                TextColor3 = l_Studio_0.Theme:GetColor(Enum.StudioStyleGuideColor.MainText, Enum.StudioStyleGuideModifier.Default),
                Text = v26
            }),
            Bottom = v27 and v1.createElement("TextLabel", {
                ZIndex = 10,
                LayoutOrder = 2,
                BackgroundTransparency = 1,
                Font = v10.FONT,
                Size = UDim2.new(1, 0, 0, v10.FONT_SIZE_SMALL),
                TextSize = v10.FONT_SIZE_SMALL,
                TextXAlignment = Enum.TextXAlignment.Left,
                TextYAlignment = Enum.TextYAlignment.Top,
                TextColor3 = l_Studio_0.Theme:GetColor(Enum.StudioStyleGuideColor.MainText, Enum.StudioStyleGuideModifier.Default),
                Text = v27
            })
        }),
        border = v1.createElement("ImageLabel", {
            BackgroundTransparency = 1,
            Image = v3.BUTTON_AVATAR_TYPE_BORDER,
            ScaleType = Enum.ScaleType.Slice,
            Size = UDim2.new(1, 0, 1, 0),
            SliceCenter = Rect.new(4, 4, 5, 5),
            ImageColor3 = v4({
                Light = Color3.fromRGB(184, 184, 184),
                Dark = Color3.fromRGB(60, 60, 60)
            })
        }),
        icon = v1.createElement("ImageLabel", {
            BackgroundTransparency = 1,
            Position = UDim2.new(0, 28, 0, 17),
            Size = UDim2.new(0, 91, 0, 160),
            Image = v4(v23.props.iconOptions)
        }),
        title = v1.createElement("TextLabel", {
            BackgroundTransparency = 1,
            Font = v10.FONT_SEMIBOLD,
            Position = UDim2.new(0, 0, 0, 188),
            Size = UDim2.new(1, 0, 0, v10.FONT_SIZE_TITLE),
            Text = v23.props.name,
            TextSize = v10.FONT_SIZE_TITLE,
            TextXAlignment = Enum.TextXAlignment.Center,
            TextYAlignment = Enum.TextYAlignment.Top,
            TextColor3 = v4({
                Light = Color3.fromRGB(0, 162, 255),
                Dark = Color3.fromRGB(204, 204, 204)
            })
        })
    });
end;
return v2.connect(nil, function(v37)
    return {
        doImport = function(v38)
            v37(v7(v38));
        end,
        detectType = function()
            v37(v8());
        end,
        detectTypeWithOrigAvatarType = function(v39)
            v37(v9(v39));
        end
    };
end)(v18);


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.RoactRodux);
local v3 = require(l_Parent_0.src.Constants);
local v4 = require(l_Parent_0.src.components.AvatarPrompt);
local v5 = require(l_Parent_0.src.components.LoadingPrompt);
local v6 = require(l_Parent_0.src.components.ErrorPrompt);
local v7 = require(l_Parent_0.src.components.RedirectRigPrompt);
local function _(v8)
    return v8 == v3.SCREENS.AVATAR;
end;
local function _(v10)
    return v10 == v3.SCREENS.LOADING;
end;
local function _(v12)
    return v12 == v3.SCREENS.ERROR;
end;
local function _(v14)
    return v14 == v3.SCREENS.REDIRECT_RIG;
end;
local v16 = v1.Component:extend("AvatarImporter");
v16.render = function(v17)
    local l_screen_0 = v17.props.screen;
    return v1.createElement("Frame", {
        BackgroundTransparency = 1,
        Size = UDim2.new(1, 0, 1, 0)
    }, {
        AvatarPrompt = l_screen_0 == v3.SCREENS.AVATAR and v1.createElement(v4),
        LoadingPrompt = l_screen_0 == v3.SCREENS.LOADING and v1.createElement(v5),
        ErrorPrompt = l_screen_0 == v3.SCREENS.ERROR and v1.createElement(v6),
        RedirectRigPrompt = l_screen_0 == v3.SCREENS.REDIRECT_RIG and v1.createElement(v7)
    });
end;
return v2.connect(function(v19)
    return {
        screen = (v19 or {}).plugin.screen
    };
end)(v16);


local l_Parent_0 = script.Parent.Parent.Parent;
local l_GuiService_0 = game:GetService("GuiService");
local _ = game:GetService("HttpRbxApiService");
local v3 = require(l_Parent_0.Packages.Roact);
local v4 = require(l_Parent_0.src.Assets);
local v5 = require(l_Parent_0.src.components.AvatarButton);
local v6 = require(l_Parent_0.src.Constants);
local v7 = require(l_Parent_0.src.utils.themeConfig);
local v8 = require(l_Parent_0.src.utils.getTextWidth);
local v9 = require(l_Parent_0.src.flags.getFFlagShowAvatarImportDeprecation);
local v10 = require(l_Parent_0.src.flags.getFFlagShowAvatarImportDeprecationWithRedirect);
local v11 = require(l_Parent_0.src.flags.getFStringAvatarImportDeprecationMessage);
local v12 = require(l_Parent_0.src.flags.getFStringAvatarImportDevForumLink);
local l_Studio_0 = settings().Studio;
local v14 = v3.Component:extend("AvatarPrompt");
v14.init = function(v15)
    v15.openDevForum = function()
        l_GuiService_0:OpenBrowserWindow(v12());
    end;
end;
v14.render = function(v16)
    local v17 = 0;
    local v18 = nil;
    if not v10() then
        if v9() then
            v17 = 28;
            v18 = v3.createElement("TextLabel", {
                BackgroundColor3 = v6.WARNING_COLOR,
                BorderSizePixel = 0,
                Font = v6.FONT,
                Name = "DeprecationBanner",
                Position = UDim2.new(0, 0, 0, 0),
                Size = UDim2.new(1, 0, 0, 28),
                Text = v11(),
                TextSize = v6.FONT_SIZE_LARGE,
                TextXAlignment = Enum.TextXAlignment.Center,
                TextYAlignment = Enum.TextYAlignment.Center,
                TextColor3 = v6.WARNING_TEXT_COLOR
            });
        end;
    else
        v17 = 28;
        v18 = v3.createElement("TextButton", {
            BackgroundColor3 = v6.WARNING_COLOR,
            BorderSizePixel = 0,
            Font = v6.FONT,
            Name = "DeprecationBanner",
            Position = UDim2.new(0, 0, 0, 0),
            Size = UDim2.new(1, 0, 0, 28),
            Text = ("%* %*"):format(v11(), v6.CLICK_HERE),
            TextSize = v6.FONT_SIZE_LARGE,
            TextXAlignment = Enum.TextXAlignment.Center,
            TextYAlignment = Enum.TextYAlignment.Center,
            TextColor3 = v6.WARNING_TEXT_COLOR,
            [v3.Event.Activated] = v16.openDevForum
        });
    end;
    return v3.createElement("Frame", {
        Name = "AvatarPrompt",
        Size = UDim2.new(1, 0, 1, 0),
        BackgroundColor3 = l_Studio_0.Theme:GetColor(Enum.StudioStyleGuideColor.MainBackground, Enum.StudioStyleGuideModifier.Default)
    }, {
        content = v3.createElement("Frame", {
            BackgroundTransparency = 1,
            Name = "Content",
            Position = UDim2.new(0, 0, 0, 0),
            Size = UDim2.new(1, 0, 1, 0)
        }, {
            deprecationBanner = v18,
            topDescription = v3.createElement("TextLabel", {
                BackgroundTransparency = 1,
                Font = v6.FONT,
                Name = "TopDescription",
                Position = UDim2.new(0, 0, 0, 20 + v17),
                Size = UDim2.new(1, 0, 0, 18),
                Text = "Choose the Avatar type you are going to import:",
                TextSize = v6.FONT_SIZE_LARGE,
                TextXAlignment = Enum.TextXAlignment.Center,
                TextYAlignment = Enum.TextYAlignment.Top,
                TextColor3 = l_Studio_0.Theme:GetColor(Enum.StudioStyleGuideColor.MainText, Enum.StudioStyleGuideModifier.Default)
            }),
            buttons = v3.createElement("Frame", {
                BackgroundTransparency = 1,
                Name = "Buttons",
                Position = UDim2.new(0, v6.BUTTON_SIDE_PADDING, 0, v6.BUTTON_TOP_PADDING + v17),
                Size = UDim2.new(1, -v6.BUTTON_SIDE_PADDING * 2, 0, v6.BUTTON_HEIGHT)
            }, {
                buttonsListLayout = v3.createElement("UIListLayout", {
                    FillDirection = Enum.FillDirection.Horizontal,
                    Padding = UDim.new(0, v6.BUTTON_CENTER_PADDING),
                    SortOrder = Enum.SortOrder.LayoutOrder
                }),
                rthroButton = v3.createElement(v5, {
                    name = "Rthro",
                    avatarType = v6.AVATAR_TYPE.RTHRO,
                    iconOptions = v4.RTHRO,
                    contextInfo = v6.RTHRO_INFO,
                    layoutOrder = 0
                }),
                rthroNarrowButton = v3.createElement(v5, {
                    name = "Rthro Narrow",
                    avatarType = v6.AVATAR_TYPE.RTHRO_SLENDER,
                    iconOptions = v4.RTHRO_NARROW,
                    contextInfo = v6.RTHRO_SLENDER_INFO,
                    layoutOrder = 1
                }),
                r15Button = v3.createElement(v5, {
                    name = "R15",
                    avatarType = v6.AVATAR_TYPE.R15,
                    iconOptions = v4.R15,
                    contextInfo = v6.R15_INFO,
                    layoutOrder = 2
                }),
                customButton = v3.createElement(v5, {
                    name = "Custom",
                    avatarType = v6.AVATAR_TYPE.CUSTOM,
                    iconOptions = v4.CUSTOM,
                    contextInfo = v6.CUSTOM_INFO,
                    layoutOrder = 3
                })
            }),
            bottomDescription = v3.createElement("Frame", {
                BackgroundTransparency = 1,
                Position = UDim2.new(0, 0, 0, 307 + v17),
                Size = UDim2.new(1, 0, 1, -(307 + v17))
            }, {
                bottomDescriptionListLayout = v3.createElement("UIListLayout", {
                    FillDirection = Enum.FillDirection.Vertical,
                    HorizontalAlignment = Enum.HorizontalAlignment.Center,
                    SortOrder = Enum.SortOrder.LayoutOrder
                }),
                requirementsText = v3.createElement("TextLabel", {
                    BackgroundTransparency = 1,
                    Font = v6.FONT,
                    LayoutOrder = 0,
                    Size = UDim2.new(0, v8(v6.REQUIREMENTS_DESCRIPTION, v6.FONT_SIZE_SMALL, v6.FONT), 0, v6.FONT_SIZE_SMALL),
                    Text = v6.REQUIREMENTS_DESCRIPTION,
                    TextSize = v6.FONT_SIZE_SMALL,
                    TextXAlignment = Enum.TextXAlignment.Center,
                    TextYAlignment = Enum.TextYAlignment.Center,
                    TextColor3 = v7({
                        Light = Color3.fromRGB(98, 98, 98),
                        Dark = Color3.fromRGB(204, 204, 204)
                    })
                }),
                infoLink = false
            })
        })
    });
end;
return v14;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.src.Assets);
local v3 = require(l_Parent_0.src.utils.themeConfig);
local v4 = require(l_Parent_0.src.Constants);
local v5 = {
    Default = {
        Light = Color3.fromRGB(255, 255, 255),
        Dark = Color3.fromRGB(60, 60, 60)
    },
    Hover = {
        Light = Color3.fromRGB(228, 238, 254),
        Dark = Color3.fromRGB(66, 66, 66)
    }
};
local v6 = {
    Default = {
        Light = Color3.fromRGB(0, 162, 255),
        Dark = Color3.fromRGB(0, 162, 255)
    },
    Hover = {
        Light = Color3.fromRGB(50, 181, 255),
        Dark = Color3.fromRGB(50, 181, 255)
    }
};
local v7 = {
    Light = Color3.fromRGB(0, 0, 0),
    Dark = Color3.fromRGB(255, 255, 255)
};
local v8 = {
    Light = Color3.fromRGB(255, 255, 255),
    Dark = Color3.fromRGB(255, 255, 255)
};
local v9 = {
    Light = Color3.fromRGB(184, 184, 184),
    Dark = Color3.fromRGB(60, 60, 60)
};
local v10 = {
    Light = Color3.fromRGB(0, 162, 255),
    Dark = Color3.fromRGB(0, 162, 255)
};
local v11 = v1.Component:extend("CustomTextButton");
v11.init = function(v12)
    v12.state = {
        hovered = false,
        pressed = false
    };
end;
v11.getButtonThemeConfig = function(v13)
    local _ = nil;
    return v3(if not v13.props.isMain then if v13.state.pressed or v13.state.hovered then v5.Hover else v5.Default else if v13.state.pressed or v13.state.hovered then v6.Hover else v6.Default);
end;
v11.getLabelThemeConfig = function(v15)
    return v3(not not v15.props.isMain and v8 or v7);
end;
v11.getBorderThemeConfig = function(v16)
    return v3(not not v16.props.isMain and v10 or v9);
end;
v11.render = function(v17)
    return v1.createElement("ImageButton", {
        BackgroundTransparency = 1,
        Image = v2.BUTTON_AVATAR_TYPE,
        ScaleType = Enum.ScaleType.Slice,
        Size = not not v17.props.isLarge and UDim2.new(0, 192, 0, 34) or UDim2.new(0, 102, 0, 34),
        SliceCenter = Rect.new(4, 4, 5, 5),
        ImageColor3 = v17:getButtonThemeConfig(),
        LayoutOrder = v17.props.layoutOrder,
        [v1.Event.InputBegan] = function(_, v19)
            if v19.UserInputType == Enum.UserInputType.MouseMovement then
                v17:setState({
                    hovered = true
                });
            end;
        end,
        [v1.Event.InputEnded] = function(_, v21)
            if v21.UserInputType == Enum.UserInputType.MouseMovement then
                v17:setState({
                    hovered = false,
                    pressed = false
                });
            end;
        end,
        [v1.Event.MouseButton1Down] = function()
            v17:setState({
                pressed = true
            });
        end,
        [v1.Event.MouseButton1Up] = function()
            v17:setState({
                pressed = false
            });
        end,
        [v1.Event.MouseButton1Click] = v17.props[v1.Event.MouseButton1Click]
    }, {
        border = v1.createElement("ImageLabel", {
            BackgroundTransparency = 1,
            Image = v2.BUTTON_AVATAR_TYPE_BORDER,
            ScaleType = Enum.ScaleType.Slice,
            Size = UDim2.new(1, 0, 1, 0),
            SliceCenter = Rect.new(4, 4, 5, 5),
            ImageColor3 = v17:getBorderThemeConfig()
        }),
        label = v1.createElement("TextLabel", {
            BackgroundTransparency = 1,
            Font = v4.FONT,
            Size = UDim2.new(1, 0, 1, 0),
            TextSize = v4.FONT_SIZE_TITLE,
            Text = v17.props.labelText,
            TextColor3 = v17:getLabelThemeConfig()
        })
    });
end;
return v11;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local l_Studio_0 = settings().Studio;
local v3 = require(l_Parent_0.src.Constants);
local v4 = v1.Component:extend("LoadingPrompt");
v4.render = function(_)
    return v1.createElement("ImageLabel", {
        Name = "LoadingPrompt",
        Size = UDim2.new(1, 0, 1, 0),
        BackgroundColor3 = l_Studio_0.Theme:GetColor(Enum.StudioStyleGuideColor.MainBackground, Enum.StudioStyleGuideModifier.Default)
    }, {
        description = v1.createElement("TextLabel", {
            AnchorPoint = Vector2.new(0.5, 0.5),
            BackgroundTransparency = 1,
            Font = v3.FONT,
            Name = "Description",
            Position = UDim2.new(0.5, 0, 0.5, 0),
            Size = UDim2.new(1, 0, 1, 0),
            Text = "Importing Avatar, please wait...",
            TextSize = v3.FONT_SIZE_MEDIUM,
            TextXAlignment = Enum.TextXAlignment.Center,
            TextYAlignment = Enum.TextYAlignment.Center,
            TextColor3 = l_Studio_0.Theme:GetColor(Enum.StudioStyleGuideColor.MainText, Enum.StudioStyleGuideModifier.Default)
        })
    });
end;
return v4;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.RoactRodux);
local v3 = require(l_Parent_0.src.Constants);
local v4 = require(l_Parent_0.src.components.CustomTextButton);
local v5 = require(l_Parent_0.src.thunks.ImportWithoutSceneLoad);
local l_Studio_0 = settings().Studio;
local v7 = v1.Component:extend("RedirectRigPrompt");
v7.render = function(v8)
    local function v9()
        if v8.props.avatarType == v3.AVATAR_TYPE.RTHRO_SLENDER then
            v8.props.doImportWithoutSceneLoad(v3.AVATAR_TYPE.RTHRO_SLENDER);
            return ;
        elseif v8.props.avatarType == v3.AVATAR_TYPE.RTHRO then
            v8.props.doImportWithoutSceneLoad(v3.AVATAR_TYPE.RTHRO);
            return ;
        else
            v8.props.doImportWithoutSceneLoad(v3.AVATAR_TYPE.R15);
            return ;
        end;
    end;
    local function v10()
        v8.props.doImportWithoutSceneLoad(v3.AVATAR_TYPE.CUSTOM);
    end;
    local v11 = v8.props.avatarType == v3.AVATAR_TYPE.RTHRO_SLENDER and "Rthro Narrow" or v8.props.avatarType;
    local v12 = (not (v8.props.avatarType ~= v3.AVATAR_TYPE.CUSTOM) or v8.props.avatarType == nil) and "You are trying to import a R15 rig as Custom:" or "You are trying to import a Custom rig as " .. v11 .. ":";
    local v13 = "Continue as R15";
    if v8.props.avatarType ~= v3.AVATAR_TYPE.CUSTOM then
        v13 = "Continue as " .. v11;
    end;
    return v1.createElement("Frame", {
        Name = "RedirectRigPrompt",
        Size = UDim2.new(1, 0, 1, 0),
        BackgroundColor3 = l_Studio_0.Theme:GetColor(Enum.StudioStyleGuideColor.MainBackground, Enum.StudioStyleGuideModifier.Default)
    }, {
        header = v1.createElement("TextLabel", {
            BackgroundTransparency = 1,
            Font = v3.FONT_BOLD,
            Position = UDim2.new(0, 0, 0, 123),
            Size = UDim2.new(1, 0, 0, 18),
            Text = v12,
            TextSize = v3.FONT_SIZE_MEDIUM,
            TextXAlignment = Enum.TextXAlignment.Center,
            TextYAlignment = Enum.TextYAlignment.Center,
            TextColor3 = l_Studio_0.Theme:GetColor(Enum.StudioStyleGuideColor.MainText, Enum.StudioStyleGuideModifier.Default)
        }),
        buttons = v1.createElement("Frame", {
            BackgroundTransparency = 1,
            Position = UDim2.new(0, 0, 1, -123),
            Size = UDim2.new(1, 0, 0, 34)
        }, {
            buttonsListLayout = v1.createElement("UIListLayout", {
                Padding = UDim.new(0, 21),
                FillDirection = Enum.FillDirection.Horizontal,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                SortOrder = Enum.SortOrder.LayoutOrder
            }),
            cancelButton = v1.createElement(v4, {
                Name = "R15Button",
                labelText = v13,
                layoutOrder = 0,
                isLarge = true,
                [v1.Event.MouseButton1Click] = v9
            }),
            retryButton = v1.createElement(v4, {
                Name = "CustomButton",
                labelText = "Continue as Custom",
                layoutOrder = 1,
                isLarge = true,
                [v1.Event.MouseButton1Click] = v10
            })
        })
    });
end;
return v2.connect(function(v14)
    return {
        avatarType = (v14 or {}).plugin.avatarType
    };
end, function(v15)
    return {
        doImportWithoutSceneLoad = function(v16)
            v15(v5(v16));
        end
    };
end)(v7);


local l_Parent_0 = script.Parent.Parent.Parent;
local l_RunService_0 = game:GetService("RunService");
local v2 = require(l_Parent_0.Packages.Roact);
local l_Studio_0 = settings().Studio;
local v4 = v2.Component:extend("Tooltip");
v4.init = function(v5)
    v5.detectorRef = v2.createRef();
    v5.state = {
        show = false
    };
    v5.targetTime = math.huge;
    v5.mouseEnter = function(_, v7, v8)
        v5.mouseX = v7;
        v5.mouseY = v8;
        v5:resetTargetTime();
        v5:disconnectHeartbeat();
        v5.heartbeatConn = l_RunService_0.Heartbeat:Connect(function()
            if v5.targetTime <= tick() then
                v5.heartbeatConn:Disconnect();
                v5:setState({
                    show = true,
                    tooltipPosition = v5:getPosition()
                });
            end;
        end);
    end;
    v5.mouseMoved = function(_, v10, v11)
        v5.mouseX = v10;
        v5.mouseY = v11;
        v5:resetTargetTime();
    end;
    v5.mouseLeave = function()
        v5:disconnectHeartbeat();
        v5:setState({
            show = false
        });
    end;
end;
v4.disconnectHeartbeat = function(v12)
    if v12.heartbeatConn then
        v12.heartbeatConn:Disconnect();
        v12.heartbeatConn = nil;
    end;
end;
v4.resetTargetTime = function(v13)
    v13.targetTime = tick() + (v13.props.showDelay or 0.5);
end;
v4.getPosition = function(v14)
    local v15 = v14.detectorRef:getValue();
    if not v15 then
        return ;
    else
        local l_AbsolutePosition_0 = v15.AbsolutePosition;
        return UDim2.new(0, (v14.mouseX - l_AbsolutePosition_0.X) + 13, 0, (v14.mouseY - l_AbsolutePosition_0.Y) + 23);
    end;
end;
v4.render = function(v17)
    return v2.createElement("Frame", {
        Size = UDim2.new(1, 0, 1, 0),
        BackgroundTransparency = 1,
        [v2.Ref] = v17.detectorRef,
        [v2.Event.MouseEnter] = v17.mouseEnter,
        [v2.Event.MouseMoved] = v17.mouseMoved,
        [v2.Event.MouseLeave] = v17.mouseLeave
    }, {
        Tooltip = v17.state.show and v2.createElement("Frame", {
            ZIndex = 10,
            Position = v17.state.tooltipPosition,
            Size = v17.props.Size,
            Visible = v17.props.enabled,
            BackgroundColor3 = l_Studio_0.Theme:GetColor(Enum.StudioStyleGuideColor.MainBackground, Enum.StudioStyleGuideModifier.Default),
            BorderColor3 = l_Studio_0.Theme:GetColor(Enum.StudioStyleGuideColor.Border, Enum.StudioStyleGuideModifier.Default)
        }, v17.props[v2.Children])
    });
end;
return v4;


local v0 = {};
local l_StarterPlayer_0 = game:GetService("StarterPlayer");
local function v3()
    while true do
        local l_StarterCharacter_0 = l_StarterPlayer_0:FindFirstChild("StarterCharacter");
        if l_StarterCharacter_0 then
            l_StarterCharacter_0:Destroy();
        else
            break;
        end;
    end;
end;
local function v7(v4)
    for _, v6 in pairs(workspace:GetChildren()) do
        if v6:IsA("Accessory") then
            v6:Clone().Parent = v4;
        end;
    end;
end;
v0.SetupCharacterForTesting = function(v8)
    if v8 then
        v3();
        local v9 = v8:Clone();
        v7(v9);
        v9.Name = "StarterCharacter";
        v9.Parent = l_StarterPlayer_0;
        return ;
    else
        return ;
    end;
end;
return v0;


local v0 = {};
v0.__index = v0;
local v1 = require(script.Parent.RigFunctions);
local v2 = require(script.Parent.CharacterTester);
local v3 = require(script.Parent.Constants);
v0.new = function(v4)
    local v5 = setmetatable({}, v0);
    v5._enabled = false;
    v5._configureFrame = nil;
    v5._r15Avatar = nil;
    v5._r15Fixed = nil;
    v5._r6Avatar = nil;
    v5._r15TexturesMap = {};
    v5._r6TexturesMap = {};
    v5._r6MeshesMap = {};
    v5._faceTextureId = nil;
    v5._onConfigureStarted = Instance.new("BindableEvent");
    v5:_constructUI(v4);
    v5:_setupExistingRigs();
    return v5;
end;
v0.ConfigureImportedAvatar = function(v6, v7)
    local v8 = v1.CreateImportedFbxModel(v7);
    v6._r15Avatar = v8:FindFirstChild(v3.R15_ARTIST_INTENT_FOLDER_NAME);
    v6._r15Fixed = v8:FindFirstChild(v3.R15_FIXED_FOLDER_NAME);
    v6._r6Avatar = v8:FindFirstChild(v3.R6_FOLDER_NAME);
    v1.MakeExportVersion(v8);
    v6._onConfigureStarted:Fire(v6._r15Avatar, v6._r6Avatar);
    v6:setEnabled(true);
end;
v0.ConfigureExistingAvatar = function(v9, v10)
    v9._r15Avatar = v10:FindFirstChild(v3.R15_ARTIST_INTENT_FOLDER_NAME);
    v9._r15Fixed = v10:FindFirstChild(v3.R15_FIXED_FOLDER_NAME);
    v9._r6Avatar = v10:FindFirstChild(v3.R6_FOLDER_NAME);
    v1.MakeExportVersion(v10);
    v9._onConfigureStarted:Fire(v9._r15Avatar, v9._r6Avatar);
    v9:setEnabled(true);
end;
v0._setupExistingRigs = function(v11)
    local v12 = v1.FindExistingImportedFbx();
    if v12 then
        v11._r15Avatar = v12:FindFirstChild(v3.R15_ARTIST_INTENT_FOLDER_NAME);
        v11._r6Avatar = v12:FindFirstChild(v3.R6_FOLDER_NAME);
        v11._onConfigureStarted:Fire(v11._r15Avatar, v11._r6Avatar);
    end;
end;
v0.setEnabled = function(v13, v14)
    v13._enabled = v14;
    v13._configureFrame.Visible = v13._enabled;
end;
v0._onFinished = function(v15)
    v1.CopyTexturesToRig(v15._r15TexturesMap, v15._r15Avatar);
    v1.AddFaceToRig(v15._faceTextureId, v15._r15Avatar);
    v1.CopyTexturesToRig(v15._r15TexturesMap, v15._r15Fixed);
    v1.AddFaceToRig(v15._faceTextureId, v15._r15Fixed);
    v1.CopyCharacterMeshesToRig(v15._r6MeshesMap, v15._r6Avatar);
    v1.CopyTexturesToRig(v15._r6TexturesMap, v15._r6Avatar);
    v1.AddFaceToRig(v15._faceTextureId, v15._r6Avatar);
    v15:setEnabled(false);
end;
v0._onCancel = function(v16)
    v16:setEnabled(false);
end;
local function v31(v17, v18, v19)
    local function _(v20, v21, v22)
        if v22 ~= "" and string.find(v22, "<") == nil then
            v21.Text = v1.RemoveAssetUrlFromText(v22);
            v17[v20.Name] = v21.Text;
        end;
    end;
    for _, v25 in pairs(v18) do
        local l_v25_FirstChild_0 = v25:FindFirstChild(v19);
        if l_v25_FirstChild_0 then
            l_v25_FirstChild_0:GetPropertyChangedSignal("Text"):Connect(function()
                local l_v25_0 = v25;
                local l_l_v25_FirstChild_0_0 = l_v25_FirstChild_0;
                local l_Text_0 = l_v25_FirstChild_0.Text;
                if l_Text_0 ~= "" and string.find(l_Text_0, "<") == nil then
                    l_l_v25_FirstChild_0_0.Text = v1.RemoveAssetUrlFromText(l_Text_0);
                    v17[l_v25_0.Name] = l_l_v25_FirstChild_0_0.Text;
                end;
            end);
            local l_Text_1 = l_v25_FirstChild_0.Text;
            if l_Text_1 ~= "" and string.find(l_Text_1, "<") == nil then
                l_v25_FirstChild_0.Text = v1.RemoveAssetUrlFromText(l_Text_1);
                v17[v25.Name] = l_v25_FirstChild_0.Text;
            end;
        else
            warn("Broken entry box for field " .. v19 .. "\n" .. "Traceback: " .. debug.traceback());
        end;
    end;
end;
local function v37(v32)
    local function _(v33)
        v33.Focused:Connect(function()
            if string.find(v33.Text, "<") ~= nil then
                v33.Text = "";
            end;
        end);
    end;
    for _, v36 in pairs(v32:GetChildren()) do
        if v36:IsA("TextBox") then
            v36.Focused:Connect(function()
                if string.find(v36.Text, "<") ~= nil then
                    v36.Text = "";
                end;
            end);
        end;
    end;
end;
v0._entryBoxListSetup = function(_, v39, v40, v41)
    local v42 = {};
    table.sort(v41);
    for v43, v44 in pairs(v41) do
        local v45 = v40:Clone();
        local v46 = (v43 - 1) * v45.Size.Y.Offset;
        v45.Name = v44;
        v45.Position = v40.Position + UDim2.new(0, 0, 0, v46);
        v45.Description.Text = v44;
        v37(v45);
        v42[#v42 + 1] = v45;
        v45.Parent = v39;
    end;
    return v42;
end;
local function _(v47)
    local l_Frame_0 = Instance.new("Frame");
    l_Frame_0.Name = "EntryBox";
    l_Frame_0.BackgroundTransparency = 1;
    l_Frame_0.BorderSizePixel = 0;
    l_Frame_0.Size = UDim2.new(1, -10, 0, 25);
    l_Frame_0.Position = v47;
    return l_Frame_0;
end;
local function v54(v50, v51, v52)
    local l_TextBox_0 = Instance.new("TextBox");
    l_TextBox_0.Name = v51;
    l_TextBox_0.Text = "<" .. v51 .. ">";
    l_TextBox_0.BackgroundColor3 = Color3.fromRGB(70, 70, 70);
    l_TextBox_0.BorderColor3 = Color3.fromRGB(49, 49, 49);
    l_TextBox_0.Position = v52;
    l_TextBox_0.Size = UDim2.new(0.5, 0, 0, 25);
    l_TextBox_0.Font = Enum.Font.SourceSans;
    l_TextBox_0.TextColor3 = Color3.fromRGB(255, 255, 255);
    l_TextBox_0.TextSize = 14;
    l_TextBox_0.TextStrokeTransparency = 1;
    l_TextBox_0.Parent = v50;
    return l_TextBox_0;
end;
local function v59(v55)
    local v56 = UDim2.new(0, 5, 0, 0);
    local l_Frame_1 = Instance.new("Frame");
    l_Frame_1.Name = "EntryBox";
    l_Frame_1.BackgroundTransparency = 1;
    l_Frame_1.BorderSizePixel = 0;
    l_Frame_1.Size = UDim2.new(1, -10, 0, 25);
    l_Frame_1.Position = v56;
    local l_l_Frame_1_0 = l_Frame_1;
    v56 = Instance.new("TextLabel");
    v56.Name = "Description";
    v56.BackgroundTransparency = 1;
    v56.BorderSizePixel = 0;
    v56.Position = UDim2.new(0, 0, 0, 0);
    v56.Size = UDim2.new(0.5, -5, 0, 25);
    v56.Font = Enum.Font.SourceSansBold;
    v56.TextSize = 14;
    v56.TextColor3 = Color3.fromRGB(255, 255, 255);
    v56.TextStrokeTransparency = 1;
    v56.Parent = l_l_Frame_1_0;
    v54(l_l_Frame_1_0, v55, UDim2.new(0.5, 0, 0, 0));
    return l_l_Frame_1_0;
end;
local function v63(v60, v61)
    local l_TextLabel_0 = Instance.new("TextLabel");
    l_TextLabel_0.Name = "SubTitle";
    l_TextLabel_0.BackgroundTransparency = 1;
    l_TextLabel_0.Position = UDim2.new(0, 0, 0, 0);
    l_TextLabel_0.Size = UDim2.new(1, 0, 0, 20);
    l_TextLabel_0.Font = Enum.Font.SourceSansBold;
    l_TextLabel_0.TextColor3 = Color3.fromRGB(255, 165, 10);
    l_TextLabel_0.TextSize = 18;
    l_TextLabel_0.TextStrokeTransparency = 1;
    l_TextLabel_0.Text = v61;
    l_TextLabel_0.BorderSizePixel = 0;
    l_TextLabel_0.Parent = v60;
end;
local function v68(v64, v65, v66)
    local l_TextLabel_1 = Instance.new("TextLabel");
    l_TextLabel_1.Name = "Instructions";
    l_TextLabel_1.BackgroundTransparency = 1;
    l_TextLabel_1.BorderSizePixel = 0;
    l_TextLabel_1.Position = v66;
    l_TextLabel_1.Size = UDim2.new(1, 0, 0, 20);
    l_TextLabel_1.Font = Enum.Font.SourceSansBold;
    l_TextLabel_1.Text = v65;
    l_TextLabel_1.TextColor3 = Color3.fromRGB(255, 255, 255);
    l_TextLabel_1.TextStrokeTransparency = 1;
    l_TextLabel_1.TextSize = 14;
    l_TextLabel_1.Parent = v64;
end;
v0._constructR6TextureBoxes = function(v69, v70)
    local v71 = UDim2.new(0, 5, 0, 45);
    local l_Frame_2 = Instance.new("Frame");
    l_Frame_2.Name = "EntryBox";
    l_Frame_2.BackgroundTransparency = 1;
    l_Frame_2.BorderSizePixel = 0;
    l_Frame_2.Size = UDim2.new(1, -10, 0, 25);
    l_Frame_2.Position = v71;
    local l_l_Frame_2_0 = l_Frame_2;
    v71 = v54(l_l_Frame_2_0, "BaseTextureId", UDim2.new(0, 0, 0, 0));
    l_Frame_2 = v54(l_l_Frame_2_0, "OverlayTextureId", UDim2.new(0.5, 0, 0, 0));
    v37(l_l_Frame_2_0);
    local function _(v74)
        local l_Text_2 = v74.Text;
        if l_Text_2 ~= "" and string.find(l_Text_2, "<") == nil then
            v74.Text = v1.RemoveAssetUrlFromText(l_Text_2);
            v69._r6TexturesMap[v74.Name] = v74.Text;
        end;
    end;
    v71:GetPropertyChangedSignal("Text"):Connect(function()
        local l_v71_0 = v71;
        local l_Text_3 = l_v71_0.Text;
        if l_Text_3 ~= "" and string.find(l_Text_3, "<") == nil then
            l_v71_0.Text = v1.RemoveAssetUrlFromText(l_Text_3);
            v69._r6TexturesMap[l_v71_0.Name] = l_v71_0.Text;
        end;
    end);
    l_Frame_2:GetPropertyChangedSignal("Text"):Connect(function()
        local l_l_Frame_2_1 = l_Frame_2;
        local l_Text_4 = l_l_Frame_2_1.Text;
        if l_Text_4 ~= "" and string.find(l_Text_4, "<") == nil then
            l_l_Frame_2_1.Text = v1.RemoveAssetUrlFromText(l_Text_4);
            v69._r6TexturesMap[l_l_Frame_2_1.Name] = l_l_Frame_2_1.Text;
        end;
    end);
    v69._onConfigureStarted.Event:Connect(function(_, v82)
        v69._r6TexturesMap = {};
        local v83 = v1.GetCharacterMeshPropertyFromRig(v82, v71.Name);
        if v83 then
            v71.Text = v1.RemoveAssetUrlFromText(v83);
        end;
        local v84 = v1.GetCharacterMeshPropertyFromRig(v82, l_Frame_2.Name);
        if v84 then
            l_Frame_2.Text = v1.RemoveAssetUrlFromText(v84);
        end;
        local l_v71_1 = v71;
        local l_Text_5 = l_v71_1.Text;
        if l_Text_5 ~= "" and string.find(l_Text_5, "<") == nil then
            l_v71_1.Text = v1.RemoveAssetUrlFromText(l_Text_5);
            v69._r6TexturesMap[l_v71_1.Name] = l_v71_1.Text;
        end;
        l_v71_1 = l_Frame_2;
        l_Text_5 = l_v71_1.Text;
        if l_Text_5 ~= "" and string.find(l_Text_5, "<") == nil then
            l_v71_1.Text = v1.RemoveAssetUrlFromText(l_Text_5);
            v69._r6TexturesMap[l_v71_1.Name] = l_v71_1.Text;
        end;
    end);
    l_l_Frame_2_0.Parent = v70;
end;
v0._constructR6MeshBoxes = function(v87, v88)
    local l_Frame_3 = Instance.new("Frame");
    l_Frame_3.Name = "CharacterMeshIDs";
    l_Frame_3.BackgroundTransparency = 1;
    l_Frame_3.BorderSizePixel = 0;
    l_Frame_3.Size = UDim2.new(1, 0, 0, 175);
    l_Frame_3.Position = UDim2.new(0, 0, 0, 125);
    local v90 = v59("MeshId");
    v87._onConfigureStarted.Event:Connect(function(_, v92)
        l_Frame_3:ClearAllChildren();
        local v93 = v87:_entryBoxListSetup(l_Frame_3, v90, (v1.GetBodyPartNames()));
        for _, v95 in pairs(v93) do
            local v96 = v1.GetCurrentCharacterMeshIdFromRig(v92, v95.Name);
            if v96 then
                v95.MeshId.Text = v96;
            end;
        end;
        v87._r6MeshesMap = {};
        v31(v87._r6MeshesMap, v93, "MeshId");
    end);
    l_Frame_3.Parent = v88;
end;
v0._constructFaceTextureEntry = function(v97, v98)
    local v99 = v59("TextureId");
    v99.Position = UDim2.new(0, 5, 0, 315);
    local function _(v100)
        if v100 ~= "" and string.find(v100, "<") == nil then
            v99.TextureId.Text = v1.RemoveAssetUrlFromText(v100);
            v97._faceTextureId = v99.TextureId.Text;
        end;
    end;
    v99.Description.Text = "Texture ID:";
    v99.TextureId:GetPropertyChangedSignal("Text"):Connect(function()
        local l_Text_6 = v99.TextureId.Text;
        if l_Text_6 ~= "" and string.find(l_Text_6, "<") == nil then
            v99.TextureId.Text = v1.RemoveAssetUrlFromText(l_Text_6);
            v97._faceTextureId = v99.TextureId.Text;
        end;
    end);
    v97._onConfigureStarted.Event:Connect(function(v103, v104)
        local v105 = v1.FindFaceTexture(v103, v104);
        if (v105 and v105 ~= "") and string.find(v105, "<") == nil then
            v99.TextureId.Text = v1.RemoveAssetUrlFromText(v105);
            v97._faceTextureId = v99.TextureId.Text;
        end;
    end);
    v99.Parent = v98;
end;
v0._constructConfigureR6 = function(v106, v107)
    local l_Frame_4 = Instance.new("Frame");
    l_Frame_4.Name = "R6";
    l_Frame_4.BackgroundTransparency = 1;
    l_Frame_4.BorderSizePixel = 0;
    l_Frame_4.Position = UDim2.new(0, 0, 0, 40);
    l_Frame_4.Size = UDim2.new(0.5, 0, 1, -25);
    l_Frame_4.ZIndex = 2;
    v63(l_Frame_4, "R6");
    v68(l_Frame_4, "Enter Texture IDs", UDim2.new(0, 5, 0, 20));
    v106:_constructR6TextureBoxes(l_Frame_4);
    v68(l_Frame_4, "Enter Character Mesh IDs", UDim2.new(0, 5, 0, 100));
    v106:_constructR6MeshBoxes(l_Frame_4);
    v68(l_Frame_4, "Face Texture ID", UDim2.new(0, 5, 0, 290));
    v106:_constructFaceTextureEntry(l_Frame_4);
    l_Frame_4.Parent = v107;
end;
v0._constructConfigureTextures = function(v109, v110)
    local l_Frame_5 = Instance.new("Frame");
    l_Frame_5.Name = "TextureIDs";
    l_Frame_5.BackgroundTransparency = 1;
    l_Frame_5.BorderSizePixel = 0;
    l_Frame_5.Size = UDim2.new(1, 0, 1, -20);
    l_Frame_5.Position = UDim2.new(0, 0, 0, 45);
    local v112 = v59("TextureID");
    v109._onConfigureStarted.Event:Connect(function(v113)
        l_Frame_5:ClearAllChildren();
        local v114 = v109:_entryBoxListSetup(l_Frame_5, v112, (v1.GetLimbNames()));
        for _, v116 in pairs(v114) do
            local v117 = v1.GetCurrentTextureIdFromRig(v113, v116.Name);
            if v117 then
                v116.TextureID.Text = v117;
            end;
        end;
        v109._r15TexturesMap = {};
        v31(v109._r15TexturesMap, v114, "TextureID");
    end);
    l_Frame_5.Parent = v110;
end;
v0._constructConfigureR15 = function(v118, v119)
    local l_Frame_6 = Instance.new("Frame");
    l_Frame_6.Name = "R15";
    l_Frame_6.BackgroundTransparency = 1;
    l_Frame_6.BorderSizePixel = 0;
    l_Frame_6.Position = UDim2.new(0.5, 5, 0, 40);
    l_Frame_6.Size = UDim2.new(0.5, -5, 1, -100);
    l_Frame_6.ZIndex = 2;
    v63(l_Frame_6, "R15");
    v68(l_Frame_6, "Enter Texture IDs", UDim2.new(0, 5, 0, 20));
    v118:_constructConfigureTextures(l_Frame_6);
    l_Frame_6.Parent = v119;
end;
v0._constructUI = function(v121, v122)
    local l_Frame_7 = Instance.new("Frame");
    l_Frame_7.Name = "RigConfiguration";
    l_Frame_7.Visible = false;
    l_Frame_7.BackgroundColor3 = Color3.fromRGB(16, 16, 16);
    l_Frame_7.BackgroundTransparency = 0.5;
    l_Frame_7.BorderSizePixel = 0;
    l_Frame_7.Position = UDim2.new(0.5, -300, 0.5, -250);
    l_Frame_7.Size = UDim2.new(0, 600, 0, 400);
    local l_Frame_8 = Instance.new("Frame");
    l_Frame_8.Name = "Divide";
    l_Frame_8.BackgroundColor3 = Color3.fromRGB(255, 165, 10);
    l_Frame_8.BackgroundTransparency = 0;
    l_Frame_8.BorderColor3 = Color3.fromRGB(27, 42, 53);
    l_Frame_8.Position = UDim2.new(0.5, 2, 0, 60);
    l_Frame_8.Size = UDim2.new(0, 2, 1, -66);
    l_Frame_8.Parent = l_Frame_7;
    local l_TextLabel_2 = Instance.new("TextLabel");
    l_TextLabel_2.Name = "Title";
    l_TextLabel_2.Text = "Configure Imported Rig";
    l_TextLabel_2.BackgroundColor3 = Color3.fromRGB(49, 49, 49);
    l_TextLabel_2.BackgroundTransparency = 1;
    l_TextLabel_2.BorderSizePixel = 0;
    l_TextLabel_2.Position = UDim2.new(0, 15, 0, 5);
    l_TextLabel_2.Size = UDim2.new(1, 0, 0, 40);
    l_TextLabel_2.TextSize = 18;
    l_TextLabel_2.Font = Enum.Font.SourceSansBold;
    l_TextLabel_2.TextStrokeTransparency = 1;
    l_TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255);
    l_TextLabel_2.Parent = l_Frame_7;
    local l_TextLabel_3 = Instance.new("TextLabel");
    l_TextLabel_3.Name = "Topbar";
    l_TextLabel_3.BackgroundColor3 = Color3.fromRGB(49, 49, 49);
    l_TextLabel_3.BackgroundTransparency = 0;
    l_TextLabel_3.BorderColor3 = Color3.fromRGB(27, 42, 53);
    l_TextLabel_3.Position = UDim2.new(0, 0, 0, 0);
    l_TextLabel_3.Size = UDim2.new(1, 0, 0, 5);
    l_TextLabel_3.Text = "";
    l_TextLabel_3.Parent = l_Frame_7;
    local l_TextButton_0 = Instance.new("TextButton");
    l_TextButton_0.Name = "Cancel";
    l_TextButton_0.BackgroundColor3 = Color3.fromRGB(132, 132, 132);
    l_TextButton_0.BackgroundTransparency = 0;
    l_TextButton_0.BorderColor3 = Color3.fromRGB(49, 49, 49);
    l_TextButton_0.Position = UDim2.new(1, -270, 1, -40);
    l_TextButton_0.Size = UDim2.new(0, 120, 0, 30);
    l_TextButton_0.Text = "Cancel";
    l_TextButton_0.Font = Enum.Font.SourceSansBold;
    l_TextButton_0.TextColor3 = Color3.fromRGB(255, 255, 255);
    l_TextButton_0.TextSize = 14;
    l_TextButton_0.TextStrokeColor3 = Color3.fromRGB(0, 0, 0);
    l_TextButton_0.TextStrokeTransparency = 0.75;
    l_TextButton_0.MouseButton1Down:Connect(function()
        v121:_onCancel();
    end);
    l_TextButton_0.Parent = l_Frame_7;
    local l_TextButton_1 = Instance.new("TextButton");
    l_TextButton_1.Name = "Done";
    l_TextButton_1.BackgroundColor3 = Color3.fromRGB(255, 165, 10);
    l_TextButton_1.BackgroundTransparency = 0;
    l_TextButton_1.BorderColor3 = Color3.fromRGB(49, 49, 49);
    l_TextButton_1.Position = UDim2.new(1, -140, 1, -40);
    l_TextButton_1.Size = UDim2.new(0, 120, 0, 30);
    l_TextButton_1.Text = "Done";
    l_TextButton_1.Font = Enum.Font.SourceSansBold;
    l_TextButton_1.TextColor3 = Color3.fromRGB(255, 255, 255);
    l_TextButton_1.TextSize = 14;
    l_TextButton_1.TextStrokeColor3 = Color3.fromRGB(0, 0, 0);
    l_TextButton_1.TextStrokeTransparency = 0.75;
    l_TextButton_1.MouseButton1Down:Connect(function()
        v121:_onFinished();
    end);
    l_TextButton_1.Parent = l_Frame_7;
    v121:_constructConfigureR6(l_Frame_7);
    v121:_constructConfigureR15(l_Frame_7);
    l_Frame_7.Parent = v122;
    v121._configureFrame = l_Frame_7;
end;
v0._setupExistingRig = function(v129)
    local v130 = v1.FindExistingImportedFbx();
    if v130 then
        v129._r15Avatar = v130:FindFirstChild(v3.R15_ARTIST_INTENT_FOLDER_NAME);
        v129._r6Avatar = v130:FindFirstChild(v3.R6_FOLDER_NAME);
        if not (not v129._r15Avatar or not v129._r6Avatar) then
            v129._onConfigureStarted:Fire(v129._r15Avatar, v129._r6Avatar);
            v1.MakeExportVersion(v130);
        end;
    end;
end;
v0.createButtons = function(v131, v132, v133)
    v133:CreateButton("Configure Avatar", "Configure FBX imported avatar", "rbxasset://textures/AvatarImporter/fbximportlogo.png").Click:Connect(function()
        local v134 = v1.FindExistingImportedFbx();
        if v134 then
            v131:ConfigureExistingAvatar(v134);
        end;
    end);
    v133:CreateButton("Export Avatar", "Export .rbxm files for imported avatar", "rbxasset://textures/AvatarImporter/fbximportlogo.png").Click:Connect(function()
        v1.Export(v132);
    end);
    v133:CreateButton("Test Avatar", "Click to make imported FBX avatar into StarterCharacter", "").Click:Connect(function()
        v2.SetupCharacterForTesting(v131._r15Avatar);
    end);
end;
return v0;


return {
    R15_ARTIST_INTENT_FOLDER_NAME = "R15ArtistIntent",
    R15_FIXED_FOLDER_NAME = "R15Fixed",
    R6_FOLDER_NAME = "R6",
    IMPORTED_RIGS_MODEL_NAME = "ImportedFbx",
    PACKAGE_EXPORT_MODEL_NAME = "PackageExport",
    DEFAULT_FACE_TEXTURE = "rbxasset://textures/face.png",
    AVATAR_PART_SCALE_TYPE = {
        PROPORTIONS_CLASSIC = "Classic",
        PROPORTIONS_SLENDER = "ProportionsSlender",
        PROPORTIONS_NORMAL = "ProportionsNormal"
    }
};


return {
    R15FixedRigAttachmentMap = {
        RootRigAttachment = Vector3.new(0, 0, 0),
        WaistRigAttachment = Vector3.new(0, 0.4, 0),
        NeckRigAttachment = Vector3.new(0, 2, 0),
        LeftShoulderRigAttachment = Vector3.new(-1, 1.763, 0),
        RightShoulderRigAttachment = Vector3.new(1, 1.763, 0),
        RightElbowRigAttachment = Vector3.new(1.5, 1.035, 0),
        RightWristRigAttachment = Vector3.new(1.5, 0.275, 0),
        LeftElbowRigAttachment = Vector3.new(-1.5, 1.035, 0),
        LeftWristRigAttachment = Vector3.new(-1.5, 0.275, 0),
        RightHipRigAttachment = Vector3.new(0.5, 0, 0),
        RightKneeRigAttachment = Vector3.new(0.5, -0.822, 0),
        RightAnkleRigAttachment = Vector3.new(0.5, -1.748, 0),
        LeftHipRigAttachment = Vector3.new(-0.5, 0, 0),
        LeftKneeRigAttachment = Vector3.new(-0.5, -0.822, 0),
        LeftAnkleRigAttachment = Vector3.new(-0.5, -1.748, 0),
        LeftGripAttachment = Vector3.new(-1.5, 0, 0),
        LeftShoulderAttachment = Vector3.new(-1.5, 1.953, 0),
        RightGripAttachment = Vector3.new(1.5, 0, 0),
        RightShoulderAttachment = Vector3.new(1.5, 1.953, 0),
        BodyFrontAttachment = Vector3.new(0, 1, -0.5),
        BodyBackAttachment = Vector3.new(0, 1, 0.5),
        LeftCollarAttachment = Vector3.new(-1, 2, 0),
        RightCollarAttachment = Vector3.new(1, 2, 0),
        NeckAttachment = Vector3.new(0, 2, 0),
        LeftFootAttachment = Vector3.new(-0.5, -2, 0),
        RightFootAttachment = Vector3.new(0.5, -2, 0),
        WaistCenterAttachment = Vector3.new(0, 0, 0),
        WaistFrontAttachment = Vector3.new(0, 0, -0.5),
        WaistBackAttachment = Vector3.new(0, 0, 0.5),
        FaceCenterAttachment = Vector3.new(0, 2.5, 0),
        FaceFrontAttachment = Vector3.new(0, 2.5, -0.6),
        HairAttachment = Vector3.new(0, 3.1, 0),
        HatAttachment = Vector3.new(0, 3.1, 0)
    },
    AnthroNormalFixedRigAttachmentMap = {
        RootRigAttachment = Vector3.new(0, 0, 0),
        WaistRigAttachment = Vector3.new(0, 0.488, 0),
        NeckRigAttachment = Vector3.new(0, 1.807, 0),
        LeftShoulderRigAttachment = Vector3.new(-0.67, 1.612, 0),
        RightShoulderRigAttachment = Vector3.new(0.67, 1.612, 0),
        RightElbowRigAttachment = Vector3.new(1, 0.592, 0),
        RightWristRigAttachment = Vector3.new(1, -0.331, 0),
        LeftElbowRigAttachment = Vector3.new(-1, 0.592, 0),
        LeftWristRigAttachment = Vector3.new(-1, -0.331, 0),
        RightHipRigAttachment = Vector3.new(0.325, 0, 0),
        RightKneeRigAttachment = Vector3.new(0.325, -1.431, 0),
        RightAnkleRigAttachment = Vector3.new(0.325, -3.031, 0),
        LeftHipRigAttachment = Vector3.new(-0.325, 0, 0),
        LeftKneeRigAttachment = Vector3.new(-0.325, -1.431, 0),
        LeftAnkleRigAttachment = Vector3.new(-0.325, -3.031, 0),
        LeftGripAttachment = Vector3.new(-1, -0.606, 0),
        LeftShoulderAttachment = Vector3.new(-1, 1.877, 0),
        RightGripAttachment = Vector3.new(1, -0.606, 0),
        RightShoulderAttachment = Vector3.new(1, 1.877, 0),
        BodyFrontAttachment = Vector3.new(0, 0.983, -0.335),
        BodyBackAttachment = Vector3.new(0, 0.983, 0.335),
        LeftCollarAttachment = Vector3.new(-0.67, 1.807, 0),
        RightCollarAttachment = Vector3.new(0.67, 1.807, 0),
        NeckAttachment = Vector3.new(0, 1.807, 0),
        LeftFootAttachment = Vector3.new(-0.325, -3.602, 0),
        RightFootAttachment = Vector3.new(0.325, -3.602, 0),
        WaistCenterAttachment = Vector3.new(0, 0, 0),
        WaistFrontAttachment = Vector3.new(0, 0, -0.335),
        WaistBackAttachment = Vector3.new(0, 0, 0.335),
        FaceCenterAttachment = Vector3.new(0, 2.261, 0),
        FaceFrontAttachment = Vector3.new(0, 2.261, -0.45),
        HairAttachment = Vector3.new(0, 2.807, 0),
        HatAttachment = Vector3.new(0, 2.807, 0)
    },
    AnthroSlenderFixedRigAttachmentMap = {
        RootRigAttachment = Vector3.new(0, 0, 0),
        WaistRigAttachment = Vector3.new(0, 0.375, 0),
        NeckRigAttachment = Vector3.new(0, 1.587, 0),
        LeftShoulderRigAttachment = Vector3.new(-0.587, 1.408, 0),
        RightShoulderRigAttachment = Vector3.new(0.587, 1.408, 0),
        RightElbowRigAttachment = Vector3.new(0.881, 0.49, 0),
        RightWristRigAttachment = Vector3.new(0.881, -0.341, 0),
        LeftElbowRigAttachment = Vector3.new(-0.881, 0.49, 0),
        LeftWristRigAttachment = Vector3.new(-0.881, -0.341, 0),
        RightHipRigAttachment = Vector3.new(0.31, 0, 0),
        RightKneeRigAttachment = Vector3.new(0.31, -1.332, 0),
        RightAnkleRigAttachment = Vector3.new(0.31, -2.715, 0),
        LeftHipRigAttachment = Vector3.new(-0.31, 0, 0),
        LeftKneeRigAttachment = Vector3.new(-0.31, -1.332, 0),
        LeftAnkleRigAttachment = Vector3.new(-0.31, -2.715, 0),
        LeftGripAttachment = Vector3.new(-0.881, -0.616, 0),
        LeftShoulderAttachment = Vector3.new(-0.881, 1.647, 0),
        RightGripAttachment = Vector3.new(0.881, -0.616, 0),
        RightShoulderAttachment = Vector3.new(0.881, 1.647, 0),
        BodyFrontAttachment = Vector3.new(0, 0.83, -0.294),
        BodyBackAttachment = Vector3.new(0, 0.83, 0.293),
        LeftCollarAttachment = Vector3.new(-0.587, 1.587, 0),
        RightCollarAttachment = Vector3.new(0.587, 1.587, 0),
        NeckAttachment = Vector3.new(0, 1.587, 0),
        LeftFootAttachment = Vector3.new(-0.31, -3.084, 0),
        RightFootAttachment = Vector3.new(0.31, -3.084, 0),
        WaistCenterAttachment = Vector3.new(0, 0, 0),
        WaistFrontAttachment = Vector3.new(0, 0, -0.294),
        WaistBackAttachment = Vector3.new(0, 0, 0.294),
        FaceCenterAttachment = Vector3.new(0, 2.042, 0),
        FaceFrontAttachment = Vector3.new(0, 2.042, -0.428),
        HairAttachment = Vector3.new(0, 2.587, 0),
        HatAttachment = Vector3.new(0, 2.587, 0)
    }
};