local l_script_FirstAncestor_0 = script:FindFirstAncestor("ExpChat");
local l_Flags_0 = l_script_FirstAncestor_0.Flags;
local v2 = require(l_Flags_0.getEnableChatInputBarConfigurationStyleCustomizations);
local v3 = require(l_Flags_0.getEnablePerBubbleCustomization);
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v5 = require(l_Parent_0.Roact);
local v6 = require(l_Parent_0.Otter);
local l_Dictionary_0 = require(l_Parent_0.llama).Dictionary;
local v8 = require(l_script_FirstAncestor_0.Config);
local v9 = require(l_script_FirstAncestor_0.memoize);
local l_Helpers_0 = l_script_FirstAncestor_0.BubbleChat.Helpers;
local v11 = require(l_Helpers_0.getSpringFromSettings);
local v12 = require(l_Helpers_0.getTextBounds);
local v13 = require(l_Helpers_0.getDictFromBubbleChatMessageProperties);
local v14 = require(l_script_FirstAncestor_0.GlobalFlags);
local v15 = require(l_script_FirstAncestor_0.ClientSettings.ClientSettingsUtility);
local v16 = require(l_script_FirstAncestor_0.Flags.getFFlagFixBubbleChatTailVisible);
local v17 = v5.Component:extend("ChatBubble");
v17.defaultProps = {
    isMostRecent = true,
    text = "",
    timestamp = 0
};
local v20 = v9(function(v18, v19)
    if not v19 then
        return v18;
    else
        return l_Dictionary_0.join(v18, v13(v19));
    end;
end);
v17.init = function(v21)
    local v22, v23 = v5.createBinding(0);
    v21.width = v22;
    v21.updateWidth = v23;
    v21.widthMotor = v6.createSingleMotor(0);
    v21.widthMotor:onStep(function(v24)
        v21.updateWidth((math.round(v24)));
    end);
    v22, v23 = v5.createBinding(0);
    v21.height = v22;
    v21.updateHeight = v23;
    v21.heightMotor = v6.createSingleMotor(0);
    v21.heightMotor:onStep(function(v25)
        v21.updateHeight((math.round(v25)));
    end);
    v22, v23 = v5.createBinding(1);
    v21.transparency = v22;
    v21.updateTransparency = v23;
    v21.transparencyMotor = v6.createSingleMotor(1);
    v21.transparencyMotor:onStep(v21.updateTransparency);
    if v2() then
        v22, v23 = v5.createBinding(1);
        v21.backgroundTransparency = v22;
        v21.updateBackgroundTransparency = v23;
        v21.backgroundTransparencyMotor = v6.createSingleMotor(1);
        v21.backgroundTransparencyMotor:onStep(v21.updateBackgroundTransparency);
    end;
    v21.size = v5.joinBindings({
        v21.width,
        v21.height
    }):map(function(v26)
        return UDim2.fromOffset(v26[1], v26[2]);
    end);
end;
v17.render = function(v27)
    local l_chatSettings_0 = v27.props.chatSettings;
    if v3() then
        l_chatSettings_0 = v20(v27.props.chatSettings, v27.props.bubbleChatMessageProperties);
    end;
    local v29 = nil;
    local v30 = nil;
    local v31 = nil;
    local v32 = nil;
    local v33 = nil;
    if not v27.props.isTextChatServiceOn then
        if v14.ConsolidateBubbleChat then
            v29 = l_chatSettings_0.BackgroundImage;
            v30 = l_chatSettings_0.BackgroundGradient;
            if not l_chatSettings_0.CornerEnabled then
                if l_chatSettings_0.CornerEnabled == false then
                    v31 = {
                        CornerRadius = UDim.new(0, 0)
                    };
                end;
            else
                v31 = {
                    CornerRadius = l_chatSettings_0.CornerRadius
                };
            end;
            v32 = not not l_chatSettings_0.Padding and {
                PaddingTop = UDim.new(0, l_chatSettings_0.Padding),
                PaddingRight = UDim.new(0, l_chatSettings_0.Padding),
                PaddingBottom = UDim.new(0, l_chatSettings_0.Padding),
                PaddingLeft = UDim.new(0, l_chatSettings_0.Padding)
            } or nil;
        end;
    else
        v29 = l_chatSettings_0.ImageLabel;
        v30 = l_chatSettings_0.UIGradient;
        v31 = l_chatSettings_0.UICorner;
        v32 = l_chatSettings_0.UIPadding;
        v33 = l_chatSettings_0.FontFace;
    end;
    local l_CornerRadius_0 = v8.DefaultBubbleChatChildrenCustomizationProperties.UICorner.CornerRadius;
    local l_UIPadding_0 = v8.DefaultBubbleChatChildrenCustomizationProperties.UIPadding;
    local v36 = not not v27.props.renderInsert and v27.props.insertSize.X + l_chatSettings_0.Padding or 0;
    local v37 = nil;
    v37 = if not v16() then (v27.props.isMostRecent and l_chatSettings_0.TailVisible) and (not v14.AvatarChatEnabled or v27.props.showCaret) else (v27.props.isMostRecent and l_chatSettings_0.TailVisible) and v27.props.showCaret;
    local l_createElement_0 = v5.createElement;
    local v39 = "Frame";
    local v40 = {
        LayoutOrder = v27.props.timestamp,
        AnchorPoint = Vector2.new(0.5, 0.5),
        Size = v27.size,
        Position = UDim2.fromScale(1, 0.5),
        Transparency = 1
    };
    local v41 = {
        Layout = v5.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            Padding = UDim.new(0, -1)
        })
    };
    local l_createElement_1 = v5.createElement;
    local v43 = "ImageLabel";
    local v44 = l_Dictionary_0.join(v29, {
        LayoutOrder = 1,
        BackgroundColor3 = l_chatSettings_0.BackgroundColor3,
        AnchorPoint = Vector2.new(0.5, 0),
        Size = UDim2.fromScale(1, 1),
        BorderSizePixel = 0,
        Position = UDim2.new(0.5, 0, 0, 0),
        BackgroundTransparency = (not not v29 and v29.Image ~= "") and 1 or (v27.backgroundTransparency or v27.transparency),
        ClipsDescendants = true,
        ImageTransparency = v27.backgroundTransparency or v27.transparency
    });
    local v45 = {
        UICorner = not not v31 and v5.createElement("UICorner", {
            CornerRadius = v31.CornerRadius
        }) or v5.createElement("UICorner", {
            CornerRadius = l_CornerRadius_0
        }),
        UIListLayout = v5.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Horizontal,
            SortOrder = Enum.SortOrder.LayoutOrder,
            VerticalAlignment = Enum.VerticalAlignment.Bottom,
            Padding = UDim.new(0, l_chatSettings_0.Padding)
        }),
        Padding = not not v32 and v5.createElement("UIPadding", v32) or v5.createElement("UIPadding", l_UIPadding_0),
        Insert = v27.props.renderInsert and v27.props.renderInsert(),
        Text = v5.createElement("TextLabel", {
            Text = if (not not v27.props.useTranslation and v27.props.translation) and v27.props.translation ~= "" then v27.props.translation else v27.props.text,
            Size = UDim2.new(1, -v36, 1, 0),
            AnchorPoint = Vector2.new(0.5, 0.5),
            Position = UDim2.fromScale(0.5, 0.5),
            BackgroundTransparency = 1,
            FontFace = v33 or nil,
            Font = if v33 then nil else l_chatSettings_0.Font,
            TextColor3 = l_chatSettings_0.TextColor3,
            TextSize = l_chatSettings_0.TextSize,
            TextTransparency = v27.transparency,
            TextWrapped = true,
            AutoLocalize = false,
            LayoutOrder = 2,
            RichText = not v14.ConsolidateBubbleChat and true or v27.props.isTextChatServiceOn
        })
    };
    local v46 = false;
    if v30 ~= nil then
        v46 = v5.createElement("UIGradient", v30);
    end;
    v45.Gradient = v46;
    v41.ChatBubbleFrame = l_createElement_1(v43, v44, v45);
    if not v37 then
        l_createElement_1 = nil;
    else
        l_createElement_1 = v5.createElement;
        v43 = "ImageLabel";
        v44 = {
            LayoutOrder = 2,
            BackgroundTransparency = 1,
            Size = UDim2.fromOffset(9, 6),
            Image = "rbxasset://textures/ui/InGameChat/Caret.png",
            ImageColor3 = l_chatSettings_0.BackgroundColor3,
            ImageTransparency = not not v2() and v27.backgroundTransparency or v27.transparency
        };
        v45 = {};
        v46 = false;
        if v30 ~= nil then
            v46 = v5.createElement("UIGradient", v30);
        end;
        v45.Gradient = v46;
        l_createElement_1 = l_createElement_1(v43, v44, v45);
    end;
    v41.Caret = l_createElement_1;
    return l_createElement_0(v39, v40, v41);
end;
v17.fadeOut = function(v47)
    local l_chatSettings_1 = v47.props.chatSettings;
    if v3() then
        l_chatSettings_1 = v20(v47.props.chatSettings, v47.props.bubbleChatMessageProperties);
    end;
    if not v47.isFadingOut then
        v47.isFadingOut = true;
        v47.transparencyMotor:onComplete(function()
            if v47.props.onFadeOut then
                v47.props.onFadeOut(v47.props.messageId);
            end;
        end);
        local v49 = v11(l_chatSettings_1, "transparency");
        v47.transparencyMotor:setGoal(v49(1));
        if v2() then
            v47.backgroundTransparencyMotor:setGoal(v49(1));
        end;
    end;
end;
v17.didUpdate = function(v50, v51)
    if v50.props.fadingOut then
        v50:fadeOut();
    end;
    local l_chatSettings_2 = v50.props.chatSettings;
    if v3() then
        l_chatSettings_2 = v20(v50.props.chatSettings, v50.props.bubbleChatMessageProperties);
    end;
    if not ((((v51.text == v50.props.text and v51.useTranslation == v50.props.useTranslation) and v51.translation == v50.props.translation) and v51.chatSettings == v50.props.chatSettings) and v51.renderInsert == v50.props.renderInsert) or v51.insertSize ~= v50.props.insertSize then
        local v53 = if (not not v50.props.useTranslation and v50.props.translation) and v50.props.translation ~= "" then v12(v50.props.translation, l_chatSettings_2) else v12(v50.props.text, l_chatSettings_2);
        local v54 = v11(l_chatSettings_2, "size");
        local l_Padding_0 = l_chatSettings_2.Padding;
        local l_X_0 = v53.X;
        local l_Y_0 = v53.Y;
        if v50.props.renderInsert then
            l_X_0 = l_X_0 + (v50.props.insertSize.X + l_Padding_0);
            l_Y_0 = math.max(l_Y_0, v50.props.insertSize.Y + l_Padding_0 * 2);
        end;
        v50.heightMotor:setGoal(v54(l_Y_0));
        v50.widthMotor:setGoal(v54(l_X_0));
    end;
end;
v17.didMount = function(v58)
    v58.isMounted = true;
    local l_chatSettings_3 = v58.props.chatSettings;
    if v3() then
        l_chatSettings_3 = v20(v58.props.chatSettings, v58.props.bubbleChatMessageProperties);
    end;
    local v60 = if (not not v58.props.useTranslation and v58.props.translation) and v58.props.translation ~= "" then v12(v58.props.translation, l_chatSettings_3) else v12(v58.props.text, l_chatSettings_3);
    local v61 = v11(l_chatSettings_3, "size");
    local v62 = v11(l_chatSettings_3, "transparency");
    local l_X_1 = v60.X;
    local l_Y_1 = v60.Y;
    if v58.props.renderInsert then
        l_X_1 = l_X_1 + (v58.props.insertSize.X + l_chatSettings_3.Padding);
        l_Y_1 = math.max(l_Y_1, v58.props.insertSize.Y + l_chatSettings_3.Padding * 2);
    end;
    if not v58.props.isMostRecent then
        v58.heightMotor:setGoal(v61(l_Y_1));
        v58.widthMotor:setGoal(v61(l_X_1));
    else
        v58.heightMotor:setGoal(v61(l_Y_1));
        v58.widthMotor:setGoal(v6.instant(l_X_1));
    end;
    v58.transparencyMotor:setGoal(v62(l_chatSettings_3.Transparency));
    if v2() then
        local v65 = v15.getBackgroundTransparency(l_chatSettings_3, v58.props.clientSettings);
        if v3() then
            local l_bubbleChatMessageProperties_0 = v58.props.bubbleChatMessageProperties;
            if not (not l_bubbleChatMessageProperties_0 or not l_bubbleChatMessageProperties_0.BackgroundTransparency) then
                v65 = v15.getBackgroundTransparency({
                    BackgroundTransparency = l_bubbleChatMessageProperties_0.BackgroundTransparency
                }, v58.props.clientSettings);
            end;
        end;
        v58.backgroundTransparencyMotor:setGoal(v62(v65));
    end;
end;
v17.willUnmount = function(v67)
    v67.isMounted = false;
    v67.transparencyMotor:destroy();
    if v2() then
        v67.backgroundTransparencyMotor:destroy();
    end;
    v67.heightMotor:destroy();
    v67.widthMotor:destroy();
end;
return v17;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("ExpChat");
local v1 = require(l_script_FirstAncestor_0.GlobalFlags);
local l_Flags_0 = l_script_FirstAncestor_0.Flags;
local v3 = require(l_Flags_0.getEnableChatInputBarConfigurationStyleCustomizations);
local v4 = require(l_Flags_0.getFFlagReplicateUIPaddingChildProperties);
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v6 = require(l_Parent_0.Roact);
local v7 = require(l_Parent_0.Otter);
local l_Dictionary_0 = require(l_Parent_0.llama).Dictionary;
local l_Config_0 = require(l_Parent_0.UIBlox).Config;
local v10 = require(l_script_FirstAncestor_0.Config);
local l_Helpers_0 = l_script_FirstAncestor_0.BubbleChat.Helpers;
local v12 = require(l_Helpers_0.getSpringFromSettings);
local v13 = require(l_Helpers_0.getAbsolutePaddingbyDimension);
local v14 = require(l_script_FirstAncestor_0.ClientSettings.ClientSettingsUtility);
local v15 = require(l_script_FirstAncestor_0.Flags.getFFlagFixBubbleChatTailVisible);
local v16 = v6.Component:extend("ChatBubbleDistant");
v16.defaultProps = {
    width = 32,
    height = 16
};
local function v22(v17)
    local l_height_0 = v17.height;
    if v17.renderInsert then
        l_height_0 = math.max(l_height_0, v17.insertSize.Y);
    end;
    if not v4() or not v17.chatSettings.UIPadding then
        if v17.renderInsert then
            l_height_0 = math.max(l_height_0, v17.insertSize.Y);
        end;
        return l_height_0 + v17.chatSettings.Padding * 2;
    else
        local l_UIPadding_0 = v17.chatSettings.UIPadding;
        local v20 = v13(l_UIPadding_0.PaddingTop, l_height_0);
        local v21 = v13(l_UIPadding_0.PaddingBottom, l_height_0);
        if v17.renderInsert then
            l_height_0 = math.max(l_height_0, v17.insertSize.Y);
        end;
        return l_height_0 + (v20 + v21);
    end;
end;
v16.init = function(v23)
    v23.state = {};
    local v24, v25 = v6.createBinding(0);
    v23.width = v24;
    v23.updateWidth = v25;
    v23.widthMotor = v7.createSingleMotor(0);
    v23.widthMotor:onStep(function(v26)
        v23.updateWidth((math.round(v26)));
    end);
    v24, v25 = v6.createBinding((v22(v23.props)));
    v23.height = v24;
    v23.updateHeight = v25;
    v23.frameSize = v6.joinBindings({
        v23.width,
        v23.height
    }):map(function(v27)
        return UDim2.fromOffset(v27[1], v27[2]);
    end);
    v24, v25 = v6.createBinding(1);
    v23.transparency = v24;
    v23.updateTransparency = v25;
    v23.transparencyMotor = v7.createSingleMotor(1);
    v23.transparencyMotor:onStep(v23.updateTransparency);
    if v3() then
        v24, v25 = v6.createBinding(1);
        v23.backgroundTransparency = v24;
        v23.updateBackgroundTransparency = v25;
        v23.backgroundTransparencyMotor = v7.createSingleMotor(1);
        v23.backgroundTransparencyMotor:onStep(v23.updateBackgroundTransparency);
    end;
    if v23.props.fadingOut then
        v23:fadeOut();
    end;
end;
v16.getDerivedStateFromProps = function(v28, v29)
    local v30 = nil;
    if not v4() or not v28.chatSettings.UIPadding then
        v30 = if not v28.renderInsert then v28.width + v28.chatSettings.Padding * 2 else (v28.width + v28.insertSize.X) + v28.chatSettings.Padding * 2;
    else
        v30 = v28.width;
        if v28.renderInsert then
            v30 = v30 + v28.insertSize.X;
        end;
        local l_UIPadding_1 = v28.chatSettings.UIPadding;
        v30 = v30 + (v13(l_UIPadding_1.PaddingLeft, v30) + v13(l_UIPadding_1.PaddingRight, v30));
    end;
    local v32 = v22(v28);
    if not (v30 == v29.fullWidth) or v32 ~= v29.fullHeight then
        return {
            fullWidth = v30,
            fullHeight = v32
        };
    else
        return nil;
    end;
end;
v16.render = function(v33)
    local l_chatSettings_0 = v33.props.chatSettings;
    local v35 = nil;
    local v36 = nil;
    local v37 = nil;
    local v38 = nil;
    if not v33.props.isTextChatServiceOn then
        if v1.ConsolidateBubbleChat then
            v35 = l_chatSettings_0.BackgroundImage;
            v36 = l_chatSettings_0.BackgroundGradient;
            if not l_chatSettings_0.CornerEnabled then
                if l_chatSettings_0.CornerEnabled == false then
                    v37 = {
                        CornerRadius = UDim.new(0, 0)
                    };
                end;
            else
                v37 = {
                    CornerRadius = l_chatSettings_0.CornerRadius
                };
            end;
            v38 = not not l_chatSettings_0.Padding and {
                PaddingTop = UDim.new(0, l_chatSettings_0.Padding),
                PaddingRight = UDim.new(0, l_chatSettings_0.Padding),
                PaddingBottom = UDim.new(0, l_chatSettings_0.Padding),
                PaddingLeft = UDim.new(0, l_chatSettings_0.Padding)
            } or nil;
        end;
    else
        v35 = l_chatSettings_0.ImageLabel;
        v36 = l_chatSettings_0.UIGradient;
        v37 = l_chatSettings_0.UICorner;
        v38 = l_chatSettings_0.UIPadding;
    end;
    local l_CornerRadius_0 = v10.DefaultBubbleChatChildrenCustomizationProperties.UICorner.CornerRadius;
    local l_UIPadding_2 = v10.DefaultBubbleChatChildrenCustomizationProperties.UIPadding;
    local v41 = not not v33.props.renderInsert and v33.props.insertSize.X or 0;
    local l_TailVisible_0 = v33.props.chatSettings.TailVisible;
    if v15 then
        l_TailVisible_0 = v33.props.chatSettings.TailVisible and v33.props.showCaret;
    end;
    local l_createElement_0 = v6.createElement;
    local v44 = "Frame";
    local v45 = {
        AnchorPoint = Vector2.new(0.5, 1),
        Size = UDim2.fromOffset(v33.state.fullWidth, v33.state.fullHeight),
        Position = UDim2.new(0.5, 0, 1, -8),
        Transparency = 1
    };
    local v46 = {
        Scale = v6.createElement("UIScale", {
            Scale = 0.75
        })
    };
    local l_TailVisible_1 = v33.props.chatSettings.TailVisible;
    if l_TailVisible_1 then
        l_TailVisible_1 = l_TailVisible_0;
        if l_TailVisible_1 then
            l_TailVisible_1 = v6.createElement;
            local v48 = "ImageLabel";
            local v49 = {
                AnchorPoint = Vector2.new(0.5, 0),
                BackgroundTransparency = 1,
                Position = UDim2.new(0.5, 0, 1, -1),
                Size = UDim2.fromOffset(12, 8),
                Image = "rbxasset://textures/ui/InGameChat/Caret.png",
                ImageColor3 = l_chatSettings_0.BackgroundColor3,
                ImageTransparency = not not v3() and v33.backgroundTransparency or v33.transparency
            };
            local v50 = {};
            local v51 = false;
            if v36 ~= nil then
                v51 = v6.createElement("UIGradient", v36);
            end;
            v50.Gradient = v51;
            l_TailVisible_1 = l_TailVisible_1(v48, v49, v50);
        end;
    end;
    v46.Carat = l_TailVisible_1;
    l_TailVisible_1 = v6.createElement;
    local v52 = "ImageLabel";
    local v53 = l_Dictionary_0.join(v35, {
        Size = v33.frameSize,
        BackgroundColor3 = l_chatSettings_0.BackgroundColor3,
        BackgroundTransparency = (not not v35 and v35.Image ~= "") and 1 or (v33.backgroundTransparency or v33.transparency),
        BorderSizePixel = 0,
        AnchorPoint = Vector2.new(0.5, 0),
        Position = UDim2.new(0.5, 0, 0, 0),
        ClipsDescendants = true,
        ImageTransparency = v33.backgroundTransparency or v33.transparency,
        Image = not not v35 and v35.Image or ""
    });
    local v54 = {
        UICorner = not not v37 and v6.createElement("UICorner", {
            CornerRadius = v37.CornerRadius
        }) or v6.createElement("UICorner", {
            CornerRadius = l_CornerRadius_0
        }),
        Contents = v6.createElement("Frame", {
            Size = UDim2.fromScale(1, 1),
            BackgroundTransparency = 1
        }, {
            Padding = not not v38 and v6.createElement("UIPadding", v38) or v6.createElement("UIPadding", l_UIPadding_2),
            UIListLayout = v6.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Horizontal,
                SortOrder = Enum.SortOrder.LayoutOrder
            }),
            Insert = v33.props.renderInsert and v33.props.renderInsert(),
            Ellipsis = v6.createElement("TextLabel", {
                BackgroundTransparency = 1,
                Text = "\226\128\166",
                TextColor3 = l_chatSettings_0.TextColor3,
                TextTransparency = v33.transparency,
                Font = if not l_Config_0.enableFontNameMapping then Enum.Font.GothamBlack else Enum.Font.BuilderSansExtraBold,
                TextScaled = not v4() and true or false,
                TextSize = if not v4() then nil else l_chatSettings_0.TextSize,
                Size = UDim2.new(1, -v41, 1, 0),
                LayoutOrder = 2
            })
        })
    };
    local v55 = false;
    if v36 ~= nil then
        v55 = v6.createElement("UIGradient", v36);
    end;
    v54.Gradient = v55;
    v46.RoundedFrame = l_TailVisible_1(v52, v53, v54);
    return l_createElement_0(v44, v45, v46);
end;
v16.fadeIn = function(v56)
    local v57 = v12(v56.props.chatSettings, "transparency");
    v56.transparencyMotor:setGoal(v57(v56.props.chatSettings.Transparency));
    if v3() then
        v56.backgroundTransparencyMotor:setGoal(v57((v14.getBackgroundTransparency(v56.props.chatSettings, v56.props.clientSettings))));
    end;
    v56.widthMotor:setGoal(v12(v56.props.chatSettings, "size")(v56.state.fullWidth));
end;
v16.fadeOut = function(v58)
    v58.transparencyMotor:onComplete(function()
        if v58.props.onFadeOut then
            v58.props.onFadeOut();
        end;
    end);
    local v59 = v12(v58.props.chatSettings, "transparency");
    v58.transparencyMotor:setGoal(v59(1));
    if v3() then
        v58.backgroundTransparencyMotor:setGoal(v59(1));
    end;
end;
v16.didUpdate = function(v60, v61, v62)
    if v61.fadingOut ~= v60.props.fadingOut then
        if not v60.props.fadingOut then
            v60:fadeIn();
            return ;
        else
            v60:fadeOut();
            return ;
        end;
    else
        if v60.state.fullHeight ~= v62.fullHeight then
            v60.updateHeight(v60.state.fullHeight);
        end;
        if v60.state.fullWidth ~= v62.fullWidth then
            v60.widthMotor:setGoal(v12(v60.props.chatSettings, "size")(v60.state.fullWidth));
        end;
        return ;
    end;
end;
v16.didMount = function(v63)
    if not v63.props.fadingOut then
        local v64 = v12(v63.props.chatSettings, "size");
        local v65 = v12(v63.props.chatSettings, "transparency");
        v63.transparencyMotor:setGoal(v65(v63.props.chatSettings.Transparency));
        if v3() then
            v63.backgroundTransparencyMotor:setGoal(v65((v14.getBackgroundTransparency(v63.props.chatSettings, v63.props.clientSettings))));
        end;
        v63.widthMotor:setGoal(v64(v63.state.fullWidth));
    end;
end;
v16.willUnmount = function(v66)
    v66.transparencyMotor:destroy();
    if v3() then
        v66.backgroundTransparencyMotor:destroy();
    end;
    v66.widthMotor:destroy();
end;
return v16;


local l_Dictionary_0 = require(script:FindFirstAncestor("ExpChat").Parent.llama).Dictionary;
local v1 = 0;
return function(v2)
    v1 = v1 + 1;
    return l_Dictionary_0.join({
        name = "Foo",
        id = tostring(v1),
        userId = "1",
        text = "Hello, World",
        timestamp = v1
    }, v2);
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("ExpChat");
local v1 = require(l_script_FirstAncestor_0.Config);
local v2 = require(l_script_FirstAncestor_0.Flags.getFFlagReplicateUIPaddingChildProperties);
return function(v3)
    local v4 = {};
    for v5, _ in pairs(v1.DefaultBubbleChatMessagePropertiesInstanceSettings) do
        v4[v5] = v3[v5];
    end;
    local l_ImageLabel_0 = v3:FindFirstChildOfClass("ImageLabel");
    if l_ImageLabel_0 then
        local v8 = {};
        for v9, _ in pairs(v1.DefaultBubbleChatChildrenCustomizationProperties.ImageLabel) do
            v8[v9] = l_ImageLabel_0[v9];
        end;
        v4.ImageLabel = v8;
    end;
    local l_UIGradient_0 = v3:FindFirstChildOfClass("UIGradient");
    if l_UIGradient_0 then
        local v12 = {};
        for v13, _ in pairs(v1.DefaultBubbleChatChildrenCustomizationProperties.UIGradient) do
            v12[v13] = l_UIGradient_0[v13];
        end;
        v4.UIGradient = v12;
    end;
    local l_UICorner_0 = v3:FindFirstChildOfClass("UICorner");
    if l_UICorner_0 then
        local v16 = {};
        for v17, _ in pairs(v1.DefaultBubbleChatChildrenCustomizationProperties.UICorner) do
            v16[v17] = l_UICorner_0[v17];
        end;
        v4.UICorner = v16;
    end;
    if v2() then
        local l_UIPadding_0 = v3:FindFirstChildOfClass("UIPadding");
        if l_UIPadding_0 then
            local v20 = {};
            for v21, _ in pairs(v1.DefaultBubbleChatChildrenCustomizationProperties.UIPadding) do
                v20[v21] = l_UIPadding_0[v21];
            end;
            v4.UIPadding = v20;
        end;
    end;
    return v4;
end;


return function(v0, v1)
    local v2 = v0 and v0.UserSpecificSettings;
    if v1 and v2 then
        if not v2[v1.userId] then
            if not v1.partOrModel or not v2[v1.partOrModel:GetFullName()] then
                return v0;
            else
                return v2[v1.partOrModel:GetFullName()];
            end;
        else
            return v2[v1.userId];
        end;
    else
        return v0;
    end;
end;


local v0 = require(script:FindFirstAncestor("ExpChat").Parent.Otter);
local v1 = game:DefineFastFlag("LegacyBubbleChatAnimationFix", false);
return function(v2, v3)
    local v4 = nil;
    v4 = if v3 == "size" then v2.SizeAnimation else v2.TransparencyAnimation;
    if not v1 then
        if not v4.Enabled then
            return v0.instant;
        end;
    elseif v4.Enabled == false then
        return v0.instant;
    end;
    local v5 = {
        dampingRatio = v4.SpringDampingRatio,
        frequency = v4.SpringFrequency
    };
    return function(v6)
        return v0.spring(v6, v5);
    end;
end;


local l_CoreGui_0 = game:GetService("CoreGui");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("ExpChat");
local l_TextChatService_0 = game:GetService("TextChatService");
local l_TextService_0 = game:GetService("TextService");
local v4 = require(l_script_FirstAncestor_0.BubbleChat.Helpers.getAbsolutePaddingbyDimension);
local v5 = require(l_script_FirstAncestor_0.Flags.getFFlagReplicateUIPaddingChildProperties);
local function v13(v6, v7)
    local l_ScreenGui_0 = Instance.new("ScreenGui");
    l_ScreenGui_0.Enabled = false;
    l_ScreenGui_0.Name = "RichTextSizingLabel";
    l_ScreenGui_0.Parent = l_CoreGui_0;
    local l_TextLabel_0 = Instance.new("TextLabel");
    l_TextLabel_0.TextWrapped = true;
    l_TextLabel_0.RichText = true;
    l_TextLabel_0.Parent = l_ScreenGui_0;
    l_TextLabel_0.Text = v6;
    l_TextLabel_0.TextSize = v7.TextSize;
    if not v7.FontFace then
        l_TextLabel_0.Font = v7.Font;
    else
        l_TextLabel_0.FontFace = v7.FontFace;
    end;
    l_TextLabel_0.Size = UDim2.fromOffset(v7.MaxWidth, 10000);
    local l_TextBounds_0 = l_TextLabel_0.TextBounds;
    l_ScreenGui_0:Destroy();
    local v11 = nil;
    if not v5() or not v7.UIPadding then
        local l_Padding_0 = v7.Padding;
        v11 = Vector2.new(l_Padding_0 * 4, l_Padding_0 * 2);
    else
        v11 = Vector2.new((v4(v7.UIPadding.PaddingLeft, l_TextBounds_0.X) + v4(v7.UIPadding.PaddingRight, l_TextBounds_0.X)) * 2, v4(v7.UIPadding.PaddingTop, l_TextBounds_0.Y) + v4(v7.UIPadding.PaddingBottom, l_TextBounds_0.Y));
    end;
    return v11 + l_TextBounds_0;
end;
return function(v14, v15, v16)
    if v16 == nil then
        v16 = l_TextChatService_0;
    end;
    if v16.ChatVersion == Enum.ChatVersion.TextChatService then
        return (v13(v14, v15));
    else
        return l_TextService_0:GetTextSize(v14, v15.TextSize, v15.Font, Vector2.new(v15.MaxWidth, 10000)) + Vector2.new(v15.Padding * 4, v15.Padding * 2);
    end;
end;


local v0 = require(script:FindFirstAncestor("ExpChat").Flags.getFFlagEnableShimmeringIcon);
return function(v1, v2, v3)
    local _ = nil;
    if v0() and v1 == "Connecting" then
        return "icons/controls/voice/" .. v3 .. "_0_dark";
    elseif not (v1 ~= "Muted") or v1 == "LOCAL_MUTED" then
        return "icons/controls/voice/" .. v3 .. "_off_light";
    elseif not (v1 ~= "Inactive") or v1 == "Connecting" then
        return "icons/controls/voice/" .. v3 .. "_0_light";
    elseif v1 == "Talking" then
        return "icons/controls/voice/" .. v3 .. "_" .. tostring(20 * math.floor(0.5 + 5 * v2)) .. "_light";
    else
        return "icons/controls/voice/" .. v3 .. "_error_light";
    end;
end;


return function(v0, v1, v2, v3)
    if not v0 then
        return "";
    elseif not (v1 ~= "Muted") or v1 == "LOCAL_MUTED" then
        return v0("Muted", v3);
    elseif v1 == "Connecting" then
        return v0("Connecting", v3);
    elseif v1 == "Inactive" then
        return v0("Unmuted0", v3);
    elseif v1 == "Talking" then
        return v0("Unmuted" .. tostring(20 * math.floor(0.5 + 5 * v2)), v3);
    else
        return v0("Error", v3);
    end;
end;


return {
    BubbleDuration = 15,
    MaxBubbles = 3,
    BackgroundColor3 = Color3.fromRGB(250, 250, 250),
    BackgroundTransparency = 0.1,
    TextColor3 = Color3.fromRGB(57, 59, 61),
    TextSize = 16,
    FontFace = Font.new("rbxasset://fonts/families/GothamSSm.json"),
    Transparency = 0.1,
    TailVisible = true,
    Padding = 8,
    MaxWidth = 300,
    ImageLabel = {
        Image = "",
        ImageColor3 = Color3.new(1, 1, 1),
        ImageRectOffset = Vector2.new(),
        ImageRectSize = Vector2.new(),
        ScaleType = Enum.ScaleType.Stretch,
        SliceCenter = Rect.new(Vector2.new(), Vector2.new()),
        SliceScale = 1,
        TileSize = UDim2.fromScale(1, 1)
    },
    UIGradient = {
        Enabled = false,
        Color = ColorSequence.new(Color3.fromRGB(150, 150, 150), Color3.fromRGB(250, 250, 250)),
        Offset = Vector2.new(),
        Rotation = 0,
        Transparency = NumberSequence.new(0)
    },
    UICorner = {
        CornerRadius = UDim.new(0, 12)
    },
    SizeAnimation = {
        Enabled = true,
        SpringDampingRatio = 1,
        SpringFrequency = 2
    },
    TransparencyAnimation = {
        Enabled = true,
        SpringDampingRatio = 1,
        SpringFrequency = 2
    },
    VerticalStudsOffset = 0,
    LocalPlayerStudsOffset = Vector3.new(0, 0, 2),
    BubblesSpacing = 6,
    MinimizeDistance = 40,
    MaxDistance = 100,
    AdorneeName = "HumanoidRootPart",
    Voice = {
        ShowIndicator = true
    },
    UserSpecificSettings = {}
};


local l_RunService_0 = game:GetService("RunService");
local l_TweenService_0 = game:GetService("TweenService");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("ExpChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v4 = require(l_script_FirstAncestor_0.IXPServiceWrapper);
local v5 = require(l_Parent_0.React);
local v6 = require(l_Parent_0.UIBlox);
local l_Images_0 = v6.App.ImageSet.Images;
local l_ImageSetLabel_0 = v6.Core.ImageSet.ImageSetLabel;
local v9 = 0.6;
local v10 = Vector2.new(-1, 0);
local v11 = game:DefineFastFlag("EnableDarkerShimmerTransparency", false);
local v12 = game:DefineFastFlag("TCSConnectingMicStateFix", false);
local v13 = game:DefineFastInt("ExpChatMicActivityHeartbeatIncrement", 3);
if v11 then
    v9 = 0.4;
end;
local v14 = game:DefineFastFlag("EnableOptimizedExpChatMicUI2", false);
local v15 = game:DefineFastString("MicActivityFixIXPLayerValue", "MicActivityFixEnabled");
local v16 = require(l_script_FirstAncestor_0.Flags.GetFStringVoiceUIImprovementsIXPLayerName);
local v17 = require(l_script_FirstAncestor_0.BubbleChat.Helpers.getVoiceIndicatorAssetName);
local v18 = require(l_script_FirstAncestor_0.Flags.getFFlagEnableShimmeringIcon);
local function v20(v19)
    return (l_TweenService_0:Create(v19:getValue(), TweenInfo.new(1, Enum.EasingStyle.Circular, Enum.EasingDirection.Out, -1), {
        Offset = Vector2.new(1, 0)
    }));
end;
local function v34(v21)
    local v22, v23 = v5.useState(0);
    local v24, v25 = v5.useState(false);
    local v26 = v5.useRef(0);
    local v27 = v5.useRef(nil);
    local v28 = v5.useRef(nil);
    if v18() then
        v27 = v5.useRef(nil);
        v28 = v5.useRef(nil);
        v5.useEffect(function()
            if v27.current then
                local l_FirstChildWhichIsA_0 = v27.current:FindFirstChildWhichIsA("UIGradient", true);
                if l_FirstChildWhichIsA_0 then
                    v28.current = l_FirstChildWhichIsA_0;
                end;
            end;
        end, {
            v27
        });
    end;
    if v14 then
        v5.useEffect(function()
            local l_status_0, l_result_0 = pcall(function()
                return v4:GetLayerData(v16());
            end);
            if not ((not l_status_0 or not l_result_0) or not l_result_0[v15]) then
                v25(true);
            end;
        end, {});
    end;
    v5.useEffect(function()
        if not (not v14 or not v21.voiceState) and v21.voiceState == "Talking" then
            v4:LogUserLayerExposure(v16());
        end;
        local v32 = nil;
        if not ((not v14 or not v24) or not v21.voiceState) and v21.voiceState == "Talking" then
            v32 = l_RunService_0.PostSimulation:Connect(function()
                v26.current = ((v26.current or 0) + 1) % v13;
                if v26.current == 0 then
                    v23(math.random());
                end;
            end);
            return function()
                if v32 then
                    v32:Disconnect();
                    v32 = nil;
                end;
            end;
        elseif not (v21.voiceState and v21.voiceState == "Talking") or not v21.renderStepName then
            if not (not (not v18() or not v21.voiceState) and v21.voiceState == "Connecting") or not v28 then
                return function()
                    if v21.renderStepName then
                        l_RunService_0:UnbindFromRenderStep(v21.renderStepName);
                    end;
                    if not (not v14 or not v32) then
                        v32:Disconnect();
                        v32 = nil;
                    end;
                end;
            else
                local v33 = v20(v28);
                v33:Play();
                return function()
                    v33:Cancel();
                    if not ((not v12 or not v28) or not v28.current) then
                        v28.current.Offset = v10;
                    end;
                end;
            end;
        else
            l_RunService_0:BindToRenderStep(v21.renderStepName, 1, function()
                v23(math.random());
            end);
            return function()
                l_RunService_0:UnbindFromRenderStep(v21.renderStepName);
            end;
        end;
    end, {
        v21.voiceState,
        v24
    });
    return v5.createElement("ImageButton", {
        AnchorPoint = Vector2.new(0.5, 1),
        Size = v21.controlBubbleSize,
        LayoutOrder = v21.LayoutOrder,
        BorderSizePixel = 0,
        Transparency = 1,
        ZIndex = 2,
        [v5.Event.Activated] = v21.onActivated,
        BackgroundTransparency = 1,
        ref = if not v18() then nil else v27
    }, {
        UICorner = v5.createElement("UICorner", {
            CornerRadius = UDim.new(0, v21.cornerRadiusOffset)
        }),
        Contents = v5.createElement("Frame", {
            Size = UDim2.fromScale(1, 1),
            BorderSizePixel = 0,
            BackgroundTransparency = 1
        }, {
            UICorner = v5.createElement("UICorner", {
                CornerRadius = UDim.new(0, v21.cornerRadiusOffset)
            }),
            Icon = v5.createElement(l_ImageSetLabel_0, {
                AnchorPoint = Vector2.new(0.5, 0.5),
                Position = UDim2.fromScale(0.5, 0.5),
                Size = v21.iconSize,
                BackgroundTransparency = 1,
                ImageTransparency = v21.iconTransparency,
                BorderSizePixel = 0,
                Image = l_Images_0[v21.iconAssetName or v17(v21.voiceState, v22, v21.iconStyle)]
            }, {
                ShimmerGradient = v18() and v5.createElement("UIGradient", {
                    Color = ColorSequence.new({
                        ColorSequenceKeypoint.new(0, Color3.new(v9, v9, v9)),
                        ColorSequenceKeypoint.new(0.5, Color3.new(0.8, 0.8, 0.8)),
                        ColorSequenceKeypoint.new(1, Color3.new(v9, v9, v9))
                    }),
                    Enabled = v21.voiceState == "Connecting",
                    Rotation = -45,
                    Offset = v10
                })
            })
        })
    });
end;
if not v14 then
    return v34;
else
    return v5.memo(v34);
end;


local l_FaceAnimatorService_0 = game:GetService("FaceAnimatorService");
local l_HttpService_0 = game:GetService("HttpService");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("ExpChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v4 = require(l_Parent_0.Roact);
local v5 = require(l_Parent_0.RoactRodux);
local v6 = require(l_Parent_0.UIBlox);
local l_Dictionary_0 = require(l_Parent_0.llama).Dictionary;
local l_ExternalEventConnection_0 = v6.Utility.ExternalEventConnection;
local v9 = require(l_script_FirstAncestor_0.Config);
local l_AvatarChatUISettings_0 = v9.AvatarChatUISettings;
local l_Permissions_0 = v9.Permissions;
local v12 = require(l_script_FirstAncestor_0.GlobalFlags);
local v13 = require(script.Parent.ControlBubble);
local v14 = require(l_script_FirstAncestor_0.Flags.GetFFlagVoiceTCSBubbleClickState);
local v15 = game:DefineFastFlag("PreventMicToggleIfGameConsumedEvent", false);
local v16 = v4.PureComponent:extend("PlayerButtons");
v16.defaultProps = {
    LayoutOrder = 1
};
v16.init = function(v17)
    v17:setState({
        cameraEnabled = (not not l_FaceAnimatorService_0 and l_FaceAnimatorService_0:IsStarted()) and l_FaceAnimatorService_0.VideoAnimationEnabled
    });
    v17.toggleMic = function(v18)
        if not v15 or not v18 then
            if not v14() then
                v17.props.onClickedVoiceIndicator(v17.props.userId);
                return ;
            else
                v17.props.onClickedVoiceIndicator(v17.props.userId, v17.props.voiceState);
                return ;
            end;
        else
            return ;
        end;
    end;
    v17.onVideoButtonPressed = function()
        if not v12.DoNotPromptCameraPermissionsOnMount or v17.props.hasCameraPermissions then
            v17:toggleVideo();
        else
            local function v21(v19, _)
                if not v19 then
                    if v17.props.displayCameraDeniedToast then
                        v17.props.displayCameraDeniedToast();
                    end;
                else
                    v17:toggleVideo();
                    if v17.props.setCameraPermissionStateFromControl then
                        v17.props.setCameraPermissionStateFromControl(v19);
                        return ;
                    end;
                end;
            end;
            if v17.props.getPermissions then
                v17.props.getPermissions(v21, l_Permissions_0.CAMERA_ACCESS);
                return ;
            end;
        end;
    end;
    v17.toggleVideo = function()
        v17.props.onClickedCameraIndicator();
    end;
    v17.updateVideo = function()
        v17:setState({
            cameraEnabled = l_FaceAnimatorService_0.VideoAnimationEnabled
        });
    end;
end;
v16.shouldShowCameraIndicator = function(v22)
    return v22.props.isLocalPlayer and v22:getCameraButtonVisibleAtMount();
end;
v16.shouldShowMicOffIndicator = function(v23)
    if not v23.props.isLocalPlayer then
        return false;
    else
        local v24 = true;
        if v23.props.voiceState ~= "Muted" then
            v24 = v23.props.voiceState == "LOCAL_MUTED";
        end;
        if not v12.JoinWithoutMicPermissions then
            return v24 or not v23.props.hasMicPermissions;
        else
            return v24;
        end;
    end;
end;
v16.getCameraButtonVisibleAtMount = function(v25)
    if (not v12.EnableAlwaysAvailableCamera or not v25.props.isCameraOnlyUser) or not v25.props.isCameraOnlyUser() then
        if not v25.props.isCamEnabledForUserAndPlace then
            return false;
        else
            return v25.props.isCamEnabledForUserAndPlace();
        end;
    else
        return false;
    end;
end;
v16.render = function(v26)
    local v27 = v26.props.hasMicPermissions or v26.props.voiceEnabled;
    if v12.JoinWithoutMicPermissions then
        v27 = v26.props.voiceEnabled;
    end;
    local v28 = v26:shouldShowCameraIndicator();
    local v29 = v26:shouldShowMicOffIndicator();
    local v30 = v28 and v27;
    local l_chatSettings_0 = v26.props.chatSettings;
    local v32 = not not v30 and l_AvatarChatUISettings_0.DoubleIconCornerRadiusOffset or l_AvatarChatUISettings_0.SingleIconCornerRadiusOffset;
    local v33 = not not v30 and l_AvatarChatUISettings_0.DoubleIconButtonSize or l_AvatarChatUISettings_0.SingleIconButtonSize;
    local v34 = not v26.props.isLocalPlayer and "speaker" or "microphone";
    local v35 = (not not v26.state.cameraEnabled and v26.props.hasCameraPermissions) and "icons/controls/voice/video_on_light" or "icons/controls/voice/video_off_light";
    if v12.DoNotPromptCameraPermissionsOnMount then
        v35 = (not not v26.state.cameraEnabled and v26:getCameraButtonVisibleAtMount()) and "icons/controls/voice/video_on_light" or "icons/controls/voice/video_off_light";
    end;
    return v4.createElement("Frame", {
        AnchorPoint = Vector2.new(0.5, 1),
        Position = UDim2.new(0.5, 0, 1, -8),
        AutomaticSize = Enum.AutomaticSize.X,
        Size = UDim2.fromOffset(0, l_AvatarChatUISettings_0.FrameHeight),
        LayoutOrder = v26.props.LayoutOrder,
        BackgroundTransparency = l_chatSettings_0.BackgroundTransparency,
        BackgroundColor3 = l_chatSettings_0.BackgroundColor3,
        Visible = v27 or v28
    }, {
        Scale = v4.createElement("UIScale", {
            Scale = v26.props.isInsideMaximizeDistance and 1 or 0.75
        }),
        UICorner = v4.createElement("UICorner", {
            CornerRadius = UDim.new(0, v32)
        }),
        Container = v4.createElement("ImageLabel", l_Dictionary_0.join({
            Size = UDim2.fromScale(1, 1),
            BackgroundTransparency = 1
        }, l_chatSettings_0.ImageLabel), {
            UICorner = v4.createElement("UICorner", {
                CornerRadius = UDim.new(0, v32)
            }),
            UIListLayout = v4.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Horizontal,
                SortOrder = Enum.SortOrder.LayoutOrder,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                VerticalAlignment = Enum.VerticalAlignment.Center
            }),
            MicrophoneBubble = v27 and v4.createElement(v13, {
                LayoutOrder = 1,
                onActivated = v26.toggleMic,
                chatSettings = l_chatSettings_0,
                controlBubbleSize = v33,
                cornerRadiusOffset = v32,
                iconAssetName = if not v29 then nil else "icons/controls/voice/microphone_off_light",
                iconSize = l_AvatarChatUISettings_0.IconSize,
                iconTransparency = l_AvatarChatUISettings_0.IconTransparency,
                voiceState = v26.props.voiceState,
                renderStepName = l_HttpService_0:GenerateGUID(),
                iconStyle = v34
            }),
            Divider = (v27 and v28) and v4.createElement("Frame", {
                Size = l_AvatarChatUISettings_0.DividerSize,
                AnchorPoint = Vector2.new(0.5, 1),
                BorderSizePixel = 0,
                LayoutOrder = 2,
                ZIndex = 1,
                BackgroundColor3 = l_AvatarChatUISettings_0.DividerColor
            }),
            CameraBubble = v28 and v4.createElement(v13, {
                LayoutOrder = 3,
                onActivated = not not v12.DoNotPromptCameraPermissionsOnMount and v26.onVideoButtonPressed or v26.toggleVideo,
                chatSettings = l_chatSettings_0,
                cornerRadiusOffset = v32,
                controlBubbleSize = v33,
                iconAssetName = v35,
                iconSize = l_AvatarChatUISettings_0.IconSize,
                iconTransparency = l_AvatarChatUISettings_0.IconTransparency,
                iconStyle = v34
            })
        }),
        Carat = l_chatSettings_0.TailVisible and v4.createElement("ImageLabel", {
            LayoutOrder = 3,
            AnchorPoint = Vector2.new(0.5, 0),
            BackgroundTransparency = 1,
            Position = UDim2.new(0.5, 0, 1, -1),
            Size = UDim2.fromOffset(12, 8),
            Image = "rbxasset://textures/ui/InGameChat/Caret.png",
            ImageColor3 = l_chatSettings_0.BackgroundColor3,
            ImageTransparency = l_chatSettings_0.BackgroundTransparency
        }, {
            CaratGradient = l_chatSettings_0.UIGradient and v4.createElement("UIGradient", l_chatSettings_0.UIGradient)
        }),
        BubbleGradient = l_chatSettings_0.UIGradient and v4.createElement("UIGradient", l_chatSettings_0.UIGradient),
        VideoEnabledChanged = not not l_FaceAnimatorService_0 and v4.createElement(l_ExternalEventConnection_0, {
            event = l_FaceAnimatorService_0:GetPropertyChangedSignal("VideoAnimationEnabled"),
            callback = v26.updateVideo
        }) or nil
    });
end;
return v5.connect(function(v36, v37)
    return {
        voiceState = v36.Voice.participants[v37.userId]
    };
end)(v16);


local l_script_FirstAncestor_0 = script:FindFirstAncestor("ExpChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_script_FirstAncestor_0.Logger):new("ExpChat/" .. script.Name);
local l_HttpService_0 = game:GetService("HttpService");
local l_RunService_0 = game:GetService("RunService");
local v5 = require(l_Parent_0.UIBlox);
local l_withSelectionCursorProvider_0 = v5.App.SelectionImage.withSelectionCursorProvider;
local l_CursorKind_0 = v5.App.SelectionImage.CursorKind;
local v8 = require(script:FindFirstAncestor("BubbleChat").Helpers.getVoiceIndicatorIcon);
local v9 = require(l_Parent_0.Roact);
local v10 = require(l_Parent_0.RoactRodux);
local v11 = v9.PureComponent:extend("VoiceIndicator");
v11.defaultProps = {};
v11.init = function(v12)
    local v13, v14 = v9.createBinding(0);
    v12.level = v13;
    v12.updateLevel = v14;
    v13, v14 = v9.createBinding(v12.props.voiceState);
    v12.voiceState = v13;
    v12.updateVoiceState = v14;
    v12.renderStepName = l_HttpService_0:GenerateGUID();
    l_RunService_0:BindToRenderStep(v12.renderStepName, 1, function()
        v12.updateLevel(math.random());
    end);
    v12.levelIcon = v9.joinBindings({
        v12.voiceState,
        v12.level
    }):map(function(v15)
        return v8(v12.props.getIcon, v15[1], v15[2], v12.props.iconStyle);
    end);
    v12.onClicked = function()
        if not (not v12.props.onClicked or not v12.props.userId) then
            v12.props.onClicked(v12.props.userId);
        end;
    end;
end;
v11.renderWithSelectionCursor = function(v16, v17)
    local v18 = true;
    if v16.props.voiceState ~= "Error" then
        v18 = v16.props.voiceState == "Hidden";
    end;
    if not v16.props.hideOnError or v16.props.voiceState and not v18 then
        local v19 = v16.props.voiceState == "LOCAL_MUTED" and 0.5 or 0;
        if v16.props.iconTransparency then
            local l_v19_0 = v19;
            v19 = if type(v16.props.iconTransparency) ~= "number" then v16.props.iconTransparency:map(function(v21)
                return 1 - (1 - v21) * (1 - l_v19_0);
            end) else 1 - (1 - v16.props.iconTransparency) * (1 - l_v19_0);
        end;
        return v9.createElement("ImageButton", {
            Size = v16.props.size or UDim2.fromOffset(28, 28),
            BackgroundTransparency = 1,
            BorderSizePixel = 0,
            Image = v16.levelIcon,
            ImageTransparency = v19,
            SelectionImageObject = v17(l_CursorKind_0.RoundedRectNoInset),
            [v9.Event.Activated] = v16.onClicked
        });
    else
        return nil;
    end;
end;
v11.render = function(v22)
    return l_withSelectionCursorProvider_0(function(v23)
        return v22:renderWithSelectionCursor(v23);
    end);
end;
v11.didUpdate = function(v24, v25, _)
    v2:trace("Voice state updated to {} for ...{}", v24.props.voiceState, (string.sub(tostring(v24.props.userId), -4)));
    if v25.voiceState ~= v24.props.voiceState then
        v24.updateVoiceState(v24.props.voiceState);
    end;
end;
v11.willUnmount = function(v27)
    pcall(function()
        l_RunService_0:UnbindFromRenderStep(v27.renderStepName);
    end);
end;
return v10.connect(function(v28, v29)
    return {
        voiceState = v28.Voice.participants[v29.userId]
    };
end)(v11);


local l_Players_0 = game:GetService("Players");
local l_UserInputService_0 = game:GetService("UserInputService");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("ExpChat");
local v3 = require(l_script_FirstAncestor_0.Localization);
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v5 = require(l_Parent_0.Roact);
local v6 = require(l_Parent_0.React);
local v7 = require(l_Parent_0.RoactRodux);
local v8 = require(l_script_FirstAncestor_0.Config);
local v9 = require(l_script_FirstAncestor_0.Actions.FocusChatHotKeyActivated);
local v10 = require(l_script_FirstAncestor_0.Actions.AutocompleteDropdownActivated);
local v11 = require(l_script_FirstAncestor_0.Actions.AutocompleteDropdownResultsChanged);
local v12 = require(l_script_FirstAncestor_0.Actions.AutocompleteDropdownSelectionChanged);
local v13 = require(l_script_FirstAncestor_0.Actions.AutocompleteDropdownTypeChanged);
local v14 = require(l_script_FirstAncestor_0.Actions.AutocompleteDropdownDeactivated);
local v15 = require(script.Parent.UI.ChatInputBar);
local v16 = require(l_script_FirstAncestor_0.Actions.UserInteraction);
local v17 = v5.Component:extend("ChatInputBarApp");
v17.defaultProps = {
    addTopPadding = true,
    LayoutOrder = 1,
    onSendChat = nil,
    transparencyValue = v5.createBinding(0.3)
};
v17.render = function(v18)
    return v6.createElement(v15, {
        userInputService = l_UserInputService_0,
        contextActionService = game:GetService("ContextActionService"),
        messageCharacterLimit = v8.MessageCharacterLimit,
        sendButtonContainerWidth = 30,
        addTopPadding = v18.props.addTopPadding,
        LayoutOrder = v18.props.LayoutOrder,
        placeholderText = if not v18.props.isUsingTouch then v18.props.placeholderKeyboardText else v18.props.placeholderTouchText,
        disabledChatPlaceholderText = v18.props.disabledChatPlaceholderText,
        size = UDim2.fromScale(1, 0),
        onSendChat = v18.props.onSendChat,
        transparencyValue = v18.props.transparencyValue,
        canLocalUserChat = v18.props.canLocalUserChat,
        targetTextChannel = v18.props.targetTextChannel,
        localTeam = v18.props.localTeam,
        localPlayer = v18.props.localPlayer,
        defaultSystemTextChannel = v18.props.defaultSystemTextChannel,
        shouldFocusChatInputBar = v18.props.shouldFocusChatInputBar,
        resetTargetChannel = v18.props.resetTargetChannel,
        focusChatHotKeyActivated = v18.props.focusChatHotKeyActivated,
        devDefinedFocusKeyCode = v18.props.devDefinedFocusKeyCode,
        visible = v18.props.visible,
        onFocus = v18.props.onFocus,
        onUnfocus = v18.props.onUnfocus,
        onHovered = v18.props.onHovered,
        onUnhovered = v18.props.onUnhovered,
        onAbsoluteSizeChanged = v18.props.onAbsoluteSizeChanged,
        onAbsolutePositionChanged = v18.props.onAbsolutePositionChanged,
        chatWindowSettings = v18.props.chatWindowSettings,
        chatInputBarSettings = v18.props.chatInputBarSettings,
        isChatHotkeyEnabled = v18.props.isChatHotkeyEnabled,
        autocompleteDropdownReducer = v18.props.autocompleteDropdownReducer,
        autocompleteDropdownActivated = v18.props.autocompleteDropdownActivated,
        autocompleteDropdownResultsChanged = v18.props.autocompleteDropdownResultsChanged,
        autocompleteDropdownSelectionChanged = v18.props.autocompleteDropdownSelectionChanged,
        autocompleteDropdownTypeChanged = v18.props.autocompleteDropdownTypeChanged,
        autocompleteDropdownDeactivated = v18.props.autocompleteDropdownDeactivated,
        autocompleteEnabled = v18.props.autocompleteEnabled
    });
end;
return v7.connect(function(v19)
    return {
        targetTextChannel = v19.TextChannels.targetTextChannel,
        localPlayer = l_Players_0.LocalPlayer,
        localTeam = v19.LocalTeam,
        isUsingTouch = v19.isUsingTouch,
        devDefinedFocusKeyCode = v19.ChatLayout.ChatInputBarSettings.KeyboardKeyCode,
        defaultSystemTextChannel = v19.TextChannels.allTextChannels.RBXSystem,
        shouldFocusChatInputBar = v19.shouldFocusChatInputBar,
        chatInputBarSettings = v19.ChatLayout.ChatInputBarSettings,
        isChatHotkeyEnabled = v19.ChatVisibility.isChatHotkeyEnabled.value,
        autocompleteDropdownReducer = v19.AutocompleteDropdown,
        autocompleteEnabled = v19.ChatLayout.ChatInputBarSettings.AutocompleteEnabled
    };
end, function(v20)
    return {
        focusChatHotKeyActivated = function()
            return v20(v9());
        end,
        onFocus = function()
            return v20(v16("focus"));
        end,
        onUnfocus = function()
            return v20(v16("unfocus"));
        end,
        onHovered = function()
            return v20(v16("hover"));
        end,
        onUnhovered = function()
            return v20(v16("unhover"));
        end,
        autocompleteDropdownActivated = function(v21)
            return v20(v10(v21));
        end,
        autocompleteDropdownResultsChanged = function(v22)
            return v20(v11(v22));
        end,
        autocompleteDropdownSelectionChanged = function(v23)
            return v20(v12(v23));
        end,
        autocompleteDropdownTypeChanged = function(v24)
            return v20(v13(v24));
        end,
        autocompleteDropdownDeactivated = function()
            return v20(v14());
        end
    };
end)(v3.connect(function(v25)
    return {
        placeholderKeyboardText = {
            "CoreScripts.TextChat.InputBar.Hint.MouseKeyboard",
            {
                KEY = l_UserInputService_0:GetStringForKeyCode(v25.devDefinedFocusKeyCode)
            }
        },
        placeholderTouchText = "CoreScripts.TextChat.InputBar.Hint.Touch",
        disabledChatPlaceholderText = "CoreScripts.TextChat.InputBar.Hint.PrivacySettingsDisabled"
    };
end)(v17));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("ExpChat");
local l_TextChatService_0 = game:GetService("TextChatService");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v3 = require(l_Parent_0.React);
local l_useStyle_0 = require(l_Parent_0.UIBlox).Core.Style.useStyle;
local l_List_0 = require(l_Parent_0.llama).List;
local l_Dictionary_0 = require(l_Parent_0.llama).Dictionary;
local v7 = require(l_script_FirstAncestor_0.Config);
local v8 = require(script.Parent.AutocompleteEntry);
return function(v9)
    local v10 = v3.useRef(nil);
    local l_Theme_0 = l_useStyle_0().Theme;
    local v16 = v3.useCallback(function(v12)
        local v15 = l_Dictionary_0.map(v12, function(v13, v14)
            return v3.createElement(v8, {
                result = v13,
                layoutOrder = v14,
                chatInputBarSettings = v9.chatInputBarSettings,
                setTransparency = v9.setTransparency,
                transparencyValue = v9.transparencyValue,
                isDividerVisible = l_List_0.count(v12) ~= v14,
                selectedIndex = v9.selectedIndex,
                autocompleteType = v9.autocompleteType,
                onAutocompleteDropdownHover = v9.onAutocompleteDropdownHover,
                onAutocompleteSelected = v9.onAutocompleteSelected
            }), v13;
        end);
        v15["$layout"] = v3.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder
        });
        return v15;
    end);
    local function v27()
        if not v10.current then
            return Vector2.new(0, 0);
        else
            local l_current_0 = v9.autocompleteDropdownRef.current;
            local v18 = not not l_current_0 and l_current_0.AbsoluteSize.Y or v7.AutocompleteFrameDefaultSizeY;
            local v19 = v9.chatInputBarSettings.TextSize + 16;
            local v20 = 0;
            if not ((((not l_current_0 or not l_current_0:FindFirstChild("ScrollBarFrame")) or not l_current_0.ScrollBarFrame:FindFirstChild("ScrollViewFrame")) or not l_current_0.ScrollBarFrame.ScrollViewFrame:FindFirstChild("ScrollView")) or not l_current_0.ScrollBarFrame.ScrollViewFrame.ScrollView:FindFirstChild("OffsetFrame")) then
                for _, v22 in ipairs(l_current_0.ScrollBarFrame.ScrollViewFrame.ScrollView.OffsetFrame:GetChildren()) do
                    if v22.ClassName == "Frame" and v22.LayoutOrder <= v9.selectedIndex then
                        v20 = v20 + v22.AbsoluteSize.Y;
                        if v22.LayoutOrder == v9.selectedIndex then
                            v19 = v22.AbsoluteSize.Y;
                        end;
                    end;
                end;
            end;
            local l_Y_0 = v10.current.CanvasPosition.Y;
            local v24 = l_Y_0 + v18;
            local v25 = v20 - v19;
            local l_l_Y_0_0 = l_Y_0;
            if v24 < v20 then
                l_l_Y_0_0 = v20 - v18;
            end;
            if v25 < l_Y_0 then
                l_l_Y_0_0 = v25;
            end;
            return Vector2.new(0, l_l_Y_0_0);
        end;
    end;
    local v28 = nil;
    local v29 = false;
    local l_ChatWindowConfiguration_0 = l_TextChatService_0:FindFirstChildOfClass("ChatWindowConfiguration");
    if l_ChatWindowConfiguration_0 then
        v28 = l_ChatWindowConfiguration_0.VerticalAlignment;
        v29 = l_ChatWindowConfiguration_0.Enabled;
    end;
    local v31 = false;
    if v28 == Enum.VerticalAlignment.Top then
        v31 = not v29;
    end;
    local v32 = v9.textBoxRef.current and v9.textBoxRef.current.AbsoluteSize.Y + 20;
    local v33 = (not not v9.autocompleteDropdownRef.current and v9.autocompleteDropdownRef.current:FindFirstAncestor("appLayout")) and v9.autocompleteDropdownRef.current:FindFirstAncestor("appLayout").chatWindow or nil;
    return v3.createElement("Frame", {
        AnchorPoint = not not v31 and Vector2.new(0, 0) or Vector2.new(0, 1),
        BackgroundTransparency = 1,
        Size = UDim2.new(0.95, 0, 0, #v9.results > 3 and v7.AutocompleteFrameDefaultSizeY or #v9.results * v7.AutocompleteEntryDefaultSizeY),
        Position = UDim2.new(0, 0, 0, not not v31 and v32 or 0),
        ZIndex = 2,
        Visible = v9.activated and #v9.results > 0,
        ref = v9.autocompleteDropdownRef
    }, {
        UISizeConstraint = v3.createElement("UISizeConstraint", {
            MaxSize = Vector2.new(v7.ChatWindowMaxWidth, not (not v33 or v31) and v33.AbsoluteSize.Y or math.huge)
        }),
        ScrollBarFrame = v3.createElement("Frame", {
            Size = UDim2.fromScale(1, 1),
            BackgroundTransparency = v9.setTransparency(0, v9.transparencyValue),
            BackgroundColor3 = v9.chatInputBarSettings.BackgroundColor3,
            ZIndex = 2
        }, {
            Border = v3.createElement("UIStroke", {
                ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
                Color = v7.ChatInputBarBorderColor3,
                Transparency = v9.setTransparency(v7.ChatInputBarBorderTransparency, v9.transparencyValue)
            }),
            Corner = v3.createElement("UICorner", {
                CornerRadius = UDim.new(0, 3)
            }),
            ScrollViewFrame = v3.createElement("Frame", {
                Size = UDim2.fromScale(1, 1),
                BackgroundTransparency = 1,
                ClipsDescendants = true,
                ZIndex = 2
            }, {
                ScrollView = v3.createElement("ScrollingFrame", {
                    Size = UDim2.new(1, -4, 1, 0),
                    AutomaticCanvasSize = Enum.AutomaticSize.Y,
                    CanvasSize = UDim2.new(0, 0, 0, #v9.results * v7.AutocompleteEntryDefaultSizeY),
                    CanvasPosition = v27(),
                    BackgroundTransparency = 1,
                    ScrollBarImageColor3 = l_Theme_0.UIEmphasis.Color,
                    ScrollBarImageTransparency = v9.setTransparency(0, v9.transparencyValue),
                    BorderSizePixel = 0,
                    ScrollBarThickness = 4,
                    VerticalScrollBarInset = Enum.ScrollBarInset.Always,
                    ClipsDescendants = false,
                    Selectable = true,
                    ZIndex = 2,
                    ref = v10
                }, {
                    OffsetFrame = v3.createElement("Frame", {
                        Size = UDim2.new(1, 8, 1, 0),
                        BackgroundTransparency = 1
                    }, v16(v9.results))
                })
            })
        })
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("ExpChat");
local v1 = require(l_script_FirstAncestor_0.Parent.React);
local v2 = require(l_script_FirstAncestor_0.Parent.EmojiList);
local v3 = require(l_script_FirstAncestor_0.Config);
return function(v4)
    local l_createElement_0 = v1.createElement;
    local v6 = "Frame";
    local v7 = {
        AutomaticSize = Enum.AutomaticSize.Y,
        Size = UDim2.new(1, 0, 0, v3.AutocompleteEntryDefaultSizeY),
        BackgroundTransparency = 1,
        LayoutOrder = v4.layoutOrder,
        ZIndex = 2,
        [v1.Event.MouseEnter] = v4.onAutocompleteDropdownHover
    };
    local v8 = {};
    local l_createElement_1 = v1.createElement;
    local v10 = "TextButton";
    local v11 = {
        Size = UDim2.new(1, 0, 1, not v4.isDividerVisible and 0 or -1),
        BackgroundTransparency = v4.setTransparency(v4.layoutOrder == v4.selectedIndex and v3.AutocompleteSelectedTransparency or 1, v4.transparencyValue),
        BackgroundColor3 = v4.layoutOrder == v4.selectedIndex and v3.AutocompleteSelectedColor or nil,
        Text = "",
        ZIndex = 3,
        [v1.Event.Activated] = v4.onAutocompleteSelected
    };
    local v12 = {
        UIPadding = v1.createElement("UIPadding", {
            PaddingLeft = UDim.new(0, 15),
            PaddingRight = UDim.new(0, 30),
            PaddingTop = UDim.new(0, 8),
            PaddingBottom = UDim.new(0, 8)
        }),
        UIListLayout = v1.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Horizontal,
            SortOrder = Enum.SortOrder.LayoutOrder,
            VerticalAlignment = Enum.VerticalAlignment.Center
        })
    };
    local v13 = false;
    if v4.autocompleteType == "emojis" then
        v13 = v1.createElement("TextLabel", {
            AutomaticSize = Enum.AutomaticSize.XY,
            BackgroundTransparency = 1,
            FontFace = v4.chatInputBarSettings.FontFace,
            RichText = true,
            Size = UDim2.new(0, 0, 0, 0),
            Text = string.format("%s", v2[v4.result].base),
            TextColor3 = v4.chatInputBarSettings.TextColor3,
            TextSize = v4.chatInputBarSettings.TextSize,
            TextStrokeColor3 = v4.chatInputBarSettings.TextStrokeColor3,
            TextStrokeTransparency = v4.setTransparency(v4.chatInputBarSettings.TextStrokeTransparency, v4.transparencyValue),
            TextTransparency = v4.setTransparency(0, v4.transparencyValue),
            TextWrapped = true,
            TextXAlignment = Enum.TextXAlignment.Left,
            TextYAlignment = Enum.TextYAlignment.Top,
            LayoutOrder = 1,
            ZIndex = 2
        });
    end;
    v12.EmojiLabel = v13;
    v13 = false;
    if v4.autocompleteType == "emojis" then
        v13 = v1.createElement("TextLabel", {
            AutomaticSize = Enum.AutomaticSize.XY,
            BackgroundTransparency = 1,
            FontFace = v4.chatInputBarSettings.FontFace,
            RichText = true,
            Size = UDim2.new(0, 0, 0, 0),
            Text = "  ",
            TextColor3 = v4.chatInputBarSettings.TextColor3,
            TextSize = 14,
            TextStrokeColor3 = v4.chatInputBarSettings.TextStrokeColor3,
            TextStrokeTransparency = v4.setTransparency(v4.chatInputBarSettings.TextStrokeTransparency, v4.transparencyValue),
            TextTransparency = v4.setTransparency(0, v4.transparencyValue),
            TextWrapped = true,
            TextXAlignment = Enum.TextXAlignment.Left,
            TextYAlignment = Enum.TextYAlignment.Top,
            LayoutOrder = 2,
            ZIndex = 2
        });
    end;
    v12.SpaceLabel = v13;
    v12.TextLabel = v1.createElement("TextLabel", {
        AutomaticSize = Enum.AutomaticSize.XY,
        BackgroundTransparency = 1,
        FontFace = v4.chatInputBarSettings.FontFace,
        RichText = true,
        Size = UDim2.new(0, 0, 0, 0),
        Text = string.format("%s", v4.result),
        TextColor3 = v4.chatInputBarSettings.TextColor3,
        TextSize = v4.chatInputBarSettings.TextSize,
        TextStrokeColor3 = v4.chatInputBarSettings.TextStrokeColor3,
        TextStrokeTransparency = v4.setTransparency(v4.chatInputBarSettings.TextStrokeTransparency, v4.transparencyValue),
        TextTransparency = v4.setTransparency(0, v4.transparencyValue),
        TextWrapped = true,
        TextXAlignment = Enum.TextXAlignment.Left,
        TextYAlignment = Enum.TextYAlignment.Top,
        LayoutOrder = 3,
        ZIndex = 2
    });
    v8.TextLabelButton = l_createElement_1(v10, v11, v12);
    v8.Divider = not not v4.isDividerVisible and v1.createElement("Frame", {
        Size = UDim2.new(1, 0, 0, 1),
        Position = UDim2.new(0, 0, 1, 0),
        AnchorPoint = Vector2.new(0, 1),
        BackgroundTransparency = v4.setTransparency(v3.ChatInputBarBorderTransparency, v4.transparencyValue),
        BackgroundColor3 = v3.ChatInputBarBorderColor3,
        BorderSizePixel = 0,
        ZIndex = 2
    }) or nil;
    return l_createElement_0(v6, v7, v8);
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("ExpChat");
local v1 = require(l_script_FirstAncestor_0.Parent.React);
local v2 = require(l_script_FirstAncestor_0.Config);
return function(v3)
    return v1.createElement("TextButton", {
        AutomaticSize = Enum.AutomaticSize.XY,
        TextColor3 = v2.ChatInputBarTextColor3,
        BackgroundTransparency = 1,
        Font = v2.ChatInputBarFont,
        Text = v3.targetTextChannelDisplayName or "",
        TextSize = v2.ChatInputBarTextSize,
        TextWrapped = true,
        TextTransparency = v3.transparency or 1,
        Size = UDim2.fromScale(0, 1),
        Visible = v3.targetTextChannelDisplayName ~= "",
        [v1.Change.AbsoluteSize] = v3.onAbsoluteSizeChanged,
        [v1.Event.Activated] = v3.onChannelChipActivated
    });
end;