Decompiled source of PEAK Chat Emojis v0.1.2

plugins/com.atomic.peakchatemojis.dll

Decompiled 2 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text.RegularExpressions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using PeakTextChat;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.UI;
using UnityEngine.UI.ProceduralImage;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: IgnoresAccessChecksTo("Accessibility")]
[assembly: IgnoresAccessChecksTo("Ashley.MeshSplitter")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: IgnoresAccessChecksTo("com.rlabrecque.steamworks.net")]
[assembly: IgnoresAccessChecksTo("DemiLib")]
[assembly: IgnoresAccessChecksTo("DOTween")]
[assembly: IgnoresAccessChecksTo("DOTweenPro")]
[assembly: IgnoresAccessChecksTo("EpicCommon")]
[assembly: IgnoresAccessChecksTo("EpicOnlineService")]
[assembly: IgnoresAccessChecksTo("HBAO.Runtime")]
[assembly: IgnoresAccessChecksTo("HBAO.Universal.Runtime")]
[assembly: IgnoresAccessChecksTo("LightVolume.Runtime")]
[assembly: IgnoresAccessChecksTo("Managers")]
[assembly: IgnoresAccessChecksTo("Newtonsoft.Json")]
[assembly: IgnoresAccessChecksTo("PeakTextChat")]
[assembly: IgnoresAccessChecksTo("Photon")]
[assembly: IgnoresAccessChecksTo("Photon3Unity3D")]
[assembly: IgnoresAccessChecksTo("PhotonChat")]
[assembly: IgnoresAccessChecksTo("PhotonRealtime")]
[assembly: IgnoresAccessChecksTo("PhotonUnityNetworking")]
[assembly: IgnoresAccessChecksTo("PhotonUnityNetworking.Utilities")]
[assembly: IgnoresAccessChecksTo("PhotonVoice.API")]
[assembly: IgnoresAccessChecksTo("PhotonVoice")]
[assembly: IgnoresAccessChecksTo("PhotonVoice.PUN")]
[assembly: IgnoresAccessChecksTo("PlatformProviders")]
[assembly: IgnoresAccessChecksTo("Platforms")]
[assembly: IgnoresAccessChecksTo("PortningsbolagetMemory")]
[assembly: IgnoresAccessChecksTo("pworld")]
[assembly: IgnoresAccessChecksTo("sc.posteffects.runtime")]
[assembly: IgnoresAccessChecksTo("Sirenix.OdinInspector.Attributes")]
[assembly: IgnoresAccessChecksTo("Sirenix.OdinInspector.Modules.Unity.Addressables")]
[assembly: IgnoresAccessChecksTo("Sirenix.OdinInspector.Modules.UnityLocalization")]
[assembly: IgnoresAccessChecksTo("Sirenix.Serialization.Config")]
[assembly: IgnoresAccessChecksTo("Sirenix.Serialization")]
[assembly: IgnoresAccessChecksTo("Sirenix.Utilities")]
[assembly: IgnoresAccessChecksTo("SteamCommon")]
[assembly: IgnoresAccessChecksTo("SteamManagerAssembly")]
[assembly: IgnoresAccessChecksTo("Tayx.Graphy")]
[assembly: IgnoresAccessChecksTo("unity-websocket-sharp")]
[assembly: IgnoresAccessChecksTo("Unity.Addressables")]
[assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")]
[assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")]
[assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")]
[assembly: IgnoresAccessChecksTo("Unity.Burst")]
[assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")]
[assembly: IgnoresAccessChecksTo("Unity.Cinemachine")]
[assembly: IgnoresAccessChecksTo("Unity.Collections")]
[assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")]
[assembly: IgnoresAccessChecksTo("Unity.InputSystem")]
[assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")]
[assembly: IgnoresAccessChecksTo("Unity.InputSystem.RebindingUI")]
[assembly: IgnoresAccessChecksTo("Unity.InternalAPIEngineBridge.004")]
[assembly: IgnoresAccessChecksTo("Unity.InternalAPIEngineBridge.013")]
[assembly: IgnoresAccessChecksTo("Unity.Localization")]
[assembly: IgnoresAccessChecksTo("Unity.Mathematics")]
[assembly: IgnoresAccessChecksTo("Unity.MemoryProfiler")]
[assembly: IgnoresAccessChecksTo("Unity.Microsoft.GDK")]
[assembly: IgnoresAccessChecksTo("Unity.Microsoft.GDK.Tools")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Center.Common")]
[assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")]
[assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipeline.Universal.ShaderLibrary")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime.Shared")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.GPUDriven.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Universal.2D.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Universal.Config.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Universal.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Universal.Shaders")]
[assembly: IgnoresAccessChecksTo("Unity.ResourceManager")]
[assembly: IgnoresAccessChecksTo("Unity.ScriptableBuildPipeline")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Authentication.PlayerAccounts")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Components")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Multiplayer")]
[assembly: IgnoresAccessChecksTo("Unity.Services.QoS")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Wire.Internal")]
[assembly: IgnoresAccessChecksTo("Unity.Splines")]
[assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")]
[assembly: IgnoresAccessChecksTo("Unity.Timeline")]
[assembly: IgnoresAccessChecksTo("Unity.UnifiedRayTracing.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")]
[assembly: IgnoresAccessChecksTo("UnityEngine.AccessibilityModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.AdaptivePerformanceModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.AIModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.AMDModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.AndroidJNIModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.AnimationModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.AssetBundleModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.AudioModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.ClothModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.ClusterInputModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.ClusterRendererModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.ContentLoadModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.CoreModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.CrashReportingModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.DirectorModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine")]
[assembly: IgnoresAccessChecksTo("UnityEngine.DSPGraphModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.GameCenterModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.GIModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.GraphicsStateCollectionSerializerModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.GridModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.HierarchyCoreModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.HierarchyModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.HotReloadModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.IdentifiersModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.ImageConversionModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.IMGUIModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.InputForUIModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.InputLegacyModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.InputModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.InsightsModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.JSONSerializeModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.LocalizationModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.MarshallingModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.MultiplayerModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.ParticleSystemModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.PerformanceReportingModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.Physics2DModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.PhysicsBackendPhysXModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.PhysicsModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.PropertiesModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.RenderAs2DModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.RuntimeInitializeOnLoadManagerInitializerModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.ScreenCaptureModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.ShaderRuntimeModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.ShaderVariantAnalyticsModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.SharedInternalsModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.SpriteMaskModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.SpriteShapeModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.StreamingModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.SubstanceModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.SubsystemsModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.TerrainModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.TerrainPhysicsModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.TextCoreFontEngineModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.TextCoreTextEngineModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.TextRenderingModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.TilemapModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.TLSModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.UI")]
[assembly: IgnoresAccessChecksTo("UnityEngine.UIElementsModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.UIModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.UmbraModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.UnityAnalyticsCommonModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.UnityAnalyticsModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.UnityConnectModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.UnityConsentModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.UnityCurlModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.UnityWebRequestModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.VectorGraphicsModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.VehiclesModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.VFXModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.VideoModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.VirtualTexturingModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.VRModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.WindModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.XRModule")]
[assembly: IgnoresAccessChecksTo("UnityUIExtensions")]
[assembly: IgnoresAccessChecksTo("User")]
[assembly: IgnoresAccessChecksTo("Utilities")]
[assembly: IgnoresAccessChecksTo("websocket-sharp")]
[assembly: IgnoresAccessChecksTo("Whinarn.UnityMeshSimplifier.Runtime")]
[assembly: IgnoresAccessChecksTo("XblPCSandbox")]
[assembly: IgnoresAccessChecksTo("Zorro.AutoLOD")]
[assembly: IgnoresAccessChecksTo("Zorro.ControllerSupport")]
[assembly: IgnoresAccessChecksTo("Zorro.Core.Runtime")]
[assembly: IgnoresAccessChecksTo("Zorro.JiggleBones")]
[assembly: IgnoresAccessChecksTo("Zorro.PhotonUtility")]
[assembly: IgnoresAccessChecksTo("Zorro.Settings.Runtime")]
[assembly: IgnoresAccessChecksTo("Zorro.UI.Runtime")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("com.atomic.peakchatemojis")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("0.1.2.0")]
[assembly: AssemblyInformationalVersion("0.1.2+444c4fff06befd97796ae67510142a0c35b361f9")]
[assembly: AssemblyProduct("com.atomic.peakchatemojis")]
[assembly: AssemblyTitle("PEAKChatEmojis")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.1.2.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace BepInEx
{
	[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
	[Conditional("CodeGeneration")]
	[Embedded]
	internal sealed class BepInAutoPluginAttribute : Attribute
	{
		public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
		{
		}
	}
}
namespace BepInEx.Preloader.Core.Patching
{
	[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
	[Conditional("CodeGeneration")]
	[Embedded]
	internal sealed class PatcherAutoPluginAttribute : Attribute
	{
		public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
		{
		}
	}
}
namespace Microsoft.CodeAnalysis
{
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace PEAKChatEmojis
{
	public class EmojiPicker : MonoBehaviour
	{
		private class EmojiRow : MonoBehaviour, IPointerDownHandler, IEventSystemHandler, IPointerEnterHandler
		{
			private EmojiPicker picker;

			private int index;

			private Image background;

			private RawImage icon;

			private AspectRatioFitter aspect;

			private TMP_Text label;

			private Color selectedColor;

			public static EmojiRow Create(EmojiPicker owner, int index, Transform parent, float height, float fontSize, Color textColor, Color panelColor)
			{
				//IL_0018: Unknown result type (might be due to invalid IL or missing references)
				//IL_001e: Expected O, but got Unknown
				//IL_0041: Unknown result type (might be due to invalid IL or missing references)
				//IL_004e: Unknown result type (might be due to invalid IL or missing references)
				//IL_005b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0068: Unknown result type (might be due to invalid IL or missing references)
				//IL_006f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0074: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e7: Expected O, but got Unknown
				//IL_0101: Unknown result type (might be due to invalid IL or missing references)
				//IL_0108: Expected O, but got Unknown
				//IL_0114: Unknown result type (might be due to invalid IL or missing references)
				//IL_012a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0140: Unknown result type (might be due to invalid IL or missing references)
				//IL_0156: Unknown result type (might be due to invalid IL or missing references)
				//IL_016f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0191: Unknown result type (might be due to invalid IL or missing references)
				//IL_0198: Expected O, but got Unknown
				//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
				//IL_01fd: Expected O, but got Unknown
				//IL_0243: Unknown result type (might be due to invalid IL or missing references)
				//IL_027d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0284: Expected O, but got Unknown
				//IL_0290: Unknown result type (might be due to invalid IL or missing references)
				//IL_02a6: Unknown result type (might be due to invalid IL or missing references)
				//IL_02c5: Unknown result type (might be due to invalid IL or missing references)
				//IL_02db: Unknown result type (might be due to invalid IL or missing references)
				GameObject val = new GameObject("Row", new Type[1] { typeof(RectTransform) });
				val.transform.SetParent(parent, false);
				EmojiRow emojiRow = val.AddComponent<EmojiRow>();
				emojiRow.picker = owner;
				emojiRow.index = index;
				emojiRow.selectedColor = new Color(panelColor.r * 0.82f, panelColor.g * 0.82f, panelColor.b * 0.82f, panelColor.a);
				ProceduralImage modifierType = val.AddComponent<ProceduralImage>();
				ProceduralImageExtensions.SetModifierType<UniformModifier>(modifierType).Radius = fontSize / 4f;
				emojiRow.background = (Image)(object)modifierType;
				((Graphic)emojiRow.background).color = Color.clear;
				LayoutElement val2 = val.AddComponent<LayoutElement>();
				val2.minHeight = height;
				val2.preferredHeight = height;
				float num = height - 4f;
				GameObject val3 = new GameObject("IconCell", new Type[1] { typeof(RectTransform) });
				val3.transform.SetParent(val.transform, false);
				RectTransform val4 = (RectTransform)val3.transform;
				val4.anchorMin = new Vector2(0f, 0f);
				val4.anchorMax = new Vector2(0f, 1f);
				val4.pivot = new Vector2(0f, 0.5f);
				val4.offsetMin = new Vector2(6f, 2f);
				val4.offsetMax = new Vector2(6f + num, -2f);
				GameObject val5 = new GameObject("Icon", new Type[1] { typeof(RectTransform) });
				val5.transform.SetParent(val3.transform, false);
				emojiRow.icon = val5.AddComponent<RawImage>();
				((Graphic)emojiRow.icon).raycastTarget = false;
				emojiRow.aspect = val5.AddComponent<AspectRatioFitter>();
				emojiRow.aspect.aspectMode = (AspectMode)3;
				GameObject val6 = new GameObject("Label", new Type[1] { typeof(RectTransform) });
				val6.transform.SetParent(val.transform, false);
				TextMeshProUGUI val7 = val6.AddComponent<TextMeshProUGUI>();
				if ((Object)(object)GUIManagerPatch.darumaDropOneFont != (Object)null)
				{
					((TMP_Text)val7).font = GUIManagerPatch.darumaDropOneFont;
				}
				((TMP_Text)val7).fontSize = fontSize * 0.8f;
				((Graphic)val7).color = textColor;
				((Graphic)val7).raycastTarget = false;
				((TMP_Text)val7).horizontalAlignment = (HorizontalAlignmentOptions)1;
				((TMP_Text)val7).verticalAlignment = (VerticalAlignmentOptions)512;
				((TMP_Text)val7).textWrappingMode = (TextWrappingModes)1;
				((TMP_Text)val7).overflowMode = (TextOverflowModes)1;
				RectTransform val8 = (RectTransform)val6.transform;
				val8.anchorMin = new Vector2(0f, 0f);
				val8.anchorMax = new Vector2(1f, 1f);
				val8.offsetMin = new Vector2(6f + num + 10f, 0f);
				val8.offsetMax = new Vector2(-6f, 0f);
				emojiRow.label = (TMP_Text)(object)val7;
				return emojiRow;
			}

			public void Show(string name, TMP_SpriteAsset asset, bool highlighted)
			{
				//IL_0099: Unknown result type (might be due to invalid IL or missing references)
				//IL_0091: Unknown result type (might be due to invalid IL or missing references)
				((Component)this).gameObject.SetActive(true);
				Texture spriteSheet = asset.spriteSheet;
				icon.texture = spriteSheet;
				if ((Object)(object)spriteSheet != (Object)null && spriteSheet.height > 0)
				{
					aspect.aspectRatio = (float)spriteSheet.width / (float)spriteSheet.height;
				}
				string text = ":" + name + ":";
				if (label.text != text)
				{
					label.text = text;
					label.ForceMeshUpdate(false, false);
				}
				((Graphic)background).color = (highlighted ? selectedColor : Color.clear);
			}

			public void Hide()
			{
				((Component)this).gameObject.SetActive(false);
			}

			public void OnPointerDown(PointerEventData eventData)
			{
				picker.Accept(index, refocus: true);
			}

			public void OnPointerEnter(PointerEventData eventData)
			{
				picker.Hover(index);
			}
		}

		private const int VisibleRows = 9;

		private const float RepeatDelay = 0.35f;

		private const float RepeatInterval = 0.04f;

		private TextChatDisplay display;

		private TMP_InputField input;

		private RectTransform panel;

		private readonly List<EmojiRow> rows = new List<EmojiRow>();

		private readonly List<string> matches = new List<string>();

		private bool dirty;

		private bool open;

		private int selected;

		private int scrollOffset;

		private int tokenStart;

		private int tokenEnd;

		private string lastText = "";

		private float nextRepeatTime;

		private int heldDirection;

		private static T Read<T>(object owner, string field)
		{
			return (T)AccessTools.Field(typeof(TextChatDisplay), field).GetValue(owner);
		}

		public void Init(TextChatDisplay owner)
		{
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Expected O, but got Unknown
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Expected O, but got Unknown
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_021a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0224: Expected O, but got Unknown
			//IL_0254: Unknown result type (might be due to invalid IL or missing references)
			//IL_0256: Unknown result type (might be due to invalid IL or missing references)
			//IL_0293: Unknown result type (might be due to invalid IL or missing references)
			//IL_029d: Expected O, but got Unknown
			display = owner;
			input = Read<TMP_InputField>(owner, "inputField");
			RectTransform val = Read<RectTransform>(owner, "baseTransform");
			float num = Read<float>(owner, "fontSize");
			Color val2 = (((Object)(object)((Selectable)input).targetGraphic != (Object)null) ? ((Selectable)input).targetGraphic.color : Read<Color>(owner, "offWhite"));
			Color textColor = (((Object)(object)input.textComponent != (Object)null) ? ((Graphic)input.textComponent).color : Color.black);
			textColor.a = 1f;
			float height = num * 1.3f;
			Canvas componentInParent = ((Component)val).GetComponentInParent<Canvas>();
			if ((Object)(object)componentInParent != (Object)null && (Object)(object)((Component)componentInParent).GetComponent<GraphicRaycaster>() == (Object)null)
			{
				((Component)componentInParent).gameObject.AddComponent<GraphicRaycaster>();
			}
			GameObject val3 = new GameObject("EmojiPicker", new Type[1] { typeof(RectTransform) });
			panel = (RectTransform)val3.transform;
			((Transform)panel).SetParent((Transform)(object)val, false);
			panel.anchorMin = new Vector2(0f, 0f);
			panel.anchorMax = new Vector2(1f, 0f);
			panel.pivot = new Vector2(0.5f, 0f);
			panel.anchoredPosition = new Vector2(0f, num * 1.75f + 4f);
			panel.sizeDelta = new Vector2(-10f, 0f);
			ProceduralImage val4 = val3.AddComponent<ProceduralImage>();
			((Graphic)val4).color = val2;
			ProceduralImageExtensions.SetModifierType<UniformModifier>(val4).Radius = num / 4f;
			Canvas val5 = val3.AddComponent<Canvas>();
			val5.overrideSorting = true;
			val5.sortingOrder = 100;
			val3.AddComponent<GraphicRaycaster>();
			VerticalLayoutGroup val6 = val3.AddComponent<VerticalLayoutGroup>();
			((HorizontalOrVerticalLayoutGroup)val6).childControlWidth = true;
			((HorizontalOrVerticalLayoutGroup)val6).childControlHeight = true;
			((HorizontalOrVerticalLayoutGroup)val6).childForceExpandWidth = true;
			((HorizontalOrVerticalLayoutGroup)val6).childForceExpandHeight = false;
			((LayoutGroup)val6).padding = new RectOffset(4, 4, 4, 4);
			ContentSizeFitter val7 = val3.AddComponent<ContentSizeFitter>();
			val7.verticalFit = (FitMode)2;
			val7.horizontalFit = (FitMode)0;
			for (int i = 0; i < 9; i++)
			{
				rows.Add(EmojiRow.Create(this, i, (Transform)(object)panel, height, num, textColor, val2));
			}
			val3.SetActive(false);
			OnValidateInput previous = input.onValidateInput;
			input.onValidateInput = (OnValidateInput)delegate(string text, int index, char c)
			{
				if (c == '\t')
				{
					return '\0';
				}
				return (previous == null) ? c : previous.Invoke(text, index, c);
			};
			((UnityEvent<string>)(object)input.onValueChanged).AddListener((UnityAction<string>)delegate
			{
				dirty = true;
			});
		}

		private static bool IsNameChar(char c)
		{
			if (!char.IsLetterOrDigit(c) && c != '_' && c != '-')
			{
				return c == '~';
			}
			return true;
		}

		private void Refresh()
		{
			dirty = false;
			string text = (lastText = input.text ?? "");
			int num = Mathf.Clamp(input.caretPosition, 0, text.Length);
			int num2 = -1;
			for (int num3 = num - 1; num3 >= 0; num3--)
			{
				char c = text[num3];
				if (c == ':')
				{
					num2 = num3;
					break;
				}
				if (!IsNameChar(c))
				{
					break;
				}
			}
			if (num2 < 0 || (num2 > 0 && char.IsLetterOrDigit(text[num2 - 1])))
			{
				Hide();
				return;
			}
			string query = text.Substring(num2 + 1, num - num2 - 1);
			matches.Clear();
			matches.AddRange((from k in Plugin.EmojiAssets.Keys
				where k.IndexOf(query, StringComparison.OrdinalIgnoreCase) >= 0
				orderby (!k.StartsWith(query, StringComparison.OrdinalIgnoreCase)) ? 1 : 0
				select k).ThenBy<string, string>((string k) => k, StringComparer.OrdinalIgnoreCase));
			if (matches.Count == 0)
			{
				Hide();
				return;
			}
			tokenStart = num2;
			tokenEnd = num;
			selected = 0;
			scrollOffset = 0;
			open = true;
			((Component)panel).gameObject.SetActive(true);
			UpdateRows();
		}

		private void UpdateRows()
		{
			int num = Mathf.Max(0, matches.Count - 9);
			scrollOffset = Mathf.Clamp(scrollOffset, 0, num);
			for (int i = 0; i < rows.Count; i++)
			{
				int num2 = scrollOffset + i;
				if (num2 < matches.Count)
				{
					rows[i].Show(matches[num2], Plugin.EmojiAssets[matches[num2]], num2 == selected);
				}
				else
				{
					rows[i].Hide();
				}
			}
		}

		private void EnsureSelectedVisible()
		{
			if (selected < scrollOffset)
			{
				scrollOffset = selected;
			}
			else if (selected >= scrollOffset + 9)
			{
				scrollOffset = selected - 9 + 1;
			}
		}

		private void MoveSelection(int direction)
		{
			if (matches.Count != 0)
			{
				selected = (selected + direction + matches.Count) % matches.Count;
				EnsureSelectedVisible();
				UpdateRows();
			}
		}

		private void ScrollWindow(int rowsToScroll)
		{
			if (matches.Count > 9)
			{
				scrollOffset += rowsToScroll;
				scrollOffset = Mathf.Clamp(scrollOffset, 0, matches.Count - 9);
				selected = Mathf.Clamp(selected, scrollOffset, scrollOffset + 9 - 1);
				UpdateRows();
			}
		}

		private void Hide()
		{
			open = false;
			heldDirection = 0;
			if ((Object)(object)panel != (Object)null)
			{
				((Component)panel).gameObject.SetActive(false);
			}
		}

		public void Hover(int index)
		{
			int num = scrollOffset + index;
			if (open && num != selected && num < matches.Count)
			{
				selected = num;
				UpdateRows();
			}
		}

		public void Accept(int index, bool refocus)
		{
			int num = scrollOffset + index;
			if (!open || index < 0 || num < 0 || num >= matches.Count)
			{
				return;
			}
			string text = input.text ?? "";
			if (!(text != lastText) && tokenEnd <= text.Length)
			{
				string text2 = text.Substring(tokenEnd);
				bool flag = text2.StartsWith(" ");
				string text3 = ":" + matches[num] + ":" + (flag ? "" : " ");
				int num2 = tokenStart + text3.Length + (flag ? 1 : 0);
				input.SetTextWithoutNotify(text.Substring(0, tokenStart) + text3 + text2);
				input.caretPosition = num2;
				lastText = input.text;
				Hide();
				if (refocus)
				{
					display.isBlockingInput = true;
					EventSystem.current.SetSelectedGameObject(((Component)input).gameObject);
					input.ActivateInputField();
				}
				((MonoBehaviour)this).StartCoroutine(SetCaretNextFrame(num2));
			}
		}

		private IEnumerator SetCaretNextFrame(int caret)
		{
			yield return null;
			if ((Object)(object)input != (Object)null)
			{
				input.caretPosition = caret;
			}
		}

		private void Update()
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)input == (Object)null)
			{
				return;
			}
			if (dirty)
			{
				Refresh();
			}
			if (!open)
			{
				return;
			}
			if (!display.isBlockingInput)
			{
				Hide();
				return;
			}
			HandleArrowKeys();
			float y = Input.mouseScrollDelta.y;
			if (Mathf.Abs(y) > 0.01f)
			{
				ScrollWindow((!(y > 0f)) ? 1 : (-1));
			}
			if (Input.GetKeyDown((KeyCode)9))
			{
				Accept(selected - scrollOffset, refocus: false);
			}
		}

		private void HandleArrowKeys()
		{
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			int num = 0;
			if (Input.GetKeyDown((KeyCode)274))
			{
				num = 1;
			}
			else if (Input.GetKeyDown((KeyCode)273))
			{
				num = -1;
			}
			if (num != 0)
			{
				heldDirection = num;
				nextRepeatTime = Time.unscaledTime + 0.35f;
				MoveSelection(num);
			}
			else if (heldDirection != 0)
			{
				KeyCode val = (KeyCode)((heldDirection > 0) ? 274 : 273);
				if (!Input.GetKey(val))
				{
					heldDirection = 0;
				}
				else if (Time.unscaledTime >= nextRepeatTime)
				{
					nextRepeatTime = Time.unscaledTime + 0.04f;
					MoveSelection(heldDirection);
				}
			}
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.atomic.peakchatemojis", "PEAKChatEmojis", "0.1.2")]
	public class Plugin : BaseUnityPlugin
	{
		internal static readonly Dictionary<string, TMP_SpriteAsset> EmojiAssets = new Dictionary<string, TMP_SpriteAsset>();

		internal static TMP_SpriteAsset PrimarySpriteAsset;

		private const float EmojiSize = 1f;

		private const float BaselineRatio = 0.8f;

		public const string Id = "com.atomic.peakchatemojis";

		internal static ManualLogSource Log { get; private set; } = null;

		public static string Name => "PEAKChatEmojis";

		public static string Version => "0.1.2";

		private void Awake()
		{
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			Log = ((BaseUnityPlugin)this).Logger;
			string[] directories = Directory.GetDirectories(Paths.PluginPath, "Emojis", SearchOption.AllDirectories);
			foreach (string path in directories)
			{
				string[] files = Directory.GetFiles(path);
				foreach (string path2 in files)
				{
					switch (Path.GetExtension(path2).ToLowerInvariant())
					{
					case ".png":
					case ".jpg":
					case ".jpeg":
						Register(path2);
						break;
					}
				}
			}
			if (EmojiAssets.Count > 0)
			{
				PrimarySpriteAsset = EmojiAssets.Values.First();
				PrimarySpriteAsset.fallbackSpriteAssets = EmojiAssets.Values.Skip(1).ToList();
			}
			new Harmony("com.atomic.peakchatemojis").PatchAll();
			Log.LogInfo((object)$"Loaded {EmojiAssets.Count} emojis");
		}

		private static void Register(string path)
		{
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Expected O, but got Unknown
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Expected O, but got Unknown
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0198: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Expected O, but got Unknown
			try
			{
				string text = Path.GetFileNameWithoutExtension(path);
				if (EmojiAssets.ContainsKey(text))
				{
					string text2 = text;
					int num = 1;
					while (EmojiAssets.ContainsKey(text + "~" + num))
					{
						num++;
					}
					text = text + "~" + num;
					Log.LogWarning((object)("Duplicate emoji name " + text2 + " in " + path + ". Renamed to " + text));
				}
				Texture2D val = new Texture2D(2, 2, (TextureFormat)4, true);
				if (!ImageConversion.LoadImage(val, File.ReadAllBytes(path)))
				{
					Log.LogError((object)("Failed to load " + path));
					return;
				}
				((Texture)val).filterMode = (FilterMode)2;
				((Texture)val).wrapMode = (TextureWrapMode)1;
				Shader val2 = Shader.Find("TextMeshPro/Sprite") ?? Shader.Find("UI/Default");
				TMP_SpriteAsset val3 = ScriptableObject.CreateInstance<TMP_SpriteAsset>();
				((Object)val3).name = "Emoji_" + text;
				val3.spriteSheet = (Texture)(object)val;
				((TMP_Asset)val3).material = new Material(val2)
				{
					mainTexture = (Texture)(object)val
				};
				val3.spriteInfoList = new List<TMP_Sprite>
				{
					new TMP_Sprite
					{
						id = 0,
						name = text,
						hashCode = TMP_TextUtilities.GetSimpleHashCode(text),
						x = 0f,
						y = 0f,
						width = ((Texture)val).width,
						height = ((Texture)val).height,
						xOffset = 0f,
						yOffset = (float)((Texture)val).height * 0.8f,
						xAdvance = ((Texture)val).width,
						scale = 1f,
						pivot = new Vector2(0f, 0f)
					}
				};
				val3.UpdateLookupTables();
				EmojiAssets.Add(text, val3);
			}
			catch (Exception arg)
			{
				Log.LogError((object)$"Error registering {path}: {arg}");
			}
		}
	}
	[HarmonyPatch]
	public static class ChatPatches
	{
		private static readonly Regex EmojiIdentifier = new Regex(":([a-zA-Z0-9_\\-~]+):", RegexOptions.Compiled);

		private static readonly Regex SpriteTag = new Regex("<sprite name=\"[^\"]*\">", RegexOptions.Compiled);

		[HarmonyPostfix]
		[HarmonyPatch(typeof(TextChatDisplay), "Start")]
		public static void StartPostfix(TextChatDisplay __instance)
		{
			if (Plugin.EmojiAssets.Count != 0 && !__instance.usingIMGUI)
			{
				((Component)__instance).gameObject.AddComponent<EmojiPicker>().Init(__instance);
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(TextChatDisplay), "CreateText")]
		public static void CreateTextPostfix(TMP_Text __result)
		{
			if ((Object)(object)__result != (Object)null && (Object)(object)Plugin.PrimarySpriteAsset != (Object)null)
			{
				__result.spriteAsset = Plugin.PrimarySpriteAsset;
			}
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(TextChatDisplay), "AddMessage", new Type[] { typeof(string) })]
		public static void AddMessagePrefix(ref string message)
		{
			if (string.IsNullOrEmpty(message) || (Object)(object)Plugin.PrimarySpriteAsset == (Object)null)
			{
				return;
			}
			try
			{
				int num = 0;
				int num2 = message.IndexOf("]</color>: ");
				if (num2 != -1)
				{
					num = num2 + "]</color>: ".Length;
				}
				else if ((num2 = message.IndexOf("</color>: ")) != -1)
				{
					num = num2 + "</color>: ".Length;
				}
				else if ((num2 = message.IndexOf("]: ")) != -1)
				{
					num = num2 + "]: ".Length;
				}
				string text = message.Substring(0, num);
				string input = message.Substring(num);
				bool containsValidEmoji = false;
				string text2 = EmojiIdentifier.Replace(input, delegate(Match m)
				{
					if (Plugin.EmojiAssets.ContainsKey(m.Groups[1].Value))
					{
						containsValidEmoji = true;
						return "<sprite name=\"" + m.Groups[1].Value + "\">";
					}
					return m.Value;
				});
				if (containsValidEmoji)
				{
					string value = SpriteTag.Replace(text2, string.Empty);
					if (string.IsNullOrWhiteSpace(value))
					{
						text2 = "<size=\"40\">" + text2 + "</size>";
					}
				}
				message = text + text2;
			}
			catch (Exception arg)
			{
				Plugin.Log.LogError((object)$"Error formatting chat message in AddMessagePrefix: {arg}");
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(TextChatDisplay), "AddMessage", new Type[] { typeof(string) })]
		public static void AddMessagePostfix(TextChatDisplay __instance)
		{
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				RectTransform chatLogViewportTransform = __instance.chatLogViewportTransform;
				if (!((Object)(object)chatLogViewportTransform == (Object)null) && ((Transform)chatLogViewportTransform).childCount != 0)
				{
					Transform child = ((Transform)chatLogViewportTransform).GetChild(((Transform)chatLogViewportTransform).childCount - 1);
					RectTransform val = (RectTransform)(object)((child is RectTransform) ? child : null);
					TMP_Text val2 = (((Object)(object)val != (Object)null) ? ((Component)val).GetComponent<TMP_Text>() : null);
					if (!((Object)(object)val2 == (Object)null) && val2.text.Contains("<sprite"))
					{
						Vector2 boxSize = __instance.boxSize;
						string text = SpriteTag.Replace(val2.text, "W");
						float y = val2.GetPreferredValues(text, boxSize.x - 24f, 1000f).y;
						val.sizeDelta = new Vector2(0f, y);
					}
				}
			}
			catch (Exception ex)
			{
				Plugin.Log.LogError((object)ex);
			}
		}
	}
}
namespace System.Diagnostics.CodeAnalysis
{
	[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class ConstantExpectedAttribute : Attribute
	{
		public object? Min { get; set; }

		public object? Max { get; set; }
	}
	[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class ExperimentalAttribute : Attribute
	{
		public string DiagnosticId { get; }

		public string? UrlFormat { get; set; }

		public ExperimentalAttribute(string diagnosticId)
		{
			DiagnosticId = diagnosticId;
		}
	}
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
	[ExcludeFromCodeCoverage]
	internal sealed class MemberNotNullAttribute : Attribute
	{
		public string[] Members { get; }

		public MemberNotNullAttribute(string member)
		{
			Members = new string[1] { member };
		}

		public MemberNotNullAttribute(params string[] members)
		{
			Members = members;
		}
	}
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
	[ExcludeFromCodeCoverage]
	internal sealed class MemberNotNullWhenAttribute : Attribute
	{
		public bool ReturnValue { get; }

		public string[] Members { get; }

		public MemberNotNullWhenAttribute(bool returnValue, string member)
		{
			ReturnValue = returnValue;
			Members = new string[1] { member };
		}

		public MemberNotNullWhenAttribute(bool returnValue, params string[] members)
		{
			ReturnValue = returnValue;
			Members = members;
		}
	}
	[AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class SetsRequiredMembersAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class StringSyntaxAttribute : Attribute
	{
		public const string CompositeFormat = "CompositeFormat";

		public const string DateOnlyFormat = "DateOnlyFormat";

		public const string DateTimeFormat = "DateTimeFormat";

		public const string EnumFormat = "EnumFormat";

		public const string GuidFormat = "GuidFormat";

		public const string Json = "Json";

		public const string NumericFormat = "NumericFormat";

		public const string Regex = "Regex";

		public const string TimeOnlyFormat = "TimeOnlyFormat";

		public const string TimeSpanFormat = "TimeSpanFormat";

		public const string Uri = "Uri";

		public const string Xml = "Xml";

		public string Syntax { get; }

		public object?[] Arguments { get; }

		public StringSyntaxAttribute(string syntax)
		{
			Syntax = syntax;
			Arguments = new object[0];
		}

		public StringSyntaxAttribute(string syntax, params object?[] arguments)
		{
			Syntax = syntax;
			Arguments = arguments;
		}
	}
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class UnscopedRefAttribute : Attribute
	{
	}
}
namespace System.Runtime.Versioning
{
	[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class RequiresPreviewFeaturesAttribute : Attribute
	{
		public string? Message { get; }

		public string? Url { get; set; }

		public RequiresPreviewFeaturesAttribute()
		{
		}

		public RequiresPreviewFeaturesAttribute(string? message)
		{
			Message = message;
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
	[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class CallerArgumentExpressionAttribute : Attribute
	{
		public string ParameterName { get; }

		public CallerArgumentExpressionAttribute(string parameterName)
		{
			ParameterName = parameterName;
		}
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class CollectionBuilderAttribute : Attribute
	{
		public Type BuilderType { get; }

		public string MethodName { get; }

		public CollectionBuilderAttribute(Type builderType, string methodName)
		{
			BuilderType = builderType;
			MethodName = methodName;
		}
	}
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class CompilerFeatureRequiredAttribute : Attribute
	{
		public const string RefStructs = "RefStructs";

		public const string RequiredMembers = "RequiredMembers";

		public string FeatureName { get; }

		public bool IsOptional { get; set; }

		public CompilerFeatureRequiredAttribute(string featureName)
		{
			FeatureName = featureName;
		}
	}
	[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class InterpolatedStringHandlerArgumentAttribute : Attribute
	{
		public string[] Arguments { get; }

		public InterpolatedStringHandlerArgumentAttribute(string argument)
		{
			Arguments = new string[1] { argument };
		}

		public InterpolatedStringHandlerArgumentAttribute(params string[] arguments)
		{
			Arguments = arguments;
		}
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class InterpolatedStringHandlerAttribute : Attribute
	{
	}
	[EditorBrowsable(EditorBrowsableState.Never)]
	[ExcludeFromCodeCoverage]
	internal static class IsExternalInit
	{
	}
	[AttributeUsage(AttributeTargets.Method, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class ModuleInitializerAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class OverloadResolutionPriorityAttribute : Attribute
	{
		public int Priority { get; }

		public OverloadResolutionPriorityAttribute(int priority)
		{
			Priority = priority;
		}
	}
	[AttributeUsage(AttributeTargets.Parameter, Inherited = true, AllowMultiple = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class ParamCollectionAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class RequiredMemberAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
	[EditorBrowsable(EditorBrowsableState.Never)]
	[ExcludeFromCodeCoverage]
	internal sealed class RequiresLocationAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event | AttributeTargets.Interface, Inherited = false)]
	[ExcludeFromCodeCoverage]
	internal sealed class SkipLocalsInitAttribute : Attribute
	{
	}
}