Decompiled source of BepisModSettings v1.3.0

plugins/BepisModSettings/BepisModSettings.dll

Decompiled 2 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.ExceptionServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Threading.Tasks.Sources;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Core.Logging.Interpolation;
using BepInEx.Logging;
using BepInEx.NET.Common;
using BepInExResoniteShim;
using BepisLocaleLoader;
using BepisModSettings.ConfigAttributes;
using BepisModSettings.DataFeeds;
using BepisResoniteWrapper;
using Elements.Assets;
using Elements.Core;
using FrooxEngine;
using FrooxEngine.UIX;
using HarmonyLib;
using ProtoFlux.Runtimes.Execution.Nodes.FrooxEngine.Variables;
using Renderite.Shared;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")]
[assembly: AssemblyCompany("ResoniteModding")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.3.0.0")]
[assembly: AssemblyInformationalVersion("1.3.0+d060a9fa570ffdc6555a33705445b006e3b8ad82")]
[assembly: AssemblyProduct("Bepis Mod Settings")]
[assembly: AssemblyTitle("BepisModSettings")]
[assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/ResoniteModding/BepisModSettings")]
[assembly: AssemblyVersion("1.3.0.0")]
[module: RefSafetyRules(11)]
namespace BepisModSettings
{
	[ResonitePlugin("ResoniteModding.BepisModSettings", "Bepis Mod Settings", "1.3.0", "ResoniteModding", "https://github.com/ResoniteModding/BepisModSettings")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BasePlugin
	{
		[HarmonyPatch(typeof(SettingsDataFeed), "Enumerate", new global::System.Type[]
		{
			typeof(global::System.Collections.Generic.IReadOnlyList<string>),
			typeof(global::System.Collections.Generic.IReadOnlyList<string>),
			typeof(string),
			typeof(object)
		})]
		private static class EnumeratorPostfix
		{
			private static global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> Postfix(global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> __result, SettingsDataFeed __instance, global::System.Collections.Generic.IReadOnlyList<string> path)
			{
				//IL_0045: Unknown result type (might be due to invalid IL or missing references)
				//IL_004b: Expected O, but got Unknown
				try
				{
					if (!Enumerable.Contains<string>((global::System.Collections.Generic.IEnumerable<string>)path, "BepInEx"))
					{
						return __result;
					}
					if (!WorldExtensions.IsUserspace(((Worker)__instance).World))
					{
						return DataFeedInjector.NotUserspaceEnumerable(path);
					}
					DataFeedHelpers.SettingsDataFeed = __instance;
					return DataFeedInjector.ReplaceEnumerable(__result, path);
				}
				catch (global::System.Exception ex)
				{
					ManualLogSource log = Log;
					bool flag = default(bool);
					BepInExErrorLogInterpolatedStringHandler val = new BepInExErrorLogInterpolatedStringHandler(61, 2, ref flag);
					if (flag)
					{
						((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Failed to generate replacement for ");
						((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("SettingsDataFeed");
						((BepInExLogInterpolatedStringHandler)val).AppendLiteral(".");
						((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("Enumerate");
						((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" - using original result.");
					}
					log.LogError(val);
					Log.LogError((object)ex.Message);
					return __result;
				}
			}
		}

		[HarmonyPatch(typeof(SettingsDataFeed), "PathSegmentName")]
		private static class PathSegmentNamePatch
		{
			private static bool Prefix(string pathSegment, int depth, ref LocaleString __result)
			{
				//IL_002d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0032: Unknown result type (might be due to invalid IL or missing references)
				//IL_0012: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				//IL_0034: Unknown result type (might be due to invalid IL or missing references)
				//IL_0035: Unknown result type (might be due to invalid IL or missing references)
				LocaleString val = ((depth != 1) ? LocaleHelper.AsLocaleKey("Settings." + pathSegment + ".Breadcrumb", (string)null, true, (Dictionary<string, object>)null) : LocaleHelper.AsLocaleKey("Settings.Category." + pathSegment, (string)null, true, (Dictionary<string, object>)null));
				__result = val;
				return false;
			}
		}

		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static Action <>9__10_0;

			public static Func<Slot> <>9__10_1;

			public static Action<PluginInfo> <>9__10_4;

			public static Action <>9__10_3;

			public static Action <>9__10_2;

			public static Action<IField<string>> <>9__13_0;

			public static Action<IField<string>> <>9__13_1;

			public static Action<IField<string>> <>9__13_2;

			public static Action<IField<string>> <>9__13_3;

			internal void <Load>b__10_0()
			{
				Log.LogError((object)"OneOfThem");
			}

			internal Slot <Load>b__10_1()
			{
				SettingsDataFeed settingsDataFeed = DataFeedHelpers.SettingsDataFeed;
				if (settingsDataFeed == null)
				{
					return null;
				}
				Slot slot = ((Component)settingsDataFeed).Slot;
				if (slot == null)
				{
					return null;
				}
				return InspectorHelper.OpenInspectorForTarget((IWorldElement)(object)slot, (Slot)null, false);
			}

			internal void <Load>b__10_2()
			{
				//IL_002f: Unknown result type (might be due to invalid IL or missing references)
				//IL_003c: Expected O, but got Unknown
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				//IL_003d: Expected O, but got Unknown
				//IL_007f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0084: Unknown result type (might be due to invalid IL or missing references)
				//IL_008a: Expected O, but got Unknown
				FieldInfo obj = AccessTools.Field(typeof(Settings), "_categoryInfos");
				if (((obj != null) ? obj.GetValue((object)null) : null) is Dictionary<string, SettingCategoryInfo> val)
				{
					SettingCategoryInfo val2 = new SettingCategoryInfo(new Uri("https://avatars.githubusercontent.com/u/39589027?s=200&v=4.png"), 99L);
					val2.InitKey("BepInEx");
					val.Add(val2.Key, val2);
				}
				else
				{
					Log.LogError((object)"Failed to find _categoryInfos field in Settings.");
				}
				Engine current = Engine.Current;
				object obj2 = <>9__10_3;
				if (obj2 == null)
				{
					Action val3 = delegate
					{
						Log.LogInfo((object)"Running shutdown, saving configs...");
						Log.LogDebug((object)"Saving Config for BepInEx.Core");
						ConfigFile coreConfig = ConfigFile.CoreConfig;
						if (coreConfig != null)
						{
							coreConfig.Save();
						}
						if (((BaseChainloader<BasePlugin>)(object)NetChainloader.Instance).Plugins.Count > 0)
						{
							CollectionExtensions.Do<PluginInfo>((global::System.Collections.Generic.IEnumerable<PluginInfo>)((BaseChainloader<BasePlugin>)(object)NetChainloader.Instance).Plugins.Values, (Action<PluginInfo>)delegate(PluginInfo x)
							{
								//IL_001a: Unknown result type (might be due to invalid IL or missing references)
								//IL_0020: Expected O, but got Unknown
								object instance = x.Instance;
								BasePlugin val4 = (BasePlugin)((instance is BasePlugin) ? instance : null);
								if (val4 != null)
								{
									ManualLogSource log = Log;
									bool flag = default(bool);
									BepInExDebugLogInterpolatedStringHandler val5 = new BepInExDebugLogInterpolatedStringHandler(18, 1, ref flag);
									if (flag)
									{
										((BepInExLogInterpolatedStringHandler)val5).AppendLiteral("Saving Config for ");
										((BepInExLogInterpolatedStringHandler)val5).AppendFormatted<string>(x.Metadata.GUID);
									}
									log.LogDebug(val5);
									ConfigFile config = val4.Config;
									if (config != null)
									{
										config.Save();
									}
								}
							});
						}
					};
					<>9__10_3 = val3;
					obj2 = (object)val3;
				}
				current.OnShutdown += (Action)obj2;
			}

			internal void <Load>b__10_3()
			{
				Log.LogInfo((object)"Running shutdown, saving configs...");
				Log.LogDebug((object)"Saving Config for BepInEx.Core");
				ConfigFile coreConfig = ConfigFile.CoreConfig;
				if (coreConfig != null)
				{
					coreConfig.Save();
				}
				if (((BaseChainloader<BasePlugin>)(object)NetChainloader.Instance).Plugins.Count <= 0)
				{
					return;
				}
				CollectionExtensions.Do<PluginInfo>((global::System.Collections.Generic.IEnumerable<PluginInfo>)((BaseChainloader<BasePlugin>)(object)NetChainloader.Instance).Plugins.Values, (Action<PluginInfo>)delegate(PluginInfo x)
				{
					//IL_001a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0020: Expected O, but got Unknown
					object instance = x.Instance;
					BasePlugin val = (BasePlugin)((instance is BasePlugin) ? instance : null);
					if (val != null)
					{
						ManualLogSource log = Log;
						bool flag = default(bool);
						BepInExDebugLogInterpolatedStringHandler val2 = new BepInExDebugLogInterpolatedStringHandler(18, 1, ref flag);
						if (flag)
						{
							((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("Saving Config for ");
							((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<string>(x.Metadata.GUID);
						}
						log.LogDebug(val2);
						ConfigFile config = val.Config;
						if (config != null)
						{
							config.Save();
						}
					}
				});
			}

			internal void <Load>b__10_4(PluginInfo x)
			{
				//IL_001a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0020: Expected O, but got Unknown
				object instance = x.Instance;
				BasePlugin val = (BasePlugin)((instance is BasePlugin) ? instance : null);
				if (val != null)
				{
					ManualLogSource log = Log;
					bool flag = default(bool);
					BepInExDebugLogInterpolatedStringHandler val2 = new BepInExDebugLogInterpolatedStringHandler(18, 1, ref flag);
					if (flag)
					{
						((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("Saving Config for ");
						((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<string>(x.Metadata.GUID);
					}
					log.LogDebug(val2);
					ConfigFile config = val.Config;
					if (config != null)
					{
						config.Save();
					}
				}
			}

			internal void <CustomDateFeedEnumerate>b__13_0(IField<string> field)
			{
				((IValue<string>)(object)field).Value = "Test1";
			}

			internal void <CustomDateFeedEnumerate>b__13_1(IField<string> field)
			{
				((IValue<string>)(object)field).Value = "Test2";
			}

			internal void <CustomDateFeedEnumerate>b__13_2(IField<string> field)
			{
				((IValue<string>)(object)field).Value = "Test3";
			}

			internal void <CustomDateFeedEnumerate>b__13_3(IField<string> field)
			{
				((IValue<string>)(object)field).Value = "Test4";
			}
		}

		[CompilerGenerated]
		private sealed class <CustomDateFeedEnumerate>d__13 : global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>, global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>, global::System.IAsyncDisposable, IValueTaskSource<bool>, IValueTaskSource, IAsyncStateMachine
		{
			public int <>1__state;

			public AsyncIteratorMethodBuilder <>t__builder;

			public ManualResetValueTaskSourceCore<bool> <>v__promiseOfValueOrEnd;

			private DataFeedItem <>2__current;

			private bool <>w__disposeMode;

			private int <>l__initialThreadId;

			private global::System.Collections.Generic.IReadOnlyList<string> path;

			public global::System.Collections.Generic.IReadOnlyList<string> <>3__path;

			private global::System.Collections.Generic.IReadOnlyList<string> groupingKeys;

			public global::System.Collections.Generic.IReadOnlyList<string> <>3__groupingKeys;

			private string[] <groupingKeysArray>5__2;

			private TaskAwaiter <>u__1;

			DataFeedItem global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <CustomDateFeedEnumerate>d__13(int <>1__state)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				<>t__builder = AsyncIteratorMethodBuilder.Create();
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			private void MoveNext()
			{
				//IL_008f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0094: Unknown result type (might be due to invalid IL or missing references)
				//IL_009c: Unknown result type (might be due to invalid IL or missing references)
				//IL_02c7: Unknown result type (might be due to invalid IL or missing references)
				//IL_0245: Unknown result type (might be due to invalid IL or missing references)
				//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
				//IL_0147: 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_005b: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b8: Expected O, but got Unknown
				//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
				//IL_0070: Unknown result type (might be due to invalid IL or missing references)
				//IL_0072: Unknown result type (might be due to invalid IL or missing references)
				int num = <>1__state;
				try
				{
					TaskAwaiter awaiter;
					DataFeedGroup val2;
					switch (num)
					{
					default:
						if (<>w__disposeMode)
						{
							break;
						}
						num = (<>1__state = -1);
						<>2__current = null;
						awaiter = global::System.Threading.Tasks.Task.CompletedTask.GetAwaiter();
						if (!((TaskAwaiter)(ref awaiter)).IsCompleted)
						{
							num = (<>1__state = 0);
							<>u__1 = awaiter;
							<CustomDateFeedEnumerate>d__13 <CustomDateFeedEnumerate>d__ = this;
							((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<TaskAwaiter, <CustomDateFeedEnumerate>d__13>(ref awaiter, ref <CustomDateFeedEnumerate>d__);
							return;
						}
						goto IL_00ab;
					case 0:
						awaiter = <>u__1;
						<>u__1 = default(TaskAwaiter);
						num = (<>1__state = -1);
						goto IL_00ab;
					case -4:
					{
						num = (<>1__state = -1);
						if (<>w__disposeMode)
						{
							break;
						}
						<groupingKeysArray>5__2 = Enumerable.ToArray<string>(Enumerable.Concat<string>((global::System.Collections.Generic.IEnumerable<string>)groupingKeys, (global::System.Collections.Generic.IEnumerable<string>)new <>z__ReadOnlySingleElementList<string>("Test")));
						DataFeedIndicator<string> val5 = new DataFeedIndicator<string>();
						((DataFeedItem)val5).InitBase("Test1", path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupingKeysArray>5__2, LocaleString.op_Implicit("Test1"), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
						val5.InitSetupValue((Action<IField<string>>)delegate(IField<string> field)
						{
							((IValue<string>)(object)field).Value = "Test1";
						}, (string)null);
						<>2__current = (DataFeedItem)(object)val5;
						num = (<>1__state = -5);
						goto IL_0383;
					}
					case -5:
					{
						num = (<>1__state = -1);
						if (<>w__disposeMode)
						{
							break;
						}
						DataFeedIndicator<string> val3 = new DataFeedIndicator<string>();
						((DataFeedItem)val3).InitBase("Test2", path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupingKeysArray>5__2, LocaleString.op_Implicit("Test2"), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
						val3.InitSetupValue((Action<IField<string>>)delegate(IField<string> field)
						{
							((IValue<string>)(object)field).Value = "Test2";
						}, (string)null);
						<>2__current = (DataFeedItem)(object)val3;
						num = (<>1__state = -6);
						goto IL_0383;
					}
					case -6:
					{
						num = (<>1__state = -1);
						if (<>w__disposeMode)
						{
							break;
						}
						DataFeedIndicator<string> val4 = new DataFeedIndicator<string>();
						((DataFeedItem)val4).InitBase("Test3", path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupingKeysArray>5__2, LocaleString.op_Implicit("Test3"), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
						val4.InitSetupValue((Action<IField<string>>)delegate(IField<string> field)
						{
							((IValue<string>)(object)field).Value = "Test3";
						}, (string)null);
						<>2__current = (DataFeedItem)(object)val4;
						num = (<>1__state = -7);
						goto IL_0383;
					}
					case -7:
					{
						num = (<>1__state = -1);
						if (<>w__disposeMode)
						{
							break;
						}
						DataFeedIndicator<string> val = new DataFeedIndicator<string>();
						((DataFeedItem)val).InitBase("Test4", path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupingKeysArray>5__2, LocaleString.op_Implicit("Test4"), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
						val.InitSetupValue((Action<IField<string>>)delegate(IField<string> field)
						{
							((IValue<string>)(object)field).Value = "Test4";
						}, (string)null);
						<>2__current = (DataFeedItem)(object)val;
						num = (<>1__state = -8);
						goto IL_0383;
					}
					case -8:
						{
							num = (<>1__state = -1);
							_ = <>w__disposeMode;
							break;
						}
						IL_00ab:
						((TaskAwaiter)(ref awaiter)).GetResult();
						val2 = new DataFeedGroup();
						((DataFeedItem)val2).InitBase("Test", path, groupingKeys, LocaleString.op_Implicit("Test"), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
						<>2__current = (DataFeedItem)(object)val2;
						num = (<>1__state = -4);
						goto IL_0383;
					}
				}
				catch (global::System.Exception exception)
				{
					<>1__state = -2;
					<groupingKeysArray>5__2 = null;
					<>2__current = null;
					((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete();
					<>v__promiseOfValueOrEnd.SetException(exception);
					return;
				}
				<>1__state = -2;
				<groupingKeysArray>5__2 = null;
				<>2__current = null;
				((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete();
				<>v__promiseOfValueOrEnd.SetResult(false);
				return;
				IL_0383:
				<>v__promiseOfValueOrEnd.SetResult(true);
			}

			[DebuggerHidden]
			private void SetStateMachine(IAsyncStateMachine stateMachine)
			{
			}

			[DebuggerHidden]
			global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem> global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>.GetAsyncEnumerator(CancellationToken cancellationToken = default(CancellationToken))
			{
				//IL_0020: Unknown result type (might be due to invalid IL or missing references)
				//IL_0025: Unknown result type (might be due to invalid IL or missing references)
				<CustomDateFeedEnumerate>d__13 <CustomDateFeedEnumerate>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = -3;
					<>t__builder = AsyncIteratorMethodBuilder.Create();
					<>w__disposeMode = false;
					<CustomDateFeedEnumerate>d__ = this;
				}
				else
				{
					<CustomDateFeedEnumerate>d__ = new <CustomDateFeedEnumerate>d__13(-3);
				}
				<CustomDateFeedEnumerate>d__.path = <>3__path;
				<CustomDateFeedEnumerate>d__.groupingKeys = <>3__groupingKeys;
				return <CustomDateFeedEnumerate>d__;
			}

			[DebuggerHidden]
			global::System.Threading.Tasks.ValueTask<bool> global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.MoveNextAsync()
			{
				//IL_0041: Unknown result type (might be due to invalid IL or missing references)
				//IL_0047: Invalid comparison between Unknown and I4
				if (<>1__state == -2)
				{
					return default(global::System.Threading.Tasks.ValueTask<bool>);
				}
				<>v__promiseOfValueOrEnd.Reset();
				<CustomDateFeedEnumerate>d__13 <CustomDateFeedEnumerate>d__ = this;
				((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<CustomDateFeedEnumerate>d__13>(ref <CustomDateFeedEnumerate>d__);
				short version = <>v__promiseOfValueOrEnd.Version;
				if ((int)<>v__promiseOfValueOrEnd.GetStatus(version) == 1)
				{
					return new global::System.Threading.Tasks.ValueTask<bool>(<>v__promiseOfValueOrEnd.GetResult(version));
				}
				return new global::System.Threading.Tasks.ValueTask<bool>((IValueTaskSource<bool>)this, version);
			}

			[DebuggerHidden]
			bool IValueTaskSource<bool>.GetResult(short token)
			{
				return <>v__promiseOfValueOrEnd.GetResult(token);
			}

			[DebuggerHidden]
			ValueTaskSourceStatus IValueTaskSource<bool>.GetStatus(short token)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				return <>v__promiseOfValueOrEnd.GetStatus(token);
			}

			[DebuggerHidden]
			void IValueTaskSource<bool>.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags)
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				<>v__promiseOfValueOrEnd.OnCompleted(continuation, state, token, flags);
			}

			[DebuggerHidden]
			void IValueTaskSource.GetResult(short token)
			{
				<>v__promiseOfValueOrEnd.GetResult(token);
			}

			[DebuggerHidden]
			ValueTaskSourceStatus IValueTaskSource.GetStatus(short token)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				return <>v__promiseOfValueOrEnd.GetStatus(token);
			}

			[DebuggerHidden]
			void IValueTaskSource.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags)
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				<>v__promiseOfValueOrEnd.OnCompleted(continuation, state, token, flags);
			}

			[DebuggerHidden]
			global::System.Threading.Tasks.ValueTask global::System.IAsyncDisposable.DisposeAsync()
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				if (<>1__state >= -1)
				{
					throw new NotSupportedException();
				}
				if (<>1__state == -2)
				{
					return default(global::System.Threading.Tasks.ValueTask);
				}
				<>w__disposeMode = true;
				<>v__promiseOfValueOrEnd.Reset();
				<CustomDateFeedEnumerate>d__13 <CustomDateFeedEnumerate>d__ = this;
				((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<CustomDateFeedEnumerate>d__13>(ref <CustomDateFeedEnumerate>d__);
				return new global::System.Threading.Tasks.ValueTask((IValueTaskSource)(object)this, <>v__promiseOfValueOrEnd.Version);
			}
		}

		internal static ManualLogSource Log;

		public static ConfigEntry<bool> ShowHidden;

		public static ConfigEntry<bool> ShowProtected;

		public static ConfigEntry<bool> ShowEmptyPages;

		public static ConfigEntry<bool> SortEmptyPages;

		internal static ConfigEntry<dummy> TestAction;

		internal static ConfigEntry<string> TestProtected;

		internal static ConfigEntry<string> TestHidden;

		internal static ConfigEntry<dummy> TestCustomDataFeed;

		internal static ConfigEntry<dummy> OpenSettingsInspector;

		public override void Load()
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Expected O, but got Unknown
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Expected O, but got Unknown
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Expected O, but got Unknown
			//IL_016a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Expected O, but got Unknown
			//IL_018b: 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_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Expected O, but got Unknown
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Expected O, but got Unknown
			//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0224: Unknown result type (might be due to invalid IL or missing references)
			//IL_022e: Expected O, but got Unknown
			//IL_026c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0272: Expected O, but got Unknown
			//IL_0252: Unknown result type (might be due to invalid IL or missing references)
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_025d: Expected O, but got Unknown
			Log = ((BasePlugin)this).Log;
			ShowHidden = ((BasePlugin)this).Config.Bind<bool>("General", "ShowHidden", false, new ConfigDescription("Whether to show hidden Configs", (AcceptableValueBase)null, new object[1] { (object)new ConfigLocale("Settings.ResoniteModding.BepisModSettings.Configs.ShowHidden", "Settings.ResoniteModding.BepisModSettings.Configs.ShowHidden.Description") }));
			ShowProtected = ((BasePlugin)this).Config.Bind<bool>("General", "ShowProtected", false, "Whether to show protected Configs");
			ShowEmptyPages = ((BasePlugin)this).Config.Bind<bool>("General", "ShowEmptyPages", true, "Whether to show category buttons for pages which would have no content");
			SortEmptyPages = ((BasePlugin)this).Config.Bind<bool>("General", "SortEmptyPages", true, "Whether to sort empty pages to the bottom of the list");
			ConfigFile config = ((BasePlugin)this).Config;
			object[] array = new object[1];
			object obj = <>c.<>9__10_0;
			if (obj == null)
			{
				Action val = delegate
				{
					Log.LogError((object)"OneOfThem");
				};
				<>c.<>9__10_0 = val;
				obj = (object)val;
			}
			array[0] = new ActionConfig((global::System.Delegate)obj);
			TestAction = config.Bind<dummy>("Tests", "TestAction", default(dummy), new ConfigDescription("TestAction", (AcceptableValueBase)null, array));
			TestProtected = ((BasePlugin)this).Config.Bind<string>("Tests", "TestProtected", "AWAWAWAWA THIS IS A TEST MESSAGE", new ConfigDescription("TestProtected", (AcceptableValueBase)null, new object[1]
			{
				new ProtectedConfig()
			}));
			TestHidden = ((BasePlugin)this).Config.Bind<string>("Tests", "TestHidden", "AWAWAWAWA THIS IS A TEST MESSAGE", new ConfigDescription("TestHidden", (AcceptableValueBase)null, new object[1]
			{
				new HiddenConfig()
			}));
			TestCustomDataFeed = ((BasePlugin)this).Config.Bind<dummy>("Tests", "TestCustomDataFeed", default(dummy), new ConfigDescription("TestCustomDataFeed", (AcceptableValueBase)null, new object[1]
			{
				new CustomDataFeed(CustomDateFeedEnumerate)
			}));
			OpenSettingsInspector = ((BasePlugin)this).Config.Bind<dummy>("Debug", "OpenSettingsInspector", default(dummy), new ConfigDescription("OpenSettingsInspector", (AcceptableValueBase)null, new object[2]
			{
				new HiddenConfig(),
				new ActionConfig((global::System.Delegate)(object)(Func<Slot>)delegate
				{
					SettingsDataFeed settingsDataFeed = DataFeedHelpers.SettingsDataFeed;
					if (settingsDataFeed == null)
					{
						return null;
					}
					Slot slot = ((Component)settingsDataFeed).Slot;
					return (slot == null) ? null : InspectorHelper.OpenInspectorForTarget((IWorldElement)(object)slot, (Slot)null, false);
				})
			}));
			((BasePlugin)this).HarmonyInstance.PatchAll();
			object obj2 = <>c.<>9__10_2;
			if (obj2 == null)
			{
				Action val2 = delegate
				{
					//IL_002f: Unknown result type (might be due to invalid IL or missing references)
					//IL_003c: Expected O, but got Unknown
					//IL_0037: Unknown result type (might be due to invalid IL or missing references)
					//IL_003d: Expected O, but got Unknown
					//IL_007f: Unknown result type (might be due to invalid IL or missing references)
					//IL_0084: Unknown result type (might be due to invalid IL or missing references)
					//IL_008a: Expected O, but got Unknown
					FieldInfo obj3 = AccessTools.Field(typeof(Settings), "_categoryInfos");
					if (((obj3 != null) ? obj3.GetValue((object)null) : null) is Dictionary<string, SettingCategoryInfo> val4)
					{
						SettingCategoryInfo val5 = new SettingCategoryInfo(new Uri("https://avatars.githubusercontent.com/u/39589027?s=200&v=4.png"), 99L);
						val5.InitKey("BepInEx");
						val4.Add(val5.Key, val5);
					}
					else
					{
						Log.LogError((object)"Failed to find _categoryInfos field in Settings.");
					}
					Engine current = Engine.Current;
					object obj4 = <>c.<>9__10_3;
					if (obj4 == null)
					{
						Action val6 = delegate
						{
							Log.LogInfo((object)"Running shutdown, saving configs...");
							Log.LogDebug((object)"Saving Config for BepInEx.Core");
							ConfigFile coreConfig = ConfigFile.CoreConfig;
							if (coreConfig != null)
							{
								coreConfig.Save();
							}
							if (((BaseChainloader<BasePlugin>)(object)NetChainloader.Instance).Plugins.Count > 0)
							{
								CollectionExtensions.Do<PluginInfo>((global::System.Collections.Generic.IEnumerable<PluginInfo>)((BaseChainloader<BasePlugin>)(object)NetChainloader.Instance).Plugins.Values, (Action<PluginInfo>)delegate(PluginInfo x)
								{
									//IL_001a: Unknown result type (might be due to invalid IL or missing references)
									//IL_0020: Expected O, but got Unknown
									object instance = x.Instance;
									BasePlugin val7 = (BasePlugin)((instance is BasePlugin) ? instance : null);
									if (val7 != null)
									{
										ManualLogSource log2 = Log;
										bool flag2 = default(bool);
										BepInExDebugLogInterpolatedStringHandler val8 = new BepInExDebugLogInterpolatedStringHandler(18, 1, ref flag2);
										if (flag2)
										{
											((BepInExLogInterpolatedStringHandler)val8).AppendLiteral("Saving Config for ");
											((BepInExLogInterpolatedStringHandler)val8).AppendFormatted<string>(x.Metadata.GUID);
										}
										log2.LogDebug(val8);
										ConfigFile config2 = val7.Config;
										if (config2 != null)
										{
											config2.Save();
										}
									}
								});
							}
						};
						<>c.<>9__10_3 = val6;
						obj4 = (object)val6;
					}
					current.OnShutdown += (Action)obj4;
				};
				<>c.<>9__10_2 = val2;
				obj2 = (object)val2;
			}
			ResoniteHooks.OnEngineReady += (Action)obj2;
			ManualLogSource log = Log;
			bool flag = default(bool);
			BepInExInfoLogInterpolatedStringHandler val3 = new BepInExInfoLogInterpolatedStringHandler(18, 1, ref flag);
			if (flag)
			{
				((BepInExLogInterpolatedStringHandler)val3).AppendLiteral("Plugin ");
				((BepInExLogInterpolatedStringHandler)val3).AppendFormatted<string>("ResoniteModding.BepisModSettings");
				((BepInExLogInterpolatedStringHandler)val3).AppendLiteral(" is loaded!");
			}
			log.LogInfo(val3);
		}

		[AsyncIteratorStateMachine(typeof(<CustomDateFeedEnumerate>d__13))]
		private static global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> CustomDateFeedEnumerate(global::System.Collections.Generic.IReadOnlyList<string> path, global::System.Collections.Generic.IReadOnlyList<string> groupingKeys)
		{
			return new <CustomDateFeedEnumerate>d__13(-2)
			{
				<>3__path = path,
				<>3__groupingKeys = groupingKeys
			};
		}
	}
	public static class PluginMetadata
	{
		public const string GUID = "ResoniteModding.BepisModSettings";

		public const string NAME = "Bepis Mod Settings";

		public const string VERSION = "1.3.0";

		public const string AUTHORS = "ResoniteModding";

		public const string REPOSITORY_URL = "https://github.com/ResoniteModding/BepisModSettings";
	}
}
namespace BepisModSettings.DataFeeds
{
	public static class BepisConfigsPage
	{
		[CompilerGenerated]
		private sealed class <>c__DisplayClass10_0
		{
			public IButton btn;

			public ValueMultiDriver<bool> vmd;

			public Action <>9__1;

			internal void <ResetConfigs>b__1()
			{
				LocaleHelper.SetLocalized(btn.LabelTextField, "Settings.BepInEx.Plugins.ResetConfig", (string)null, (Dictionary<string, object>)null);
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass10_1
		{
			[StructLayout(3)]
			private struct <<ResetConfigs>b__0>d : IAsyncStateMachine
			{
				public int <>1__state;

				public AsyncTaskMethodBuilder <>t__builder;

				public <>c__DisplayClass10_1 <>4__this;

				private TaskAwaiter <>u__1;

				private void MoveNext()
				{
					//IL_0054: Unknown result type (might be due to invalid IL or missing references)
					//IL_0059: Unknown result type (might be due to invalid IL or missing references)
					//IL_0060: Unknown result type (might be due to invalid IL or missing references)
					//IL_0017: Unknown result type (might be due to invalid IL or missing references)
					//IL_0021: Unknown result type (might be due to invalid IL or missing references)
					//IL_0026: Unknown result type (might be due to invalid IL or missing references)
					//IL_003a: Unknown result type (might be due to invalid IL or missing references)
					//IL_003b: Unknown result type (might be due to invalid IL or missing references)
					//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b5: Expected O, but got Unknown
					//IL_00ba: Expected O, but got Unknown
					int num = <>1__state;
					<>c__DisplayClass10_1 <>c__DisplayClass10_ = <>4__this;
					try
					{
						TaskAwaiter awaiter;
						if (num != 0)
						{
							awaiter = global::System.Threading.Tasks.Task.Delay(2000, <>c__DisplayClass10_.token).GetAwaiter();
							if (!((TaskAwaiter)(ref awaiter)).IsCompleted)
							{
								num = (<>1__state = 0);
								<>u__1 = awaiter;
								((AsyncTaskMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<TaskAwaiter, <<ResetConfigs>b__0>d>(ref awaiter, ref this);
								return;
							}
						}
						else
						{
							awaiter = <>u__1;
							<>u__1 = default(TaskAwaiter);
							num = (<>1__state = -1);
						}
						((TaskAwaiter)(ref awaiter)).GetResult();
						if (_resetPressed)
						{
							IButton btn = <>c__DisplayClass10_.CS$<>8__locals1.btn;
							Action obj = <>c__DisplayClass10_.CS$<>8__locals1.<>9__1;
							if (obj == null)
							{
								<>c__DisplayClass10_0 cS$<>8__locals = <>c__DisplayClass10_.CS$<>8__locals1;
								Action val = delegate
								{
									LocaleHelper.SetLocalized(<>c__DisplayClass10_.CS$<>8__locals1.btn.LabelTextField, "Settings.BepInEx.Plugins.ResetConfig", (string)null, (Dictionary<string, object>)null);
								};
								Action val2 = val;
								cS$<>8__locals.<>9__1 = val;
								obj = val2;
							}
							((IComponentBase)btn).RunSynchronously(obj, false);
							_resetPressed = false;
							if (<>c__DisplayClass10_.CS$<>8__locals1.vmd != null)
							{
								((SyncField<bool>)(object)<>c__DisplayClass10_.CS$<>8__locals1.vmd.Value).Value = _resetPressed;
							}
						}
					}
					catch (global::System.Exception exception)
					{
						<>1__state = -2;
						((AsyncTaskMethodBuilder)(ref <>t__builder)).SetException(exception);
						return;
					}
					<>1__state = -2;
					((AsyncTaskMethodBuilder)(ref <>t__builder)).SetResult();
				}

				[DebuggerHidden]
				private void SetStateMachine(IAsyncStateMachine stateMachine)
				{
					((AsyncTaskMethodBuilder)(ref <>t__builder)).SetStateMachine(stateMachine);
				}
			}

			public CancellationToken token;

			public <>c__DisplayClass10_0 CS$<>8__locals1;

			[AsyncStateMachine(typeof(<<ResetConfigs>b__0>d))]
			internal global::System.Threading.Tasks.Task? <ResetConfigs>b__0()
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				<<ResetConfigs>b__0>d <<ResetConfigs>b__0>d = default(<<ResetConfigs>b__0>d);
				<<ResetConfigs>b__0>d.<>t__builder = AsyncTaskMethodBuilder.Create();
				<<ResetConfigs>b__0>d.<>4__this = this;
				<<ResetConfigs>b__0>d.<>1__state = -1;
				((AsyncTaskMethodBuilder)(ref <<ResetConfigs>b__0>d.<>t__builder)).Start<<<ResetConfigs>b__0>d>(ref <<ResetConfigs>b__0>d);
				return ((AsyncTaskMethodBuilder)(ref <<ResetConfigs>b__0>d.<>t__builder)).Task;
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass4_0
		{
			public ModMeta metadata;

			public Uri uri;

			internal void <Enumerate>b__0(IField<string> field)
			{
				((IValue<string>)(object)field).Value = metadata.ID;
			}

			internal void <Enumerate>b__2(IField<string> field)
			{
				((IValue<string>)(object)field).Value = metadata.Author;
			}

			internal void <Enumerate>b__1(IField<string> field)
			{
				((IValue<string>)(object)field).Value = metadata.Version;
			}

			internal void <Enumerate>b__3(SyncDelegate<Action> syncDelegate)
			{
				Slot val = ((syncDelegate != null) ? ((SyncElement)syncDelegate).Slot : null);
				if (val != null)
				{
					((SyncField<Uri>)(object)((ContainerWorker<Component>)(object)val).AttachComponent<Hyperlink>(true, (Action<Hyperlink>)null).URL).Value = uri;
				}
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass5_0
		{
			public ModMeta metaData;

			public Func<PluginInfo, bool> <>9__8;

			public ButtonEventHandler <>9__15;

			public ButtonEventHandler <>9__16;

			internal bool <EnumerateConfigs>b__8(PluginInfo x)
			{
				return x.Metadata.GUID == metaData.ID;
			}

			internal void <EnumerateConfigs>b__2(SyncDelegate<Action> syncDelegate)
			{
				//IL_0025: Unknown result type (might be due to invalid IL or missing references)
				//IL_002a: Unknown result type (might be due to invalid IL or missing references)
				//IL_002c: Expected O, but got Unknown
				//IL_0031: Expected O, but got Unknown
				Button component = ((ContainerWorker<Component>)(object)((SyncElement)syncDelegate).Slot).GetComponent<Button>((Predicate<Button>)null, false);
				if (component == null)
				{
					return;
				}
				ButtonEventHandler obj = <>9__15;
				if (obj == null)
				{
					ButtonEventHandler val = delegate
					{
						LoadConfigs(metaData.ID);
					};
					ButtonEventHandler val2 = val;
					<>9__15 = val;
					obj = val2;
				}
				component.LocalPressed += obj;
			}

			internal void <EnumerateConfigs>b__15(IButton _, ButtonEventData _)
			{
				LoadConfigs(metaData.ID);
			}

			internal void <EnumerateConfigs>b__3(SyncDelegate<Action> syncDelegate)
			{
				//IL_0025: Unknown result type (might be due to invalid IL or missing references)
				//IL_002a: Unknown result type (might be due to invalid IL or missing references)
				//IL_002c: Expected O, but got Unknown
				//IL_0031: Expected O, but got Unknown
				Button component = ((ContainerWorker<Component>)(object)((SyncElement)syncDelegate).Slot).GetComponent<Button>((Predicate<Button>)null, false);
				if (component == null)
				{
					return;
				}
				ButtonEventHandler obj = <>9__16;
				if (obj == null)
				{
					ButtonEventHandler val = delegate
					{
						SaveConfigs(metaData.ID);
					};
					ButtonEventHandler val2 = val;
					<>9__16 = val;
					obj = val2;
				}
				component.LocalPressed += obj;
			}

			internal void <EnumerateConfigs>b__16(IButton _, ButtonEventData _)
			{
				SaveConfigs(metaData.ID);
			}

			internal void <EnumerateConfigs>b__4(SyncDelegate<Action> syncDelegate)
			{
				//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
				//IL_00dd: Expected O, but got Unknown
				//IL_007a: Unknown result type (might be due to invalid IL or missing references)
				//IL_009b: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
				<>c__DisplayClass5_6 CS$<>8__locals0 = new <>c__DisplayClass5_6
				{
					CS$<>8__locals2 = this,
					btn = ((ContainerWorker<Component>)(object)((SyncElement)syncDelegate).Slot)?.GetComponent<Button>((Predicate<Button>)null, false)
				};
				if (CS$<>8__locals0.btn != null)
				{
					CS$<>8__locals0.valueDriver = ((ContainerWorker<Component>)(object)((Component)CS$<>8__locals0.btn).Slot).GetComponent<ValueMultiDriver<bool>>((Predicate<ValueMultiDriver<bool>>)null, false);
					if (CS$<>8__locals0.valueDriver != null && ((SyncElementList<FieldDrive<bool>>)(object)CS$<>8__locals0.valueDriver.Drives).Count > 0)
					{
						SetColor(0, new colorX(0.36f, 0.2f, 0.23f, 1f, (ColorProfile)1));
						SetColor(1, new colorX(1f, 0.46f, 0.46f, 1f, (ColorProfile)1));
						SetColor(3, new colorX(0.88f, 0.88f, 0.88f, 1f, (ColorProfile)1));
					}
					CS$<>8__locals0.btn.LocalPressed += (ButtonEventHandler)delegate(IButton b, ButtonEventData _)
					{
						ResetConfigs(b, CS$<>8__locals0.CS$<>8__locals2.metaData.ID, CS$<>8__locals0.valueDriver);
					};
				}
				void SetColor(int index, colorX color)
				{
					//IL_0058: Unknown result type (might be due to invalid IL or missing references)
					<>c__DisplayClass5_7 CS$<>8__locals1 = new <>c__DisplayClass5_7();
					if (index < ((SyncElementList<FieldDrive<bool>>)(object)CS$<>8__locals0.valueDriver.Drives).Count)
					{
						CS$<>8__locals1.drive = ((SyncElementList<FieldDrive<bool>>)(object)CS$<>8__locals0.valueDriver.Drives)[index];
						BooleanValueDriver<colorX> component = ((ContainerWorker<Component>)(object)((Component)CS$<>8__locals0.btn).Slot).GetComponent<BooleanValueDriver<colorX>>((Predicate<BooleanValueDriver<colorX>>)((BooleanValueDriver<colorX> x) => x.State == ((SyncRef<IField<bool>>)(object)CS$<>8__locals1.drive).Target), false);
						if (component != null)
						{
							((SyncField<colorX>)(object)component.TrueValue).Value = color;
						}
					}
				}
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass5_1
		{
			public string section;

			public <>c__DisplayClass5_0 CS$<>8__locals1;

			public ButtonEventHandler <>9__6;

			internal void <EnumerateConfigs>b__5(SyncDelegate<Action> a)
			{
				//IL_0026: Unknown result type (might be due to invalid IL or missing references)
				//IL_002b: Unknown result type (might be due to invalid IL or missing references)
				//IL_002d: Expected O, but got Unknown
				//IL_0032: Expected O, but got Unknown
				Button componentInChildren = ((SyncElement)a).Slot.GetComponentInChildren<Button>((Predicate<Button>)null, false, false);
				if (componentInChildren == null)
				{
					return;
				}
				ButtonEventHandler obj = <>9__6;
				if (obj == null)
				{
					ButtonEventHandler val = delegate(IButton b, ButtonEventData _)
					{
						Slot obj2 = ((IComponent)b).Slot.FindParent((Predicate<Slot>)((Slot x) => x.Name == "Reset Button"), -1);
						Store<bool> val3 = ((obj2 != null) ? obj2.GetComponentInChildren<Store<bool>>((Predicate<Store<bool>>)null, false, false) : null);
						if (val3 != null && ((SyncField<bool>)(object)val3.Value).Value)
						{
							ResetConfigSection(CS$<>8__locals1.metaData.ID, section);
						}
					};
					ButtonEventHandler val2 = val;
					<>9__6 = val;
					obj = val2;
				}
				componentInChildren.LocalPressed += obj;
			}

			internal void <EnumerateConfigs>b__6(IButton b, ButtonEventData _)
			{
				Slot obj = ((IComponent)b).Slot.FindParent((Predicate<Slot>)((Slot x) => x.Name == "Reset Button"), -1);
				Store<bool> val = ((obj != null) ? obj.GetComponentInChildren<Store<bool>>((Predicate<Store<bool>>)null, false, false) : null);
				if (val != null && ((SyncField<bool>)(object)val.Value).Value)
				{
					ResetConfigSection(CS$<>8__locals1.metaData.ID, section);
				}
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass5_2
		{
			public ConfigEntryBase config;

			public global::System.Type valueType;

			internal global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> <EnumerateConfigs>b__14(global::System.Collections.Generic.IReadOnlyList<string> path2)
			{
				return (global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>)((MethodBase)DataFeedHelpers.HandleFlagsEnumCategory.MakeGenericMethod(new global::System.Type[1] { valueType })).Invoke((object)null, new object[2] { path2, config });
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass5_3
		{
			public object firstAction;

			internal void <EnumerateConfigs>b__11(SyncDelegate<Action> syncDelegate)
			{
				//IL_0039: Unknown result type (might be due to invalid IL or missing references)
				//IL_0043: Expected O, but got Unknown
				//IL_006b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0075: Expected O, but got Unknown
				<>c__DisplayClass5_4 CS$<>8__locals0 = new <>c__DisplayClass5_4();
				Button component = ((ContainerWorker<Component>)(object)((SyncElement)syncDelegate).Slot).GetComponent<Button>((Predicate<Button>)null, false);
				if (component == null)
				{
					return;
				}
				CS$<>8__locals0.actionConfig = firstAction as ActionConfig;
				if (CS$<>8__locals0.actionConfig != null)
				{
					component.LocalPressed += (ButtonEventHandler)delegate
					{
						CS$<>8__locals0.actionConfig.Invoke();
					};
					return;
				}
				<>c__DisplayClass5_5 CS$<>8__locals1 = new <>c__DisplayClass5_5
				{
					action = (Action)/*isinst with value type is only supported in some contexts*/
				};
				if (CS$<>8__locals1.action != null)
				{
					component.LocalPressed += (ButtonEventHandler)delegate
					{
						CS$<>8__locals1.action.Invoke();
					};
				}
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass5_4
		{
			public ActionConfig actionConfig;

			internal void <EnumerateConfigs>b__12(IButton _, ButtonEventData _)
			{
				actionConfig.Invoke();
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass5_5
		{
			public Action action;

			internal void <EnumerateConfigs>b__13(IButton _, ButtonEventData _)
			{
				action.Invoke();
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass5_6
		{
			public ValueMultiDriver<bool> valueDriver;

			public Button btn;

			public <>c__DisplayClass5_0 CS$<>8__locals2;

			internal void <EnumerateConfigs>b__17(IButton b, ButtonEventData _)
			{
				ResetConfigs(b, CS$<>8__locals2.metaData.ID, valueDriver);
			}
		}

		[CompilerGenerated]
		private sealed class <>c__DisplayClass5_7
		{
			public FieldDrive<bool> drive;

			internal bool <EnumerateConfigs>b__19(BooleanValueDriver<colorX> x)
			{
				return x.State == ((SyncRef<IField<bool>>)(object)drive).Target;
			}
		}

		[CompilerGenerated]
		private sealed class <Enumerate>d__4 : global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>, global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>, global::System.IAsyncDisposable, IValueTaskSource<bool>, IValueTaskSource, IAsyncStateMachine
		{
			public int <>1__state;

			public AsyncIteratorMethodBuilder <>t__builder;

			public ManualResetValueTaskSourceCore<bool> <>v__promiseOfValueOrEnd;

			private DataFeedItem <>2__current;

			private bool <>w__disposeMode;

			private int <>l__initialThreadId;

			private global::System.Collections.Generic.IReadOnlyList<string> path;

			public global::System.Collections.Generic.IReadOnlyList<string> <>3__path;

			private <>c__DisplayClass4_0 <>8__1;

			private string[] <metadataGroup>5__2;

			private TaskAwaiter <>u__1;

			private global::System.Delegate[] <>7__wrap2;

			private int <>7__wrap3;

			private global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem> <>7__wrap4;

			private object <>7__wrap5;

			private int <>7__wrap6;

			private ValueTaskAwaiter<bool> <>u__2;

			private ValueTaskAwaiter <>u__3;

			DataFeedItem global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <Enumerate>d__4(int <>1__state)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				<>t__builder = AsyncIteratorMethodBuilder.Create();
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			private void MoveNext()
			{
				//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
				//IL_0287: Unknown result type (might be due to invalid IL or missing references)
				//IL_028c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0294: Unknown result type (might be due to invalid IL or missing references)
				//IL_058f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0594: Unknown result type (might be due to invalid IL or missing references)
				//IL_059c: Unknown result type (might be due to invalid IL or missing references)
				//IL_024e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0253: Unknown result type (might be due to invalid IL or missing references)
				//IL_0556: Unknown result type (might be due to invalid IL or missing references)
				//IL_055b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0788: Unknown result type (might be due to invalid IL or missing references)
				//IL_0683: Unknown result type (might be due to invalid IL or missing references)
				//IL_05f7: Unknown result type (might be due to invalid IL or missing references)
				//IL_05fd: Expected O, but got Unknown
				//IL_0612: Unknown result type (might be due to invalid IL or missing references)
				//IL_007d: 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_0268: Unknown result type (might be due to invalid IL or missing references)
				//IL_026a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0570: Unknown result type (might be due to invalid IL or missing references)
				//IL_0572: Unknown result type (might be due to invalid IL or missing references)
				//IL_0711: Unknown result type (might be due to invalid IL or missing references)
				//IL_0097: Unknown result type (might be due to invalid IL or missing references)
				//IL_0099: Unknown result type (might be due to invalid IL or missing references)
				//IL_081d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0824: Expected O, but got Unknown
				//IL_083f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0854: Unknown result type (might be due to invalid IL or missing references)
				//IL_04c9: Unknown result type (might be due to invalid IL or missing references)
				//IL_04ce: Unknown result type (might be due to invalid IL or missing references)
				//IL_0502: Unknown result type (might be due to invalid IL or missing references)
				//IL_0507: Unknown result type (might be due to invalid IL or missing references)
				//IL_050f: Unknown result type (might be due to invalid IL or missing references)
				//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
				//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
				//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
				//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
				//IL_0207: Unknown result type (might be due to invalid IL or missing references)
				//IL_04e3: Unknown result type (might be due to invalid IL or missing references)
				//IL_04e5: Unknown result type (might be due to invalid IL or missing references)
				//IL_01db: Unknown result type (might be due to invalid IL or missing references)
				//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
				//IL_0142: 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_044a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0450: Unknown result type (might be due to invalid IL or missing references)
				//IL_03d0: Unknown result type (might be due to invalid IL or missing references)
				//IL_03d7: Expected O, but got Unknown
				//IL_03ed: Unknown result type (might be due to invalid IL or missing references)
				int num = <>1__state;
				try
				{
					TaskAwaiter awaiter3;
					ValueTaskAwaiter awaiter2;
					DataFeedGroup val3;
					DataFeedIndicator<string> val5;
					object obj2;
					string pluginId;
					ConfigFile config;
					global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> asyncEnumerable;
					switch (num)
					{
					default:
						if (<>w__disposeMode)
						{
							break;
						}
						num = (<>1__state = -1);
						<>8__1 = new <>c__DisplayClass4_0();
						<>2__current = null;
						awaiter3 = global::System.Threading.Tasks.Task.CompletedTask.GetAwaiter();
						if (!((TaskAwaiter)(ref awaiter3)).IsCompleted)
						{
							num = (<>1__state = 0);
							<>u__1 = awaiter3;
							<Enumerate>d__4 <Enumerate>d__ = this;
							((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<TaskAwaiter, <Enumerate>d__4>(ref awaiter3, ref <Enumerate>d__);
							return;
						}
						goto IL_00d2;
					case 0:
						awaiter3 = <>u__1;
						<>u__1 = default(TaskAwaiter);
						num = (<>1__state = -1);
						goto IL_00d2;
					case -4:
					case 1:
						try
						{
							ValueTaskAwaiter<bool> awaiter;
							if (num != -4)
							{
								if (num != 1)
								{
									goto IL_01ab;
								}
								awaiter = <>u__2;
								<>u__2 = default(ValueTaskAwaiter<bool>);
								num = (<>1__state = -1);
								goto IL_0216;
							}
							num = (<>1__state = -1);
							if (!<>w__disposeMode)
							{
								goto IL_01ab;
							}
							goto end_IL_0163;
							IL_01ab:
							<>2__current = null;
							awaiter = <>7__wrap4.MoveNextAsync().GetAwaiter();
							if (!awaiter.IsCompleted)
							{
								num = (<>1__state = 1);
								<>u__2 = awaiter;
								<Enumerate>d__4 <Enumerate>d__ = this;
								((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter<bool>, <Enumerate>d__4>(ref awaiter, ref <Enumerate>d__);
								return;
							}
							goto IL_0216;
							IL_0216:
							if (awaiter.GetResult())
							{
								DataFeedItem current = <>7__wrap4.Current;
								<>2__current = current;
								num = (<>1__state = -4);
								goto IL_093c;
							}
							end_IL_0163:;
						}
						catch (object obj)
						{
							<>7__wrap5 = obj;
						}
						if (<>7__wrap4 != null)
						{
							<>2__current = null;
							awaiter2 = ((global::System.IAsyncDisposable)<>7__wrap4).DisposeAsync().GetAwaiter();
							if (!((ValueTaskAwaiter)(ref awaiter2)).IsCompleted)
							{
								num = (<>1__state = 2);
								<>u__3 = awaiter2;
								<Enumerate>d__4 <Enumerate>d__ = this;
								((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter, <Enumerate>d__4>(ref awaiter2, ref <Enumerate>d__);
								return;
							}
							goto IL_02a3;
						}
						goto IL_02aa;
					case 2:
						awaiter2 = <>u__3;
						<>u__3 = default(ValueTaskAwaiter);
						num = (<>1__state = -1);
						goto IL_02a3;
					case -5:
						num = (<>1__state = -1);
						if (<>w__disposeMode)
						{
							break;
						}
						goto IL_05f7;
					case -6:
					case 3:
						try
						{
							ValueTaskAwaiter<bool> awaiter;
							if (num != -6)
							{
								if (num != 3)
								{
									goto IL_04b3;
								}
								awaiter = <>u__2;
								<>u__2 = default(ValueTaskAwaiter<bool>);
								num = (<>1__state = -1);
								goto IL_051e;
							}
							num = (<>1__state = -1);
							if (!<>w__disposeMode)
							{
								goto IL_04b3;
							}
							goto end_IL_046b;
							IL_04b3:
							<>2__current = null;
							awaiter = <>7__wrap4.MoveNextAsync().GetAwaiter();
							if (!awaiter.IsCompleted)
							{
								num = (<>1__state = 3);
								<>u__2 = awaiter;
								<Enumerate>d__4 <Enumerate>d__ = this;
								((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter<bool>, <Enumerate>d__4>(ref awaiter, ref <Enumerate>d__);
								return;
							}
							goto IL_051e;
							IL_051e:
							if (awaiter.GetResult())
							{
								DataFeedItem current2 = <>7__wrap4.Current;
								<>2__current = current2;
								num = (<>1__state = -6);
								goto IL_093c;
							}
							end_IL_046b:;
						}
						catch (object obj)
						{
							<>7__wrap5 = obj;
						}
						if (<>7__wrap4 != null)
						{
							<>2__current = null;
							awaiter2 = ((global::System.IAsyncDisposable)<>7__wrap4).DisposeAsync().GetAwaiter();
							if (!((ValueTaskAwaiter)(ref awaiter2)).IsCompleted)
							{
								num = (<>1__state = 4);
								<>u__3 = awaiter2;
								<Enumerate>d__4 <Enumerate>d__ = this;
								((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter, <Enumerate>d__4>(ref awaiter2, ref <Enumerate>d__);
								return;
							}
							goto IL_05ab;
						}
						goto IL_05b2;
					case 4:
						awaiter2 = <>u__3;
						<>u__3 = default(ValueTaskAwaiter);
						num = (<>1__state = -1);
						goto IL_05ab;
					case -7:
					{
						num = (<>1__state = -1);
						if (<>w__disposeMode)
						{
							break;
						}
						<metadataGroup>5__2 = new string[1] { "Metadata" };
						DataFeedIndicator<string> val6 = new DataFeedIndicator<string>();
						((DataFeedItem)val6).InitBase("Id", path, (global::System.Collections.Generic.IReadOnlyList<string>)<metadataGroup>5__2, LocaleHelper.AsLocaleKey("Settings.BepInEx.Plugins.Guid", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
						val6.InitSetupValue((Action<IField<string>>)delegate(IField<string> field)
						{
							((IValue<string>)(object)field).Value = <>8__1.metadata.ID;
						}, (string)null);
						<>2__current = (DataFeedItem)(object)val6;
						num = (<>1__state = -8);
						goto IL_093c;
					}
					case -8:
					{
						num = (<>1__state = -1);
						if (<>w__disposeMode)
						{
							break;
						}
						if (string.IsNullOrWhiteSpace(<>8__1.metadata.Author))
						{
							goto IL_0766;
						}
						DataFeedIndicator<string> val4 = new DataFeedIndicator<string>();
						((DataFeedItem)val4).InitBase("Author", path, (global::System.Collections.Generic.IReadOnlyList<string>)<metadataGroup>5__2, LocaleHelper.AsLocaleKey("Settings.BepInEx.Plugins.Author", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
						val4.InitSetupValue((Action<IField<string>>)delegate(IField<string> field)
						{
							((IValue<string>)(object)field).Value = <>8__1.metadata.Author;
						}, (string)null);
						<>2__current = (DataFeedItem)(object)val4;
						num = (<>1__state = -9);
						goto IL_093c;
					}
					case -9:
						num = (<>1__state = -1);
						if (<>w__disposeMode)
						{
							break;
						}
						goto IL_0766;
					case -10:
					{
						num = (<>1__state = -1);
						if (<>w__disposeMode || string.IsNullOrWhiteSpace(<>8__1.metadata.Link) || !Uri.TryCreate(<>8__1.metadata.Link, (UriKind)1, ref <>8__1.uri))
						{
							break;
						}
						DataFeedAction val = new DataFeedAction();
						((DataFeedItem)val).InitBase("Link", path, (global::System.Collections.Generic.IReadOnlyList<string>)<metadataGroup>5__2, LocaleHelper.AsLocaleKey("Settings.BepInEx.Plugins.ModPage", (string)null, true, (Dictionary<string, object>)null), LocaleString.op_Implicit(<>8__1.metadata.Link), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
						val.InitAction((Action<SyncDelegate<Action>>)delegate(SyncDelegate<Action> syncDelegate)
						{
							Slot val8 = ((syncDelegate != null) ? ((SyncElement)syncDelegate).Slot : null);
							if (val8 != null)
							{
								((SyncField<Uri>)(object)((ContainerWorker<Component>)(object)val8).AttachComponent<Hyperlink>(true, (Action<Hyperlink>)null).URL).Value = <>8__1.uri;
							}
						});
						<>2__current = (DataFeedItem)(object)val;
						num = (<>1__state = -11);
						goto IL_093c;
					}
					case -11:
						{
							num = (<>1__state = -1);
							_ = <>w__disposeMode;
							break;
						}
						IL_02fd:
						if (<>7__wrap3 < <>7__wrap2.Length)
						{
							if (<>7__wrap2[<>7__wrap3] is Func<global::System.Collections.Generic.IReadOnlyList<string>, global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>> val2)
							{
								<>7__wrap4 = val2.Invoke(path).GetAsyncEnumerator(default(CancellationToken));
								<>7__wrap5 = null;
								<>7__wrap6 = 0;
								goto case -4;
							}
							goto IL_02ef;
						}
						<>7__wrap2 = null;
						goto IL_0317;
						IL_05f7:
						val3 = new DataFeedGroup();
						((DataFeedItem)val3).InitBase("Metadata", path, (global::System.Collections.Generic.IReadOnlyList<string>)null, LocaleHelper.AsLocaleKey("Settings.BepInEx.Plugins.Metadata", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
						<>2__current = (DataFeedItem)(object)val3;
						num = (<>1__state = -7);
						goto IL_093c;
						IL_0317:
						<>w__disposeMode = true;
						break;
						IL_02ef:
						<>7__wrap3++;
						goto IL_02fd;
						IL_0766:
						val5 = new DataFeedIndicator<string>();
						((DataFeedItem)val5).InitBase("Version", path, (global::System.Collections.Generic.IReadOnlyList<string>)<metadataGroup>5__2, LocaleHelper.AsLocaleKey("Settings.BepInEx.Plugins.Version", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
						val5.InitSetupValue((Action<IField<string>>)delegate(IField<string> field)
						{
							((IValue<string>)(object)field).Value = <>8__1.metadata.Version;
						}, (string)null);
						<>2__current = (DataFeedItem)(object)val5;
						num = (<>1__state = -10);
						goto IL_093c;
						IL_05ab:
						((ValueTaskAwaiter)(ref awaiter2)).GetResult();
						goto IL_05b2;
						IL_02aa:
						obj2 = <>7__wrap5;
						if (obj2 != null)
						{
							ExceptionDispatchInfo.Capture((obj2 as global::System.Exception) ?? throw obj2).Throw();
						}
						_ = <>7__wrap6;
						if (<>w__disposeMode)
						{
							break;
						}
						<>7__wrap5 = null;
						<>7__wrap4 = null;
						goto IL_02ef;
						IL_05b2:
						obj2 = <>7__wrap5;
						if (obj2 != null)
						{
							ExceptionDispatchInfo.Capture((obj2 as global::System.Exception) ?? throw obj2).Throw();
						}
						_ = <>7__wrap3;
						if (<>w__disposeMode)
						{
							break;
						}
						<>7__wrap5 = null;
						<>7__wrap4 = null;
						goto IL_05f7;
						IL_00d2:
						((TaskAwaiter)(ref awaiter3)).GetResult();
						pluginId = path[1];
						if (!DataFeedHelpers.DoesPluginExist(pluginId))
						{
							if (BepisConfigsPage.CustomPluginConfigsPages != null)
							{
								<>7__wrap2 = ((global::System.Delegate)(object)BepisConfigsPage.CustomPluginConfigsPages).GetInvocationList();
								<>7__wrap3 = 0;
								goto IL_02fd;
							}
							goto IL_0317;
						}
						if (!DataFeedHelpers.TryGetPluginData(pluginId, out config, out <>8__1.metadata))
						{
							<>w__disposeMode = true;
							break;
						}
						if (string.IsNullOrWhiteSpace(<>8__1.metadata.Name))
						{
							<>8__1.metadata.Name = "<i>Unknown</i>";
						}
						if (string.IsNullOrWhiteSpace(<>8__1.metadata.Version))
						{
							<>8__1.metadata.Version = "<i>Unknown</i>";
						}
						if (string.IsNullOrWhiteSpace(<>8__1.metadata.ID))
						{
							<>8__1.metadata.ID = "<i>Unknown</i>";
						}
						if (DataFeedHelpers.IsEmpty(config))
						{
							DataFeedLabel val7 = new DataFeedLabel();
							((DataFeedItem)val7).InitBase("NoConfigs", path, (global::System.Collections.Generic.IReadOnlyList<string>)null, LocaleHelper.AsLocaleKey("Settings.BepInEx.Plugins.NoConfigs", (string)null, true, (Dictionary<string, object>)null), (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
							<>2__current = (DataFeedItem)(object)val7;
							num = (<>1__state = -5);
							goto IL_093c;
						}
						asyncEnumerable = EnumerateConfigs(config, <>8__1.metadata, path);
						<>7__wrap4 = asyncEnumerable.GetAsyncEnumerator(default(CancellationToken));
						<>7__wrap5 = null;
						<>7__wrap3 = 0;
						goto case -6;
						IL_02a3:
						((ValueTaskAwaiter)(ref awaiter2)).GetResult();
						goto IL_02aa;
					}
				}
				catch (global::System.Exception exception)
				{
					<>1__state = -2;
					<>8__1 = null;
					<metadataGroup>5__2 = null;
					<>7__wrap2 = null;
					<>7__wrap4 = null;
					<>7__wrap5 = null;
					<>2__current = null;
					((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete();
					<>v__promiseOfValueOrEnd.SetException(exception);
					return;
				}
				<>1__state = -2;
				<>8__1 = null;
				<metadataGroup>5__2 = null;
				<>7__wrap2 = null;
				<>7__wrap4 = null;
				<>7__wrap5 = null;
				<>2__current = null;
				((AsyncIteratorMethodBuilder)(ref <>t__builder)).Complete();
				<>v__promiseOfValueOrEnd.SetResult(false);
				return;
				IL_093c:
				<>v__promiseOfValueOrEnd.SetResult(true);
			}

			[DebuggerHidden]
			private void SetStateMachine(IAsyncStateMachine stateMachine)
			{
			}

			[DebuggerHidden]
			global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem> global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>.GetAsyncEnumerator(CancellationToken cancellationToken = default(CancellationToken))
			{
				//IL_0020: Unknown result type (might be due to invalid IL or missing references)
				//IL_0025: Unknown result type (might be due to invalid IL or missing references)
				<Enumerate>d__4 <Enumerate>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = -3;
					<>t__builder = AsyncIteratorMethodBuilder.Create();
					<>w__disposeMode = false;
					<Enumerate>d__ = this;
				}
				else
				{
					<Enumerate>d__ = new <Enumerate>d__4(-3);
				}
				<Enumerate>d__.path = <>3__path;
				return <Enumerate>d__;
			}

			[DebuggerHidden]
			global::System.Threading.Tasks.ValueTask<bool> global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.MoveNextAsync()
			{
				//IL_0041: Unknown result type (might be due to invalid IL or missing references)
				//IL_0047: Invalid comparison between Unknown and I4
				if (<>1__state == -2)
				{
					return default(global::System.Threading.Tasks.ValueTask<bool>);
				}
				<>v__promiseOfValueOrEnd.Reset();
				<Enumerate>d__4 <Enumerate>d__ = this;
				((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<Enumerate>d__4>(ref <Enumerate>d__);
				short version = <>v__promiseOfValueOrEnd.Version;
				if ((int)<>v__promiseOfValueOrEnd.GetStatus(version) == 1)
				{
					return new global::System.Threading.Tasks.ValueTask<bool>(<>v__promiseOfValueOrEnd.GetResult(version));
				}
				return new global::System.Threading.Tasks.ValueTask<bool>((IValueTaskSource<bool>)this, version);
			}

			[DebuggerHidden]
			bool IValueTaskSource<bool>.GetResult(short token)
			{
				return <>v__promiseOfValueOrEnd.GetResult(token);
			}

			[DebuggerHidden]
			ValueTaskSourceStatus IValueTaskSource<bool>.GetStatus(short token)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				return <>v__promiseOfValueOrEnd.GetStatus(token);
			}

			[DebuggerHidden]
			void IValueTaskSource<bool>.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags)
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				<>v__promiseOfValueOrEnd.OnCompleted(continuation, state, token, flags);
			}

			[DebuggerHidden]
			void IValueTaskSource.GetResult(short token)
			{
				<>v__promiseOfValueOrEnd.GetResult(token);
			}

			[DebuggerHidden]
			ValueTaskSourceStatus IValueTaskSource.GetStatus(short token)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				return <>v__promiseOfValueOrEnd.GetStatus(token);
			}

			[DebuggerHidden]
			void IValueTaskSource.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags)
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				<>v__promiseOfValueOrEnd.OnCompleted(continuation, state, token, flags);
			}

			[DebuggerHidden]
			global::System.Threading.Tasks.ValueTask global::System.IAsyncDisposable.DisposeAsync()
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				if (<>1__state >= -1)
				{
					throw new NotSupportedException();
				}
				if (<>1__state == -2)
				{
					return default(global::System.Threading.Tasks.ValueTask);
				}
				<>w__disposeMode = true;
				<>v__promiseOfValueOrEnd.Reset();
				<Enumerate>d__4 <Enumerate>d__ = this;
				((AsyncIteratorMethodBuilder)(ref <>t__builder)).MoveNext<<Enumerate>d__4>(ref <Enumerate>d__);
				return new global::System.Threading.Tasks.ValueTask((IValueTaskSource)(object)this, <>v__promiseOfValueOrEnd.Version);
			}
		}

		[CompilerGenerated]
		private sealed class <EnumerateConfigs>d__5 : global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>, global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>, global::System.IAsyncDisposable, IValueTaskSource<bool>, IValueTaskSource, IAsyncStateMachine
		{
			public int <>1__state;

			public AsyncIteratorMethodBuilder <>t__builder;

			public ManualResetValueTaskSourceCore<bool> <>v__promiseOfValueOrEnd;

			private DataFeedItem <>2__current;

			private bool <>w__disposeMode;

			private int <>l__initialThreadId;

			private ModMeta metaData;

			public ModMeta <>3__metaData;

			private ConfigFile configFile;

			public ConfigFile <>3__configFile;

			private <>c__DisplayClass5_0 <>8__1;

			private global::System.Collections.Generic.IReadOnlyList<string> path;

			public global::System.Collections.Generic.IReadOnlyList<string> <>3__path;

			private <>c__DisplayClass5_1 <>8__2;

			private string[] <groupKeys>5__2;

			private Enumerator<IGrouping<string, ConfigEntryBase>> <>7__wrap2;

			private IGrouping<string, ConfigEntryBase> <sectionGroup>5__4;

			private List<string> <added>5__5;

			private global::System.Collections.Generic.IEnumerator<ConfigEntryBase> <>7__wrap5;

			private string <key>5__7;

			private LocaleString <nameKey>5__8;

			private LocaleString <descKey>5__9;

			private string[] <groupingKeys>5__10;

			private DataFeedItem <dummyField>5__11;

			private bool <customUi>5__12;

			private global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem> <>7__wrap12;

			private object <>7__wrap13;

			private int <>7__wrap14;

			private ValueTaskAwaiter<bool> <>u__1;

			private ValueTaskAwaiter <>u__2;

			DataFeedItem global::System.Collections.Generic.IAsyncEnumerator<DataFeedItem>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <EnumerateConfigs>d__5(int <>1__state)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				<>t__builder = AsyncIteratorMethodBuilder.Create();
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			private void MoveNext()
			{
				//IL_0a34: Unknown result type (might be due to invalid IL or missing references)
				//IL_0a37: Unknown result type (might be due to invalid IL or missing references)
				//IL_0b1f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0b22: Unknown result type (might be due to invalid IL or missing references)
				//IL_0dbc: Unknown result type (might be due to invalid IL or missing references)
				//IL_0dbf: Unknown result type (might be due to invalid IL or missing references)
				//IL_10c0: Unknown result type (might be due to invalid IL or missing references)
				//IL_10e8: Unknown result type (might be due to invalid IL or missing references)
				//IL_10f4: Unknown result type (might be due to invalid IL or missing references)
				//IL_0b3f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0b45: Unknown result type (might be due to invalid IL or missing references)
				//IL_0794: Unknown result type (might be due to invalid IL or missing references)
				//IL_0799: Unknown result type (might be due to invalid IL or missing references)
				//IL_0c4b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0c50: Unknown result type (might be due to invalid IL or missing references)
				//IL_115d: Unknown result type (might be due to invalid IL or missing references)
				//IL_1185: Unknown result type (might be due to invalid IL or missing references)
				//IL_1191: Unknown result type (might be due to invalid IL or missing references)
				//IL_1019: Unknown result type (might be due to invalid IL or missing references)
				//IL_1020: Expected O, but got Unknown
				//IL_103b: Unknown result type (might be due to invalid IL or missing references)
				//IL_1048: Unknown result type (might be due to invalid IL or missing references)
				//IL_0f96: Unknown result type (might be due to invalid IL or missing references)
				//IL_0f9d: Expected O, but got Unknown
				//IL_0fb8: Unknown result type (might be due to invalid IL or missing references)
				//IL_0fc5: Unknown result type (might be due to invalid IL or missing references)
				//IL_0f17: Unknown result type (might be due to invalid IL or missing references)
				//IL_0f1d: Expected O, but got Unknown
				//IL_0f37: Unknown result type (might be due to invalid IL or missing references)
				//IL_0f44: Unknown result type (might be due to invalid IL or missing references)
				//IL_07ae: Unknown result type (might be due to invalid IL or missing references)
				//IL_07b0: Unknown result type (might be due to invalid IL or missing references)
				//IL_0c65: Unknown result type (might be due to invalid IL or missing references)
				//IL_0c67: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
				//IL_0bbe: Unknown result type (might be due to invalid IL or missing references)
				//IL_0bc3: Unknown result type (might be due to invalid IL or missing references)
				//IL_0bf7: Unknown result type (might be due to invalid IL or missing references)
				//IL_0bfc: Unknown result type (might be due to invalid IL or missing references)
				//IL_0c04: Unknown result type (might be due to invalid IL or missing references)
				//IL_0e05: Unknown result type (might be due to invalid IL or missing references)
				//IL_0e11: Unknown result type (might be due to invalid IL or missing references)
				//IL_07cd: Unknown result type (might be due to invalid IL or missing references)
				//IL_07d2: Unknown result type (might be due to invalid IL or missing references)
				//IL_07da: Unknown result type (might be due to invalid IL or missing references)
				//IL_0c84: Unknown result type (might be due to invalid IL or missing references)
				//IL_0c89: Unknown result type (might be due to invalid IL or missing references)
				//IL_0c91: Unknown result type (might be due to invalid IL or missing references)
				//IL_0193: Unknown result type (might be due to invalid IL or missing references)
				//IL_019a: Expected O, but got Unknown
				//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
				//IL_0bd8: Unknown result type (might be due to invalid IL or missing references)
				//IL_0bda: Unknown result type (might be due to invalid IL or missing references)
				//IL_0ea7: Unknown result type (might be due to invalid IL or missing references)
				//IL_0ead: Unknown result type (might be due to invalid IL or missing references)
				//IL_0eb3: Expected O, but got Unknown
				//IL_0ec8: Unknown result type (might be due to invalid IL or missing references)
				//IL_0867: Unknown result type (might be due to invalid IL or missing references)
				//IL_086d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0707: Unknown result type (might be due to invalid IL or missing references)
				//IL_070c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0740: Unknown result type (might be due to invalid IL or missing references)
				//IL_0745: Unknown result type (might be due to invalid IL or missing references)
				//IL_074d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0721: Unknown result type (might be due to invalid IL or missing references)
				//IL_0723: Unknown result type (might be due to invalid IL or missing references)
				//IL_034d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0352: Unknown result type (might be due to invalid IL or missing references)
				//IL_0369: Unknown result type (might be due to invalid IL or missing references)
				//IL_036e: Unknown result type (might be due to invalid IL or missing references)
				//IL_03b5: Unknown result type (might be due to invalid IL or missing references)
				//IL_03ba: Unknown result type (might be due to invalid IL or missing references)
				//IL_0403: Unknown result type (might be due to invalid IL or missing references)
				//IL_0408: Unknown result type (might be due to invalid IL or missing references)
				//IL_0565: Unknown result type (might be due to invalid IL or missing references)
				//IL_056b: Unknown result type (might be due to invalid IL or missing references)
				//IL_055a: Unknown result type (might be due to invalid IL or missing references)
				//IL_055f: Unknown result type (might be due to invalid IL or missing references)
				//IL_049d: Unknown result type (might be due to invalid IL or missing references)
				//IL_04a2: Unknown result type (might be due to invalid IL or missing references)
				//IL_04a5: Unknown result type (might be due to invalid IL or missing references)
				//IL_04a7: Unknown result type (might be due to invalid IL or missing references)
				//IL_04ac: Unknown result type (might be due to invalid IL or missing references)
				//IL_04b2: Unknown result type (might be due to invalid IL or missing references)
				//IL_04b4: Unknown result type (might be due to invalid IL or missing references)
				//IL_04b9: Unknown result type (might be due to invalid IL or missing references)
				//IL_04be: Unknown result type (might be due to invalid IL or missing references)
				//IL_04c0: Unknown result type (might be due to invalid IL or missing references)
				//IL_0504: Unknown result type (might be due to invalid IL or missing references)
				//IL_0509: Unknown result type (might be due to invalid IL or missing references)
				//IL_0543: Unknown result type (might be due to invalid IL or missing references)
				//IL_0548: Unknown result type (might be due to invalid IL or missing references)
				//IL_05ff: Unknown result type (might be due to invalid IL or missing references)
				//IL_0606: Expected O, but got Unknown
				//IL_061b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0621: Unknown result type (might be due to invalid IL or missing references)
				//IL_0a02: Unknown result type (might be due to invalid IL or missing references)
				//IL_0a09: Expected O, but got Unknown
				//IL_0983: Unknown result type (might be due to invalid IL or missing references)
				//IL_098a: Expected O, but got Unknown
				//IL_099e: Unknown result type (might be due to invalid IL or missing references)
				//IL_09a1: Unknown result type (might be due to invalid IL or missing references)
				//IL_0689: Unknown result type (might be due to invalid IL or missing references)
				//IL_068f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0d8a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0d91: Expected O, but got Unknown
				int num = <>1__state;
				try
				{
					switch (num)
					{
					default:
					{
						if (<>w__disposeMode)
						{
							break;
						}
						num = (<>1__state = -1);
						<>8__1 = new <>c__DisplayClass5_0();
						<>8__1.metaData = metaData;
						CategoryHandlers.Clear();
						List<IGrouping<string, ConfigEntryBase>> val11 = Enumerable.ToList<IGrouping<string, ConfigEntryBase>>(Enumerable.GroupBy<ConfigEntryBase, string>(Enumerable.Where<ConfigEntryBase>((global::System.Collections.Generic.IEnumerable<ConfigEntryBase>)configFile.Values, (Func<ConfigEntryBase, bool>)((ConfigEntryBase config) => Plugin.ShowHidden.Value || !HiddenConfig.IsHidden(config))), (Func<ConfigEntryBase, string>)((ConfigEntryBase config) => config.Definition.Section)));
						<>7__wrap2 = val11.GetEnumerator();
						goto case -10;
					}
					case -10:
					case -9:
					case -8:
					case -7:
					case -6:
					case -5:
					case -4:
					case 0:
					case 1:
					case 2:
					case 3:
					{
						try
						{
							switch (num)
							{
							case -4:
								num = (<>1__state = -1);
								if (!<>w__disposeMode)
								{
									<added>5__5 = new List<string>();
									<>7__wrap5 = ((global::System.Collections.Generic.IEnumerable<ConfigEntryBase>)<sectionGroup>5__4).GetEnumerator();
									goto case -10;
								}
								goto end_IL_00fa;
							case -10:
							case -9:
							case -8:
							case -7:
							case -6:
							case -5:
							case 0:
							case 1:
							case 2:
							case 3:
								try
								{
									ValueTaskAwaiter awaiter;
									object obj2;
									switch (num)
									{
									case -5:
									case 0:
										try
										{
											ValueTaskAwaiter<bool> awaiter2;
											if (num != -5)
											{
												if (num != 0)
												{
													goto IL_06f1;
												}
												awaiter2 = <>u__1;
												<>u__1 = default(ValueTaskAwaiter<bool>);
												num = (<>1__state = -1);
												goto IL_075c;
											}
											num = (<>1__state = -1);
											if (!<>w__disposeMode)
											{
												goto IL_06f1;
											}
											goto end_IL_06aa;
											IL_06f1:
											<>2__current = null;
											awaiter2 = <>7__wrap12.MoveNextAsync().GetAwaiter();
											if (!awaiter2.IsCompleted)
											{
												num = (<>1__state = 0);
												<>u__1 = awaiter2;
												<EnumerateConfigs>d__5 <EnumerateConfigs>d__ = this;
												((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter<bool>, <EnumerateConfigs>d__5>(ref awaiter2, ref <EnumerateConfigs>d__);
												return;
											}
											goto IL_075c;
											IL_075c:
											if (awaiter2.GetResult())
											{
												DataFeedItem current = <>7__wrap12.Current;
												<>2__current = current;
												num = (<>1__state = -5);
												goto IL_11d2;
											}
											end_IL_06aa:;
										}
										catch (object obj)
										{
											<>7__wrap13 = obj;
										}
										if (<>7__wrap12 != null)
										{
											<>2__current = null;
											awaiter = ((global::System.IAsyncDisposable)<>7__wrap12).DisposeAsync().GetAwaiter();
											if (!((ValueTaskAwaiter)(ref awaiter)).IsCompleted)
											{
												num = (<>1__state = 1);
												<>u__2 = awaiter;
												<EnumerateConfigs>d__5 <EnumerateConfigs>d__ = this;
												((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter, <EnumerateConfigs>d__5>(ref awaiter, ref <EnumerateConfigs>d__);
												return;
											}
											goto IL_07e9;
										}
										goto IL_07f0;
									case 1:
										awaiter = <>u__2;
										<>u__2 = default(ValueTaskAwaiter);
										num = (<>1__state = -1);
										goto IL_07e9;
									case -6:
										num = (<>1__state = -1);
										if (<>w__disposeMode)
										{
											break;
										}
										goto IL_08b3;
									case -7:
										num = (<>1__state = -1);
										if (<>w__disposeMode)
										{
											break;
										}
										goto IL_0df8;
									case -8:
										num = (<>1__state = -1);
										if (<>w__disposeMode)
										{
											break;
										}
										goto IL_0df8;
									case -9:
									case 2:
										try
										{
											ValueTaskAwaiter<bool> awaiter2;
											if (num != -9)
											{
												if (num != 2)
												{
													goto IL_0ba8;
												}
												awaiter2 = <>u__1;
												<>u__1 = default(ValueTaskAwaiter<bool>);
												num = (<>1__state = -1);
												goto IL_0c13;
											}
											num = (<>1__state = -1);
											if (!<>w__disposeMode)
											{
												goto IL_0ba8;
											}
											goto end_IL_0b60;
											IL_0ba8:
											<>2__current = null;
											awaiter2 = <>7__wrap12.MoveNextAsync().GetAwaiter();
											if (!awaiter2.IsCompleted)
											{
												num = (<>1__state = 2);
												<>u__1 = awaiter2;
												<EnumerateConfigs>d__5 <EnumerateConfigs>d__ = this;
												((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter<bool>, <EnumerateConfigs>d__5>(ref awaiter2, ref <EnumerateConfigs>d__);
												return;
											}
											goto IL_0c13;
											IL_0c13:
											if (awaiter2.GetResult())
											{
												DataFeedItem current2 = <>7__wrap12.Current;
												<>2__current = current2;
												num = (<>1__state = -9);
												goto IL_11d2;
											}
											end_IL_0b60:;
										}
										catch (object obj)
										{
											<>7__wrap13 = obj;
										}
										if (<>7__wrap12 != null)
										{
											<>2__current = null;
											awaiter = ((global::System.IAsyncDisposable)<>7__wrap12).DisposeAsync().GetAwaiter();
											if (!((ValueTaskAwaiter)(ref awaiter)).IsCompleted)
											{
												num = (<>1__state = 3);
												<>u__2 = awaiter;
												<EnumerateConfigs>d__5 <EnumerateConfigs>d__ = this;
												((AsyncIteratorMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<ValueTaskAwaiter, <EnumerateConfigs>d__5>(ref awaiter, ref <EnumerateConfigs>d__);
												return;
											}
											goto IL_0ca0;
										}
										goto IL_0ca7;
									case 3:
										awaiter = <>u__2;
										<>u__2 = default(ValueTaskAwaiter);
										num = (<>1__state = -1);
										goto IL_0ca0;
									case -10:
										num = (<>1__state = -1);
										if (<>w__disposeMode)
										{
											break;
										}
										goto IL_0df8;
									default:
										{
											if (!((global::System.Collections.IEnumerator)<>7__wrap5).MoveNext())
											{
												break;
											}
											<>c__DisplayClass5_2 CS$<>8__locals1 = new <>c__DisplayClass5_2
											{
												config = <>7__wrap5.Current
											};
											string text = <>8__2.section + "." + CS$<>8__locals1.config.Definition.Key;
											<key>5__7 = (<added>5__5.Contains(text) ? (text + <added>5__5.Count) : text);
											<added>5__5.Add(<key>5__7);
											bool flag = HiddenConfig.IsHidden(CS$<>8__locals1.config);
											CS$<>8__locals1.valueType = CS$<>8__locals1.config.SettingType;
											<nameKey>5__8 = LocaleString.op_Implicit(flag ? ("<color=hero.yellow>" + CS$<>8__locals1.config.Definition.Key + "</color>") : CS$<>8__locals1.config.Definition.Key);
											<descKey>5__9 = LocaleString.op_Implicit(CS$<>8__locals1.config.Description.Description);
											LocaleString val2 = LocaleString.op_Implicit($"{CS$<>8__locals1.config.Definition.Key} : {CS$<>8__locals1.valueType}");
											LocaleString val3 = LocaleString.op_Implicit($"{CS$<>8__locals1.config.Definition.Key} : {CS$<>8__locals1.config.BoxedValue}");
											if (Enumerable.Any<PluginInfo>((global::System.Collections.Generic.IEnumerable<PluginInfo>)LocaleLoader.PluginsWithLocales, (Func<PluginInfo, bool>)((PluginInfo x) => x.Metadata.GUID == <>8__2.CS$<>8__locals1.metaData.ID)) && Enumerable.FirstOrDefault<object>((global::System.Collections.Generic.IEnumerable<object>)CS$<>8__locals1.config.Description.Tags, (Func<object, bool>)((object x) => x is ConfigLocale)) is ConfigLocale val4)
											{
												<nameKey>5__8 = val4.Name;
												<descKey>5__9 = val4.Description;
												string formattedLocaleString = LocaleLoader.GetFormattedLocaleString(val4.Name.content);
												val2 = LocaleString.op_Implicit($"{formattedLocaleString} : {CS$<>8__locals1.valueType}");
												val3 = LocaleString.op_Implicit($"{formattedLocaleString} : {CS$<>8__locals1.config.BoxedValue}");
											}
											if (flag)
											{
												<nameKey>5__8 = ((LocaleString)(ref <nameKey>5__8)).SetFormat("<color=hero.yellow>{0}</color>");
											}
											InternalLocale internalLocale = new InternalLocale(<nameKey>5__8, <descKey>5__9);
											<groupingKeys>5__10 = new string[1] { <>8__2.section };
											if (CS$<>8__locals1.valueType == typeof(dummy))
											{
												<>c__DisplayClass5_3 CS$<>8__locals0 = new <>c__DisplayClass5_3();
												<dummyField>5__11 = null;
												CS$<>8__locals0.firstAction = Enumerable.FirstOrDefault<object>((global::System.Collections.Generic.IEnumerable<object>)CS$<>8__locals1.config.Description.Tags, (Func<object, bool>)((object x) => (x is ActionConfig || x is Action) ? true : false));
												if (CS$<>8__locals0.firstAction != null)
												{
													DataFeedAction val5 = new DataFeedAction();
													((DataFeedItem)val5).InitBase(<key>5__7, path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupingKeys>5__10, <nameKey>5__8, <descKey>5__9, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
													val5.InitAction((Action<SyncDelegate<Action>>)delegate(SyncDelegate<Action> syncDelegate)
													{
														//IL_0039: Unknown result type (might be due to invalid IL or missing references)
														//IL_0043: Expected O, but got Unknown
														//IL_006b: Unknown result type (might be due to invalid IL or missing references)
														//IL_0075: Expected O, but got Unknown
														<>c__DisplayClass5_4 CS$<>8__locals2 = new <>c__DisplayClass5_4();
														Button component3 = ((ContainerWorker<Component>)(object)((SyncElement)syncDelegate).Slot).GetComponent<Button>((Predicate<Button>)null, false);
														if (component3 != null)
														{
															CS$<>8__locals2.actionConfig = CS$<>8__locals0.firstAction as ActionConfig;
															if (CS$<>8__locals2.actionConfig != null)
															{
																component3.LocalPressed += (ButtonEventHandler)delegate
																{
																	CS$<>8__locals2.actionConfig.Invoke();
																};
															}
															else
															{
																<>c__DisplayClass5_5 CS$<>8__locals3 = new <>c__DisplayClass5_5
																{
																	action = (Action)/*isinst with value type is only supported in some contexts*/
																};
																if (CS$<>8__locals3.action != null)
																{
																	component3.LocalPressed += (ButtonEventHandler)delegate
																	{
																		CS$<>8__locals3.action.Invoke();
																	};
																}
															}
														}
													});
													<dummyField>5__11 = (DataFeedItem)(object)val5;
												}
												<customUi>5__12 = false;
												DataFeedMethod customFeedMethod = CustomDataFeed.GetCustomFeedMethod(CS$<>8__locals1.config);
												if (customFeedMethod != null)
												{
													<customUi>5__12 = true;
													global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> asyncEnumerable = customFeedMethod(path, <groupingKeys>5__10);
													<>7__wrap12 = asyncEnumerable.GetAsyncEnumerator(default(CancellationToken));
													<>7__wrap13 = null;
													<>7__wrap14 = 0;
													goto case -5;
												}
												goto IL_0833;
											}
											if (CS$<>8__locals1.valueType == typeof(bool))
											{
												<>2__current = (DataFeedItem)(object)DataFeedHelpers.GenerateToggle(<key>5__7, path, <groupingKeys>5__10, internalLocale, CS$<>8__locals1.config);
												num = (<>1__state = -7);
											}
											else if (CS$<>8__locals1.valueType.IsEnum)
											{
												DataFeedItem val6;
												try
												{
													if (CustomAttributeExtensions.GetCustomAttribute<FlagsAttribute>((MemberInfo)(object)CS$<>8__locals1.valueType) != null)
													{
														LocaleLoader.AddLocaleString("Settings." + <key>5__7 + ".Breadcrumb", text, false, "ResoniteModding");
														CategoryHandlers.Add(<key>5__7, (Func<global::System.Collections.Generic.IReadOnlyList<string>, global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>>)((global::System.Collections.Generic.IReadOnlyList<string> path2) => (global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>)((MethodBase)DataFeedHelpers.HandleFlagsEnumCategory.MakeGenericMethod(new global::System.Type[1] { CS$<>8__locals1.valueType })).Invoke((object)null, new object[2] { path2, CS$<>8__locals1.config })));
														val6 = (DataFeedItem)new DataFeedCategory();
														val6.InitBase(<key>5__7, path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupingKeys>5__10, val3, <descKey>5__9, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
													}
													else
													{
														val6 = (DataFeedItem)((MethodBase)DataFeedHelpers.GenerateEnumItemsAsync.MakeGenericMethod(new global::System.Type[1] { CS$<>8__locals1.valueType })).Invoke((object)null, new object[5] { <key>5__7, path, <groupingKeys>5__10, internalLocale, CS$<>8__locals1.config });
													}
												}
												catch (global::System.Exception ex)
												{
													Plugin.Log.LogError((object)ex);
													val6 = (DataFeedItem)(object)new DataFeedValueField<dummy>();
													val6.InitBase(<key>5__7, path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupingKeys>5__10, val2, <descKey>5__9, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
												}
												<>2__current = val6;
												num = (<>1__state = -8);
											}
											else
											{
												if (ReflectionExtensions.IsNullable(CS$<>8__locals1.valueType))
												{
													global::System.Type type = CS$<>8__locals1.valueType.GetGenericArguments()[0];
													if (type.IsEnum)
													{
														global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem> asyncEnumerable2;
														try
														{
															asyncEnumerable2 = (global::System.Collections.Generic.IAsyncEnumerable<DataFeedItem>)((MethodBase)DataFeedHelpers.GenerateNullableEnumItemsAsync.MakeGenericMethod(new global::System.Type[1] { type })).Invoke((object)null, new object[5] { <key>5__7, path, <groupingKeys>5__10, internalLocale, CS$<>8__locals1.config });
														}
														catch (global::System.Exception ex2)
														{
															Plugin.Log.LogError((object)ex2);
															DataFeedValueField<dummy> obj3 = new DataFeedValueField<dummy>();
															((DataFeedItem)obj3).InitBase(<key>5__7, path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupingKeys>5__10, val2, <descKey>5__9, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
															asyncEnumerable2 = ((DataFeedItem)(object)obj3).AsAsyncEnumerable();
														}
														<>7__wrap12 = asyncEnumerable2.GetAsyncEnumerator(default(CancellationToken));
														<>7__wrap13 = null;
														<>7__wrap14 = 0;
														goto case -9;
													}
													goto IL_0df8;
												}
												DataFeedItem val7;
												try
												{
													val7 = (DataFeedItem)((CS$<>8__locals1.config.SettingType.IsTypeInjectable() || !TomlTypeConverter.CanConvert(CS$<>8__locals1.config.SettingType)) ? ((object)(DataFeedItem)((MethodBase)DataFeedHelpers.GenerateValueField.MakeGenericMethod(new global::System.Type[1] { CS$<>8__locals1.valueType })).Invoke((object)null, new object[5] { <key>5__7, path, <groupingKeys>5__10, internalLocale, CS$<>8__locals1.config })) : ((object)DataFeedHelpers.GenerateProxyField(<key>5__7, path, <groupingKeys>5__10, internalLocale, CS$<>8__locals1.config)));
												}
												catch (global::System.Exception ex3)
												{
													Plugin.Log.LogError((object)ex3);
													val7 = (DataFeedItem)(object)new DataFeedValueField<dummy>();
													val7.InitBase(<key>5__7, path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupingKeys>5__10, val2, <descKey>5__9, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
												}
												<>2__current = val7;
												num = (<>1__state = -10);
											}
											goto IL_11d2;
										}
										IL_0df8:
										<key>5__7 = null;
										<nameKey>5__8 = default(LocaleString);
										<descKey>5__9 = default(LocaleString);
										<groupingKeys>5__10 = null;
										goto default;
										IL_0833:
										if (<dummyField>5__11 == null && !<customUi>5__12)
										{
											<dummyField>5__11 = (DataFeedItem)(object)new DataFeedValueField<dummy>();
											<dummyField>5__11.InitBase(<key>5__7, path, (global::System.Collections.Generic.IReadOnlyList<string>)<groupingKeys>5__10, <nameKey>5__8, <descKey>5__9, (Uri)null, (Action<IField<bool>>)null, (Action<IField<bool>>)null, (global::System.Collections.Generic.IReadOnlyList<DataFeedItem>)null, (object)null);
										}
										if (<customUi>5__12)
										{
											goto IL_08b3;
										}
										<>2__current = <dummyField>5__11;
										num = (<>1__state = -6);
										goto IL_11d2;
										IL_0ca0:
										((ValueTaskAwaiter)(ref awaiter)).GetResult();
										goto IL_0ca7;
										IL_07e9:
										((ValueTaskAwaiter)(ref awaiter)).GetResult();
										goto IL_07f0;
										IL_07f0:
										obj2 = <>7__wrap13;
										if (obj2 != null)
										{
											ExceptionDispatchInfo.Capture((obj2 as global::System.Exception) ?? throw obj2).Throw();
										}
										_ = <>7__wrap14;
										if (!<>w__disposeMode)
										{
											<>7__wrap13 = null;
											<>7__wrap12 = null;
											goto IL_0833;
										}
										break;
										IL_08b3:
										<dummyField>5__11 = null;
										goto IL_0df8;
										IL_0ca7:
										obj2 = <>7__wrap13;
										if (obj2 != null)
										{
											ExceptionDispatchInfo.Capture((obj2 as global::System.Exception) ?? throw obj2).Throw();
										}
										_ = <>7__wrap14;
										if (!<>w__disposeMode)
										{
											<>7__wrap13 = null;
											<>7__wrap12 = null;
											goto IL_