using System;
using System.Collections.Generic;
using System.Xml;
using Cpp2IlInjected;
using UnityEngine;
using UnityEngine.UI;

// Token: 0x02000038 RID: 56
[Token(Token = "0x2000038")]
public class BugReporter : MonoBehaviour
{
	// Token: 0x060001A8 RID: 424 RVA: 0x00006B00 File Offset: 0x00004D00
	[Token(Token = "0x60001A8")]
	[Address(RVA = "0x1346AD0", Offset = "0x13458D0", VA = "0x181346AD0")]
	private void Awake()
	{
		UnityEngine.Object.DontDestroyOnLoad(this);
		LogHistory logHistory = new LogHistory();
		this.logHistory = logHistory;
		LogHistory logHistory2 = this.logHistory;
		Action<LogHistoryItem> action = new Action(this.OnLogItemAdded);
		logHistory2.LogHistoryItemAdded += action;
		this.logItemCount = (int)((ulong)0L);
	}

	// Token: 0x060001A9 RID: 425 RVA: 0x00006B4C File Offset: 0x00004D4C
	[Token(Token = "0x60001A9")]
	[Address(RVA = "0x13476C0", Offset = "0x13464C0", VA = "0x1813476C0")]
	private void Update()
	{
		this.logHistory.Update();
	}

	// Token: 0x060001AA RID: 426 RVA: 0x00006B6C File Offset: 0x00004D6C
	[Token(Token = "0x60001AA")]
	[Address(RVA = "0x13475D0", Offset = "0x13463D0", VA = "0x1813475D0")]
	private void OnDestroy()
	{
		LogHistory logHistory = this.logHistory;
		if (logHistory != 0)
		{
			logHistory.Dispose();
			return;
		}
	}

	// Token: 0x060001AB RID: 427 RVA: 0x00006B8C File Offset: 0x00004D8C
	[Token(Token = "0x60001AB")]
	[Address(RVA = "0x1346BF0", Offset = "0x13459F0", VA = "0x181346BF0")]
	public void Clear()
	{
		this.logHistory.Clear();
	}

	// Token: 0x060001AC RID: 428 RVA: 0x00006BAC File Offset: 0x00004DAC
	[Token(Token = "0x60001AC")]
	[Address(RVA = "0x13474F0", Offset = "0x13462F0", VA = "0x1813474F0")]
	private void Initialize()
	{
		LogHistory logHistory = new LogHistory();
		this.logHistory = logHistory;
		LogHistory logHistory2 = this.logHistory;
		Action<LogHistoryItem> action = new Action(this.OnLogItemAdded);
		logHistory2.LogHistoryItemAdded += action;
		this.logItemCount = (int)((ulong)0L);
	}

	// Token: 0x060001AD RID: 429 RVA: 0x00006BF0 File Offset: 0x00004DF0
	[Token(Token = "0x60001AD")]
	[Address(RVA = "0x13475F0", Offset = "0x13463F0", VA = "0x1813475F0")]
	private void OnLogItemAdded(LogHistoryItem logHistoryItem)
	{
		if (this.logItemCount > 40)
		{
			this.logLabel.text = "[Console Log]";
			this.logItemCount = (int)((ulong)0L);
		}
		Text text = this.logLabel;
		string text2 = text.text;
		string logMessage = logHistoryItem.LogMessage;
		string text3 = text2 + "\n" + logMessage;
		bool dtdValidation = ((IDtdParserAdapterWithValidation)text).DtdValidation;
	}

	// Token: 0x060001AE RID: 430 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60001AE")]
	[Address(RVA = "0x1346C10", Offset = "0x1345A10", VA = "0x181346C10")]
	private void ExportLog()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060001AF RID: 431 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60001AF")]
	[Address(RVA = "0x13476E0", Offset = "0x13464E0", VA = "0x1813476E0")]
	private IEnumerator<float> Upload(BugReporter.LogObject logObject)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060001B0 RID: 432 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60001B0")]
	[Address(RVA = "0x1347410", Offset = "0x1346210", VA = "0x181347410")]
	private string GetLogObjectName()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060001B1 RID: 433 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60001B1")]
	[Address(RVA = "0x1346EB0", Offset = "0x1345CB0", VA = "0x181346EB0")]
	private BugReporter.LogObject GetCurrentLogObject(string logObjectName)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060001B2 RID: 434 RVA: 0x00006C50 File Offset: 0x00004E50
	[Token(Token = "0x60001B2")]
	[Address(RVA = "0x1347770", Offset = "0x1346570", VA = "0x181347770")]
	public BugReporter()
	{
	}

	// Token: 0x0400020A RID: 522
	[Token(Token = "0x400020A")]
	private const float DELAY = 3f;

	// Token: 0x0400020B RID: 523
	[Token(Token = "0x400020B")]
	private const int LOG_LENGTH = 50;

	// Token: 0x0400020C RID: 524
	[Token(Token = "0x400020C")]
	private const int LOG_ITEM_MAXIMUM = 40;

	// Token: 0x0400020D RID: 525
	[FieldOffset(Offset = "0x18")]
	[Token(Token = "0x400020D")]
	[SerializeField]
	private string WebServerUrl = "";

	// Token: 0x0400020E RID: 526
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x400020E")]
	[SerializeField]
	private Text logLabel;

	// Token: 0x0400020F RID: 527
	[FieldOffset(Offset = "0x28")]
	[Token(Token = "0x400020F")]
	private LogHistory logHistory;

	// Token: 0x04000210 RID: 528
	[FieldOffset(Offset = "0x30")]
	[Token(Token = "0x4000210")]
	private float timeNow;

	// Token: 0x04000211 RID: 529
	[FieldOffset(Offset = "0x34")]
	[Token(Token = "0x4000211")]
	private float timeDelay;

	// Token: 0x04000212 RID: 530
	[FieldOffset(Offset = "0x38")]
	[Token(Token = "0x4000212")]
	private int logItemCount;

	// Token: 0x02000039 RID: 57
	[Token(Token = "0x2000039")]
	private class LogObject
	{
		// Token: 0x060001B3 RID: 435 RVA: 0x00006C70 File Offset: 0x00004E70
		[Token(Token = "0x60001B3")]
		[Address(RVA = "0x3D8B20", Offset = "0x3D7920", VA = "0x1803D8B20")]
		public LogObject()
		{
		}

		// Token: 0x04000213 RID: 531
		[FieldOffset(Offset = "0x10")]
		[Token(Token = "0x4000213")]
		public string Name;

		// Token: 0x04000214 RID: 532
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4000214")]
		public string UpdateTime;

		// Token: 0x04000215 RID: 533
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4000215")]
		public BugReporter.LogData[] Logs;
	}

	// Token: 0x0200003A RID: 58
	[Token(Token = "0x200003A")]
	private class LogData
	{
		// Token: 0x060001B4 RID: 436 RVA: 0x00006C84 File Offset: 0x00004E84
		[Token(Token = "0x60001B4")]
		[Address(RVA = "0x3D8B20", Offset = "0x3D7920", VA = "0x1803D8B20")]
		public LogData()
		{
		}

		// Token: 0x04000216 RID: 534
		[FieldOffset(Offset = "0x10")]
		[Token(Token = "0x4000216")]
		public string logHeader;

		// Token: 0x04000217 RID: 535
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4000217")]
		public string logTime;

		// Token: 0x04000218 RID: 536
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4000218")]
		public string logMsg;

		// Token: 0x04000219 RID: 537
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x4000219")]
		public string logStackTrace;
	}
}
